From ce2570f8555ff6668da4f149521b4620bdd9d8bf Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 23 九月 2026 15:25:22 +0800
Subject: [PATCH] feat(order): 添加订单委托要求字段并优化界面流程 - 新增分包内容、样品处置、结果评价、报告交付方式等委托要求字段 - 添加分包单位信息、报告寄送地址、收件人电话等关联信息录入功能 - 更新订单状态标签,新增作废状态和全部状态页签 - 调整报告准备页面审批流程,防止审核人和批准人为同一人
---
src/views/CNAS/process/disposal/sampleReceipt/index.vue | 530 +++++++++++------------
src/api/business/sampleReceipt.js | 47 ++
src/views/business/productOrder/components/addOrder.vue | 105 ++++
src/views/CNAS/process/demand/index.vue | 101 ----
src/views/business/reportPreparation/index.vue | 12
src/views/business/productOrder/components/addView.vue | 45 +
src/views/business/inspectionView/index.vue | 31
src/views/business/inspectionTask/inspection.vue | 31
src/views/business/productOrder/index.vue | 276 -----------
src/views/business/inspectionTask/index.vue | 130 -----
10 files changed, 499 insertions(+), 809 deletions(-)
diff --git a/src/api/business/sampleReceipt.js b/src/api/business/sampleReceipt.js
new file mode 100644
index 0000000..aa7d8d0
--- /dev/null
+++ b/src/api/business/sampleReceipt.js
@@ -0,0 +1,47 @@
+// 鏍峰搧鎺ユ敹椤甸潰鐩稿叧鎺ュ彛
+import request from '@/utils/request'
+
+// 鏍峰搧鎺ユ敹鍒嗛〉鏌ヨ
+export function pageSampleReceipt(query) {
+ return request({
+ url: '/insSampleReceipt/page',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏍峰搧鎺ユ敹璇︽儏
+export function getSampleReceipt(id) {
+ return request({
+ url: '/insSampleReceipt/' + id,
+ method: 'get'
+ })
+}
+
+// 鎻愪氦妫�楠�
+export function submitSampleReceipt(data) {
+ return request({
+ url: '/insSampleReceipt/submit',
+ method: 'post',
+ data: data
+ })
+}
+
+// 鎷掓敹鏍峰搧
+export function rejectSampleReceipt(data) {
+ return request({
+ url: '/insSampleReceipt/reject',
+ method: 'post',
+ data: data
+ })
+}
+
+// 鏍峰搧鎺ユ敹瀵煎嚭
+export function exportSampleReceipt(query) {
+ return request({
+ url: '/insSampleReceipt/export',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue
index 7bf37d2..8dc84a2 100644
--- a/src/views/CNAS/process/demand/index.vue
+++ b/src/views/CNAS/process/demand/index.vue
@@ -24,9 +24,6 @@
</el-form-item>
</el-form>
</div>
- <div style="text-align: right; margin-bottom: 10px">
- <el-button size="small" type="primary" @click="goAdd">鏂板</el-button>
- </div>
<div class="table">
<el-table v-loading="tableListLoading" :data="tableList"
height="630" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
@@ -72,32 +69,6 @@
@current-change="handleCurrentChange1">
</el-pagination>
</div>
- <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="orderRowsVisible"
- title="鏂板妫�楠屼换鍔″崟" width="1000px">
- <div style="display: flex; align-items: center;margin-bottom: 10px">
- <span style="width: 80px">濮旀墭缂栧彿锛�</span>
- <el-input v-model="entity.entrustCode" clearable size="small"
- style="width: 300px;margin-right: 10px"></el-input>
- <el-button size="small" type="primary" @click="searchTableData">鏌ヨ</el-button>
- <el-button size="small" @click="refreshTableData">閲� 缃�</el-button>
- </div>
- <el-table v-loading="tableLoading" :data="tableData"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- height="550" style="width: 100%">
- <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column>
- <el-table-column label="濮旀墭缂栧彿" prop="entrustCode"></el-table-column>
- <el-table-column label="鏍峰搧鍚嶇О" prop="sample"></el-table-column>
- <el-table-column align="center" label="鎿嶄綔">
- <template slot-scope="scope">
- <el-button align="center" size="mini" type="text" @click="goAddOrder(scope.row)">鏂板濮旀墭鍗�</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total"
- layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange"
- @current-change="handleCurrentChange">
- </el-pagination>
- </el-dialog>
<el-dialog :class="{ downPdf: title == '涓嬭浇' }" :close-on-click-modal="false" :close-on-press-escape="false"
:modal="title != '涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px">
<div style="max-height: 75vh;overflow-y: auto;">
@@ -386,8 +357,6 @@
</div>
<span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
<el-button @click="detailDialogVisible = false">鍙� 娑�</el-button>
- <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭�
- 瀹�</el-button>
<el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭�
瀹�</el-button>
</span>
@@ -406,8 +375,8 @@
<script>
import {
- addInspectionOrder, delInspectionOrder, exportInspectionOrder,
- getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne,
+ delInspectionOrder, exportInspectionOrder,
+ getInspectionOrderOne,
pageInspectionOrder,
updateInspectionOrder
} from "@/api/cnas/process/demand/demand";
@@ -449,7 +418,6 @@
},
],
operationType: '',
- orderRowsVisible: false,
tableList: [],
tableListLoading: false,
pages: {
@@ -528,47 +496,6 @@
}
this.refreshTable()
},
- // 鎵撳紑鏂板寮规
- goAdd() {
- this.operationType = 'add'
- this.title = '鏂板妫�楠屽鎵樺崟';
- this.orderRowsVisible = true
- this.searchTableData()
- },
- // 鏌ヨ鍙柊澧炵殑妫�楠屽崟
- searchTableData() {
- this.tableLoading = true
- getInsOrderOnInspection({
- ...this.tableSearch,
- ...this.entity
- }).then(res => {
- this.tableLoading = false
- this.tableData = res.data.records
- this.total = res.data.total
- }).catch(err => {
- this.tableLoading = false
- })
- },
- // 閲嶇疆妫�楠屽崟鍒楄〃
- refreshTableData() {
- this.entity = {
- entrustCode: ''
- }
- this.tableSearch = {
- current: 1,
- size: 20,
- }
- this.searchTableData()
- },
- // 妫�楠屽崟鍒楄〃鍒嗛〉
- handleSizeChange(val) {
- this.tableSearch.size = val
- this.searchTableData();
- },
- handleCurrentChange(val) {
- this.tableSearch.current = val
- this.searchTableData();
- },
// 鍒楄〃鍒嗛〉
handleSizeChange1(val) {
this.pages.size = val
@@ -578,19 +505,6 @@
this.pages.current = val
this.refreshTable();
},
- // 鎻愪氦鏂板
- handleAdd() {
- this.buttonLoading = true
- addInspectionOrder(this.currentInfo).then(res => {
- this.buttonLoading = false
- this.$message.success('鏂板鎴愬姛')
- this.detailDialogVisible = false
- this.orderRowsVisible = false
- this.refreshTable()
- }).catch(err => {
- this.buttonLoading = false
- })
- },
// 鎻愪氦淇敼
handleEdit() {
this.buttonLoading = true
@@ -598,20 +512,9 @@
this.buttonLoading = false
this.$message.success('鏂板鎴愬姛')
this.detailDialogVisible = false
- this.orderRowsVisible = false
this.refreshTable()
}).catch(err => {
this.buttonLoading = false
- })
- },
- // 鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯�
- goAddOrder(row) {
- getInspectionOrderByInsOderId({ insOrderId: row.id }).then(res => {
- this.currentInfo = res.data
- this.title = '鏂板妫�楠屽鎵樺崟';
- this.detailDialogVisible = true
- }).catch(err => {
- console.log('err----', err)
})
},
// 鎵撳紑缂栬緫寮规
diff --git a/src/views/CNAS/process/disposal/sampleReceipt/index.vue b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
index 46ada41..cdd34e3 100644
--- a/src/views/CNAS/process/disposal/sampleReceipt/index.vue
+++ b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
@@ -1,119 +1,102 @@
<template>
- <div class="capacity-scope">
- <div style="display: flex;justify-content: space-between;align-items: flex-start">
- <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true">
- <el-form-item label="鏀舵牱鏃ユ湡" prop="receiveDate">
- <el-date-picker v-model="queryParams0.receiveDate" type="date" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" size="small" @change="refreshTable()">
- </el-date-picker>
+ <div class="app-container">
+ <div class="search">
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
+ <el-input v-model="queryParams.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍峰搧缂栧彿" prop="sampleCode">
+ <el-input v-model="queryParams.sampleCode" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName">
+ <el-input v-model="queryParams.sampleName" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</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>
- <el-button size="small" @click="handleDown0">瀵煎嚭</el-button>
</div>
- <div class="table">
- <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading0"
- key="tableData0"
- :height="'calc(100vh - 240px)'" :page="page0" @pagination="pagination0">
- <div slot="action" slot-scope="scope">
- <el-button type="text" @click="handleAdd(scope.row)">缂栬緫</el-button>
- <el-button type="text" @click="delRow(scope.row)">
- <span style="color: #F56C6C">鍒犻櫎</span>
- </el-button>
+ <div class="container">
+ <div class="table-tab">
+ <div>
+ <ul class="tab">
+ <li :class="{ active: tabIndex === 0 }" @click="handleTab(0)">寰呮帴鏀�</li>
+ <li :class="{ active: tabIndex === 1 }" @click="handleTab(1)">宸叉彁浜�</li>
+ <li :class="{ active: tabIndex === 2 }" @click="handleTab(2)">宸叉嫆鏀�</li>
+ <li :class="{ active: tabIndex === 3 }" @click="handleTab(3)">宸插彇娑�</li>
+ <li :class="{ active: tabIndex === 4 }" @click="handleTab(4)">鍏ㄩ儴</li>
+ </ul>
</div>
- </lims-table>
+ <div>
+ <el-button size="small" @click="handleExport">瀵煎嚭</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" @pagination="pagination"
+ :height="'calc(100vh - 280px)'" :key="upIndex" :page="page" :tableLoading="tableLoading">
+ <template slot="inspectionItem" slot-scope="scope">
+ <div style="white-space: pre-line; text-align: left; padding: 4px 0;">{{ scope.row.inspectionItem }}</div>
+ </template>
+ <template slot="remark" slot-scope="scope">
+ <span>{{ scope.row.status === 2 && scope.row.rejectRemark ? scope.row.rejectRemark : scope.row.remark }}</span>
+ </template>
+ <template slot="action" slot-scope="scope">
+ <el-button v-if="scope.row.status === 0" type="text" @click="handleEdit(scope.row)">缂栬緫</el-button>
+ <el-button v-else type="text" @click="handleView(scope.row)">鏌ョ湅</el-button>
+ </template>
+ </lims-table>
+ </div>
</div>
- <!-- 鏂板鏍峰搧 -->
- <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px">
- <el-row>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏀舵牱鏃ユ湡锛�</div>
- <div class="search_input">
- <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" style="width: 100%;">
- </el-date-picker>
- </div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏍峰搧鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.sampleName"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏍峰搧缂栧彿锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.sampleCode"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏁伴噺锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.num"></el-input>
- </div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏉ユ牱鍗曚綅锛�</div>
- <div class="search_input">
- <el-select v-model="addInfo.sampleSupplier" size="small">
- <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
- :key="item.id"></el-option>
- </el-select>
- </div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鐣欐牱鏃ユ湡锛�</div>
- <div class="search_input">
- <el-date-picker v-model="addInfo.leaveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" style="width: 100%;">
- </el-date-picker>
- </div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏍峰搧鐘舵�侊細</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.sampleState"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">澶勭悊鏃ユ湡锛�</div>
- <div class="search_input">
- <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" style="width: 100%;">
- </el-date-picker>
- </div>
- </div>
- </el-col>
- </el-row>
+
+ <!-- 缂栬緫/鏌ョ湅寮圭獥 -->
+ <el-dialog :title="isEdit ? '缂栬緫' : '鏌ョ湅'" :visible.sync="editDialogVisible" width="500px"
+ :close-on-click-modal="false">
+ <el-form ref="editForm" :model="currentInfo" label-width="110px" size="small">
+ <el-form-item label="鏍峰搧鍚嶇О">
+ <el-input v-model="currentInfo.sampleName" disabled></el-input>
+ </el-form-item>
+ <el-form-item label="鏍峰搧缂栧彿">
+ <el-input v-model="currentInfo.sampleCode" disabled></el-input>
+ </el-form-item>
+ <el-form-item label="濮旀墭缂栧彿">
+ <el-input v-model="currentInfo.entrustCode" disabled></el-input>
+ </el-form-item>
+ <el-form-item label="鏂规硶鏍囧噯">
+ <el-input v-model="currentInfo.methodStandard" disabled></el-input>
+ </el-form-item>
+ <el-form-item label="妫�娴嬮」鐩�">
+ <el-input v-model="currentInfo.inspectionItem" type="textarea" :rows="3" disabled></el-input>
+ </el-form-item>
+ <el-form-item label="涓绘楠屼汉" required>
+ <el-select v-model="currentInfo.mainInspectorId" clearable filterable placeholder="璇烽�夋嫨" size="small"
+ style="width: 100%;" :disabled="!isEdit">
+ <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
<span slot="footer" class="dialog-footer">
- <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="submitAdd" :loading="addLoading">纭� 瀹�</el-button>
+ <el-button @click="editDialogVisible = false">鍙� 娑�</el-button>
+ <el-button v-if="isEdit" type="danger" :loading="rejectLoading" @click="openReject">鎷掓敹鏍峰搧</el-button>
+ <el-button v-if="isEdit" type="primary" :loading="submitLoading" @click="handleSubmit">鎻愪氦妫�楠�</el-button>
</span>
</el-dialog>
- <!-- 璇︽儏/涓嬭浇/瀹℃牳/鎵瑰噯 -->
- <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '涓嬭浇' }"
- :modal="title0 != '涓嬭浇'" top="5vh">
- <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
- style="max-height: 70vh;overflow-y: auto;" />
- <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
- <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
- <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
+
+ <!-- 鎷掓敹澶囨敞寮圭獥 -->
+ <el-dialog title="鎷掓敹鏍峰搧" :visible.sync="rejectDialogVisible" width="400px" :close-on-click-modal="false">
+ <el-form ref="rejectForm" :model="rejectInfo" label-width="90px" size="small">
+ <el-form-item label="鎷掓敹澶囨敞" prop="remark" required>
+ <el-input v-model="rejectInfo.remark" type="textarea" :rows="3" maxlength="500" show-word-limit
+ placeholder="璇疯緭鍏ユ嫆鏀跺娉�"></el-input>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="rejectDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="danger" :loading="rejectLoading" @click="handleReject">纭� 瀹�</el-button>
</span>
</el-dialog>
</div>
@@ -121,220 +104,223 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
-import filePreview from "@/components/Preview/filePreview.vue";
-import { selectCustomPageList } from "@/api/system/customer";
+import { selectUserCondition } from "@/api/performance/class";
import {
- pageProcessSample,
- delProcessSample,
- addProcessSample,
- exportProcessSample
-} from "@/api/cnas/process/sampleDisposal";
+ pageSampleReceipt,
+ submitSampleReceipt,
+ rejectSampleReceipt,
+ exportSampleReceipt
+} from "@/api/business/sampleReceipt";
+
export default {
name: 'SampleReceipt',
components: {
limsTable,
- filePreview,
},
data() {
return {
- activeName: '濉啓',
- title: '鏂板',
- addDialogVisible: false,
- addLoading: false,
- outLoading: false,
- editDialogVisible: false,
- lookDialogVisible: false,
- title0: '鏌ョ湅',
- noCheckLoading: false,
- checkLoading: false,
- // 鍘嗗彶鍒楄〃
- addInfo: {},//鏂板鏍峰搧
- customPageList: [],
- currentInfo: {
- arr: []
- },//鏌ョ湅鐨勮鎯�
- queryParams0: {
- receiveDate: ''
- },
- tableLoading0: false,
- tableData0: [],
- column0: [
- {
- label: "鏀舵牱鏃ユ湡",
- prop: "receiveDate",
- },
- {
- label: "鏍峰搧缂栧彿",
- prop: "sampleCode",
- },
- {
- label: "鏍峰搧鍚嶇О",
- prop: "sampleName",
- },
- {
- label: "鏍峰搧鏁伴噺",
- prop: "num",
- },
- {
- label: "鏉ユ牱鍗曚綅",
- prop: "sampleSupplier",
- },
- {
- label: "鐣欐牱鏃ユ湡",
- prop: "leaveDate",
- },
- {
- label: "鏍峰搧鐘舵��",
- prop: "sampleState",
- },
- {
- label: "閫�鏍风鏀�/澶勭悊鏃ユ湡",
- prop: "dealTime",
- },
- {
- dataType: "slot",
- slot: "action",
- label: "鎿嶄綔",
- }
+ tabIndex: 0,
+ tabList: [
+ { label: '寰呮帴鏀�', value: 0 },
+ { label: '宸叉彁浜�', value: 1 },
+ { label: '宸叉嫆鏀�', value: 2 },
+ { label: '宸插彇娑�', value: 3 },
+ { label: '鍏ㄩ儴', value: null },
],
- page0: {
+ queryParams: {
+ entrustCode: '',
+ sampleCode: '',
+ sampleName: '',
+ },
+ tableLoading: false,
+ upIndex: 0,
+ tableData: [],
+ page: {
total: 0,
size: 10,
- current: 0,
+ current: 1,
},
+ column: [
+ { label: '鏍峰搧鍚嶇О', prop: 'sampleName' },
+ { label: '鏍峰搧缂栧彿', prop: 'sampleCode' },
+ { label: '妫�娴嬮」鐩�', prop: 'inspectionItem', dataType: 'slot', slot: 'inspectionItem', width: '220px' },
+ { label: '濮旀墭缂栧彿', prop: 'entrustCode' },
+ { label: '鏂规硶鏍囧噯', prop: 'methodStandard' },
+ { label: '涓绘浜虹瀛�', prop: 'mainInspectorName' },
+ { label: '澶囨敞', prop: 'remark', dataType: 'slot', slot: 'remark', width: '180px' },
+ { label: '鎿嶄綔', dataType: 'slot', slot: 'action', width: '120px' },
+ ],
+ personList: [],
+ editDialogVisible: false,
+ rejectDialogVisible: false,
+ isEdit: true,
+ currentInfo: {},
+ rejectInfo: {},
+ submitLoading: false,
+ rejectLoading: false,
};
},
mounted() {
- this.getList0()
+ this.getPersonList();
+ this.getList();
},
methods: {
- // 鑾峰彇閫佹牱鍗曚綅鍒楄〃
- getCustomPageList() {
- selectCustomPageList({
- current: -1,
- size: -1
- }).then(res => {
- this.customPageList = res.data.records
+ getPersonList() {
+ selectUserCondition({ type: 1 }).then(res => {
+ this.personList = (res.data || []).map(a => ({ label: a.name, value: a.id }));
}).catch(err => { });
+ },
+ handleTab(i) {
+ this.tabIndex = i;
+ this.refreshTable();
},
refresh() {
- this.queryParams0 = {};
- this.page0.current = 1;
- this.getList0();
+ this.queryParams = { entrustCode: '', sampleCode: '', sampleName: '' };
+ this.page.current = 1;
+ this.getList();
},
refreshTable() {
- this.page0.current = 1;
- this.getList0();
+ this.page.current = 1;
+ this.getList();
},
- // 鏌ヨ琛ㄦ牸鏁版嵁
- getList0() {
- this.tableLoading0 = true;
- let param = { ...this.queryParams0, ...this.page0 };
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ let status = this.tabList[this.tabIndex].value;
+ if (status !== null && status !== undefined) {
+ param.status = status;
+ }
delete param.total;
- pageProcessSample({ ...param })
- .then((res) => {
- this.tableLoading0 = false;
- if (res.code === 200) {
- this.tableData0 = res.data.records;
- this.page0.total = res.data.total;
- }
- })
- .catch((err) => {
- this.tableLoading0 = false;
+ pageSampleReceipt(param).then(res => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ this.upIndex++;
+ }
+ }).catch(err => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ handleEdit(row) {
+ this.isEdit = true;
+ this.currentInfo = { ...row, mainInspectorId: row.mainInspectorId || null };
+ this.editDialogVisible = true;
+ },
+ handleView(row) {
+ this.isEdit = false;
+ this.currentInfo = { ...row, mainInspectorId: row.mainInspectorId || null };
+ this.editDialogVisible = true;
+ },
+ handleSubmit() {
+ if (!this.currentInfo.mainInspectorId) {
+ this.$message.error('璇烽�夋嫨涓绘楠屼汉');
+ return;
+ }
+ this.$confirm('纭灏嗚鏍峰搧鎻愪氦鑷虫楠屼换鍔★紵', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ this.submitLoading = true;
+ submitSampleReceipt({
+ receiptId: this.currentInfo.receiptId,
+ mainInspectorId: this.currentInfo.mainInspectorId,
+ }).then(res => {
+ this.submitLoading = false;
+ this.editDialogVisible = false;
+ this.$message.success('鎻愪氦鎴愬姛');
+ this.refreshTable();
+ }).catch(err => {
+ this.submitLoading = false;
});
+ }).catch(() => { });
},
- pagination0({ page, limit }) {
- this.page0.current = page;
- this.page0.size = limit;
- this.getList0();
+ openReject() {
+ this.rejectInfo = { remark: '' };
+ this.rejectDialogVisible = true;
},
- // 鎵撳紑缂栬緫寮规
- handleAdd(row) {
- this.addInfo = this.HaveJson(row)
- this.title = '缂栬緫'
- this.addDialogVisible = true
- this.getCustomPageList()
- },
- delRow(row) {
- this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- delProcessSample({ id: row.id }).then(res => {
- if (res.code == 200) {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.refreshTable();
- }
- }).catch(err => { });
- })
- .catch(() => { });
- },
- // 鎻愪氦鏂板
- submitAdd() {
- // 缂栬緫
- this.addLoading = true
- addProcessSample({
- ...this.addInfo
- }).then(res => {
- this.addLoading = false
- this.addDialogVisible = false
- this.$message({
- type: 'success',
- message: '缂栬緫鎴愬姛!'
+ handleReject() {
+ if (!this.rejectInfo.remark || !this.rejectInfo.remark.trim()) {
+ this.$message.error('璇峰~鍐欐嫆鏀跺娉�');
+ return;
+ }
+ this.$confirm('鎷掓敹鍚庡鎵樺皢浣滃簾涓斾笉鑳借繘鍏ユ楠屼换鍔★紝鏄惁缁х画锛�', '璀﹀憡', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ this.rejectLoading = true;
+ rejectSampleReceipt({
+ receiptId: this.currentInfo.receiptId,
+ remark: this.rejectInfo.remark,
+ }).then(res => {
+ this.rejectLoading = false;
+ this.rejectDialogVisible = false;
+ this.editDialogVisible = false;
+ this.$message.success('鎷掓敹鎴愬姛');
+ this.refreshTable();
+ }).catch(err => {
+ this.rejectLoading = false;
});
- this.page0.current = 1;
- this.refreshTable();
- }).catch(err => { });
+ }).catch(() => { });
},
- // 瀵煎嚭璇︽儏
- handleDown0() {
- exportProcessSample({ receiveDate: this.queryParams0.receiveDate }).then(res => {
- this.outLoading = false
- const blob = new Blob([res], { type: 'application/msword' });
- this.$download.saveAs(blob, '鏍峰搧鎺ユ敹' + '.docx');
- })
+ handleExport() {
+ let param = { ...this.queryParams };
+ let status = this.tabList[this.tabIndex].value;
+ if (status !== null && status !== undefined) {
+ param.status = status;
+ }
+ exportSampleReceipt(param).then(res => {
+ const blob = new Blob([res], { type: 'application/octet-stream' });
+ this.$download.saveAs(blob, '鏍峰搧鎺ユ敹瀵煎嚭.xlsx');
+ }).catch(err => {
+ console.log('err---', err);
+ });
},
},
}
</script>
<style scoped>
-.search_thing {
- width: 350px;
+.table-tab {
display: flex;
+ justify-content: space-between;
align-items: center;
}
-.search_label {
- width: 110px;
+.tab {
+ list-style-type: none;
+ display: flex;
+ margin-bottom: 12px;
+ margin-top: 0;
+ padding-left: 0;
+}
+
+.tab li {
+ line-height: 24px;
+ padding: 6px 14px;
font-size: 14px;
- text-align: right;
+ color: #333333;
+ border: 1px solid #EEEEEE;
+ cursor: pointer;
}
-.search_input {
- width: calc(100% - 110px);
+.tab li:nth-child(1) {
+ border-radius: 8px 0 0 8px;
}
-.downPdf {
- opacity: 0 !important;
+.tab li:nth-child(5) {
+ border-radius: 0 8px 8px 0;
}
-.tables td {
- height: 40px;
- width: 100px;
- text-align: center;
- font-size: 14px;
- word-wrap: break-word;
- white-space: normal;
-}
-
-.user-info .el-button {
- margin: 0;
-}
-
->>>.el-tabs__content {
- height: 100%;
+.tab li.active {
+ border-color: #3A7BFA;
+ color: #3A7BFA;
}
</style>
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 5c66bd9..5cd38be 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -49,7 +49,6 @@
:rowClassName="rowClassName" :height="'calc(100vh - 300px)'" @pagination="pagination"
key="tableData0">
<div slot="action" slot-scope="scope">
- <el-button size="small" type="text" @click="handleDataLook(scope.row)">鏁版嵁鏌ョ湅</el-button>
<el-button type="text" size="small"
:disabled="(scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5) && checkPermi(['update:product:onPlan'])"
@click="editInspection(scope.row)">淇敼妫�楠屽��</el-button>
@@ -134,22 +133,6 @@
<el-button @click="connectVisible = false">鍙� 娑�</el-button>
<el-button :loading="loading" type="primary" @click="confirmConnect">纭� 瀹�</el-button>
</span>
- </el-dialog>
- <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
- <div v-if="dataDialogVisible" style="height: 74vh; overflow-y: auto">
- <div>
- <el-form :model="entity" :inline="true">
- <el-form-item label="妫�楠岄」" prop="outputWorkTime">
- <el-input v-model="entity.inspectionItem" clearable size="small"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" @click="getLookList">鏌ヨ</el-button>
- </el-form-item>
- </el-form>
- </div>
- <lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading"
- :height="'60vh'" @pagination="lookPagination" key="tableData1" :key="upIndex"></lims-table>
- </div>
</el-dialog>
<el-dialog :visible.sync="bindDialogVisible" title="妫�楠岄」缁戝畾" width="600px">
<div slot="title" style="
@@ -241,7 +224,6 @@
bindingProductTreeByProductId,
delProductTreeByProductId,
selectInsOrderPlanList,
- selectSampleAndProductByOrderId,
} from "@/api/business/inspectionTask.js";
import { treeDevice } from "@/api/cnas/resourceDemand/device.js";
import { mapGetters } from "vuex";
@@ -291,7 +273,6 @@
],
active: 1,
tabIndex: 0,
- dataDialogVisible: false,
planTotal: 0,
insStateList: [],
state: 0, // 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
@@ -320,7 +301,6 @@
retestInfo: [],
isCopper: null,
bindCurrentInfo: {},
- lookInfo: {},
orderTypeList: [
{
value: "Customer-ordered test",
@@ -466,88 +446,6 @@
type: "",
},
],
- // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---寮�濮�
- entity: {
- inspectionItem: "",
- },
- lookTableData: [],
- lookColumn: [
- {
- label: "鏍峰搧缂栧彿",
- prop: "sampleCode",
- width: "140px",
- mergeCol: true, //鍚堝苟鍒�
- },
- { label: "鏍峰搧鍚嶇О", prop: "sample", width: "140px", mergeCol: true },
- { label: "妫�楠岄」鍒嗙被", prop: "inspectionItemClass" },
- { label: "妫�楠岄」", prop: "inspectionItem", width: "140px" },
- { label: "妫�楠屽瓙椤�", prop: "inspectionItemSubclass" },
- { label: "鍗曚綅", prop: "unit" },
- { label: "鏍峰搧鍨嬪彿", prop: "model", mergeCol: true },
- { label: "鏉′欢", prop: "radius" },
- { label: "鐢电紗鏍囪瘑", prop: "cableTag" },
- { label: "璇曢獙瑕佹眰", prop: "tell" },
- { label: "妫�楠岀粨鏋�", prop: "lastValue" },
- {
- label: "缁撴灉鍒ゅ畾",
- prop: "insResult",
- dataType: "tag",
- formatData: (params) => {
- let obj = this.insResultList.find((m) => m.value == params)
- if (obj) {
- return this.insResultList.find((m) => m.value == params).label;
- } else {
- return null
- }
- },
- formatType: (params) => {
- let obj = this.insResultList.find((m) => m.value == params)
- if (obj) {
- return this.insResultList.find((m) => m.value == params).type;
- } else {
- return null
- }
- },
- },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "涓嶅悎鏍煎娴嬫煡鐪�",
- type: "text",
- clickFun: (row) => {
- this.getRetestResultInfo(row);
- },
- disabled: (row) => {
- return row.insResult!=0
- },
- },
- {
- name: "妫�楠岄」缁戝畾",
- type: "text",
- clickFun: (row) => {
- this.getBinding(row);
- },
- disabled: (row) => {
- return (
- this.lookInfo.userName == null ||
- this.lookInfo.insState == 3 ||
- this.lookInfo.insState == 5
- );
- },
- },
- ],
- },
- ],
- lookPage: {
- total: 0,
- size: 20,
- current: 0,
- },
- lookTableLoading: false,
- // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫
retestVisible: false,
upIndex: 0,
tabLabel: ''
@@ -600,29 +498,6 @@
this.page.size = limit;
this.getList();
},
- getLookList() {
- this.lookTableLoading = true;
- let param = { id: this.lookInfo.id, ...this.lookPage, inspectionItem: this.entity.inspectionItem };
- delete param.total;
- selectSampleAndProductByOrderId({ ...param })
- .then((res) => {
- this.lookTableLoading = false;
- if (res.code === 200) {
- this.lookTableData = res.data.records;
- this.lookPage.total = res.data.total;
- this.upIndex++
- this.dataDialogVisible = true;
- }
- })
- .catch((err) => {
- this.lookTableLoading = false;
- });
- },
- lookPagination({ page, limit }) {
- this.lookPage.current = page;
- this.lookPage.size = limit;
- this.getLookList();
- },
// 淇敼妫�楠屽��
editInspection(row) {
this.$refs.editInspectionItem.showDialog(row.id);
@@ -630,11 +505,6 @@
// 鏌ョ湅宸ユ椂
viewManHour(row) {
this.$refs.viewManHourDia.showDialog(row.id, row.insState);
- },
- // 鏁版嵁鏌ョ湅
- handleDataLook(row) {
- this.lookInfo = row;
- this.getLookList();
},
changeCheckBox(val) {
this.queryParams.userId = val ? 0 : null;
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 6852d28..64d1911 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -872,14 +872,7 @@
},
created() {
this.saveQueue = Promise.resolve();
- let { sonLaboratory, orderId, state, inspectorList, typeSource } =
- this.$route.query;
- this.sonLaboratory = sonLaboratory;
- this.orderId = orderId;
- this.id = this.orderId;
- this.state = state;
- this.inspectorList = inspectorList;
- this.typeSource = typeSource;
+ this.syncRouteContext();
},
mounted() {
this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
@@ -891,6 +884,7 @@
this.scrollInit();
},
activated() {
+ this.syncRouteContext();
this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
this.getInsStateDicts();
this.getComparisonList();
@@ -963,6 +957,23 @@
this.stopWorker();
},
methods: {
+ syncRouteContext() {
+ const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
+ const orderChanged = this.id !== orderId;
+ this.sonLaboratory = sonLaboratory;
+ this.orderId = orderId;
+ this.state = state;
+ this.inspectorList = inspectorList;
+ this.typeSource = typeSource;
+ if (orderChanged) {
+ this.tableLists = [];
+ this.tableList = [];
+ this.sampleProduct = [];
+ this.currentSample = {};
+ this.currentTable = null;
+ this.id = orderId;
+ }
+ },
standardDisplayName(value) {
if (!value) return '-';
const separatorIndex = value.indexOf(' - ');
@@ -1734,9 +1745,7 @@
repetitionTag: this.repetitionTag
});
this.tableLoading = false;
- if (res.data.length > 0) {
- return res.data;
- }
+ return Array.isArray(res.data) ? res.data : [];
},
// 鍒囨崲鏍峰搧
async handleChangeSample(row, column, event) {
diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
index c5a7b6f..ca8bc0e 100644
--- a/src/views/business/inspectionView/index.vue
+++ b/src/views/business/inspectionView/index.vue
@@ -763,14 +763,7 @@
},
created() {
this.saveQueue = Promise.resolve();
- let { sonLaboratory, orderId, state, inspectorList, typeSource } =
- this.$route.query;
- this.sonLaboratory = sonLaboratory;
- this.orderId = orderId;
- this.id = this.orderId;
- this.state = state;
- this.inspectorList = inspectorList;
- this.typeSource = typeSource;
+ this.syncRouteContext();
},
mounted() {
this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
@@ -782,6 +775,7 @@
this.scrollInit();
},
activated() {
+ this.syncRouteContext();
this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
this.getInsStateDicts();
this.getComparisonList();
@@ -851,6 +845,23 @@
this.stopWorker();
},
methods: {
+ syncRouteContext() {
+ const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
+ const orderChanged = this.id !== orderId;
+ this.sonLaboratory = sonLaboratory;
+ this.orderId = orderId;
+ this.state = state;
+ this.inspectorList = inspectorList;
+ this.typeSource = typeSource;
+ if (orderChanged) {
+ this.tableLists = [];
+ this.tableList = [];
+ this.sampleProduct = [];
+ this.currentSample = {};
+ this.currentTable = null;
+ this.id = orderId;
+ }
+ },
// 鏂囦欢绠$悊--寮�濮�
getList() {
this.tableLoading = true;
@@ -1520,9 +1531,7 @@
repetitionTag: this.repetitionTag
});
this.tableLoading = false;
- if (res.data.length > 0) {
- return res.data;
- }
+ return Array.isArray(res.data) ? res.data : [];
},
// 鍒囨崲鏍峰搧
async handleChangeSample(row, column, event) {
diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index 7376ef4..6b3bcf9 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -147,9 +147,67 @@
</el-col>
</el-row>
<el-row :gutter="16">
+ <el-col :span="6">
+ <el-form-item label="鍒嗗寘鍐呭">
+ <el-radio-group v-model="addObj.subcontractType" :disabled="active>1" size="mini">
+ <el-radio :label="1" border style="margin-right: 0">鏈�</el-radio>
+ <el-radio :label="0" border>鏃�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏍峰搧澶勭疆">
+ <el-radio-group v-model="addObj.sampleDisposal" :disabled="active>1" size="mini">
+ <el-radio :label="1" border style="margin-right: 0">濮旀墭鏂瑰彇鍥�</el-radio>
+ <el-radio :label="2" border>妫�娴嬫柟澶勭疆</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="瀵圭粨鏋滆瘎浠�">
+ <el-radio-group v-model="addObj.resultEvaluation" :disabled="active>1" size="mini">
+ <el-radio :label="1" border style="margin-right: 0">鏄�</el-radio>
+ <el-radio :label="0" border>鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鎶ュ憡浜や粯鏂瑰紡">
+ <el-radio-group v-model="addObj.reportDelivery" :disabled="active>1" size="mini">
+ <el-radio :label="1" border style="margin-right: 0">鑷彇</el-radio>
+ <el-radio :label="2" border>蹇��</el-radio>
+ <el-radio :label="3" border>鐢靛瓙浼犻��</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row v-if="addObj.subcontractType === 1" :gutter="16">
<el-col :span="12">
+ <el-form-item label="鍒嗗寘鍗曚綅淇℃伅">
+ <el-input v-model="addObj.subcontractCompany" :disabled="active>1" size="small"
+ placeholder="璇峰~鍐欏垎鍖呭崟浣嶄俊鎭�"/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row v-if="addObj.reportDelivery === 2" :gutter="16">
+ <el-col :span="12">
+ <el-form-item label="鎶ュ憡瀵勯�佸湴鍧�">
+ <el-input v-model="addObj.reportAddress" :disabled="active>1" size="small"
+ placeholder="璇峰~鍐欐姤鍛婂瘎閫佸湴鍧�"/>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鏀朵欢浜哄強鐢佃瘽">
+ <el-input v-model="addObj.reportReceiver" :disabled="active>1" size="small"
+ placeholder="璇峰~鍐欐敹浠朵汉鍙婄數璇�"/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="16">
+ <el-col :span="24">
<el-form-item label="澶囨敞">
- <el-input v-model="addObj.remark" :disabled="active>1" size="small"/>
+ <el-input v-model="addObj.remark" :disabled="active>1" size="small"
+ placeholder="鍙�夛紝琛ュ厖璇存槑濮旀墭浜嬮」"/>
</el-form-item>
</el-col>
</el-row>
@@ -768,7 +826,6 @@
import {
addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
getQuarterOnOrder, judgeNotSpotCheckOrder, selectInsOrderTemplateById,
- selectOrderManDay,
updateInsOrder,
upInsOrder,
upInsOrderOfState
@@ -855,6 +912,13 @@
sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級
productionDate: null,
sampleDate: null,
+ subcontractType: 0,
+ subcontractCompany: '',
+ sampleDisposal: 1,
+ resultEvaluation: 0,
+ reportDelivery: 1,
+ reportAddress: '',
+ reportReceiver: '',
},
addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯
orderType: [
@@ -1348,6 +1412,19 @@
this.$message.error('璇峰~鍐欐娴嬩緷鎹�佸鎵樺崟浣嶃�佹楠岀被鍒拰鏍峰搧鏁伴噺');
return;
}
+ if (this.addObj.subcontractType == null || this.addObj.sampleDisposal == null
+ || this.addObj.resultEvaluation == null || this.addObj.reportDelivery == null) {
+ this.$message.error('璇烽�夋嫨鍒嗗寘鍐呭銆佹牱鍝佸缃�佸缁撴灉璇勪环鍜屾姤鍛婁氦浠樻柟寮�');
+ return;
+ }
+ if (this.addObj.subcontractType === 1 && !this.addObj.subcontractCompany) {
+ this.$message.error('鍒嗗寘鍐呭涓烘湁鏃讹紝璇峰~鍐欏垎鍖呭崟浣嶄俊鎭�');
+ return;
+ }
+ if (this.addObj.reportDelivery === 2 && (!this.addObj.reportAddress || !this.addObj.reportReceiver)) {
+ this.$message.error('鎶ュ憡浜や粯鏂瑰紡涓哄揩閫掓椂锛岃濉啓鎶ュ憡瀵勯�佸湴鍧�鍜屾敹浠朵汉鍙婄數璇�');
+ return;
+ }
this.saveData([]);
return;
}
@@ -1619,17 +1696,10 @@
company: this.addObj.company
}).then(res => {
this.saveLoad = false
- this.$message.success('鎻愪氦鎴愬姛')
- selectOrderManDay({
- id: this.currentId
- }).then(ress => {
- this.distributeData.orderId = this.currentId
- this.distributeData.appointed = ress.data
- })
- setTimeout(() => {
- this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
- this.issuedDialogVisible = true;
- }, 1000)
+ this.$message.success('瀹℃牳閫氳繃')
+ this.closeOpenPage()
+ }).catch(() => {
+ this.saveLoad = false
})
} else {
// 涓嶉�氳繃
@@ -1973,6 +2043,7 @@
this.templateLoading = true;
addInsOrderTemplate({
name: this.templateName,
+ standardTreeId: this.addObj.standardTreeId || null,
thing: JSON.stringify({
addObj: this.addObj,
sampleList: this.sampleList,
@@ -1994,7 +2065,8 @@
// 鏌ヨ妯℃澘
selectInsOrderTemplateById(e) {
selectInsOrderTemplateById({id: e}).then(res => {
- let obj = JSON.parse(res.data)
+ const detail = res.data || {}
+ let obj = JSON.parse(detail.thing)
//鍒跺崟浜鸿缃负褰撳墠鐧诲綍鐢ㄦ埛
let user = this.nickName
obj.addObj.custom = user.name
@@ -2002,6 +2074,11 @@
this.addObj = obj.addObj;
this.sampleList = obj.sampleList;
this.selectTree = obj.selectTree
+ // backend already resolved the bound record templates by standard
+ if (detail.standardTreeId) {
+ this.$set(this.addObj, 'standardTreeId', detail.standardTreeId)
+ }
+ this.boundTemplateList = this.sortTemplateList(detail.templateBindings)
this.rowClick(this.sampleList[0])
})
},
diff --git a/src/views/business/productOrder/components/addView.vue b/src/views/business/productOrder/components/addView.vue
index cd295a3..5019a6c 100644
--- a/src/views/business/productOrder/components/addView.vue
+++ b/src/views/business/productOrder/components/addView.vue
@@ -70,6 +70,13 @@
</div>
<span v-else class="order-detail__empty">鏆傛湭缁戝畾鍘熷璁板綍妯℃澘</span>
</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder" label="鍒嗗寘鍐呭">{{ subcontractTypeLabel }}</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder" label="鏍峰搧澶勭疆">{{ sampleDisposalLabel }}</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder" label="瀵圭粨鏋滆瘎浠�">{{ resultEvaluationLabel }}</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder" label="鎶ュ憡浜や粯鏂瑰紡">{{ reportDeliveryLabel }}</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder && addObj.subcontractType === 1" label="鍒嗗寘鍗曚綅淇℃伅" :span="4">{{ addObj.subcontractCompany || '-' }}</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder && addObj.reportDelivery === 2" label="鎶ュ憡瀵勯�佸湴鍧�" :span="2">{{ addObj.reportAddress || '-' }}</el-descriptions-item>
+ <el-descriptions-item v-if="isNewJuOrder && addObj.reportDelivery === 2" label="鏀朵欢浜哄強鐢佃瘽" :span="2">{{ addObj.reportReceiver || '-' }}</el-descriptions-item>
<el-descriptions-item label="澶囨敞" :span="4">{{ addObj.remark || '-' }}</el-descriptions-item>
</el-descriptions>
<el-form v-show="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px"
@@ -677,7 +684,6 @@
import {
addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
getQuarterOnOrder, selectInsOrderTemplateById,
- selectOrderManDay,
updateInsOrder,
upInsOrder,
upInsOrderOfState
@@ -706,6 +712,28 @@
item => String(item.value) === String(this.addObj.orderType)
)
return hit ? hit.label : (this.addObj.orderType || '-')
+ },
+ // 鏂拌仛鐩寸粦妯℃澘涓嬪崟锛氬睍绀哄鎵樿姹傚瓧娈�
+ isNewJuOrder() {
+ return (this.boundTemplateList || []).length > 0
+ },
+ subcontractTypeLabel() {
+ if (this.addObj.subcontractType === 1) return '鏈�'
+ if (this.addObj.subcontractType === 0) return '鏃�'
+ return '-'
+ },
+ sampleDisposalLabel() {
+ const map = {1: '濮旀墭鏂瑰彇鍥�', 2: '妫�娴嬫柟澶勭疆'}
+ return map[this.addObj.sampleDisposal] || '-'
+ },
+ resultEvaluationLabel() {
+ if (this.addObj.resultEvaluation === 1) return '鏄�'
+ if (this.addObj.resultEvaluation === 0) return '鍚�'
+ return '-'
+ },
+ reportDeliveryLabel() {
+ const map = {1: '鑷彇', 2: '蹇��', 3: '鐢靛瓙浼犻��'}
+ return map[this.addObj.reportDelivery] || '-'
},
},
dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
@@ -1415,17 +1443,10 @@
company: this.addObj.company
}).then(res => {
this.saveLoad = false
- this.$message.success('鎻愪氦鎴愬姛')
- selectOrderManDay({
- id: this.currentId
- }).then(ress => {
- this.distributeData.orderId = this.currentId
- this.distributeData.appointed = ress.data
- })
- setTimeout(() => {
- this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
- this.issuedDialogVisible = true;
- }, 1000)
+ this.$message.success('瀹℃牳閫氳繃')
+ this.closeOpenPage()
+ }).catch(() => {
+ this.saveLoad = false
})
} else {
// 涓嶉�氳繃
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index e6db73e..114f96d 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -43,17 +43,16 @@
<div class="table-tab">
<div>
<ul class="tab">
- <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</li>
+ <li :class="{ active: tabIndex === 7 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(7)">鍏ㄩ儴</li>
<li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">妫�楠屼腑</li>
<li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">濮旀墭宸叉</li>
- <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">鎶芥牱宸叉</li>
<li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">閫�鍥�</li>
<li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">鎾ら攢</li>
- <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(6)">鍏ㄩ儴</li>
+ <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(6)">浣滃簾</li>
</ul>
</div>
<div>
- <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small"
+ <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 7" size="small"
@click="downLoad">瀵煎嚭</el-button>
<el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
<el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
@@ -105,55 +104,6 @@
<el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button>
</el-row>
</span>
- </el-dialog>
- <!-- 涓嬪彂 -->
- <el-dialog :before-close="handleClose" :visible.sync="issuedDialogVisible" title="妫�楠屽垎閰�" width="400px">
- <div class="body" style="max-height: 60vh;">
- <el-row>
- <el-col class="search_thing" style="width: 95%;">
- <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div>
- <div class="search_input">
- <el-date-picker v-model="distributeData.appointed" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
- style="width: 100%;" type="date" value-format="yyyy-MM-dd">
- </el-date-picker>
- </div>
- </el-col>
- <el-col class="search_thing" style="width: 95%;">
- <div class="search_label"><span class="required-span">* </span>鎸囨淳浜哄憳锛�</div>
- <div class="search_input">
- <el-select v-model="distributeData.userId" clearable filterable placeholder="璇烽�夋嫨" size="small"
- style="width: 100%;" @change="changeUser">
- <el-option v-for="(item, i) in personList" :key="i + 'gbnm.'" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- </el-col>
- <el-col class="search_thing" style="width: 95%;">
- <div class="search_label">璇曢獙瀹わ細</div>
- <div class="search_input">
- <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="璇烽�夋嫨" size="small"
- style="width: 100%;">
- <el-option v-for="(item, i) in newJuLaboratoryList" :key="i + 'oooo'" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- </el-col>
- </el-row>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-row>
- <el-button @click="handleClose2">鍙� 娑�</el-button>
- <el-button :loading="upLoad" type="primary" @click="submitForm2">纭� 瀹�</el-button>
- </el-row>
- </span>
- </el-dialog>
- <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%" @close="closeDia">
- <div v-if="dataDialogVisible">
- <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" @pagination="tableDataLookPagination"
- height="500px" key="tableDataLook" :page="tableDataLookPage"
- :tableLoading="tableDataLookTableLoading"></lims-table>
- </div>
</el-dialog>
<el-dialog :visible.sync="filesDialogVisible" title="闄勪欢鏌ョ湅" width="80%">
<div v-if="filesDialogVisible">
@@ -329,12 +279,10 @@
selectInsOrderParameter,
selectNoProducts,
getRevocationInsProductList,
- selectOrderManDay,
updateInspected,
- updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder
+ updateOrderEntrustCode, updateSampleModel, updateStatus
} from "@/api/business/productOrder";
-import { selectUserCondition } from "@/api/performance/class";
-import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
+import { downFile, getFileList } from "@/api/business/rawMaterialOrder";
import {mapGetters} from "vuex";
export default {
name: 'ProductOrder',
@@ -386,6 +334,7 @@
{ label: '涓嬪崟鏃堕棿', prop: 'createTime' },
{ label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
{ label: '閫�鍥炵悊鐢�', prop: 'tell' },
+ { label: '鎷掓敹鍘熷洜', prop: 'sampleRejectRemark' },
{ label: '濮旀墭浜�', prop: 'prepareUser' },
{
dataType: 'action',
@@ -400,29 +349,16 @@
}
},
{
- name: '鏁版嵁鏌ョ湅',
- type: 'text',
- clickFun: (row) => {
- this.handleDataLook(row);
- },
- disabled: (row, index) => {
- return row.state != 1 && row.state != 4
- },
- showHide: (row) => {
- return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
- }
- },
- {
name: '闄勪欢鏌ョ湅',
type: 'text',
clickFun: (row) => {
this.handleFileLook(row);
},
disabled: (row, index) => {
- return row.state != 1 && row.state != 4
+ return row.state != 1 && row.state != 4 && row.state != 5
},
showHide: (row) => {
- return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+ return this.tabIndex === 1 || this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6 || this.tabIndex === 7
}
},
{
@@ -432,7 +368,7 @@
this.download(row);
},
showHide: (row) => {
- return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+ return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7
}
},
{
@@ -475,19 +411,6 @@
}
},
{
- name: '鍒嗛厤',
- type: 'text',
- clickFun: (row) => {
- this.handleIssued(row);
- },
- disabled: (row, index) => {
- return row.state != 1 || !!row.assign
- },
- showHide: (row) => {
- return this.tabIndex === 1
- }
- },
- {
name: '鍒犻櫎',
type: 'text',
clickFun: (row) => {
@@ -504,7 +427,7 @@
this.viewInspectInfo(row);
},
showHide: (row) => {
- return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6
+ return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7
}
},
]
@@ -534,56 +457,6 @@
isQuash: false,
verifyDialogVisible: false,
quashDialogVisible: false,
- issuedDialogVisible: false,
- dataDialogVisible: false, // 鏁版嵁鏌ョ湅寮规
- currentRow: {}, // 鏁版嵁鏌ョ湅寮规
- tableDataLookTableLoading: false, // 鏁版嵁鏌ョ湅寮规
- tableDataLook: [],
- tableDataLookPage: {
- total: 0,
- size: 20,
- current: 1
- },
- tableDataLookColumn: [
- { label: '鏍峰搧缂栧彿', prop: 'sampleCode', width: '160px' },
- { label: '鏍峰搧鍚嶇О', prop: 'sample' },
- { label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass' },
- { label: '妫�楠岄」', prop: 'inspectionItem' },
- { label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass' },
- { label: '鍗曚綅', prop: 'unit' },
- { label: '鏍峰搧鍨嬪彿', prop: 'model' },
- { label: '鏉′欢', prop: 'radius' },
- { label: '鐢电紗鏍囪瘑', prop: 'cableTag' },
- { label: '璇曢獙瑕佹眰', prop: 'tell' },
- { label: '妫�楠岀粨鏋�', prop: 'lastValue' },
- {
- dataType: 'tag',
- label: '缁撴灉鍒ゅ畾',
- prop: 'insResult',
- formatData: (params) => {
- if (params == 1) {
- return '鍚堟牸'
- } else if (params == 0) {
- return '涓嶅悎鏍�'
- } else if (params == 3) {
- return '涓嶅垽瀹�'
- } else {
- return ''
- }
- },
- formatType: (params) => {
- if (params == 1) {
- return 'success'
- } else if (params == 0) {
- return 'danger'
- } else if (params == 3) {
- return ''
- } else {
- return ''
- }
- }
- },
- ],
filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规
tableDataFile: [],
tableLoadingFile: false,
@@ -638,18 +511,9 @@
formData: {},
formData0: {},
formData1: {},
- distributeData: {
- orderId: '',
- sampleId: '',
- appointed: '',
- userId: '',
- sonLaboratory: ''
- },
entrustCodeVisible: false, // 淇敼濮旀墭缂栧彿寮规
entrustCodeInfo: {},
submitCodeLoading: false,
- // 浜哄憳鍒楄〃
- personList: [],
orderId: '',
revocationInsProductIds: '',
componentDataDelete: [],
@@ -699,11 +563,15 @@
value: 3
},
{
+ label: '浣滃簾',
+ value: 5
+ },
+ {
label: '鍏ㄩ儴',
value: -2
}
],
- tabIndex: 0,
+ tabIndex: 7,
active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
currentId: null,
more: false,
@@ -732,21 +600,13 @@
}
}
},
- dicts: ['sys_sub_lab'],
computed: {
...mapGetters(["nickName"]),
- newJuLaboratoryList() {
- return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '鏂拌仛')
- },
},
mounted() {
- if (this.checkPermi(['get:raw:await'])) {
- this.tabIndex = 0
- } else {
- this.tabIndex = 2
- }
+ // 鍏嶅鏍稿悗娌℃湁寰呭鏍搁〉绛撅紝榛樿杩涘叆鍏ㄩ儴
+ this.tabIndex = this.checkPermi(['get:insOrder:all']) ? 7 : 1
this.refreshTable()
- this.getAuthorizedPerson()
},
activated() {
this.refreshTable()
@@ -897,31 +757,9 @@
closePrintDialog() {
this.printDialog = false
},
- // 鑾峰彇鎸囨淳浜哄憳涓嬫媺鍒楄〃
- getAuthorizedPerson() {
- selectUserCondition({ type: 1 }).then(res => {
- let data = []
- res.data.forEach(a => {
- data.push({
- label: a.name,
- value: a.id
- })
- })
- this.personList = data
- })
- },
handleClose() {
this.verifyDialogVisible = false;
this.quashDialogVisible = false;
- this.issuedDialogVisible = false;
- this.dataDialogVisible = false;
- this.upLoad = false;
- },
- handleClose2() {
- this.verifyDialogVisible = false;
- this.quashDialogVisible = false;
- this.issuedDialogVisible = false;
- this.dataDialogVisible = false;
this.upLoad = false;
},
// 鐐瑰嚮鏍峰搧鍚嶇О
@@ -972,37 +810,6 @@
}).catch(err => {
this.submitListLoad = false
})
- },
- // 鏁版嵁鏌ョ湅
- handleDataLook(row) {
- this.dataDialogVisible = true;
- this.currentRow = row;
- this.getDataTableList(this.currentRow)
- },
- // 鏌ヨ鏁版嵁鏌ョ湅鍒楄〃鏁版嵁
- getDataTableList(row) {
- this.tableDataLookTableLoading = true
- selectSampleAndProductByOrderId({ id: row.id, ...this.tableDataLookPage }).then(res => {
- this.tableDataLookTableLoading = false
- if (res.code === 200) {
- this.tableDataLook = res.data.records
- this.tableDataLookPage.total = res.data.total
- }
- }).catch(err => {
- this.tableDataLookTableLoading = false
- })
- },
- tableDataLookPagination(page) {
- this.tableDataLookPage.size = page.limit
- this.getDataTableList(this.currentRow)
- },
- closeDia () {
- this.tableDataLookPage = {
- total: 0,
- size: 20,
- current: 1
- }
- this.dataDialogVisible = false
},
// 闄勪欢鏌ョ湅
handleFileLook(row) {
@@ -1137,46 +944,6 @@
})
}
},
- // 涓嬪彂
- handleIssued(row) {
- this.issuedDialogVisible = true;
- this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
- selectOrderManDay({
- id: row.id
- }).then(res => {
- this.distributeData.orderId = row.id
- this.distributeData.sampleId = row.sampleId
- this.distributeData.appointed = res.data
- this.distributeData.type = row.type
- })
- },
- submitForm2() {
- if (this.distributeData.appointed == null || this.distributeData.appointed == '') {
- this.$message.error('绾﹀畾鏃堕棿鏈~鍐�')
- return
- }
- //
- if (this.distributeData.userId == null || this.distributeData.userId == '') {
- this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
- return
- }
- this.upLoad = true;
- upInsOrder({
- orderId: this.distributeData.orderId,
- sampleId: this.distributeData.sampleId,
- appointed: this.distributeData.appointed,
- userId: this.distributeData.userId,
- sonLaboratory: this.distributeData.sonLaboratory,
- }).then(res => {
- this.$message.success('淇敼鎴愬姛')
- this.upLoad = false
- this.issuedDialogVisible = false
- this.refreshTable()
- }).catch(e => {
- this.$message.error('淇敼澶辫触')
- this.upLoad = false
- })
- },
submitForm() {
this.upLoad = true;
if (this.tabIndex == 1) {
@@ -1230,7 +997,7 @@
this.$router.push({
name: "InspectionView",
query: {
- sonLaboratory: row.sonLaboratory,
+ sonLaboratory: null,
state: 3,
typeSource: row.typeSource,
orderId: row.id,
@@ -1241,7 +1008,7 @@
this.$router.push({
path: "/inspectionTask/inspection",
query: {
- sonLaboratory: row.sonLaboratory,
+ sonLaboratory: null,
state: 3,
typeSource: row.typeSource,
orderId: row.id,
@@ -1257,11 +1024,6 @@
// 鍒锋柊椤甸潰
refreshView() {
this.InspectionKey++
- },
- changeUser() {
- if (this.newJuLaboratoryList.length > 0) {
- this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
- }
},
handleDelete(row) {
this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index 56d1f0e..ccce7c9 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -938,6 +938,10 @@
this.$message.error('璇烽�夋嫨瀹℃壒浜�')
return
}
+ if (this.currentInfo && this.currentInfo.examineUserId != null && Number(this.approver) === Number(this.currentInfo.examineUserId)) {
+ this.$message.error('瀹℃牳浜哄拰鎵瑰噯浜轰笉鑳戒负鍚屼竴浜猴紝璇烽噸鏂伴�夋嫨鎵瑰噯浜�')
+ return
+ }
this.loadingIssued = true;
examineReport({
id: this.currentInfo.id,
@@ -951,7 +955,6 @@
this.addApproverDia = false
this.issuedVisible = false;
}).catch(e => {
- this.$message.error('鎻愪氦澶辫触')
this.loadingIssued = false;
})
},
@@ -961,11 +964,11 @@
},
// 鐐瑰嚮閫氳繃锛岄渶瑕侀�夋嫨鎵瑰噯浜哄憳
subIssued() {
- this.getAuthorizedPerson()
+ this.getAuthorizedPerson(true)
this.addApproverDia = true
},
// 鑾峰彇浜哄憳鍒楄〃
- getAuthorizedPerson() {
+ getAuthorizedPerson(filterExamine) {
selectUserCondition({type: 1}).then((res) => {
let data = [];
res.data.forEach((a) => {
@@ -974,6 +977,9 @@
value: a.id,
});
});
+ if (filterExamine && this.currentInfo && this.currentInfo.examineUserId != null) {
+ data = data.filter((item) => Number(item.value) !== Number(this.currentInfo.examineUserId));
+ }
this.approverList = data;
})
},
--
Gitblit v1.9.3