From b3ebb6f99f647a08cac70ebd9cf1baabdffc6852 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期三, 20 十二月 2023 14:55:56 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before

---
 vue.config.js                                                                   |    8 
 src/views/plan/customerorder/index.vue                                          |    1 
 src/views/technology/routing/routing-form.vue                                   |    5 
 src/views/technology/completeproductstructure/completeproductstructure-form.vue |    2 
 src/views/plan/manufacturingorder/productorder-form.vue                         |    2 
 src/views/technology/document/index.vue                                         |   83 +++++------
 src/views/plan/customerorder/customerorder-form.vue                             |    6 
 src/views/quality/finishedProductInspection/finishedProduct-form.vue            |    4 
 src/views/plan/operationtask/operationtask-form.vue                             |   49 ++++---
 src/views/quality/processInspect/processInspect-form.vue                        |    4 
 src/views/technology/document/document-form.vue                                 |    2 
 src/views/quality/teststandard/index.vue                                        |    2 
 src/views/technology/routing/index.vue                                          |  116 +++++----------
 src/views/technology/completeproductstructure/index.vue                         |  109 +++++---------
 14 files changed, 177 insertions(+), 216 deletions(-)

diff --git a/src/views/plan/customerorder/customerorder-form.vue b/src/views/plan/customerorder/customerorder-form.vue
index 0dc65bb..47ad1d9 100644
--- a/src/views/plan/customerorder/customerorder-form.vue
+++ b/src/views/plan/customerorder/customerorder-form.vue
@@ -187,12 +187,14 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="浜у搧鍚嶇О" prop="productName">
+                <el-tooltip class="item" effect="dark" :content="dataForm.productName" >
                 <el-input
                   v-model="dataForm.productName"
                   placeholder=""
                   disabled
                 >
                 </el-input>
+                </el-tooltip>
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -274,11 +276,13 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="浜у搧鍨嬪彿" prop="customerPartSpec">
+                <el-tooltip class="item" effect="dark" :content="dataForm.customerPartSpec" >
                 <el-input
                   v-model="dataForm.customerPartSpec"
                   placeholder=""
                   disabled
                 ></el-input>
+                </el-tooltip>
               </el-form-item>
             </el-col>
           </el-row>
@@ -325,10 +329,12 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="鏀惰揣鍦板潃" prop="shippingAddress">
+                <el-tooltip class="item" effect="dark" :content="dataForm.shippingAddress" >
                 <el-input
                   v-model="dataForm.shippingAddress"
                   placeholder=""
                 ></el-input>
+                </el-tooltip>
               </el-form-item>
             </el-col>
             <!-- <el-col :span="6">
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 159596c..061bfc5 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -414,6 +414,7 @@
             width: '100px',
             prop: 'contractNo',
             label: '鍚堝悓缂栧彿',
+            sort: true,
             isTrue: true,
             isSearch: true,
             searchInfoType: 'text',
diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index affcd01..2bf8212 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -65,6 +65,7 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="闆朵欢" prop="partId">
+                <el-tooltip class="item" effect="dark" :content="partStr" >
                 <el-input v-model="partStr" placeholder="" readonly>
                   <el-button
                     v-if="!this.dataForm.id"
@@ -73,6 +74,7 @@
                     @click="openRoutingDialog()"
                   ></el-button>
                 </el-input>
+                </el-tooltip>
               </el-form-item>
             </el-col>
           </el-row>
diff --git a/src/views/plan/operationtask/operationtask-form.vue b/src/views/plan/operationtask/operationtask-form.vue
index 02fb8dc..99e8f1b 100644
--- a/src/views/plan/operationtask/operationtask-form.vue
+++ b/src/views/plan/operationtask/operationtask-form.vue
@@ -145,7 +145,7 @@
                           </el-select>
                         </el-form-item>
                       </el-col>
-                      <el-col :span="7">
+                      <el-col :span="10">
                         <el-form-item label="宸ヤ綔涓績" prop="workCenter">
                           <el-select v-model="dataForm.workCenter" :disabled="!editable" filterable placeholder="璇烽�夋嫨宸ヤ綔涓績"
                             style="width:100%" @change="changeWorkCenter">
