|
@@ -49,11 +49,22 @@
|
|
|
disabled
|
|
disabled
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item v-else label="车间区域" prop="workshopArea">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="addForm.workshopArea"
|
|
|
|
|
- placeholder="请输入"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ <el-form-item v-else label="车间区域">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="addForm.workshopAreaId"
|
|
|
|
|
+ placeholder="请选择车间区域"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ @change="workshopAreaIdChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in workshopAreaList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -153,7 +164,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="检查有效期" required prop="checkValidity">
|
|
|
|
|
|
|
+ <el-form-item label="检查有效期">
|
|
|
<el-input
|
|
<el-input
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
v-model="addForm.checkValidity"
|
|
v-model="addForm.checkValidity"
|
|
@@ -161,9 +172,9 @@
|
|
|
>
|
|
>
|
|
|
<template slot="append">
|
|
<template slot="append">
|
|
|
<div style="width: 40px; box-sizing: border-box">
|
|
<div style="width: 40px; box-sizing: border-box">
|
|
|
- <el-form-item required prop="checkValidityUnit">
|
|
|
|
|
|
|
+ <el-form-item>
|
|
|
<DictSelection
|
|
<DictSelection
|
|
|
- dictName="检查有效期单位"
|
|
|
|
|
|
|
+ dictName="单位"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="addForm.checkValidityUnit"
|
|
v-model="addForm.checkValidityUnit"
|
|
|
placeholder="单位"
|
|
placeholder="单位"
|
|
@@ -281,6 +292,20 @@
|
|
|
cacheKey="mes-releaseRulesDialong-2510281408"
|
|
cacheKey="mes-releaseRulesDialong-2510281408"
|
|
|
:needPage="false"
|
|
:needPage="false"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template v-slot:toolkit>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="addForm.recordRulesClassify != 4"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="batchCheck"
|
|
|
|
|
+ >批量检查</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="addForm.recordRulesClassify != 4"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="batchQualified"
|
|
|
|
|
+ >批量合格</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
<template v-slot:paramValue="{ row }">
|
|
<template v-slot:paramValue="{ row }">
|
|
|
<div v-if="addForm.recordRulesClassify == 4">
|
|
<div v-if="addForm.recordRulesClassify == 4">
|
|
|
{{ row.productName || row.name }}
|
|
{{ row.productName || row.name }}
|
|
@@ -347,7 +372,9 @@
|
|
|
>
|
|
>
|
|
|
<template v-slot:checkResult="{ row }">
|
|
<template v-slot:checkResult="{ row }">
|
|
|
<div>
|
|
<div>
|
|
|
- <el-radio-group v-model="row.checkResult">
|
|
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ v-model="row.checkResult"
|
|
|
|
|
+ >
|
|
|
<el-radio :label="1">合格</el-radio>
|
|
<el-radio :label="1">合格</el-radio>
|
|
|
<el-radio :label="0">不合格</el-radio>
|
|
<el-radio :label="0">不合格</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -428,6 +455,7 @@
|
|
|
import toolModal from '@/views/batchRecord/components/toolModal.vue';
|
|
import toolModal from '@/views/batchRecord/components/toolModal.vue';
|
|
|
import { getTeam } from '@/api/produce/job.js';
|
|
import { getTeam } from '@/api/produce/job.js';
|
|
|
import materialModal from './materialModal.vue';
|
|
import materialModal from './materialModal.vue';
|
|
|
|
|
+ import { getFactoryarea } from '@/api/aps/index';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: { SelectUser, toolModal, materialModal },
|
|
components: { SelectUser, toolModal, materialModal },
|
|
@@ -438,10 +466,24 @@
|
|
|
default: 0
|
|
default: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ 'addForm.details': {
|
|
|
|
|
+ handler(details) {
|
|
|
|
|
+ const any = details.some((i) => i.checkResult === null);
|
|
|
|
|
+
|
|
|
|
|
+ if (any || details.length === 0) return;
|
|
|
|
|
+
|
|
|
|
|
+ const every = details.every((i) => i.checkResult == 1);
|
|
|
|
|
+ this.addForm.conclution = every ? 1 : 2;
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
const formDate = {
|
|
const formDate = {
|
|
|
id: null,
|
|
id: null,
|
|
|
workshopArea: '',
|
|
workshopArea: '',
|
|
|
|
|
+ workshopAreaId: null,
|
|
|
checkFinishTime: '',
|
|
checkFinishTime: '',
|
|
|
checkStartTime: '',
|
|
checkStartTime: '',
|
|
|
checkValidity: null,
|
|
checkValidity: null,
|
|
@@ -539,22 +581,6 @@
|
|
|
{ required: true, message: '请选择结论', trigger: 'blur' },
|
|
{ required: true, message: '请选择结论', trigger: 'blur' },
|
|
|
{ required: true, message: '请选择结论', trigger: 'change' }
|
|
{ required: true, message: '请选择结论', trigger: 'change' }
|
|
|
],
|
|
],
|
|
|
- checkValidity: [
|
|
|
|
|
- { required: true, message: '请输入检查有效期', trigger: 'blur' },
|
|
|
|
|
- { required: true, message: '请输入检查有效期', trigger: 'change' }
|
|
|
|
|
- ],
|
|
|
|
|
- checkValidityUnit: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请选择检查有效期单位',
|
|
|
|
|
- trigger: 'blur'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请选择检查有效期单位',
|
|
|
|
|
- trigger: 'change'
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
duration: [
|
|
duration: [
|
|
|
{ required: true, message: '请输入工时', trigger: 'blur' },
|
|
{ required: true, message: '请输入工时', trigger: 'blur' },
|
|
|
{ required: true, message: '请输入工时', trigger: 'change' },
|
|
{ required: true, message: '请输入工时', trigger: 'change' },
|
|
@@ -705,7 +731,8 @@
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
activeExecuteMethodTitle: '',
|
|
activeExecuteMethodTitle: '',
|
|
|
- executeMethodTitleList: []
|
|
|
|
|
|
|
+ executeMethodTitleList: [],
|
|
|
|
|
+ workshopAreaList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -805,6 +832,7 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.getTeamList(this.$store.state.user.info.teamId);
|
|
this.getTeamList(this.$store.state.user.info.teamId);
|
|
|
}
|
|
}
|
|
|
|
|
+ this.getWorkshopArea();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
open(productionInfo, workOrderInfo) {
|
|
open(productionInfo, workOrderInfo) {
|
|
@@ -1059,6 +1087,7 @@
|
|
|
this.butLoading = false;
|
|
this.butLoading = false;
|
|
|
this.productionInfo.recordId == null;
|
|
this.productionInfo.recordId == null;
|
|
|
this.addForm.workshopArea = '';
|
|
this.addForm.workshopArea = '';
|
|
|
|
|
+ this.addForm.workshopAreaId = null;
|
|
|
this.addForm.checkFinishTime = null;
|
|
this.addForm.checkFinishTime = null;
|
|
|
this.addForm.checkStartTime = null;
|
|
this.addForm.checkStartTime = null;
|
|
|
this.addForm.checkValidity = null;
|
|
this.addForm.checkValidity = null;
|
|
@@ -1220,8 +1249,13 @@
|
|
|
// 选择物料
|
|
// 选择物料
|
|
|
openMaterialModal() {
|
|
openMaterialModal() {
|
|
|
this.$refs.materialModalRef.open(
|
|
this.$refs.materialModalRef.open(
|
|
|
- this.addForm.workOrderId,
|
|
|
|
|
- this.addForm.ruleId,
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ workOrderId: this.addForm.workOrderId,
|
|
|
|
|
+ ruleId: this.addForm.ruleId,
|
|
|
|
|
+ produceTaskInstanceId:
|
|
|
|
|
+ this.workOrderInfo.taskId ||
|
|
|
|
|
+ this.workOrderInfo.produceTaskInstanceId
|
|
|
|
|
+ },
|
|
|
[]
|
|
[]
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
@@ -1273,16 +1307,40 @@
|
|
|
noQualifiedQuantityMax(row) {
|
|
noQualifiedQuantityMax(row) {
|
|
|
return row.reportQuantity - row.qualifiedQuantity;
|
|
return row.reportQuantity - row.qualifiedQuantity;
|
|
|
},
|
|
},
|
|
|
- // 结论修改-同步
|
|
|
|
|
- conclutionChange() {
|
|
|
|
|
|
|
+ // 查询车间区域
|
|
|
|
|
+ async getWorkshopArea() {
|
|
|
|
|
+ const data = await getFactoryarea({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: 999,
|
|
|
|
|
+ type: 3
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log('list', data.list);
|
|
|
|
|
+ this.workshopAreaList = data.list;
|
|
|
|
|
+ },
|
|
|
|
|
+ workshopAreaIdChange(e) {
|
|
|
|
|
+ const area = this.workshopAreaList.find((i) => i.id === e);
|
|
|
|
|
+ if (area) {
|
|
|
|
|
+ this.addForm.workshopArea = area.name;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.addForm.workshopArea = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批量检查
|
|
|
|
|
+ batchCheck() {
|
|
|
this.addForm.details = this.addForm.details.map((i) => {
|
|
this.addForm.details = this.addForm.details.map((i) => {
|
|
|
- if (!i.checkStatus) {
|
|
|
|
|
- i.checkStatus = 1;
|
|
|
|
|
- }
|
|
|
|
|
- i.checkResult = this.addForm.conclution == 1 ? 1 : 0;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ i.checkStatus = 1;
|
|
|
return i;
|
|
return i;
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批量合格
|
|
|
|
|
+ batchQualified() {
|
|
|
|
|
+ this.addForm.details = this.addForm.details.map((i) => {
|
|
|
|
|
+ i.checkResult = 1;
|
|
|
|
|
+ return i;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ conclutionChange() {
|
|
|
|
|
+ console.log('this.addForm.conclution', this.addForm.conclution);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|