From 43e115a7de2c763c36d79e610a3abb1d833ea892 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 05 八月 2024 10:21:52 +0800
Subject: [PATCH] 修改发货报表
---
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue | 94 ++++++++++++++++++++++++++++++----------------
1 files changed, 61 insertions(+), 33 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..24adc3c 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)
}
@@ -154,20 +155,23 @@
total.dataTotal = res.data.total.total * 1
total.pageTotal = res.data.total.pageTotal
pageTotal.value = res.data.total
+ console.log(res.data.data)
xGrid.value.loadData(res.data.data)
gridOptions.loading = false
if (selectState==1){
//绂佺敤鍒犻櫎銆佸鏍告寜閽�
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 {
@@ -319,7 +323,7 @@
// {field: '鎺掍骇缂栧彿', title: '鎺掍骇缂栧彿', width: 120 },
{
- field: 'orderGlassDetail.orderId',
+ field: 'order.orderId',
title: t('order.orderId'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
@@ -381,6 +385,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 +483,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 +522,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 +623,6 @@
const selectRecords = $grid.getCheckboxRecords()
let selectState = stateValue.value
selectRecords.forEach((selectRecords) => {
- console.log(selectRecords)
if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) {
ElMessage.warning("鎺掍骇鏁伴噺涓嶈兘澶т簬寰呮帓浜ф暟閲�")
//绂佺敤淇濆瓨鎸夐挳
@@ -602,7 +632,6 @@
}
const checkBoxConfig = {
checkMethod: ({ row }) => {
- console.log(row)
if (row['reviewStatus']==="宸插鏍�"){
return row.disable
}else{
@@ -662,15 +691,14 @@
<vxe-grid
ref="xGrid"
class="mytable-scrollbar"
- height="500px"
- max-height="100%"
+ height="95%"
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