Browse Source

供应商发货增加校验

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
daac3d2607
  1. 25
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

25
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

Loading…
Cancel
Save