diff --git a/partten/partten.js b/partten/partten.js index f466f51..86e352c 100644 --- a/partten/partten.js +++ b/partten/partten.js @@ -15,7 +15,7 @@ if (new Date().getMonth() + 1 < 10) { month = "0" + (new Date().getMonth() + 1); } else { month = new Date().getMonth() + 1; - dabao; + // dabao; } var day = ""; diff --git a/src/components/staffList/staffout/index.vue b/src/components/staffList/staffout/index.vue new file mode 100644 index 0000000..cb7e4af --- /dev/null +++ b/src/components/staffList/staffout/index.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/src/components/staffList/staffout/员工装出疗程占比选值 b/src/components/staffList/staffout/员工装出疗程占比选值 new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/eashier/coursetorec/components/detail.vue b/src/pages/eashier/coursetorec/components/detail.vue index 5cd2990..a1d2c5f 100644 --- a/src/pages/eashier/coursetorec/components/detail.vue +++ b/src/pages/eashier/coursetorec/components/detail.vue @@ -28,6 +28,10 @@ + 员工业绩 +
+ +
@@ -67,9 +71,11 @@ import { cardChangeOutPro, } from "@/api/eashier.js"; import staffsles from "@/components/staffList/staff/index"; +import staffslesout from "@/components/staffList/staffout/index"; export default { components: { staffsles, + staffslesout }, data() { return { @@ -95,14 +101,24 @@ export default { setStaff() { var that = this; this.$nextTick(() => { - console.log(that.$refs.staffsles); + // console.log(that.$refs.staffsles); that.$refs.staffsles.show(that.form.staffLists); }); }, + setStaffs() { + var that = this; + this.$nextTick(() => { + // console.log(that.$refs.staffsles); + that.$refs.staffslesout.show(that.form.staffListsout); + }); + }, //员工占比返回方法 staffslesData(v) { this.form.staffLists = [...v]; }, + staffslesDataout(v) { + this.form.staffListsout = [...v]; + }, cancel() { this.$emit("detailData"); this.form = Object.assign({}); @@ -130,7 +146,7 @@ export default { this.form = { ...item, }; - this.outList = this.form.coursePayLists; + this.outList = this.form.coursePayListRequests; this.inList = [ { rechargeTypeId: item.rechargeTypeId, @@ -143,6 +159,13 @@ export default { typeRatio: item.typeRatio, }, ]; + this.form.staffListsout=this.form.coursePayListRequests[0].staffLists + this.form.staffListsout.forEach((items) => { + items.staffNames = items.brandNumber + "--" + items.staffName; + }); + if (this.form.staffListsout.length == 0) { + this.form.staffListsout.push({ ratio: 100 }); + } this.form.staffLists = this.form.entities; this.form.staffLists.forEach((item) => { item.id = item.saleStaffId; @@ -157,6 +180,7 @@ export default { this.form.staffLists.push({ ratio: 100 }); } this.setStaff(); + this.setStaffs(); }, subStaffRatio() { editRechargeTurnCourse(this.form).then((res) => { diff --git a/src/pages/eashier/coursetorec/components/index.vue b/src/pages/eashier/coursetorec/components/index.vue index 9c2c058..a73e3cb 100644 --- a/src/pages/eashier/coursetorec/components/index.vue +++ b/src/pages/eashier/coursetorec/components/index.vue @@ -36,6 +36,34 @@
总金额 : {{outMoneys}}
+ + + @@ -112,6 +140,7 @@ +
@@ -123,6 +152,7 @@ import { addRechargeTurnCourse, recAccountOne, } from "@/api/eashier.js"; +import staffratio from "./staffratio"; import member from "@/components/member/index"; import Branch from "@/components/Branch/index"; import project from "@/components/project/index"; @@ -138,7 +168,8 @@ export default { member, project, recType, - Branch + Branch, + staffratio }, data() { return { @@ -177,11 +208,32 @@ export default { sessionStorageList: null, isAddition: 0, loading: false, + TransactionNum: 0, StoreIds:"", - label:"" + label:"", + staff:[] }; }, methods: { + openStaffRatio(row, index, text) { + this.editIndex = index + this.$refs.staffratio.show(row); + this.$refs.staffratio.showdetele(); + localStorage.setItem("row", JSON.stringify(row)); + localStorage.setItem("text", text); + }, + staffratioData(v) { + let form = this.outList[this.editIndex]; + form.rows = v.list; + form.staffLists=v.list + form.cardAchievementAmount=v.list[0].cardAchievementAmount + form.cardCommissionAmount=v.list[0].cardCommissionAmount + form.cardSalesAchievement=v.list[0].cardSalesAchievement + form.cardSalesCommission=v.list[0].cardSalesCommission + console.log("🚀 ~ file: index.vue ~ line 302 ~ staffratioData ~ form", form) + this.outList.splice(this.editIndex, 1, form); + console.log("🚀 ~ file: index.vue ~ line 235 ~ staffratioData ~ this.outList", this.outList) + }, setStaffRatio() { var that = this; setTimeout(() => { @@ -220,7 +272,7 @@ export default { this.proForm.rechargeInMoney = this.inMoneys; this.proForm.courseOutMoney = this.outMoneys; this.proForm.isAddition = this.isAddition; - this.proForm.coursePayLists = this.outList; + this.proForm.coursePayListRequests = this.outList; this.proForm.staffLists; this.proForm = Object.assign(this.proForm, this.inList[0]); this.inList[0]; @@ -264,7 +316,7 @@ export default { tableRowClassName({ row, rowIndex }) { row.index = rowIndex; }, - projectData(form) { + projectData(form,rows) { form.memberId = this.proForm.memberId; form.memberName = this.proForm.memberName; form.mobilePhone = this.proForm.mobilePhone; @@ -282,18 +334,25 @@ export default { form.rollOffMoney = 0; form.rollOffCountShow = false; form.accountId = form.id; + form.staffLists=rows + form.cardAchievementAmount=rows[0].cardAchievementAmount + form.cardCommissionAmount=rows[0].cardCommissionAmount + form.cardSalesAchievement=rows[0].cardSalesAchievement + form.cardSalesCommission=rows[0].cardSalesCommission let flag = true; this.outList.forEach((item) => { if (form.id == item.form.id) { flag = false; } }); + console.log("🚀 ~ file: index.vue ~ line 343 ~ this.outList.forEach ~ this.outList", this.outList) if (flag) { this.outList.push(form); this.sumMoney(); } else { this.$message({ message: "项目已存在 !" }); } + }, recTypeData(v) { let form = { diff --git a/src/pages/eashier/coursetorec/components/staffratio.vue b/src/pages/eashier/coursetorec/components/staffratio.vue new file mode 100644 index 0000000..dde1ca3 --- /dev/null +++ b/src/pages/eashier/coursetorec/components/staffratio.vue @@ -0,0 +1,301 @@ + + + + + \ No newline at end of file diff --git a/src/pages/eashier/raiseReatment/components/detail.vue b/src/pages/eashier/raiseReatment/components/detail.vue index f19074c..f2bb31a 100644 --- a/src/pages/eashier/raiseReatment/components/detail.vue +++ b/src/pages/eashier/raiseReatment/components/detail.vue @@ -32,6 +32,10 @@ + 员工业绩 +
+ +
转入疗程 @@ -85,9 +89,11 @@ import { import admin from "@/components/staffList/admin/index"; import manager from "@/components/staffList/manager/index"; import staffsles from "@/components/staffList/staff/index"; +import staffslesout from "@/components/staffList/staffout/index"; export default { components: { staffsles, + staffslesout, manager, admin, }, @@ -124,10 +130,21 @@ export default { that.$refs.manager.show(that.form.managerList); }); }, + setStaffs() { + var that = this; + this.$nextTick(() => { + console.log(that.$refs.staffsles); + that.$refs.staffslesout.show(that.form.staffListsout); + }); + }, + //员工占比返回方法 staffslesData(v) { this.form.staffLists = [...v]; }, + staffslesDataout(v) { + this.form.staffListsout = [...v]; + }, //高管占比返回方法 managerData(v) { this.form.managerList = [...v]; @@ -228,7 +245,13 @@ export default { }).then((res) => { if (res.code == "000000") { this.outList = res.rows; - console.log(this.form); + console.log("🚀 ~ file: detail.vue ~ line 241 ~ getData ~ res.rows", res.rows) + this.form.staffListsout = res.rows[0].entities; + + this.form.staffListsout.forEach((items) => { + items.staffNames = items.brandNumber + "--" + items.saleStaffName; + }); + this.setStaffs(); } else { this.$alert("加载转出列表 : " + res.message, "提示", { confirmButtonText: "确定", diff --git a/src/pages/eashier/service/service.vue b/src/pages/eashier/service/service.vue index e3172be..b871da0 100644 --- a/src/pages/eashier/service/service.vue +++ b/src/pages/eashier/service/service.vue @@ -1024,7 +1024,7 @@ export default { if (form.offsetMoney > debtMoney) { //判断充值可用金额是否大于成交价如果大于直接用充值可用金额计算 form.discoutMoney = - (form.spendMoney / form.discount / 100).toFixed(2) * 1; + (form.spendMoney / form.discount * 100).toFixed(2) * 1; } else { //判断充值可用金额是否大于成交价如果小于选择最大充值金额,剩下的用赠送金额计算 form.spendMoney = form.cardOver;