收银bug修改

master
wangxubin@yeah.net 3 years ago
parent 84cee98de5
commit 0fbefe5800

@ -217,7 +217,9 @@ export default {
};
list.push(items);
});
this.$emit("staffslesData", list);
console.log("🚀 ~ file: index.vue ~ line 222 ~ confirm ~ list", list)
},
//
changeStaff() {

@ -935,28 +935,28 @@ export default {
name: "优惠券",
index: "100",
icon: "el-icon-s-ticket",
number: "1000",
number: "800",
menuLists: [
{
name: "建立",
icon: "el-icon-s-promotion",
route: "/couponIssue",
index: "couponIssue",
number: "1000100",
number: "800100",
},
{
name: "管理",
icon: "el-icon-s-operation",
route: "/couponMane",
index: "couponMane",
number: "1000200",
number: "800200",
},
{
name: "领取消费",
icon: "el-icon-time",
route: "/couponRecord",
index: "couponRecord",
number: "1000300",
number: "800300",
},
],
},

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

@ -292,7 +292,7 @@ export default {
addRechargeCardTransition(this.form)
.then((res) => {
if (res.code == "000000") {
this.$emit("editData");
this.$emit("editData",this.form.staffList);
this.dialogFormVisible = false;
this.$message.success({
message: "数据添加成功!",
@ -311,7 +311,11 @@ export default {
//console.log(err);
});
} else {
this.form.staffLists = this.staffList;
console.log("🚀 ~ file: edit.vue ~ line 316 ~ updateRechargeCardTransition ~ this.form", this.form)
updateRechargeCardTransition(this.form).then((res) => {
if (res.code == "000000") {
this.$emit("editData");
this.dialogFormVisible = false;

@ -144,6 +144,7 @@ export default {
},
//
editData(v) {
this.radioRowValueList=v
this.getData();
},
//

Loading…
Cancel
Save