|
|
|
@ -381,7 +381,7 @@ export default {
|
|
|
|
editProIndex: -1,
|
|
|
|
editProIndex: -1,
|
|
|
|
isAddition: 0,
|
|
|
|
isAddition: 0,
|
|
|
|
additionDate: null,
|
|
|
|
additionDate: null,
|
|
|
|
transactionPrice: null,
|
|
|
|
transactionPrice: 0,
|
|
|
|
options: [], //员工下拉选择列表
|
|
|
|
options: [], //员工下拉选择列表
|
|
|
|
adminOptions: [], //管理员下拉选择列表
|
|
|
|
adminOptions: [], //管理员下拉选择列表
|
|
|
|
managerOptions: [], //高管下拉选择列表
|
|
|
|
managerOptions: [], //高管下拉选择列表
|
|
|
|
@ -394,7 +394,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
selectindex(row) {
|
|
|
|
selectindex(row) {
|
|
|
|
console.log(row)
|
|
|
|
//conslole.log(row)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeMember() {
|
|
|
|
changeMember() {
|
|
|
|
if (this.cashNumber == 1) {
|
|
|
|
if (this.cashNumber == 1) {
|
|
|
|
@ -410,25 +410,26 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
clear(row, text) {
|
|
|
|
clear(row, text) {
|
|
|
|
//console.log(text);
|
|
|
|
////conslole.log(text);
|
|
|
|
let form = { ...row };
|
|
|
|
let form = { ...row };
|
|
|
|
form[text] = [];
|
|
|
|
form[text] = [];
|
|
|
|
//console.log(form);
|
|
|
|
////conslole.log(form);
|
|
|
|
this.list.splice(row.index, 1, form);
|
|
|
|
this.list.splice(row.index, 1, form);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//修改卡付金额
|
|
|
|
//修改卡付金额
|
|
|
|
editcard(row, index) {
|
|
|
|
editcard(row, index) {
|
|
|
|
this.recIndex = index;
|
|
|
|
this.recIndex = index;
|
|
|
|
console.log(index)
|
|
|
|
//conslole.log(index)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
endEditcard(row, index) {
|
|
|
|
endEditcard(row, index) {
|
|
|
|
console.log(index)
|
|
|
|
//conslole.log(index)
|
|
|
|
let debtMoney =
|
|
|
|
let debtMoney =
|
|
|
|
(this.recForm.amount * 1 - this.recForm.cashAmount * 1).toFixed(2) * 1;
|
|
|
|
(this.recForm.amount * 1 - this.recForm.cashAmount * 1).toFixed(2) * 1;
|
|
|
|
console.log(this.recForm)
|
|
|
|
//conslole.log(this.recForm)
|
|
|
|
let form = { ...row };
|
|
|
|
let form = { ...row };
|
|
|
|
console.log(form)
|
|
|
|
|
|
|
|
//console.log(debtMoney);//套餐价格
|
|
|
|
//conslole.log(form)
|
|
|
|
|
|
|
|
////conslole.log(debtMoney);//套餐价格
|
|
|
|
if (debtMoney > 0) {
|
|
|
|
if (debtMoney > 0) {
|
|
|
|
if (form.type == 2 || form.type == 0) {
|
|
|
|
if (form.type == 2 || form.type == 0) {
|
|
|
|
if (this.useRecharge == 2) {
|
|
|
|
if (this.useRecharge == 2) {
|
|
|
|
@ -473,12 +474,12 @@ export default {
|
|
|
|
form.discoutMoney =//充值卡支付的钱
|
|
|
|
form.discoutMoney =//充值卡支付的钱
|
|
|
|
((form.spendMoney * 1) / (form.discount / 100)).toFixed(2) * 1;
|
|
|
|
((form.spendMoney * 1) / (form.discount / 100)).toFixed(2) * 1;
|
|
|
|
form.giftSpendMoney = ((form.spendMoney * 1) / recRatio * recGiftRatio).toFixed(2) * 1;
|
|
|
|
form.giftSpendMoney = ((form.spendMoney * 1) / recRatio * recGiftRatio).toFixed(2) * 1;
|
|
|
|
console.log("这个是赠送金额" + form.giftSpendMoney)
|
|
|
|
//conslole.log("这个是赠送金额" + form.giftSpendMoney)
|
|
|
|
form.discoutGiftMoney =//赠送卡支付的钱
|
|
|
|
form.discoutGiftMoney =//赠送卡支付的钱
|
|
|
|
(form.giftSpendMoney / (form.discountFreeAmount / 100)).toFixed(2) * 1;
|
|
|
|
(form.giftSpendMoney / (form.discountFreeAmount / 100)).toFixed(2) * 1;
|
|
|
|
//console.log(form.discoutGiftMoney)
|
|
|
|
////conslole.log(form.discoutGiftMoney)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//console.log(debtMoney);
|
|
|
|
////conslole.log(debtMoney);
|
|
|
|
form.spendMoney = (debtMoney * recRatio).toFixed(2) * 1;
|
|
|
|
form.spendMoney = (debtMoney * recRatio).toFixed(2) * 1;
|
|
|
|
form.discoutMoney = (debtMoney * recRatio).toFixed(2) * 1;
|
|
|
|
form.discoutMoney = (debtMoney * recRatio).toFixed(2) * 1;
|
|
|
|
form.giftSpendMoney = (debtMoney * recGiftRatio).toFixed(2) * 1;
|
|
|
|
form.giftSpendMoney = (debtMoney * recGiftRatio).toFixed(2) * 1;
|
|
|
|
@ -491,7 +492,7 @@ export default {
|
|
|
|
form.discoutMoney =
|
|
|
|
form.discoutMoney =
|
|
|
|
((form.spendMoney * 1) * (form.discount / 100)).toFixed(2) * 1;
|
|
|
|
((form.spendMoney * 1) * (form.discount / 100)).toFixed(2) * 1;
|
|
|
|
form.giftSpendMoney = ((form.spendMoney * 1) / recRatio * recGiftRatio).toFixed(2) * 1;
|
|
|
|
form.giftSpendMoney = ((form.spendMoney * 1) / recRatio * recGiftRatio).toFixed(2) * 1;
|
|
|
|
console.log("这个是赠送金额" + form.giftSpendMoney)
|
|
|
|
//conslole.log("这个是赠送金额" + form.giftSpendMoney)
|
|
|
|
form.discoutGiftMoney =//赠送卡支付的钱
|
|
|
|
form.discoutGiftMoney =//赠送卡支付的钱
|
|
|
|
(form.giftSpendMoney * (form.discount / 100)).toFixed(2) * 1;
|
|
|
|
(form.giftSpendMoney * (form.discount / 100)).toFixed(2) * 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -536,16 +537,16 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.rowRecList.splice(index, 1, form);
|
|
|
|
this.rowRecList.splice(index, 1, form);
|
|
|
|
this.list[this.editProIndex].collectionCashAmounts = this.list[this.editProIndex].amount - (form.discoutMoney + form.discoutGiftMoney)
|
|
|
|
this.list[this.editProIndex].collectionCashAmounts = (this.list[this.editProIndex].amount - (form.discoutMoney + form.discoutGiftMoney)).toFixed(2) * 1;
|
|
|
|
//console.log(this.list)
|
|
|
|
////conslole.log(this.list)
|
|
|
|
//console.log('这是index'+index)
|
|
|
|
////conslole.log('这是index'+index)
|
|
|
|
let num = 0;
|
|
|
|
let num = 0;
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
// //console.log("这个是"+item.collectionCashAmounts)
|
|
|
|
|
|
|
|
num = num + item.collectionCashAmounts
|
|
|
|
num = num + item.collectionCashAmounts
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//console.log(num)
|
|
|
|
////conslole.log(num)
|
|
|
|
this.form.collectionCashAmounts = num;
|
|
|
|
this.form.collectionCashAmounts = num;
|
|
|
|
|
|
|
|
this.form.cashAmount = (num*1+(form.spendMoney*1)).toFixed(2) * 1;
|
|
|
|
this.sumNum();
|
|
|
|
this.sumNum();
|
|
|
|
// this.rowRecList.splice(index, 1, form);
|
|
|
|
// this.rowRecList.splice(index, 1, form);
|
|
|
|
|
|
|
|
|
|
|
|
@ -585,18 +586,18 @@ export default {
|
|
|
|
sumNum() {
|
|
|
|
sumNum() {
|
|
|
|
let spendMoney = 0;
|
|
|
|
let spendMoney = 0;
|
|
|
|
let spendNumber = 0;
|
|
|
|
let spendNumber = 0;
|
|
|
|
//console.log(this.rowRecList)
|
|
|
|
////conslole.log(this.rowRecList)
|
|
|
|
this.rowRecList.forEach((item) => {
|
|
|
|
this.rowRecList.forEach((item) => {
|
|
|
|
spendMoney += (item.discoutMoney + item.discoutGiftMoney) * 1;
|
|
|
|
spendMoney += (item.discoutMoney + item.discoutGiftMoney) * 1;
|
|
|
|
spendNumber += (item.spendMoney * 1 + item.giftSpendMoney) * 1;
|
|
|
|
spendNumber += (item.spendMoney * 1 + item.giftSpendMoney) * 1;
|
|
|
|
//console.log(item.discoutMoney);
|
|
|
|
////conslole.log(item.discoutMoney);
|
|
|
|
//console.log(item.discoutGiftMoney);
|
|
|
|
////conslole.log(item.discoutGiftMoney);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//console.log(spendMoney);
|
|
|
|
////conslole.log(spendMoney);
|
|
|
|
|
|
|
|
|
|
|
|
this.recForm.collectionRechargeAmount = spendNumber.toFixed(2) * 1;
|
|
|
|
this.recForm.collectionRechargeAmount = spendNumber.toFixed(2) * 1;
|
|
|
|
this.recForm.collRecAmonnt = spendMoney.toFixed(2) * 1;
|
|
|
|
this.recForm.collRecAmonnt = spendMoney.toFixed(2) * 1;
|
|
|
|
//console.log(this.recForm.collectionRechargeAmount)
|
|
|
|
////conslole.log(this.recForm.collectionRechargeAmount)
|
|
|
|
this.recForm.cashAmount =
|
|
|
|
this.recForm.cashAmount =
|
|
|
|
(
|
|
|
|
(
|
|
|
|
this.recForm.collectionCashAmount +
|
|
|
|
this.recForm.collectionCashAmount +
|
|
|
|
@ -617,7 +618,7 @@ export default {
|
|
|
|
(
|
|
|
|
(
|
|
|
|
spendMoney
|
|
|
|
spendMoney
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
//console.log(this.recForm.collectionAmount)
|
|
|
|
////conslole.log(this.recForm.collectionAmount)
|
|
|
|
this.recForm.rechargeAmount = spendNumber;
|
|
|
|
this.recForm.rechargeAmount = spendNumber;
|
|
|
|
this.list.splice(this.recForm.index, 1, this.recForm);
|
|
|
|
this.list.splice(this.recForm.index, 1, this.recForm);
|
|
|
|
let rList = [];
|
|
|
|
let rList = [];
|
|
|
|
@ -627,7 +628,7 @@ export default {
|
|
|
|
JSON.stringify(item.rechargeAccountList)
|
|
|
|
JSON.stringify(item.rechargeAccountList)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
rechargeAccountList.forEach((item) => {
|
|
|
|
rechargeAccountList.forEach((item) => {
|
|
|
|
//console.log(item);
|
|
|
|
////conslole.log(item);
|
|
|
|
item.cardOver = item.cardOvers;
|
|
|
|
item.cardOver = item.cardOvers;
|
|
|
|
item.giftConsumeMoney = item.cardGiftOvers;
|
|
|
|
item.giftConsumeMoney = item.cardGiftOvers;
|
|
|
|
item.giftSpendMoney = 0;
|
|
|
|
item.giftSpendMoney = 0;
|
|
|
|
@ -641,13 +642,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
if (item.index != this.editProIndex) {
|
|
|
|
if (item.index != this.editProIndex) {
|
|
|
|
//console.log(this.setRecList(item));
|
|
|
|
////conslole.log(this.setRecList(item));
|
|
|
|
let recArr = this.setRecList(item);
|
|
|
|
let recArr = this.setRecList(item);
|
|
|
|
item.rechargeAccountList.forEach((item, index) => {
|
|
|
|
item.rechargeAccountList.forEach((item, index) => {
|
|
|
|
if (item.spendMoney > 0) {
|
|
|
|
if (item.spendMoney > 0) {
|
|
|
|
this.sumAmont();
|
|
|
|
this.sumAmont();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//console.log(item);
|
|
|
|
////conslole.log(item);
|
|
|
|
item.cardOver = recArr[index].cardOvers;
|
|
|
|
item.cardOver = recArr[index].cardOvers;
|
|
|
|
item.cardOvers = recArr[index].cardOvers;
|
|
|
|
item.cardOvers = recArr[index].cardOvers;
|
|
|
|
item.giftConsumeMoney = recArr[index].cardGiftOvers;
|
|
|
|
item.giftConsumeMoney = recArr[index].cardGiftOvers;
|
|
|
|
@ -656,15 +657,15 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//console.log(rList);
|
|
|
|
////conslole.log(rList);
|
|
|
|
//console.log(this.list);
|
|
|
|
////conslole.log(this.list);
|
|
|
|
this.sumAmont();
|
|
|
|
this.sumAmont();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
openRec(row) {
|
|
|
|
openRec(row) {
|
|
|
|
this.recForm = JSON.parse(JSON.stringify(row));
|
|
|
|
this.recForm = JSON.parse(JSON.stringify(row));
|
|
|
|
this.rowRecList = JSON.parse(JSON.stringify(row.rechargeAccountList));
|
|
|
|
this.rowRecList = JSON.parse(JSON.stringify(row.rechargeAccountList));
|
|
|
|
this.editProIndex = row.index;
|
|
|
|
this.editProIndex = row.index;
|
|
|
|
console.log( this.editProIndex)
|
|
|
|
//conslole.log( this.editProIndex)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
recashData(v) {
|
|
|
|
recashData(v) {
|
|
|
|
this.list = v.list;
|
|
|
|
this.list = v.list;
|
|
|
|
@ -672,7 +673,7 @@ export default {
|
|
|
|
let recList = v.form.rechargeAccountList;
|
|
|
|
let recList = v.form.rechargeAccountList;
|
|
|
|
this.list.forEach((item, index) => {
|
|
|
|
this.list.forEach((item, index) => {
|
|
|
|
if (Vindex < index) {
|
|
|
|
if (Vindex < index) {
|
|
|
|
//console.log("大于当前, 卡包变");
|
|
|
|
////conslole.log("大于当前, 卡包变");
|
|
|
|
recList.forEach((rec, recIndex) => {
|
|
|
|
recList.forEach((rec, recIndex) => {
|
|
|
|
if (rec.spendMoney > 0) {
|
|
|
|
if (rec.spendMoney > 0) {
|
|
|
|
item.rechargeAccountList[recIndex].cardOver = rec.cardOvers;
|
|
|
|
item.rechargeAccountList[recIndex].cardOver = rec.cardOvers;
|
|
|
|
@ -730,7 +731,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
endEditMoney(row) {
|
|
|
|
endEditMoney(row) {
|
|
|
|
let form = { ...row };
|
|
|
|
let form = { ...row };
|
|
|
|
//console.log(row);
|
|
|
|
////conslole.log(row);
|
|
|
|
if (this.cashNumber == 1) {
|
|
|
|
if (this.cashNumber == 1) {
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
form.topPriceMember < form.transactionPrice * 1 ||
|
|
|
|
form.topPriceMember < form.transactionPrice * 1 ||
|
|
|
|
@ -765,7 +766,7 @@ export default {
|
|
|
|
this.sumAmont();
|
|
|
|
this.sumAmont();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleChange(data, row, text) {
|
|
|
|
handleChange(data, row, text) {
|
|
|
|
//console.log("行号", row.index);
|
|
|
|
////conslole.log("行号", row.index);
|
|
|
|
let form = { ...row };
|
|
|
|
let form = { ...row };
|
|
|
|
if (text == "managerList") {
|
|
|
|
if (text == "managerList") {
|
|
|
|
this.managerOptions.forEach((item, index) => {
|
|
|
|
this.managerOptions.forEach((item, index) => {
|
|
|
|
@ -788,7 +789,7 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.options.forEach((item, index) => {
|
|
|
|
this.options.forEach((item, index) => {
|
|
|
|
if (item.id == data) {
|
|
|
|
if (item.id == data) {
|
|
|
|
//console.log("返回数据:", item);
|
|
|
|
////conslole.log("返回数据:", item);
|
|
|
|
item.ratio = 100;
|
|
|
|
item.ratio = 100;
|
|
|
|
form[text] = [];
|
|
|
|
form[text] = [];
|
|
|
|
form[text].push(item);
|
|
|
|
form[text].push(item);
|
|
|
|
@ -837,7 +838,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
passcodeData(v) {
|
|
|
|
passcodeData(v) {
|
|
|
|
if (v != null) {
|
|
|
|
if (v != null) {
|
|
|
|
console.log(v)
|
|
|
|
//conslole.log(v)
|
|
|
|
this.formData.append("file", v);
|
|
|
|
this.formData.append("file", v);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.addCashConfirm();
|
|
|
|
this.addCashConfirm();
|
|
|
|
@ -854,7 +855,7 @@ export default {
|
|
|
|
this.$refs.project.show(this.memberForm);
|
|
|
|
this.$refs.project.show(this.memberForm);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
projectData(v) {
|
|
|
|
projectData(v) {
|
|
|
|
//console.log(v);
|
|
|
|
////conslole.log(v);
|
|
|
|
if (!v.courseAccountId) {
|
|
|
|
if (!v.courseAccountId) {
|
|
|
|
v.courseAccountId = null;
|
|
|
|
v.courseAccountId = null;
|
|
|
|
v.courseProjectId = v.id;
|
|
|
|
v.courseProjectId = v.id;
|
|
|
|
@ -927,7 +928,7 @@ export default {
|
|
|
|
numberTimes: 1,
|
|
|
|
numberTimes: 1,
|
|
|
|
minumumTimes: res.data.minumumTimes,
|
|
|
|
minumumTimes: res.data.minumumTimes,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
//console.log(form);
|
|
|
|
////conslole.log(form);
|
|
|
|
this.setRecList(form);
|
|
|
|
this.setRecList(form);
|
|
|
|
if (this.cashNumber == 1) {
|
|
|
|
if (this.cashNumber == 1) {
|
|
|
|
if (row.courseAccountId == null) {
|
|
|
|
if (row.courseAccountId == null) {
|
|
|
|
@ -958,10 +959,10 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
form.cashAmount = form.amount;
|
|
|
|
form.cashAmount = form.amount;
|
|
|
|
form.collectionAmount = form.cashAmount;
|
|
|
|
form.collectionAmount = form.cashAmount;
|
|
|
|
//console.log("1")
|
|
|
|
////conslole.log("1")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.list.length > 0) {
|
|
|
|
if (this.list.length > 0) {
|
|
|
|
//console.log(this.list.length);
|
|
|
|
////conslole.log(this.list.length);
|
|
|
|
if (!this.list[0].projectName) {
|
|
|
|
if (!this.list[0].projectName) {
|
|
|
|
this.proIndex = 0;
|
|
|
|
this.proIndex = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1023,7 +1024,7 @@ export default {
|
|
|
|
2
|
|
|
|
2
|
|
|
|
) * 1;
|
|
|
|
) * 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//console.log(item);
|
|
|
|
////conslole.log(item);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
item.offsetMoney = item.giftConsumeMoney + item.cardConsumeMoney;
|
|
|
|
item.offsetMoney = item.giftConsumeMoney + item.cardConsumeMoney;
|
|
|
|
item.offsetGiftMoney = 0;
|
|
|
|
item.offsetGiftMoney = 0;
|
|
|
|
@ -1176,19 +1177,19 @@ export default {
|
|
|
|
item.rechargeAccountList = rechargeAccountList;
|
|
|
|
item.rechargeAccountList = rechargeAccountList;
|
|
|
|
if (item.courseAccountId != null) {
|
|
|
|
if (item.courseAccountId != null) {
|
|
|
|
item.collectionAmount = item.amount;
|
|
|
|
item.collectionAmount = item.amount;
|
|
|
|
//console.log("2")
|
|
|
|
////conslole.log("2")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (item.projectId) {
|
|
|
|
if (item.projectId) {
|
|
|
|
list.push(item);
|
|
|
|
list.push(item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
console.log(list)
|
|
|
|
//conslole.log(list)
|
|
|
|
|
|
|
|
|
|
|
|
list.forEach((item) => {
|
|
|
|
list.forEach((item) => {
|
|
|
|
item.collectionAmount = item.collectionAmounts
|
|
|
|
item.collectionAmount = item.collectionAmounts
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
console.log(list)
|
|
|
|
//conslole.log(list)
|
|
|
|
this.formData.append("cashListRequestList", JSON.stringify(list));
|
|
|
|
this.formData.append("cashListRequestList", JSON.stringify(list));
|
|
|
|
addCash(this.formData).then((res) => {
|
|
|
|
addCash(this.formData).then((res) => {
|
|
|
|
if (res.code == "000000") {
|
|
|
|
if (res.code == "000000") {
|
|
|
|
@ -1215,14 +1216,14 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
openStaffRatio(row, index, text) {
|
|
|
|
openStaffRatio(row, index, text) {
|
|
|
|
this.editIndex = index;
|
|
|
|
this.editIndex = index;
|
|
|
|
console.log(row)
|
|
|
|
//conslole.log(row)
|
|
|
|
this.$refs.staffratio.show(row, text);
|
|
|
|
this.$refs.staffratio.show(row, text);
|
|
|
|
this.$refs.staffratio.showdetele();
|
|
|
|
this.$refs.staffratio.showdetele();
|
|
|
|
localStorage.setItem("row",JSON.stringify(row))
|
|
|
|
localStorage.setItem("row",JSON.stringify(row))
|
|
|
|
localStorage.setItem("text",text)
|
|
|
|
localStorage.setItem("text",text)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
staffratioData(v) {
|
|
|
|
staffratioData(v) {
|
|
|
|
console.log(v)
|
|
|
|
//conslole.log(v)
|
|
|
|
let form = this.list[this.editIndex];
|
|
|
|
let form = this.list[this.editIndex];
|
|
|
|
let texts = v.text + "s";
|
|
|
|
let texts = v.text + "s";
|
|
|
|
form[v.text] = v.list;
|
|
|
|
form[v.text] = v.list;
|
|
|
|
@ -1240,14 +1241,16 @@ export default {
|
|
|
|
adminList: [],
|
|
|
|
adminList: [],
|
|
|
|
payLists: this.payLists,
|
|
|
|
payLists: this.payLists,
|
|
|
|
rechargeAccountList: [], //卡付列表
|
|
|
|
rechargeAccountList: [], //卡付列表
|
|
|
|
|
|
|
|
collectionCashAmounts:0,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.list.push(list);
|
|
|
|
this.list.push(list);
|
|
|
|
|
|
|
|
//conslole.log("🚀 ~ file: service.vue ~ line 1246 ~ addPro ~ list", this.list)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
delPro(row) {
|
|
|
|
delPro(row) {
|
|
|
|
// this.czRecList(row);
|
|
|
|
// this.czRecList(row);
|
|
|
|
this.list.splice(row.index, 1);
|
|
|
|
this.list.splice(row.index, 1);
|
|
|
|
//console.log(row)
|
|
|
|
////conslole.log(row)
|
|
|
|
this.form.cashAmount = this.form.cashAmount - row.amount + row.cashAmount
|
|
|
|
this.form.cashAmount = this.form.cashAmount - row.amount + row.cashAmount
|
|
|
|
this.form.collectionCashAmounts = this.form.cashAmount - row.amount + row.cashAmount
|
|
|
|
this.form.collectionCashAmounts = this.form.cashAmount - row.amount + row.cashAmount
|
|
|
|
this.form.collectionCashAmount = this.form.collectionCashAmounts
|
|
|
|
this.form.collectionCashAmount = this.form.collectionCashAmounts
|
|
|
|
@ -1266,9 +1269,9 @@ export default {
|
|
|
|
// this.recListCopy.forEach((item) => {
|
|
|
|
// this.recListCopy.forEach((item) => {
|
|
|
|
// list.forEach((items) => {
|
|
|
|
// list.forEach((items) => {
|
|
|
|
// if (item.id == items.id) {
|
|
|
|
// if (item.id == items.id) {
|
|
|
|
// //console.log(item);
|
|
|
|
// ////conslole.log(item);
|
|
|
|
// //console.log(item.giftConsumeMoney);
|
|
|
|
// ////conslole.log(item.giftConsumeMoney);
|
|
|
|
// //console.log(item.giftSpendMoney);
|
|
|
|
// ////conslole.log(item.giftSpendMoney);
|
|
|
|
// item.cardOver = (item.cardOver + items.spendMoney).toFixed(2) * 1;
|
|
|
|
// item.cardOver = (item.cardOver + items.spendMoney).toFixed(2) * 1;
|
|
|
|
// item.cardOvers = (item.cardOvers + items.spendMoney).toFixed(2) * 1;
|
|
|
|
// item.cardOvers = (item.cardOvers + items.spendMoney).toFixed(2) * 1;
|
|
|
|
// item.cardGiftOvers =
|
|
|
|
// item.cardGiftOvers =
|
|
|
|
@ -1286,7 +1289,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//选中会员返回方法
|
|
|
|
//选中会员返回方法
|
|
|
|
memberData(v) {
|
|
|
|
memberData(v) {
|
|
|
|
//console.log(v);
|
|
|
|
////conslole.log(v);
|
|
|
|
this.memberForm.mobilePhone = v.mobilePhone;
|
|
|
|
this.memberForm.mobilePhone = v.mobilePhone;
|
|
|
|
this.inputMember();
|
|
|
|
this.inputMember();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -1295,7 +1298,7 @@ export default {
|
|
|
|
this.setProOne(v);
|
|
|
|
this.setProOne(v);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
paymentData(v) {
|
|
|
|
paymentData(v) {
|
|
|
|
//console.log(v);
|
|
|
|
////conslole.log(v);
|
|
|
|
this.form = v.form;
|
|
|
|
this.form = v.form;
|
|
|
|
this.payLists = v.list;
|
|
|
|
this.payLists = v.list;
|
|
|
|
this.sumAmont();
|
|
|
|
this.sumAmont();
|
|
|
|
@ -1318,7 +1321,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//点击选中
|
|
|
|
//点击选中
|
|
|
|
rowClick(row) {
|
|
|
|
rowClick(row) {
|
|
|
|
//console.log(row);
|
|
|
|
////conslole.log(row);
|
|
|
|
this.$refs.list.toggleRowExpansion(row);
|
|
|
|
this.$refs.list.toggleRowExpansion(row);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
close() {
|
|
|
|
close() {
|
|
|
|
@ -1472,7 +1475,7 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
itemLists.cashAmount = itemLists.amount;
|
|
|
|
itemLists.cashAmount = itemLists.amount;
|
|
|
|
itemLists.collectionAmount = itemLists.amount;
|
|
|
|
itemLists.collectionAmount = itemLists.amount;
|
|
|
|
//console.log(3)
|
|
|
|
////conslole.log(3)
|
|
|
|
itemLists.courseMoney = itemLists.transactionPrice;
|
|
|
|
itemLists.courseMoney = itemLists.transactionPrice;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
list.push(itemLists);
|
|
|
|
list.push(itemLists);
|
|
|
|
@ -1745,14 +1748,14 @@ export default {
|
|
|
|
item.collectionIntegralAmount +
|
|
|
|
item.collectionIntegralAmount +
|
|
|
|
item.collectionCashAmount
|
|
|
|
item.collectionCashAmount
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
//console.log(4)
|
|
|
|
////conslole.log(4)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
item.collectionAmount =
|
|
|
|
item.collectionAmount =
|
|
|
|
(
|
|
|
|
(
|
|
|
|
item.collectionIntegralAmount + item.collectionCashAmount
|
|
|
|
item.collectionIntegralAmount + item.collectionCashAmount
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//console.log(5)
|
|
|
|
////conslole.log(5)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let collectionRechargeAmountg = 0;
|
|
|
|
let collectionRechargeAmountg = 0;
|
|
|
|
@ -1775,8 +1778,10 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
this.form.cashAmount = (money.toFixed(2) * 1) + (collectionRechargeAmountg.toFixed(2) * 1)
|
|
|
|
this.form.cashAmount = (money.toFixed(2) * 1) + (collectionRechargeAmountg.toFixed(2) * 1)
|
|
|
|
this.form.collectionCashAmounts = (money.toFixed(2) * 1)
|
|
|
|
this.form.collectionCashAmounts = (money.toFixed(2) * 1)
|
|
|
|
console.log(this.form.collectionCashAmounts)
|
|
|
|
// console.log("🚀 ~ file: service.vue ~ line 1780 ~ sumAmont ~ this.form.collectionCashAmounts", this.form.collectionCashAmounts)
|
|
|
|
console.log(this.form.cashAmount)
|
|
|
|
// //conslole.log(this.form.collectionCashAmounts)
|
|
|
|
|
|
|
|
// //conslole.log(this.form.cashAmount)
|
|
|
|
|
|
|
|
// console.log("🚀 ~ file: service.vue ~ line 1782 ~ sumAmont ~ this.form.cashAmount", this.form.cashAmount)
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
this.form.cashAmount == this.form.collectionCashAmount &&
|
|
|
|
this.form.cashAmount == this.form.collectionCashAmount &&
|
|
|
|
@ -1796,15 +1801,15 @@ export default {
|
|
|
|
item.collectionIntegralAmount +
|
|
|
|
item.collectionIntegralAmount +
|
|
|
|
item.collectionCashAmount
|
|
|
|
item.collectionCashAmount
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
).toFixed(2) * 1;
|
|
|
|
//console.log(6)
|
|
|
|
////conslole.log(6)
|
|
|
|
//console.log( item.collectionAmount)
|
|
|
|
////conslole.log( item.collectionAmount)
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
item.collectionAmount =
|
|
|
|
item.collectionAmount =
|
|
|
|
(item.collectionIntegralAmount + item.collectionCashAmount).toFixed(
|
|
|
|
(item.collectionIntegralAmount + item.collectionCashAmount).toFixed(
|
|
|
|
2
|
|
|
|
2
|
|
|
|
) * 1;
|
|
|
|
) * 1;
|
|
|
|
//console.log(7)
|
|
|
|
////conslole.log(7)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.form.debtMoney =
|
|
|
|
this.form.debtMoney =
|
|
|
|
@ -1812,7 +1817,7 @@ export default {
|
|
|
|
var that = this;
|
|
|
|
var that = this;
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
that.$nextTick(() => {
|
|
|
|
that.$nextTick(() => {
|
|
|
|
console.log(that.form)
|
|
|
|
//conslole.log(that.form)
|
|
|
|
that.$refs.payment.show(that.form, that.payLists);
|
|
|
|
that.$refs.payment.show(that.form, that.payLists);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, 500);
|
|
|
|
}, 500);
|
|
|
|
|