@@ -153,6 +153,16 @@
                               :key="index">
                             </el-option>
                           </el-select>
+                        </el-form-item>
+                      </el-col>
+                    </el-row>
+                    <el-row :gutter="10">
+                      <el-col :span="15">
+                        <el-form-item label="璁″垝鏃堕棿" prop="localDateTimes">
+                          <el-date-picker :class="tattimest ? 'sed' : ''" v-model="dataForm.localDateTimes"
+                            type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮�" end-placeholder="缁撴潫"
+                            value-format="yyyy-MM-dd HH:mm:ss" @change="selectChangedplannedDate">
+                          </el-date-picker>
                         </el-form-item>
                       </el-col>
                       <el-col :span="6">
@@ -167,39 +177,36 @@
                       </el-col>
                     </el-row>
                     <el-row :gutter="10">
-                      <el-col :span="14">
-                        <el-form-item label="璁″垝鏃堕棿" prop="localDateTimes">
-                          <el-date-picker :class="tattimest ? 'sed' : ''" v-model="dataForm.localDateTimes"
-                            type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮�" end-placeholder="缁撴潫"
-                            value-format="yyyy-MM-dd HH:mm:ss" @change="selectChangedplannedDate">
-                          </el-date-picker>
-                        </el-form-item>
-                      </el-col>
                       <el-col :span="10">
                         <el-form-item label="璁″垝鏁伴噺" prop="plannedQuantity">
                           <el-input v-model="dataForm.plannedQuantity" :disabled="!editable" placeholder="璁″垝鏁伴噺"
                             style="width:calc(100% - 30px)"></el-input>
                           <span>{{ dataForm.unit }}</span>
                         </el-form-item>
-                      </el-col></el-row>
-                    <el-row :gutter="10">
-                      <el-col :span="12">
-                        <el-form-item label="闆朵欢" prop="partName">
-                          <el-input v-model="dataForm.partName" placeholder="闆朵欢" disabled></el-input>
-                        </el-form-item>
                       </el-col>
-                      <el-col :span="6">
-                        <el-form-item label="闆朵欢鍙�" prop="partNo">
-                          <el-input v-model="dataForm.partNo" placeholder="闆朵欢鍙�" disabled></el-input>
-                        </el-form-item>
-                      </el-col>
-                      <el-col :span="6">
+                      <el-col :span="10">
                         <el-form-item label="宸ュ崟鎵�闇�鏃堕棿" prop="taskTheoreticalTime">
                           <el-input v-model="dataForm.taskTheoreticalTime" placeholder="宸ュ崟鎵�闇�鏃堕棿"
                             style="width:calc(100% - 30px)"></el-input>
                           <span>min</span>
                         </el-form-item>
                       </el-col>
+                      </el-row>
+                    <el-row :gutter="10">
+                      <el-col :span="12">
+                        <el-form-item label="闆朵欢" prop="partName">
+                          <el-tooltip class="item" effect="dark" :content="dataForm.partName" >
+                          <el-input v-model="dataForm.partName" placeholder="闆朵欢" disabled></el-input>
+                          </el-tooltip>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :span="10">
+                        <el-form-item label="闆朵欢鍙�" prop="partNo">
+                          <el-tooltip class="item" effect="dark" :content="dataForm.partNo" >
+                          <el-input v-model="dataForm.partNo" placeholder="闆朵欢鍙�" disabled></el-input>
+                          </el-tooltip>
+                        </el-form-item>
+                      </el-col>
                     </el-row>
                     <el-row :gutter="10">
                       <span style="float:right; margin-right:30px; margin-top: 55px">
diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
index a0a9cbd..dccb95c 100644
--- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue
+++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -48,12 +48,14 @@
                         </el-col>
                         <el-col :span="6">
                             <el-form-item label="浜у搧鍚嶇О锛�">
+                                <el-tooltip class="item" effect="dark" :content="processInspectVo.material">
                                 <el-select style="width: 100%" @change="changeOptionsSamplename" :disabled="processInspectVo.id != null"
                                     v-model="processInspectVo.material" size="small" placeholder="璇烽�夋嫨浜у搧鍚嶇О">
                                     <el-option v-for="(item,index) in optionsSamplename" :key="index" :label="item.material"
                                         :value="item.materialCode">
                                     </el-option>
                                 </el-select>
