From 45acf15aa5844863a7e3be51aa2a5262741ca26d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 13 九月 2022 13:11:22 +0800
Subject: [PATCH] 1.项目优化

---
 src/views/sbgl/djjl.vue  |   33 ++++++++++++++--
 src/views/scgl/gd.vue    |   10 +++--
 src/views/scgl/sckbg.vue |   34 ++++++++--------
 src/api/sbgl.js          |   27 +++++++++++++
 src/utils/myEcharts.js   |    4 +-
 5 files changed, 81 insertions(+), 27 deletions(-)

diff --git a/src/api/sbgl.js b/src/api/sbgl.js
index 91b5950..87a541a 100644
--- a/src/api/sbgl.js
+++ b/src/api/sbgl.js
@@ -288,3 +288,30 @@
     params: data
   })
 }
+
+// 璁惧淇濆吇璁板綍鏌ヨ
+export function DeviceRepairTakeSearch(data) {
+  return request({
+    url: 'DeviceManager/DeviceRepairTakeSearch',
+    method: 'get',
+    params: data
+  })
+}
+
+// 璁惧淇濆吇璁板綍鏄庣粏鏌ヨ
+export function DeviceRepairSubTakeSearch(data) {
+  return request({
+    url: 'DeviceManager/DeviceRepairSubTakeSearch',
+    method: 'get',
+    params: data
+  })
+}
+
+// 璁惧淇濆吇璁板綍瀵煎嚭
+export function DeviceRepairTakeOutExcel(data) {
+  return request({
+    url: 'DeviceManager/DeviceRepairTakeOutExcel',
+    method: 'get',
+    params: data
+  })
+}
diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index e36dadd..ae8e82d 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -355,9 +355,9 @@
   // const titlename = ['澶栬鍒掍激', '琛ㄩ潰娌规薄', '灏哄', '棰滆壊', '澶у皬']
   // const data = val.map(i => i.cont)
   // const titlename = val.map(i => i.name)
-  const data = dataArr
+  const data = dataArr.filter((item, index) => index < 5)
 
