diff --git a/src/api/quality/qcTable.js b/src/api/quality/qcTable.js
index 89bd89fc..da998cb0 100644
--- a/src/api/quality/qcTable.js
+++ b/src/api/quality/qcTable.js
@@ -92,4 +92,12 @@ export function getProjectOptionList(checkType) {
url: '/quality/staticTable/getProjectOptionList/' + checkType,
method: 'get'
});
+}
+
+export function getDLTableCPKInfo(query) {
+ return request({
+ url: '/quality/staticTable/getDLTableCPKInfo',
+ method: 'get',
+ params: query
+ });
}
\ No newline at end of file
diff --git a/src/utils/request.js b/src/utils/request.js
index 8f90d554..c46b9688 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -105,7 +105,9 @@ service.interceptors.response.use(res => {
} else if (code === 601) {
Message({ message: msg, type: 'warning' })
return Promise.reject('error')
- } else if (code !== 200) {
+ } else if (code === 642) {
+ return res.data
+ }else if (code !== 200) {
Notification.error({ title: msg })
return Promise.reject('error')
} else {
diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue
index 72d53850..ba3a3f0e 100644
--- a/src/views/plan/order/index.vue
+++ b/src/views/plan/order/index.vue
@@ -77,9 +77,10 @@
plain
icon="el-icon-download"
size="mini"
+ :disabled="isButtonDisabled"
@click="handleSyncSAP"
v-hasPermi="['mes:pro:order:add']"
- >SAP同步
+ >{{ countdownTime > 0 ? countdownTime + ' 秒后重试SAP同步' : 'SAP同步' }}
@@ -115,14 +116,14 @@
>导出
-
+
@@ -369,7 +370,7 @@
-
+
-
+
@@ -519,6 +520,18 @@
+
+
+
+
+
+
+
+
+
+
@@ -576,7 +589,7 @@
-
+
@@ -730,10 +743,14 @@ export default {
activeSplit: 0,
autoSplitform1:{
productDate:null,
- sortNo:null
+ sortNo:null,
+ shiftId:null
},
autoSplitform2: {lineCodes:[]},
- lineCodes:[]
+ lineCodes:[],
+ countdownTime: 0,// 倒计时时间
+ isButtonDisabled: false, // 按钮是否禁用
+ countdownInterval: null, // 倒计时定时器
}
},
created() {
@@ -1457,6 +1474,23 @@ export default {
},
// 首-SAP同步按钮操作
handleSyncSAP() {
+
+
+ if (this.countdownTime > 0) return; // 如果已经在倒计时,则不重复启动
+ this.isButtonDisabled = true; // 禁用按钮
+ this.countdownTime = 30; // 设置倒计时时间,例如10秒
+
+ // 使用setInterval进行倒计时
+ this.countdownInterval = setInterval(() => {
+ if (this.countdownTime > 0) {
+ this.countdownTime--;
+ } else {
+ clearInterval(this.countdownInterval); // 清除定时器
+ this.isButtonDisabled = false; // 倒计时结束,启用按钮
+ this.countdownTime = 0; // 重置倒计时时间
+ }
+ }, 1000); // 每秒更新一次
+
this.loading = true;
let planDateStart =null;
let planDateEnd =null;
@@ -1496,13 +1530,20 @@ export default {
},
//排产优先级
handleAutoSplit(row) {
- this.openAutoSplit = true;
this.autoSplitList = this.orderCodes;
-
- if(this.autoSplitList[0] == 'o2'){
- this.$modal.msgError("已经拆分结束!");
+ if(this.autoSplitList[0].status != 'o0'){
+ this.$modal.msgError("请选择完全未拆分的订单!");
+ return
}
+ // 获取班次信息
+ getProShifts().then(response => {
+ this.workShift = response.data;
+ this.autoSplitform1.shiftId = 5;
+ })
+
+ this.openAutoSplit = true;
+
this.autoSplitform1.productDate = this.autoSplitList[0].planProDate;
// 获取工艺信息(工艺选最新的)
getProRoutes(this.autoSplitList[0].prodCode).then(response => {
@@ -1518,7 +1559,12 @@ export default {
// 获取生产线体列表
getCanProductLine(this.autoSplitList[0]).then(response => {
this.lineCodes = response.lineList;
- this.autoSplitform2.lineCodes = response.recommendLineList;//['XL01','XL02'];
+ if(response.recommendLineList == null){
+ this.$modal.msgError("设备产能达不到订单水平,请调整设备产能或重新审视订单计划数量!");
+ this.cancel();
+ }else{
+ this.autoSplitform2.lineCodes = response.recommendLineList;//['XL01','XL02'];
+ }
})
@@ -1564,20 +1610,27 @@ export default {
if (this.activeSplit++ > 2) this.activeSplit = 0;
//选完线体后的下一步,会进行模拟拆分
if(this.activeSplit == 2){
- autoSplitOrder(Object.assign({},this.autoSplitList[0],this.autoSplitform1,this.autoSplitform2)).then(response => {
- this.workerLoading = true // 设置加载状态为true,表示正在加载
- // 获取历史拆分工单信息
- getWorkOrderListCG(this.autoSplitList[0].id).then(response => {
- var data = response.data
- this.splitData = data
-
- this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
- this.$nextTick(() => {
- // 使用$nextTick来等待DOM更新完成
- this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
- this.workerLoading = false // 设置加载状态为false,表示加载完成
+ const p = Object.assign({},this.autoSplitList[0],this.autoSplitform1,this.autoSplitform2);
+ debugger
+ autoSplitOrder(p).then(response => {
+ if(response.code == 642){
+ this.$modal.msgError(response.msg);
+ this.cancel();
+ }else{
+ this.workerLoading = true // 设置加载状态为true,表示正在加载
+ // 获取历史拆分工单信息
+ getWorkOrderListCG(this.autoSplitList[0].id).then(res => {
+ var data = res.data
+ this.splitData = data
+
+ this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
+ this.$nextTick(() => {
+ // 使用$nextTick来等待DOM更新完成
+ this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
+ this.workerLoading = false // 设置加载状态为false,表示加载完成
+ })
})
- })
+ }
});
}
},
@@ -1596,7 +1649,20 @@ export default {
this.openAutoSplit = false;
this.activeSplit = 0;
});
- }
+ },
+ handleClose() {
+ this.cancel();
+ },
+ shiftFormat(row,column){
+ let array = this.workShift;
+ let value = '其他';
+ array.forEach((item) => {
+ if (item.shiftId == row.shiftId) {
+ value = item.shiftDesc
+ }
+ })
+ return value;
+ },
}
}
diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue
index b9a86d4f..ad680147 100644
--- a/src/views/plan/workorder/index.vue
+++ b/src/views/plan/workorder/index.vue
@@ -1525,6 +1525,9 @@ export default {
if (this.queryParams.productDateArray != null) {
this.queryParams.productDateStart = moment(this.queryParams.productDateArray[0]).format('YYYY-MM-DD');
this.queryParams.productDateEnd = moment(this.queryParams.productDateArray[1]).format('YYYY-MM-DD');
+ }else{
+ this.queryParams.productDateStart = null;
+ this.queryParams.productDateEnd = null;
}
//第一层
listWorkorderLevel0(this.queryParams).then(response => {
diff --git a/src/views/quality/qcIncome/index.vue b/src/views/quality/qcIncome/index.vue
index 4f504105..0f63f913 100644
--- a/src/views/quality/qcIncome/index.vue
+++ b/src/views/quality/qcIncome/index.vue
@@ -206,15 +206,15 @@
@click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcIncome:edit']"
>检验
-
+ icon="el-icon-magic-stick"
+ @click="handleCheckProjectM(scope.row)"
+ v-hasPermi="['quality:qcIncome:editM']"
+ >审核编辑
+
@@ -722,6 +722,11 @@ export default {
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'material');
},
+ //检验项目弹窗(二次编辑)
+ handleCheckProjectM(row){
+ this.$refs.itemSelectProject.showFlag = true;
+ this.$refs.itemSelectProject.init(row,'material');
+ },
//查看检验项目弹窗
handleView(row){
this.$refs.itemSelectProject.showFlag = true;
diff --git a/src/views/quality/qcInventory/index.vue b/src/views/quality/qcInventory/index.vue
index 23ac2c45..9bf3a4ae 100644
--- a/src/views/quality/qcInventory/index.vue
+++ b/src/views/quality/qcInventory/index.vue
@@ -9,63 +9,8 @@
@keyup.enter.native="handleQuery"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
导出
+
+ 审核编辑
+
@@ -131,20 +87,18 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
- {{ parseTime(scope.row.incomeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+ {{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
-
+
{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
-
-
- 检验
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
@@ -283,11 +200,7 @@
-
-
-
-
-
+