+
{{ item.payName }}
{{ item.payMoney }}
@@ -162,7 +162,7 @@ export default {
}
.printDiv {
- width: 330px;
+ width: 380px;
margin: 0 auto;
}
diff --git a/src/pages/eashier/service/service.vue b/src/pages/eashier/service/service.vue
index 50dbf98..b850254 100644
--- a/src/pages/eashier/service/service.vue
+++ b/src/pages/eashier/service/service.vue
@@ -764,12 +764,16 @@ export default {
*/
let num = this.list.reduce((pre, item) => {
+ console.log("🚀 ~ file: service.vue ~ line 804 ~ num ~ item.courseAccountId", item.collectionAmounts)
item.transactionPrice = item.transactionPrice
?(item.transactionPrice*1).toFixed(2) * 1
: 0; // 抵扣金额存在,项目金额存在
-
+ if(item.courseAccountId == null){
+ item.collectionAmounts = (item.collectionAmounts*1).toFixed(2) * 1;
+ }else{
+ item.collectionAmounts =(item.transactionPrice*1).toFixed(2) * 1;
+ }
if (item.collectionAmounts) {
- item.collectionAmounts = (item.collectionAmounts*1).toFixed(2) * 1;
return pre + (item.transactionPrice - item.collectionAmounts);
} // 抵扣金额不存在,项目金额存在
else if (!item.collectionAmounts && item.transactionPrice) {
@@ -787,14 +791,19 @@ export default {
*/
let num = this.list.reduce((pre, item) => {
+ console.log("🚀 ~ file: service.vue ~ line 804 ~ num ~ item.courseAccountId", item)
item.transactionPrice = item.transactionPrice
?(item.transactionPrice*1).toFixed(2) * 1
: 0; // 抵扣金额存在,项目金额存在
if(item.isCardPay !== 0){
return pre
}
+ if(item.courseAccountId == null){
+ item.collectionAmounts = (item.collectionAmounts*1).toFixed(2) * 1;
+ }else{
+ item.collectionAmounts =(item.transactionPrice*1).toFixed(2) * 1;
+ }
if (item.collectionAmounts) {
- item.collectionAmounts = (item.collectionAmounts*1).toFixed(2) * 1;
return pre + (item.transactionPrice - item.collectionAmounts);
} // 抵扣金额不存在,项目金额存在
else if (!item.collectionAmounts && item.transactionPrice) {
@@ -843,7 +852,7 @@ export default {
this.projectIndex = index;
},
changeMember() {
- console.log("-------------------------")
+ //console.log("-------------------------")
if (this.cashNumber == 1) {
Object.assign(this.$data, this.$options.data.call(this));
this.cashNumber = 0;
@@ -864,12 +873,10 @@ export default {
},
//修改卡付金额
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;
- 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.list[this.projectIndex].noDiscount == 1) {
@@ -919,12 +926,12 @@ export default {
this.rowRecList[index].discoutMoney =
((this.appearPrice * 1) * recRatio).toFixed(2) *1; //充值卡支付的钱
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.appearPrice-this.rowRecList[index].discoutMoney ).toFixed(2) * 1; //赠送实际出的钱
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].giftSpendMoney =(this.rowRecList[index].discoutGiftMoney *(this.rowRecList[index].discountFreeAmount / 100)).toFixed(2) * 1;
@@ -979,7 +986,7 @@ export default {
},
endEditcard(row, index) {
this.recForm.cashAmount = 0;
- console.log(this.recForm);
+ //console.log(this.recForm);
// if(this.projectMomey==this.recForm.amount){
// this.projectMomey=0
@@ -995,6 +1002,7 @@ export default {
message: "卡付金额大于项目金额"
});
form.spendMoney=this.card4
+
}
if(form.spendMoney<0){
this.$message.info({
@@ -1002,7 +1010,7 @@ export default {
});
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) {
//判断成交价是否大于0
if (form.type == 2 || form.type == 0) {
@@ -1055,10 +1063,11 @@ export default {
form.discoutMoney =
((form.spendMoney * 1) / (form.discount / 100)).toFixed(2) *
1; //充值卡支付的钱
- if(this.card3==form.spendMoney){
+ if(form.spendMoney==this.card3){
form.giftSpendMoney =this.card2; //赠送实际出的钱
form.discoutGiftMoney =
- (this.appearPrice * 1-form.discoutMoney*1).toFixed(2) * 1;
+ ((form.giftSpendMoney * 1) / (form.discountFreeAmount / 100)).toFixed(2) *
+ 1;
}else{
form.giftSpendMoney =(((form.spendMoney * 1) / recRatio) * recGiftRatio).toFixed(2) * 1; //赠送实际出的钱
form.discoutGiftMoney =
@@ -1068,12 +1077,20 @@ export default {
} else {
//不可以打折
+
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(
2
) * 1; //赠送实际出的钱
form.discoutGiftMoney = form.giftSpendMoney.toFixed(2) * 1; //赠送卡抵扣支付的钱
+ }
+
}
} else {
form.spendMoney = form.cardOver;
@@ -1087,11 +1104,6 @@ export default {
(form.giftSpendMoney * (form.discount / 100)).toFixed(2) * 1;
}
}
- if (form.spendMoney == 0) {
- form.giftSpendMoney = 0;
- form.discoutMoney = 0;
- form.discoutGiftMoney = 0;
- }
} else {
//折扣卡
if (this.recForm.noDiscount == 0) {
@@ -1110,7 +1122,7 @@ export default {
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 {
// if (0 <= row.spendMoney * 1 > row.cardOver * 1) {
@@ -1157,8 +1169,10 @@ export default {
this.list.forEach(item => {
num = (num + item.collectionCashAmounts).toFixed(2) * 1;
});
-
- console.log("🚀 ~ file: service.vue ~ line 1161 ~ endEditcard ~ num", num)
+ console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.spendMoney", form.spendMoney)
+ 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.sumNum();
@@ -1177,8 +1191,6 @@ export default {
).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 =
(
@@ -1205,7 +1217,9 @@ export default {
this.recForm.collectionCashAmount +
this.recForm.collectionIntegralAmount
).toFixed(2) * 1;
+ console.log("🚀 ~ file: service.vue ~ line 1213 ~ sumNum ~ this.recForm", this.recForm)
this.recForm.collectionAmounts = spendMoney.toFixed(2) * 1;
+
this.recForm.rechargeAmount = spendNumber.toFixed(2) * 1;
this.list.splice(this.recForm.index, 1, this.recForm);
@@ -1460,6 +1474,10 @@ export default {
row.courseMoney = 0;
} else {
row.courseMoney = row.courseConsumePrice;
+ // row.collectionAmounts=row.transactionPrice
+ console.log("🚀 ~ file: service.vue ~ line 1466 ~ setProOne ~ row.transactionPrice", row)
+
+
}
let form = {};
proOne({
@@ -1634,6 +1652,7 @@ export default {
let sumMoney = 0;
this.list.forEach((item, index) => {
+
if (item.courseAccountId == null) {
sumMoney +=
(
@@ -1641,6 +1660,11 @@ export default {
item.collRecAmonnt -
item.collectionIntegralAmount
).toFixed(2) * 1;
+ }else{
+ item.transactionPrice*1;
+ console.log("🚀 ~ file: service.vue ~ line 1649 ~ this.list.forEach ~ item.transactionPrice", item.transactionPrice)
+ console.log("🚀 ~ file: service.vue ~ line 1649 ~ this.list.forEach ~ this.appearPrices", this.appearPrices)
+
}
});
console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ sumMoney", sumMoney)
@@ -1702,7 +1726,7 @@ export default {
addCashConfirm() {
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 => {
if (item.courseAccountId == null) {
item.collectionCashAmount =
@@ -1811,7 +1835,6 @@ export default {
},
openStaffRatio(row, index, text) {
this.editIndex = index;
-
this.$refs.staffratio.show(row, text);
this.$refs.staffratio.showdetele();
localStorage.setItem("row", JSON.stringify(row));
@@ -1842,7 +1865,7 @@ export default {
this.list.push(list);
},
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)=>{
item.cardOvers= item.cardOvers+item.spendMoney
item.cardGiftOvers= item.cardGiftOvers+item.giftSpendMoney
@@ -2348,10 +2371,7 @@ export default {
}
collectionRechargeAmountg =collectionRechargeAmountg+
item.collectionRechargeAmount.toFixed(2) * 1;
- console.log(
- "🚀 ~ file: service.vue ~ line 1764 ~ this.list.forEach ~ collectionRechargeAmountg",
- collectionRechargeAmountg
- );
+
});
// 总付金额计算
diff --git a/src/pages/eashier/within/within.vue b/src/pages/eashier/within/within.vue
index 6f8616d..9d7b1a4 100644
--- a/src/pages/eashier/within/within.vue
+++ b/src/pages/eashier/within/within.vue
@@ -108,6 +108,7 @@ export default {
rowClick(row) {
this.radioRowValue = row.id;
this.radioRowValueList = row;
+ console.log('row----',row)
},
add(type) {
this.$refs.edit.show("添加", type);
@@ -117,6 +118,7 @@ export default {
this.$refs.edit.show("添加");
} else if (number == 0) {
this.$refs.edit.show(this.radioRowValueList);
+ console.log('radioRowValueList---',this.radioRowValueList)
} else {
let form = { id: this.radioRowValueList.id, state: number };
updateStateRechargeCardTransition(form).then((res) => {
@@ -144,8 +146,10 @@ export default {
},
//修改返回方法
editData(v) {
- this.radioRowValueList=v
this.getData();
+ // 重置
+ this.radioRowValue = ''
+ this.radioRowValueList = {}
},
//明细返回方法
detailData(v) {
diff --git a/src/pages/storeManage/admins/detail/index.vue b/src/pages/storeManage/admins/detail/index.vue
index 344a2c7..59d5e45 100644
--- a/src/pages/storeManage/admins/detail/index.vue
+++ b/src/pages/storeManage/admins/detail/index.vue
@@ -5,6 +5,11 @@