diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index b6a07c4..8503e67 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -3301,7 +3301,7 @@ export default { } ], searchData: { - site: this.$store.state.user.site, + site: '', username: this.$store.state.user.name, seqNo: '', orderNo: '', @@ -3325,7 +3325,7 @@ export default { functionName: '' }, scheduleData: { - site: this.$store.state.user.site, + site: '', username: this.$store.state.user.name, seqNo: '', orderNo: '', @@ -3365,13 +3365,13 @@ export default { parkFlag: '', // 暂停生产标识 N-暂停 Y-继续 }, currentRollOps: { - site: this.$store.state.user.site, + site: '', seqNo: '', rollNo: '', finishedFlag: '', }, operatorData: { - site: this.$store.state.user.site, + site: '', username: this.$store.state.user.name, operatorId: '', operatorName: '', @@ -4020,7 +4020,7 @@ export default { type: 'warning' }).then(() => { let dto = { - site: this.$store.state.user.site, + site: this.scheduleData.site, orderNo: this.scheduleData.orderNo, itemNo: this.scheduleData.itemNo, seqNo: this.scheduleData.seqNo, @@ -4188,7 +4188,7 @@ export default { const currentTime = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}` this.productionStatusLoading = true updateProductionStatus({ - site: this.scheduleData.site || this.$store.state.user.site, + site: this.scheduleData.site, orderNo: this.scheduleData.orderNo, seqNo: this.scheduleData.seqNo, itemNo: this.scheduleData.itemNo, @@ -4327,7 +4327,7 @@ export default { type: 'warning' }).then(() => { let requestData = { - site: this.searchData.site, + site: this.scheduleData.site, seqNo: this.searchData.seqNo, rollNo: row.rollNo, histSeqNo: row.histSeqNo, @@ -4406,6 +4406,17 @@ export default { this.scheduleData.seqNo = seqNo; this.currentRollOps.seqNo = seqNo; this.operatorData = operatorData; + + // Update site for searchData and currentRollOps when operatorData is provided + if (operatorData && operatorData.site) { + this.scheduleData.site = operatorData.site; + this.searchData.site = operatorData.site; + this.currentRollOps.site = operatorData.site; + } else if (!this.scheduleData.site) { + this.scheduleData.site = this.$store.state.user.site; + this.searchData.site = this.$store.state.user.site; + this.currentRollOps.site = this.$store.state.user.site; + } // this.getMultiLanguageList(); //刷新多语言的信息 //清空当前的页面列表参数 this.sfdcTimeList = []; @@ -4425,6 +4436,9 @@ export default { //刷新页面的数据 async refreshPageData() { await getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => { + this.scheduleData.site = data.row.site; + this.searchData.site = data.row.site; + this.currentRollOps.site = data.row.site; this.scheduleData.seqNo = data.row.seqNo; this.scheduleData.orderNo = data.row.orderNo; this.scheduleData.itemNo = data.row.itemNo; @@ -4577,7 +4591,7 @@ export default { }); let dto = { - site: this.$store.state.user.site, + site: this.scheduleData.site, orderNo: this.scheduleData.orderNo } // 获取首道工序 @@ -4642,7 +4656,7 @@ export default { this.$nextTick(() => { // 构造与 produce_order.vue 中 currentRow 相同格式的数据 const scheduleRow = { - site: this.scheduleData.site || this.$store.state.user.site, + site: this.scheduleData.site, orderNo: this.scheduleData.orderNo, itemNo: this.scheduleData.itemNo, seqNo: this.scheduleData.seqNo @@ -5426,7 +5440,7 @@ export default { page: this.sopPageIndex, limit: this.sopPageSize, partNo: this.scheduleData.partNo, - site: this.$store.state.user.site, + site: this.scheduleData.site, orderNo: this.scheduleData.orderNo }).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/yieldReport/com_split_order_report.vue b/src/views/modules/yieldReport/com_split_order_report.vue index a919b81..eebfba5 100644 --- a/src/views/modules/yieldReport/com_split_order_report.vue +++ b/src/views/modules/yieldReport/com_split_order_report.vue @@ -2789,7 +2789,7 @@ export default { } ], searchData: { - site: this.$store.state.user.site, + site: '', username: this.$store.state.user.name, seqNo: '', orderNo: '', @@ -2813,7 +2813,7 @@ export default { functionName: '' }, scheduleData: { - site: this.$store.state.user.site, + site: '', username: this.$store.state.user.name, seqNo: '', orderNo: '', @@ -2841,13 +2841,13 @@ export default { checkMultipleRoll: '' }, currentRollOps: { - site: this.$store.state.user.site, + site: '', seqNo: '', rollNo: '', finishedFlag: '', }, operatorData: { - site: this.$store.state.user.site, + site: '', username: this.$store.state.user.name, operatorId: '', operatorName: '', @@ -3649,6 +3649,17 @@ export default { this.scheduleData.seqNo = seqNo; this.currentRollOps.seqNo = seqNo; this.operatorData = operatorData; + + // Update site for searchData and currentRollOps when operatorData is provided + if (operatorData && operatorData.site) { + this.scheduleData.site = operatorData.site; + this.searchData.site = operatorData.site; + this.currentRollOps.site = operatorData.site; + } else if (!this.scheduleData.site) { + this.scheduleData.site = this.$store.state.user.site; + this.searchData.site = this.$store.state.user.site; + this.currentRollOps.site = this.$store.state.user.site; + } //判断是否启用多语言 // this.getMultiLanguageList(); //刷新多语言的信息 //清空当前的页面列表参数 @@ -3667,6 +3678,9 @@ export default { //刷新页面的数据 async refreshPageData() { await getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => { + this.scheduleData.site = data.row.site; + this.searchData.site = data.row.site; + this.currentRollOps.site = data.row.site; this.scheduleData.seqNo = data.row.seqNo; this.scheduleData.orderNo = data.row.orderNo; this.scheduleData.itemNo = data.row.itemNo; @@ -3828,7 +3842,7 @@ export default { this.$nextTick(() => { // 构造与 produce_order.vue 中 currentRow 相同格式的数据 const scheduleRow = { - site: this.scheduleData.site || this.$store.state.user.site, + site: this.scheduleData.site, orderNo: this.scheduleData.orderNo, itemNo: this.scheduleData.itemNo, seqNo: this.scheduleData.seqNo diff --git a/src/views/modules/yieldReport/com_switch_operator.vue b/src/views/modules/yieldReport/com_switch_operator.vue index 742dcaa..064e283 100644 --- a/src/views/modules/yieldReport/com_switch_operator.vue +++ b/src/views/modules/yieldReport/com_switch_operator.vue @@ -325,6 +325,7 @@ export default { this.operatorData.operatorName = this.$store.state.user.userDisplay; this.operatorData.operatorId = this.$store.state.user.name; this.operatorData.reportType = val; + this.operatorData.site = this.currentSchedule.site // 清空新增操作员输入框 this.newOperator = { @@ -353,7 +354,7 @@ export default { return; } const params = { - site: this.$store.state.user.site, + site: this.currentSchedule.site, orderNo: this.currentSchedule.orderNo, itemNo: this.currentSchedule.itemNo, seqNo: this.currentSchedule.seqNo, @@ -398,7 +399,7 @@ export default { // 添加操作员上岗 const params = { - site: this.$store.state.user.site, + site: this.currentSchedule.site, orderNo: this.currentSchedule.orderNo, itemNo: this.currentSchedule.itemNo, seqNo: this.currentSchedule.seqNo, @@ -454,7 +455,7 @@ export default { const params = { id: row.id, - site: this.$store.state.user.site, + site: this.currentSchedule.site, orderNo: this.currentSchedule.orderNo, itemNo: this.currentSchedule.itemNo, seqNo: this.currentSchedule.seqNo, @@ -518,7 +519,7 @@ export default { }).then(() => { const params = { id: row.id, - site: this.$store.state.user.site, + site: this.currentSchedule.site, orderNo: this.currentSchedule.orderNo, itemNo: this.currentSchedule.itemNo, seqNo: this.currentSchedule.seqNo, @@ -616,7 +617,7 @@ export default { // 调用后端批量处理 const params = { - site: this.$store.state.user.site, + site: this.currentSchedule.site, orderNo: this.currentSchedule.orderNo, itemNo: this.currentSchedule.itemNo, seqNo: this.currentSchedule.seqNo,