直接收银修改

master
wangxubin@yeah.net 3 years ago
parent e37acf2133
commit 86e2d02cfd

@ -107,6 +107,7 @@ export default {
icon: "el-icon-files", icon: "el-icon-files",
route: "/baseProject", route: "/baseProject",
index: "baseProject", index: "baseProject",
number: "400500",
id:"2002002", id:"2002002",
}, },
{ {

@ -421,14 +421,11 @@ export default {
//conslole.log(index) //conslole.log(index)
}, },
endEditcard(row, index) { endEditcard(row, 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;
//conslole.log(this.recForm)
let form = { ...row }; let form = { ...row };
console.log("🚀 ~ file: service.vue ~ line 427 ~ endEditcard ~ form", form)
//conslole.log(form) console.log("🚀 ~ file: service.vue ~ line 429 ~ endEditcard ~ this.recForm.noDiscount", this.recForm.noDiscount)
////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) {
@ -507,9 +504,11 @@ export default {
form.discoutMoney = form.discoutMoney =
(form.spendMoney /( form.discount / 100)).toFixed(2) * 1; (form.spendMoney /( form.discount / 100)).toFixed(2) * 1;
} else { } else {
不可以打 //
form.discoutMoney = form.spendMoney; form.discoutMoney = form.spendMoney;
console.log("🚀 ~ file: service.vue ~ line 511 ~ endEditcard ~ nihao", form.spendMoney)
} }
form.discoutGiftMoney=0 form.discoutGiftMoney=0
} }
if (form.discoutGiftMoney + form.discoutMoney > this.list[this.editProIndex].amount) { if (form.discoutGiftMoney + form.discoutMoney > this.list[this.editProIndex].amount) {
@ -587,12 +586,15 @@ export default {
let spendNumber = 0; let spendNumber = 0;
////conslole.log(this.rowRecList) ////conslole.log(this.rowRecList)
this.rowRecList.forEach((item) => { this.rowRecList.forEach((item) => {
spendMoney += (item.discoutMoney + item.discoutGiftMoney) * 1; spendMoney += (item.discoutMoney* 1 + item.discoutGiftMoney* 1) * 1;
spendNumber += (item.spendMoney * 1 + item.giftSpendMoney) * 1;
spendNumber += (item.spendMoney * 1 + item.giftSpendMoney* 1) * 1;
////conslole.log(item.discoutMoney); ////conslole.log(item.discoutMoney);
////conslole.log(item.discoutGiftMoney); ////conslole.log(item.discoutGiftMoney);
}); });
////conslole.log(spendMoney); // conslole.log(spendMoney);
console.log("🚀 ~ file: service.vue ~ line 595 ~ sumNum ~ spendMoney", 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;
@ -617,6 +619,7 @@ export default {
( (
spendMoney spendMoney
).toFixed(2) * 1; ).toFixed(2) * 1;
console.log("🚀 ~ file: service.vue ~ line 616 ~ sumNum ~ this.recForm.collectionAmounts", this.recForm.collectionAmounts)
////conslole.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);
@ -967,9 +970,9 @@ export default {
} }
} }
if (this.proIndex != -1) { if (this.proIndex != -1) {
if (this.list[this.proIndex].projectName) { // if (this.list[this.proIndex].projectName) {
this.czRecList(this.list[this.proIndex]); // this.czRecList(this.list[this.proIndex]);
} // }
form.index = this.proIndex; form.index = this.proIndex;
this.list.splice(this.proIndex, 1, form); this.list.splice(this.proIndex, 1, form);
this.expand.push(this.proIndex); this.expand.push(this.proIndex);

Loading…
Cancel
Save