From 418594d0a3e441eeb7df2abbd70e54a0c72284c6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 30 十月 2026 16:35:46 +0800
Subject: [PATCH] feat(order): 添加送样日期校验和权限刷新机制 - 在委托单新增表单中为送样日期添加占位提示和保存校验 - 在检验审核、检验任务、报告编制、样品接收、报告结果、用印台账等页面添加送样时间列 - 加载委托模板时清空送样日期并清除校验状态

---
 src/views/business/productOrder/index.vue |   30 +++++++++++++-----------------
 1 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index 8bdd92c..394a16e 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -45,7 +45,7 @@
           <ul class="tab">
             <li :class="{ active: tabIndex === 7 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(7)">鍏ㄩ儴</li>
             <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">妫�楠屼腑</li>
-            <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">濮旀墭宸叉</li>
+            <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">宸叉</li>
             <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">閫�鍥�</li>
             <li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">鎾ら攢</li>
             <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(6)">浣滃簾</li>
@@ -288,6 +288,7 @@
 } from "@/api/business/productOrder";
 import { downFile, getFileList } from "@/api/business/rawMaterialOrder";
 import {mapGetters} from "@/utils/store-compat";
+import useUserStore from '@/store/modules/user'
 export default {
   name: 'ProductOrder',
   components: {
@@ -442,7 +443,7 @@
                 this.handleDelete(row);
               },
               showHide: (row) => {
-                return this.tabIndex === 4 || this.tabIndex === 5
+                return this.checkPermi(['delete:insOrder'])
               }
             },
             {
@@ -573,7 +574,7 @@
           value: 1
         },
         {
-          label: '濮旀墭宸叉',
+          label: '宸叉',
           value: 4
         },
         {
@@ -630,25 +631,20 @@
     ...mapGetters(["nickName"]),
   },
   mounted() {
+    useUserStore().refreshPermissions().catch(() => {})
     // 鍏嶅鏍稿悗娌℃湁寰呭鏍搁〉绛撅紝榛樿杩涘叆鍏ㄩ儴
     this.tabIndex = this.checkPermi(['get:insOrder:all']) ? 7 : 1
     this.refreshTable()
   },
   activated() {
+    useUserStore().refreshPermissions().catch(() => {})
     this.refreshTable()
   },
   methods: {
     // 鏌ヨ鍒楄〃鏁版嵁
     refreshTable() {
-      if (this.tabIndex !== 2 && this.tabIndex !== 3) {
-        this.entity.orderType = ''
-      } else {
-        if (this.tabIndex === 2) {
-          this.entity.orderType = 'Customer-ordered test'
-        } else {
-          this.entity.orderType = '鎶芥'
-        }
-      }
+      // 宸叉鎸夋姤鍛婃壒鍑嗗悗鐨勮鍗曠姸鎬佹煡璇紝涓嶉檺鍒舵楠岀被鍒��
+      this.entity.orderType = this.tabIndex === 3 ? '鎶芥' : ''
       const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
       this.isLoading = true; // 寮�濮嬪姞杞�
       selectInsOrderParameter({...this.page,...params}).then(res => {
@@ -1074,16 +1070,16 @@
       this.InspectionKey++
     },
     handleDelete(row) {
-      this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
-        confirmButtonText: "纭畾",
+      if (!this.checkPermi(['delete:insOrder'])) return
+      this.$confirm(`纭畾姘镐箙鍒犻櫎濮旀墭鍗曗��${row.entrustCode || row.code || row.id}鈥濆悧锛熻濮旀墭鐨勬牱鍝佹帴鏀躲�佹楠屼换鍔°�佸師濮嬭褰曘�佹姤鍛婏紙鍚凡鎵瑰噯鎶ュ憡锛夈�侀檮浠惰褰曞強鍏朵粬鍏宠仈涓氬姟璁板綍灏嗕竴骞跺垹闄わ紝鍒犻櫎鍚庢棤娉曟仮澶嶃�俙, "鍒犻櫎濮旀墭鍗�", {
+        confirmButtonText: "纭鍒犻櫎",
         cancelButtonText: "鍙栨秷",
         type: "warning"
       }).then(() => {
-        delInsOrder({ insOrderId: row.id }).then(res => {
+        return delInsOrder({ insOrderId: row.id }).then(res => {
+          this.multipleSelection = this.multipleSelection.filter(item => item.id !== row.id)
           this.$message.success('鍒犻櫎鎴愬姛')
           this.refreshTable()
-        }).catch(e => {
-          this.$message.error('鍒犻櫎澶辫触')
         })
       }).catch(() => { })
     }

--
Gitblit v1.9.3