+                                </el-tooltip>
                             </el-form-item>
                         </el-col>
                         <el-col :span="6">
@@ -63,7 +65,9 @@
                         </el-col>
                         <el-col :span="6">
                             <el-form-item label="瑙勬牸鍨嬪彿锛�">
+                                <el-tooltip class="item" effect="dark" :content="processInspectVo.specificationsModel">
                                 <el-input disabled v-model="processInspectVo.specificationsModel" autocomplete="off" />
+                                </el-tooltip>
                             </el-form-item>
                         </el-col>
                     </el-row>
diff --git a/src/views/quality/processInspect/processInspect-form.vue b/src/views/quality/processInspect/processInspect-form.vue
index 505338e..443d28e 100644
--- a/src/views/quality/processInspect/processInspect-form.vue
+++ b/src/views/quality/processInspect/processInspect-form.vue
@@ -31,6 +31,7 @@
                             </el-col>
                             <el-col :span="6">
                                 <el-form-item label="浜у搧鍚嶇О锛�">
+                                    <el-tooltip class="item" effect="dark" :content="processInspectVo.material">
                                     <el-select style="width: 100%" @change="changeOptionsSamplename"
                                         :disabled="processInspectVo.id != null" v-model="processInspectVo.material"
                                         size="small" placeholder="璇烽�夋嫨浜у搧鍚嶇О">
@@ -38,6 +39,7 @@
                                             :label="item.material" :value="item.materialCode">
                                         </el-option>
                                     </el-select>
+                                    </el-tooltip>
                                 </el-form-item>
                             </el-col>
                             <el-col :span="6">
@@ -50,8 +52,10 @@
                         <el-row>
                             <el-col :span="6">
                                 <el-form-item label="瑙勬牸鍨嬪彿锛�">
+                                    <el-tooltip class="item" effect="dark" :content="processInspectVo.specs">
                                     <el-input disabled v-model="processInspectVo.specs" 
                                         autocomplete="off" />
+                                    </el-tooltip>
                                 </el-form-item>
                             </el-col>
                         
diff --git a/src/views/quality/teststandard/index.vue b/src/views/quality/teststandard/index.vue
index a8481fb..120c1c0 100644
--- a/src/views/quality/teststandard/index.vue
+++ b/src/views/quality/teststandard/index.vue
@@ -321,7 +321,7 @@
       isShowQuery: false,
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
-        isShow: true,
+        isShow: false,
         url: '/mes/testStandard/upload'
       },
       prelang: 'operation',
diff --git a/src/views/technology/completeproductstructure/completeproductstructure-form.vue b/src/views/technology/completeproductstructure/completeproductstructure-form.vue
index 03ee99f..1be7ec1 100644
--- a/src/views/technology/completeproductstructure/completeproductstructure-form.vue
+++ b/src/views/technology/completeproductstructure/completeproductstructure-form.vue
@@ -40,6 +40,7 @@
               </el-form-item>
 
               <el-form-item label="闆朵欢鍚�" prop="partName">
+                <el-tooltip class="item" effect="dark" :content="treeForm.partName" >
                 <el-input
                   v-model="treeForm.partName"
                   placeholder="闆朵欢鍚�"
@@ -47,6 +48,7 @@
                   disabled
                 >
                 </el-input>
+                </el-tooltip>
               </el-form-item>
 
               <el-form-item label="绫诲瀷" prop="bomTypeDb">
diff --git a/src/views/technology/completeproductstructure/index.vue b/src/views/technology/completeproductstructure/index.vue
index 7903eab..b1b962e 100644
--- a/src/views/technology/completeproductstructure/index.vue
+++ b/src/views/technology/completeproductstructure/index.vue
@@ -10,7 +10,21 @@
         :ajaxFun="ajaxFun"
         ref="completeProductStructureTable"
       >
