diff --git a/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue b/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue index db63a0e4..38916758 100644 --- a/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue +++ b/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue @@ -15,8 +15,8 @@ {{ integralInfo.ruleType==0? '常规': integralInfo.ruleType==1? '阶梯': '区间'}} - - + + @@ -25,11 +25,12 @@ - + - + - + + @@ -52,8 +53,8 @@ - - + + {{ integralInfo.ruleType == 0? '+'+ integralInfo.integral : '' }} @@ -150,12 +151,17 @@ export default { if (res?.data) { this.info = res.data, this.integralInfo = res.data.integralRule - this.scoreItem = JSON.parse(res.data.integralRule.ladderRule).map(e=>{ - return { - dictName: e.viewCount, - dictValue: e.integral.toString() - } - }) + if(res.data.integralRule.ruleType == 1) { + this.scoreItem = JSON.parse(res.data.integralRule.ladderRule)?.map(e=>{ + return { + dictName: e.viewCount, + dictValue: e.integral.toString() + } + }) + } + if(res.data.integralRule.ruleType == 0) { + this.form.auditIntegral = this.integralInfo.integral + } } }) }, @@ -187,6 +193,12 @@ export default { }, onConfirm() { + if(this.integralInfo.ruleType == 2 && this.form.pass == 1) { + this.form.integralItem = this.scoreItem.filter(e=> e.dictValue == this.form.auditIntegral)[0]?.dictName + } + if(this.integralInfo.ruleType == 0 && this.form.pass == 1) { + this.form.auditIntegral = this.integralInfo.integral + } this.$refs.form.validate(v => { if (v) { this.instance.post('/app/apppartyintegraldeclare/examine', null, { diff --git a/project/sanjianxi/apps/AppPartyIntegralAudit/components/List.vue b/project/sanjianxi/apps/AppPartyIntegralAudit/components/List.vue index e594cb48..0677cf21 100644 --- a/project/sanjianxi/apps/AppPartyIntegralAudit/components/List.vue +++ b/project/sanjianxi/apps/AppPartyIntegralAudit/components/List.vue @@ -20,16 +20,16 @@ @change="search.current = 1, getList()"> + start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"> @@ -70,7 +70,6 @@ search: { current: 1, size: 10, - areaId: '', auditStatus: '', //审核状态 createTimeStart: '', createTimeEnd: '', @@ -89,7 +88,7 @@ { prop: 'partyName', label: '申请人' }, { prop: 'partyPhone', align: 'center', label: '联系电话' }, { prop: 'createTime', align: 'center', label: '申请时间' }, - { prop: 'integralRuleName', align: 'center', label: '积分类型'}, + { prop: 'integralRuleName', align: 'center', label: '事件名称'}, { prop: 'auditStatus', align: 'center', label: '状态', formart: v => v ? this.dict.getLabel('integralDeclareStatus', v) : '-' }, { prop: 'auditUserName', align: 'center', label: '审批人' }, { prop: 'auditTime', align: 'center', label: '审批时间' } diff --git a/project/sanjianxi/apps/AppPartyMemberScore/psDetail.vue b/project/sanjianxi/apps/AppPartyMemberScore/psDetail.vue index 57e8c652..cde71cd1 100644 --- a/project/sanjianxi/apps/AppPartyMemberScore/psDetail.vue +++ b/project/sanjianxi/apps/AppPartyMemberScore/psDetail.vue @@ -7,31 +7,29 @@ - + - + + + + 导出 + + - + - - - - - - - @@ -55,45 +53,42 @@ export default { {label: "剩余积分", prop: "residualIntegral", align: 'center'}, {label: "调整说明", prop: "remark"}, ], - dialog: false, form: {}, rules: { learningIntegral: [ {required: true, message: "请输入学习强国积分"}, {pattern: /^\d+$/g, message: "请输入正整数"} ] - } + }, + id: '', + name: '', + nowIntegral: '', + page: {current: 1, size: 10}, + total: 0 } }, methods: { getDetail() { - let {id} = this.$route.query - this.instance.post("/app/appparty/getPartyIntegralDetail", null, { - params: {id} + let { id, name, nowIntegral } = this.$route.query + this.instance.post("/app/apppartyintegralinfo/list", null, { + params: { + partyId: id, + ...this.page, + total: this.total + } }).then(res => { if (res?.data) { - this.detail = res.data + this.detailTable = res.data.records + this.total = res.data.total + this.name = name + this.nowIntegral = nowIntegral + this.id = id } }) }, back() { this.$router.push({}) }, - submit() { - this.$refs.DialogForm.validate(v => { - if (v) { - this.instance.post("/app/appparty/editLearningIntegral", null,{ - params:this.form - }).then(res => { - if (res?.code == 0) { - this.$message.success("提交成功!") - this.dialog = false - this.getDetail() - } - }) - } - }) - }, handleEditLearningIntergral(partyMemberId) { this.dialog = true this.form = {partyMemberId} diff --git a/project/sanjianxi/apps/AppPartyMemberScore/psList.vue b/project/sanjianxi/apps/AppPartyMemberScore/psList.vue index 2132e11a..f8ed93df 100644 --- a/project/sanjianxi/apps/AppPartyMemberScore/psList.vue +++ b/project/sanjianxi/apps/AppPartyMemberScore/psList.vue @@ -8,6 +8,7 @@ 统计周期 + start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"> - 详情 + 详情 @@ -53,12 +54,15 @@ export default { }, computed: { ...mapState(['user']), + orgTree() { + return this.$refs.tree?.$refs?.partyTree + }, colConfigs() { return [ {label: "排行榜", prop: "orderIndex", align: "center"}, {label: "党员姓名", prop: "name", align: "center"}, {label: "党员类型", prop: "partyType", dict: "partyType", align: "center"}, - {label: "获得积分", prop: "nowIntegral", align: "center"}, + {label: "获得积分", prop: "integral", align: "center"}, {slot: "options"} ] }, @@ -130,8 +134,9 @@ export default { return data.name.indexOf(value) !== -1 }, - showDetail(id) { - this.$router.push({query: {id}}) + showDetail(row) { + console.log(row); + this.$router.push({query: { id: row.partyId, name: row.name, nowIntegral: row.nowIntegral}}) }, }, created() { diff --git a/project/sanjianxi/apps/AppPartyScoreManage/AppPartyScoreManage.vue b/project/sanjianxi/apps/AppPartyScoreManage/AppPartyScoreManage.vue index 477655b5..faf438e6 100644 --- a/project/sanjianxi/apps/AppPartyScoreManage/AppPartyScoreManage.vue +++ b/project/sanjianxi/apps/AppPartyScoreManage/AppPartyScoreManage.vue @@ -8,7 +8,7 @@ + :instance="instance" :dict="dict"/> @@ -27,7 +27,6 @@ export default { props: { instance: Function, dict: Object, - permissions: Function }, computed: { diff --git a/project/sanjianxi/apps/AppPartyScoreManage/pointsDetails.vue b/project/sanjianxi/apps/AppPartyScoreManage/pointsDetails.vue index 8cd4d724..8c1c3341 100644 --- a/project/sanjianxi/apps/AppPartyScoreManage/pointsDetails.vue +++ b/project/sanjianxi/apps/AppPartyScoreManage/pointsDetails.vue @@ -5,7 +5,7 @@ + start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"> 详情 @@ -50,7 +49,7 @@ - {{ dialogInfo.partyIntegralDetailType == 1 ? '加分' : '减分' }} + {{ dialogInfo.integralType == 1 ? '加分' : '减分' }} @@ -69,7 +68,6 @@ export default { props: { instance: Function, dict: Object, - areaId: String }, data() { @@ -84,8 +82,8 @@ export default { }, total: 10, colConfigs: [ - {prop: "partyName", label: "对象", align: "center"}, - {prop: "remark", label: "调整说明", align: "center"}, + {prop: "partyName", label: "对象", width: "150px"}, + {prop: "remark", label: "调整说明",}, {prop: "createTime", label: "时间", align: "center"}, {prop: "integralType", label: "类型", align: "center", render: (h, {row}) => h('span', `${row.integralType == 0 ? '减分' : '加分'}`)}, {slot: "integral", label: "积分", align: "center",}, diff --git a/project/sanjianxi/apps/AppPartyScoreManage/scoreChange.vue b/project/sanjianxi/apps/AppPartyScoreManage/scoreChange.vue index 2a86f4b5..e6b4efd6 100644 --- a/project/sanjianxi/apps/AppPartyScoreManage/scoreChange.vue +++ b/project/sanjianxi/apps/AppPartyScoreManage/scoreChange.vue @@ -4,9 +4,7 @@ - 添加 - + 添加 h('p',{textAlign:'center'}, `${row.integralType == 1 ? '+' : '-'}${row.integral}`)}, @@ -114,6 +110,7 @@ export default { } }, onConfirm() { + if(this.flag) return this.$refs['form'].validate(valid => { if (valid) { this.flag = true diff --git a/project/sanjianxi/apps/AppPartyScoreRules/AppPartyScoreRules.vue b/project/sanjianxi/apps/AppPartyScoreRules/AppPartyScoreRules.vue index 2bd29d80..a181002c 100644 --- a/project/sanjianxi/apps/AppPartyScoreRules/AppPartyScoreRules.vue +++ b/project/sanjianxi/apps/AppPartyScoreRules/AppPartyScoreRules.vue @@ -7,8 +7,7 @@ - + @@ -27,7 +26,6 @@ export default { props: { instance: Function, dict: Object, - permissions: Function }, computed: { diff --git a/project/sanjianxi/apps/AppPartyScoreRules/components/applyForIntegral.vue b/project/sanjianxi/apps/AppPartyScoreRules/components/applyForIntegral.vue index e99c3057..cc839a5a 100644 --- a/project/sanjianxi/apps/AppPartyScoreRules/components/applyForIntegral.vue +++ b/project/sanjianxi/apps/AppPartyScoreRules/components/applyForIntegral.vue @@ -1,6 +1,6 @@ - + @@ -42,12 +42,12 @@ - + 停用 - 启用 - 编辑 - 删除 + 启用 + 编辑 + 删除 @@ -56,7 +56,7 @@ - 暂无应用权限 + @@ -88,7 +88,7 @@ - + @@ -130,7 +130,6 @@ export default { props: { instance: Function, dict: Object, - permissions: Function }, computed: { isEdit() { @@ -162,17 +161,16 @@ export default { search: {status: "", eventName: ""}, page: {current: 1, size: 10, total: 0}, colConfigs: [ - {prop: "eventName", label: "事件名称", dict: "integralRuleEvent", "show-overflow-tooltip": true}, - {prop: "eventDesc", label: "简介", dict: "integralRuleEventType", "show-overflow-tooltip": true}, + {prop: "eventName", label: "事件名称", "show-overflow-tooltip": true}, + {prop: "eventDesc", label: "简介", "show-overflow-tooltip": true}, {prop: "ruleType", label: "规则", dict: "partyIntegralRuleRuleType", align: "center"}, {prop: "scoringCycle", label: "周期范围", dict: "integralRuleScoringCycle", align: "center"}, - {prop: "scoringCycle", label: "积分分值", dict: "integralRuleScoringCycle", align: "center"}, {prop: "status", label: "状态", align: "center", width: 96, dict: "integralRuleStatus"}, {slot: "options", label: "操作", align: "center"}, ], integralConfigs: [ - {prop: "event", label: "加分项", dict: "integralRuleEvent"}, - {prop: "event", label: "获得积分", dict: "integralRuleEvent"}, + {prop: "event", label: "加分项",}, + {prop: "event", label: "获得积分",}, {slot: "options", label: "操作", align: "center"}, ], tableData: [], @@ -198,7 +196,6 @@ export default { scoringCycle: [{required: true, message: "请选择周期范围" }], integral: [{required: true, pattern: /^\d*[.\d]\d?$/, message: "请输入积分分值,最多保留一位小数"}], numberLimit: [{pattern: /^\d*$/, message: "请输入正整数"}], - integralArr: [{required: true, message: "请输入积分分值", trigger: "change"}], ladderIntegral: [{required: true, message: "请输入积分分值"}] }, cacheOps: [], @@ -215,14 +212,7 @@ export default { this.getList(); }); }, - watch: { - integralArr: { - handler(v) { - this.form.integralMin = v?.[0] || '' - this.form.integralMax = v?.[1] || '' - } - } - }, + methods: { getList() { this.instance.post(`/app/apppartyintegralrule/list?classify=0`, null, { @@ -240,10 +230,13 @@ export default { toEdit(row) { this.instance.post(`/app/apppartyintegralrule/queryDetailById?id=${row.id}`).then((res) => { if(res?.data) { + // console.log(res); this.form = res.data - this.form.ladderIntegral = JSON.parse(res.data.ladderRule) this.form.ruleType = res.data.ruleType this.form.integralArr = [ res.data.integralMin, res.data.integralMax ] + if(res.data.ruleType == 1) { + this.form.ladderIntegral = JSON.parse(res.data.ladderRule) + } this.dialog = true } }) @@ -262,6 +255,7 @@ export default { integralMax: '', ladderRule: [], integralArr: [], + ladderIntegral: [] } }, @@ -271,7 +265,8 @@ export default { this.form.numberLimit = '' this.form.integral = '' this.form.integralArr = [] - this.form.ladderRule = [] + this.form.ladderRule = '' + this.form.ladderIntegral = [] }, remove(id) { @@ -307,23 +302,38 @@ export default { this.getList(); }, onConfirm() { - this.form.integralMin = this.form.integralArr?.[0] || '' - this.form.integralMax = this.form.integralArr?.[1] || '' - this.form.ladderRule = JSON.stringify(this.form.ladderIntegral) + if(this.form.ruleType == 2) { - if(this.form.integralMin >= this.form.integralMax) { - return this.$message.error('请输入正确的区间范围') + this.form.integralMin = this.form.integralArr[0] || '' + this.form.integralMax = this.form.integralArr[1] || '' + + if(!this.form.integralArr[0] && !this.form.integralArr[1]) { + return this.$message.error('请输入积分分值') + } + if(this.form.integralMin >= this.form.integralMax) { + return this.$message.error('请输入正确积分区间') + } + } + if(this.form.ruleType == 1) { + this.form.ladderRule = JSON.stringify(this.form.ladderIntegral) + } + + if(this.form.ruleType == 2 || this.form.ruleType == 0) { + this.form.ladderRule = '' } this.$refs.DialogForm.validate((valid) => { if (valid) { this.instance.post(`/app/apppartyintegralrule/addOrUpdate`, { ...this.form, - id: this.form.id || '' + id: this.form.id || '', + integralMin: this.form.integralArr[0] || '', + integralMax: this.form.integralArr[1] || '', }).then((res) => { if (res?.code == 0) { this.$message.success(`${this.isEdit ? '编辑成功' : '添加成功'}`) this.dialog = false; + this.close() this.getList() } }); diff --git a/project/sanjianxi/apps/AppPartyScoreRules/components/automaticallyAddCent.vue b/project/sanjianxi/apps/AppPartyScoreRules/components/automaticallyAddCent.vue index 2d55cf95..53d325fd 100644 --- a/project/sanjianxi/apps/AppPartyScoreRules/components/automaticallyAddCent.vue +++ b/project/sanjianxi/apps/AppPartyScoreRules/components/automaticallyAddCent.vue @@ -38,12 +38,12 @@ - + 停用 - 启用 - 编辑 - 删除 + 启用 + 编辑 + 删除 @@ -85,7 +85,6 @@ export default { props: { instance: Function, dict: Object, - permissions: Function }, data() { return {