抓取生产工单,抓取发料异常

This commit is contained in:
hjq
2026-06-12 15:29:34 +08:00
parent 0fa2fc0f90
commit 422d814d02
4 changed files with 189 additions and 0 deletions

View File

@@ -242,6 +242,15 @@
round>
<span v-text="syncingWorkOrders ? '请求已发送...' : '读取生产工单明细'"></span>
</el-button>
<el-button
type="info"
:icon="isSystemBusy ? 'el-icon-loading' : 'el-icon-refresh'"
:disabled="isSystemBusy"
@click="syncIssueReceipts"
round>
<span v-text="syncingIssueReceipts ? '请求已发送...' : '读取发料单明细'"></span>
</el-button>
</div>
</div>
@@ -255,6 +264,7 @@
syncing: false,
syncingBom: false,
syncingWorkOrders: false,
syncingIssueReceipts: false,
isSystemBusy: false,
globalTaskName: "",
statusTimer: null
@@ -364,6 +374,31 @@
.finally(() => {
this.syncingWorkOrders = false;
});
},
syncIssueReceipts() {
this.syncingIssueReceipts = true;
if (window.globalLogApp) {
window.globalLogApp.logDialogVisible = true;
}
axios.post('/api/sync_issue_receipts')
.then(res => {
if (res.data.success) {
this.$message.success('已触发!' + res.data.message);
setTimeout(this.checkTaskStatus, 500);
} else {
this.$message.error('触发失败:' + res.data.message);
}
})
.catch(err => {
if (err.response && err.response.status === 409) {
this.$message.warning(err.response.data.message);
} else {
this.$message.error('请求发生异常,请检查后端日志。');
}
})
.finally(() => {
this.syncingIssueReceipts = false;
});
}
}
});