dct vor 1 Monat
Ursprung
Commit
cc3f440b88

+ 12 - 0
src/pages/sellManage/common/confirmMixin.js

@@ -198,14 +198,21 @@ export default {
       const scanArr = ['瑞通储值卡']
       // 是否使用外部扫码
       if ((scanArr.indexOf(this.currentPayChannel) > -1 || this.payType === 'B_SCAN_C_PAY') && !qrcode) {
+        if (this.submitDisable) return
         this.setParams()
+        this.submitDisable = true
         createOrder(this.params).then(res => {
           this.$log.warn(this.pageName + '下单成功')
           this.createOrderStatus = 1
           this.orderTempInfo = res.data.order || {}
           this.payCodeDialogVisible = true
           // this.$refs.XSCQrCodeReader.show(this.tickets, this.currentPayChannel)
+          this.submitDisable = false
         })
+          .catch(e => {
+            this.submitDisable = false
+          })
+
         return
       }
 
@@ -259,6 +266,10 @@ export default {
       this.submit(this.payCode)
       // this.createOrder(this.params, true)
     },
+    cancelOnlinePay () {
+      this.payCodeDialogVisible = false
+      this.payCode = ''
+    },
     createOrder (params, isOnlinePay = false) {
       // if (this.payType === 'B_SCAN_C_PAY' && !isOnlinePay) {
       //   this.payCodeDialogVisible = true
@@ -377,6 +388,7 @@ export default {
     },
     beforeDestroy () {
       this.killAllPosProcess()
+      this.payCode = ''
     },
     handlePayCodeInput (e) {
       this.timer && clearTimeout(this.timer)

+ 1 - 1
src/pages/sellManage/retail/Confirm.vue

@@ -209,7 +209,7 @@
         v-model="payCode"
       ></el-input>
       <div class="dialog-footer" style="margin-top: 10px;">
-        <el-button @click="payCodeDialogVisible = false">取消</el-button>
+        <el-button @click="cancelOnlinePay">取消</el-button>
         <el-button type="primary" @click="submitOnlinePay">确定</el-button>
       </div>
     </el-dialog>