|
|
@@ -200,6 +200,13 @@
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
+ <div v-if="operationType == 'workOrder'">
|
|
|
+ <workOrderHandover
|
|
|
+ :workListIds="workListIds"
|
|
|
+ ref="workOrderHandoverRef"
|
|
|
+ ></workOrderHandover>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 工步 -->
|
|
|
<div v-if="operationType == 'workStep'"> </div>
|
|
|
<!-- 质检工序 -->
|
|
|
@@ -361,6 +368,7 @@
|
|
|
import taskWorkList from './components/taskWorkList.vue';
|
|
|
import taskReport from './components/taskReport.vue';
|
|
|
import { getProduceTaskList } from '@/api/aps';
|
|
|
+ import workOrderHandover from './components/workOrderHandover/index.vue';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -391,7 +399,8 @@
|
|
|
addPlease,
|
|
|
qualityInspection,
|
|
|
taskWorkList,
|
|
|
- taskReport
|
|
|
+ taskReport,
|
|
|
+ workOrderHandover
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -491,6 +500,7 @@
|
|
|
error: this.handleError,
|
|
|
Outsourcing: this.handleOutsourcing,
|
|
|
qualityInspection: this.handleQualityInspection,
|
|
|
+ workOrder: this.handleWorkOrder,
|
|
|
prenatalExamination: () => this.handleInspection(1),
|
|
|
processDetection: () => this.handleInspection(2),
|
|
|
postpartumExamination: () => this.handleInspection(3)
|
|
|
@@ -944,661 +954,6 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // async footBtn(t) {
|
|
|
- // this.workPlanType = '';
|
|
|
- // if ((t == 'work' || t == 'workStep', t === 'task')) {
|
|
|
- // this.popupType = t;
|
|
|
- // } else {
|
|
|
- // this.operationType = t;
|
|
|
- // }
|
|
|
- // if (
|
|
|
- // Object.keys(this.$store.state.user.taskObj).length === 0 &&
|
|
|
- // this.$store.state.user.taskObj.constructor === Object
|
|
|
- // ) {
|
|
|
- // this.$message.warning('请选择工序');
|
|
|
- // return true;
|
|
|
- // }
|
|
|
- // if (['pick', 'feed', 'job', 'work', 'workStep', 'task'].includes(t)) {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length == 0) {
|
|
|
- // this.$message.warning('请选择工单列表');
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (t === 'job') {
|
|
|
- // let resultValue = '0';
|
|
|
- // await parameterGetByCode({
|
|
|
- // code: 'first_article_dual_inspection_for_report'
|
|
|
- // }).then((res) => {
|
|
|
- // resultValue = res.value;
|
|
|
- // });
|
|
|
- // if (this.activeName == '1') {
|
|
|
- // if (!this.taskData) {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请选择一条任务单进行报工');
|
|
|
- // } else {
|
|
|
- // this.isFinalCheckProduction = true;
|
|
|
- // }
|
|
|
- // const row = this.taskData;
|
|
|
- // if (resultValue == '1') {
|
|
|
- // if (row.totalFirstArticleDualInspectionStatus != 2) {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请先完成首件两检再报工');
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.isFinalCheckProduction = true;
|
|
|
- // }
|
|
|
- // let currentRow = {
|
|
|
- // assignCode: row.assignCode,
|
|
|
- // mesWorkOrderCode: row.mesWorkOrderCode,
|
|
|
- // workOrderCode: row.workOrderCode,
|
|
|
- // productionPlanCode: row.productionPlanCode,
|
|
|
- // produceRoutingName: row.produceRoutingName,
|
|
|
- // formingNum: row.formingNum,
|
|
|
- // assignTeamName: row.assignTeamName,
|
|
|
- // formingWeight: row.formingWeight,
|
|
|
- // planStartTime: row.planStartTime,
|
|
|
- // planCompleteTime: row.planCompleteTime,
|
|
|
- // startTime: row.startTime,
|
|
|
- // firstTaskId: row.firstTaskId,
|
|
|
- // endTime: row.endTime,
|
|
|
- // taskName: row.taskName,
|
|
|
- // firstTaskName: row.firstTaskName,
|
|
|
- // assigneeType: row.assigneeType ? row.assigneeType.desc : '',
|
|
|
- // assigneeName: row.assigneeName,
|
|
|
- // weight: row.weight,
|
|
|
- // quantity: row.quantity,
|
|
|
- // durationText: row.durationText,
|
|
|
- // apsAssigneeId: row.id,
|
|
|
- // batchNo: row.batchNo,
|
|
|
- // productCode: row.productCode,
|
|
|
- // productName: row.productName,
|
|
|
- // specification: row.specification,
|
|
|
- // newWeightUnit: row.newWeightUnit,
|
|
|
- // measuringUnit: row.measuringUnit
|
|
|
- // };
|
|
|
- // let form = {
|
|
|
- // realEndTime: row.realEndTime,
|
|
|
- // realStartTime: row.realStartTime,
|
|
|
- // unqualifiedWeight: row.unqualifiedWeight,
|
|
|
- // unqualifiedQuantity: row.unqualifiedQuantity,
|
|
|
- // qualifiedWeight: row.qualifiedWeight,
|
|
|
- // remark: row.assigneeRemark,
|
|
|
- // qualifiedQuantity: row.qualifiedQuantity,
|
|
|
- // reportQuantity: row.reportQuantity,
|
|
|
- // lossQuantity: row.lossQuantity
|
|
|
- // };
|
|
|
-
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.taskReportRef.open('repoort', currentRow, form);
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.isFinalCheckProduction = true;
|
|
|
- // let req = {
|
|
|
- // taskId: this.taskObj.id,
|
|
|
- // workOrderId: this.workListIds[0],
|
|
|
- // data: this.workData.list
|
|
|
- // };
|
|
|
-
|
|
|
- // if (resultValue == '1') {
|
|
|
- // const result = await this.checkQualityResult();
|
|
|
- // if (!result) return;
|
|
|
-
|
|
|
- // const firstArticleResult =
|
|
|
- // result.firstArticleDualInspectionResult ?? true;
|
|
|
-
|
|
|
- // this.isFinalCheckProduction = firstArticleResult;
|
|
|
-
|
|
|
- // if (!firstArticleResult) {
|
|
|
- // return this.$message.warning('请完成首件两检再报工!');
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (
|
|
|
- // this.taskObj.type == 2 ||
|
|
|
- // this.taskObj.type == 3 ||
|
|
|
- // this.taskObj.type == 6
|
|
|
- // ) {
|
|
|
- // this.getCodeData(req);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (t == 'pick') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // this.$nextTick(() => {
|
|
|
- // console.log(this.taskObj);
|
|
|
- // this.$refs.pickListRef.getList(this.workListIds);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // // 工步
|
|
|
- // if (t === 'workStep') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('工步只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.workStepRef.open(this.workStepQueryParam);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (t === 'task') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('任务只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.taskDialogRef.open(
|
|
|
- // this.workStepQueryParam,
|
|
|
- // this.workData.list[0]
|
|
|
- // );
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (t === 'error') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('异常只能选择一个工单!');
|
|
|
- // } else if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // }
|
|
|
-
|
|
|
- // this.$refs.createErrorRef.open('add', this.workData.list[0]);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // // 工艺路线 *** 修改 判断只能选择一个
|
|
|
- // // if (t === 'work') {
|
|
|
- // // let req = {
|
|
|
- // // taskId: this.taskObj.id,
|
|
|
- // // workOrderId: this.workListIds[0]
|
|
|
- // // };
|
|
|
-
|
|
|
- // // this.$refs.wokePopupRef.open(req);
|
|
|
- // // }
|
|
|
- // if (t === 'work') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('工艺文件只能选择一个工单!');
|
|
|
- // } else if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // }
|
|
|
-
|
|
|
- // await parameterGetByCode({
|
|
|
- // code: 'mes_craft_file_by_category_code'
|
|
|
- // }).then((res) => {
|
|
|
- // console.log(this.workData.list, 'this.workData.list');
|
|
|
- // if (res.value == '1') {
|
|
|
- // let req = {
|
|
|
- // taskId: this.taskObj.id,
|
|
|
- // workOrderId: this.workListIds[0],
|
|
|
- // productCode: this.workData.list[0].productCode
|
|
|
- // };
|
|
|
-
|
|
|
- // this.$refs.wokePopupRef.openTwo(req);
|
|
|
- // } else {
|
|
|
- // let req = {
|
|
|
- // taskId: this.taskObj.id,
|
|
|
- // workOrderId: this.workListIds[0]
|
|
|
- // };
|
|
|
-
|
|
|
- // this.$refs.wokePopupRef.open(req);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (t == 'feed') {
|
|
|
- // }
|
|
|
-
|
|
|
- // if (t == 'device') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.taskObj.id) {
|
|
|
- // this.$refs.deviceRef.open(this.taskObj.id);
|
|
|
- // } else {
|
|
|
- // this.$message.warning('请选择工序');
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (t == 'turnover') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // } else {
|
|
|
- // const codeListData = [];
|
|
|
- // this.workData.list.forEach((it) => {
|
|
|
- // codeListData.push(it.code);
|
|
|
- // });
|
|
|
- // this.$refs.turnoverRef.open(codeListData);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (t == 'bom') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('查看BOM详情只能选择一个工单!');
|
|
|
- // } else if (this.workListIds.length < 1)
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // else {
|
|
|
- // console.log(this.workData);
|
|
|
- // const row = this.workData.list[0];
|
|
|
- // let rowData = {
|
|
|
- // categoryId: row.categoryId,
|
|
|
- // categoryName: row.bomCategoryName,
|
|
|
- // code: row.code,
|
|
|
- // versions: row.bomCategoryVersions,
|
|
|
- // rootPathIdParent: row.categoryLevelPathIdParent || '',
|
|
|
- // isProduct: true,
|
|
|
- // bomType: Number(row.bomType),
|
|
|
- // isTemp: 0
|
|
|
- // };
|
|
|
- // this.$refs.bomDrawer.open(rowData);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // // 委外
|
|
|
- // if (t == 'Outsourcing') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('委外请托工序只能选择一个工单!');
|
|
|
- // } else if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // } else {
|
|
|
- // console.log(this.workData, 'this.workData');
|
|
|
- // // /
|
|
|
- // this.handOutsource(this.workListIds[0]);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // // 产前准备 过程控制 产后检查
|
|
|
- // if (
|
|
|
- // t == 'prenatalExamination' ||
|
|
|
- // t == 'processDetection' ||
|
|
|
- // t == 'postpartumExamination'
|
|
|
- // ) {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // if (t == 'prenatalExamination') {
|
|
|
- // return this.$message.warning('产前准备只能选择一个工单!');
|
|
|
- // }
|
|
|
- // if (t == 'processDetection') {
|
|
|
- // return this.$message.warning('过程控制只能选择一个工单!');
|
|
|
- // }
|
|
|
- // return this.$message.warning('产后检查只能选择一个工单!');
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // }
|
|
|
-
|
|
|
- // let reportWorkType = 1;
|
|
|
-
|
|
|
- // switch (t) {
|
|
|
- // case 'prenatalExamination':
|
|
|
- // reportWorkType = 1;
|
|
|
- // break;
|
|
|
- // case 'processDetection':
|
|
|
- // reportWorkType = 2;
|
|
|
- // break;
|
|
|
- // default:
|
|
|
- // reportWorkType = 3;
|
|
|
- // break;
|
|
|
- // }
|
|
|
-
|
|
|
- // this.$refs.prenatalExaminationRef.open(
|
|
|
- // this.workData.list[0],
|
|
|
- // this.produceTaskInfo,
|
|
|
- // reportWorkType
|
|
|
- // );
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // // 首件两检
|
|
|
- // if (t == 'qualityInspection') {
|
|
|
- // if (this.activeName == '0') {
|
|
|
- // if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // }
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('首件两检只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.qualityInspectionRef.open(
|
|
|
- // this.workData.list[0],
|
|
|
- // this.produceTaskInfo
|
|
|
- // );
|
|
|
- // } else {
|
|
|
- // if (!this.taskData) {
|
|
|
- // return this.$message.warning('请选择一条任务单首件两检');
|
|
|
- // }
|
|
|
-
|
|
|
- // this.selfRequest(this.taskData);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- // async footBtn(t) {
|
|
|
- // this.initOperationType(t);
|
|
|
-
|
|
|
- // if (!this.checkTaskSelected()) return;
|
|
|
- // if (!this.checkWorkOrderSelected(t)) return;
|
|
|
-
|
|
|
- // switch (t) {
|
|
|
- // case 'job':
|
|
|
- // await this.handleJob();
|
|
|
- // break;
|
|
|
- // case 'pick':
|
|
|
- // this.handlePick();
|
|
|
- // break;
|
|
|
- // case 'workStep':
|
|
|
- // this.handleWorkStep();
|
|
|
- // break;
|
|
|
- // case 'task':
|
|
|
- // this.handleTask();
|
|
|
- // break;
|
|
|
- // case 'error':
|
|
|
- // this.handleError();
|
|
|
- // break;
|
|
|
- // case 'work':
|
|
|
- // await this.handleWork();
|
|
|
- // break;
|
|
|
- // case 'device':
|
|
|
- // this.handleDevice();
|
|
|
- // break;
|
|
|
- // case 'turnover':
|
|
|
- // this.handleTurnover();
|
|
|
- // break;
|
|
|
- // case 'bom':
|
|
|
- // this.handleBom();
|
|
|
- // break;
|
|
|
- // case 'Outsourcing':
|
|
|
- // this.handleOutsourcing();
|
|
|
- // break;
|
|
|
- // case 'prenatalExamination':
|
|
|
- // case 'processDetection':
|
|
|
- // case 'postpartumExamination':
|
|
|
- // this.handleInspection(t);
|
|
|
- // break;
|
|
|
- // case 'qualityInspection':
|
|
|
- // this.handleQualityInspection();
|
|
|
- // break;
|
|
|
- // default:
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // },
|
|
|
- // initOperationType(t) {
|
|
|
- // this.workPlanType = '';
|
|
|
- // if (['work', 'workStep', 'task'].includes(t)) {
|
|
|
- // this.popupType = t;
|
|
|
- // } else {
|
|
|
- // this.operationType = t;
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- // checkTaskSelected() {
|
|
|
- // const taskObj = this.$store.state.user.taskObj;
|
|
|
- // if (!taskObj || Object.keys(taskObj).length === 0) {
|
|
|
- // this.$message.warning('请选择工序');
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // return true;
|
|
|
- // },
|
|
|
-
|
|
|
- // checkWorkOrderSelected(t) {
|
|
|
- // const needCheck = ['pick', 'feed', 'job', 'work', 'workStep', 'task'];
|
|
|
- // if (!needCheck.includes(t)) return true;
|
|
|
-
|
|
|
- // if (this.activeName === '0' && this.workListIds.length === 0) {
|
|
|
- // this.$message.warning('请选择工单列表');
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // return true;
|
|
|
- // },
|
|
|
-
|
|
|
- // async needFirstArticleCheck() {
|
|
|
- // const res = await parameterGetByCode({
|
|
|
- // code: 'first_article_dual_inspection_for_report'
|
|
|
- // });
|
|
|
- // return res?.value === '1';
|
|
|
- // },
|
|
|
-
|
|
|
- // async handleJob() {
|
|
|
- // const needCheck = await this.needFirstArticleCheck();
|
|
|
-
|
|
|
- // if (this.activeName === '1') {
|
|
|
- // this.handleSingleTaskJob(needCheck);
|
|
|
- // } else {
|
|
|
- // await this.handleBatchJob(needCheck);
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- // handleSingleTaskJob(needCheck) {
|
|
|
- // if (!this.taskData) {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请选择一条任务单进行报工');
|
|
|
- // }
|
|
|
-
|
|
|
- // const row = this.taskData;
|
|
|
-
|
|
|
- // if (needCheck && row.totalFirstArticleDualInspectionStatus !== 2) {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请先完成首件两检再报工');
|
|
|
- // }
|
|
|
-
|
|
|
- // this.isFinalCheckProduction = true;
|
|
|
-
|
|
|
- // const currentRow = this.buildTaskRow(row);
|
|
|
- // const form = this.buildTaskForm(row);
|
|
|
-
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.taskReportRef.open('repoort', currentRow, form);
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
- // async handleBatchJob(needCheck) {
|
|
|
- // this.isFinalCheckProduction = true;
|
|
|
-
|
|
|
- // const req = {
|
|
|
- // taskId: this.taskObj.id,
|
|
|
- // workOrderId: this.workListIds[0],
|
|
|
- // data: this.workData.list
|
|
|
- // };
|
|
|
-
|
|
|
- // if (needCheck) {
|
|
|
- // const result = await this.checkQualityResult();
|
|
|
- // const ok = result?.firstArticleDualInspectionResult ?? true;
|
|
|
- // if (!ok) {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请完成首件两检再报工!');
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if ([2, 3, 6].includes(this.taskObj.type)) {
|
|
|
- // this.getCodeData(req);
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- // buildTaskRow(row) {
|
|
|
- // return {
|
|
|
- // assignCode: row.assignCode,
|
|
|
- // mesWorkOrderCode: row.mesWorkOrderCode,
|
|
|
- // workOrderCode: row.workOrderCode,
|
|
|
- // productionPlanCode: row.productionPlanCode,
|
|
|
- // produceRoutingName: row.produceRoutingName,
|
|
|
- // formingNum: row.formingNum,
|
|
|
- // assignTeamName: row.assignTeamName,
|
|
|
- // formingWeight: row.formingWeight,
|
|
|
- // planStartTime: row.planStartTime,
|
|
|
- // planCompleteTime: row.planCompleteTime,
|
|
|
- // startTime: row.startTime,
|
|
|
- // firstTaskId: row.firstTaskId,
|
|
|
- // endTime: row.endTime,
|
|
|
- // taskName: row.taskName,
|
|
|
- // firstTaskName: row.firstTaskName,
|
|
|
- // assigneeType: row.assigneeType?.desc || '',
|
|
|
- // assigneeName: row.assigneeName,
|
|
|
- // weight: row.weight,
|
|
|
- // quantity: row.quantity,
|
|
|
- // durationText: row.durationText,
|
|
|
- // apsAssigneeId: row.id,
|
|
|
- // batchNo: row.batchNo,
|
|
|
- // productCode: row.productCode,
|
|
|
- // productName: row.productName,
|
|
|
- // specification: row.specification,
|
|
|
- // newWeightUnit: row.newWeightUnit,
|
|
|
- // measuringUnit: row.measuringUnit
|
|
|
- // };
|
|
|
- // },
|
|
|
-
|
|
|
- // buildTaskForm(row) {
|
|
|
- // return {
|
|
|
- // realEndTime: row.realEndTime,
|
|
|
- // realStartTime: row.realStartTime,
|
|
|
- // unqualifiedWeight: row.unqualifiedWeight,
|
|
|
- // unqualifiedQuantity: row.unqualifiedQuantity,
|
|
|
- // qualifiedWeight: row.qualifiedWeight,
|
|
|
- // remark: row.assigneeRemark,
|
|
|
- // qualifiedQuantity: row.qualifiedQuantity,
|
|
|
- // reportQuantity: row.reportQuantity,
|
|
|
- // lossQuantity: row.lossQuantity
|
|
|
- // };
|
|
|
- // },
|
|
|
-
|
|
|
- // handlePick() {
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.pickListRef.getList(this.workListIds);
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
- // handleWorkStep() {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('工步只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.workStepRef.open(this.workStepQueryParam);
|
|
|
- // },
|
|
|
-
|
|
|
- // handleTask() {
|
|
|
- // if (this.workListIds.length > 1) {
|
|
|
- // return this.$message.warning('任务只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.taskDialogRef.open(
|
|
|
- // this.workStepQueryParam,
|
|
|
- // this.workData.list[0]
|
|
|
- // );
|
|
|
- // },
|
|
|
-
|
|
|
- // handleError() {
|
|
|
- // if (this.workListIds.length !== 1) {
|
|
|
- // return this.$message.warning('异常只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.createErrorRef.open('add', this.workData.list[0]);
|
|
|
- // },
|
|
|
-
|
|
|
- // async handleWork() {
|
|
|
- // if (this.workListIds.length !== 1) {
|
|
|
- // return this.$message.warning('工艺文件只能选择一个工单!');
|
|
|
- // }
|
|
|
-
|
|
|
- // const res = await parameterGetByCode({
|
|
|
- // code: 'mes_craft_file_by_category_code'
|
|
|
- // });
|
|
|
-
|
|
|
- // const baseReq = {
|
|
|
- // taskId: this.taskObj.id,
|
|
|
- // workOrderId: this.workListIds[0]
|
|
|
- // };
|
|
|
-
|
|
|
- // if (res?.value === '1') {
|
|
|
- // this.$refs.wokePopupRef.openTwo({
|
|
|
- // ...baseReq,
|
|
|
- // productCode: this.workData.list[0].productCode
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.$refs.wokePopupRef.open(baseReq);
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- // handleDevice() {
|
|
|
- // if (!this.taskObj.id) {
|
|
|
- // return this.$message.warning('请选择工序');
|
|
|
- // }
|
|
|
- // this.$refs.deviceRef.open(this.taskObj.id);
|
|
|
- // },
|
|
|
-
|
|
|
- // handleTurnover() {
|
|
|
- // if (this.workListIds.length < 1) {
|
|
|
- // return this.$message.warning('请选择工单!');
|
|
|
- // }
|
|
|
- // const codes = this.workData.list.map((it) => it.code);
|
|
|
- // this.$refs.turnoverRef.open(codes);
|
|
|
- // },
|
|
|
-
|
|
|
- // handleBom() {
|
|
|
- // if (this.workListIds.length !== 1) {
|
|
|
- // return this.$message.warning('查看BOM只能选择一个工单!');
|
|
|
- // }
|
|
|
-
|
|
|
- // const row = this.workData.list[0];
|
|
|
- // this.$refs.bomDrawer.open({
|
|
|
- // categoryId: row.categoryId,
|
|
|
- // categoryName: row.bomCategoryName,
|
|
|
- // code: row.code,
|
|
|
- // versions: row.bomCategoryVersions,
|
|
|
- // rootPathIdParent: row.categoryLevelPathIdParent || '',
|
|
|
- // isProduct: true,
|
|
|
- // bomType: Number(row.bomType),
|
|
|
- // isTemp: 0
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
- // handleOutsourcing() {
|
|
|
- // if (this.workListIds.length !== 1) {
|
|
|
- // return this.$message.warning('委外只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.handOutsource(this.workListIds[0]);
|
|
|
- // },
|
|
|
-
|
|
|
- // handleInspection(t) {
|
|
|
- // if (this.workListIds.length !== 1) {
|
|
|
- // const map = {
|
|
|
- // prenatalExamination: '产前准备',
|
|
|
- // processDetection: '过程控制',
|
|
|
- // postpartumExamination: '产后检查'
|
|
|
- // };
|
|
|
- // return this.$message.warning(`${map[t]}只能选择一个工单!`);
|
|
|
- // }
|
|
|
-
|
|
|
- // const typeMap = {
|
|
|
- // prenatalExamination: 1,
|
|
|
- // processDetection: 2,
|
|
|
- // postpartumExamination: 3
|
|
|
- // };
|
|
|
-
|
|
|
- // this.$refs.prenatalExaminationRef.open(
|
|
|
- // this.workData.list[0],
|
|
|
- // this.produceTaskInfo,
|
|
|
- // typeMap[t]
|
|
|
- // );
|
|
|
- // },
|
|
|
-
|
|
|
- // handleQualityInspection() {
|
|
|
- // if (this.activeName === '0') {
|
|
|
- // if (this.workListIds.length !== 1) {
|
|
|
- // return this.$message.warning('首件两检只能选择一个工单!');
|
|
|
- // }
|
|
|
- // this.$refs.qualityInspectionRef.open(
|
|
|
- // this.workData.list[0],
|
|
|
- // this.produceTaskInfo
|
|
|
- // );
|
|
|
- // } else {
|
|
|
- // if (!this.taskData) {
|
|
|
- // return this.$message.warning('请选择一条任务单首件两检');
|
|
|
- // }
|
|
|
- // this.selfRequest(this.taskData);
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
async footBtn(t) {
|
|
|
this.workPlanType = '';
|
|
|
|
|
|
@@ -1763,82 +1118,6 @@
|
|
|
};
|
|
|
},
|
|
|
|
|
|
- // async handleTaskJob() {
|
|
|
- // if (!this.taskData) {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请选择一条任务单进行报工');
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.taskData.disposalStatus == '0') {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('请先接收任务再做首件两检');
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.taskData.disposalStatus == '2') {
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // return this.$message.warning('该任务单已被拒绝');
|
|
|
- // }
|
|
|
-
|
|
|
- // const row = this.taskData;
|
|
|
- // this.isFinalCheckProduction = false;
|
|
|
- // if (this.taskObj.id != '-1') {
|
|
|
- // if (
|
|
|
- // row.hasFirstArticleDualInspection == '1' &&
|
|
|
- // row.totalFirstArticleDualInspectionStatus != '2'
|
|
|
- // ) {
|
|
|
- // return this.$message.warning('请先完成首件两检再报工');
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // this.isFinalCheckProduction = true;
|
|
|
-
|
|
|
- // const currentRow = {
|
|
|
- // assignCode: row.assignCode,
|
|
|
- // mesWorkOrderCode: row.mesWorkOrderCode,
|
|
|
- // workOrderCode: row.workOrderCode,
|
|
|
- // productionPlanCode: row.productionPlanCode,
|
|
|
- // produceRoutingName: row.produceRoutingName,
|
|
|
- // formingNum: row.formingNum,
|
|
|
- // assignTeamName: row.assignTeamName,
|
|
|
- // formingWeight: row.formingWeight,
|
|
|
- // planStartTime: row.planStartTime,
|
|
|
- // planCompleteTime: row.planCompleteTime,
|
|
|
- // startTime: row.startTime,
|
|
|
- // firstTaskId: row.firstTaskId,
|
|
|
- // endTime: row.endTime,
|
|
|
- // taskName: row.taskName,
|
|
|
- // firstTaskName: row.firstTaskName,
|
|
|
- // assigneeType: row.assigneeType?.desc || '',
|
|
|
- // assigneeName: row.assigneeName,
|
|
|
- // weight: row.weight,
|
|
|
- // quantity: row.quantity,
|
|
|
- // durationText: row.durationText,
|
|
|
- // apsAssigneeId: row.id,
|
|
|
- // batchNo: row.batchNo,
|
|
|
- // productCode: row.productCode,
|
|
|
- // productName: row.productName,
|
|
|
- // specification: row.specification,
|
|
|
- // newWeightUnit: row.newWeightUnit,
|
|
|
- // measuringUnit: row.measuringUnit
|
|
|
- // };
|
|
|
-
|
|
|
- // const form = {
|
|
|
- // realEndTime: row.realEndTime,
|
|
|
- // realStartTime: row.realStartTime,
|
|
|
- // unqualifiedWeight: row.unqualifiedWeight,
|
|
|
- // unqualifiedQuantity: row.unqualifiedQuantity,
|
|
|
- // qualifiedWeight: row.qualifiedWeight,
|
|
|
- // remark: row.assigneeRemark,
|
|
|
- // qualifiedQuantity: row.qualifiedQuantity,
|
|
|
- // reportQuantity: row.reportQuantity,
|
|
|
- // lossQuantity: row.lossQuantity
|
|
|
- // };
|
|
|
-
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.taskReportRef.open('repoort', currentRow, form);
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
async handleWorkOrderJob() {
|
|
|
if (!this.checkWorkOrder({ min: 1 })) return;
|
|
|
|
|
|
@@ -2103,6 +1382,9 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ /* ================== workOrder ================== */
|
|
|
+ handleWorkOrder() {},
|
|
|
+
|
|
|
successTask() {
|
|
|
this.isFinalCheckProduction = false;
|
|
|
},
|