-        <template #toolbar></template>
+        <template #toolbar>
+          <el-button type="primary" @click="addByStructureHandle" 
+          v-if="permissions.technology_completeproductstructure_bom">浜у搧缁撴瀯鐢熸垚BOM</el-button>
+          <el-button @click="() => {this.approveHandle('ACCEPT')}" 
+          :disabled="uniqueStateArr.includes('01draft')"
+          v-if="permissions.technology_completeproductstructure_accept">鎵瑰噯</el-button>
+          <el-button @click="() => {this.approveHandle('REVOKE')}" 
+          :disabled="uniqueStateArr.includes('02accepted')"
+          v-if="permissions.technology_completeproductstructure_revoke">鎾ゅ洖</el-button>
+          <el-button @click="() => {this.approveHandle('CANCEL')}"
+          :disabled="uniqueStateArr.includes('02accepted')"
+          v-if="permissions.technology_completeproductstructure_cancel">鎷掔粷</el-button>
+          <el-button @click="() => {this.deleteAll()}" type="primary" 
+          v-if="permissions.technology_completeproductstructure_batch_delete">鎵归噺鍒犻櫎</el-button>
+        </template>
       </ttable>
     </basic-container>
   </div>
@@ -214,54 +228,7 @@
             searchInfoType: 'datetimerange',
           },
         ],
-        toolbar: [
-          // {
-          //   text: '鏂板',
-          //   type: 'primary',
-          //   fun: this.addOrUpdateHandle,
-          //   disabled: false,
-          //   permitArr: []
-          // },
-          {
-            type: 'primary',
-            text: '浜у搧缁撴瀯鐢熸垚BOM',
-            fun: this.addByStructureHandle,
-            disabled: false,
-            permitArr: [],
-          },
-          {
-            text: '鎵瑰噯',
-            fun: () => {
-              this.approveHandle('ACCEPT')
-            },
-            disabled: false,
-            permitArr: ['01draft'],
-          },
-          {
-            text: '鎾ゅ洖',
-            fun: () => {
-              this.approveHandle('REVOKE')
-            },
-            disabled: false,
-            permitArr: ['02accepted'],
-          },
-          {
-            text: '鎷掔粷',
-            fun: () => {
-              this.approveHandle('CANCEL')
-            },
-            disabled: false,
-            permitArr: ['02accepted'],
-          },
-          {
-            text: '鍒犻櫎',
-            fun: () => {
-              this.deleteAll()
-            },
-            disabled: false,
-            permitArr: [],
-          },
-        ],
+        toolbar: [],
         operator: [
           {
             text: '鍒犻櫎',
@@ -291,6 +258,7 @@
           label: '宸插彇娑�',
         },
       ],
+      uniqueStateArr: [],
       bomTypeDbOptions: [],
     }
   },
