|
|
@ -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 |
|
|
|