From b0d4df5f39525ae7fe252e8ee65d85fd71dca721 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 07 五月 2026 14:53:32 +0800
Subject: [PATCH] 手动下单:检验中订单撤销报错问题修复
---
src/views/business/productOrder/index.vue | 560 +++++++++++++++++++++++++++++++++++--------------------
1 files changed, 357 insertions(+), 203 deletions(-)
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index a7a22f7..81f24ba 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -4,75 +4,89 @@
<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">
+ @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>
+ <el-input v-model="entity.sampleName" clearable placeholder="璇疯緭鍏�" size="small"
+ @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>
+ @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">
+ @change="refreshTable"
+ 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="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
- <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 === 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 class="container" v-loading="isLoading">
+ <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 === 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 === 1" size="small" type="primary" @click="openAddIns">娣诲姞妫�楠岄」</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>
+ </div>
</div>
- <div>
- <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 v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :isSelection="true" :handleSelectionChange="selectMethod"
+ @pagination="pagination" :height="50" :more="more" :key="upIndex" :page="page"
+ :tableLoading="tableLoading"></lims-table>
</div>
- </div>
- <div class="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>
@@ -92,7 +106,7 @@
<!-- 鎾ら攢 -->
<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>
@@ -116,8 +130,9 @@
<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 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>
@@ -125,7 +140,7 @@
<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">
+ 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>
@@ -135,9 +150,9 @@
<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%;">
+ style="width: 100%;">
<el-option v-for="(item, i) in sonLaboratoryList" :key="i + 'oooo'" :label="item.label"
- :value="item.value">
+ :value="item.value">
</el-option>
</el-select>
</div>
@@ -151,29 +166,38 @@
</el-row>
</span>
</el-dialog>
- <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
+ <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>
+ :height="100" key="tableDataLook" :page="tableDataLookPage"
+ :tableLoading="tableDataLookTableLoading"></lims-table>
</div>
</el-dialog>
<el-dialog :visible.sync="filesDialogVisible" title="闄勪欢鏌ョ湅" width="80%">
<div v-if="filesDialogVisible">
- <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px"
- key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
+ <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" :height="100"
+ 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;">
- <lims-table :tableData="componentDataDelete" :column="columnDelete" :isSelection="true"
- :handleSelectionChange="selectDelete" @pagination="paginationDelete" height="500px"
- key="componentDataDelete" :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
- </div>
+ <lims-table
+ v-if="deleteDialogVisible"
+ :tableData="componentDataDelete"
+ :column="columnDelete"
+ :isSelection="deleteTilte==='鎾ら攢'"
+ :handleSelectionChange="selectDelete"
+ @pagination="paginationDelete"
+ :height="150"
+ key="componentDataDelete"
+ :page="pageDelete"
+ :tableLoading="tableLoadingDelete">
+ </lims-table>
<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-button :loading="printLoading" type="primary"
+ @click="submitDelete">{{ deleteTilte == '鎾ら攢' ? '纭� 瀹�' : '閫氳繃' }}</el-button>
</el-row>
</span>
</el-dialog>
@@ -182,10 +206,11 @@
<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;"
- @change="handleCheckAllChange">鍏ㄩ��</el-checkbox>
+ @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;">
+ 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;">
@@ -199,8 +224,10 @@
</div>
<div style="margin-left: 50px;width: 100%;">
<el-row>
- <el-col style="font-weight: bold;font-size: 14px;"><span>鏍峰搧缂栧彿: </span>{{ item.sampleCode
- }}</el-col>
+ <el-col style="font-weight: bold;font-size: 14px;"><span>鏍峰搧缂栧彿: </span>{{
+ item.sampleCode
+ }}
+ </el-col>
</el-row>
<el-row style="margin-top: 1px;font-size: 14px;">
<el-col style="font-weight: bold;"><span>濮旀墭鍗曞彿: </span>{{ item.code }}</el-col>
@@ -220,8 +247,11 @@
<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>
@@ -238,10 +268,10 @@
</span>
</el-dialog>
<div class="el-dialog__body"
- style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
+ 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;">
+ 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">
@@ -251,7 +281,9 @@
<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>鏍峰搧缂栧彿: </span>{{
- item.sampleCode }}</el-col>
+ item.sampleCode
+ }}
+ </el-col>
</el-row>
<el-row style="font-size: 0.20cm;">
<el-col><span>濮旀墭鍗曞彿: </span>{{ item.code }}</el-col>
@@ -268,11 +300,13 @@
<el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
<el-col style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��:
</span>
- <span style="white-space: nowrap;"><span v-if="item.insState == 0">鈭�</span><span v-if="item.insState != 0"
- class="scor"></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 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>
@@ -295,34 +329,53 @@
</el-dialog>
<!--鏍囩鎵撳嵃寮规-->
<print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog"
- @closePrintDialog="closePrintDialog"></print-dialog>
+ @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"/>-->
+ <!--淇敼鏍峰搧鍨嬪彿寮规-->
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
+ :visible.sync="dialogVisible" title="淇敼鏍峰搧鍨嬪彿" width="80%">
+ <el-table ref="sampleTable" :data="sampleList" border highlight-current-row
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
+ max-height="400px" tooltip-effect="dark">
+ <el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column>
+ <el-table-column align="center" label="鏍峰搧鍚嶇О" min-width="100" prop="sample"></el-table-column>
+ <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="100" prop="sampleCode"></el-table-column>
+ <el-table-column align="center" label="鏍峰搧鍨嬪彿" min-width="60" prop="model">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.model" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
+ size="small"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodName"></el-table-column>
+ </el-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+ <el-button :loading="submitListLoad" type="primary" @click="submitList">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</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 {
- checkUpdate, delInsOrder,
+ checkUpdate, delInsOrder, getSampleByOrderId,
rawAllInsOrderExport,
selectInsOrderParameter, selectNoProducts, selectOrderManDay,
updateInspected,
- updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2
+ updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2
} from "@/api/business/productOrder";
-import { selectUserCondition } from "@/api/performance/class";
-import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
+import {selectUserCondition} from "@/api/performance/class";
+import {downFile, getFileList, selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder";
import {mapGetters} from "vuex";
-// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
+
export default {
+ name: 'ProductOrder',
components: {
limsTable,
AddInspectionDia,
@@ -331,6 +384,7 @@
},
data() {
return {
+ isLoading: false, // 鎺у埗鍔犺浇鐘舵��
entity: {
orderType: '',
state: '',
@@ -339,12 +393,30 @@
tableData: [],
tableLoading: false,
column: [
- { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: '160px' },
- { 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",
+ width: "160px",
+ dataType: "link",
+ linkMethod: "editSampleModel",
+ },
+ {label: '鏍峰搧鏁伴噺', prop: 'sampleNum'},
+ {label: '妫�楠屼汉', prop: 'testingName'},
{
dataType: 'tag',
label: '绱ф�ョ▼搴�',
@@ -368,9 +440,9 @@
}
}
},
- { label: '澶囨敞', prop: 'remark' },
- { label: '妫�楠岃繘搴�%', prop: 'insProgress' },
- { label: '绾﹀畾鏃堕棿', prop: 'appointed' },
+ {label: '澶囨敞', prop: 'remark'},
+ {label: '妫�楠岃繘搴�%', prop: 'insProgress'},
+ {label: '绾﹀畾鏃堕棿', prop: 'appointed'},
{
dataType: 'tag',
label: '妫�楠岀粨鏋�',
@@ -398,10 +470,10 @@
}
}
},
- { 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',
@@ -466,10 +538,10 @@
this.handlEquash(row);
},
disabled: (row, index) => {
- return row.state != 1 && row.state != 0
+ return (row.state !== 1 && row.state !== 0) || row.isRevocation !== 0
},
showHide: (row) => {
- return this.tabIndex === 0 || this.tabIndex === 1
+ return (this.tabIndex === 0 || this.tabIndex === 1)
}
},
{
@@ -479,7 +551,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
@@ -523,7 +595,7 @@
],
page: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
state: 0,// 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
@@ -547,25 +619,26 @@
quashDialogVisible: false,
issuedDialogVisible: false,
dataDialogVisible: false, // 鏁版嵁鏌ョ湅寮规
+ currentRow: {}, // 鏁版嵁鏌ョ湅寮规
tableDataLookTableLoading: false, // 鏁版嵁鏌ョ湅寮规
tableDataLook: [],
tableDataLookPage: {
total: 0,
- size: 10,
+ 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' },
+ {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: '缁撴灉鍒ゅ畾',
@@ -621,9 +694,9 @@
}
}
},
- { label: '闄勪欢鍚嶇О', prop: 'fileName' },
- { label: '涓婁紶浜�', prop: 'name' },
- { label: '涓婁紶鏃堕棿', prop: 'createTime' },
+ {label: '闄勪欢鍚嶇О', prop: 'fileName'},
+ {label: '涓婁紶浜�', prop: 'name'},
+ {label: '涓婁紶鏃堕棿', prop: 'createTime'},
{
dataType: 'action',
fixed: 'right',
@@ -642,7 +715,7 @@
],
pageFile: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
formData: {},
@@ -665,21 +738,21 @@
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' },
+ {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: 10,
+ size: 20,
current: 1
},
deleteDialogVisible: false,
@@ -728,7 +801,10 @@
multipleSelection: [],
sonLaboratoryList: [],
printDialog: false,
- addInspectionDia: false
+ addInspectionDia: false,
+ dialogVisible: false,
+ submitListLoad: false,
+ sampleList: []
}
},
watch: {
@@ -745,8 +821,16 @@
...mapGetters(["nickName"]),
},
mounted() {
+ if (this.checkPermi(['get:raw:await'])) {
+ this.tabIndex = 0
+ } else {
+ this.tabIndex = 2
+ }
this.refreshTable()
this.getAuthorizedPerson()
+ },
+ activated() {
+ this.refreshTable()
},
methods: {
// 鏌ヨ鍒楄〃鏁版嵁
@@ -760,9 +844,10 @@
this.entity.orderType = '鎶芥'
}
}
- const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
- this.tableLoading = true
- selectInsOrderParameter(params).then(res => {
+ const params = {...this.entity, state: this.tabList[this.tabIndex].value}
+ this.isLoading = true; // 寮�濮嬪姞杞�
+ selectInsOrderParameter({...this.page, ...params}).then(res => {
+ this.isLoading = false; // 缁撴潫鍔犺浇
this.upIndex++
this.tableLoading = false
if (res.code === 200) {
@@ -770,7 +855,7 @@
this.page.total = res.data.total
}
}).catch(err => {
- this.tableLoading = false
+ this.isLoading = false; // 缁撴潫鍔犺浇
})
},
refresh() {
@@ -783,8 +868,11 @@
},
// 鎵撳紑淇敼濮旀墭缂栧彿寮规
changeEntrustCode(row) {
+ if (this.tabIndex !== 1) {
+ return
+ }
this.entrustCodeVisible = true
- this.entrustCodeInfo = { ...row }
+ this.entrustCodeInfo = {...row}
},
// 鎻愪氦淇敼濮旀墭缂栧彿
submitCode() {
@@ -876,8 +964,14 @@
},
// 瀵煎嚭璁板綍
downLoad() {
- rawAllInsOrderExport({ ...this.entity }).then(res => {
- const blob = new Blob([res], { type: 'application/octet-stream' });
+ let params = {}
+ if (this.multipleSelection.length > 0) {
+ params.ids = this.multipleSelection.map(item => item.id).join(',');
+ } else {
+ 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);
@@ -901,7 +995,7 @@
},
// 鑾峰彇鎸囨淳浜哄憳涓嬫媺鍒楄〃
getAuthorizedPerson() {
- selectUserCondition({ type: 1 }).then(res => {
+ selectUserCondition({type: 1}).then(res => {
let data = []
res.data.forEach(a => {
data.push({
@@ -926,27 +1020,65 @@
this.dataDialogVisible = false;
this.upLoad = false;
},
- // 璇︽儏
+ // 鐐瑰嚮鏍峰搧鍚嶇О
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
+ if (this.tabIndex === 4) {
+ this.$router.push({
+ path: "/productOrder/addOrder", query: {
+ examine: 1,
+ active: 2,
+ currentId: row.id,
+ tabIndex: this.tabIndex,
+ }
+ });
+ } else {
+ this.$router.push({
+ path: "/productOrder/addView", query: {
+ examine: 1,
+ active: 2,
+ currentId: row.id,
+ tabIndex: this.tabIndex,
+ }
+ });
+ }
+
+ },
+ // 淇敼鏍峰搧鍨嬪彿
+ editSampleModel(row) {
+ if (this.tabIndex !== 1) {
+ return
+ }
+ this.dialogVisible = true
+ this.getDataList(row)
+ },
+ getDataList(row) {
+ this.dialogVisible = true
+ getSampleByOrderId({insOrderId: row.id}).then(res => {
+ this.sampleList = res.data
+ })
+ },
+ // 鎻愪氦鏍峰搧鍨嬪彿淇敼
+ submitList() {
+ this.submitListLoad = true
+ updateSampleModel(this.sampleList).then(res => {
+ this.submitListLoad = false
+ this.dialogVisible = false
+ this.$message.success('淇敼鎴愬姛')
+ this.refreshTable()
+ }).catch(err => {
+ this.submitListLoad = false
+ })
},
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
this.dataDialogVisible = true;
- this.getDataTableList(row)
+ this.currentRow = row;
+ this.getDataTableList(this.currentRow)
},
// 鏌ヨ鏁版嵁鏌ョ湅鍒楄〃鏁版嵁
getDataTableList(row) {
this.tableDataLookTableLoading = true
- selectSampleAndProductByOrderId({ id: row.id }).then(res => {
+ selectSampleAndProductByOrderId({id: row.id, ...this.tableDataLookPage}).then(res => {
this.tableDataLookTableLoading = false
if (res.code === 200) {
this.tableDataLook = res.data.records
@@ -958,7 +1090,15 @@
},
tableDataLookPagination(page) {
this.tableDataLookPage.size = page.limit
- this.getDataTableList()
+ this.getDataTableList(this.currentRow)
+ },
+ closeDia() {
+ this.tableDataLookPage = {
+ total: 0,
+ size: 20,
+ current: 1
+ }
+ this.dataDialogVisible = false
},
// 闄勪欢鏌ョ湅
handleFileLook(row) {
@@ -967,7 +1107,7 @@
},
getFileList(row) {
this.tableLoadingFile = true
- getFileList({ insOrderId: row.id }).then(res => {
+ getFileList({insOrderId: row.id}).then(res => {
this.tableLoadingFile = false
if (res.code === 200) {
this.tableDataFile = res.data.records
@@ -986,30 +1126,26 @@
downFile({
id: row.id,
}).then(res => {
- if (res.code === 200) {
- let url = '';
- if (res.data.type == 1) {
- url = this.javaApi + '/img/' + res.data.fileUrl
- this.$download.saveAs(url, row.fileName);
- } else {
- url = this.javaApi + '/word/' + res.data.fileUrl
- this.$download.saveAs(url, row.fileName);
- }
- }
+ this.$download.saveAs(res.data.fileUrl, row.fileName);
}).catch(error => {
})
},
// 涓嬭浇鎶ュ憡
download(row) {
- let url = this.javaApi + '/word/' + row.urlS ? row.urlS : row.url;
+ let url = row.urlS ? row.urlS : row.url;
if (url) {
- this.$download.saveAs(url, this.downLoadInfo.fileName);
+ url = url.split('.')[0] + '.pdf'
+ const link = document.createElement('a');
+ link.href = this.javaApi + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
}
},
// 鎾ら攢
handlEquash(row) {
- if (this.tabIndex != 1) {
+ if (this.tabIndex !== 1) {
this.quashDialogVisible = true;
this.insOrderRow = row
} else {
@@ -1022,7 +1158,11 @@
},
getDeleteList() {
this.tableLoadingDelete = true
- selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => {
+ selectNoProducts({
+ orderId: this.orderId,
+ revocationInsProductIds: this.revocationInsProductIds,
+ ...this.pageDelete
+ }).then(res => {
this.tableLoadingDelete = false
this.componentDataDelete = res.data.records
this.pageDelete.total = res.data.total
@@ -1038,14 +1178,14 @@
this.deleteList = arr;
},
submitDelete() {
- if (this.deleteTilte == '鎾ら攢') {
- if (this.deleteList.length == 0) {
- this.$message.error('璇烽�夋嫨瑕佹挙閿�鐨勯」')
+ 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)
this.printLoading = true;
- updateInspected({ ids: ids, orderId: this.orderId }).then(res => {
+ updateInspected({ids: ids, orderId: this.orderId}).then(res => {
if (res.code === 200) {
this.printLoading = false
this.deleteDialogVisible = false
@@ -1054,7 +1194,7 @@
}
})
} else {
- checkUpdate({ orderId: this.orderId, state: 1 }).then(res => {
+ checkUpdate({orderId: this.orderId, state: 1}).then(res => {
if (res.code === 200) {
this.printLoading = false
this.deleteDialogVisible = false
@@ -1068,13 +1208,16 @@
this.orderId = row.id
this.revocationInsProductIds = row.revocationInsProductIds
this.deleteTilte = '鎾ら攢瀹℃牳'
- this.deleteDialogVisible = true;
+ this.getDeleteList()
+ this.$nextTick(() => {
+ this.deleteDialogVisible = true;
+ })
},
handleNo() {
if (this.deleteTilte == '鎾ら攢') {
this.deleteDialogVisible = false
} else {
- checkUpdate({ orderId: this.orderId, state: 0 }).then(res => {
+ checkUpdate({orderId: this.orderId, state: 0}).then(res => {
if (res.code === 200) {
this.printLoading = false
this.deleteDialogVisible = false
@@ -1131,10 +1274,6 @@
userId: this.distributeData.userId,
sonLaboratory: this.distributeData.sonLaboratory,
}).then(res => {
- if (res.code === 201) {
- this.upLoad = false
- return
- }
this.$message.success('淇敼鎴愬姛')
this.upLoad = false
this.issuedDialogVisible = false
@@ -1147,7 +1286,7 @@
submitForm() {
this.upLoad = true;
if (this.tabIndex == 1) {
- updateInspected({ id: this.insOrderRow.id }).then(res => {
+ updateInspected({id: this.insOrderRow.id}).then(res => {
if (res.code === 200) {
this.upLoad = false
this.quashDialogVisible = false
@@ -1156,7 +1295,7 @@
}
})
} else {
- updateStatus({ id: this.insOrderRow.id }).then(res => {
+ updateStatus({id: this.insOrderRow.id}).then(res => {
if (res.code === 200) {
this.upLoad = false
this.quashDialogVisible = false
@@ -1174,14 +1313,15 @@
},
// 涓嬪崟
playOrder(num) {
- this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } });
+ this.$router.push({path: "/productOrder/addOrder", query: {examine: 0, active: num, tabIndex: this.tabIndex}});
},
// 瀹℃牳
handleVerify(row) {
- this.$router.push({ path: "/productOrder/add", query: { examine: 1, active: 3, currentId: row.id } });
+ this.$router.push({path: "/productOrder/addView", query: {examine: 1, active: 3, currentId: row.id}});
},
handleTab(i) {
this.tabIndex = i;
+ this.multipleSelection = []
this.refreshTable()
},
// 鏌ョ湅妫�楠屾暟鎹�
@@ -1192,16 +1332,29 @@
inspectorList = row.userName.split(',')
}
inspectorList.push(this.nickName)
- this.$router.push({
- path: "/inspectionTask/inspection",
- query: {
- sonLaboratory: row.sonLaboratory,
- state: 3,
- typeSource: row.typeSource,
- orderId: row.id,
- inspectorList: inspectorList,
- },
- })
+ if (this.checkPermi(['business:inspectionView'])) {
+ this.$router.push({
+ name: "InspectionView",
+ query: {
+ sonLaboratory: row.sonLaboratory,
+ state: 3,
+ typeSource: row.typeSource,
+ orderId: row.id,
+ inspectorList: inspectorList,
+ },
+ })
+ } else {
+ this.$router.push({
+ path: "/inspectionTask/inspection",
+ query: {
+ sonLaboratory: row.sonLaboratory,
+ state: 3,
+ typeSource: row.typeSource,
+ orderId: row.id,
+ inspectorList: inspectorList,
+ },
+ })
+ }
},
goback() {
this.state = 0
@@ -1222,13 +1375,14 @@
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(() => {
+ })
}
}
}
@@ -1270,11 +1424,11 @@
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;
@@ -1291,15 +1445,15 @@
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;
@@ -1316,36 +1470,36 @@
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;
}
--
Gitblit v1.9.3