| | |
| | | <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px"> |
| | | <div v-if="active == 1"> |
| | | <el-form :inline="true" :model="addObj1" label-width="90px"> |
| | | <el-form-item label="样品型号:" style="margin-bottom: 6px;margin-top: 6px"> |
| | | <el-select v-model="model" :placeholder="active > 1 ? '' : '请输入'" allow-create clearable |
| | | default-first-option filterable size="small" @change="changeModel"> |
| | | <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </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" multiple> |
| | | <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="附件查看:" style="margin-bottom: 6px;margin-top: 6px"> |
| | | <el-button type="text" @click="handleFileDialog"> |
| | | <i class="el-icon-document"></i> |
| | |
| | | <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="scope.row.method" placeholder="请输入" size="mini" |
| | | @input="searchFilterList" /> |
| | | <el-input v-if="active == 1" v-model="methodS" placeholder="请输入" size="mini" @input="searchFilterList" /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | sampleList: sampleList.map(a => { |
| | | a.standardMethodListId = JSON.stringify(a.standardMethodListId) |
| | | a.insProduct = this.fullProductList |
| | | a.insProduct = this.fullProductList.map(item => ({ |
| | | ...item, |
| | | state: 1 |
| | | })) |
| | | if (a.modelNum) { |
| | | // 根据x号判断型号参数与样品型号的拼接位置 |
| | | // 例如×4,就为500ML×4;4×,就为4×500ML |
| | |
| | | }, 200) |
| | | }).catch(err => { |
| | | console.log('err-', err) |
| | | }) |
| | | }, |
| | | // 选择样品型号的回调 |
| | | changeModel() { |
| | | this.sampleList.forEach(a => { |
| | | let obj = this.sampleIds.find(b => b == a.id) |
| | | if (obj) { |
| | | a.model = this.model |
| | | } |
| | | }) |
| | | }, |
| | | // 选择检验标准的回调 |
| | | changeStandardMethodListId() { |
| | | this.sampleList.forEach(a => { |
| | | let obj = this.sampleIds.find(b => b == a.id) |
| | | if (obj) { |
| | | a.standardMethodListId = this.standardMethodListId |
| | | this.methodChange(this.standardMethodListId, a) |
| | | } |
| | | }) |
| | | }, |
| | | // 拼接样品树的字符串 |