From ce2570f8555ff6668da4f149521b4620bdd9d8bf Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 23 九月 2026 15:25:22 +0800
Subject: [PATCH] feat(order): 添加订单委托要求字段并优化界面流程 - 新增分包内容、样品处置、结果评价、报告交付方式等委托要求字段 - 添加分包单位信息、报告寄送地址、收件人电话等关联信息录入功能 - 更新订单状态标签,新增作废状态和全部状态页签 - 调整报告准备页面审批流程,防止审核人和批准人为同一人

---
 src/views/business/productOrder/index.vue |  276 +++---------------------------------------------------
 1 files changed, 19 insertions(+), 257 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index e6db73e..114f96d 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -43,17 +43,16 @@
       <div class="table-tab">
         <div>
           <ul class="tab">
-            <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</li>
+            <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 === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">鎶芥牱宸叉</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:all'])" @click="handleTab(6)">鍏ㄩ儴</li>
+            <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(6)">浣滃簾</li>
           </ul>
         </div>
         <div>
-          <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small"
+          <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 7" size="small"
                      @click="downLoad">瀵煎嚭</el-button>
           <el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
           <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
@@ -105,55 +104,6 @@
             <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
           </el-row>
         </span>
-      </el-dialog>
-      <!-- 涓嬪彂 -->
-      <el-dialog :before-close="handleClose" :visible.sync="issuedDialogVisible" title="妫�楠屽垎閰�" width="400px">
-        <div class="body" style="max-height: 60vh;">
-          <el-row>
-            <el-col class="search_thing" style="width: 95%;">
-              <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div>
-              <div class="search_input">
-                <el-date-picker v-model="distributeData.appointed" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
-                  style="width: 100%;" type="date" value-format="yyyy-MM-dd">
-                </el-date-picker>
-              </div>
-            </el-col>
-            <el-col class="search_thing" style="width: 95%;">
-              <div class="search_label"><span class="required-span">* </span>鎸囨淳浜哄憳锛�</div>
-              <div class="search_input">
-                <el-select v-model="distributeData.userId" clearable filterable placeholder="璇烽�夋嫨" size="small"
-                  style="width: 100%;" @change="changeUser">
-                  <el-option v-for="(item, i) in personList" :key="i + 'gbnm.'" :label="item.label" :value="item.value">
-                  </el-option>
-                </el-select>
-              </div>
-            </el-col>
-            <el-col class="search_thing" style="width: 95%;">
-              <div class="search_label">璇曢獙瀹わ細</div>
-              <div class="search_input">
-                <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="璇烽�夋嫨" size="small"
-                  style="width: 100%;">
-                  <el-option v-for="(item, i) in newJuLaboratoryList" :key="i + 'oooo'" :label="item.label"
-                    :value="item.value">
-                  </el-option>
-                </el-select>
-              </div>
-            </el-col>
-          </el-row>
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-row>
-            <el-button @click="handleClose2">鍙� 娑�</el-button>
-            <el-button :loading="upLoad" type="primary" @click="submitForm2">纭� 瀹�</el-button>
-          </el-row>
-        </span>
-      </el-dialog>
-      <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%" @close="closeDia">
-        <div v-if="dataDialogVisible">
-          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" @pagination="tableDataLookPagination"
-            height="500px" key="tableDataLook" :page="tableDataLookPage"
-            :tableLoading="tableDataLookTableLoading"></lims-table>
-        </div>
       </el-dialog>
       <el-dialog :visible.sync="filesDialogVisible" title="闄勪欢鏌ョ湅" width="80%">
         <div v-if="filesDialogVisible">
@@ -329,12 +279,10 @@
   selectInsOrderParameter,
   selectNoProducts,
   getRevocationInsProductList,
-  selectOrderManDay,
   updateInspected,
-  updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder
+  updateOrderEntrustCode, updateSampleModel, updateStatus
 } from "@/api/business/productOrder";
