| | |
| | | </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" |
| | | :loading="methodLoad" :readonly="active > 1" clearable placeholder="检验标准" size="small" |
| | | style="width: 100%;" @change="(value) => methodChange(value, scope.row)" @clear="productList = []" |
| | | @focus="methodFocus"> |
| | | @focus="methodFocus" multiple> |
| | | <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="条件" min-width="140" prop="radius" show-overflow-tooltip> |
| | | <el-table-column label="试验条件" min-width="140" prop="radius" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="(active == 1 || tabIndex == 4) && (isAskOnlyRead || isSpecial)" v-model="scope.row.radius" |
| | | :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="条件" size="small" type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="试验条件" size="small" type="textarea" |
| | | @change="e => requestChange(e, scope.row, 'radius')"> |
| | | </el-input> |
| | | <span v-else>{{ scope.row.radius }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="试验方法" min-width="120" prop="methodS" show-overflow-tooltip> |
| | | <el-table-column label="试验方法" min-width="120" prop="method" show-overflow-tooltip> |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>试验方法</span> |
| | | <el-input v-if="active == 1" v-model="methodS" placeholder="请输入" size="mini" |
| | | <el-input v-if="active == 1" v-model="scope.row.method" placeholder="请输入" size="mini" |
| | | @input="searchFilterList" /> |
| | | </div> |
| | | </template> |
| | |
| | | totalArr: [], |
| | | addObj1: {}, |
| | | model: null, |
| | | standardMethodListId: null, |
| | | standardMethodListId: [], |
| | | symbolList: ['RTS'], |
| | | inspectionItem: null, |
| | | inspectionItemSubclass: null, |
| | |
| | | temId: '', |
| | | sonLaboratoryList: [], |
| | | selectiveEcho: [], // 检验下单的时候勾选检验项目,如果使用筛选提交显示检验项目为空 回显列表 |
| | | quarterItemOptions: [], // 查询季度信息 |
| | | quarterItemOptions: [], // 查询可靠性信息 |
| | | specialStandardMethod: '', |
| | | isSpecial: false, |
| | | } |
| | |
| | | }, |
| | | 'addObj.sample'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | 'addObj.sampleNum'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | tabIndex(val) { |
| | | if (val == 4 && this.active == 2) { |
| | |
| | | }; |
| | | this.addObj.type = String(this.addObj.type) |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.sampleList.forEach(m => { |
| | | if (m.standardMethodListId) { |
| | | m.standardMethodListId = JSON.parse(m.standardMethodListId) |
| | | } |
| | | }) |
| | | this.specialStandardMethod = this.sampleList[0].specialStandardMethod |
| | | this.getProNum() |
| | | this.addObj.sampleNum = this.sampleList.length |
| | |
| | | save() { |
| | | this.$refs['addObj'].validate((valid) => { |
| | | if (valid) { |
| | | // 选择多个标准 |
| | | let isHaveStandardMethodListId = false |
| | | this.sampleList.forEach(item => { |
| | | // 赋值特殊标准 |
| | | item.specialStandardMethod = this.specialStandardMethod |
| | | if (!item.standardMethodListId || item.standardMethodListId.length == 0) { |
| | | isHaveStandardMethodListId = true |
| | | } |
| | | }) |
| | | if (isHaveStandardMethodListId) { |
| | | return this.$message.error('请选择标准') |
| | | } |
| | | try { |
| | | this.sampleList.forEach(item => { |
| | | if (item.insulating) { |
| | |
| | | if (e === true) throw e |
| | | } |
| | | let sampleList = this.HaveJson(this.sampleList) |
| | | // 多选检验标准时,检验项不能重复选择 |
| | | for (let i = 0; i < sampleList.length; i++) { |
| | | if (sampleList[i].insProduct.length > 0) { |
| | | let set = new Set(); |
| | | for (let j = 0; j < sampleList[i].insProduct.length; j++) { |
| | | if (sampleList[i].insProduct[j].state == 1) { |
| | | let num0 = set.size; |
| | | set.add( |
| | | sampleList[i].insProduct[j].inspectionItem + |
| | | "-" + |
| | | sampleList[i].insProduct[j].inspectionItemSubclass |
| | | ); |
| | | let num1 = set.size; |
| | | if (num0 == num1) { |
| | | this.$message.error( |
| | | sampleList[i].insProduct[j].inspectionItem + |
| | | "-" + |
| | | sampleList[i].insProduct[j].inspectionItemSubclass + |
| | | "重复" |
| | | ); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | sampleList.forEach(a => { |
| | | if (a.insProduct.length > 0) { |
| | | a.insProduct.forEach(c => { |
| | |
| | | }) |
| | | } else { |
| | | // 常规提交 |
| | | sampleList.forEach(m => { |
| | | m.standardMethodListId = JSON.stringify(m.standardMethodListId) |
| | | }) |
| | | addInsOrder({ insOrder: this.addObj, sampleList: sampleList }).then(res => { |
| | | this.saveLoad = false |
| | | this.$message.success('已提交') |
| | |
| | | this.sample.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | 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.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = null |
| | | this.sample.standardMethodListId = [] |
| | | this.sample.insProduct = [] |
| | | this.sample.id = parseInt(i + 1) |
| | | 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 = [] |
| | |
| | | selectStandardProductList({ |
| | | model: this.addObj.model ? this.addObj.model : row.model, |
| | | modelNum: row.modelNum, |
| | | standardMethodListId: val, |
| | | standardMethodListIds: val, |
| | | state: 1, |
| | | factory: selectTreeList.join(" - "), |
| | | cores: row.cores, |
| | | conductorMaterial: row.conductorMaterial, |
| | |
| | | } |
| | | } |
| | | } |
| | | if (val === null || val === '') return |
| | | if (!val || val.length == 0) return |
| | | 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, |
| | | state: 1, |
| | | cores: row.cores, |
| | | factory: selectTreeList.join(" - "), |
| | | }).then(res => { |
| | |
| | | if (this.sampleIds.length === 0) { |
| | | this.$message.error("未选择样品") |
| | | } else if (this.sampleIds.length === 1) { |
| | | if (!this.sampleSelectionList[0].standardMethodListId) { |
| | | if (!this.sampleSelectionList[0].standardMethodListId || this.sampleSelectionList[0].standardMethodListId.length == 0) { |
| | | this.$message.error("样品未选择检验标准") |
| | | return |
| | | } |
| | | this.auxiliaryShow = true |
| | | } else { |
| | | // 同时配置多个样品的电缆配置时必须选择相同的检验标准 |
| | | if (!this.sampleSelectionList.every(value => value.standardMethodListId)) { |
| | | if (!this.sampleSelectionList.every(value => value.standardMethodListId && value.standardMethodListId.length > 0)) { |
| | | this.$message.error("样品未选择检验标准") |
| | | } else { |
| | | if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) { |
| | |
| | | if (this.sampleIds.length === 0) { |
| | | this.$message.error("未选择样品") |
| | | } else if (this.sampleIds.length === 1) { |
| | | if (!this.sampleSelectionList[0].standardMethodListId) { |
| | | if (!this.sampleSelectionList[0].standardMethodListId || this.sampleSelectionList[0].standardMethodListId.length == 0) { |
| | | this.$message.error("样品未选择检验标准") |
| | | return |
| | | } |
| | | this.cableConfigShow = true |
| | | } else { |
| | | // 同时配置多个样品的电缆配置时必须选择相同的检验标准 |
| | | if (!this.sampleSelectionList.every(value => value.standardMethodListId)) { |
| | | if (!this.sampleSelectionList.every(value => value.standardMethodListId && value.standardMethodListId.length > 0)) { |
| | | this.$message.error("样品未选择检验标准") |
| | | } else { |
| | | if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) { |