From d1faa4f23135dabad9e2948842ba415eddfcc08b Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期二, 08 四月 2025 14:00:37 +0800 Subject: [PATCH] 修改检验对象 --- src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue | 70 ++++++++++++++++++++++++++-------- 1 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue index 92e3e56..20a857f 100644 --- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue +++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue @@ -22,7 +22,8 @@ <el-form-item label="鑹叉爣锛�" prop="colorCode"> <el-input v-model="bindPartData.colorCode" size="small"></el-input> </el-form-item> - <el-form-item label="杩涘巶妫�楠岄」锛�" prop="inspectionItem" v-if="currentObj.objectType == '鍘熸潗鏂�'" label-width="100px"> + <el-form-item label="杩涘巶妫�楠岄」锛�" prop="inspectionItem" + v-if="currentObj.objectType == '鍘熻緟鏉�' || currentObj.objectType == '鍖呮潗'" label-width="100px"> <!-- <el-input v-model="bindPartData.inspectionItem" disabled placeholder="閫夋嫨妫�楠岄」" size="small"> <template slot="append"> <el-button slot="append" icon="el-icon-search" @click="openItems"></el-button> @@ -38,10 +39,10 @@ </div> <span slot="footer" class="dialog-footer"> <el-button @click="closeBindPartDialog">鍙� 娑�</el-button> - <el-button type="primary" @click="submitBind" :loading="bindLoad">纭� 璁�</el-button> + <el-button type="primary" @click="submitBind">纭� 璁�</el-button> </span> </el-dialog> - <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="600px"> + <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="900px"> <div class="body" v-if="editItem"> <lims-table :tableData="editList" :column="editColumn" height="460px" :tableLoading="tableLoading0" :key="2" :page="editPage" @pagination="editPagination"></lims-table> @@ -54,9 +55,16 @@ import limsTable from "@/components/Table/lims-table.vue"; import { addProductPart, - addTestObjectPart, deleteProductPart, deleteTestObjectPart, + addTestObjectPart, + deleteProductPart, + deleteTestObjectPart, selectByProductId, - selectByTestObjectId, updateProductPart, updateTestObjectPart, inspectionItems, productPartReview + selectByTestObjectId, + updateProductPart, + updateTestObjectPart, + inspectionItems, + productPartReview, + productPartLogList } from "@/api/structural/structureTestObjectPart"; export default { @@ -93,6 +101,7 @@ { label: '闆朵欢鍙�', prop: 'partNo' }, { label: '棰滆壊', prop: 'color' }, { label: '鑹叉爣', prop: 'colorCode' }, + { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' }, { label: '鐘舵��', prop: 'review', dataType: "tag", @@ -133,10 +142,10 @@ type: "warning", }) .then(() => { - productPartReview({ id: row.id }).then((res) => { + productPartReview({ id: row.id, type: this.type == 0 ? '瀵硅薄' : '浜у搧' }).then((res) => { if (res.code == 200) { this.$message.success("澶嶆牳閫氳繃"); - this.getList()(); + this.getList(); } }); }) @@ -192,7 +201,7 @@ partNo: '', // 闆朵欢鍙� color: '', // 棰滆壊 colorCode: '', // 鑹叉爣 - inspectionItem: [],//鍘熸潗鏂欒繘鍘傛楠屽璞″垪琛� + inspectionItem: [],//鍘熻緟鏉愯繘鍘傛楠屽璞″垪琛� }, bindPartDataRules: { partNo: [ @@ -203,16 +212,27 @@ upIndex: 0, addBindLoad: false, - itemList: [],//鍘熸潗鏂欒繘鍘傛楠屽璞″垪琛� + itemList: [],//鍘熻緟鏉愯繘鍘傛楠屽璞″垪琛� editItem: false, editList: [], editColumn: [ - { label: '闆朵欢鍙�', prop: 'inspectionItem' }, - { label: '棰滆壊', prop: 'inspectionItemSubclass' }, - { label: '鑹叉爣', prop: 'ask' }, - { label: '杩涘巶妫�楠岄」', prop: 'askTell' }, - { label: '淇敼鏃堕棿', prop: 'method' }, - { label: '淇敼浜�', prop: 'method' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '棰滆壊', prop: 'color' }, + { label: '鑹叉爣', prop: 'colorCode' }, + { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' }, + { + label: '鐘舵��', prop: 'review', + dataType: "tag", + formatType: (params) => { + if (params == '寰呭鏍�') { + return 'danger' + } else { + return 'success' + } + }, + }, + { label: '淇敼鏃堕棿', prop: 'operTime' }, + { label: '淇敼浜�', prop: 'operName' }, ], editPage: { total: 0, @@ -220,6 +240,7 @@ current: 0, }, tableLoading0: false, + currentPart: {},//褰撳墠闆朵欢 // mutilSelect: [] } }, @@ -240,11 +261,21 @@ }) }, // 淇敼璁板綍 - lookList() { + lookList(row) { + this.currentPart = row; this.editItem = true; this.getEditList() }, - getEditList() { }, + getEditList() { + this.tableLoading0 = true + productPartLogList({ id: this.currentPart.id, type: this.type == 0 ? '瀵硅薄' : '浜у搧', ...this.editPage }).then(res => { + this.tableLoading0 = false + if (res.code == 200) { + this.editList = res.data.records + this.editPage.total = res.data.total + } + }) + }, editPagination() { this.editPage.current = page; this.editPage.size = limit; @@ -282,6 +313,8 @@ if (type === 'edit') { this.bindPartData = this.HaveJson(row) this.bindPartData.inspectionItem = this.bindPartData.inspectionItem ? this.bindPartData.inspectionItem.split(',') : [] + } else { + this.bindPartData = {} } }, // 鎻愪氦闆朵欢缁戝畾 @@ -294,12 +327,14 @@ color: this.bindPartData.color, colorCode: this.bindPartData.colorCode, partNo: this.bindPartData.partNo, + id: this.bindPartData.id, inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : '' } : { productId: this.currentRow.id, color: this.bindPartData.color, colorCode: this.bindPartData.colorCode, partNo: this.bindPartData.partNo, + id: this.bindPartData.id, inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : '' } this.bindLoad = true @@ -319,6 +354,7 @@ }) } else { addProductPart(params).then(res => { + this.bindLoad = false if (res.code === 200) { this.resetForm('bindPartData') this.addBindPartDialog = false -- Gitblit v1.9.3