@@ -333,6 +301,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.technology_completeproductstructure_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$router.push({
         name: 'completeProductStructure',
         params: { id: row == null ? null : row.id },
@@ -341,8 +313,6 @@
     // 鎸変骇鍝佺粨鏋勭敓鎴怋OM
     addByStructureHandle() {
       addByStructure().then((res) => {
-        // let result = Array.from(new Set(res.data.data))
-        // this.$message.success(result.join(','))
         console.log(res.data.data);
         let mes="";
         res.data.data.forEach(item=>{
@@ -355,13 +325,13 @@
         })
         this.getData()
       })
-      // this.$message({
-      //   message: '宸插湪鍚庡彴鐢熸垚BOM锛岃鎵ц缁撴潫鍚庡埛鏂伴〉闈�',
-      //   type: 'success',
-      // })
     },
     // 鍒犻櫎
     deleteHandle(row) {
+      if(!this.permissions.technology_completeproductstructure_del){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$confirm('鏄惁纭鍒犻櫎缂栧彿涓�' + row.number, '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
@@ -453,21 +423,22 @@
           uniqueStateArr.push(stateArr[i])
         }
       }
+      this.uniqueStateArr = uniqueStateArr
       // 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆
-      var toolbar = this.table.toolbar
-      for (var j = 0; j < toolbar.length; j++) {
-        if (
-          uniqueStateArr.every((val) =>
-            toolbar[j].permitArr.length <= 0
-              ? true
-              : toolbar[j].permitArr.includes(val)
-          )
-        ) {
-          toolbar[j].disabled = false
-        } else {
-          toolbar[j].disabled = true
-        }
-      }
+      // var toolbar = this.table.toolbar
+      // for (var j = 0; j < toolbar.length; j++) {
+      //   if (
+      //     uniqueStateArr.every((val) =>
+      //       toolbar[j].permitArr.length <= 0
+      //         ? true
+      //         : toolbar[j].permitArr.includes(val)
+      //     )
+      //   ) {
+      //     toolbar[j].disabled = false
+      //   } else {
+      //     toolbar[j].disabled = true
+      //   }
+      // }
       // 灏嗛�変腑璁板綍璧嬪�肩粰multipleSelection
       this.multipleSelection = val
     },
diff --git a/src/views/technology/document/document-form.vue b/src/views/technology/document/document-form.vue
index b3448e3..d0eeadf 100644
--- a/src/views/technology/document/document-form.vue
+++ b/src/views/technology/document/document-form.vue
@@ -113,7 +113,9 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="浜у搧闆朵欢鎻忚堪" prop="partName">
+                <el-tooltip class="item" effect="dark" :content="dataForm.partName" >
                 <el-input v-model="dataForm.partName" disabled> </el-input>
+                </el-tooltip>
               </el-form-item>
             </el-col>
           </el-row>
diff --git a/src/views/technology/document/index.vue b/src/views/technology/document/index.vue
index d9f05e7..7ba962f 100644
--- a/src/views/technology/document/index.vue
+++ b/src/views/technology/document/index.vue
@@ -14,6 +14,20 @@
           <!-- <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs"
             >ERP鍚屾</el-button
           > -->
+          <el-button v-if="permissions.technology_document_add"
+          type="primary" @click="addOrUpdateHandle">鏂板</el-button>
+
+          <el-button @click="() => {this.changeState('accept')}" 
+          :disabled="uniqueStateArr.includes(['01draft', '03accepted', '04reject'])"
+          v-if="permissions.technology_document_accept">鎵瑰噯</el-button>
+
+          <el-button @click="() => {this.changeState('reject')}"
+          :disabled="uniqueStateArr.includes(['01draft', '03accepted', '04reject'])"
+          v-if="permissions.technology_document_reject">鎷掔粷</el-button>
+
+          <el-button @click="() => {this.changeState('cancel')}" 
+          :disabled="uniqueStateArr.includes(['01draft', '03accepted', '04reject'])"
+          v-if="permissions.technology_document_cancel">鎾ら攢</el-button>
           <el-button
             type="primary"
             @click="deleteBatch"
@@ -88,6 +102,7 @@
   data() {
     return {
       ids: [],
+      uniqueStateArr: [],
       ajaxFun: fetchList,
       multipleSelection: [],
       isShowQuery: false,
@@ -323,43 +338,12 @@
           }
         ],
         toolbar: [
-          {
-            text: '鏂板',
-            type: 'primary',
-            fun: this.addOrUpdateHandle,
-            disabled: false,
-            permitArr: []
-          },
           // {
           //   text: '澶嶅埗',
           //   fun: this.copyDocument,
           //   disabled: false,
           //   permitArr: []
           // },
-          {
-            text: '鎵瑰噯',
-            fun: () => {
-              this.changeState('accept')
-            },
-            disabled: false,
-            permitArr: ['01draft', '03accepted', '04reject']
-          },
-          {
-            text: '鎷掔粷',
-            fun: () => {
-              this.changeState('reject')
-            },
-            disabled: false,
-            permitArr: ['01draft', '03accepted', '04reject']
-          },
-          {
-            text: '鎾ら攢',
-            fun: () => {
-              this.changeState('cancel')
-            },
-            disabled: false,
-            permitArr: ['01draft', '03accepted', '04reject']
-          }
           /*,
           {
             text: '娴风紗OA',
@@ -523,6 +507,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.technology_document_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$router.push({
         name: 'documentForm',
         query: { id: row == null ? null : row.id }
@@ -530,6 +518,10 @@
     },
     // 鍒犻櫎
     deleteHandle(row) {
+      if(!this.permissions.technology_document_del){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$confirm('鏄惁纭鍒犻櫎宸ヨ壓鏂囦欢缂栧彿锛�' + row.number + '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
@@ -585,21 +577,22 @@
           uniqueStateArr.push(stateArr[i])
         }
       }
+      this.uniqueStateArr = uniqueStateArr
       // 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆
-      var toolbar = this.table.toolbar
-      for (var j = 0; j < toolbar.length; j++) {
-        if (
-          uniqueStateArr.every((val) =>
-            toolbar[j].permitArr.length <= 0
-              ? true
-              : toolbar[j].permitArr.includes(val)
-          )
-        ) {
-          toolbar[j].disabled = false
-        } else {
-          toolbar[j].disabled = true
-        }
-      }
+      // var toolbar = this.table.toolbar
+      // for (var j = 0; j < toolbar.length; j++) {
+      //   if (
+      //     uniqueStateArr.every((val) =>
+      //       toolbar[j].permitArr.length <= 0
+      //         ? true
+      //         : toolbar[j].permitArr.includes(val)
+      //     )
+      //   ) {
+      //     toolbar[j].disabled = false
+      //   } else {
+      //     toolbar[j].disabled = true
+      //   }
+      // }
       // 灏嗛�変腑璁板綍璧嬪�肩粰multipleSelection
       this.multipleSelection = val
     },
diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index 4c685f1..113abba 100644
--- a/src/views/technology/routing/index.vue
+++ b/src/views/technology/routing/index.vue
@@ -13,20 +13,21 @@
         ref="routingTable"
       >
         <template #toolbar>
-          <el-button
-            v-if="permissions.technology_routing_ifssync"
-            type="primary"
-            :loading="ifsSynsLoading"
-            @click="syncIfs"
-            >IFS鍚屾</el-button
-          >
-          <el-button
-            v-if="permissions.technology_routing_advancecalc"
-            type="primary"
-            :loading="preCalcLoading"
-            @click="calcTech"
-            >鎻愬墠璁$畻</el-button
-          >
+          <el-button v-if="permissions.technology_routing_add"
+          type="primary" @click="addOrUpdateHandle">鏂板</el-button>
+          <el-button @click="() => {this.approveHandle('ACCEPT')}" 
+          :disabled="uniqueStateArr.includes('01draft')"
+          v-if="permissions.technology_routing_accept">鎵瑰噯</el-button>
+          <el-button @click="() => {this.approveHandle('REVOKE')}" 
+          :disabled="uniqueStateArr.includes('02accepted')"
+          v-if="permissions.technology_routing_revoke">鎾ゅ洖</el-button>
+          <el-button @click="() => {this.approveHandle('CANCEL')}"
+          :disabled="uniqueStateArr.includes('02accepted')"
+          v-if="permissions.technology_routing_cancel">鎷掔粷</el-button>
+          <el-button @click="copyRouting"
+          v-if="permissions.technology_routing_cancel">澶嶅埗</el-button>
+          <el-button @click="() => {this.deleteAll()}" type="primary" 
+          v-if="permissions.technology_routing_batch_del">鎵归噺鍒犻櫎</el-button>
         </template>
       </ttable>
       <el-dialog title="瀵煎叆" :visible.sync="importRoutingVisible" width="50%">
@@ -114,7 +115,6 @@
 import {
   fetchList,
   delObj,
-  changeState,
   changeStateBatch,
   exportRoutingTemplate,
   routingIfsSync,
@@ -132,6 +132,7 @@
   data() {
     return {
       ids: [],
+      uniqueStateArr: [],
       ajaxFun: fetchList,
       multipleSelection: [],
       isShowQuery: false,
@@ -356,53 +357,7 @@
             searchInfoType: 'datetimerange'
           }
         ],
-        toolbar: [
-          {
-            text: '鏂板',
-            type: 'primary',
-            fun: this.addOrUpdateHandle,
-            disabled: false,
-            permitArr: []
-          },
-          {
-            text: '鎵瑰噯',
-            fun: () => {
-              this.approveHandle('ACCEPT')
-            },
-            disabled: false,
-            permitArr: ['01draft']
-          },
-          {
-            text: '鎾ゅ洖',
-            fun: () => {
-              this.approveHandle('REVOKE')
-            },
-            disabled: false,
-            permitArr: ['02accepted']
-          },
-          {
-            text: '鎷掔粷',
-            fun: () => {
-              this.approveHandle('CANCEL')
-            },
-            disabled: false,
-            permitArr: ['02accepted']
-          },
-          {
-            text: '澶嶅埗',
-            fun: this.copyRouting,
-            disabled: false,
-            permitArr: []
-          },
-          {
-            text: '鍒犻櫎',
-            fun: () => {
-              this.deleteAll()
-            },
-            disabled: false,
-            permitArr: []
-          }
-        ],
+        toolbar: [],
         operator: [
           {
             text: '鍒犻櫎',
@@ -508,6 +463,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.technology_routing_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$router.push({
         name: 'routingForm',
         query: { id: row == null ? null : row.id }
@@ -515,6 +474,10 @@
     },
     // 鍒犻櫎
     deleteHandle(row) {
+      if(!this.permissions.technology_routing_del){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$confirm('鏄惁纭鍒犻櫎宸ヨ壓缂栧彿锛�' + row.routingNo + '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
@@ -613,21 +576,22 @@
           uniqueStateArr.push(stateArr[i])
         }
       }
+      this.uniqueStateArr = uniqueStateArr
       // 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆
-      var toolbar = this.table.toolbar
-      for (var j = 0; j < toolbar.length; j++) {
-        if (
-          uniqueStateArr.every((val) =>
-            toolbar[j].permitArr.length <= 0
-              ? true
-              : toolbar[j].permitArr.includes(val)
-          )
-        ) {
-          toolbar[j].disabled = false
-        } else {
-          toolbar[j].disabled = true
-        }
-      }
+      // var toolbar = this.table.toolbar
+      // for (var j = 0; j < toolbar.length; j++) {
+      //   if (
+      //     uniqueStateArr.every((val) =>
+      //       toolbar[j].permitArr.length <= 0
+      //         ? true
+      //         : toolbar[j].permitArr.includes(val)
+      //     )
+      //   ) {
+      //     toolbar[j].disabled = false
+      //   } else {
+      //     toolbar[j].disabled = true
+      //   }
+      // }
       // 灏嗛�変腑璁板綍璧嬪�肩粰multipleSelection
       this.multipleSelection = val
     },
diff --git a/src/views/technology/routing/routing-form.vue b/src/views/technology/routing/routing-form.vue
index a2b260e..2ebb8ad 100644
--- a/src/views/technology/routing/routing-form.vue
+++ b/src/views/technology/routing/routing-form.vue
@@ -50,12 +50,14 @@
             </el-col>
             <el-col :span="6">
               <el-form-item prop="partName" label="闆朵欢鍚嶇О">
+                <el-tooltip class="item" effect="dark" :content="dataForm.partName" >
                 <el-input
                   v-model="dataForm.partName"
                   placeholder="闆朵欢鍚嶇О"
                   readonly
                   style="width: 100%"
                 ></el-input>
+                </el-tooltip>
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -657,8 +659,7 @@
       typeOptions: [],
       paramTemplateSelArr: [],
       paramTemplateSelCol: 'operationTemplateNo',
-      // templateDefaultObj: { dataType: '鐢熶骇瑕佹眰' },
-      templateDefaultObj: {},
+      templateDefaultObj: { dataType: '鐢熶骇瑕佹眰' },
       paramSelArr: [],
       paramSelCol: 'code',
       operationIndex: null,
diff --git a/vue.config.js b/vue.config.js
index a0a6201..f4ccb89 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -4,9 +4,13 @@
  */
 
 
-
-const url = 'http://192.168.2.7:9999'
+// const url = 'http://192.168.2.7:9999'
 // const url = 'http://192.168.32.45:9999'
+// const url = 'http://192.168.2.7:9999'
+// const url = 'http://192.168.32.45:9999'
+//const url = 'http://192.168.2.7:9999'
+//const url = 'http://192.168.32.45:9999'
+// const url = 'http://192.168.0.23:9999'
 
 // const url = 'http://localhost:9999'
 

--
Gitblit v1.9.3