From 1240318c14c896cf5a779780b18b292784d54dd9 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期六, 22 六月 2024 10:26:52 +0800
Subject: [PATCH] 1.滚动条粗细修改2.下单单数禁用

---
 src/views/workOrder/produceOrderList.vue |  160 +++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 124 insertions(+), 36 deletions(-)

diff --git a/src/views/workOrder/produceOrderList.vue b/src/views/workOrder/produceOrderList.vue
index d0340cd..a210681 100644
--- a/src/views/workOrder/produceOrderList.vue
+++ b/src/views/workOrder/produceOrderList.vue
@@ -9,15 +9,15 @@
           @click="syncERP"
         >鍚屾ERP
         </el-button>
-        <div style="display: flex">
-          <el-button
-            v-waves
-            type="primary"
-            icon="el-icon-bottom"
-            @click="batchHandle"
-          >鎵归噺涓嬭揪
-          </el-button>
-        </div>
+        <!--        <div style="display: flex">-->
+        <!--          <el-button-->
+        <!--            v-waves-->
+        <!--            type="primary"-->
+        <!--            icon="el-icon-bottom"-->
+        <!--            @click="batchHandle"-->
+        <!--          >鎵归噺涓嬭揪-->
+        <!--          </el-button>-->
+        <!--        </div>-->
 
       </div>
 
@@ -164,11 +164,11 @@
           @selection-change="handleSelectionChange"
         >
           <!--          @row-click="rowClick"-->
-          <el-table-column
-            type="selection"
-            width="50"
-            :selectable="selected"
-          />
+          <!--          <el-table-column-->
+          <!--            type="selection"-->
+          <!--            width="50"-->
+          <!--            :selectable="selected"-->
+          <!--          />-->
           <!--          <el-table-column-->
           <!--            width="50"-->
           <!--            fixed-->
@@ -184,7 +184,7 @@
           <!--          </el-table-column>-->
           <el-table-column
             prop="rowNum"
-            width="50"
+            width="80"
             fixed
             label="搴忓彿"
           />
@@ -212,7 +212,7 @@
           <el-table-column
             show-tooltip-when-overflow
             prop="saleOrderCode"
-            label="閿�鍞鍗�"
+            label="閿�鍞鍗�/棰勬祴鍗�"
             sortable="custom"
             width="150"
           >
@@ -244,6 +244,30 @@
           >
             <template slot-scope="{row}">
               <div v-if="row.partspec">{{ row.partspec }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="TopInventoryCode"
+            label="椤剁骇鐗╂枡缂栫爜"
+            sortable="custom"
+            show-tooltip-when-overflow
+            min-width="130"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.TopInventoryCode">{{ row.TopInventoryCode }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="TopInventoryName"
+            label="椤剁骇鐗╂枡鍚嶇О"
+            sortable="custom"
+            show-tooltip-when-overflow
+            min-width="130"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.TopInventoryName">{{ row.TopInventoryName }}</div>
               <div v-else>/</div>
             </template>
           </el-table-column>
@@ -340,7 +364,7 @@
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">
+                <el-tooltip class="item" effect="dark" content="璁㈠崟涓嬭揪" placement="top">
                   <!--                <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>-->
                   <i
                     class="el-icon-bottom"
@@ -351,10 +375,21 @@
                 </el-tooltip>
                 <el-tooltip v-del-tab-index class="item" effect="dark" content="璁㈠崟鍏抽棴" placement="top">
                   <i
+                    v-if="row.status!=='CLOSED'"
                     class="el-icon-switch-button"
-                    :style="{color:$store.state.settings.theme}"
+                    :style="{color:'red'}"
                     style="cursor: pointer;margin-left: 15px"
                     @click="orderClose(row.id)"
+                  />
+                </el-tooltip>
+
+                <el-tooltip v-del-tab-index class="item" effect="dark" content="璁㈠崟鍚姩" placement="top">
+                  <i
+                    v-if="row.status==='CLOSED'"
+                    class="el-icon-thumb"
+                    :style="{color:$store.state.settings.theme}"
+                    style="cursor: pointer;margin-left: 15px"
+                    @click="orderOpen(row.id)"
                   />
                 </el-tooltip>
 
@@ -407,6 +442,15 @@
         <el-form-item label="浜у搧瑙勬牸" prop="partspec">
           <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
         </el-form-item>
+
+        <el-form-item label="椤剁骇鐗╂枡缂栫爜" prop="TopInventoryCode">
+          <el-input v-model="dialogForm.TopInventoryCode" disabled style="width: 200px" />
+        </el-form-item>
+
+        <el-form-item label="椤剁骇鐗╂枡鍚嶇О" prop="TopInventoryName">
+          <el-input v-model="dialogForm.TopInventoryName" disabled style="width: 200px" />
+        </el-form-item>
+
         <el-form-item label="鐢熶骇杞﹂棿" prop="wkshopname">
           <el-input v-model="dialogForm.wkshopname" disabled style="width: 200px" />
         </el-form-item>
@@ -436,6 +480,7 @@
             v-model="dialogForm.ordernum"
             oninput="value=value.replace(/[^0-9.]/g,'')"
             style="width: 200px"
+            disabled
           />
         </el-form-item>
         <el-form-item label="棰勮浜や粯鏃ユ湡" prop="saleOrderDeliveryDate">
@@ -479,7 +524,7 @@
   DeleteErpOrder,
   ErpOrderSearch,
   MarkBatchSaveErpOrder,
-  MarkSaveErpOrder
+  MarkSaveErpOrder, ReverseClosedErpOrder
 } from '@/api/WorkOrder'
 import { SeaveSearchErpOrder } from '@/api/ErpSyncMes'
 import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
