From c5190d45cc1b3bcb59bdd031fcee06a8774c3499 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期一, 17 三月 2025 14:03:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/business/productOrder/index.vue |  951 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 509 insertions(+), 442 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index d562f24..cf46550 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -3,110 +3,106 @@
     <div class="search">
       <el-form :model="entity" ref="entity" size="small" :inline="true">
         <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
-          <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�"
-                    size="small"
-                    @keyup.enter.native="refreshTable">
+          <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
+            @keyup.enter.native="refreshTable">
           </el-input>
         </el-form-item>
         <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName">
           <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="refreshTable"></el-input>
+            @keyup.enter.native="refreshTable"></el-input>
         </el-form-item>
         <el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel">
-          <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�"
-                    size="small" @keyup.enter.native="refreshTable()"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button :icon="!more?'el-icon-arrow-down':'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more=!more">{{!more?'鏇村':'鏀惰捣'}}</el-button>
-          <el-button size="small" @click="refresh()">閲� 缃�</el-button>
-          <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-        </el-form-item>
-        <el-form-item label="鏍峰搧缂栧彿" prop="sampleCode" v-if="more">
-          <el-input v-model="entity.sampleCode" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="refreshTable">
-          </el-input>
+          <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" size="small"
+            @keyup.enter.native="refreshTable()"></el-input>
         </el-form-item>
         <el-form-item label="涓嬪崟鏃堕棿" prop="createTime" v-if="more">
-          <el-date-picker v-model="entity.createTime" clearable
-                          format="yyyy-MM-dd"
-                          placeholder="閫夋嫨鏃ユ湡"
-                          size="small"
-                          style="width:100%"
-                          type="date"
-                          value-format="yyyy-MM-dd HH:mm:ss">
+          <el-date-picker v-model="entity.createTime" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+            style="width:100%" type="date" value-format="yyyy-MM-dd HH:mm:ss">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="濮旀墭浜�" prop="prepareUser" v-if="more">
           <el-input v-model="entity.prepareUser" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="refreshTable">
+            @keyup.enter.native="refreshTable">
           </el-input>
         </el-form-item>
         <el-form-item label="濮旀墭鍗曚綅" prop="company" v-if="more">
           <el-input v-model="entity.company" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="refreshTable">
+            @keyup.enter.native="refreshTable">
           </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
+                     @click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button>
+          <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+          <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
         </el-form-item>
       </el-form>
     </div>
     <div class="table-tab">
       <div>
         <ul class="tab">
-          <li v-for="(m,i) in tabList" :key="i+'afgh'" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li>
+          <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</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>
         </ul>
       </div>
       <div>
-        <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" @click="downLoad">瀵煎嚭</el-button>
+        <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small"
+          @click="downLoad">瀵煎嚭</el-button>
         <el-button v-if="tabIndex === 1" size="small" type="primary" @click="openAddIns">娣诲姞妫�楠岄」</el-button>
         <el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
-        <el-button size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
+        <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
       </div>
     </div>
     <div class="table">
-      <lims-table :tableData="tableData" :column="column"
-                  :isSelection="true" :handleSelectionChange="selectMethod"
-                  @pagination="pagination" :height="'calc(100vh - 290px)'" key="tableData"
-                  :page="page" :tableLoading="tableLoading"></lims-table>
+      <lims-table :tableData="tableData" :column="column" :isSelection="true" :handleSelectionChange="selectMethod"
+        @pagination="pagination" :height="'calc(100vh - 280px)'" :key="upIndex" :page="page"
+        :tableLoading="tableLoading"></lims-table>
     </div>
     <div>
       <!-- 瀹℃牳 -->
       <el-dialog :before-close="handleClose" :visible.sync="verifyDialogVisible" title="涓嬪崟瀹℃牳" width="30%">
         <p v-if="!isPass" style="font-size:16px;color:#333333">濮旀墭缂栧彿<span
-          style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚﹂�氳繃</p>
+            style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚﹂�氳繃</p>
         <el-form v-else ref="ruleForm" :label-position="labelPosition" :model="formData" label-width="150px">
           <el-form-item label="璇疯緭鍏ユ牱鍝佸簱浣嶅彿锛�">
             <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input>
           </el-form-item>
         </el-form>
         <span slot="footer" class="dialog-footer">
-					<el-row v-if="!isPass">
-						<el-button @click="handleClose">閫� 鍥�</el-button>
-						<el-button :loading="upLoad" type="primary" @click="submitForm">閫� 杩�</el-button>
-					</el-row>
-					<el-row v-else>
-						<el-button @click="handleClose">杩� 鍥�</el-button>
-						<el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
-					</el-row>
-				</span>
+          <el-row v-if="!isPass">
+            <el-button @click="handleClose">閫� 鍥�</el-button>
+            <el-button :loading="upLoad" type="primary" @click="submitForm">閫� 杩�</el-button>
+          </el-row>
+          <el-row v-else>
+            <el-button @click="handleClose">杩� 鍥�</el-button>
+            <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
+          </el-row>
+        </span>
       </el-dialog>
       <!-- 鎾ら攢 -->
       <el-dialog :before-close="handleClose" :visible.sync="quashDialogVisible" title="涓嬪崟鎾ら攢" width="30%">
         <p v-if="!isQuash" style="font-size:16px;color:#333333">濮旀墭缂栧彿<span
-          style="color:#34BD66">{{this.insOrderRow.entrustCode}}</span>鐨勪俊鎭槸鍚︽挙閿�</p>
+            style="color:#34BD66">{{ this.insOrderRow.entrustCode }}</span>鐨勪俊鎭槸鍚︽挙閿�</p>
         <el-form v-else ref="ruleForm" :label-position="labelPosition" :model="formData" label-width="150px">
           <el-form-item label="璇疯緭鍏ユ挙閿�鍘熷洜锛�">
             <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input>
           </el-form-item>
         </el-form>
         <span slot="footer" class="dialog-footer">
-					<el-row v-if="!isQuash">
-						<el-button @click="handleClose">鍙� 娑�</el-button>
-						<el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
-					</el-row>
-					<el-row v-else>
-						<el-button @click="handleClose">杩� 鍥�</el-button>
-						<el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
-					</el-row>
-				</span>
+          <el-row v-if="!isQuash">
+            <el-button @click="handleClose">鍙� 娑�</el-button>
+            <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
+          </el-row>
+          <el-row v-else>
+            <el-button @click="handleClose">杩� 鍥�</el-button>
+            <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">
@@ -116,24 +112,27 @@
               <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">
