From 352ea6a79d6d1e470d53b4a4f3800d183d0f40d4 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期二, 16 七月 2024 10:18:39 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue | 88 +++++++++++++++++++++++++++++---------------
1 files changed, 58 insertions(+), 30 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
index 0ccfd99..f1fca12 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -130,6 +130,7 @@
//绂佺敤鍒犻櫎銆佸鏍告寜閽�
gridOptions.toolbarConfig.buttons[0].disabled = true
gridOptions.toolbarConfig.buttons[1].disabled = true
+ gridOptions.toolbarConfig.buttons[2].disabled = true
} else {
ElMessage.warning(res.msg)
}
@@ -160,14 +161,16 @@
//绂佺敤鍒犻櫎銆佸鏍告寜閽�
gridOptions.toolbarConfig.buttons[0].disabled = true
gridOptions.toolbarConfig.buttons[1].disabled = true
+ gridOptions.toolbarConfig.buttons[2].disabled = true
//鍚敤淇濆瓨
- gridOptions.toolbarConfig.buttons[2].disabled = false
+ gridOptions.toolbarConfig.buttons[3].disabled = false
}else{
//鍚敤鍒犻櫎銆佸鏍告寜閽�
gridOptions.toolbarConfig.buttons[0].disabled = false
gridOptions.toolbarConfig.buttons[1].disabled = false
+ gridOptions.toolbarConfig.buttons[2].disabled = false
//绂佺敤淇濆瓨
- gridOptions.toolbarConfig.buttons[2].disabled = true
+ gridOptions.toolbarConfig.buttons[3].disabled = true
}
} else {
@@ -381,6 +384,7 @@
buttons: [
{code: 'delete', name: t('basicData.delete'), status: 'primary'},
{code: 'review', name: t('basicData.review'), status: 'primary'},
+ {code: 'cancelReview', name: t('basicData.cancelReview'), status: 'primary'},
{code: 'save', name: t('processCard.scheduling'), status: 'primary', icon: 'vxe-icon-save'},
],
import: false,
@@ -478,35 +482,33 @@
ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
return;
}
- selectRecords.forEach(item => {
- if(item.reviewStatus=="宸插鏍�"){
- ElMessage.warning("涓嶈兘鍒犻櫎宸插鏍告暟鎹�")
- return;
- }
- });
- alert(1111)
- // const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
- // if (type === 'confirm') {
- // let schedulingData = ref({
- // scheduling: selectRecords,
- // })
- //
- // request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
- // if (res.code == 200) {
- // ElMessage.success("鍒犻櫎鎴愬姛")
- // location.reload();
- // } else {
- // ElMessage.warning(res.msg)
- //
- // }
- // })
- // }
+
+ const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
+ if (type === 'confirm') {
+ let schedulingData = ref({
+ scheduling: selectRecords,
+ })
+
+ request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
+ if (res.code == 200) {
+ ElMessage.success("鍒犻櫎鎴愬姛")
+ location.reload();
+ } else {
+ ElMessage.warning(res.msg)
+
+ }
+ })
+ }
}
return;
}
case 'review': {
const $table = xGrid.value
const selectRecords = $table.getCheckboxRecords()
+ let date = form.date1
+ let selectProcesses = processVal.value
+ let selectState = stateValue.value
+ let inputVal = form.orderId
if ($table) {
if (selectRecords.length == 0) {
ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
@@ -519,6 +521,34 @@
request.post("/productionScheduling/examineScheduling", schedulingData.value).then((res) => {
if (res.code == 200) {
ElMessage.success("瀹℃牳鎴愬姛")
+ router.push({
+ path: '/main/processCard/ProductionScheduling',
+ query: {random: Math.random()}
+ })
+ } else {
+ ElMessage.warning(res.msg)
+
+ }
+ })
+
+ }
+ return;
+ }
+ case 'cancelReview': {
+ const $table = xGrid.value
+ const selectRecords = $table.getCheckboxRecords()
+ if ($table) {
+ if (selectRecords.length == 0) {
+ ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
+ return;
+ }
+ let schedulingData = ref({
+ scheduling: selectRecords,
+ userName: username//瀹℃牳浜�
+ })
+ request.post("/productionScheduling/cancelReviewScheduling", schedulingData.value).then((res) => {
+ if (res.code == 200) {
+ ElMessage.success("鍙嶅鎴愬姛")
location.reload();
} else {
ElMessage.warning(res.msg)
@@ -592,7 +622,6 @@
const selectRecords = $grid.getCheckboxRecords()
let selectState = stateValue.value
selectRecords.forEach((selectRecords) => {
- console.log(selectRecords)
if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) {
ElMessage.warning("鎺掍骇鏁伴噺涓嶈兘澶т簬寰呮帓浜ф暟閲�")
//绂佺敤淇濆瓨鎸夐挳
@@ -602,7 +631,6 @@
}
const checkBoxConfig = {
checkMethod: ({ row }) => {
- console.log(row)
if (row['reviewStatus']==="宸插鏍�"){
return row.disable
}else{
@@ -667,10 +695,10 @@
v-bind="gridOptions"
v-on="gridEvents"
@filter-change="filterChanged"
- @checkbox-change="determineNum"
- :checkbox-config="checkBoxConfig"
+
+
>
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
+ <!-- :checkbox-config="checkBoxConfig" @checkbox-change="determineNum"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
<template #content="{ row }">
<ul class="expand-wrapper">
--
Gitblit v1.8.0