diff --git a/src/components/Form/src/components/ApiTransfer.vue b/src/components/Form/src/components/ApiTransfer.vue index b1921066..6806f4c7 100644 --- a/src/components/Form/src/components/ApiTransfer.vue +++ b/src/components/Form/src/components/ApiTransfer.vue @@ -83,8 +83,6 @@ function handleChange(keys: string[], direction: TransferDirection, moveKeys: string[]) { _targetKeys.value = keys - console.log(direction) - console.log(moveKeys) emit('change', keys) } diff --git a/src/components/Form/src/hooks/useForm.ts b/src/components/Form/src/hooks/useForm.ts index 49d55b87..4bd23aeb 100644 --- a/src/components/Form/src/hooks/useForm.ts +++ b/src/components/Form/src/hooks/useForm.ts @@ -114,7 +114,6 @@ export function useForm(props?: Props): UseFormReturnType { validate: async (nameList?: NamePath[]): Promise => { const form = await getForm() - console.log(form.validate(nameList)) return form.validate(nameList) }, diff --git a/src/views/approve/fee/index copy.vue b/src/views/approve/fee/index copy.vue deleted file mode 100644 index 73d9abe8..00000000 --- a/src/views/approve/fee/index copy.vue +++ /dev/null @@ -1,506 +0,0 @@ - - - - - diff --git a/src/views/approve/fee/index.vue b/src/views/approve/fee/index.vue index 907d47e9..2621b790 100644 --- a/src/views/approve/fee/index.vue +++ b/src/views/approve/fee/index.vue @@ -7,6 +7,7 @@
{ const data = props.data + console.log(data) data.forEach(item => { item['flag'] = false }) diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 046be4e0..35663d1b 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -146,8 +146,8 @@ - - +
@@ -185,7 +185,8 @@ SetTaskStatus, AutomaticBooking, SubmitAudit, - Withdraw + Withdraw, + IsLastMarker } from '../api/BookingLedger' import { GetFormSetInfoByModule } from '/@/api/common' const appStore = useAppStore() @@ -536,7 +537,8 @@ if (!task) { createMessage.success('保存成功!') } else { - completeTask(null, null) + // 订舱审核过来不需要调用完成任务接口 + if (task != 'dc') completeTask(null, null) } } else { createMessage.success('新增成功!') @@ -865,6 +867,11 @@ init() }) } + // 选择舱位完成后,审核订单,创建订舱任务 + const approveAndCreateTast = (type) => { + createTask(type) + seaExportTaskAudit(null) + } // 创建任务 const createTask = async (type) => { const postData = { @@ -878,9 +885,6 @@ await CreateTask(postData).then(res => { loading.value = false createMessage.success(res.message) - // 关闭当前页面 - const { fullPath } = route //获取当前路径 - tabStore.closeTabByKey(fullPath, router) }).catch(() => { loading.value = false }) @@ -1004,21 +1008,46 @@ } // 选择舱位 const sspace = ref() - const cvisible = ref(false) + // const cvisible = ref(false) const cvalue = ref(1) - const handleOk = () => { - if (cvalue.value == 1) { - // 选择现舱 - sspace.value.init() - } else { - // 非现舱 - AutomaticBooking(id.value) - } - cvisible.value = false - } + // const handleOk = () => { + // if (cvalue.value == 1) { + // // 选择现舱 + // sspace.value.init() + // } else { + // // 非现舱 + // AutomaticBooking(id.value) + // } + // // cvisible.value = false + // } // 订舱审核 const approveDc = async (remark) => { - await save() + await save('dc') + if (!remark) { + IsLastMarker({ + bsType: 1, + bsId: id.value, + taskType: route.query.status + }).then(res => { + if (res.data) { + // 是最后一个审批人,若果此票是现舱,弹窗选择现舱弹窗 + if (bookingDetails.value.shippingSpaceType == 'xc') { + // 选择现舱 + sspace.value.init() + } else { + // 非现舱直接审核通过 + seaExportTaskAudit(remark) + AutomaticBooking(id.value) + } + } else { + // 不是最后一个审批人,直接审核 + seaExportTaskAudit(remark) + } + }) + } + } + // 审单接口 + const seaExportTaskAudit = (remark) => { const postData = { result: remark ? 2 : 1, ids: [id.value], @@ -1030,22 +1059,9 @@ SeaExportTaskAudit(postData).then(res => { loading.value = false createMessage.success(res.message) - // 最后一个审批完,弹出选择是否现舱 - if (res.data.isCompleted && res.data.flowStatus == 3) { - // 通过此单现舱控制选择舱位 - if (bookingDetails.value.shippingSpaceType == 'xc') { - // 选择现舱 - sspace.value.init() - } else { - AutomaticBooking(id.value) - const { fullPath } = route //获取当前路径 - tabStore.closeTabByKey(fullPath, router) - } - } else { - // 关闭当前页面 - const { fullPath } = route //获取当前路径 - tabStore.closeTabByKey(fullPath, router) - } + // 关闭当前页面 + const { fullPath } = route //获取当前路径 + tabStore.closeTabByKey(fullPath, router) }).catch(() => { loading.value = false }) diff --git a/src/views/operation/seaexport/detail/modules/goodsTable.vue b/src/views/operation/seaexport/detail/modules/goodsTable.vue index 420c8955..0e19e519 100644 --- a/src/views/operation/seaexport/detail/modules/goodsTable.vue +++ b/src/views/operation/seaexport/detail/modules/goodsTable.vue @@ -1684,6 +1684,8 @@ if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { let dict: any = {} // 选择箱型联动逻辑 + console.log(changes) + console.log(source) if (changes[0][1] === 'ctn') { const res = ctnDict.value.length ? ctnDict.value : (await GetCtnSelectList())?.data if (!ctnDict.value.length) ctnDict.value = res @@ -1691,14 +1693,16 @@ return item.ctnName === changes[0][3] }) if (item) dict = item[0] - list.value[changes[0][0]]['ctn'] = dict?.ctnName - list.value[changes[0][0]]['ctnCode'] = dict?.ediCode - list.value[changes[0][0]]['size'] = dict?.ctnSize - if (list.value[changes[0][0]]['ctnNum']) { - list.value[changes[0][0]]['teu'] = - parseInt(dict.teu || 0) * parseInt(list.value[changes[0][0]]['ctnNum']) - } - list.value[changes[0][0]]['tareWeight'] = dict?.ctnWeight + changes.forEach(item => { + list.value[item[0]]['ctn'] = dict?.ctnName + list.value[item[0]]['ctnCode'] = dict?.ediCode + list.value[item[0]]['size'] = dict?.ctnSize + list.value[item[0]]['tareWeight'] = dict?.ctnWeight + if (list.value[changes[0][0]]['ctnNum']) { + list.value[item[0]]['teu'] = + parseInt(dict.teu || 0) * parseInt(list.value[item[0]]['ctnNum']) + } + }) } if (changes[0][1] === 'kindPkgsName') { const res = mainPkgs.value @@ -1706,8 +1710,10 @@ return item.packageName === changes[0][3] }) if (item) dict = item[0] - list.value[changes[0][0]]['kindPkgs'] = dict?.id - list.value[changes[0][0]]['kindPkgsName'] = dict?.packageName + changes.forEach(item => { + list.value[item[0]]['kindPkgs'] = dict?.id + list.value[item[0]]['kindPkgsName'] = dict?.packageName + }) } if (changes[0][1] === 'weightTypeName') { const res = await getDictOption('weight_type') diff --git a/src/views/operation/seaexport/detail/modules/rightContent.vue b/src/views/operation/seaexport/detail/modules/rightContent.vue index 9b0e771f..ef7243e2 100644 --- a/src/views/operation/seaexport/detail/modules/rightContent.vue +++ b/src/views/operation/seaexport/detail/modules/rightContent.vue @@ -452,7 +452,6 @@