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 | 126 +++++++++++++++++++++++++++++-------------
1 files changed, 87 insertions(+), 39 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 6b0517b..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
@@ -90,7 +90,7 @@
//鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
function getNowTime() {
- const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
+ const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
.toISOString()
.replace('T', ' ')
.slice(0, 10) //榛樿寮�濮嬫椂闂�3澶╁墠
@@ -127,9 +127,10 @@
titleSelectJson.value.processType = res.data.process
gridOptions.loading = false
- //绂佺敤鍒犻櫎銆佷繚瀛樻寜閽�
+ //绂佺敤鍒犻櫎銆佸鏍告寜閽�
gridOptions.toolbarConfig.buttons[0].disabled = true
gridOptions.toolbarConfig.buttons[1].disabled = true
+ gridOptions.toolbarConfig.buttons[2].disabled = true
} else {
ElMessage.warning(res.msg)
}
@@ -154,21 +155,23 @@
total.dataTotal = res.data.total.total * 1
total.pageTotal = res.data.total.pageTotal
pageTotal.value = res.data.total
- xGrid.value.loadData(res.data.data)
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[3].disabled = true
}
} else {
@@ -240,8 +243,8 @@
keepSource: true,//淇濇寔婧愭暟鎹�
align: 'center',//鏂囧瓧灞呬腑
stripe: true,//鏂戦┈绾�
- rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
- id: 'CustomerList',
+ rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'productionScheduling',
showFooter: true,//鏄剧ず鑴�
printConfig: {},
importConfig: {},
@@ -259,7 +262,7 @@
storage: true
},
editConfig: {
- trigger: 'click',
+ trigger: 'dblclick',
mode: 'row',
showStatus: true
},
@@ -309,9 +312,18 @@
editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
title: t('processCard.planEndTime')
},
+ {
+ field: 'schedulingQuantity',
+ width: 120,
+ editRender: {name: 'input', attrs: {placeholder: ''}},
+ title: t('processCard.productionSchedulingQuantity'),
+ sortable: true
+ },
+ {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
+
// {field: '鎺掍骇缂栧彿', title: '鎺掍骇缂栧彿', width: 120 },
{
- field: 'orderGlassDetail.orderId',
+ field: 'order.orderId',
title: t('order.orderId'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
@@ -357,13 +369,7 @@
},
{field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 90},
{field: 'orderGlassDetail.area', title: t('processCard.orderArea'), width: 90},
- {
- field: 'schedulingQuantity',
- width: 120,
- editRender: {name: 'input', attrs: {placeholder: ''}},
- title: t('processCard.productionSchedulingQuantity'),
- sortable: true
- },
+
{field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 100},
{field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 100},
{field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 100},
@@ -372,7 +378,6 @@
{field: 'reviewer', title: t('processCard.reviewed'), width: 80},
{field: 'orderDetail.productName', title: t('order.product'), width: 140},
{field: 'orderDetail.shape', title: t('order.shape'), width: 80},
- {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
{field: 'schedulingId', title: t('processCard.schedulingId'), width: 120},
],//琛ㄥご鎸夐挳
@@ -380,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,
@@ -420,7 +426,7 @@
if ($table) {
const selectRecords = $table.getCheckboxRecords()
if (selectRecords.length == 0) {
- ElMessage.warning(t('processCard.checkProductionScheduling'))
+ ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
return;
}
for (let i = 0; i < selectRecords.length; i++) {
@@ -429,13 +435,13 @@
let number = selectRecords[i].schedulingQuantity
//璁″垝寮�濮嬨�佺粨鏉熸椂闂达紝鎺掍骇鏁伴噺涓嶈兘涓虹┖
if (start == null || end == null || number == null) {
- ElMessage.warning(t('processCard.saveCorrespondingValues'))
+ ElMessage.warning("璇峰~鍏ュ搴旂殑鍊煎啀杩涜淇濆瓨")
return;
}
}
let selectProcesses = processVal.value
if (selectProcesses == null || selectProcesses == "") {
- ElMessage.warning(t('processCard.selectProductionSchedulingProcess'))
+ ElMessage.warning("璇烽�夋嫨鎺掍骇宸ュ簭")
return;
}
@@ -449,7 +455,7 @@
//淇濆瓨鎺掍骇鏁版嵁
request.post("/productionScheduling/addScheduling", schedulingData.value).then((res) => {
if (res.code == 200) {
- ElMessage.success(t('basicData.msg.saveSuccess'))
+ ElMessage.success("淇濆瓨鎴愬姛")
// 鍚敤淇濆瓨
gridOptions.toolbarConfig.buttons[2].disabled = false
router.push({
@@ -474,10 +480,11 @@
const selectRecords = $table.getCheckboxRecords()
if ($table) {
if (selectRecords.length == 0) {
- ElMessage.warning(t('processCard.checkProductionScheduling'))
+ ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
return;
}
- const type = await VXETable.modal.confirm(t('processCard.deleteThisData'))
+
+ const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
if (type === 'confirm') {
let schedulingData = ref({
scheduling: selectRecords,
@@ -485,7 +492,7 @@
request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
if (res.code == 200) {
- ElMessage.success(t('basicData.msg.deleteSuccess'))
+ ElMessage.success("鍒犻櫎鎴愬姛")
location.reload();
} else {
ElMessage.warning(res.msg)
@@ -499,9 +506,13 @@
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(t('processCard.checkProductionScheduling'))
+ ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
return;
}
let schedulingData = ref({
@@ -510,7 +521,35 @@
})
request.post("/productionScheduling/examineScheduling", schedulingData.value).then((res) => {
if (res.code == 200) {
- ElMessage.success(t('basicData.msg.ReviewSuccess'))
+ 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)
@@ -583,17 +622,26 @@
const table = $grid.getTableData().fullData
const selectRecords = $grid.getCheckboxRecords()
let selectState = stateValue.value
- table.forEach((selectRecords) => {
- if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState == 1) {
- ElMessage.warning(t('processCard.schedulingQuantityNoQuantityScheduled'))
+ selectRecords.forEach((selectRecords) => {
+ if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) {
+ ElMessage.warning("鎺掍骇鏁伴噺涓嶈兘澶т簬寰呮帓浜ф暟閲�")
//绂佺敤淇濆瓨鎸夐挳
//gridOptions.toolbarConfig.buttons[2].disabled = true
}
-
-
})
}
+const checkBoxConfig = {
+ checkMethod: ({ row }) => {
+ if (row['reviewStatus']==="宸插鏍�"){
+ return row.disable
+ }else{
+ return !row.disable
+ }
+ },
+ reserve:true
+
+}
</script>
@@ -604,9 +652,9 @@
<el-date-picker
v-model="form.date1"
:default-time="defaultTime"
- :start-placeholder="$t('basicData.startDate')"
- :end-placeholder="$t('basicData.endDate')"
+ end-placeholder="缁撴潫鏃堕棿"
format="YYYY/MM/DD"
+ start-placeholder="寮�濮嬫椂闂�"
type="daterange"
value-format="YYYY-MM-DD"
@@ -623,7 +671,7 @@
/>
</el-select>
- <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.whetherToScheduleProduction')" style="width: 120px">
+ <el-select v-model="stateValue" class="m-2" placeholder="鏄惁鎺掍骇" style="width: 120px">
<el-option
v-for="item in stateOptions"
:key="item.value"
@@ -643,14 +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"
+
+
>
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
+ <!-- :checkbox-config="checkBoxConfig" @checkbox-change="determineNum"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
<template #content="{ row }">
<ul class="expand-wrapper">
--
Gitblit v1.8.0