From e6ae5aadd37952c9cf86d562322001394057050f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 04 十一月 2022 09:18:28 +0800
Subject: [PATCH] 1.设备清单导入、物料清单导入前端对接

---
 src/views/sbgl/sbqd.vue |   90 ++++++++++++++++++++++++++++++++++-----------
 1 files changed, 68 insertions(+), 22 deletions(-)

diff --git a/src/views/sbgl/sbqd.vue b/src/views/sbgl/sbqd.vue
index 6c58af2..bd668e7 100644
--- a/src/views/sbgl/sbqd.vue
+++ b/src/views/sbgl/sbqd.vue
@@ -7,6 +7,8 @@
         <div style="display: flex">
           <el-button icon="el-icon-c-scale-to-original" @click="deviceTypeButton">璁惧绫诲瀷</el-button>
           <el-button icon="el-icon-document-copy" @click="deviceGroupButton">璁惧缁�</el-button>
+          <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+
         </div>
 
         <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
@@ -176,8 +178,14 @@
             width="120"
           >
             <template slot-scope="{row}">
-              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />鏄�</div>
-              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />鍚�</div>
+              <div v-if="row.enable==='Y'">
+                <svg-icon icon-class="circleYes" style="margin-right: 2px" />
+                鏄�
+              </div>
+              <div v-if="row.enable==='N'">
+                <svg-icon icon-class="circleNo" style="margin-right: 2px" />
+                鍚�
+              </div>
             </template>
           </el-table-column>
           <el-table-column
@@ -421,7 +429,12 @@
           sortable="custom"
         >
           <template slot-scope="{row}">
-            <el-input v-if="row.isVisible===1" v-model="row.code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="璇疯緭鍏�" />
+            <el-input
+              v-if="row.isVisible===1"
+              v-model="row.code"
+              oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')"
+              placeholder="璇疯緭鍏�"
+            />
             <div v-else> {{ row.code }}</div>
           </template>
         </el-table-column>
@@ -511,7 +524,12 @@
           sortable="custom"
         >
           <template slot-scope="{row}">
-            <el-input v-if="row.isVisible===1"v-model="row.code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="璇疯緭鍏�" />
+            <el-input
+              v-if="row.isVisible===1"
+              v-model="row.code"
+              oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')"
+              placeholder="璇疯緭鍏�"
+            />
             <div v-else> {{ row.code }}</div>
           </template>
         </el-table-column>
@@ -588,6 +606,14 @@
     </el-dialog>
 
     <!--瀵煎叆-->
+    <import-picker
+      ref="importPickerFunc"
+      class="importPickerClass"
+      :shows.sync="shows"
+      :title="title_value"
+      :colos="colos"
+      :code="code"
+    />
 
   </div>
 </template>
@@ -605,11 +631,12 @@
   WorkShopSelect, WorkShopSelectLine
 } from '@/api/sbgl'
 import { handleDatetime, validateCode } from '@/utils/global'
+import ImportPicker from '@/components/ImportPicker'
 
 export default {
   name: 'SBQD',
   components: {
-    Pagination
+    Pagination, ImportPicker
   },
   data() {
     return {
@@ -697,7 +724,18 @@
         prop: 'code',
         order: 'desc'
       },
-      DeviceGroupTotal: 0
+      DeviceGroupTotal: 0,
+
+      title_value: '鏁版嵁瀵煎叆 / 璁惧娓呭崟',
+      code: '9',
+      shows: false
+    }
+  },
+  watch: {
+    shows() {
+      if (!this.shows) {
+        this.getDeviceMangerSearch()
+      }
     }
   },
   created() {
@@ -708,6 +746,14 @@
     this.getHeight()
   },
   methods: {
+    // 璁惧娓呭崟瀵煎叆
+    upload() {
+      this.shows = true
+      this.$refs.importPickerFunc.newDataFunc()
+    },
+    colos() {
+      this.shows = false
+    },
     handleRequest() {
       // 鑾峰彇璁惧娓呭崟鍒楄〃
       this.getDeviceMangerSearch().then(res => {
@@ -760,11 +806,6 @@
     search() {
       this.getDeviceMangerSearch()
     },
-    // 瀵煎叆
-    upload() {
-
-    },
-
     // 閲嶇疆
     reset() {
       this.form.DeviceCode = ''
@@ -1125,15 +1166,17 @@
 <!--鍏叡椤甸潰鏍峰紡-->
 <style lang="scss" scoped>
 $main_color: #42b983;
-::v-deep .el-button--text{
-  font-size: 14px ;
-  cursor: pointer ;
+::v-deep .el-button--text {
+  font-size: 14px;
+  cursor: pointer;
 }
-.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
+
+.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
   color: $main_color;
   cursor: pointer;
 }
-.el-icon-edit-outline{
+
+.el-icon-edit-outline {
   margin-right: 15px;
 }
 
@@ -1194,8 +1237,8 @@
   background-color: #f8f8fa;
 }
 
-::v-deep .el-table__body .el-table__row.hover-row td{
-  background-color: #eaecef ;
+::v-deep .el-table__body .el-table__row.hover-row td {
+  background-color: #eaecef;
 }
 
 ::v-deep .el-form--inline .el-form-item__label {
@@ -1211,20 +1254,23 @@
 .body ::v-deep .el-form-item {
   margin-bottom: 0;
 }
+
 .userDialogVisible ::v-deep .el-form-item {
   margin-bottom: 0;
 }
-::v-deep .el-select__caret{
+
+::v-deep .el-select__caret {
   display: flex;
   justify-content: center;
   align-items: center;
 }
 
-.tableFixed{
-  ::v-deep .el-table__fixed-right{
+.tableFixed {
+  ::v-deep .el-table__fixed-right {
     height: 100% !important;
   }
-  ::v-deep .el-table__fixed{
+
+  ::v-deep .el-table__fixed {
     height: 100% !important;
   }
 }

--
Gitblit v1.9.3