+                  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-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"><span class="required-span" >* </span>璇曢獙瀹わ細</div>
+              <div class="search_label"><span class="required-span">* </span>璇曢獙瀹わ細</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 sonLaboratoryList" :key="i+'oooo'" :label="item.label" :value="item.value">
+                <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="璇烽�夋嫨" size="small"
+                  style="width: 100%;">
+                  <el-option v-for="(item, i) in sonLaboratoryList" :key="i + 'oooo'" :label="item.label"
+                    :value="item.value">
                   </el-option>
                 </el-select>
               </div>
@@ -141,56 +140,51 @@
           </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-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%">
-        <div v-if="dataDialogVisible" style="height: 70vh;overflow-y: auto;">
-          <ValueTable ref="ValueTableDataLook" :componentData="componentDataDataLook" :rowKey="'insProductId'"
-                      :url="$api.insOrder.selectSampleAndProductByOrderId"/>
+      <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" style="height: 70vh;overflow-y: auto;">
-          <ValueTable :key="upIndex" ref="fileList"
-                      :componentData="componentData0"
-                      :url="$api.insOrderPlan.getFileList"
-                      class="value-table"/>
+        <div v-if="filesDialogVisible">
+          <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px"
+            key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
         </div>
       </el-dialog>
       <el-dialog :title="deleteTilte" :visible.sync="deleteDialogVisible" width="80%">
         <div v-if="deleteDialogVisible" style="height: 70vh;overflow-y: auto;">
-          <ValueTable ref="ValueTableDataDelete" :componentData="componentDataDelete"
-                      :isColumnWidth="true" :url="$api.insOrder.selectNoProducts+'?orderId='+orderId+'&ids='+this.revocationInsProductIds"/>
+          <lims-table :tableData="componentDataDelete" :column="columnDelete" :isSelection="true"
+            :handleSelectionChange="selectDelete" @pagination="paginationDelete" height="500px"
+            key="componentDataDelete" :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
         </div>
         <span slot="footer" class="dialog-footer">
-        <el-row>
-          <el-button @click="handleNo">{{deleteTilte=='鎾ら攢'?'鍙� 娑�':'涓嶉�氳繃'}}</el-button>
-          <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='鎾ら攢'?'纭� 瀹�':'閫� 杩�'}}</el-button>
-        </el-row>
-      </span>
+          <el-row>
+            <el-button @click="handleNo">{{ deleteTilte == '鎾ら攢' ? '鍙� 娑�' : '涓嶉�氳繃' }}</el-button>
+            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{ deleteTilte == '鎾ら攢' ? '纭� 瀹�' : '閫氳繃'}}</el-button>
+          </el-row>
+        </span>
       </el-dialog>
-    </div>
-    <div>
-<!--      <Add v-if="active<4" :active="active" :currentId="currentId" :examine = "examine" :tabIndex="tabIndex" />-->
     </div>
     <el-dialog :visible.sync="printDialogVisible" title="鏍囩鎵撳嵃" top="5vh" width="40%">
       <div v-loading="loadPint" style="width:100%;height: 400px;overflow-y: auto;">
         <div class="dia_body">
-          <el-checkbox
-            v-model="checkAll"
-            :indeterminate="isIndeterminate"
-            style="margin: 10px 5px;"
+          <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" style="margin: 10px 5px;"
             @change="handleCheckAllChange">鍏ㄩ��</el-checkbox>
           <el-checkbox-group v-model="checkIndexList" @change="changePrintCode()">
-            <el-card v-for="(item, i) in qrData" :key="i+'wwwww'" class="box-card" style="margin-bottom: 15px; font-size: 16px !important;">
+            <el-card v-for="(item, i) in qrData" :key="i + 'wwwww'" class="box-card"
+              style="margin-bottom: 15px; font-size: 16px !important;">
               <el-checkbox :key="i" :label="i" style="position: relative;top:-20px;left:5px"><br></el-checkbox>
               <div>
                 <el-row style="font-size: 14px;padding-left: 20px;">
-                  <el-col  style="font-weight: bold;">{{ item.pName }}</el-col>
+                  <el-col style="font-weight: bold;">{{ item.pName }}</el-col>
                 </el-row>
                 <div style="display: flex;">
                   <div>
@@ -200,27 +194,29 @@
                   </div>
                   <div style="margin-left: 50px;width: 100%;">
                     <el-row>
-                      <el-col  style="font-weight: bold;font-size: 14px;"><span>鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode }}</el-col>
+                      <el-col style="font-weight: bold;font-size: 14px;"><span>鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode
+                        }}</el-col>
                     </el-row>
                     <el-row style="margin-top: 1px;font-size: 14px;">
-                      <el-col  style="font-weight: bold;"><span>濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</el-col>
+                      <el-col style="font-weight: bold;"><span>濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</el-col>
                     </el-row>
                     <el-row style="margin-top: 1px;font-size: 14px;">
-                      <el-col  style="font-weight: bold;"><span>瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
+                      <el-col style="font-weight: bold;"><span>瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
                     </el-row>
                     <el-row style="margin-top: 1px;font-size: 14px;">
-                      <el-col  style="font-weight: bold;"><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sample }}</el-col>
+                      <el-col style="font-weight: bold;"><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sample }}</el-col>
                     </el-row>
                     <el-row class="ellipsis-multiline" style="margin-top: 1px;font-size: 14px;">
-                      <el-col  style="font-weight: bold;"><span>妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
+                      <el-col style="font-weight: bold;"><span>妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
                     </el-row>
                     <el-row style="margin-top: 3px;font-size: 14px;">
-                      <el-col  style="font-weight: bold;display: flex;align-items: center;"><span>鏍峰搧鐘舵��:&nbsp; </span>
+                      <el-col style="font-weight: bold;display: flex;align-items: center;"><span>鏍峰搧鐘舵��:&nbsp; </span>
                         <el-radio-group :value="item.insState" disabled style="margin-top: 7px;margin-left: 4px;">
                           <el-radio :label="0" style="font-weight: bold;margin-right: 7px;">寰呮</el-radio>
                           <el-radio :label="1" style="font-weight: bold;margin-right: 7px;">鍦ㄦ</el-radio>
                           <el-radio :label="2" style="font-weight: bold;margin-right: 7px;">宸叉</el-radio>
