积分维护
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="pointsDetails">
|
<section class="pointsDetails">
|
||||||
<ai-list isTabs>
|
<ai-list>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-search-bar bottomBorder>
|
<ai-search-bar>
|
||||||
<template slot="left">
|
<template slot="left">
|
||||||
<el-date-picker size="small" v-model="searchDotime" type="daterange" range-separator="至" @change="timeChange"
|
<el-date-picker size="small" v-model="searchDotime" type="year" range-separator="至" @change="timeChange"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy" format="yyyy"></el-date-picker>
|
||||||
|
<!-- <el-date-picker v-model="search.startTime" size="small" type="year" placeholder="选择年"></el-date-picker> -->
|
||||||
</template>
|
</template>
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -108,6 +109,7 @@ export default {
|
|||||||
this.instance.post(`/app/apppartyintegralinfo/list`, null, {
|
this.instance.post(`/app/apppartyintegralinfo/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search,
|
...this.search,
|
||||||
|
type: 1
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -157,54 +159,6 @@ export default {
|
|||||||
background: #f3f6f9;
|
background: #f3f6f9;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
.form_content {
|
|
||||||
.form_flex {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
div {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form_info {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form_label {
|
|
||||||
display: inline-block;
|
|
||||||
color: #999;
|
|
||||||
vertical-align: top;
|
|
||||||
width: 70px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form_value {
|
|
||||||
display: inline-block;
|
|
||||||
color: #333;
|
|
||||||
width: calc(100% - 70px);
|
|
||||||
// img {
|
|
||||||
// width: 100px;
|
|
||||||
// height: 100px;
|
|
||||||
// margin: 0 8px 8px 0;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form_div {
|
|
||||||
padding-top: 24px;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-0 {
|
|
||||||
color: #FF4466;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-1 {
|
|
||||||
color: #2EA222;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-2 {
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -27,9 +27,9 @@
|
|||||||
@onConfirm="onConfirm"
|
@onConfirm="onConfirm"
|
||||||
@closed="form={}">
|
@closed="form={}">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="选择人员" prop="residentId">
|
<el-form-item label="选择人员" prop="partyId">
|
||||||
<ai-person-select :instance="instance" :customClicker="true"
|
<ai-person-select :instance="instance" :customClicker="true"
|
||||||
:url="'/app/appresident/list?areaId=' + user.info.areaId"
|
:url="'/app/appparty/list?partyOrgId=' + user.info.organizationId"
|
||||||
:isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson">
|
:isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson">
|
||||||
<template name="option" v-slot:option="{ item }">
|
<template name="option" v-slot:option="{ item }">
|
||||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||||
@@ -37,15 +37,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-person-select>
|
</ai-person-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="调整说明" prop="eventDesc">
|
<el-form-item label="调整说明" prop="remark">
|
||||||
<el-input v-model.trim="form.eventDesc" placeholder="请输入..." type="textarea" :rows="4" show-word-limit
|
<el-input v-model.trim="form.remark" placeholder="请输入..." type="textarea" :rows="4" show-word-limit
|
||||||
maxlength="100"></el-input>
|
maxlength="100"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="integralCalcType">
|
<el-form-item label="类型" prop="integralType">
|
||||||
<ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/>
|
<ai-select v-model="form.integralType" :selectList="dict.getDict('partyIntegralType')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="积分" prop="changeIntegral">
|
<el-form-item label="积分" prop="integral">
|
||||||
<el-input v-model.trim.num ="form.changeIntegral" placeholder="请输入正数" size="small"></el-input>
|
<el-input v-model.trim.num ="form.integral" placeholder="请输入正数" size="small"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
@@ -71,28 +71,33 @@ export default {
|
|||||||
size: 10,
|
size: 10,
|
||||||
total: 10
|
total: 10
|
||||||
},
|
},
|
||||||
form: {},
|
form: {
|
||||||
|
partyId: '',
|
||||||
|
partyName: '',
|
||||||
|
remark: '',
|
||||||
|
integralType: '',
|
||||||
|
integral: '',
|
||||||
|
},
|
||||||
dialog: false,
|
dialog: false,
|
||||||
personList: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
residentId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
partyId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
||||||
eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
|
remark: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
|
||||||
integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'},],
|
integralType: [{required: true, message: '请选择类型', trigger: 'change'},],
|
||||||
changeIntegral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}],
|
integral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{prop: "residentName", label: "姓名"},
|
{prop: "partyName", label: "姓名", align: 'center'},
|
||||||
{prop: "eventDesc", label: "调整说明"},
|
{prop: "remark", label: "调整说明", align: 'center'},
|
||||||
{prop: "integralCalcType", label: "类型", dict: "integralCalcType", align: 'center'},
|
{prop: "integralType", label: "类型", dict: "partyIntegralType", align: 'center'},
|
||||||
{prop: "changeIntegral", label: "积分", align: "center", render: (h, {row}) => h('p',{textAlign:'center'}, `${row.integralCalcType > 0 ? '+' : '-'}${row.changeIntegral}`)},
|
{prop: "integral", label: "积分", align: "center", render: (h, {row}) => h('p',{textAlign:'center'}, `${row.integralType == 1 ? '+' : '-'}${row.integral}`)},
|
||||||
{prop: "doTime", label: "操作时间"},
|
{prop: "createTime", label: "操作时间", align: 'center'},
|
||||||
{prop: "createUserName", label: "操作人", align: "center"},
|
{prop: "createUserName", label: "操作人", align: "center"},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -100,18 +105,19 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
selectPerson(val) {
|
selectPerson(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.form.residentId = val.id
|
this.form.partyId = val.id
|
||||||
this.personList = [{...val}]
|
this.form.partyName = val.name
|
||||||
} else {
|
} else {
|
||||||
this.form.residentId = ""
|
this.form.partyId = ""
|
||||||
this.personList = []
|
this.form.partyName = ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onConfirm() {
|
onConfirm() {
|
||||||
|
let formData = JSON.stringify(this.form)
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/apppartyintegralinfo/changeIntegral`, this.form).then(res => {
|
this.instance.post(`/app/apppartyintegralinfo/changeIntegral`, this.form ).then(res => {
|
||||||
if (res.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success("添加成功")
|
this.$message.success("添加成功")
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
this.getList()
|
this.getList()
|
||||||
@@ -121,8 +127,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appvillagerintegraldetail/list`, null, {
|
this.instance.post(`/app/apppartyintegralinfo/list`, null, {
|
||||||
params: {...this.page, areaId: this.areaId, type: 0}
|
params: {...this.page, type: 0}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
|
|||||||
Reference in New Issue
Block a user