This commit is contained in:
cun-nan 2024-10-14 16:16:07 +08:00
parent f3229ce2ff
commit 987ecc70df

View File

@ -14,7 +14,7 @@
<el-popover <el-popover
placement="bottom" placement="bottom"
trigger="hover"> trigger="hover">
<div> 储值卡1000.00</div> <div> 储值卡{{ chooseVipUser.cardBalance || 0 }}</div>
<div> 储值卡1000.00</div> <div> 储值卡1000.00</div>
<div> 储值卡1000.00</div> <div> 储值卡1000.00</div>
<div> 储值卡1000.00</div> <div> 储值卡1000.00</div>
@ -693,12 +693,12 @@ export default {
} }
}, },
watch: { watch: {
// //
chooseVipUser: { realAmount: {
handler(newVal) { handler(newVal) {
console.log("会员发生变化", newVal); console.log("结算金额", newVal);
// name //
if (this.chooseVipUser.hasOwnProperty("name")){ if (this.realAmount > 0){
this.isClickable = true this.isClickable = true
}else { }else {
this.isClickable = false this.isClickable = false
@ -1068,21 +1068,23 @@ export default {
let oilOrderR = [ let oilOrderR = [
{ {
oilName : this.oilGunClearing.name, oilName : this.oilGunClearing.name,
amount : this.oilGunClearing.amount, amount : this.oilGunClearing.amount + '',
} }
] ]
let goodsOrderR = [] let goodsOrderR = []
this.goodsOrder.forEach(order=>{ if (this.goodsOrder && this.goodsOrder.length>0) {
this.goodsOrder.forEach(order => {
let o = { let o = {
oilName : order.name, oilName: order.name,
unit : order.num+order.unit, unit: order.num + order.unit,
// amount : order.memberPrice.toString() // amount : order.memberPrice.toString()
amount : order.retailPrice.toString() amount: order.retailPrice.toString()
} }
goodsOrderR.push(o) goodsOrderR.push(o)
}) })
}
// //
const payTypeMap = { const payTypeMap = {
'CASH': '现金', 'CASH': '现金',
@ -1099,7 +1101,7 @@ export default {
oilOrder:oilOrderR, oilOrder:oilOrderR,
goodsOrder:goodsOrderR, goodsOrder:goodsOrderR,
payType:payTypeText, payType:payTypeText,
unitName:this.form1.unitName, // unitName:"", //
// consumeAmount:this.consumeAmount, // consumeAmount:this.consumeAmount,
creditAmount: (this.oilAmount+(+this.goodsAmount)).toFixed(2),// creditAmount: (this.oilAmount+(+this.goodsAmount)).toFixed(2),//
@ -1108,14 +1110,15 @@ export default {
// //
consumeAmount:this.consumeAmount, consumeAmount:this.consumeAmount,
// //
consumeRefuelMoney:this.consumeRefuelMoney.toFixed(2), consumeRefuelMoney:this.consumeRefuelMoney ? this.consumeRefuelMoney.toFixed(2) : 0,
// //
actualPay : ((+this.oilActualPay)+(+this.goodsActualPay)).toFixed(2), actualPay : ((+this.oilActualPay)+(+this.goodsActualPay)).toFixed(2),
// //
seekZero:this.seekZero.toFixed(2), seekZero:this.seekZero ? this.seekZero.toFixed(2) : 0,
} }
if (this.form1 && this.form1.unitName) f.unitName = this.form1.unitName
printOilOrderReport(f).then(res=>{ printOilOrderReport(f).then(res=>{
console.log(res,1121)
}) })
}, },
// //
@ -1329,7 +1332,7 @@ export default {
_this.isPaySuccess = true; _this.isPaySuccess = true;
isPaySuccess = true isPaySuccess = true
_this.isPay = true; _this.isPay = false;
_this.loading = false; _this.loading = false;
_this.oilOrderReport() _this.oilOrderReport()
_this.resetting1() _this.resetting1()
@ -1340,7 +1343,7 @@ export default {
if (response.data.goodsOrder.status == "paid") { if (response.data.goodsOrder.status == "paid") {
_this.isPaySuccess = true; _this.isPaySuccess = true;
isPaySuccess = true isPaySuccess = true
_this.isPay = true; _this.isPay = false;
_this.loading = false; _this.loading = false;
_this.oilOrderReport() _this.oilOrderReport()
_this.resetting1() _this.resetting1()
@ -1354,7 +1357,7 @@ export default {
this.dialogVisiblej = false; this.dialogVisiblej = false;
return; return;
} }
if (response.data.error == "请先配置支付通道") { if (response.data.error && response.data.error != 1) {
this.$modal.msgError(response.data.error) this.$modal.msgError(response.data.error)
this.loading = false; this.loading = false;
// this.dialogVisiblej = false; // this.dialogVisiblej = false;