|
@@ -714,6 +714,20 @@
|
|
|
null
|
|
null
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
|
|
+ // 当前所选工序对应的“工序实例id”,随顶部步骤条切换而变化
|
|
|
|
|
+ getCurrentTaskInstanceId() {
|
|
|
|
|
+ const routeItem = this.getCurrentRouteItem();
|
|
|
|
|
+ const candidates = [
|
|
|
|
|
+ routeItem && routeItem.taskId,
|
|
|
|
|
+ this.newId,
|
|
|
|
|
+ this.workOrderInfo && this.workOrderInfo.taskId
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 过滤空值与完结态(-2),避免把无效工序实例id传给首件两检接口
|
|
|
|
|
+ return candidates.find(
|
|
|
|
|
+ (id) =>
|
|
|
|
|
+ id !== undefined && id !== null && id !== '' && String(id) !== '-2'
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
checkCurrentTaskTeamPermission(actionName) {
|
|
checkCurrentTaskTeamPermission(actionName) {
|
|
|
const deny = (message) => {
|
|
const deny = (message) => {
|
|
|
this.operationType = null;
|
|
this.operationType = null;
|
|
@@ -1452,8 +1466,16 @@
|
|
|
this.workOrderInfo.id
|
|
this.workOrderInfo.id
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ // 首件两检按“顶部步骤条当前所选工序”取数:
|
|
|
|
|
+ // workOrderInfo.taskId 是进入抽屉时的定位工序,切换工序后不会变,
|
|
|
|
|
+ // 这里用当前工序的实例id覆盖,保证 produceTaskInstanceId 跟随步骤条
|
|
|
|
|
+ const curWorkOrder = {
|
|
|
|
|
+ ...this.workOrderInfo,
|
|
|
|
|
+ taskId: this.getCurrentTaskInstanceId()
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
this.$refs.qualityInspectionRef.open(
|
|
this.$refs.qualityInspectionRef.open(
|
|
|
- this.workOrderInfo,
|
|
|
|
|
|
|
+ curWorkOrder,
|
|
|
this.taskObj,
|
|
this.taskObj,
|
|
|
'',
|
|
'',
|
|
|
req
|
|
req
|