|
@@ -1121,15 +1121,19 @@ export default {
|
|
|
this.$msg('请输入收到的现金金额')
|
|
this.$msg('请输入收到的现金金额')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (Number(this.zl) < 0) {
|
|
|
|
|
- this.$msg('收现金不足,还差 ' + this.formatChangeAmount(-Number(this.zl)))
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
const hasCalc =
|
|
const hasCalc =
|
|
|
this.tokens.length > 0 ||
|
|
this.tokens.length > 0 ||
|
|
|
(this.calcInput != null && !this.$util.isEmpty(this.calcInput))
|
|
(this.calcInput != null && !this.$util.isEmpty(this.calcInput))
|
|
|
const cashSubmit = this.showCashPayCols ? (Number(this.cash) || 0) : 0
|
|
const cashSubmit = this.showCashPayCols ? (Number(this.cash) || 0) : 0
|
|
|
|
|
+ /** 现金不足:与结算选「扫码」一致,走后端 pending 收款并打开扫码付款页(mainPay/status) */
|
|
|
|
|
+ const cashShortToScan = this.showCashPayCols && Number(this.zl) < 0
|
|
|
|
|
+ let emitHasPay = this.selHasPay
|
|
|
|
|
+ let emitPayWay = this.selHasPay === 1 ? this.selPayWay : 0
|
|
|
|
|
+ if (cashShortToScan) {
|
|
|
|
|
+ emitHasPay = 0
|
|
|
|
|
+ emitPayWay = 0
|
|
|
|
|
+ }
|
|
|
this.pushHistorySnapshot(p, {
|
|
this.pushHistorySnapshot(p, {
|
|
|
source: 'submit',
|
|
source: 'submit',
|
|
|
orderOnly: !hasCalc,
|
|
orderOnly: !hasCalc,
|
|
@@ -1138,8 +1142,8 @@ export default {
|
|
|
price: p,
|
|
price: p,
|
|
|
name: this.name,
|
|
name: this.name,
|
|
|
cash: cashSubmit,
|
|
cash: cashSubmit,
|
|
|
- hasPay: this.selHasPay,
|
|
|
|
|
- payWay: this.selHasPay === 1 ? this.selPayWay : 0
|
|
|
|
|
|
|
+ hasPay: emitHasPay,
|
|
|
|
|
+ payWay: emitPayWay
|
|
|
})
|
|
})
|
|
|
this.price = 0
|
|
this.price = 0
|
|
|
this.checkType = 3
|
|
this.checkType = 3
|