|
|
|
@ -394,17 +394,17 @@
|
|
|
|
|
<div class="my-step-body" v-if="spotCheckStep==0">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8" :offset="2">
|
|
|
|
|
<el-form-item label="计划名称">
|
|
|
|
|
<el-form-item label="计划名称" prop="planName">
|
|
|
|
|
<el-input v-model="form.planName" placeholder="请输入计划名称"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6" :offset="2">
|
|
|
|
|
<el-form-item label="循环周期">
|
|
|
|
|
<el-input v-model="form.planLoop" placeholder="请输入循环周期"/>
|
|
|
|
|
<el-col :span="8" :offset="1">
|
|
|
|
|
<el-form-item label="循环周期" prop="planLoop">
|
|
|
|
|
<el-input-number v-model="form.planLoop" label=""></el-input-number>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<el-select v-model="form.planLoopType" placeholder="周期" clearable>
|
|
|
|
|
<el-select v-model="form.planLoopType" placeholder="周期">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.device_loop_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -417,7 +417,7 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8" :offset="2">
|
|
|
|
|
<el-form-item label="计划状态">
|
|
|
|
|
<el-select v-model="form.planStatus" placeholder="计划状态" clearable>
|
|
|
|
|
<el-select v-model="form.planStatus" placeholder="计划状态">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -428,28 +428,19 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" :offset="1">
|
|
|
|
|
<el-form-item label-width="100px" label="点检开始时间">
|
|
|
|
|
<el-form-item label-width="115px" label="点检开始时间" prop="planLoopStart">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.planLoopStart"
|
|
|
|
|
type="date"
|
|
|
|
|
placeholder="开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-if="false"
|
|
|
|
|
@change="changeArray"
|
|
|
|
|
v-model="form.planTimeArray"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
end-placeholder="结束时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8" offset="2" >
|
|
|
|
|
<el-form-item label="车间">
|
|
|
|
|
<el-select @change="changeCenter" v-model="form.planWorkshop" placeholder="请选择车间" clearable>
|
|
|
|
|
<el-form-item label="车间" prop="planWorkshop">
|
|
|
|
|
<el-select @change="changeCenter" v-model="form.planWorkshop" placeholder="请选择车间">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in workCenterList"
|
|
|
|
|
:key="item.factoryCode"
|
|
|
|
@ -675,6 +666,8 @@ export default {
|
|
|
|
|
dicts: ['device_loop_type', 'sys_normal_disable','device_yes_no'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {},
|
|
|
|
|
// 日期范围选择快捷
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
shortcuts: [{
|
|
|
|
@ -806,8 +799,6 @@ export default {
|
|
|
|
|
planType: "spotInspection",
|
|
|
|
|
planLoopStart: null,
|
|
|
|
|
},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -969,13 +960,13 @@ export default {
|
|
|
|
|
// 检查项名称
|
|
|
|
|
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
|
|
|
|
|
|
|
|
|
|
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
|
|
|
|
|
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++) {
|
|
|
|
|
|
|
|
|
|
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
|
|
|
|
|
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
|
|
|
|
|
}
|
|
|
|
|
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
|
|
|
|
@ -1056,13 +1047,46 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 下一步
|
|
|
|
|
stepNext() {
|
|
|
|
|
// 校验
|
|
|
|
|
if (this.spotCheckStep == 0) {
|
|
|
|
|
if (this.form.planName == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "计划名称不能为空!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.form.planLoop <= 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "循环周期不可小于等于’0‘!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.form.planLoopStart == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "点检开始时间不能为空!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.form.planWorkshop == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择车间!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
message: "车间不能为空!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this.spotCheckStep == 1) {
|
|
|
|
|
if (this.form.equipmentItem.length == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "请选择设备!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.spotCheckStep++;
|
|
|
|
|
},
|
|
|
|
|
/** 查询点检计划列表 */
|
|
|
|
@ -1138,7 +1162,7 @@ export default {
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.planId)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
@ -1189,6 +1213,13 @@ export default {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.selectPersonList.length == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "请请选择人员!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.planLoading = true;
|
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
@ -1232,12 +1263,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function() {
|
|
|
|
|
this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function () {
|
|
|
|
|
return delPlan(planIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|