-                        </el-radio-group><el-radio v-model="item.isLeave" :label="1" disabled style="font-weight: bold;margin-top: 7px;">鐣欐牱</el-radio></el-col>
+                        </el-radio-group><el-radio v-model="item.isLeave" :label="1" disabled
+                          style="font-weight: bold;margin-top: 7px;">鐣欐牱</el-radio></el-col>
                     </el-row>
                   </div>
                 </div>
@@ -231,14 +227,16 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-row>
-          <el-button @click="printDialogVisible=false">鍙� 娑�</el-button>
+          <el-button @click="printDialogVisible = false">鍙� 娑�</el-button>
           <el-button :loading="printLoading" type="primary" @click="submitPrint">鎵� 鍗�</el-button>
         </el-row>
       </span>
     </el-dialog>
-    <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
+    <div class="el-dialog__body"
+      style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
       <div id="printMOrder" ref="printMOrder" class="printMOrder">
-        <el-card v-for="(item, i) in checkDataList" :key="i+'uuuuu'" class="box-card" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
+        <el-card v-for="(item, i) in checkDataList" :key="i + 'uuuuu'" class="box-card"
+          style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
           <div style="display: flex;">
             <div>
               <el-col :offset="2" :span="10">
@@ -247,7 +245,8 @@
             </div>
             <div style="margin-left: 0.32cm;line-height: 0.22cm;">
               <el-row>
-                <el-col  class="single-line-ellipsis" style="font-size: 0.20cm;width: 4cm;"><span>鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode }}</el-col>
+                <el-col class="single-line-ellipsis" style="font-size: 0.20cm;width: 4cm;"><span>鏍峰搧缂栧彿:&nbsp; </span>{{
+                  item.sampleCode }}</el-col>
               </el-row>
               <el-row style="font-size: 0.20cm;">
                 <el-col><span>濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</el-col>
@@ -256,18 +255,19 @@
                 <el-col><span>瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
               </el-row>
               <el-row style="font-size: 0.20cm;">
-                <el-col ><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sample }}</el-col>
+                <el-col><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sample }}</el-col>
               </el-row>
               <el-row style="font-size: 0.20cm;width: 4cm;">
                 <el-col class="ellipsis-multiline"><span>妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
               </el-row>
               <el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
-                <el-col  style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��:&nbsp;
+                <el-col style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��:&nbsp;
                   </span>
-                  <span style="white-space: nowrap;"><span v-if="item.insState==0">鈭�</span><span v-if="item.insState!=0" class="scor"></span>寰呮
-                    <span v-if="item.insState==1">鈭�</span><span v-if="item.insState!=1" class="scor"></span>鍦ㄦ
-                    <span v-if="item.insState==2">鈭�</span><span v-if="item.insState!=2" class="scor"></span>宸叉
-                    <span v-if="item.isLeave==1">鈭�</span><span v-if="item.isLeave!=1" class="scor"></span>鐣欐牱</span>
+                  <span style="white-space: nowrap;"><span v-if="item.insState == 0">鈭�</span><span v-if="item.insState != 0"
+                      class="scor"></span>寰呮
+                    <span v-if="item.insState == 1">鈭�</span><span v-if="item.insState != 1" class="scor"></span>鍦ㄦ
+                    <span v-if="item.insState == 2">鈭�</span><span v-if="item.insState != 2" class="scor"></span>宸叉
+                    <span v-if="item.isLeave == 1">鈭�</span><span v-if="item.isLeave != 1" class="scor"></span>鐣欐牱</span>
                   <!-- <el-radio-group :value="item.insState" style="margin-top: 3px;margin-left: 1px;" disabled>
                   <el-radio :label="0" style="margin-right: 3px;font-size: 6px;">寰呮</el-radio>
                   <el-radio :label="1" style="margin-right: 3px;font-size: 6px;">鍦ㄦ</el-radio>
@@ -289,37 +289,34 @@
       </span>
     </el-dialog>
     <!--鏍囩鎵撳嵃寮规-->
-    <print-dialog v-if="printDialog" ref="printDialog"
-                  :printDialog="printDialog"
-                  @closePrintDialog="closePrintDialog"></print-dialog>
+    <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog"
+      @closePrintDialog="closePrintDialog"></print-dialog>
     <!--娣诲姞閬楁紡妫�楠岄」寮规-->
     <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia>
-<!--    <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
-<!--                :sonLaboratory="sonLaboratory" :state="state"-->
-<!--                :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>-->
+    <!--    <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
+    <!--                :sonLaboratory="sonLaboratory" :state="state"-->
+    <!--                :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>-->
   </div>
 </template>
 
 <script>
 import vueQr from 'vue-qr'
 import PrintJS from 'print-js'
-import file from "@/utils/file";
 import PrintDialog from "@/views/business/productOrder/components/printDialog.vue";
 import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
 import limsTable from "@/components/Table/lims-table.vue";
-import {getWarehouseSubmit} from "@/api/business/materialInspection";
 import {
   checkUpdate, delInsOrder,
   rawAllInsOrderExport,
-  selectInsOrderParameter, selectOrderManDay,
+  selectInsOrderParameter, selectNoProducts, selectOrderManDay,
   updateInspected,
   updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2
 } from "@/api/business/productOrder";
