| | |
| | | <el-table-column prop="proNum" label="待检项数量" width="105" align="center"></el-table-column> |
| | | </el-table> |
| | | <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border |
| | | @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" :row-key="rowKey" |
| | | @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" |
| | | :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"> |
| | | <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1" :reserve-selection="true"></el-table-column> |
| | | <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column> |
| | | <el-table-column prop="inspectionItemClass" v-if="PROJECT === '装备电缆'" label="检验项分类" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '装备电缆'" label="检验项分类(EN)" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip> |
| | |
| | | prop="value" |
| | | label="识别符值"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.value" placeholder="请输入" size="small"></el-input> |
| | | <el-input v-model="scope.row.value" placeholder="请输入" @input="inputValueHandler(scope.row,scope.$index)" size="small"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | sampleSelectionList: [],//样品表格选中数据 |
| | | editTable:[], |
| | | template: null, |
| | | templates: [], |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | //特殊值填写处理 |
| | | inputValueHandler(row,index){ |
| | | if(row){ |
| | | const nextIndex = index+1 |
| | | for (let i = nextIndex; i < this.editTable.length; i++) { |
| | | const element = this.editTable[i]; |
| | | if(element.model==row.model){ |
| | | this.editTable[i].value = row.value |
| | | }else{ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | spliceData () { |
| | | if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) { |
| | | this.$message.error('请填写完整数据') |
| | |
| | | state, |
| | | id: this.currentId, |
| | | companyId:this.addObj.companyId, |
| | | laboratory:this.addObj.laboratory |
| | | laboratory:this.addObj.laboratory, |
| | | company: this.addObj.company |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | |
| | | }) |
| | | }, |
| | | getProNum() { |
| | | this.sampleList.forEach((m, i) => { |
| | | Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | }) |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | |
| | | val.forEach(a => { |
| | | this.sampleIds.push(a.id) |
| | | }) |
| | | this.sampleSelectionList = val |
| | | }, |
| | | delSample() { |
| | | this.sampleIds.forEach(a => { |
| | |
| | | }) |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | rowKey (row) { |
| | | return row.id; |
| | | }, |
| | | selectProduct(val) { |
| | | this.productListSelected = val |
| | | this.productIds = [] |
| | |
| | | this.sampleId = row.id |
| | | if (this.active !== 1) { |
| | | this.sampleIds = [] |
| | | this.sampleIds.push(row.id) |
| | | this.sampleSelectionList.forEach(ele=>{ |
| | | if(ele.id == row.id){ |
| | | this.sampleIds.push(row.id) |
| | | } |
| | | }) |
| | | } |
| | | this.productList = row.insProduct |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)) |