From d5043ad197423641b066b13fa1eed2189b103f52 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 22 三月 2024 17:34:22 +0800
Subject: [PATCH] 模具台账更改,未完成

---
 src/views/equipment/mould/index.vue |  135 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 122 insertions(+), 13 deletions(-)

diff --git a/src/views/equipment/mould/index.vue b/src/views/equipment/mould/index.vue
index c9f1616..7e5b89c 100644
--- a/src/views/equipment/mould/index.vue
+++ b/src/views/equipment/mould/index.vue
@@ -2,7 +2,9 @@
   <div class="mod-config">
       <basic-container>
         <ttable
+        @handleSelectionChange="handleSelectionChange"
         :table="table"
+        :uploadInfo="uploadInfo"
         :ajaxFun="ajaxFun"
         :prelang="prelang"
         :options="options"
@@ -23,6 +25,9 @@
                 <el-form-item prop="name" label="妯″叿鍚嶇О">
                     <el-input v-model="editRow.name" placeholder="璇疯緭鍏ユā鍏峰悕绉�"></el-input>
                 </el-form-item>
+                <el-form-item prop="drawingNo" label="妯″叿鍥惧彿">
+                    <el-input v-model="editRow.drawingNo" placeholder="璇疯緭鍏ユā鍏峰浘鍙�"></el-input>
+                </el-form-item>
             </el-form>
         <span slot="footer" class="dialog-footer">
             <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
@@ -40,6 +45,7 @@
 export default {
   data(){
       return {
+          diaPrintTab: false,
           editRules: {
             code: [{required:true,message:'璇疯緭鍏ユā鍏风紪鍙�',trigger:'blur'}],
             name: [{required:true,message:'璇疯緭鍏ユā鍏峰悕绉�',trigger:'blur'}]
@@ -48,9 +54,17 @@
             code: null,
             name: null,
           },
+          uploadInfo: {
+            // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
+            isShow: true,
+            url: '/mes/mould/upload',
+            download: true,
+            fileName: '妯″叿缁熻琛�'
+          },
           dialogVisible: false,
           ajaxFun: fetchList,
           prelang: 'moudle',
+          multipleSelection: [],
           dataListLoading: false,
           options: {
               height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾
@@ -92,8 +106,8 @@
                 },
                 {
                   minWidth: '140px',
-                  prop: 'createUser',
-                  label: '璐d换浜�',
+                  prop: 'drawingNo',
+                  label: '妯″叿鍥惧彿',
                   isTrue: true,
                   isSearch: true,
                   searchInfoType: 'text',
@@ -106,6 +120,92 @@
                   isSearch: true,
                   searchInfoType: 'text',
                 },
+                {
+                  minWidth: '140px',
+                  prop: 'model',
+                  label: '妯″叿鍨嬪彿',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'workShop',
+                  label: '杞﹂棿',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'select',
+                  formatter: this.workShopFormatter,
+                  optList: () => {
+                    return this.workshopList
+                  }
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'shelfNo',
+                  label: '璐ф灦鍙�',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'erpOrder',
+                  label: 'ERP璁㈠崟鍙�',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'texture',
+                  label: '鏉愯川',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'supplier',
+                  label: '渚涘簲鍟�',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'userTime',
+                  label: '鎶曞叆浣跨敤鏃ユ湡',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'date',
+                  formatter: this.formatDateTime
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'serviceLife',
+                  label: '浣跨敤瀵垮懡',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text'
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'number',
+                  label: '宸蹭娇鐢ㄦ鏁�',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                {
+                  minWidth: '140px',
+                  prop: 'person',
+                  label: '璐d换浜�',
+                  isTrue: true,
+                  isSearch: true,
+                  searchInfoType: 'text',
+                },
+                
                 {
                   minWidth: '140px',
                   prop: 'createTime',
@@ -125,6 +225,7 @@
                 minWidth: 100
               },
           },
+        workshopList: []
      }
   },
   computed: {
@@ -132,7 +233,6 @@
   },
   components: {
     ttable,
-    TableForm
   },
   watch: {
     dialogVisible(newVal){
@@ -152,13 +252,6 @@
             fun: this.addOrUpdateHandle
         })
     }
-    if(this.permissions.equipment_mould_lableprint){
-        this.table.toolbar.push({
-            text: '鏍囩鎵撳嵃',
-            type: 'primary',
-            fun: this.lableprint
-        })
-    }
     if(this.permissions.equipment_mould_del){
         this.table.operator = [{
             text: '鍒犻櫎',
@@ -166,11 +259,22 @@
             fun: this.deleteHandle
         }]
     }
+    this.table.operator = arr.length>0 ? arr : null
+    remote('work_shop').then((response) => {
+      if (response.data.code === 0) {
+        this.workshopList = response.data.data
+      } else {
+        this.workshopList = []
+      }
+    })
   },
   mounted(){
 
   },
   methods: {
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
     deleteHandle(row){
         this.$confirm('鏄惁纭鍒犻櫎妯″叿鍚嶇О涓�' + row.name, '鎻愮ず', {
           confirmButtonText: '纭畾',
@@ -184,9 +288,6 @@
             this.$message.success('鍒犻櫎鎴愬姛')
             this.getData()
           })
-    },
-    lableprint(){
-
     },
     confirmSaveOrUpdateMould(){
         this.$refs.editForm.validate(valid=>{
@@ -214,6 +315,14 @@
             }
         })
     },
+    workShopFormatter(row, column, cellValue) {
+      this.workshopList.forEach((obj) => {
+        if (obj.value == cellValue) {
+          cellValue = obj.label
+        }
+      })
+      return cellValue
+    },
     addOrUpdateHandle(row){
         if(row){
             this.editRow = row

--
Gitblit v1.9.3