直接收银修改

master
wangxubin1999 3 years ago
parent 79a4cafb87
commit 604eda206c

@ -843,7 +843,7 @@ export default {
this.projectIndex = index; this.projectIndex = index;
}, },
changeMember() { changeMember() {
console.log("-------------------------") //console.log("-------------------------")
if (this.cashNumber == 1) { if (this.cashNumber == 1) {
Object.assign(this.$data, this.$options.data.call(this)); Object.assign(this.$data, this.$options.data.call(this));
this.cashNumber = 0; this.cashNumber = 0;
@ -864,12 +864,10 @@ export default {
}, },
// //
editcard(row, index) { editcard(row, index) {
console.log("🚀 ~ file: service.vue ~ line 837 ~ editcard ~ row", row); //console.log("🚀 ~ file: service.vue ~ line 837 ~ editcard ~ row", row);
this.recIndex = index; this.recIndex = index;
console.log(
"--------------------------------------------------------------------------------------" //console.log("🚀 ~ file: service.vue ~ line 843 ~ editcard ~ this.rowRecList[index].type", this.rowRecList[index].type)
)
console.log("🚀 ~ file: service.vue ~ line 843 ~ editcard ~ this.rowRecList[index].type", this.rowRecList[index].type)
if(this.rowRecList[index].type == 1){ if(this.rowRecList[index].type == 1){
if (this.list[this.projectIndex].noDiscount == 1) { if (this.list[this.projectIndex].noDiscount == 1) {
@ -919,12 +917,12 @@ export default {
this.rowRecList[index].discoutMoney = this.rowRecList[index].discoutMoney =
((this.appearPrice * 1) * recRatio).toFixed(2) *1; // ((this.appearPrice * 1) * recRatio).toFixed(2) *1; //
this.rowRecList[index].discoutMoney= Math.trunc(this.rowRecList[index].discoutMoney) this.rowRecList[index].discoutMoney= Math.trunc(this.rowRecList[index].discoutMoney)
console.log("🚀 ~ file: service.vue ~ line 899 ~ editcard ~ this.appearPrice", this.appearPrice) //console.log("🚀 ~ file: service.vue ~ line 899 ~ editcard ~ this.appearPrice", this.appearPrice)
this.rowRecList[index].discoutGiftMoney = this.rowRecList[index].discoutGiftMoney =
(this.appearPrice-this.rowRecList[index].discoutMoney ).toFixed(2) * 1; // (this.appearPrice-this.rowRecList[index].discoutMoney ).toFixed(2) * 1; //
this.rowRecList[index].discoutGiftMoney= Math.trunc(this.rowRecList[index].discoutGiftMoney) this.rowRecList[index].discoutGiftMoney= Math.trunc(this.rowRecList[index].discoutGiftMoney)
console.log("🚀 ~ file: service.vue ~ line 897 ~ editcard ~ this.rowRecList[index].discoutGiftMoney", this.rowRecList[index].discoutGiftMoney) //console.log("🚀 ~ file: service.vue ~ line 897 ~ editcard ~ this.rowRecList[index].discoutGiftMoney", this.rowRecList[index].discoutGiftMoney)
this.rowRecList[index].spendMoney =(this.rowRecList[index].discoutMoney *(this.rowRecList[index].discount / 100)).toFixed(2) * 1; // this.rowRecList[index].spendMoney =(this.rowRecList[index].discoutMoney *(this.rowRecList[index].discount / 100)).toFixed(2) * 1; //
this.rowRecList[index].giftSpendMoney =(this.rowRecList[index].discoutGiftMoney *(this.rowRecList[index].discountFreeAmount / 100)).toFixed(2) * 1; this.rowRecList[index].giftSpendMoney =(this.rowRecList[index].discoutGiftMoney *(this.rowRecList[index].discountFreeAmount / 100)).toFixed(2) * 1;
@ -979,7 +977,7 @@ export default {
}, },
endEditcard(row, index) { endEditcard(row, index) {
this.recForm.cashAmount = 0; this.recForm.cashAmount = 0;
console.log(this.recForm); //console.log(this.recForm);
// if(this.projectMomey==this.recForm.amount){ // if(this.projectMomey==this.recForm.amount){
// this.projectMomey=0 // this.projectMomey=0
@ -995,6 +993,7 @@ export default {
message: "卡付金额大于项目金额" message: "卡付金额大于项目金额"
}); });
form.spendMoney=this.card4 form.spendMoney=this.card4
} }
if(form.spendMoney<0){ if(form.spendMoney<0){
this.$message.info({ this.$message.info({
@ -1002,7 +1001,7 @@ export default {
}); });
form.spendMoney=0 form.spendMoney=0
} }
console.log("🚀 ~ file: service.vue ~ line 964 ~ endEditcard ~ form", form) //console.log("🚀 ~ file: service.vue ~ line 964 ~ endEditcard ~ form", form)
if (debtMoney > 0) { if (debtMoney > 0) {
//0 //0
if (form.type == 2 || form.type == 0) { if (form.type == 2 || form.type == 0) {
@ -1055,10 +1054,11 @@ export default {
form.discoutMoney = form.discoutMoney =
((form.spendMoney * 1) / (form.discount / 100)).toFixed(2) * ((form.spendMoney * 1) / (form.discount / 100)).toFixed(2) *
1; // 1; //
if(this.card3==form.spendMoney){ if(form.spendMoney==this.card3){
form.giftSpendMoney =this.card2; // form.giftSpendMoney =this.card2; //
form.discoutGiftMoney = form.discoutGiftMoney =
(this.appearPrice * 1-form.discoutMoney*1).toFixed(2) * 1; ((form.giftSpendMoney * 1) / (form.discountFreeAmount / 100)).toFixed(2) *
1;
}else{ }else{
form.giftSpendMoney =(((form.spendMoney * 1) / recRatio) * recGiftRatio).toFixed(2) * 1; // form.giftSpendMoney =(((form.spendMoney * 1) / recRatio) * recGiftRatio).toFixed(2) * 1; //
form.discoutGiftMoney = form.discoutGiftMoney =
@ -1068,12 +1068,20 @@ export default {
} else { } else {
// //
form.discoutMoney = (form.spendMoney*1).toFixed(2) * 1; // form.discoutMoney = (form.spendMoney*1).toFixed(2) * 1; //
form.giftSpendMoney = if(form.spendMoney==this.card3){
form.giftSpendMoney =this.card2; //
form.discoutGiftMoney =
(this.appearPrice * 1-form.discoutMoney*1).toFixed(2) * 1;
}else{
form.giftSpendMoney =
(((form.spendMoney * 1) / recRatio) * recGiftRatio).toFixed( (((form.spendMoney * 1) / recRatio) * recGiftRatio).toFixed(
2 2
) * 1; // ) * 1; //
form.discoutGiftMoney = form.giftSpendMoney.toFixed(2) * 1; // form.discoutGiftMoney = form.giftSpendMoney.toFixed(2) * 1; //
}
} }
} else { } else {
form.spendMoney = form.cardOver; form.spendMoney = form.cardOver;
@ -1087,11 +1095,6 @@ export default {
(form.giftSpendMoney * (form.discount / 100)).toFixed(2) * 1; (form.giftSpendMoney * (form.discount / 100)).toFixed(2) * 1;
} }
} }
if (form.spendMoney == 0) {
form.giftSpendMoney = 0;
form.discoutMoney = 0;
form.discoutGiftMoney = 0;
}
} else { } else {
// //
if (this.recForm.noDiscount == 0) { if (this.recForm.noDiscount == 0) {
@ -1110,7 +1113,7 @@ export default {
this.list[this.editProIndex].amount this.list[this.editProIndex].amount
) { ) {
// //
console.log("🚀 ~ file: service.vue ~ line 592 ~ endEditcard ~ this.list[this.editProIndex]", this.list[this.editProIndex]) //console.log("🚀 ~ file: service.vue ~ line 592 ~ endEditcard ~ this.list[this.editProIndex]", this.list[this.editProIndex])
} }
} else { } else {
// if (0 <= row.spendMoney * 1 > row.cardOver * 1) { // if (0 <= row.spendMoney * 1 > row.cardOver * 1) {
@ -1157,8 +1160,10 @@ export default {
this.list.forEach(item => { this.list.forEach(item => {
num = (num + item.collectionCashAmounts).toFixed(2) * 1; num = (num + item.collectionCashAmounts).toFixed(2) * 1;
}); });
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.spendMoney", form.spendMoney)
console.log("🚀 ~ file: service.vue ~ line 1161 ~ endEditcard ~ num", num) console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.giftSpendMoney", form.giftSpendMoney)
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.discoutMoney", form.discoutMoney)
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.discoutGiftMoney", form.discoutGiftMoney)
this.form.collectionCashAmounts = num; this.form.collectionCashAmounts = num;
this.sumNum(); this.sumNum();
@ -1177,8 +1182,6 @@ export default {
).toFixed(2) * 1; ).toFixed(2) * 1;
console.log("🚀 ~ file: service.vue ~ line 1134 ~ sumNum ~ item.discoutMoney", item.discoutMoney)
console.log("🚀 ~ file: service.vue ~ line 1134 ~ sumNum ~ item.discoutGiftMoney", item.discoutGiftMoney)
spendNumber = spendNumber =
( (
@ -1642,8 +1645,8 @@ export default {
).toFixed(2) * 1; ).toFixed(2) * 1;
} }
}); });
console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ sumMoney", sumMoney) //console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ sumMoney", sumMoney)
console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ this.form.collectionCashAmounts", this.appearPrices) //console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ this.form.collectionCashAmounts", this.appearPrices)
if ( if (
this.balance <= this.balance <=
@ -1701,7 +1704,7 @@ export default {
addCashConfirm() { addCashConfirm() {
let list = []; let list = [];
console.log("🚀 ~ file: service.vue ~ line 1728 ~ addCashConfirm ~ this.list", this.list) //console.log("🚀 ~ file: service.vue ~ line 1728 ~ addCashConfirm ~ this.list", this.list)
this.list.forEach(item => { this.list.forEach(item => {
if (item.courseAccountId == null) { if (item.courseAccountId == null) {
item.collectionCashAmount = item.collectionCashAmount =
@ -1841,7 +1844,7 @@ export default {
this.list.push(list); this.list.push(list);
}, },
delPro(row) { delPro(row) {
console.log("🚀 ~ file: service.vue ~ line 1761 ~ delPro ~ row", row) //console.log("🚀 ~ file: service.vue ~ line 1761 ~ delPro ~ row", row)
row.rechargeAccountList.forEach((item)=>{ row.rechargeAccountList.forEach((item)=>{
item.cardOvers= item.cardOvers+item.spendMoney item.cardOvers= item.cardOvers+item.spendMoney
item.cardGiftOvers= item.cardGiftOvers+item.giftSpendMoney item.cardGiftOvers= item.cardGiftOvers+item.giftSpendMoney
@ -2347,10 +2350,7 @@ export default {
} }
collectionRechargeAmountg =collectionRechargeAmountg+ collectionRechargeAmountg =collectionRechargeAmountg+
item.collectionRechargeAmount.toFixed(2) * 1; item.collectionRechargeAmount.toFixed(2) * 1;
console.log(
"🚀 ~ file: service.vue ~ line 1764 ~ this.list.forEach ~ collectionRechargeAmountg",
collectionRechargeAmountg
);
}); });
// //

Loading…
Cancel
Save