-import {Message} from "element-ui";
-import {selectUserCondition} from "@/api/performance/class";
-import {downFile} from "@/api/business/rawMaterialOrder";
-// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
+import { selectUserCondition } from "@/api/performance/class";
+import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
+import {mapGetters} from "vuex";
 export default {
+  name: 'ProductOrder',
   components: {
     limsTable,
     AddInspectionDia,
@@ -332,15 +329,28 @@
         orderType: '',
         state: '',
       },
+      upIndex: 0,
       tableData: [],
       tableLoading: false,
       column: [
-        {label: '濮旀墭缂栧彿', prop: 'entrustCode'},
-        {label: '濮旀墭鍗曚綅', prop: 'company'},
-        {label: '鏍峰搧鍚嶇О', prop: 'sampleName'},
-        {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'},
-        {label: '鏍峰搧鏁伴噺', prop: 'sampleNum'},
-        {label: '妫�楠屼汉', prop: 'testingName'},
+        {
+          label: "濮旀墭缂栧彿",
+          prop: "entrustCode",
+          width: "160px",
+          dataType: "link",
+          linkMethod: "changeEntrustCode",
+        },
+        { label: '濮旀墭鍗曚綅', prop: 'company' },
+        {
+          label: "鏍峰搧鍚嶇О",
+          prop: "sampleName",
+          width: "160px",
+          dataType: "link",
+          linkMethod: "selectAllByOne",
+        },
+        { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+        { label: '鏍峰搧鏁伴噺', prop: 'sampleNum' },
+        { label: '妫�楠屼汉', prop: 'testingName' },
         {
           dataType: 'tag',
           label: '绱ф�ョ▼搴�',
@@ -364,9 +374,9 @@
             }
           }
         },
-        {label: '澶囨敞', prop: 'remark'},
-        {label: '妫�楠岃繘搴�%', prop: 'insProgress'},
-        {label: '绾﹀畾鏃堕棿', prop: 'appointed'},
+        { label: '澶囨敞', prop: 'remark' },
+        { label: '妫�楠岃繘搴�%', prop: 'insProgress' },
+        { label: '绾﹀畾鏃堕棿', prop: 'appointed' },
         {
           dataType: 'tag',
           label: '妫�楠岀粨鏋�',
@@ -379,7 +389,7 @@
             } else if (params == 3) {
               return '涓嶅垽瀹�'
             } else {
-              return ''
+              return null
             }
           },
           formatType: (params) => {
@@ -389,15 +399,15 @@
               return 'danger'
             } else if (params == 3) {
               return ''
-            }  else {
-              return ''
+            } else {
+              return null
             }
           }
         },
-        {label: '涓嬪崟鏃堕棿', prop: 'createTime'},
-        {label: '涓嬪彂鏃堕棿', prop: 'sendTime'},
-        {label: '閫�鍥炵悊鐢�', prop: 'tell'},
-        {label: '濮旀墭浜�', prop: 'prepareUser'},
+        { label: '涓嬪崟鏃堕棿', prop: 'createTime' },
+        { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+        { label: '閫�鍥炵悊鐢�', prop: 'tell' },
+        { label: '濮旀墭浜�', prop: 'prepareUser' },
         {
           dataType: 'action',
           fixed: 'right',
@@ -475,7 +485,7 @@
                 this.handlEquashCheck(row);
               },
               disabled: (row, index) => {
-                return (row.state != 1 && row.state != 0)||(this.tabIndex!=1)||row.isRevocation!=1
+                return (row.state != 1 && row.state != 0) || (this.tabIndex != 1) || row.isRevocation != 1
               },
               showHide: (row) => {
                 return this.tabIndex === 1
@@ -504,27 +514,37 @@
                 return this.tabIndex === 4 || this.tabIndex === 5
               }
             },
+            {
+              name: '鍘熷璁板綍',
+              type: 'text',
+              clickFun: (row) => {
+                this.viewInspectInfo(row);
+              },
+              showHide: (row) => {
+                return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+              }
+            },
           ]
         }
       ],
       page: {
-        total:0,
-        size:10,
-        current:1
+        total: 0,
+        size: 20,
+        current: 1
       },
-      state:0,// 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
+      state: 0,// 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
       InspectionKey: 1,
       inspectorList: [],//妫�楠屼汉鍛樺垪琛�
       sonLaboratory: null,// 0:濮旀墭锛�1锛氬師鏉愭枡
       typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟
-      deleteTilte:'鎾ら攢',
+      deleteTilte: '鎾ら攢',
       examine: null,
-      deleteList:[],
-      loadPint:false,
+      deleteList: [],
+      loadPint: false,
       checkAll: false,
       isIndeterminate: true,
-      printLoading:false,
-      printDialogVisible:false,
+      printLoading: false,
+      printDialogVisible: false,
       //鏄惁瀹℃牳閫氳繃  true鏄� false涓嶆槸
       isPass: false,
       //鏄惁瀹℃牳鎾ら攢  true鏄� false涓嶆槸
@@ -533,7 +553,105 @@
       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,
+      columnFile: [
+        {
+          dataType: 'tag',
+          label: '绫诲瀷',
+          prop: 'type',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍥剧墖'
+            } else if (params == 2) {
+              return '鏂囦欢'
+            } else {
+              return ''
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else if (params == 2) {
+              return 'warning'
+            } else {
+              return ''
+            }
+          }
+        },
+        { label: '闄勪欢鍚嶇О', prop: 'fileName' },
+        { label: '涓婁紶浜�', prop: 'name' },
+        { label: '涓婁紶鏃堕棿', prop: 'createTime' },
+        {
+          dataType: 'action',
+          fixed: 'right',
+          label: '鎿嶄綔',
+          width: '170px',
+          operation: [
+            {
+              name: '涓嬭浇',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDown(row);
+              }
+            }
+          ]
+        }
+      ],
+      pageFile: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
       formData: {},
       formData0: {},
       formData1: {},
@@ -542,148 +660,43 @@
         sampleId: '',
         appointed: '',
         userId: '',
-        sonLaboratory:''
+        sonLaboratory: ''
       },
       entrustCodeVisible: false, // 淇敼濮旀墭缂栧彿寮规
       entrustCodeInfo: {},
       submitCodeLoading: false,
       // 浜哄憳鍒楄〃
       personList: [],
