From daac3d26077d8b95ae6c0335d856ecbddc881d55 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 27 Feb 2024 16:03:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 9e4a2140c..37a7cc94c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -105,7 +105,7 @@ import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequest import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' -import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' +import { formatDate } from '@/utils/formatTime' // 供应商发货申请 defineOptions({ name: 'SupplierdeliverRequestMain' }) @@ -123,6 +123,7 @@ const updataTableColumns = (val) => { tableColumns.value = val } +const planArriveTimeStr = ref() // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { @@ -144,6 +145,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => const setV = {} setV[formField] = val[0][searchField] if(formField == 'ppNumber'){ + // 设置计划到货时间 + let beginTime = val[0]['endTime'] + let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD') + planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00" + setV['planArriveTime']= new Date(planArriveTimeStr.value) // 清空子表数据 tableData.value = [] } @@ -600,6 +606,23 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + let planArriveStr = formatDate(data.planArriveTime); + if(planArriveStr > planArriveTimeStr.value){ + let confirmFlag = false; + await message.confirm("计划到货时间大于要货计划送达日期是否继续?").then(() => { + console.log("选择了OK") + //选择OK + }).catch(() => { + //选择取消 + console.log("选择了cancel") + confirmFlag = true; + formRef.value.formLoading = false + return; + }) + if(confirmFlag){ + return; + } + } if(tableData.value.length <= 0){ message.warning(`子表明细不能为空!`) formRef.value.formLoading = false