-  const titlename = titlenameArr
+  const titlename = titlenameArr.filter((item, index) => index < 5)
 
   const length = titlename.length
   if (titlename.length < 5) {
diff --git a/src/views/sbgl/djjl.vue b/src/views/sbgl/djjl.vue
index bdba672..fe0976f 100644
--- a/src/views/sbgl/djjl.vue
+++ b/src/views/sbgl/djjl.vue
@@ -20,9 +20,9 @@
               <el-select v-model="form.wkshopcode" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in wkshopSelectArr"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
+                  :key="item.org_code"
+                  :label="item.org_name"
+                  :value="item.org_code"
                 />
               </el-select>
             </el-form-item>
@@ -41,6 +41,16 @@
             <el-form-item v-show="isExpandForm" label="鐐规鏃堕棿" style=" display: flex;">
               <el-input v-model="form.checkdate" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
+            <!--            <el-form-item v-show="isExpandForm" label="鐐规缁撴灉" style=" display: flex;">-->
+            <!--              <el-select v-model="form.isOK" style="width: 200px" placeholder="璇烽�夋嫨">-->
+            <!--                <el-option-->
+            <!--                  v-for="item in wkshopSelectArr"-->
+            <!--                  :key="item.code"-->
+            <!--                  :label="item.name"-->
+            <!--                  :value="item.code"-->
+            <!--                />-->
+            <!--              </el-select>-->
+            <!--            </el-form-item>-->
           </div>
           <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
             <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
@@ -243,6 +253,7 @@
 import ImportPicker from '@/components/ImportPicker'
 import { validateCode } from '@/utils/global'
 import { DeviceCheckSubTakeSearch, DeviceCheckTakeOutExcel, DeviceCheckTakeSearch } from '@/api/sbgl'
+import { ShopSearch } from '@/api/dzkb'
 
 export default {
   name: 'Zzjg',
@@ -295,13 +306,20 @@
     }
   },
   created() {
-    this.getDeviceCheckTakeSearch()
+    this.handleRequest()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    handleRequest() {
+      this.getDeviceCheckTakeSearch().then(res => {
+        if (res.code === '200') {
+          this.getShopSearch()
+        }
+      })
+    },
     async getDeviceCheckTakeSearch() {
       const res = await DeviceCheckTakeSearch(this.form)
       // this.tableData = res.data
@@ -309,6 +327,13 @@
         { RowNum: 1, djjg: 'N' }
       ]
       this.total = res.count
+
+      return { code: res.code }
+    },
+    // 鑾峰彇鎵ц杞﹂棿涓嬫媺鏁扮粍
+    async getShopSearch() {
+      const { data: res } = await ShopSearch()
+      this.wkshopSelectArr = res
     },
     // 鎺掑簭鏀瑰彉鏃�
     sortChange({ column, prop, order }) {
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index b1b5a48..3d00d04 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -370,6 +370,7 @@
           <el-table-column
             prop="wo_code"
             label="宸ュ崟缂栧彿"
+            width="160"
           />
 
           <el-table-column
@@ -383,11 +384,11 @@
 
           <el-table-column
             label="宸ュ簭缂栫爜"
-            prop="partcode"
+            prop="stepcode"
           />
           <el-table-column
             label="宸ュ簭鍚嶇О"
-            prop="partname"
+            prop="stepname"
           />
           <el-table-column
             label="浠诲姟鏁伴噺"
@@ -404,6 +405,7 @@
           <el-table-column
             label="鎿嶄綔"
             width="120"
+            fixed="right"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
@@ -1216,7 +1218,7 @@
       @close="dialogVisible2Close"
     >
       <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
-      <div id="printMe2" style="padding: 30px;">
+      <div id="printMe2" style="padding: 0px;">
         <div
           style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;"
         >
@@ -1277,7 +1279,7 @@
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button @click="dialogVisible2 = false">鍙� 娑�</el-button>
-          <el-button v-print="printObj2" type="primary">纭� 瀹�</el-button>
+          <el-button v-print="printObj2" type="primary">鎵� 鍗�</el-button>
         </div>
       </span>
     </el-dialog>
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index abe93aa..4fc50bb 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -824,20 +824,20 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏀舵枡浜猴細">
-          <el-select
-            v-model="dialogForm.operation"
-            style="width: 200px;"
-            placeholder="璇烽�夋嫨"
-          >
-            <el-option
-              v-for="item in OperationArr"
-              :key="item.usercode"
-              :label="item.username"
-              :value="item.usercode"
-            />
-          </el-select>
-        </el-form-item>
+        <!--        <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏀舵枡浜猴細">-->
+        <!--          <el-select-->
+        <!--            v-model="dialogForm.operation"-->
+        <!--            style="width: 200px;"-->
+        <!--            placeholder="璇烽�夋嫨"-->
+        <!--          >-->
+        <!--            <el-option-->
+        <!--              v-for="item in OperationArr"-->
+        <!--              :key="item.usercode"-->
+        <!--              :label="item.username"-->
+        <!--              :value="item.usercode"-->
+        <!--            />-->
+        <!--          </el-select>-->
+        <!--        </el-form-item>-->
         <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="澶囨敞锛�">
           <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
         </el-form-item>
@@ -1196,7 +1196,7 @@
         taskqty: '', // 浠诲姟鏁伴噺
         fqty: '', // 鍙戞枡鏁伴噺
 
-        inuser: '', // 鏀舵枡浜哄憳
+        inuser: getCookie('navTabId'), // 鏀舵枡浜哄憳
         sqty: '', // 鏀舵枡鏁伴噺
         ngqty: '', // 涓嶈壇鏁伴噺
         badcode: '', // 涓嶈壇鍘熷洜缂栫爜
@@ -1806,7 +1806,7 @@
       this.dialogForm.taskqty = '', // 浠诲姟鏁伴噺
       this.dialogForm.fqty = '', // 鍙戞枡鏁伴噺
 
-      this.dialogForm.inuser = '', // 鏀舵枡浜哄憳
+      this.dialogForm.inuser = getCookie('navTabId'), // 鏀舵枡浜哄憳  榛樿鐧诲綍浜哄憳
       this.dialogForm.sqty = '', // 鏀舵枡鏁伴噺
       this.dialogForm.ngqty = '', // 涓嶈壇鏁伴噺
       this.dialogForm.badcode = '', // 涓嶈壇鍘熷洜缂栫爜
@@ -1891,7 +1891,7 @@
                 this.$message.success('鏀舵枡鎴愬姛锛�')
 
                 if (this.dialogForm.nextstepcode === '') {
-                  this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
+                  this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
                   this.dialogVisible2 = true
                 }
                 this.dialogVisible = false

--
Gitblit v1.9.3