|
|
|
@ -504,8 +504,8 @@ const userStore = useUserStore();
|
|
|
|
const routeParams = ref<Record<string, any>>({});
|
|
|
|
const routeParams = ref<Record<string, any>>({});
|
|
|
|
|
|
|
|
|
|
|
|
// 字典
|
|
|
|
// 字典
|
|
|
|
const { shipping_mode, shipping_status, shipping_bill_status, material_source_type, shipping_type, is_all_receiving } = toRefs<any>(
|
|
|
|
const { shipping_mode, shipping_bill_status, material_source_type, shipping_type, is_all_receiving } = toRefs<any>(
|
|
|
|
proxy?.useDict('shipping_mode', 'shipping_status', 'shipping_bill_status', 'material_source_type', 'shipping_type', 'is_all_receiving')
|
|
|
|
proxy?.useDict('shipping_mode', 'shipping_bill_status', 'material_source_type', 'shipping_type', 'is_all_receiving')
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
@ -715,7 +715,6 @@ const initFormData: WmsShippingBillForm = {
|
|
|
|
arrivalConfirmTime: undefined,
|
|
|
|
arrivalConfirmTime: undefined,
|
|
|
|
arrivalConfirmBy: undefined,
|
|
|
|
arrivalConfirmBy: undefined,
|
|
|
|
arrivalConfirmByName: undefined,
|
|
|
|
arrivalConfirmByName: undefined,
|
|
|
|
shippingStatus: '1', // 默认待发货
|
|
|
|
|
|
|
|
remark: undefined,
|
|
|
|
remark: undefined,
|
|
|
|
createBy: undefined,
|
|
|
|
createBy: undefined,
|
|
|
|
createTime: undefined,
|
|
|
|
createTime: undefined,
|
|
|
|
@ -961,10 +960,12 @@ const initShippingDetailsFromContract = (contractMaterialList: ContractOrderPurc
|
|
|
|
const initFromContractSource = async (contractId: string | number, projectId?: string | number) => {
|
|
|
|
const initFromContractSource = async (contractId: string | number, projectId?: string | number) => {
|
|
|
|
const [contractRes, projectRes] = await Promise.all([
|
|
|
|
const [contractRes, projectRes] = await Promise.all([
|
|
|
|
getContractInfo(contractId),
|
|
|
|
getContractInfo(contractId),
|
|
|
|
projectId ? getContractOrder(projectId).catch((error) => {
|
|
|
|
projectId
|
|
|
|
|
|
|
|
? getContractOrder(projectId).catch((error) => {
|
|
|
|
console.error('加载合同订单项目数据失败:', error);
|
|
|
|
console.error('加载合同订单项目数据失败:', error);
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}) : Promise.resolve(null)
|
|
|
|
})
|
|
|
|
|
|
|
|
: Promise.resolve(null)
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
const contract = contractRes.data;
|
|
|
|
const contract = contractRes.data;
|
|
|
|
applyContractInfoToForm(contract);
|
|
|
|
applyContractInfoToForm(contract);
|
|
|
|
@ -1216,6 +1217,8 @@ const submitForm = async (status: string, mode: boolean) => {
|
|
|
|
|
|
|
|
|
|
|
|
// 准备提交数据
|
|
|
|
// 准备提交数据
|
|
|
|
const submitData = { ...form.value };
|
|
|
|
const submitData = { ...form.value };
|
|
|
|
|
|
|
|
// shippingStatus 已弃用,前端不再继续回写旧状态字段。
|
|
|
|
|
|
|
|
delete submitData.shippingStatus;
|
|
|
|
|
|
|
|
|
|
|
|
if (status !== 'draft') {
|
|
|
|
if (status !== 'draft') {
|
|
|
|
// 提交流程:设置流程编码与变量,驱动审批流
|
|
|
|
// 提交流程:设置流程编码与变量,驱动审批流
|
|
|
|
@ -1364,14 +1367,11 @@ const submitCallback = async () => {
|
|
|
|
projectId: form.value.projectId,
|
|
|
|
projectId: form.value.projectId,
|
|
|
|
contractId: form.value.contractId,
|
|
|
|
contractId: form.value.contractId,
|
|
|
|
isAllReceiving: arrivalConfirmForm.value.isAllReceiving,
|
|
|
|
isAllReceiving: arrivalConfirmForm.value.isAllReceiving,
|
|
|
|
arrivalReceiptOssId: arrivalConfirmForm.value.arrivalReceiptOssId,
|
|
|
|
arrivalReceiptOssId: arrivalConfirmForm.value.arrivalReceiptOssId
|
|
|
|
// 到货确认存储时同步维护发货状态,避免审批提交后状态与到货标识不一致
|
|
|
|
|
|
|
|
shippingStatus: arrivalConfirmForm.value.isAllReceiving === '0' ? '3' : '2'
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
await updateWmsShippingBill(saveData);
|
|
|
|
await updateWmsShippingBill(saveData);
|
|
|
|
form.value.isAllReceiving = saveData.isAllReceiving;
|
|
|
|
form.value.isAllReceiving = saveData.isAllReceiving;
|
|
|
|
form.value.arrivalReceiptOssId = saveData.arrivalReceiptOssId;
|
|
|
|
form.value.arrivalReceiptOssId = saveData.arrivalReceiptOssId;
|
|
|
|
form.value.shippingStatus = saveData.shippingStatus;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await proxy?.$tab.closePage(route);
|
|
|
|
await proxy?.$tab.closePage(route);
|
|
|
|
router.go(-1);
|
|
|
|
router.go(-1);
|
|
|
|
|