From cd43e4f48aa9ffab0b5009514704453f59079a72 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 24 Jan 2024 18:11:58 +0800 Subject: [PATCH] bug --- fuintAdmin/src/views/staff/list.vue | 1 + .../views/staffCommission/staffCommission.vue | 51 ++++++++++++++----- .../views/cashier/NewComponents/homeindex.vue | 2 + gasStation-uni/pagesMy/details/details.vue | 2 +- 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue index 821641377..1b52920a8 100644 --- a/fuintAdmin/src/views/staff/list.vue +++ b/fuintAdmin/src/views/staff/list.vue @@ -157,6 +157,7 @@ :value="item.dutyId+''" > diff --git a/fuintAdmin/src/views/staffCommission/staffCommission.vue b/fuintAdmin/src/views/staffCommission/staffCommission.vue index 3c5a59025..8c10e89cf 100644 --- a/fuintAdmin/src/views/staffCommission/staffCommission.vue +++ b/fuintAdmin/src/views/staffCommission/staffCommission.vue @@ -13,7 +13,7 @@ clearable placeholder="全部" > - + {{ item.realName }} {{ item.mobile }} @@ -123,10 +123,10 @@ @sort-change="handleSortChange"> - - - - + + @@ -213,13 +213,16 @@ - + + @@ -347,6 +350,7 @@ export default { // 显示搜索条件 showSearch: true, roleList:[], + staffRoleGroup:[], // 表单校验 rules: { name: [ @@ -382,6 +386,20 @@ export default { this.getStaffList(); }, methods:{ + getStaffDuty(list,ids){ + let id = ids.split(",") + let name = "" + let dutyName = "" + list.forEach(item => { + id.forEach(i => { + if (item.dutyId=i){ + name = item.dutyName + } + dutyName += name +"," + }) + }) + return name + }, getStaffList(){ queryStaffs().then( response => { this.staffList = response.data; @@ -391,6 +409,7 @@ export default { getDuty(){ listDuty().then(response => { this.roleList = response.data + console.log(response.data) }) }, // 点击标签页 @@ -425,7 +444,9 @@ export default { }, getCheckbox(){ - this.form.commissionSource = this.commissionSource.toString() + console.log(this.staffRoleGroup) + // this.form.commissionSource = this.commissionSource.toString() + this.form.staffRoleGroup = this.staffRoleGroup.toString() }, // 查询列表 getList() { @@ -453,6 +474,7 @@ export default { // 表单重置 reset() { this.resetForm("form"); + this.staffRoleGroup = [] if (this.activeName == 'oil'){ this.form = { type:'orderAmount', @@ -484,6 +506,9 @@ export default { this.form.royaltyRate = this.form.royaltyRate.slice(0,this.form.royaltyRate.length-1) this.open = true; this.title = "编辑提成方案"; + if (response.data.staffRoleGroup){ + this.staffRoleGroup = response.data.staffRoleGroup.split(","); + } }); }, @@ -524,8 +549,9 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { + this.form.royaltyRate = this.form.royaltyRate + this.select + this.form.staffRoleGroup = this.staffRoleGroup.toString() if (this.form.id) { - this.form.royaltyRate = this.form.royaltyRate + this.select updateCommission(this.form).then(response => { if (response.data==1){ this.$modal.msgSuccess("提成方案更新成功"); @@ -536,7 +562,6 @@ export default { } }); } else { - this.form.royaltyRate = this.form.royaltyRate + this.select addCommission(this.form).then(response => { if (response.data==1) { this.$modal.msgSuccess("提成方案新增成功"); @@ -573,7 +598,7 @@ export default {