|
@@ -319,7 +319,7 @@
|
|
|
<strong>{{ row.name }}</strong>
|
|
|
</template>
|
|
|
<template slot-scope="{ row, index }" slot="money">
|
|
|
- <Input v-model="saleTableData[index].money" type="number"></Input>
|
|
|
+ <Input v-model="saleTableData[index].money" @on-keyup="saleTableChange(index)" type="number"></Input>
|
|
|
</template>
|
|
|
</Table>
|
|
|
</FormItem>
|
|
@@ -448,6 +448,11 @@ export default {
|
|
|
}
|
|
|
//业绩统计时间
|
|
|
this.$refs.sigleRef3.dataVals = new Date(res.sale_time)
|
|
|
+ setTimeout( ()=>{
|
|
|
+ if (res.salesperson) {
|
|
|
+ this.saleTableData = JSON.parse(res.saleMoney).data
|
|
|
+ }
|
|
|
+ },1000)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -511,8 +516,19 @@ export default {
|
|
|
},500)
|
|
|
}).post()
|
|
|
},
|
|
|
+ saleTableChange(index) {
|
|
|
+ let money = Number(this.saleTableData[index].money).fixed(2)
|
|
|
+ this.saleTableData[index].money = money
|
|
|
+ let moneys = 0
|
|
|
+ this.saleTableData.forEach(v => {
|
|
|
+ if (v.name !== '合计') {
|
|
|
+ moneys += v.money
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.saleTableData[this.saleTableData.length-1].money = moneys
|
|
|
+ },
|
|
|
updateSaleMoney () {
|
|
|
- let money = Number(this.member.payMoney)+Number(this.member.bigPayMoney)+Number(this.member.subPayMoney)+Number(this.member.supplyPayMoney)-Number(this.member.commission)-Number(this.member.proceduresMoney)
|
|
|
+ let money = Number(this.member.bigPayMoney)+Number(this.member.subPayMoney)+Number(this.member.supplyPayMoney)-Number(this.member.commission)-Number(this.member.proceduresMoney)
|
|
|
let moneys = Number(money/(this.saleTableData.length-1)).fixed(2)
|
|
|
this.saleTableData.forEach(v => {
|
|
|
if (v.name === '合计') {
|
|
@@ -588,14 +604,10 @@ export default {
|
|
|
this.combo_id = ''
|
|
|
this.member.single = false
|
|
|
this.member.areaCount = 0
|
|
|
-
|
|
|
- // this.initialized()
|
|
|
this.reged()
|
|
|
if(this.member.buySubject==this.show_buy_subject){
|
|
|
this.show(this.olddata)
|
|
|
}
|
|
|
-
|
|
|
- // console.log(this.repair,this.member.createType,'切换服务状态')
|
|
|
},
|
|
|
buyHandler() {
|
|
|
this.member.buyCount=this.member.buyCount.replace(/[^\d]+/g,'')
|
|
@@ -700,11 +712,6 @@ export default {
|
|
|
this.interested = true
|
|
|
}
|
|
|
}
|
|
|
- //我的订单均为无权益
|
|
|
- // if (!this.returnMyReceivable) {
|
|
|
- // this.interested = false
|
|
|
- // }
|
|
|
- // console.log('权益是否开通' + this.interested)
|
|
|
},
|
|
|
moneyReg(val) {
|
|
|
return val.replace(/[^\d^\.]+/g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
|
|
@@ -776,7 +783,6 @@ export default {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- // console.log(this.member.products,this.member.buySubject)
|
|
|
if (this.member.products == 1) {
|
|
|
if(this.member.buySubject!='2'){//主体为个体走原有逻辑
|
|
|
if (this.bigStas == 1) {
|
|
@@ -847,7 +853,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
- // console.log('企业',this.member.buySubject)
|
|
|
this.colr = ''
|
|
|
if (this.nums == 0) {
|
|
|
this.creAuth = '1'
|
|
@@ -1031,7 +1036,6 @@ export default {
|
|
|
}).success((res) => {
|
|
|
this.oldCurrentId = res.data.list
|
|
|
}).post()
|
|
|
- // console.log("扩充订单新旧服务对比", this.currentId, this.oldCurrentId)
|
|
|
},
|
|
|
unique(arr) {// 去重
|
|
|
const res = new Map()
|
|
@@ -1101,7 +1105,6 @@ export default {
|
|
|
}).map(t => {
|
|
|
return t.count
|
|
|
}) : []
|
|
|
- // console.log(this.member.level,this.member.buySubject)
|
|
|
if(this.member.buySubject!=this.show_buy_subject){
|
|
|
this.pacData.push({
|
|
|
id: v.id,
|
|
@@ -1111,20 +1114,9 @@ export default {
|
|
|
b_pkcount: '',
|
|
|
count: Number(String(countStr))
|
|
|
})
|
|
|
- // console.log(this.member.supplyMoney)
|
|
|
this.member.supplyMoney='0'
|
|
|
this.member.sums='0'
|
|
|
this.member.supplyPayMoney=0
|
|
|
- // if (Number(String(countStr)) / v.s_pkcount) {
|
|
|
- // this.datas2.push({
|
|
|
- // id: v.id,
|
|
|
- // name: v.s_name,
|
|
|
- // price: v.i_pkprice,
|
|
|
- // s_pkcount: v.s_pkcount,
|
|
|
- // count: Number(String(countStr)) / v.s_pkcount ? Number(String(countStr)) / v.s_pkcount : ''
|
|
|
- // })
|
|
|
- // }
|
|
|
-
|
|
|
}else{
|
|
|
this.pacData.push({
|
|
|
id: v.id,
|
|
@@ -1247,17 +1239,10 @@ export default {
|
|
|
this.sumSel = []
|
|
|
this.serData.forEach(k => {
|
|
|
if (this.repair == '1') {
|
|
|
- // console.log(this.currentId,this.equity,'新服务选中ID,和权益是否开通')
|
|
|
if (k.id == 1) {
|
|
|
k._checked = true
|
|
|
k._disabled = true
|
|
|
}
|
|
|
- //原有逻辑已开通不回显勾选
|
|
|
- // if (!this.equity) {
|
|
|
- // if (this.currentId.indexOf(k.id) > -1) {
|
|
|
- // k._checked = true
|
|
|
- // }
|
|
|
- // }
|
|
|
if (this.currentId.indexOf(k.id) > -1) {
|
|
|
k._checked = true
|
|
|
}
|
|
@@ -1331,8 +1316,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
leChange(val, check = true) {// 会员套餐
|
|
|
- // console.log("会员套餐", val, check)
|
|
|
-
|
|
|
val = val ? JSON.parse(val) : ''
|
|
|
this.sArr = []
|
|
|
this.combo_id = val
|
|
@@ -1340,11 +1323,7 @@ export default {
|
|
|
if (this.pReadon) {
|
|
|
this.myNoTchange()
|
|
|
}
|
|
|
- // console.log("phone 权益", val.i_ispreinstall, this.bigStas, this.subStas)
|
|
|
if (val.i_ispreinstall == 0) { //自定义套餐
|
|
|
- // if (check && val !== undefined) {
|
|
|
- // this.allCancel()
|
|
|
- // }
|
|
|
if(this.member.buySubject!='2'){//主体为个体走原有逻辑
|
|
|
if (this.bigStas == 1) {
|
|
|
if (this.subStas == 1) {
|
|
@@ -2027,6 +2006,21 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ if (this.saleTableData) {
|
|
|
+ let isOk = true
|
|
|
+ this.saleTableData.forEach(v => {
|
|
|
+ if (v.name === '合计') {
|
|
|
+ let money = Number(this.member.payMoney)+Number(this.member.bigPayMoney)+Number(this.member.subPayMoney)+Number(this.member.supplyPayMoney)-Number(this.member.commission)-Number(this.member.proceduresMoney)
|
|
|
+ if (Number(v.money) > money) {
|
|
|
+ this.$Notice.warning({title: '业绩金额大于应付金额'})
|
|
|
+ isOk = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (!isOk) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
let serveData = []
|
|
|
this.datas2.forEach(v => {
|
|
|
serveData.push({
|
|
@@ -2132,7 +2126,6 @@ export default {
|
|
|
saleDep: this.saleCode,
|
|
|
saleMoney: JSON.stringify({data: this.saleTableData}),
|
|
|
}
|
|
|
- // console.log(obj)
|
|
|
if (this.returnMyReceivable) {
|
|
|
this.urlReq('/order/updateBigOrder', obj)
|
|
|
} else {
|
|
@@ -2177,7 +2170,6 @@ export default {
|
|
|
saleDep: this.saleCode,
|
|
|
saleMoney: JSON.stringify({data: this.saleTableData}),
|
|
|
}
|
|
|
- // console.log(obj)
|
|
|
if (this.returnMyReceivable) {
|
|
|
this.urlReq('/order/updateSubOrder', obj)
|
|
|
} else {
|
|
@@ -2333,9 +2325,6 @@ export default {
|
|
|
}else{
|
|
|
this.finish_dis=false
|
|
|
}
|
|
|
- if (res.salesperson) {
|
|
|
- this.saleTableData = JSON.parse(res.saleMoney).data
|
|
|
- }
|
|
|
// 补充包列表
|
|
|
this.supplys = filterData.supplys
|
|
|
this.member = {
|
|
@@ -2441,10 +2430,8 @@ export default {
|
|
|
s_servers: ""
|
|
|
}
|
|
|
this.member.level = JSON.stringify(obj)
|
|
|
- // this.proChange(Number(products))
|
|
|
}
|
|
|
this.nums = 0
|
|
|
- // console.log(this.interested,res.buy_subject,this.member.buySubject,'21212121')
|
|
|
})
|
|
|
this.bShow = true
|
|
|
|