积分整合
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<template slot="tabs">
|
<template slot="tabs">
|
||||||
<el-tabs v-model="currIndex">
|
<el-tabs v-model="currIndex">
|
||||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||||
<component :is="tab.comp" v-if="currIndex === String(i)" :bizType="tab.bizType" :ref="tab.name"
|
<component :is="tab.comp" v-if="currIndex === String(i)" :ref="tab.name"
|
||||||
:areaId="areaId" :instance="instance" :dict="dict" :permissions="permissions"/>
|
:areaId="areaId" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -36,20 +36,11 @@ export default {
|
|||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
tabs() {
|
tabs() {
|
||||||
return [
|
return [
|
||||||
// {
|
|
||||||
// label: "积分申报",
|
|
||||||
// name: "pointsDeclaration",
|
|
||||||
// comp: pointsDeclaration,
|
|
||||||
// permission: "app_apppartyfee_record",
|
|
||||||
// bizType: '0'
|
|
||||||
// },
|
|
||||||
// { label: "积分申诉", name: "pointsAppeal", comp: pointsAppeal, permission: "app_apppartyfee_config", bizType: '1'},
|
|
||||||
{
|
{
|
||||||
label: "积分明细",
|
label: "积分明细",
|
||||||
name: "pointsDetails",
|
name: "pointsDetails",
|
||||||
comp: pointsDetails,
|
comp: pointsDetails,
|
||||||
permission: "app_apppartyfee_statistics",
|
permission: "app_apppartyfee_statistics",
|
||||||
bizType: '2'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "积分调整",
|
label: "积分调整",
|
||||||
@@ -62,6 +53,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.areaId = this.user.info.areaId
|
this.areaId = this.user.info.areaId
|
||||||
|
this.dict.load("integralCalcType")
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeArea() {
|
changeArea() {
|
||||||
|
|||||||
@@ -22,8 +22,7 @@
|
|||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total" :dict="dict"
|
||||||
ref="aitableex"
|
|
||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
@@ -32,11 +31,6 @@
|
|||||||
<span>{{ row.changeIntegral > 0 ? '+' : '' }}{{ row.changeIntegral }}</span>
|
<span>{{ row.changeIntegral > 0 ? '+' : '' }}{{ row.changeIntegral }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column slot="doType" label="类型" align= "center">
|
|
||||||
<template slot-scope="{ row }">
|
|
||||||
<span>{{ dict.getLabel('integralDetailType', row.bizType) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column slot="options" label="操作" align="center" fixed="right" width="120">
|
<el-table-column slot="options" label="操作" align="center" fixed="right" width="120">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -51,31 +45,20 @@
|
|||||||
</ai-table>
|
</ai-table>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
<ai-dialog
|
<ai-dialog title="详情" :visible.sync="dialog" :customFooter="true" :destroyOnClose="true" width="720px">
|
||||||
title="详情"
|
<ai-wrapper>
|
||||||
:visible.sync="dialog.visible"
|
<ai-info-item label="户主:" :value="dialogInfo.familyName"/>
|
||||||
:customFooter="true"
|
<ai-info-item label="对象:" :value="dialogInfo.residentName"/>
|
||||||
:destroyOnClose="true"
|
<ai-info-item label="事件:" :value="dialogInfo.eventDesc" isLine/>
|
||||||
width="720px"
|
<ai-info-item label="时间:" :value="dialogInfo.doTime" isLine/>
|
||||||
>
|
<ai-info-item label="积分:">
|
||||||
<div class="form_content">
|
{{ dialogInfo.changeIntegral >= 0 ? '增加' : '减少' }}
|
||||||
<div class="form_info">
|
<span style="color:#26f" v-text="Math.abs(dialogInfo.changeIntegral)"/>分
|
||||||
<span class="form_label">户主:</span>
|
</ai-info-item>
|
||||||
<span class="form_value">{{dialogInfo.familyName}}</span>
|
<ai-info-item label="积分余额:" :value="dialogInfo.nowIntegral"/>
|
||||||
</div>
|
</ai-wrapper>
|
||||||
<div class="form_info">
|
|
||||||
<span class="form_label">事项:</span>
|
|
||||||
<span class="form_value">{{dialogInfo.ruleName}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="form_flex form_info">
|
|
||||||
<div>
|
|
||||||
<span class="form_label">积分:</span>
|
|
||||||
<span class="form_value">{{dialogInfo.changeIntegral >= 0 ? '增加' : '减少'}}<span style="color:#2266FF">{{Math.abs(dialogInfo.changeIntegral)}}</span>分</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="dialog-footer" slot="footer">
|
<div class="dialog-footer" slot="footer">
|
||||||
<el-button @click="dialog.visible=false" size="medium">关闭</el-button>
|
<el-button @click="dialog=false">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</section>
|
</section>
|
||||||
@@ -105,48 +88,14 @@ export default {
|
|||||||
colConfigs: [
|
colConfigs: [
|
||||||
{prop: "residentName", label: "对象", width: 160},
|
{prop: "residentName", label: "对象", width: 160},
|
||||||
{prop: "familyName", label: "户主", align: "center", width: 160},
|
{prop: "familyName", label: "户主", align: "center", width: 160},
|
||||||
{
|
{prop: "eventDesc", label: "事件", "show-overflow-tooltip": true, width: 420},
|
||||||
prop: "ruleName",
|
{prop: "doTime", label: "时间", width: 200},
|
||||||
label: "事件类型",
|
{prop: "type", label: "类型", width: 100, dict: "integralDetailType"},
|
||||||
"show-overflow-tooltip": true,
|
|
||||||
width:420
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "doTime",
|
|
||||||
label: "时间",
|
|
||||||
width:200
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// prop: "doType",
|
|
||||||
// label: "类型",
|
|
||||||
// align: "center",
|
|
||||||
// width: 100,
|
|
||||||
// render: (h, params) => {
|
|
||||||
// return h(
|
|
||||||
// "span",
|
|
||||||
// {
|
|
||||||
// class: "status-" + params.row.doType,
|
|
||||||
// },
|
|
||||||
// this.$dict.getLabel("integralIntegralType", params.row.doType)
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{ slot: "doType", label: "类型", width: 100},
|
|
||||||
{slot: "changeIntegral", label: "积分", width: 100},
|
{slot: "changeIntegral", label: "积分", width: 100},
|
||||||
// {
|
|
||||||
// prop: "bizType",
|
|
||||||
// label: "途径",
|
|
||||||
// align: "center",
|
|
||||||
// width: 100,
|
|
||||||
// formart: (bizType) =>
|
|
||||||
// this.$dict.getLabel("integralDetailBizType", bizType) || '-',
|
|
||||||
// },
|
|
||||||
{slot: "options", label: "操作", align: "center"},
|
{slot: "options", label: "操作", align: "center"},
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
dialog: {
|
dialog: false,
|
||||||
visible: false,
|
|
||||||
},
|
|
||||||
dialogInfo: {},
|
dialogInfo: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -164,8 +113,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.instance
|
this.instance.post(`/app/appvillagerintegraldetail/list`, null, {
|
||||||
.post(`/app/appvillagerintegraldetail/list`, null, {
|
|
||||||
params: {
|
params: {
|
||||||
...this.search,
|
...this.search,
|
||||||
areaId: this.areaId,
|
areaId: this.areaId,
|
||||||
@@ -192,11 +140,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
viewItem(row) {
|
viewItem(row) {
|
||||||
this.dialog.visible = true
|
this.dialog = true
|
||||||
this.instance.post(`/app/appvillagerintegraldetail/queryDetailById?id=${row.id}`, null, {}).then((res) => {
|
this.instance.post(`/app/appvillagerintegraldetail/queryDetailById?id=${row.id}`, null, {}).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res?.data) {
|
||||||
this.dialogInfo = res.data
|
this.dialogInfo = res.data
|
||||||
console.log(this.dialogInfo)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -218,16 +165,20 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: #f3f6f9;
|
background: #f3f6f9;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
.form_content {
|
.form_content {
|
||||||
.form_flex {
|
.form_flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
div {
|
div {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.form_info {
|
.form_info {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form_label {
|
.form_label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #999;
|
color: #999;
|
||||||
@@ -235,6 +186,7 @@ export default {
|
|||||||
width: 70px;
|
width: 70px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form_value {
|
.form_value {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -246,10 +198,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.form_div {
|
.form_div {
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-0 {
|
.status-0 {
|
||||||
color: #FF4466;
|
color: #FF4466;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="page.total"
|
:total="page.total" :dict="dict"
|
||||||
:current.sync="page.current"
|
:current.sync="page.current"
|
||||||
:size.sync="page.size"
|
:size.sync="page.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
@@ -40,14 +40,11 @@
|
|||||||
</ai-person-select>
|
</ai-person-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="调整说明" prop="description">
|
<el-form-item label="调整说明" prop="description">
|
||||||
<el-input v-model.trim="form.description" placeholder="请输入..." type="textarea" :rows="4" show-word-limit
|
<el-input v-model.trim="form.eventDesc" 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="doType">
|
<el-form-item label="类型" prop="integralCalcType">
|
||||||
<el-radio-group v-model="form.doType">
|
<ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/>
|
||||||
<el-radio label="0">加分</el-radio>
|
|
||||||
<el-radio label="1">减分</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="积分" prop="changeIntegral">
|
<el-form-item label="积分" prop="changeIntegral">
|
||||||
<el-input v-model.trim.num="form.changeIntegral" placeholder="请输入正整数" size="small"></el-input>
|
<el-input v-model.trim.num="form.changeIntegral" placeholder="请输入正整数" size="small"></el-input>
|
||||||
@@ -86,38 +83,19 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
residentId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
residentId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
||||||
description: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
|
eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
|
||||||
doType: [{required: true, message: '请输入调整说明', trigger: 'change'},],
|
integralCalcType: [{required: true, message: '请输入调整说明', trigger: 'change'},],
|
||||||
changeIntegral: [
|
changeIntegral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}],
|
||||||
{
|
|
||||||
required: true, validator: (rule, value, callback) => {
|
|
||||||
if (!/^[1-9]\d*$/.test(value)) {
|
|
||||||
callback(new Error('请输入正整数'))
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}, trigger: 'blur'
|
|
||||||
},],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{prop: "residentName", label: "姓名"},
|
{prop: "residentName", label: "姓名"},
|
||||||
{prop: "description", label: "调整说明"},
|
{prop: "eventDesc", label: "调整说明"},
|
||||||
{
|
{prop: "integralCalcType", label: "类型", dict: "integralCalcType", align: 'center'},
|
||||||
prop: "changeIntegral", label: "类型", align: "center",
|
{prop: "changeIntegral", label: "积分", align: "center", render: (h, {row}) => h('p', `${row.integralCalcType > 0 ? '+' : '-'}${row.changeIntegral}`)},
|
||||||
render: (h, {row}) => [< span> {+row.changeIntegral > 0 ? "加分" : '减分'
|
|
||||||
} < /span>]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "changeIntegral",
|
|
||||||
label: "积分",
|
|
||||||
align: "center",
|
|
||||||
render: (h, {row}) => [
|
|
||||||
<span>{row.changeIntegral > 0 ? `+${row.changeIntegral}` : `${row.changeIntegral}`}</span>]
|
|
||||||
},
|
|
||||||
{prop: "doTime", label: "操作时间"},
|
{prop: "doTime", label: "操作时间"},
|
||||||
{prop: "declareObjName", label: "操作人", align: "center"},
|
{prop: "createUserName", label: "操作人", align: "center"},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -134,10 +112,7 @@ export default {
|
|||||||
onConfirm() {
|
onConfirm() {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/appvillagerintegraldetail/changeIntegral`, {
|
this.instance.post(`/app/appvillagerintegraldetail/changeIntegral`, this.form).then(res => {
|
||||||
...this.form,
|
|
||||||
changeIntegral: this.form.doType == 0 ? `+${this.form.changeIntegral}` : `-${this.form.changeIntegral}`
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success("添加成功")
|
this.$message.success("添加成功")
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
@@ -149,11 +124,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appvillagerintegraldetail/list`, null, {
|
this.instance.post(`/app/appvillagerintegraldetail/list`, null, {
|
||||||
params: {
|
params: {...this.page, areaId: this.areaId, type: 0}
|
||||||
...this.page,
|
|
||||||
areaId: this.areaId,
|
|
||||||
doType: 2
|
|
||||||
}
|
|
||||||
}).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