From b8ee668eaace5d422ebb27a200c3b178b82e2a6d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 23 八月 2022 22:55:03 +0800
Subject: [PATCH] 1.提交

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

diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 2a298e2..5cbf831 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -2,7 +2,7 @@
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
 
-      <div class="bodyTopButtonGroup">
+      <div class="bodyTopButtonGroup" style="justify-content: space-between">
         <el-button
           icon="el-icon-refresh-right"
           @click="syncERP"
@@ -154,10 +154,10 @@
           >
             <template slot-scope="{row}">
               <el-radio
-                v-model="radioSelected"
-                :label="row.wo"
-                style="color: #fff;padding-left: 10px; margin-right: -25px;"
-                @change.native="getCurrentRow(row.wo)"
+                v-model="radioSelectedId"
+                :label="row.id"
+                style="color: transparent;padding-left: 15px; margin-right: -25px;"
+                @change.native="getCurrentRow(row.id)"
               />
             </template>
           </el-table-column>
@@ -203,7 +203,12 @@
             label="浜у搧瑙勬牸"
             sortable="custom"
             min-width="110"
-          />
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.partspec">{{ row.partspec }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="qty"
             label="璁㈠崟鏁伴噺"
@@ -221,7 +226,12 @@
             label="鐢熶骇杞﹂棿"
             sortable="custom"
             width="150"
-          />
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="planstartdate"
             label="棰勮寮�宸ユ椂闂�"
@@ -239,7 +249,12 @@
             label="鍒涘缓浜哄憳"
             sortable="custom"
             width="150"
-          />
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.createuser">{{ row.createuser }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="createdate"
             label="鍒涘缓鏃堕棿"
@@ -418,9 +433,11 @@
       ],
       total: 10,
       radioSelected: '',
+      radioSelectedId: '',
       tableData: [],
       dialogVisible: false,
       dialogForm: {
+        erporderid: '',
         partname: '', // 浜у搧鍚嶇О
         partspec: '', // 浜у搧瑙勬牸
         // paystartdate: '', // 棰勮寮�宸ユ椂闂�
@@ -563,16 +580,18 @@
       this.getErpOrderSearch()
     },
     // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
-    getCurrentRow(wo) {
-      this.radioSelected = wo
+    getCurrentRow(id) {
+      // console.log(row, 2)
+      // this.radioSelected = row.wo
+      this.radioSelectedId = id
     },
     // 璁㈠崟鍏抽棴
     async orderClose() {
-      if (this.radioSelected.length < 1) {
+      if (this.radioSelectedId.length < 1) {
         return this.$message.info('璇峰厛閫夋嫨璁㈠崟锛�')
       }
       this.tableData.forEach(item => {
-        if (item.wo === this.radioSelected) {
+        if (item.id === this.radioSelectedId) {
           if (item.status !== 'NEW') {
             return this.$message.info('姝よ鍗曢潪鏂拌鍗曪紝鏃犳硶鍏抽棴锛�')
           } else {
@@ -581,7 +600,7 @@
               cancelButtonText: '鍙栨秷',
               type: 'warning'
             }).then(() => {
-              ClosedErpOrder({ erpordercode: this.radioSelected }).then(res => {
+              ClosedErpOrder({ erpordercode: item.wo, erporderid: this.radioSelectedId }).then(res => {
                 if (res.code === '200') {
                   this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
                   this.getErpOrderSearch()
@@ -606,6 +625,7 @@
       this.dialogVisible = true
 
       this.$nextTick(() => {
+        this.dialogForm.erporderid = row.id
         this.dialogForm.erporderstus = row.status
         this.dialogForm.erpordercode = row.wo
         this.dialogForm.partcode = row.partcode
@@ -656,6 +676,7 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
+            'erporderid': this.dialogForm.erporderid,
             // 'erporderstus': this.dialogForm.erporderstus,
             'erpordercode': this.dialogForm.erpordercode,
             'partcode': this.dialogForm.partcode,

--
Gitblit v1.9.3