From 99a010f21d278498bafd248217c584e101db2d8f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 01 九月 2022 17:27:17 +0800
Subject: [PATCH] 1.自动扫码回车功能接入

---
 src/views/scgl/scdd.vue |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 3d51997..f8b4fdc 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -156,7 +156,7 @@
               <el-radio
                 v-model="radioSelectedId"
                 :label="row.id"
-                style="color: transparent;padding-left: 15px; margin-right: -25px;"
+                style="color: transparent;padding-left: 10px;"
                 @change.native="getCurrentRow(row.id)"
               />
             </template>
@@ -374,22 +374,11 @@
             style="width: 200px"
           />
         </el-form-item>
-
-        <!--        <el-form-item label="浜や粯鏃堕棿" prop="">-->
-        <!--          <el-date-picker-->
-        <!--            v-model="dialogForm.markqty"-->
-        <!--            type="date"-->
-        <!--            style="width: 200px"-->
-        <!--            placeholder="閫夋嫨鏃ユ湡"-->
-        <!--          />-->
-        <!--          <el-input v-model="dialogForm.OrgName" style="width: 200px" />-->
-        <!--        </el-form-item>-->
-
       </el-form>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="dialogVisibleConfirm">涓� 杈�</el-button>
+          <el-button type="primary" :disabled="sendButtonIsDisabled" @click="dialogVisibleConfirm">涓� 杈�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -447,7 +436,6 @@
         { code: 'CLOSED', name: '宸插叧闂�' }
       ],
       total: 10,
-      radioSelected: '',
       radioSelectedId: '',
       tableData: [],
       dialogVisible: false,
@@ -596,8 +584,6 @@
     },
     // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
     getCurrentRow(id) {
-      // console.log(row, 2)
-      // this.radioSelected = row.wo
       this.radioSelectedId = id
     },
     // 璁㈠崟鍏抽棴
@@ -619,7 +605,6 @@
                 if (res.code === '200') {
                   this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
                   this.getErpOrderSearch()
-                  // this.radioSelected = ''
                 }
               })
             }).catch(() => {
@@ -673,6 +658,8 @@
       this.dialogForm.markqty = ''
       this.dialogForm.ordernum = ''
       this.dialogForm.relse_qty = ''
+
+      this.sendButtonIsDisabled = false
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -681,9 +668,15 @@
     },
     // 瀵硅瘽妗嗙‘璁�
     dialogVisibleConfirm() {
+      this.dialogForm.markqty = parseFloat(this.dialogForm.markqty)
+      this.dialogForm.erpqty = parseFloat(this.dialogForm.erpqty)
+      this.dialogForm.relse_qty = parseFloat(this.dialogForm.relse_qty)
+      this.dialogForm.ordernum = parseFloat(this.dialogForm.ordernum)
       if (this.dialogForm.markqty < 1 || this.dialogForm.markqty > this.dialogForm.erpqty - this.dialogForm.relse_qty) {
         return this.$message.info('涓嬪崟鏁伴噺瓒呭嚭鍙笅鍗曟暟鐨勮寖鍥达紒')
       }
+
+      console.log(this.dialogForm.ordernum < this.dialogForm.markqty)
       if (this.dialogForm.ordernum < 1 || this.dialogForm.ordernum > this.dialogForm.markqty) {
         return this.$message.info('涓嬪崟鍗曟暟瓒呭嚭鍙笅鍗曞崟鏁扮殑鑼冨洿锛�')
       }
@@ -702,7 +695,7 @@
             'ordernum': this.dialogForm.ordernum,
             'relse_qty': this.dialogForm.relse_qty
           }
-          console.log(data)
+          this.sendButtonIsDisabled = true
           MarkSaveErpOrder(data).then(res => {
             if (res.code === '200') {
               this.$message.success('涓嬭揪鎴愬姛锛�')
@@ -841,6 +834,11 @@
   margin-bottom: 0;
 }
 
+.elTableDiv {
+  ::v-deep .el-radio__label {
+    display: none;
+  }
+}
 </style>
 <style>
 .el-table .custom-row {

--
Gitblit v1.9.3