| | |
| | | <h2 v-else>编辑-产品检验单</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button @click="addTestProject" v-if="processInspectVo.id==null">生成检验项目</el-button> |
| | | <el-button @click="addTestProject" type="primary" v-if="processInspectVo.id==null">生成检验项目</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | |
| | | <el-table-column prop="required" label="标准值" width="240" ></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="检测值" |
| | | width="240" style="text-align: center;"> |
| | | |
| | | <template slot-scope="scope"> |
| | | <el-col v-if="scope.row.itype === '1'"> |
| | | <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请先选择设备!" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请输入检测值"></el-input> |
| | | @blur="changeState(scope.row, scope.$index)" placeholder="请输入检测值"></el-input> |
| | | <span v-if="resultVal != null" v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | <el-col v-else> |
| | | <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请先选择设备!" placement="top-start"> |
| | | <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="请选择"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | <el-select style="width: 100%;" @change="changeState(scope.row, scope.$index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="请选择"> |
| | | <el-option v-for="(item,i) in dataVal" :key="i" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | |
| | | <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.inote" |
| | | @blur="changeState(scope.row, index)" placeholder="请输入检验描述"></el-input> |
| | | @blur="changeState(scope.row, scope.$index)" placeholder="请输入检验描述"></el-input> |
| | | |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.inote"></span> |
| | |
| | | class="item" effect="dark" content="请先选择设备!" placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.inote" |
| | | @blur="changeState(scope.row, index)" placeholder="请输入检测值"></el-input> |
| | | @blur="changeState(scope.row, scope.$index)" placeholder="请输入检测值"></el-input> |
| | | <!-- <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.inote" placeholder="请选择"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | |
| | | submitSave(){ |
| | | let pro = 0 |
| | | this.inspectionItems.forEach(item => { |
| | |
| | | let userList = [] |
| | | result.children.forEach(item=>{ |
| | | item.iid = Math.random() |
| | | if(item.children != undefined){ |
| | | if(item.children){ |
| | | item.children.forEach(obj=>{ |
| | | let arr = [] |
| | | if(obj.userName){ |
| | |
| | | arr = obj.inspectionValue.split(",") |
| | | } |
| | | obj.empiricalValueAddss = arr |
| | | if(obj.note){ |
| | | snote=obj.inote |
| | | } |
| | | // if(obj.note){ |
| | | // snote=obj.inote |
| | | // } |
| | | if(arr.length > this.empiricalValueAdd){ |
| | | this.empiricalValueAdd = arr.length |
| | | } |
| | |
| | | }) |
| | | }, |
| | | updateDevice(row,index){ |
| | | updateDeviceById({equiomentId:row.eId,fpid:row.iId}).then(res=>{ |
| | | updateDeviceById({equiomentId:row.eId,fpid:row.iid}).then(res=>{ |
| | | this.inspectionItems.forEach(obj=>{ |
| | | if(obj.children){ |
| | | obj.children[index-1].inspectionValue = '' |