-import { selectUserCondition } from "@/api/performance/class";
-import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
+import { downFile, getFileList } from "@/api/business/rawMaterialOrder";
 import {mapGetters} from "vuex";
 export default {
   name: 'ProductOrder',
@@ -386,6 +334,7 @@
         { label: '涓嬪崟鏃堕棿', prop: 'createTime' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
         { label: '閫�鍥炵悊鐢�', prop: 'tell' },
+        { label: '鎷掓敹鍘熷洜', prop: 'sampleRejectRemark' },
         { label: '濮旀墭浜�', prop: 'prepareUser' },
         {
           dataType: 'action',
@@ -400,29 +349,16 @@
               }
             },
             {
-              name: '鏁版嵁鏌ョ湅',
-              type: 'text',
-              clickFun: (row) => {
-                this.handleDataLook(row);
-              },
-              disabled: (row, index) => {
-                return row.state != 1 && row.state != 4
-              },
-              showHide: (row) => {
-                return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
-              }
-            },
-            {
               name: '闄勪欢鏌ョ湅',
               type: 'text',
               clickFun: (row) => {
                 this.handleFileLook(row);
               },
               disabled: (row, index) => {
-                return row.state != 1 && row.state != 4
+                return row.state != 1 && row.state != 4 && row.state != 5
               },
               showHide: (row) => {
-                return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+                return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6 || this.tabIndex === 7
               }
             },
             {
@@ -432,7 +368,7 @@
                 this.download(row);
               },
               showHide: (row) => {
-                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7
               }
             },
             {
@@ -475,19 +411,6 @@
               }
             },
             {
-              name: '鍒嗛厤',
-              type: 'text',
-              clickFun: (row) => {
-                this.handleIssued(row);
-              },
-              disabled: (row, index) => {
-                return row.state != 1 || !!row.assign
-              },
-              showHide: (row) => {
-                return this.tabIndex === 1
-              }
-            },
-            {
               name: '鍒犻櫎',
               type: 'text',
               clickFun: (row) => {
@@ -504,7 +427,7 @@
                 this.viewInspectInfo(row);
               },
               showHide: (row) => {
-                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7
               }
             },
           ]
@@ -534,56 +457,6 @@
       isQuash: false,
       verifyDialogVisible: false,
       quashDialogVisible: false,
-      issuedDialogVisible: false,
-      dataDialogVisible: false, // 鏁版嵁鏌ョ湅寮规
-      currentRow: {}, // 鏁版嵁鏌ョ湅寮规
-      tableDataLookTableLoading: false, // 鏁版嵁鏌ョ湅寮规
-      tableDataLook: [],
-      tableDataLookPage: {
-        total: 0,
-        size: 20,
-        current: 1
-      },
-      tableDataLookColumn: [
-        { label: '鏍峰搧缂栧彿', prop: 'sampleCode', width: '160px' },
-        { label: '鏍峰搧鍚嶇О', prop: 'sample' },
-        { label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass' },
-        { label: '妫�楠岄」', prop: 'inspectionItem' },
-        { label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass' },
-        { label: '鍗曚綅', prop: 'unit' },
-        { label: '鏍峰搧鍨嬪彿', prop: 'model' },
-        { label: '鏉′欢', prop: 'radius' },
-        { label: '鐢电紗鏍囪瘑', prop: 'cableTag' },
-        { label: '璇曢獙瑕佹眰', prop: 'tell' },
-        { label: '妫�楠岀粨鏋�', prop: 'lastValue' },
-        {
-          dataType: 'tag',
-          label: '缁撴灉鍒ゅ畾',
-          prop: 'insResult',
-          formatData: (params) => {
-            if (params == 1) {
-              return '鍚堟牸'
-            } else if (params == 0) {
-              return '涓嶅悎鏍�'
-            } else if (params == 3) {
-              return '涓嶅垽瀹�'
-            } else {
-              return ''
-            }
-          },
-          formatType: (params) => {
-            if (params == 1) {
-              return 'success'
-            } else if (params == 0) {
-              return 'danger'
-            } else if (params == 3) {
-              return ''
-            } else {
-              return ''
-            }
-          }
-        },
-      ],
       filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规
       tableDataFile: [],
       tableLoadingFile: false,
@@ -638,18 +511,9 @@
       formData: {},
       formData0: {},
       formData1: {},
-      distributeData: {
-        orderId: '',
-        sampleId: '',
-        appointed: '',
-        userId: '',
-        sonLaboratory: ''
-      },
       entrustCodeVisible: false, // 淇敼濮旀墭缂栧彿寮规
       entrustCodeInfo: {},
       submitCodeLoading: false,
-      // 浜哄憳鍒楄〃
-      personList: [],
       orderId: '',
       revocationInsProductIds: '',
       componentDataDelete: [],
@@ -699,11 +563,15 @@
           value: 3
         },
         {
+          label: '浣滃簾',
+          value: 5
+        },
+        {
           label: '鍏ㄩ儴',
           value: -2
         }
       ],
-      tabIndex: 0,
+      tabIndex: 7,
       active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
       currentId: null,
       more: false,
@@ -732,21 +600,13 @@
       }
     }
   },
-  dicts: ['sys_sub_lab'],
   computed: {
     ...mapGetters(["nickName"]),
-    newJuLaboratoryList() {
-      return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '鏂拌仛')
-    },
   },
   mounted() {
-    if (this.checkPermi(['get:raw:await'])) {
-      this.tabIndex = 0
-    } else {
-      this.tabIndex = 2
-    }
+    // 鍏嶅鏍稿悗娌℃湁寰呭鏍搁〉绛撅紝榛樿杩涘叆鍏ㄩ儴
+    this.tabIndex = this.checkPermi(['get:insOrder:all']) ? 7 : 1
     this.refreshTable()
-    this.getAuthorizedPerson()
   },
   activated() {
     this.refreshTable()
@@ -897,31 +757,9 @@
     closePrintDialog() {
       this.printDialog = false
     },
-    // 鑾峰彇鎸囨淳浜哄憳涓嬫媺鍒楄〃
-    getAuthorizedPerson() {
-      selectUserCondition({ type: 1 }).then(res => {
-        let data = []
-        res.data.forEach(a => {
-          data.push({
-            label: a.name,
-            value: a.id
-          })
-        })
-        this.personList = data
-      })
-    },
     handleClose() {
       this.verifyDialogVisible = false;
       this.quashDialogVisible = false;
-      this.issuedDialogVisible = false;
-      this.dataDialogVisible = false;
-      this.upLoad = false;
-    },
-    handleClose2() {
-      this.verifyDialogVisible = false;
-      this.quashDialogVisible = false;
-      this.issuedDialogVisible = false;
-      this.dataDialogVisible = false;
       this.upLoad = false;
     },
     // 鐐瑰嚮鏍峰搧鍚嶇О
@@ -972,37 +810,6 @@
       }).catch(err => {
         this.submitListLoad = false
       })
-    },
-    // 鏁版嵁鏌ョ湅
-    handleDataLook(row) {
-      this.dataDialogVisible = true;
-      this.currentRow = row;
-      this.getDataTableList(this.currentRow)
-    },
-    // 鏌ヨ鏁版嵁鏌ョ湅鍒楄〃鏁版嵁
-    getDataTableList(row) {
-      this.tableDataLookTableLoading = true
-      selectSampleAndProductByOrderId({ id: row.id, ...this.tableDataLookPage }).then(res => {
-        this.tableDataLookTableLoading = false
-        if (res.code === 200) {
-          this.tableDataLook = res.data.records
-          this.tableDataLookPage.total = res.data.total
-        }
-      }).catch(err => {
-        this.tableDataLookTableLoading = false
-      })
-    },
-    tableDataLookPagination(page) {
-      this.tableDataLookPage.size = page.limit
-      this.getDataTableList(this.currentRow)
-    },
-    closeDia () {
-      this.tableDataLookPage = {
-        total: 0,
-        size: 20,
-        current: 1
-      }
-      this.dataDialogVisible = false
     },
     // 闄勪欢鏌ョ湅
     handleFileLook(row) {
@@ -1137,46 +944,6 @@
         })
       }
     },
-    // 涓嬪彂
-    handleIssued(row) {
-      this.issuedDialogVisible = true;
-      this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
-      selectOrderManDay({
-        id: row.id
-      }).then(res => {
-        this.distributeData.orderId = row.id
-        this.distributeData.sampleId = row.sampleId
-        this.distributeData.appointed = res.data
-        this.distributeData.type = row.type
-      })
-    },
-    submitForm2() {
-      if (this.distributeData.appointed == null || this.distributeData.appointed == '') {
-        this.$message.error('绾﹀畾鏃堕棿鏈~鍐�')
-        return
-      }
-      //
-      if (this.distributeData.userId == null || this.distributeData.userId == '') {
-        this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
-        return
-      }
-      this.upLoad = true;
-      upInsOrder({
-        orderId: this.distributeData.orderId,
-        sampleId: this.distributeData.sampleId,
-        appointed: this.distributeData.appointed,
-        userId: this.distributeData.userId,
-        sonLaboratory: this.distributeData.sonLaboratory,
-      }).then(res => {
-        this.$message.success('淇敼鎴愬姛')
-        this.upLoad = false
-        this.issuedDialogVisible = false
-        this.refreshTable()
-      }).catch(e => {
-        this.$message.error('淇敼澶辫触')
-        this.upLoad = false
-      })
-    },
     submitForm() {
       this.upLoad = true;
       if (this.tabIndex == 1) {
@@ -1230,7 +997,7 @@
         this.$router.push({
           name: "InspectionView",
           query: {
-            sonLaboratory: row.sonLaboratory,
+            sonLaboratory: null,
             state: 3,
             typeSource: row.typeSource,
             orderId: row.id,
@@ -1241,7 +1008,7 @@
         this.$router.push({
           path: "/inspectionTask/inspection",
           query: {
-            sonLaboratory: row.sonLaboratory,
+            sonLaboratory: null,
             state: 3,
             typeSource: row.typeSource,
             orderId: row.id,
@@ -1257,11 +1024,6 @@
     // 鍒锋柊椤甸潰
     refreshView() {
       this.InspectionKey++
-    },
-    changeUser() {
-      if (this.newJuLaboratoryList.length > 0) {
-        this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
-      }
     },
     handleDelete(row) {
       this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {

--
Gitblit v1.9.3