累计类检查项页面调整

dev-scheduling
zhangdi 3 months ago
parent 111b13e70c
commit bce0f18f19
  1. 36
      src/views/processManagement/bathRefine/components/addAccumulateClassDialog.vue

@ -67,7 +67,12 @@
</template> </template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`tableData[${scope.$index}].device`" :rules="formRules.device"> <el-form-item :prop="`tableData[${scope.$index}].device`" :rules="formRules.device">
<el-select v-model="scope.row.device" clearable filterable @change="changeDevice(scope.$index)"> <el-select
v-model="scope.row.device"
clearable
filterable
@change="changeDevice(scope.$index)"
>
<el-option <el-option
v-for="item in scope.row.deviceOptions" v-for="item in scope.row.deviceOptions"
:key="item.id" :key="item.id"
@ -149,14 +154,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="累计初始值" prop="cumulativeInitialValue"> <el-table-column align="center" label="累计初始值" prop="cumulativeInitialValue">
<!-- <template #header>
<span><i style="color: red">*</i>累计初始值</span>
</template> -->
<template #default="scope"> <template #default="scope">
<!-- <el-form-item
:prop="`tableData[${scope.$index}].cumulativeInitialValue`"
:rules="formRules.cumulativeInitialValue"
> -->
<el-date-picker <el-date-picker
style="width: 100%" style="width: 100%"
v-if=" v-if="
@ -176,7 +174,14 @@
v-model="scope.row.cumulativeInitialValue" v-model="scope.row.cumulativeInitialValue"
:disabled="scope.row.ruleType == 4 || scope.row.ruleType == 1" :disabled="scope.row.ruleType == 4 || scope.row.ruleType == 1"
></el-input> ></el-input>
<!-- </el-form-item> --> </template>
</el-table-column>
<el-table-column align="center" label="有效期" prop="periodofValidity" width="200">
<template #default="scope">
<el-radio-group v-model="scope.row.periodofValidity">
<el-radio :label="1">长期</el-radio>
<el-radio :label="2">一次性</el-radio>
</el-radio-group>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -310,10 +315,10 @@ export default {
// //
changeWorkCenter(index) { changeWorkCenter(index) {
this.form.batchNo = ''; this.form.batchNo = '';
this.form.tableData[index].device = '' this.form.tableData[index].device = '';
console.log(this.form.tableData[index]); console.log(this.form.tableData[index]);
this.getTankList(this.form.tableData[index].wcId, index); this.getTankList(this.form.tableData[index].wcId, index);
this.getEquipmentList(this.form.tableData[index].wcId, index) this.getEquipmentList(this.form.tableData[index].wcId, index);
}, // }, //
getTankList(val, index) { getTankList(val, index) {
getTank({ workstationId: val ? val : '' }).then(res => { getTank({ workstationId: val ? val : '' }).then(res => {
@ -325,9 +330,11 @@ export default {
this.form.tableData[index].deviceOptions = res.data.data.records; this.form.tableData[index].deviceOptions = res.data.data.records;
}); });
}, },
changeDevice(index){ changeDevice(index) {
let select = this.form.tableData[index].deviceOptions.filter(row => row.id==this.form.tableData[index].device) let select = this.form.tableData[index].deviceOptions.filter(
this.form.tableData[index].deviceName = select[0].deviceName row => row.id == this.form.tableData[index].device
);
this.form.tableData[index].deviceName = select[0].deviceName;
}, },
getWorkCenterList() { getWorkCenterList() {
getWorkCenterList().then(res => { getWorkCenterList().then(res => {
@ -347,6 +354,7 @@ export default {
batchNo: '', // / batchNo: '', // /
preserveContent: '', // preserveContent: '', //
bbpType: 2, bbpType: 2,
periodofValidity:2
}); });
}, },

Loading…
Cancel
Save