From 2ec168020f20539a8d9a6264e70c5fd688a87940 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期六, 29 三月 2025 14:02:26 +0800 Subject: [PATCH] 成品下单-添加修改样品型号功能 --- src/views/business/productOrder/index.vue | 70 +++++++++++++++++++++++++++++++---- 1 files changed, 62 insertions(+), 8 deletions(-) diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index d619ab2..eb1e2c2 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -294,9 +294,28 @@ @closePrintDialog="closePrintDialog"></print-dialog> <!--娣诲姞閬楁紡妫�楠岄」寮规--> <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia> - <!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"--> - <!-- :sonLaboratory="sonLaboratory" :state="state"--> - <!-- :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>--> + <!--淇敼鏍峰搧鍨嬪彿寮规--> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="dialogVisible" title="淇敼鏍峰搧鍨嬪彿" width="80%"> + <el-table ref="sampleTable" :data="sampleList" border highlight-current-row + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" + max-height="400px" tooltip-effect="dark"> + <el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column> + <el-table-column align="center" label="鏍峰搧鍚嶇О" min-width="100" prop="sample"> </el-table-column> + <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="100" prop="sampleCode"></el-table-column> + <el-table-column align="center" label="鏍峰搧鍨嬪彿" min-width="60" prop="model"> + <template slot-scope="scope"> + <el-input v-model="scope.row.model" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" + size="small"></el-input> + </template> + </el-table-column> + <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodName"></el-table-column> + </el-table> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button :loading="submitListLoad" type="primary" @click="submitList">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -307,11 +326,11 @@ import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue"; import limsTable from "@/components/Table/lims-table.vue"; import { - checkUpdate, delInsOrder, + checkUpdate, delInsOrder, getSampleByOrderId, rawAllInsOrderExport, selectInsOrderParameter, selectNoProducts, selectOrderManDay, updateInspected, - updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2 + updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2 } from "@/api/business/productOrder"; import { selectUserCondition } from "@/api/performance/class"; import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder"; @@ -349,7 +368,13 @@ dataType: "link", linkMethod: "selectAllByOne", }, - { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { + label: "鏍峰搧鍨嬪彿", + prop: "sampleModel", + width: "160px", + dataType: "link", + linkMethod: "editSampleModel", + }, { label: '鏍峰搧鏁伴噺', prop: 'sampleNum' }, { label: '妫�楠屼汉', prop: 'testingName' }, { @@ -736,7 +761,10 @@ multipleSelection: [], sonLaboratoryList: [], printDialog: false, - addInspectionDia: false + addInspectionDia: false, + dialogVisible: false, + submitListLoad: false, + sampleList: [] } }, watch: { @@ -941,7 +969,7 @@ this.dataDialogVisible = false; this.upLoad = false; }, - // 璇︽儏 + // 鐐瑰嚮鏍峰搧鍚嶇О selectAllByOne(row) { this.$router.push({ path: "/productOrder/add", query: { @@ -952,6 +980,32 @@ } }); }, + // 淇敼鏍峰搧鍨嬪彿 + editSampleModel (row) { + if (this.tabIndex !== 1) { + return + } + this.dialogVisible = true + this.getDataList(row) + }, + getDataList(row) { + this.dialogVisible = true + getSampleByOrderId({insOrderId: row.id}).then(res => { + this.sampleList = res.data + }) + }, + // 鎻愪氦鏍峰搧鍨嬪彿淇敼 + submitList () { + this.submitListLoad = true + updateSampleModel(this.sampleList).then(res => { + this.submitListLoad = false + this.dialogVisible = false + this.$message.success('淇敼鎴愬姛') + this.refreshTable() + }).catch(err => { + this.submitListLoad = false + }) + }, // 鏁版嵁鏌ョ湅 handleDataLook(row) { this.dataDialogVisible = true; -- Gitblit v1.9.3