|
@ -105,7 +105,7 @@ import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequest |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' |
|
|
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' }) |
|
|
defineOptions({ name: 'SupplierdeliverRequestMain' }) |
|
@ -123,6 +123,7 @@ const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const planArriveTimeStr = ref() |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -144,6 +145,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
if(formField == 'ppNumber'){ |
|
|
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 = [] |
|
|
tableData.value = [] |
|
|
} |
|
|
} |
|
@ -261,10 +267,10 @@ const butttondata = (row) => { |
|
|
link: true // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}, |
|
|
}, |
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // 标签打印 |
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // 标签打印 |
|
|
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 |
|
|
//defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 |
|
|
// 生成记录 |
|
|
// 生成记录 |
|
|
{ |
|
|
{ |
|
|
label: '处理', |
|
|
label: '发货', |
|
|
name: 'genRecords', |
|
|
name: 'genRecords', |
|
|
hide: isShowMainButton(row, ['3']), |
|
|
hide: isShowMainButton(row, ['3']), |
|
|
type: 'primary', |
|
|
type: 'primary', |
|
@ -462,14 +468,26 @@ const handleTur = async (id: number) => { |
|
|
/** 处理按钮操作 */ |
|
|
/** 处理按钮操作 */ |
|
|
const genRecords = async (id: number) => { |
|
|
const genRecords = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 处理的二次确认 |
|
|
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(res => { |
|
|
await message.confirm('是否处理所选中数据?') |
|
|
if(!res){ |
|
|
tableObject.loading = true |
|
|
message.warning("请先上传自检报告!") |
|
|
// 发起处理 |
|
|
return |
|
|
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) |
|
|
}else{ |
|
|
message.success(t('处理成功!')) |
|
|
// 处理的二次确认 |
|
|
// 刷新列表 |
|
|
message.confirm('是否处理所选中数据?') |
|
|
await getList() |
|
|
tableObject.loading = true |
|
|
|
|
|
// 发起处理 |
|
|
|
|
|
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { |
|
|
|
|
|
message.success(t('处理成功!')) |
|
|
|
|
|
// 单据打印 |
|
|
|
|
|
handleDocumentPrint(res) |
|
|
|
|
|
}) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
getList() |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log("自检报告校验异常",err) |
|
|
|
|
|
}) |
|
|
} catch {}finally{ |
|
|
} catch {}finally{ |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
@ -588,6 +606,23 @@ const submitForm = async (formType, data) => { |
|
|
} |
|
|
} |
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
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){ |
|
|
if(tableData.value.length <= 0){ |
|
|
message.warning(`子表明细不能为空!`) |
|
|
message.warning(`子表明细不能为空!`) |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|