feat(order): 添加订单委托要求字段并优化界面流程
- 新增分包内容、样品处置、结果评价、报告交付方式等委托要求字段
- 添加分包单位信息、报告寄送地址、收件人电话等关联信息录入功能
- 更新订单状态标签,新增作废状态和全部状态页签
- 调整报告准备页面审批流程,防止审核人和批准人为同一人
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ ·åæ¥æ¶é¡µé¢ç¸å
³æ¥å£ |
| | | 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' |
| | | }) |
| | | } |
| | |
| | | </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' }"> |
| | |
| | | @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;"> |
| | |
| | | </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> |
| | |
| | | |
| | | <script> |
| | | import { |
| | | addInspectionOrder, delInspectionOrder, exportInspectionOrder, |
| | | getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne, |
| | | delInspectionOrder, exportInspectionOrder, |
| | | getInspectionOrderOne, |
| | | pageInspectionOrder, |
| | | updateInspectionOrder |
| | | } from "@/api/cnas/process/demand/demand"; |
| | |
| | | }, |
| | | ], |
| | | operationType: '', |
| | | orderRowsVisible: false, |
| | | tableList: [], |
| | | tableListLoading: false, |
| | | pages: { |
| | |
| | | } |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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) |
| | | }) |
| | | }, |
| | | // æå¼ç¼è¾å¼¹æ¡ |
| | |
| | | <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> |
| | | <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> |
| | | <!-- æ°å¢æ ·å --> |
| | | <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-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> |
| | | </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-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> |
| | |
| | | |
| | | <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; |
| | | pageSampleReceipt(param).then(res => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData0 = res.data.records; |
| | | this.page0.total = res.data.total; |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | this.upIndex++; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading0 = false; |
| | | }).catch(err => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination0({ page, limit }) { |
| | | this.page0.current = page; |
| | | this.page0.size = limit; |
| | | this.getList0(); |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | // æå¼ç¼è¾å¼¹æ¡ |
| | | handleAdd(row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.title = 'ç¼è¾' |
| | | this.addDialogVisible = true |
| | | this.getCustomPageList() |
| | | handleEdit(row) { |
| | | this.isEdit = true; |
| | | this.currentInfo = { ...row, mainInspectorId: row.mainInspectorId || null }; |
| | | this.editDialogVisible = true; |
| | | }, |
| | | delRow(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessSample({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.refreshTable(); |
| | | handleView(row) { |
| | | this.isEdit = false; |
| | | this.currentInfo = { ...row, mainInspectorId: row.mainInspectorId || null }; |
| | | this.editDialogVisible = true; |
| | | }, |
| | | handleSubmit() { |
| | | if (!this.currentInfo.mainInspectorId) { |
| | | this.$message.error('è¯·éæ©ä¸»æ£éªäºº'); |
| | | return; |
| | | } |
| | | }).catch(err => { }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | // ç¼è¾ |
| | | this.addLoading = true |
| | | addProcessSample({ |
| | | ...this.addInfo |
| | | this.$confirm('确认å°è¯¥æ ·åæäº¤è³æ£éªä»»å¡ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | this.submitLoading = true; |
| | | submitSampleReceipt({ |
| | | receiptId: this.currentInfo.receiptId, |
| | | mainInspectorId: this.currentInfo.mainInspectorId, |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ç¼è¾æå!' |
| | | }); |
| | | this.page0.current = 1; |
| | | this.submitLoading = false; |
| | | this.editDialogVisible = false; |
| | | this.$message.success('æäº¤æå'); |
| | | this.refreshTable(); |
| | | }).catch(err => { }); |
| | | }).catch(err => { |
| | | this.submitLoading = false; |
| | | }); |
| | | }).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'); |
| | | }) |
| | | openReject() { |
| | | this.rejectInfo = { remark: '' }; |
| | | this.rejectDialogVisible = true; |
| | | }, |
| | | 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; |
| | | }); |
| | | }).catch(() => { }); |
| | | }, |
| | | 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> |
| | |
| | | :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> |
| | |
| | | <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=" |
| | |
| | | bindingProductTreeByProductId, |
| | | delProductTreeByProductId, |
| | | selectInsOrderPlanList, |
| | | selectSampleAndProductByOrderId, |
| | | } from "@/api/business/inspectionTask.js"; |
| | | import { treeDevice } from "@/api/cnas/resourceDemand/device.js"; |
| | | import { mapGetters } from "vuex"; |
| | |
| | | ], |
| | | active: 1, |
| | | tabIndex: 0, |
| | | dataDialogVisible: false, |
| | | planTotal: 0, |
| | | insStateList: [], |
| | | state: 0, // 0:å°è´¦é¡µï¼1ï¼æ£éªé¡µé¢,2æ£éªé¡µé¢(夿 ¸)ï¼é»è®¤ä¸º0,3æ°æ®æ¥ç |
| | |
| | | retestInfo: [], |
| | | isCopper: null, |
| | | bindCurrentInfo: {}, |
| | | lookInfo: {}, |
| | | orderTypeList: [ |
| | | { |
| | | value: "Customer-ordered test", |
| | |
| | | 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: '' |
| | |
| | | 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); |
| | |
| | | // æ¥çå·¥æ¶ |
| | | 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; |
| | |
| | | }, |
| | | 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(); // è·åç´§æ¥ç¨åº¦ä¸ææ¡é项 |
| | |
| | | this.scrollInit(); |
| | | }, |
| | | activated() { |
| | | this.syncRouteContext(); |
| | | this.getTypeDicts(); // è·åç´§æ¥ç¨åº¦ä¸ææ¡é项 |
| | | this.getInsStateDicts(); |
| | | this.getComparisonList(); |
| | |
| | | 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(' - '); |
| | |
| | | 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) { |
| | |
| | | }, |
| | | 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(); // è·åç´§æ¥ç¨åº¦ä¸ææ¡é项 |
| | |
| | | this.scrollInit(); |
| | | }, |
| | | activated() { |
| | | this.syncRouteContext(); |
| | | this.getTypeDicts(); // è·åç´§æ¥ç¨åº¦ä¸ææ¡é项 |
| | | this.getInsStateDicts(); |
| | | this.getComparisonList(); |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | </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> |
| | |
| | | import { |
| | | addInsOrder, addInsOrderTemplate, delInsOrderTemplate, |
| | | getQuarterOnOrder, judgeNotSpotCheckOrder, selectInsOrderTemplateById, |
| | | selectOrderManDay, |
| | | updateInsOrder, |
| | | upInsOrder, |
| | | upInsOrderOfState |
| | |
| | | sampleViewEn: '', // æ ·ååç§°è±æï¼æ¥åå±ç¤ºåæ®µï¼ |
| | | productionDate: null, |
| | | sampleDate: null, |
| | | subcontractType: 0, |
| | | subcontractCompany: '', |
| | | sampleDisposal: 1, |
| | | resultEvaluation: 0, |
| | | reportDelivery: 1, |
| | | reportAddress: '', |
| | | reportReceiver: '', |
| | | }, |
| | | addObjRules: { // è¡¨åæ ¡éªè§å |
| | | orderType: [ |
| | |
| | | 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; |
| | | } |
| | |
| | | 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 { |
| | | // ä¸éè¿ |
| | |
| | | this.templateLoading = true; |
| | | addInsOrderTemplate({ |
| | | name: this.templateName, |
| | | standardTreeId: this.addObj.standardTreeId || null, |
| | | thing: JSON.stringify({ |
| | | addObj: this.addObj, |
| | | sampleList: this.sampleList, |
| | |
| | | // æ¥è¯¢æ¨¡æ¿ |
| | | 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 |
| | |
| | | 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]) |
| | | }) |
| | | }, |
| | |
| | | </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" |
| | |
| | | import { |
| | | addInsOrder, addInsOrderTemplate, delInsOrderTemplate, |
| | | getQuarterOnOrder, selectInsOrderTemplateById, |
| | | selectOrderManDay, |
| | | updateInsOrder, |
| | | upInsOrder, |
| | | upInsOrderOfState |
| | |
| | | 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'], |
| | |
| | | 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 { |
| | | // ä¸éè¿ |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | 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', |
| | |
| | | { label: 'ä¸åæ¶é´', prop: 'createTime' }, |
| | | { label: 'ä¸åæ¶é´', prop: 'sendTime' }, |
| | | { label: 'éåçç±', prop: 'tell' }, |
| | | { label: 'ææ¶åå ', prop: 'sampleRejectRemark' }, |
| | | { label: 'å§æäºº', prop: 'prepareUser' }, |
| | | { |
| | | dataType: 'action', |
| | |
| | | } |
| | | }, |
| | | { |
| | | 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 |
| | | } |
| | | }, |
| | | { |
| | |
| | | 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 |
| | | } |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | 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) => { |
| | |
| | | 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 |
| | | } |
| | | }, |
| | | ] |
| | |
| | | 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, |
| | |
| | | formData: {}, |
| | | formData0: {}, |
| | | formData1: {}, |
| | | distributeData: { |
| | | orderId: '', |
| | | sampleId: '', |
| | | appointed: '', |
| | | userId: '', |
| | | sonLaboratory: '' |
| | | }, |
| | | entrustCodeVisible: false, // ä¿®æ¹å§æç¼å·å¼¹æ¡ |
| | | entrustCodeInfo: {}, |
| | | submitCodeLoading: false, |
| | | // 人åå表 |
| | | personList: [], |
| | | orderId: '', |
| | | revocationInsProductIds: '', |
| | | componentDataDelete: [], |
| | |
| | | value: 3 |
| | | }, |
| | | { |
| | | label: 'ä½åº', |
| | | value: 5 |
| | | }, |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: -2 |
| | | } |
| | | ], |
| | | tabIndex: 0, |
| | | tabIndex: 7, |
| | | active: 0, //1ï¼ä¸åï¼2ï¼æ¥çï¼3ï¼å®¡æ ¸ï¼4ï¼å
纤é
ç½®,é»è®¤ä¸º0 |
| | | currentId: null, |
| | | more: false, |
| | |
| | | } |
| | | } |
| | | }, |
| | | 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() |
| | |
| | | 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; |
| | | }, |
| | | // ç¹å»æ ·ååç§° |
| | |
| | | }).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) { |
| | |
| | | }) |
| | | } |
| | | }, |
| | | // ä¸å |
| | | 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) { |
| | |
| | | this.$router.push({ |
| | | name: "InspectionView", |
| | | query: { |
| | | sonLaboratory: row.sonLaboratory, |
| | | sonLaboratory: null, |
| | | state: 3, |
| | | typeSource: row.typeSource, |
| | | orderId: row.id, |
| | |
| | | this.$router.push({ |
| | | path: "/inspectionTask/inspection", |
| | | query: { |
| | | sonLaboratory: row.sonLaboratory, |
| | | sonLaboratory: null, |
| | | state: 3, |
| | | typeSource: row.typeSource, |
| | | orderId: row.id, |
| | |
| | | // å·æ°é¡µé¢ |
| | | refreshView() { |
| | | this.InspectionKey++ |
| | | }, |
| | | changeUser() { |
| | | if (this.newJuLaboratoryList.length > 0) { |
| | | this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value |
| | | } |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | |
| | | 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, |
| | |
| | | this.addApproverDia = false |
| | | this.issuedVisible = false; |
| | | }).catch(e => { |
| | | this.$message.error('æäº¤å¤±è´¥') |
| | | this.loadingIssued = false; |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | // ç¹å»éè¿ï¼éè¦éæ©æ¹å人å |
| | | subIssued() { |
| | | this.getAuthorizedPerson() |
| | | this.getAuthorizedPerson(true) |
| | | this.addApproverDia = true |
| | | }, |
| | | // è·å人åå表 |
| | | getAuthorizedPerson() { |
| | | getAuthorizedPerson(filterExamine) { |
| | | selectUserCondition({type: 1}).then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | |
| | | 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; |
| | | }) |
| | | }, |