diff --git a/src/api/yieldReport/produce_report_normal.js b/src/api/yieldReport/produce_report_normal.js
index 30f09f1..b626387 100644
--- a/src/api/yieldReport/produce_report_normal.js
+++ b/src/api/yieldReport/produce_report_normal.js
@@ -3,6 +3,9 @@ import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单信息
export const getScheduleDataBySeqNo = data => createAPI('schedule/getScheduleDataBySeqNo', 'POST', data)
+// 暂停生产/继续生产(调用存储过程 UspUpdateProductionStatus)
+export const updateProductionStatus = data => createAPI('schedule/updateProductionStatus', 'POST', data)
+
// 获取当前上机卷信息
export const getCurrentRollOpsBySeqNo = data => createAPI('schedule/getCurrentRollOpsBySeqNo', 'POST', data)
diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue
index cfb762c..fd12092 100644
--- a/src/views/modules/yieldReport/com_produce_report_normal.vue
+++ b/src/views/modules/yieldReport/com_produce_report_normal.vue
@@ -257,6 +257,16 @@
+
+
+
+
+ {{ scheduleData.parkFlag === 'N' ? '暂停生产' : '继续生产' }}
+
@@ -860,7 +870,8 @@ import {
getOrderFirstItemNo,
checkProcessInspectionPendingCount,
getOrderNotesByOrderNo, // 新增
- openMaterialRoll // 打开材料卷
+ openMaterialRoll, // 打开材料卷
+ updateProductionStatus // 暂停生产/继续生产(调用 UspUpdateProductionStatus)
} from "@/api/yieldReport/produce_report_normal.js";
import {
getUserSpecialSecurity,
@@ -3270,6 +3281,7 @@ export default {
rollCount: '',
carrierNo: '',
batchNo: '', // 合约号码
+ parkFlag: '', // 暂停生产标识 N-暂停 Y-继续
},
currentRollOps: {
site: this.$store.state.user.site,
@@ -3304,6 +3316,7 @@ export default {
processInspectionFlag: true
},
dataListLoading: false,
+ productionStatusLoading: false, // 暂停生产/继续生产按钮 loading
buttons: {
newRollButton: '创建新卷',
switchRoll: '切换卷',
@@ -4054,6 +4067,44 @@ export default {
this.$refs.notOverFinishRoll.init(this.scheduleData, this.operatorData)
});
},
+ // 暂停生产/继续生产(调用存储过程 UspUpdateProductionStatus)
+ handleProductionStatusClick() {
+ if (this.productionStatusLoading) return
+ const isPause = this.scheduleData.parkFlag === 'N'
+ const actionText = isPause ? '暂停生产' : '继续生产'
+ this.$confirm(`确定要${actionText}吗?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ const now = new Date()
+ const pad = n => (n < 10 ? '0' + n : n)
+ 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,
+ orderNo: this.scheduleData.orderNo,
+ seqNo: this.scheduleData.seqNo,
+ itemNo: this.scheduleData.itemNo,
+ rollNo: this.scheduleData.rollNo || '*',
+ currentTime,
+ operatorId: this.scheduleData.operatorId || this.$store.state.user.name,
+ parkFlag: isPause ? 'Y' : 'N'
+ }).then(({ data }) => {
+ this.productionStatusLoading = false
+ if (data && (data.code === 0 || data.code === 200)) {
+ this.$message.success(data.msg || '操作成功')
+ this.getScheduleDataBySeqNo()
+ } else {
+ this.$message.error((data && data.msg) || '操作失败')
+ }
+ }).catch((err) => {
+ this.productionStatusLoading = false
+ const msg = (err && err.msg) || (err && err.response && err.response.data && err.response.data.msg) || '操作失败'
+ this.$message.error(msg)
+ })
+ }).catch(() => {})
+ },
// 获取派工单的信息
getScheduleDataBySeqNo() {
getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => {
@@ -4085,7 +4136,7 @@ export default {
this.scheduleData.rowCount = data.row.rowCount;
this.scheduleData.rollCount = data.row.rollCount;
this.scheduleData.carrierNo = data.row.carrierNo;
-
+ this.scheduleData.parkFlag = data.row.parkFlag;
});
},
// 获取当前卷的信息
@@ -4294,6 +4345,7 @@ export default {
this.scheduleData.rollCount = data.row.rollCount;
this.scheduleData.carrierNo = data.row.carrierNo;
this.scheduleData.batchNo = data.row.batchNo;
+ this.scheduleData.parkFlag = data.row.parkFlag;
//设置弹窗的标题
this.titleCon = '机台工作台' + ' - ' + data.row.itemDesc + ' '
+ data.row.resourceDesc + ' (' + this.operatorData.operatorName + ')';
@@ -5679,6 +5731,74 @@ export default {
border-color: #d0d4d9;
}
+/* 生产状态圆框样式 */
+.production-status-circle {
+ width: 120px;
+ height: 120px;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 20px auto;
+ border: 4px solid;
+ transition: all 0.3s ease;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+}
+
+.production-status-circle .status-text {
+ font-size: 16px;
+ font-weight: bold;
+ text-align: center;
+}
+
+/* 圆框可点击:手型与悬停 */
+.production-status-circle {
+ cursor: pointer;
+ user-select: none;
+}
+
+.production-status-circle:hover:not(.is-loading) {
+ transform: scale(1.05);
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
+}
+
+.production-status-circle.is-loading {
+ cursor: not-allowed;
+ opacity: 0.85;
+}
+
+.production-status-circle .status-loading {
+ font-size: 28px;
+}
+
+.production-status-circle.status-pause .status-loading {
+ color: #f56c6c;
+}
+
+.production-status-circle.status-continue .status-loading {
+ color: #67c23a;
+}
+
+/* 暂停生产状态 - 红色圆框 */
+.production-status-circle.status-pause {
+ border-color: #f56c6c;
+ background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
+}
+
+.production-status-circle.status-pause .status-text {
+ color: #f56c6c;
+}
+
+/* 继续生产状态 - 绿色圆框 */
+.production-status-circle.status-continue {
+ border-color: #67c23a;
+ background: linear-gradient(135deg, #f0f9eb 0%, #e1f3d8 100%);
+}
+
+.production-status-circle.status-continue .status-text {
+ color: #67c23a;
+}
+
/* 模块标题 - 改为卡片标题样式 */
.section-title {
display: flex;