Browse Source

2025-12-22

过站采集操作员切换【关闭】时不进机台工作台
master
fengyuan_yang 9 months ago
parent
commit
50dbb05687
  1. 28
      src/views/modules/qc/outboundNotification.vue
  2. 46
      src/views/modules/yieldReport/com_switch_operator.vue
  3. 12
      src/views/modules/yieldReport/produce_order.vue

28
src/views/modules/qc/outboundNotification.vue

@ -313,22 +313,22 @@
<el-table-column
prop="partNo"
header-align="center"
align="center"
min-width="80"
align="left"
min-width="120"
label="物料编码">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="120"
min-width="200"
label="物料名称">
</el-table-column>
<el-table-column
prop="unit"
prop="umName"
header-align="center"
align="left"
min-width="120"
align="center"
min-width="100"
label="物料单位">
</el-table-column>
</el-table>
@ -421,33 +421,33 @@
<el-table-column
prop="relatedOrderNo"
header-align="center"
align="center"
min-width="80"
align="left"
min-width="150"
label="采购订单">
</el-table-column>
<el-table-column
prop="relatedOrderLineNo"
header-align="center"
align="right"
min-width="100"
align="left"
min-width="200"
label="行号">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="center"
min-width="80"
align="left"
min-width="120"
label="物料编码">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="150"
min-width="200"
label="物料名称">
</el-table-column>
<el-table-column
prop="unit"
prop="umName"
header-align="center"
align="center"
min-width="100"

46
src/views/modules/yieldReport/com_switch_operator.vue

@ -1,7 +1,7 @@
<template>
<!-- 操作员切换模块 -->
<div class="customer-css">
<el-dialog :title="titleCon" v-bind="$attrs" v-on="$listeners" width="800px" :close-on-click-modal="false">
<el-dialog :title="titleCon" v-bind="$attrs" v-on="$listeners" width="800px" :close-on-click-modal="false" :before-close="handleDialogClose">
<!-- 上部分:添加操作员 -->
<el-form v-if="!isAttendanceMode" :inline="true" @submit.native.prevent label-position="top" label-width="100px" style="margin-bottom: 15px;">
<el-row>
@ -110,7 +110,7 @@
<!-- 底部:保存和关闭按钮 -->
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveOperatorData">{{ buttons.saveButton }}</el-button>
<el-button @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button @click="closeDialog(false)">{{ buttons.closeButton }}</el-button>
</div>
</el-dialog>
<!--列表的组件-->
@ -174,6 +174,8 @@ export default {
currentSchedule: {},
// 是否为考勤修改模式(不显示添加操作员功能)
isAttendanceMode: false,
// 关闭时是否导航到机台工作台(默认true,从过站采集页面打开时传false)
navigateOnClose: true,
buttons: {
saveButton: '保存',
closeButton: '关闭',
@ -273,8 +275,16 @@ export default {
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')} ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}:${String(date.getSeconds()).padStart(2, '0')}`;
},
/*处理对话框关闭(点击右上角X按钮时触发)*/
handleDialogClose(done) {
// 调用关闭逻辑(不是保存操作)
this.closeDialog(false);
// 调用 done 完成关闭
done();
},
/*关闭modal*/
closeDialog() {
closeDialog(isSaveAction = false) {
// 关闭弹窗
this.$emit('update:visible', false);
@ -283,23 +293,33 @@ export default {
return;
}
// 非考勤模式:即使用户不点击保存,也应该使用默认的当前登录人作为操作员
// 设置默认操作员信息,并进入机台工作台
this.operatorData.operatorId = this.$store.state.user.name;
this.operatorData.operatorName = this.$store.state.user.userDisplay;
this.operatorData.status = 'Y';
// 判断是否需要导航到机台工作台
// 1. 如果是保存操作(isSaveAction = true),则一定要导航
// 2. 如果是关闭按钮操作,需要看 navigateOnClose 参数
// - navigateOnClose = true(从机台工作台打开):导航(更新操作员信息)
// - navigateOnClose = false(从过站采集页面打开):不导航,直接返回主页面
if (isSaveAction === true || this.navigateOnClose === true) {
// 设置默认操作员信息,并进入机台工作台
this.operatorData.operatorId = this.$store.state.user.name;
this.operatorData.operatorName = this.$store.state.user.userDisplay;
this.operatorData.status = 'Y';
// 调用初始化的方法,进入机台工作台
this.$emit('initOperatorData', this.operatorData);
// 调用初始化的方法,进入机台工作台
this.$emit('initOperatorData', this.operatorData);
}
// 如果 navigateOnClose = false 且不是保存操作,则只关闭对话框,返回主页面
},
//初始化的
init(val, scheduleRow, isAttendanceMode = false) {
init(val, scheduleRow, isAttendanceMode = false, navigateOnClose = true) {
// 保存派工单信息
this.currentSchedule = scheduleRow || {};
// 设置是否为考勤修改模式
this.isAttendanceMode = isAttendanceMode;
// 设置关闭时是否导航(从过站采集页面打开时传false,从机台工作台打开时传true)
this.navigateOnClose = navigateOnClose;
// 设置默认操作员为当前登录人
this.operatorData.operatorName = this.$store.state.user.userDisplay;
@ -535,8 +555,8 @@ export default {
this.operatorData.status = 'Y';
this.operatorFlag = true;
// 关闭弹窗并进入机台工作台
this.closeDialog();
// 关闭弹窗并进入机台工作台(传 true 表示是保存操作,一定要导航)
this.closeDialog(true);
});
},

12
src/views/modules/yieldReport/produce_order.vue

@ -1923,7 +1923,7 @@ export default {
// 打开操作员切换功能
this.showOperatorFlag = true
this.$nextTick(() => {
this.$refs.comSwitchOperator.init(val, this.currentRow)
this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
})
}
if (data.code == 300) {
@ -1938,7 +1938,7 @@ export default {
// 打开操作员切换功能
this.showOperatorFlag = true
this.$nextTick(() => {
this.$refs.comSwitchOperator.init(val, this.currentRow)
this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
})
})
}
@ -1948,7 +1948,7 @@ export default {
let orderType = this.currentRow.orderType
if (orderType === 'D') {
this.showOperatorFlag = true
this.$refs.comSwitchOperator.init(val, this.currentRow)
this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
} else {
this.$message.error(this.labels.thisOrderIsNotSplitOrder)
return false
@ -1958,7 +1958,7 @@ export default {
let workCenterNo = this.currentRow.workCenterNo
if (workCenterNo === 'FQC' || nextItemNo == 0) {
this.showOperatorFlag = true
this.$refs.comSwitchOperator.init(val, this.currentRow)
this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
} else {
this.$message.error(this.labels.thisScheduleIsNotFqc)
return false
@ -1971,7 +1971,7 @@ export default {
// 打开操作员切换功能
this.showOperatorFlag = true
this.$nextTick(() => {
this.$refs.comSwitchOperator.init(val, this.currentRow)
this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
})
} else {
this.$alert(this.labels.thisOrderIsNotSpecialOrder, '提示', {
@ -1984,7 +1984,7 @@ export default {
// 打开操作员切换功能
this.showOperatorFlag = true
this.$nextTick(() => {
this.$refs.comSwitchOperator.init(val, this.currentRow)
this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
})
}
}

Loading…
Cancel
Save