From 76acbd7a767c72fedbe4f613d6efab97775ed26a Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期二, 08 四月 2025 16:38:02 +0800 Subject: [PATCH] 原辅材,成品下单修改 --- src/views/business/materialOrder/customsInspection.vue | 47 ++++++++++++++++++++++++----------------------- 1 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue index d0506ed..4701bc9 100644 --- a/src/views/business/materialOrder/customsInspection.vue +++ b/src/views/business/materialOrder/customsInspection.vue @@ -162,7 +162,7 @@ </el-form-item> <el-form-item label="妫�楠屾爣鍑�:" style="margin-bottom: 6px;margin-top: 6px"> <el-select v-model="standardMethodListId" :loading="methodLoad" :placeholder="active > 1 ? '' : '璇疯緭鍏�'" - clearable size="small" @change="changeStandardMethodListId" @focus="methodFocus"> + clearable size="small" @change="changeStandardMethodListId" @focus="methodFocus" multiple> <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> </el-option> </el-select> @@ -170,7 +170,7 @@ <el-form-item label="闄勪欢鏌ョ湅:" style="margin-bottom: 6px;margin-top: 6px"> <el-button type="text" @click="handleFileDialog"> <i class="el-icon-document"></i> - 闄勪欢鏌ョ湅 + 杞﹂棿闄勪欢鏌ョ湅 </el-button> <el-dialog :visible.sync="fileDialogVisible" title="闄勪欢鏌ョ湅" width="80%"> <fileList :currentNo="addObj.workShopId" v-if="fileDialogVisible" /> @@ -223,7 +223,7 @@ <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model == null || active > 1 || scope.$index !== 0" :loading="methodLoad" clearable placeholder="妫�楠屾爣鍑�" size="small" style="width: 100%;" @change="(value) => methodChange(value, scope.row)" - @clear="productList = []" @focus="methodFocus"> + @clear="productList = []" @focus="methodFocus" multiple> <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> </el-option> </el-select> @@ -535,7 +535,7 @@ totalArr: [], addObj1: {}, model: null, - standardMethodListId: null, + standardMethodListId: [], inspectionItem: null, inspectionItemSubclass: null, methodS: null, @@ -610,11 +610,11 @@ }, 'addObj.sample'(val) { this.model = null - this.standardMethodListId = null + this.standardMethodListId = [] }, 'addObj.qtyArrived'(val) { this.model = null - this.standardMethodListId = null + this.standardMethodListId = [] } }, created() { @@ -757,6 +757,8 @@ this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc) this.$set(this.addObj, 'workShopName', res.data.workShopName) this.$set(this.addObj, 'workShopId', res.data.workShopId) + this.$set(this.addObj, 'inspectionType', this.customsInspection.inspectionType) + console.log(111111, this.addObj) if (this.orderType == 1) { this.$set(this.addObj, 'orderType', 'Quarterly inspection') } @@ -895,7 +897,7 @@ save() { this.$refs['addObj'].validate((valid) => { if (valid) { - if (!this.sampleList.every(m => m.standardMethodListId)) { + if (!this.sampleList.every(m => m.standardMethodListId && m.standardMethodListId.length > 0)) { this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�') return } @@ -949,7 +951,7 @@ noNeedCheck() { this.$refs['addObj'].validate((valid) => { if (valid) { - if (!this.sampleList.every(m => m.standardMethodListId)) { + if (!this.sampleList.every(m => m.standardMethodListId && m.standardMethodListId.length > 0)) { this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�') return } @@ -1463,14 +1465,13 @@ this.sample.joinNum = 1 this.sample.sample = this.addObj.sample this.sample.unit = this.addObj.unit - this.sample.standardMethodListId = null + this.sample.standardMethodListId = [] this.sample.insProduct = [] this.sample.id = this.count this.sample.childSampleList = [] this.sample.insulating = null this.sample.sheath = null this.sample.quantity = 1 - console.log(2222, codeLevel, data) if (codeLevel === '[5]') { this.sample.model = this.addObj.sample } else if (codeLevel === '[4]') { @@ -1499,12 +1500,12 @@ // 閫変腑琛ㄦ牸琛岀殑鍥炶皟 rowClick(row, column, event) { this.currentMethod = row - let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) - if (obj && obj.code == '鎶�鏈姹�') { - this.isAskOnlyRead = true - } else { - this.isAskOnlyRead = false - } + // let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) + // if (obj && obj.code == '鎶�鏈姹�') { + // this.isAskOnlyRead = true + // } else { + // this.isAskOnlyRead = false + // } this.sampleId = row.id if (this.active !== 1) { this.sampleIds = [] @@ -1574,19 +1575,19 @@ }) } this.currentMethod = row - let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) - if (obj && obj.code == '鎶�鏈姹�') { - this.isAskOnlyRead = true - } else { - this.isAskOnlyRead = false - } + // let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) + // if (obj && obj.code == '鎶�鏈姹�') { + // this.isAskOnlyRead = true + // } else { + // this.isAskOnlyRead = false + // } this.getProductLoad = true let selectTreeList = this.selectTree.split(" - ") this.addObj.model && (selectTreeList[selectTreeList.length - 1] = this.addObj.model) selectStandardProductList({ model: this.addObj.model ? this.addObj.model : row.model, modelNum: row.modelNum, - standardMethodListId: val, + standardMethodListIds: val, factory: selectTreeList.join(" - "), partNo: this.addObj.partNo, ifsInventoryId: this.customsInspection.id -- Gitblit v1.9.3