| | |
| | | </el-row> |
| | | <el-row class="standard_table" v-loading="tableLoad"> |
| | | <el-table class="el-table" :data="standardList" style="width: 100%;" height="220px" tooltip-effect="dark" |
| | | highlight-current-row @row-click="rowClick" ref="standard"> |
| | | <el-table-column prop="code" label="标准编号" show-overflow-tooltip> |
| | | highlight-current-row @row-click="rowClick" ref="standard" :key="Math.random()"> |
| | | <el-table-column prop="code" label="标准编号" show-overflow-tooltip width="180"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="标准名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="remark" label="备注" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="createUserName" label="创建人"></el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" width="250px"></el-table-column> |
| | | <!-- <el-table-column prop="createUserName" label="创建人"></el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" width="250px"></el-table-column> --> |
| | | <!-- <el-table-column label="操作" width="100" align="center" v-if="delStandardMethod"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="delStandardMethodByFLSSM(scope.row.id)">删除</el-button> |
| | |
| | | <el-row class="product_table" v-loading="tableLoad2"> |
| | | <el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe |
| | | :fit="true" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" |
| | | @select="upProductSelect"> |
| | | @select="upProductSelect" @select-all="handleAll"> |
| | | <el-table-column type="selection" width="65"> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column> |
| | |
| | | <el-dialog title="分类添加" :visible.sync="addDia" width="400px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span class="required-span">* </span>工厂: |
| | | </el-col> |
| | | <el-col :span="6" style="text-align: right;">工厂:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select v-model="addOb.factory" size="small" style="width: 100%;" clearable> |
| | | <el-option v-for="(a, ai) in factory" :key="ai" :value="a.value" :label="a.label"></el-option> |
| | | </el-select> |
| | | <el-input size="small" readonly v-model="addOb.factory"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;">实验室:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input size="small" readonly v-model="addOb.laboratory"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;">样品大类:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input size="small" readonly v-model="addOb.sampleType"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;">样品名称:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="addOb.sample" readonly size="small"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span class="required-span">* </span>实验室: |
| | | </el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select v-model="addOb.laboratory" size="small" style="width: 100%;" clearable> |
| | | <el-option v-for="(a, ai) in laboratory" :key="ai" :value="a.value" :label="a.label"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span class="required-span">* </span>样品大类: |
| | | </el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select v-model="addOb.sampleType" size="small" style="width: 100%;" clearable> |
| | | <el-option v-for="(a, ai) in sampleType" :key="ai" :value="a.value" :label="a.label"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span class="required-span">* </span>样品名称: |
| | | </el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="addOb.sample" placeholder="请输入样品名称" clearable size="small"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | 型号: |
| | | <span class="required-span">* </span>型号: |
| | | </el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="addOb.model" placeholder="请输入型号" clearable size="small"></el-input> |
| | |
| | | this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => { |
| | | this.list = res.data |
| | | this.list.forEach(a => { |
| | | a.children.forEach(b => { |
| | | b.children.forEach(c => { |
| | | this.expandedKeys.push(c.label) |
| | | }) |
| | | // this.expandedKeys.push(b.label) |
| | | }) |
| | | this.expandedKeys.push(a.label) |
| | | }) |
| | | this.treeLoad = false |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | addStandardTree() { |
| | | if (this.addOb.factory == null || this.addOb.factory == '') { |
| | | this.$message.error('工厂是必填项') |
| | | return |
| | | } |
| | | if (this.addOb.laboratory == null || this.addOb.laboratory == '') { |
| | | this.$message.error('实验室是必填项') |
| | | return |
| | | } |
| | | if (this.addOb.sampleType == null || this.addOb.sampleType == '') { |
| | | this.$message.error('样品大类是必填项') |
| | | return |
| | | } |
| | | if (this.addOb.sample == null || this.addOb.sample == '') { |
| | | this.$message.error('样品是必填项') |
| | | this.$message.error('产品不存在') |
| | | return |
| | | } |
| | | if (this.addOb.model == null || this.addOb.model == '') { |
| | | this.$message.error('请填写型号') |
| | | return |
| | | } |
| | | this.addLoad = true |
| | |
| | | this.$message.error('未保存') |
| | | return |
| | | } |
| | | this.$message.success('已保存') |
| | | // this.$message.success('已保存') |
| | | }) |
| | | }, |
| | | filterHandler(value, row, column) { |
| | | const property = column['property']; |
| | | return row[property] === value; |
| | | }, |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | this.upProductSelect(null, m) |
| | | return m |
| | | }) |
| | | } else { |
| | | this.productList.map(m => { |
| | | this.upProductSelect(null, m) |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |