| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | totalArr: [], |
| | | addObj1: {}, |
| | | model: null, |
| | | standardMethodListId: null, |
| | | standardMethodListId: [], |
| | | inspectionItem: null, |
| | | inspectionItemSubclass: null, |
| | | methodS: null, |
| | |
| | | }, |
| | | 'addObj.sample'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | 'addObj.qtyArrived'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | this.standardMethodListId = [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 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 |
| | | } |
| | |
| | | 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 |
| | | } |
| | |
| | | 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 = [] |
| | |
| | | // 选中表格行的回调 |
| | | 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 = [] |
| | |
| | | }) |
| | | } |
| | | 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 |