From 392f9468875a8721c17c4e15c288333017cac4a1 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 16 七月 2022 15:11:44 +0800
Subject: [PATCH] 1.修改bug2.工序检验实现部分3.缺陷定义实现部分

---
 src/views/scgl/scdd.vue |   87 +++++++++++++++++++++++++++++--------------
 1 files changed, 58 insertions(+), 29 deletions(-)

diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 1d7193e..a7bbee7 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -13,6 +13,7 @@
             <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
               <el-select
                 v-model="form.erporderstus"
+                filterable
                 :popper-append-to-body="false"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
@@ -56,25 +57,26 @@
               <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
             <el-form-item label="鍒涘缓鏃堕棿" style=" display: flex;">
-              <!--              <el-date-picker-->
-              <!--                v-model="form.createdate"-->
-              <!--                type="daterange"-->
-              <!--                :clearable="false"-->
-              <!--                range-separator="~"-->
-              <!--                start-placeholder="寮�濮嬫棩鏈�"-->
-              <!--                end-placeholder="缁撴潫鏃ユ湡"-->
-              <!--                size="mini"-->
-              <!--              />-->
-              <!--              :picker-options="expireTimeOption"-->
               <el-date-picker
                 v-model="form.createdate"
-                type="date"
-                size="mini"
+                type="daterange"
                 :clearable="false"
-                style="width: 200px;"
-                format="yyyy-MM-dd"
-                placeholder="閫夋嫨鏃ユ湡"
+                range-separator="~"
+                start-placeholder="寮�濮嬫棩鏈�"
+                style="width: 240px"
+                end-placeholder="缁撴潫鏃ユ湡"
+                size="mini"
               />
+              <!--              :picker-options="expireTimeOption"-->
+              <!--              <el-date-picker-->
+              <!--                v-model="form.createdate"-->
+              <!--                type="date"-->
+              <!--                size="mini"-->
+              <!--                :clearable="false"-->
+              <!--                style="width: 200px;"-->
+              <!--                format="yyyy-MM-dd"-->
+              <!--                placeholder="閫夋嫨鏃ユ湡"-->
+              <!--              />-->
             </el-form-item>
           </div>
           <div style="min-height: 100px">
@@ -119,7 +121,7 @@
         <el-button
           type="primary"
           icon="el-icon-refresh-right"
-          @click="reset('update')"
+          @click="syncERP"
         >鍚屾ERP
         </el-button>
         <el-button
@@ -128,14 +130,12 @@
           @click="orderClose"
         >鍏抽棴璁㈠崟
         </el-button>
-        <!--        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
-        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
       </div>
       <el-divider />
       <div class="elTableDiv">
         <el-table
           :data="tableData"
-          :height="tableHeight"
+          :height="tableHeight+'px'"
           border
           stripe
           :style="{width: 100+'%',height:tableHeight+'px',}"
@@ -206,6 +206,12 @@
           <el-table-column
             prop="qty"
             label="璁㈠崟鏁伴噺"
+            width="150"
+            sortable="custom"
+          />
+          <el-table-column
+            prop="relse_qty"
+            label="宸蹭笅鍗曟暟閲�"
             width="150"
             sortable="custom"
           />
@@ -459,10 +465,10 @@
         tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
       }
 
-      // let tempDate = this.form.createdate
-      // if (tempDate.length > 0) {
-      //   tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
-      // }
+      let tempDate = this.form.createdate
+      if (tempDate.length > 0) {
+        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+      }
 
       const data = {
         erporderstus: this.form.erporderstus, // 璁㈠崟鐘舵�佺爜
@@ -472,8 +478,8 @@
         partspec: this.form.partspec, // 浜у搧瑙勬牸
         paydate: tempDate2, // 浜や粯鏃堕棿
         creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
-        createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
-        // createdate: tempDate,
+        // createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
+        createdate: tempDate,
         prop: this.form.prop, // 鎺掑簭瀛楁
         order: this.form.order, // 鎺掑簭瀛楁
         page: this.form.page, // 绗嚑椤�
@@ -498,12 +504,33 @@
       this.form.prop = prop
       this.getErpOrderSearch()
     },
+    // 鍚屾ERP
+    async  syncERP() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      setTimeout(() => {
+        loading.close()
+      }, 2000)
+
+      // const res = await xxx()
+      // if (res.code==='200'){
+      setTimeout(() => {
+        loading.close()
+        this.getErpOrderSearch()
+      }, 2000)
+      // }
+    },
     // 鏌ヨ
     search() {
       this.getErpOrderSearch()
     },
     // 閲嶇疆
-    reset(val) {
+    reset() {
       this.form.erporderstus = ''
       this.form.erpordercode = ''
       this.form.partcode = ''
@@ -513,9 +540,6 @@
       this.form.creatuser = ''
       this.form.createdate = ''
       this.getErpOrderSearch()
-      if (val.length > 0) {
-        this.$message.success('ERP宸插悓姝ワ紒')
-      }
     },
     // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
     getCurrentRow(wo) {
@@ -820,3 +844,8 @@
 }
 
 </style>
+<style>
+.osloading{
+  font-size: 40px;
+}
+</style>

--
Gitblit v1.9.3