@@ -557,6 +602,10 @@
         markqty: '', // 涓嬪崟鏁伴噺
         ordernum: '', // 涓嬪崟鍗曟暟
         relse_qty: '', // 宸蹭笅鍗曟暟閲�
+
+        idTopInventory: '', // 椤剁骇鐗╂枡id
+        TopInventoryCode: '', // 椤剁骇鐗╂枡缂栫爜
+        TopInventoryName: '', // 椤剁骇鐗╂枡鍚嶇О
 
         saleOrderDeliveryDate: '' // 棰勮浜や粯鏃ユ湡
       },
@@ -700,6 +749,7 @@
       this.form.partname = ''
       this.form.partspec = ''
       this.form.paystartdate = ''
+      this.form.saleordercode = ''
       this.form.payenddate = ''
       this.form.creatuser = ''
       this.form.erpordercode = ''
@@ -743,24 +793,50 @@
     async orderClose(id) {
       this.tableData.forEach(item => {
         if (item.id === id) {
-          if (item.status !== 'NEW') {
-            return this.$message.info('姝よ鍗曢潪鏂拌鍗曪紝鏃犳硶鍏抽棴锛�')
-          } else {
-            this.$confirm('鏄惁纭鍏抽棴璁㈠崟?', '鎻愮ず', {
-              confirmButtonText: '纭畾',
-              cancelButtonText: '鍙栨秷',
-              type: 'warning'
-            }).then(() => {
-              ClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
-                if (res.code === '200') {
-                  this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
-                  this.getErpOrderSearch()
-                }
-              })
-            }).catch(() => {
-              this.$message.info('宸插彇娑堝叧闂紒')
+          // if (item.status !== 'NEW') {
+          //   return this.$message.info('姝よ鍗曢潪鏂拌鍗曪紝鏃犳硶鍏抽棴锛�')
+          // } else {
+          this.$confirm('鏄惁纭鍏抽棴璁㈠崟锛岃璁㈠崟涓嬬殑鎵�鏈夊伐鍗曞皢浼氬叧闂紒', '鎻愮ず', {
+            confirmButtonText: '纭畾',
+            cancelButtonText: '鍙栨秷',
+            type: 'warning'
+          }).then(() => {
+            ClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
+              if (res.code === '200') {
+                this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
+                this.getErpOrderSearch()
+              }
             })
-          }
+          }).catch(() => {
+            this.$message.info('宸插彇娑堝叧闂紒')
+          })
+          // }
+        }
+      })
+    },
+
+    // 璁㈠崟寮�鍚�
+    async orderOpen(id) {
+      this.tableData.forEach(item => {
+        if (item.id === id) {
+          // if (item.status !== 'NEW') {
+          //   return this.$message.info('姝よ鍗曢潪鏂拌鍗曪紝鏃犳硶鍏抽棴锛�')
+          // } else {
+          this.$confirm('鏄惁纭鍚姩璁㈠崟锛岃璁㈠崟涓嬬殑鎵�鏈夊伐鍗曞皢浼氬紑鍚紒', '鎻愮ず', {
+            confirmButtonText: '纭畾',
+            cancelButtonText: '鍙栨秷',
+            type: 'warning'
+          }).then(() => {
+            ReverseClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => {
+              if (res.code === '200') {
+                this.$message.success('璁㈠崟鍚姩鎴愬姛!')
+                this.getErpOrderSearch()
+              }
+            })
+          }).catch(() => {
+            this.$message.info('宸插彇娑堝叧闂紒')
+          })
+          // }
         }
       })
     },
@@ -848,6 +924,10 @@
         this.dialogForm.markqty = parseFloat(row.qty) - parseFloat(row.relse_qty)
         this.dialogForm.ordernum = 1
         this.dialogForm.relse_qty = row.relse_qty
+
+        this.dialogForm.idTopInventory = row.idTopInventory
+        this.dialogForm.TopInventoryCode = row.TopInventoryCode
+        this.dialogForm.TopInventoryName = row.TopInventoryName
       })
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
@@ -872,6 +952,10 @@
         markqty: '', // 涓嬪崟鏁伴噺
         ordernum: '', // 涓嬪崟鍗曟暟
         relse_qty: '', // 宸蹭笅鍗曟暟閲�
+
+        idTopInventory: '', // 椤剁骇鐗╂枡id
+        TopInventoryCode: '', // 椤剁骇鐗╂枡缂栫爜
+        TopInventoryName: '', // 椤剁骇鐗╂枡鍚嶇О
 
         saleOrderDeliveryDate: '' // 棰勮浜や粯鏃ユ湡
       }
@@ -907,6 +991,10 @@
             'wkshopcode': this.dialogForm.wkshopcode,
             'warehousecode': this.dialogForm.warehousecode,
 
+            'idTopInventory': this.dialogForm.idTopInventory,
+            'TopInventoryCode': this.dialogForm.TopInventoryCode,
+            'TopInventoryName': this.dialogForm.TopInventoryName,
+
             'erpqty': this.dialogForm.erpqty,
             'markqty': this.dialogForm.markqty,
             'ordernum': this.dialogForm.ordernum,

--
Gitblit v1.9.3