|
|
@@ -164,7 +164,6 @@
|
|
|
ref="produceOrder"
|
|
|
@getTaskName="getTaskName"
|
|
|
:produceTaskInfo="produceTaskInfo"
|
|
|
- @changeIsPreProductionResult="changeIsPreProductionResult"
|
|
|
>
|
|
|
</produceOrder>
|
|
|
</div>
|
|
|
@@ -191,6 +190,7 @@
|
|
|
<feeding
|
|
|
:workListIds="workListIds"
|
|
|
:feedNeedEquipment="feedNeedEquipment"
|
|
|
+ @reload="reloadFeeding"
|
|
|
></feeding>
|
|
|
</div>
|
|
|
|
|
|
@@ -345,7 +345,10 @@
|
|
|
<BomDetailsPop ref="bomDrawer"></BomDetailsPop>
|
|
|
|
|
|
<!-- 产前准备 、 过程监测 、产后检测 -->
|
|
|
- <prenatalExamination ref="prenatalExaminationRef" />
|
|
|
+ <prenatalExamination
|
|
|
+ ref="prenatalExaminationRef"
|
|
|
+ @close="closePrenatalExamination"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -394,6 +397,7 @@
|
|
|
} from '@/api/produce/index';
|
|
|
import prenatalExamination from './components/prenatalExamination/index.vue';
|
|
|
import { workorderPage2 } from '@/api/produce/workOrder.js';
|
|
|
+ import { checkProductionResult } from '@/api/producetaskrulerecord/index.js';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -487,7 +491,7 @@
|
|
|
{ label: '过程检测', action: 'Edit' },
|
|
|
{ label: '产后检查', action: 'Favorite' }
|
|
|
],
|
|
|
- isPreProductionResult: true,
|
|
|
+ isPreProductionResult: null,
|
|
|
chooseType: '1',
|
|
|
isUpdataTask: false,
|
|
|
treeKey: '1'
|
|
|
@@ -617,7 +621,7 @@
|
|
|
|
|
|
// 重置按钮 禁用
|
|
|
if (this.produceTaskInfo && this.produceTaskInfo.id != data.id) {
|
|
|
- this.isPreProductionResult = true;
|
|
|
+ this.isPreProductionResult = null;
|
|
|
}
|
|
|
|
|
|
console.log(data, 'handleNodeClick');
|
|
|
@@ -663,7 +667,7 @@
|
|
|
if (this.produceTaskList?.length) {
|
|
|
this.$store.commit('user/setTaskObj', this.produceTaskList[0]);
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.taskListRef.setCurrentKey(
|
|
|
+ this.$refs.taskListRef?.setCurrentKey(
|
|
|
this.produceTaskList[0].id
|
|
|
);
|
|
|
});
|
|
|
@@ -682,7 +686,7 @@
|
|
|
if (this.produceTaskList?.length) {
|
|
|
this.$store.commit('user/setTaskObj', this.produceTaskList[0]);
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.taskListRef.setCurrentKey(
|
|
|
+ this.$refs.taskListRef?.setCurrentKey(
|
|
|
this.produceTaskList[0].id
|
|
|
);
|
|
|
});
|
|
|
@@ -835,6 +839,7 @@
|
|
|
this.operationType = null;
|
|
|
this.workListIds = data.ids;
|
|
|
this.workData = data;
|
|
|
+ this.checkProductionResult();
|
|
|
},
|
|
|
|
|
|
pickingWokeClose() {
|
|
|
@@ -1202,10 +1207,23 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- // 是否完成 产前准备 限制按钮
|
|
|
- changeIsPreProductionResult(isPreProductionResult) {
|
|
|
- console.log('isPreProductionResult', isPreProductionResult);
|
|
|
- this.isPreProductionResult = isPreProductionResult;
|
|
|
+ closePrenatalExamination() {
|
|
|
+ this.checkProductionResult();
|
|
|
+ },
|
|
|
+ //是否完成 产前准备 限制按钮
|
|
|
+ async checkProductionResult() {
|
|
|
+ if (this.produceTaskInfo && this.workListIds.length > 0) {
|
|
|
+ // 判断是否要求先完成 产前准备等事项
|
|
|
+ const result = await checkProductionResult({
|
|
|
+ produceTaskId: this.produceTaskInfo.id,
|
|
|
+ workOrderIds: this.workListIds
|
|
|
+ });
|
|
|
+ this.isPreProductionResult = result;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 投料后 重新检测按钮状态
|
|
|
+ reloadFeeding() {
|
|
|
+ this.checkProductionResult();
|
|
|
}
|
|
|
},
|
|
|
|