-      orderId:'',
-      revocationInsProductIds:'',
-      componentDataDataLook: {
-        entity: {
-          id: 0,
-          orderBy: {
-            field: 'sampleCode',
-            order: 'asc'
-          }
-        },
-        isIndex: false,
-        showSelect: false,
-        select: false,
-        do: [],
-        tagField: {
-          insState: {
-            select: []
-          },
-          insResult: {
-            select: [{
-              value: 1,
-              label: '鍚堟牸',
-              type: 'success'
-            },{
-              value: 0,
-              label: '涓嶅悎鏍�',
-              type: 'danger'
-            },{
-              value: 3,
-              label: '涓嶅垽瀹�',
-              type: ''
-            }]
-          }
-        },
-        selectField: {},
-        spanConfig:{
-          rows:[
-            {
-              name:'sampleCode',
-              index:0
-            },
-            {
-              name:'sample',
-              index:1
-            },
-            {
-              name:'model',
-              index:6
-            }
-          ]
-        },
-        requiredAdd: [],
-        requiredUp: []
+      orderId: '',
+      revocationInsProductIds: '',
+      componentDataDelete: [],
+      tableLoadingDelete: false,
+      columnDelete: [
+        { label: '鏍峰搧缂栧彿', prop: 'sampleCode', width: '160px' },
+        { label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass' },
+        { label: '妫�楠岄」', prop: 'inspectionItem' },
+        { label: '妫�楠岄」瀛愮被', prop: 'inspectionItemSubclass' },
+        { label: '鏍峰搧鍒嗙被', prop: 'sampleType' },
+        { label: '鏍峰搧', prop: 'sample' },
+        { label: '鍨嬪彿', prop: 'model' },
+        { label: '绾胯姱', prop: 'cableTag' },
+        { label: '璇曢獙瀹�', prop: 'sonLaboratory' },
+        { label: '瑕佹眰鍊�', prop: 'ask' },
+        { label: '瑕佹眰鎻忚堪', prop: 'tell' },
+      ],
+      pageDelete: {
+        total: 0,
+        size: 20,
+        current: 1
       },
-      componentData0: {
-        entity: {
-          insOrderId:''
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        sort: false,
-        init:false,
-        do: [
-          {
-            id: 'parent',
-            font: '涓嬭浇',
-            type: 'text',
-            method: 'handleDown'
-          }
-        ],
-        isPage: false,
-        linkEvent: {},
-        tagField: {
-          type:{
-            select:[
-              {
-                value: 1,
-                label: '鍥剧墖'
-              },
-              {
-                value: 2,
-                label: '鏂囦欢'
-              }
-            ]
-          }
-        },
-        currentId: '',
-        selectField: {},
-        requiredAdd: [],
-        requiredUp: []
-      },
-      componentDataDelete: {
-        entity: {
-          // orderId: '',
-          // orderBy: {
-          // 	field: 'sampleCode',
-          // 	order: 'asc'
-          // }
-        },
-        isPage:true,
-        isIndex: false,
-        showSelect: true,
-        select: true,
-        selectMethod: 'selectDelete',
-        do: [],
-        tagField: {
-          insState: {
-            select: []
-          },
-          insResult: {
-            select: [{
-              value: 1,
-              label: '鍚堟牸',
-              type: 'success'
-            },{
-              value: 0,
-              label: '涓嶅悎鏍�',
-              type: 'danger'
-            }]
-          }
-        },
-        selectField: {},
-        spanConfig:{},
-        requiredAdd: [],
-        requiredUp: []
-      },
-      deleteDialogVisible:false,
+      deleteDialogVisible: false,
       upLoad: false,
       tabList: [
         {
           label: '寰呭鏍�',
           value: 0
         }, {
-          label: '寰呮楠�',
+          label: '妫�楠屼腑',
           value: 1
         },
         {
@@ -710,24 +723,24 @@
       tabIndex: 0,
       active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
       currentId: null,
-      more:false,
-      insOrderRow:{},
-      checkIndexList:[],
-      checkDataList:[
+      more: false,
+      insOrderRow: {},
+      checkIndexList: [],
+      checkDataList: [
         {
-          sampleCode:'11111'
+          sampleCode: '11111'
         }
       ],
-      qrData:[],
-      multipleSelection:[],
-      sonLaboratoryList:[],
+      qrData: [],
+      multipleSelection: [],
+      sonLaboratoryList: [],
       printDialog: false,
       addInspectionDia: false
     }
   },
-  watch:{
-    printDialogVisible(newVal){
-      if(!newVal){
+  watch: {
+    printDialogVisible(newVal) {
+      if (!newVal) {
         this.qrData = []
         this.checkIndexList = []
         this.checkDataList = []
@@ -735,14 +748,20 @@
       }
     }
   },
+  computed: {
+    ...mapGetters(["nickName"]),
+  },
   mounted() {
     this.refreshTable()
     this.getAuthorizedPerson()
   },
+  activated() {
+    this.refreshTable()
+  },
   methods: {
     // 鏌ヨ鍒楄〃鏁版嵁
     refreshTable() {
-      if (this.tabIndex !== 2 && this.tabIndex !==3) {
+      if (this.tabIndex !== 2 && this.tabIndex !== 3) {
         this.entity.orderType = ''
       } else {
         if (this.tabIndex === 2) {
@@ -751,9 +770,10 @@
           this.entity.orderType = '鎶芥'
         }
       }
-      const params = {...this.entity, state: this.tabList[this.tabIndex].value}
+      const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
       this.tableLoading = true
-      selectInsOrderParameter(params).then(res => {
+      selectInsOrderParameter({...this.page,...params}).then(res => {
+        this.upIndex++
         this.tableLoading = false
         if (res.code === 200) {
           this.tableData = res.data.records
@@ -767,17 +787,20 @@
       this.resetForm('entity')
       this.refreshTable()
     },
-    pagination (page) {
+    pagination(page) {
       this.page.size = page.limit
       this.refreshTable()
     },
     // 鎵撳紑淇敼濮旀墭缂栧彿寮规
-    changeEntrustCode (row) {
+    changeEntrustCode(row) {
+      if (this.tabIndex !== 1) {
+        return
+      }
       this.entrustCodeVisible = true
-      this.entrustCodeInfo = {...row}
+      this.entrustCodeInfo = { ...row }
     },
     // 鎻愪氦淇敼濮旀墭缂栧彿
-    submitCode () {
+    submitCode() {
       this.submitCodeLoading = true
       updateOrderEntrustCode({
         id: this.entrustCodeInfo.id,
@@ -793,33 +816,33 @@
         this.submitCodeLoading = false
       })
     },
-    selectMethod(val){
+    selectMethod(val) {
       this.multipleSelection = val
     },
     //閫夋嫨瑕佹墦鍗扮殑浜岀淮鐮�
-    changePrintCode(){
+    changePrintCode() {
       let indexList = this.checkIndexList
       let arr = []
-      indexList.forEach(i=>{
+      indexList.forEach(i => {
         arr.push(this.qrData[i])
       })
       this.checkDataList = arr
     },
     //鍏ㄩ��
     handleCheckAllChange(val) {
-      if(val){
-        for(var i=0;i<this.qrData.length;i++){
+      if (val) {
+        for (var i = 0; i < this.qrData.length; i++) {
           this.checkIndexList.push(i)
         }
         this.checkDataList = this.qrData
-      }else{
+      } else {
         this.checkIndexList = []
         this.checkDataList = []
       }
       this.isIndeterminate = false;
     },
-    submitPrint(){
-      if(this.checkDataList.length < 1){
+    submitPrint() {
+      if (this.checkDataList.length < 1) {
         this.$message.warning("璇烽�夋嫨瑕佹墦鍗扮殑浜岀淮鐮�")
         return
       }
@@ -827,7 +850,7 @@
       PrintJS({
         printable: 'printMOrder',//椤甸潰
         type: "html",//鏂囨。绫诲瀷
-        maxWidth:360,
+        maxWidth: 360,
         style: `@page {
                 margin:0;
                 size: 400px 75px collapse;
@@ -844,13 +867,13 @@
                 height: 75px;
                 margin:0;
               }`,
-        onPrintDialogClose: this.erexcel=false,
+        onPrintDialogClose: this.erexcel = false,
         targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
         font_size: '0.20cm',
       });
     },
     // 鎵撳紑娣诲姞妫�楠岄」寮规
-    openAddIns () {
+    openAddIns() {
       if (this.multipleSelection.length === 0) {
         this.$message.warning('璇烽�夋嫨闇�瑕佹坊鍔犳楠岄」鐨勬暟鎹�')
         return
@@ -865,21 +888,17 @@
       })
     },
     // 瀵煎嚭璁板綍
-    downLoad () {
-      rawAllInsOrderExport({...this.entity, responseType: "blob"}).then(res => {
-        this.$message.success('瀵煎嚭鎴愬姛')
-        const blob = new Blob([res],{ type: 'application/octet-stream' });
-        const url = URL.createObjectURL(blob);
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = '濮旀墭妫�娴嬩俊鎭鍑�' + '.xlsx';
-        link.click();
+    downLoad() {
+      const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
+      rawAllInsOrderExport({ ...params }).then(res => {
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx');
       }).catch(err => {
         console.log('err---', err);
       })
     },
     // 鎵撳紑鏍囩鎵撳嵃寮规
-    openPrint () {
+    openPrint() {
       if (this.multipleSelection.length > 0) {
         this.printDialog = true
         this.$nextTick(() => {
@@ -891,12 +910,12 @@
       }
     },
     // 鍏抽棴鏍囩鎵撳嵃寮规
-    closePrintDialog () {
+    closePrintDialog() {
       this.printDialog = false
     },
     // 鑾峰彇鎸囨淳浜哄憳涓嬫媺鍒楄〃
     getAuthorizedPerson() {
-      selectUserCondition({type: 1}).then(res => {
+      selectUserCondition({ type: 1 }).then(res => {
         let data = []
         res.data.forEach(a => {
           data.push({
@@ -923,54 +942,79 @@
     },
     // 璇︽儏
     selectAllByOne(row) {
-      this.active = 2;
-      // console.log(row);
-      // //鎵撳紑寮规
-      // this.dialogVisible = true;
-      // //row = 鐐瑰嚮瀵瑰簲琛屽��
-      // //澶嶅埗缁檉ormData
-      // this.formData = this.HaveJson(row);
-      this.currentId = row.id
-      this.examine = 1
+      this.$router.push({
+        path: "/productOrder/add", query: {
+          examine: 1,
+          active: 2,
+          currentId: row.id
+        }
+      });
     },
     // 鏁版嵁鏌ョ湅
     handleDataLook(row) {
-      this.componentDataDataLook.entity.id = row.id
       this.dataDialogVisible = true;
+      this.currentRow = row;
+      this.getDataTableList(this.currentRow)
     },
-    // 闄勪欢鏌ョ湅
-    handleFileLook (row) {
-      this.componentData0.entity.insOrderId = row.id;
-      this.filesDialogVisible = true
-      this.$nextTick(() => {
-        this.$refs.fileList.selectList()
+    // 鏌ヨ鏁版嵁鏌ョ湅鍒楄〃鏁版嵁
+    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) {
+      this.filesDialogVisible = true
+      this.getFileList(row)
+    },
+    getFileList(row) {
+      this.tableLoadingFile = true
+      getFileList({ insOrderId: row.id }).then(res => {
+        this.tableLoadingFile = false
+        if (res.code === 200) {
+          this.tableDataFile = res.data.records
+          this.pageFile.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoadingFile = false
+      })
+    },
+    paginationFile(page) {
+      this.pageFile.size = page.limit
+      this.getFileList()
+    },
     // 闄勪欢涓嬭浇
-    handleDown(row){
+    handleDown(row) {
       downFile({
         id: row.id,
       }).then(res => {
-        if (res.code === 200) {
-          let url = '';
-          if(res.data.type==1){
-            url = this.javaApi+'/img/'+res.data.fileUrl
-            file.downloadIamge(url,row.fileName)
-          }else{
-            url = this.javaApi+'/word/'+res.data.fileUrl
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = row.fileName;
-            link.click();
-          }
-        }
+        this.$download.saveAs(res.data.fileUrl, row.fileName);
       }).catch(error => {
 
       })
     },
     // 涓嬭浇鎶ュ憡
     download(row) {
-      let url = row.urlS?row.urlS:row.url;
+      let url = row.urlS ? row.urlS : row.url;
       if(url){
         url = url.split('.')[0]+'.pdf'
         const link = document.createElement('a');
@@ -980,75 +1024,77 @@
         link.click();
       }
     },
-    // 瀹℃牳
-    handleVerify(row) {
-      // this.verifyDialogVisible = true;
-      this.active = 3;
-      this.currentId = row.id
-      this.examine = 1
-    },
     // 鎾ら攢
     handlEquash(row) {
-      if(this.tabIndex!=1){
+      if (this.tabIndex != 1) {
         this.quashDialogVisible = true;
-        this.insOrderRow=row
-      }else{
-        // this.componentDataDelete.entity.orderId = row.id
+        this.insOrderRow = row
+      } else {
         this.orderId = row.id
         this.revocationInsProductIds = ''
-        this.componentDataDelete.showSelect= true
-        this.componentDataDelete.select= true
         this.deleteTilte = '鎾ら攢'
-        this.deleteDialogVisible = true;
+        this.deleteDialogVisible = true
+        this.getDeleteList()
       }
     },
-    selectDelete(arr){
+    getDeleteList() {
+      this.tableLoadingDelete = true
+      selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => {
+        this.tableLoadingDelete = false
+        this.componentDataDelete = res.data.records
+        this.pageDelete.total = res.data.total
+      }).catch(err => {
+        this.tableLoadingDelete = false
+      })
+    },
+    paginationDelete(page) {
+      this.pageDelete.size = page.limit
+      this.getDeleteList()
+    },
+    selectDelete(arr) {
       this.deleteList = arr;
     },
-    submitDelete(){
-      if(this.deleteTilte=='鎾ら攢'){
-        if(this.deleteList.length==0){
+    submitDelete() {
+      if (this.deleteTilte == '鎾ら攢') {
+        if (this.deleteList.length == 0) {
           this.$message.error('璇烽�夋嫨瑕佹挙閿�鐨勯」')
           return
         }
-        let ids = this.deleteList.map(m=>m.id).join(',')
+        let ids = this.deleteList.map(m => m.id).join(',')
         this.printLoading = true;
-        updateInspected({ids: ids,orderId: this.orderId}).then(res=>{
-          if (res.code===200){
-            this.printLoading=false
-            this.deleteDialogVisible=false
+        updateInspected({ ids: ids, orderId: this.orderId }).then(res => {
+          if (res.code === 200) {
+            this.printLoading = false
+            this.deleteDialogVisible = false
             this.refreshTable('page')
             this.$message.success("鏇存柊鎴愬姛")
           }
         })
-      }else{
-        checkUpdate({orderId: this.orderId, state: 1}).then(res=>{
-          if (res.code===200){
-            this.printLoading=false
-            this.deleteDialogVisible=false
+      } else {
+        checkUpdate({ orderId: this.orderId, state: 1 }).then(res => {
+          if (res.code === 200) {
+            this.printLoading = false
+            this.deleteDialogVisible = false
             this.refreshTable('page')
             this.$message.success("鏇存柊鎴愬姛")
           }
         })
       }
     },
-    handlEquashCheck(row){
-      // this.componentDataDelete.entity.orderId = row.id
+    handlEquashCheck(row) {
       this.orderId = row.id
       this.revocationInsProductIds = row.revocationInsProductIds
-      this.componentDataDelete.showSelect= false
-      this.componentDataDelete.select= false
       this.deleteTilte = '鎾ら攢瀹℃牳'
       this.deleteDialogVisible = true;
     },
-    handleNo(){
-      if(this.deleteTilte=='鎾ら攢'){
-        this.deleteDialogVisible=false
-      }else{
-        checkUpdate({orderId: this.orderId, state: 0}).then(res=>{
-          if (res.code===200){
-            this.printLoading=false
-            this.deleteDialogVisible=false
+    handleNo() {
+      if (this.deleteTilte == '鎾ら攢') {
+        this.deleteDialogVisible = false
+      } else {
+        checkUpdate({ orderId: this.orderId, state: 0 }).then(res => {
+          if (res.code === 200) {
+            this.printLoading = false
+            this.deleteDialogVisible = false
             this.refreshTable('page')
             this.$message.success("鏇存柊鎴愬姛")
           }
@@ -1067,14 +1113,14 @@
         this.distributeData.type = row.type
       })
       upPlanUser2({
-        orderId:row.id,
+        orderId: row.id,
       }).then(res => {
-        if (res.code === 200&&res.data.length>0) {
+        if (res.code === 200 && res.data.length > 0) {
           this.sonLaboratoryList = [];
-          res.data.forEach(m=>{
+          res.data.forEach(m => {
             this.sonLaboratoryList.push({
-              value:m,
-              label:m
+              value: m,
+              label: m
             })
           })
         }
@@ -1086,11 +1132,11 @@
         return
       }
       //
-      if(this.distributeData.userId==null||this.distributeData.userId==''){
+      if (this.distributeData.userId == null || this.distributeData.userId == '') {
         this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
         return
       }
-      if(this.distributeData.userId&&(this.distributeData.sonLaboratory==null||this.distributeData.sonLaboratory=='')){
+      if (this.distributeData.userId && (this.distributeData.sonLaboratory == null || this.distributeData.sonLaboratory == '')) {
         this.$message.error('璇曢獙瀹ゆ湭濉啓')
         return
       }
@@ -1100,12 +1146,8 @@
         sampleId: this.distributeData.sampleId,
         appointed: this.distributeData.appointed,
         userId: this.distributeData.userId,
-        sonLaboratory:this.distributeData.sonLaboratory,
+        sonLaboratory: this.distributeData.sonLaboratory,
       }).then(res => {
-        if (res.code === 201) {
-          this.upLoad = false
-          return
-        }
         this.$message.success('淇敼鎴愬姛')
         this.upLoad = false
         this.issuedDialogVisible = false
@@ -1117,18 +1159,18 @@
     },
     submitForm() {
       this.upLoad = true;
-      if (this.tabIndex==1){
-        updateInspected({id: this.insOrderRow.id}).then(res=>{
-          if (res.code===200){
-            this.upLoad=false
-            this.quashDialogVisible=false
+      if (this.tabIndex == 1) {
+        updateInspected({ id: this.insOrderRow.id }).then(res => {
+          if (res.code === 200) {
+            this.upLoad = false
+            this.quashDialogVisible = false
             this.refreshTable()
             this.$message.success("鏇存柊鎴愬姛")
           }
         })
-      }else{
-        updateStatus({id: this.insOrderRow.id}).then(res=>{
-          if (res.code===200){
+      } else {
+        updateStatus({ id: this.insOrderRow.id }).then(res => {
+          if (res.code === 200) {
             this.upLoad = false
             this.quashDialogVisible = false
             this.refreshTable('page')
@@ -1136,7 +1178,7 @@
           }
         })
       }
-      let authorizedPerson = this.formData.authorizedPerson.length > 0 ? this.formData.authorizedPerson.join(',') : ''
+      let authorizedPerson = this.formData.authorizedPerson && this.formData.authorizedPerson.length > 0 ? this.formData.authorizedPerson.join(',') : ''
       delete this.formData.createTime
       delete this.formData.updateTime
       delete this.formData.createUser
@@ -1145,55 +1187,61 @@
     },
     // 涓嬪崟
     playOrder(num) {
-      this.$router.push({ path: "/productOrder/add", query: {examine: 0,active: num} });
+      this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } });
     },
-    handleTab(m, i) {
+    // 瀹℃牳
+    handleVerify(row) {
+      this.$router.push({ path: "/productOrder/add", query: { examine: 1, active: 3, currentId: row.id } });
+    },
+    handleTab(i) {
       this.tabIndex = i;
       this.refreshTable()
     },
     // 鏌ョ湅妫�楠屾暟鎹�
-    viewInspectInfo (row) {
+    viewInspectInfo(row) {
       //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃
       let inspectorList = []
-      if(row.userName){
+      if (row.userName) {
         inspectorList = row.userName.split(',')
       }
-      let user = JSON.parse(localStorage.getItem('user'))
-      if(user){
-        inspectorList.push(user.name)
-      }
-      this.inspectorList = inspectorList
-      this.sonLaboratory = row.sonLaboratory
-      this.state = 3;
-      this.typeSource = row.typeSource
-      this.orderId = row.id
+      inspectorList.push(this.nickName)
+      this.$router.push({
+        path: "/inspectionTask/inspection",
+        query: {
+          sonLaboratory: row.sonLaboratory,
+          state: 3,
+          typeSource: row.typeSource,
+          orderId: row.id,
+          inspectorList: inspectorList,
+        },
+      })
     },
     goback() {
       this.state = 0
       this.refreshTable('page')
     },
     // 鍒锋柊椤甸潰
-    refreshView () {
+    refreshView() {
       this.InspectionKey++
     },
-    changeUser(){
-      if(this.sonLaboratoryList.length>0){
+    changeUser() {
+      if (this.sonLaboratoryList.length > 0) {
         this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
       }
     },
-    handleDelete(row){
+    handleDelete(row) {
       this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning"
       }).then(() => {
-        delInsOrder({insOrderId: row.id}).then(res => {
+        delInsOrder({ insOrderId: row.id }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛')
           this.refreshTable()
         }).catch(e => {
           this.$message.error('鍒犻櫎澶辫触')
         })
-      }).catch(() => {})
+      }).catch(() => { })
     }
   }
 }
@@ -1204,6 +1252,7 @@
   justify-content: space-between;
   align-items: center;
 }
+
 .tab {
   list-style-type: none;
   display: flex;
@@ -1233,10 +1282,12 @@
   border-color: #3A7BFA;
   color: #3A7BFA;
 }
-.box-card >>>.el-radio__inner {
+
+.box-card>>>.el-radio__inner {
   border-radius: 2px !important;
 }
-.box-card >>>.el-radio__input.is-checked .el-radio__inner::after {
+
+.box-card>>>.el-radio__input.is-checked .el-radio__inner::after {
   content: '';
   width: 8px;
   height: 3px;
@@ -1252,13 +1303,16 @@
   border-radius: 0px;
   background: none;
 }
->>>.el-radio__label{
+
+>>>.el-radio__label {
   color: #000 !important;
 }
-.el-dialog__body >>>.el-radio__label{
+
+.el-dialog__body>>>.el-radio__label {
   font-size: 8px;
 }
-.el-dialog__body >>>.el-radio__input.is-checked .el-radio__inner::after {
+
+.el-dialog__body>>>.el-radio__input.is-checked .el-radio__inner::after {
   content: '';
   width: 4px;
   height: 3px;
@@ -1274,38 +1328,48 @@
   border-radius: 0px;
   background: none;
 }
->>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
+
+>>>.el-radio__input.is-disabled.is-checked .el-radio__inner {
   background: #3A7BFA;
 }
-.el-dialog__body >>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
+
+.el-dialog__body>>>.el-radio__input.is-disabled.is-checked .el-radio__inner {
   background: transparent;
 }
-.el-dialog__body >>>.el-radio__inner{
+
+.el-dialog__body>>>.el-radio__inner {
   width: 8px !important;
   height: 8px !important;
 }
-.el-dialog__body >>>.el-radio__label{
+
+.el-dialog__body>>>.el-radio__label {
   padding-left: 2px !important;
 }
-.el-dialog__body >>>.el-card__body{
+
+.el-dialog__body>>>.el-card__body {
   padding: 0 !important;
 }
-.el-dialog__body >>>.el-card {
+
+.el-dialog__body>>>.el-card {
   border: none;
 }
-.el-dialog__body >>>.el-radio__input.is-disabled .el-radio__inner{
+
+.el-dialog__body>>>.el-radio__input.is-disabled .el-radio__inner {
   border-color: #000 !important;
 }
-.el-dialog__body >>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
+
+.el-dialog__body>>>.el-radio__input.is-disabled.is-checked .el-radio__inner {
   border: none !important;
 }
-.scor{
+
+.scor {
   width: 0.01cm;
   height: 0.01cm;
   border-radius: 1px;
   border: 1px solid #000;
   display: inline-block;
 }
+
 .ellipsis-multiline {
   display: -webkit-box;
   -webkit-line-clamp: 2;
@@ -1313,8 +1377,11 @@
   overflow: hidden;
   text-overflow: ellipsis;
   word-wrap: break-word;
-  max-height: 3.0em; /* 楂樺害涓哄瓧浣撳ぇ灏忕殑涓ゅ�� */
-  line-height: 1.5em; /* 琛岄珮 */
-  height: 3.0em; /* 楂樺害涓鸿楂樼殑涓ゅ�� */
+  max-height: 3.0em;
+  /* 楂樺害涓哄瓧浣撳ぇ灏忕殑涓ゅ�� */
+  line-height: 1.5em;
+  /* 琛岄珮 */
+  height: 3.0em;
+  /* 楂樺害涓鸿楂樼殑涓ゅ�� */
 }
 </style>

--
Gitblit v1.9.3