diff --git a/src/components/ActionBar/index.vue b/src/components/ActionBar/index.vue index a4702530..adc3c56a 100644 --- a/src/components/ActionBar/index.vue +++ b/src/components/ActionBar/index.vue @@ -261,6 +261,13 @@ type: String, default: null, }, + // 没有数据源的数据(需要传入打印的数据) + printData: { + type: Array, + default: () => { + return [] + } + }, // 新建 create: { type: Function, @@ -312,7 +319,7 @@ const saveFlag = ref(false) const copyFlag = ref(false) const openPrint = () => { - dsPrint.value.init() + dsPrint.value.init(props.printData) } // 复制 const copyHandle = async () => { diff --git a/src/components/CostEntry/actionBar.vue b/src/components/CostEntry/actionBar.vue index d10f3c5f..6dc4566e 100644 --- a/src/components/CostEntry/actionBar.vue +++ b/src/components/CostEntry/actionBar.vue @@ -178,6 +178,7 @@ import HColSet from '/@/components/HColSet/index.vue' import { ApplyDeletion, GetPrintInfo, ApplyBusinessAudit, Withdraw, WithdrawBusiness } from './api' import { useModal } from '/@/components/Modal' + import { clearCopyRow } from './components/hooks' // 打印组件 import DsPrint from '/@/components/Print/index.vue' const [registerModal, { openModal }] = useModal() @@ -243,16 +244,7 @@ if (needCopy.length == 0) return createMessage.warning('请勾选要复制的费用!') needCopy.forEach(item => { item.selected = false - const deepCopyRow = JSON.parse(JSON.stringify(item)) - deepCopyRow.id = '' - deepCopyRow.feeStatus = 1 - deepCopyRow.feeStatusText = '录入状态' - deepCopyRow.settlementAmount = null - deepCopyRow.orderInvoiceAmount = null - deepCopyRow.invoiceAmountRest = null - deepCopyRow.invoiceAmount = null - deepCopyRow.auditOperator = null - deepCopyRow.auditDate = null + const deepCopyRow = clearCopyRow(JSON.parse(JSON.stringify(item))) props.data.push(deepCopyRow) }) } @@ -400,6 +392,9 @@ if (!props.data[i].quantity && props.data[i].feeStatus == 1) { return createMessage.warning(`请填写数量!`) } + if (props.data[i].currency != 'RMB' && (props.data[i].exchangeRate == 1 || !props.data[i].exchangeRate)) { + return createMessage.warning(`费用第${i + 1}行数据币别非RMB,请检查汇率的准确性!`) + } } emits('save', b) } diff --git a/src/components/CostEntry/components/hooks.js b/src/components/CostEntry/components/hooks.js new file mode 100644 index 00000000..0db841b4 --- /dev/null +++ b/src/components/CostEntry/components/hooks.js @@ -0,0 +1,26 @@ +/* + * @Desc: + * @Author: lijj + * @Date: 2024-11-05 14:29:20 + */ +// 复制数据,清空指定字段 +export function clearCopyRow(obj) { + obj.id = '' + obj.feeStatus = 1 + obj.feeStatusText = '录入状态' + obj.settlementAmount = 0 + obj.orderInvoiceAmount = 0 + obj.invoiceAmountRest = null + obj.invoiceAmount = 0 + obj.auditOperator = null + obj.auditDate = null + obj.createByName = null + obj.createTime = null + obj.createBy = null + obj.debitNo = null + obj.updateTime = null + obj.updateByName = null + obj.updateBy = null + return obj +} + \ No newline at end of file diff --git a/src/components/CostEntry/feeTable.vue b/src/components/CostEntry/feeTable.vue index e646398b..18be87e1 100644 --- a/src/components/CostEntry/feeTable.vue +++ b/src/components/CostEntry/feeTable.vue @@ -64,6 +64,8 @@ // 结算对象下拉数据 import { GetSupplierAndClientListByCode } from '/@/api/common' import { useMessage } from '/@/hooks/web/useMessage' + // 通过复制清除指定字段数据 + import { clearCopyRow } from './components/hooks' // 引入字典接口 import { getDictOption } from '/@/utils/dictUtil' // handsontable hooks @@ -72,6 +74,7 @@ import { GetFeeCurrencyExchangeList } from '/@/views/fee/exchangeRate/api' import { updateColumns } from '/@/hooks/web/common' import { useAppStore } from '/@/store/modules/app' +import { Item } from 'ant-design-vue/lib/menu' const appStore = useAppStore() const { createMessage } = useMessage() defineComponent({ @@ -226,7 +229,7 @@ source: async (query, process) => { const results = await getDictOption('djy_cust_prop') const dict = results.map((item) => { - return item.value + '-' + item.name + return item.name + '-' + item.value }) process(dict) } @@ -261,9 +264,10 @@ visible: true, source: async (query, process) => { if (unitDict.value && unitDict.value.length) { - const dict = unitDict.value.map((item) => { + let dict = unitDict.value.map((item) => { return item.label }) + dict = Array.from(new Set(dict)) process(dict) } }, @@ -612,7 +616,9 @@ if (props?.details?.ctnInfo && props?.details?.ctnInfo?.length) { list.value[changes[0][0]]['unitText'] = props.details.ctnInfo[0].ctn list.value[changes[0][0]]['unit'] = props.details.ctnInfo[0].ctnCode - list.value[changes[0][0]]['quantity'] = props.details.ctnInfo[0].ctnNum + GetUnitSelectInfo({ code: list.value[changes[0][0]]['unitText'], businessId: props.id, businessType: props.type }).then(res => { + list.value[changes[0][0]]['quantity'] = res.data.quantity + }) } } else if (dict.defaultUnit == 'CNTR') { // 如果是箱,带出箱种类的数量 @@ -633,7 +639,12 @@ list.value[changes[0][0]]['quantity'] = res.data.quantity }) } else { - list.value[changes[0][0]]['quantity'] = 0 + if (list.value[changes[0][0]]['unit'] == 'Bill') { + // 需要默认带出数量是1的单位(票) + list.value[changes[0][0]]['quantity'] = 1 + } else { + list.value[changes[0][0]]['quantity'] = 0 + } } } // 根据客户类别带出相应的费用对象 @@ -672,7 +683,7 @@ }) if (item) dict = item[0] list.value[changes[0][0]]['customerType'] = dict?.value - list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1] + list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[0] // 调用接口取费用对象 if (dict && dict.value) { GetClientSelectInfoByCode({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => { @@ -914,9 +925,7 @@ if (v === 1) { let flag = false selectData.forEach((item) => { - item.id = '' - item.feeStatus = 1 - item.feeStatusText = '录入状态' + item = clearCopyRow(Item) if (props.tbType == 'receive') { item.feeType = 2 } else { @@ -965,9 +974,7 @@ } else { // 全部插入 selectData.forEach((item) => { - item.id = '' - item.feeStatus = 1 - item.feeStatusText = '录入状态' + item = clearCopyRow(Item) item.selected = false if (props.tbType == 'receive') { item.feeType = 2 diff --git a/src/components/Print/index.vue b/src/components/Print/index.vue index ad6dd4fe..fdec977b 100644 --- a/src/components/Print/index.vue +++ b/src/components/Print/index.vue @@ -130,7 +130,7 @@ const init = (v) => { printData.value = v visible.value = true - if (v) { + if (v && v.length) { // 储存选中的ids ids.value = v.map((item) => { return item.id @@ -149,17 +149,17 @@ ConditionalList: [ { Key: 1, - Value: { FieldName: 'carrierId', FieldValue: props.cid, ConditionalType: 0 }, + Value: { FieldName: 'carrierId', FieldValue: props.cid, ConditionalType: 0 } }, { Key: 1, - Value: { FieldName: 'carrierId', FieldValue: 0, ConditionalType: 11 }, - }, - ], - }, - }, - ], - }, + Value: { FieldName: 'carrierId', FieldValue: 0, ConditionalType: 11 } + } + ] + } + } + ] + } ] // if (temCodes.length) { // const ConditionalList = { @@ -215,6 +215,7 @@ // 跳转打印 const toPrint = (item, type) => { + console.log(item) // 如果是业务联系单并且没有传入打印数据,在主单页面打印 if (item.templateCode == 'BOOKING' && !printData.value) { const postData = { diff --git a/src/views/bookingcabin/CabinManagement/api.ts b/src/views/bookingcabin/CabinManagement/api.ts index 14893db8..85bacd42 100644 --- a/src/views/bookingcabin/CabinManagement/api.ts +++ b/src/views/bookingcabin/CabinManagement/api.ts @@ -188,4 +188,12 @@ export function SaveRolling(parameter) { method: 'post', data: parameter }) +} + +export function GetRollingList(parameter) { + return request({ + url: '/opApi/BookingSlotService/GetRollingList', + method: 'get', + params: parameter + }) } \ No newline at end of file diff --git a/src/views/bookingcabin/CabinManagement/detail/index.vue b/src/views/bookingcabin/CabinManagement/detail/index.vue index 6e211037..38470e9b 100644 --- a/src/views/bookingcabin/CabinManagement/detail/index.vue +++ b/src/views/bookingcabin/CabinManagement/detail/index.vue @@ -294,7 +294,7 @@ import { GetCtnSelectList, GetClientListByCode } from '/@/api/common' import DsFile from '/@/components/File/index.vue' import { ref, nextTick, onMounted, watch } from 'vue' import { - BookingSlotSave, BookingSlotDetail, SaveRolling + BookingSlotSave, BookingSlotDetail, SaveRolling,GetRollingList } from '../api' import { GetCustomerServiceList, GetSaleList, GetVouchingClerkList @@ -740,6 +740,11 @@ function getDetail() { } loading.value = false }) + GetRollingList({ slotId: id.value }).then(res=>{ + if(res.succeeded){ + setTableData(res.data) + } + }) } const rollLoad = ref(false) function handleSaveRoll(){ @@ -932,6 +937,7 @@ function handleClick(item) { item.ctnNum = 1 }) } + // 比较对象 function compareObjects(oldObj, newObj) { const differences = {}; diff --git a/src/views/operation/bill/columns.tsx b/src/views/operation/bill/columns.tsx index fd04ba4f..1f3a1fca 100644 --- a/src/views/operation/bill/columns.tsx +++ b/src/views/operation/bill/columns.tsx @@ -215,6 +215,12 @@ export const columns: BasicColumn[] = [ width: 100, align: 'left', }, + { + title: '分单号', + dataIndex: 'hblNo', + width: 100, + align: 'left', + }, { title: '提单签发状态', dataIndex: 'statusName', @@ -222,11 +228,29 @@ export const columns: BasicColumn[] = [ align: 'left', }, { - title: '签单方式', + title: '提单类型', dataIndex: 'blTypeName', width: 100, align: 'left', }, + { + title: '业务类型', + dataIndex: 'busiTypeName', + width: 100, + align: 'left', + }, + { + title: '签单方式', + dataIndex: 'issueType', + width: 100, + align: 'left', + }, + { + title: '主单分单', + dataIndex: 'masterHBillName', + width: 100, + align: 'left', + }, { title: '最近操作人', dataIndex: 'updateUserName', @@ -247,7 +271,7 @@ export const columns: BasicColumn[] = [ }, { title: '结算方式', - dataIndex: 'createByName', + dataIndex: 'stlName', width: 100, align: 'left', }, @@ -299,12 +323,6 @@ export const columns: BasicColumn[] = [ width: 100, align: 'left', }, - { - title: '业务类型', - dataIndex: 'busiTypeName', - width: 100, - align: 'left', - }, { title: '起运港', dataIndex: 'loadPort', @@ -397,31 +415,31 @@ export const detailColumns: BasicColumn[] = [ { title: '操作人', dataIndex: 'createUserName', - width: 100, + width: 80, align: 'left', }, { title: '操作时间', dataIndex: 'createTime', - width: 120, + width: 130, align: 'left', }, { title: '动作', dataIndex: 'actionName', - width: 100, + width: 80, align: 'left', }, { title: '结果', dataIndex: 'result', - width: 50, + width: 45, align: 'left', }, { title: '备注', dataIndex: 'note', - width: 100, + width: 90, align: 'left', }, ] @@ -435,17 +453,17 @@ export const feeColumns: BasicColumn[] = [ { title: 'RMB应收欠费(超期)', dataIndex: 'noPayAmountCNY', - width: 140, + width: 130, }, { title: 'USD应收欠费(超期)', dataIndex: 'noPayAmountUSD', - width: 140, + width: 130, }, { title: '合计应收欠费(超期)', dataIndex: 'noPayAmountTotal', - width: 140, + width: 130, }, diff --git a/src/views/operation/bill/index.vue b/src/views/operation/bill/index.vue index a84d805a..1ae4e354 100644 --- a/src/views/operation/bill/index.vue +++ b/src/views/operation/bill/index.vue @@ -1,779 +1,796 @@ - diff --git a/src/views/operation/paidApply/detail/components/businessTable.vue b/src/views/operation/paidApply/detail/components/businessTable.vue index 0151fe56..cb6babf0 100644 --- a/src/views/operation/paidApply/detail/components/businessTable.vue +++ b/src/views/operation/paidApply/detail/components/businessTable.vue @@ -328,10 +328,26 @@ return { id: item.id, businessType: item.businessType, - customerId: item.customerId + customerId: item.customerId, + customerName: item.customerName } }) - const items = await GetCurrencies(postCurrency).then(res => { + const qCondition = [] + const formData = getForm().getFieldsValue() + for (var key in formData) { + if (formData[key]) { + qCondition.push({ + FieldName: key, + FieldValue: formData[key], + ConditionalType: 0 + }) + } + } + postData['queryString'] = JSON.stringify(qCondition) + const items = await GetCurrencies({ + 'items': postCurrency, + queryCondition: JSON.stringify(qCondition) + }).then(res => { return res.data }) postData.items = items @@ -358,9 +374,9 @@ return currencyList.find(item => item.currency === currency) }) bPostData.value = postData - console.log(currencyList) if (currencyList.length == 0) { // 原币申请 + BizSave(postData).then(res => { loading.value = false if (res.succeeded) { diff --git a/src/views/operation/paidApply/detail/index.vue b/src/views/operation/paidApply/detail/index.vue index 5568d961..a989456b 100644 --- a/src/views/operation/paidApply/detail/index.vue +++ b/src/views/operation/paidApply/detail/index.vue @@ -10,12 +10,13 @@ diff --git a/src/views/operation/seaexport/detail/components/ladingInfo.tsx b/src/views/operation/seaexport/detail/components/ladingInfo.tsx index 147ded97..b15822ee 100644 --- a/src/views/operation/seaexport/detail/components/ladingInfo.tsx +++ b/src/views/operation/seaexport/detail/components/ladingInfo.tsx @@ -664,15 +664,13 @@ export const formSchema3: FormSchema[] = [ label: '总件数', field: 'pkgs', component: 'Input', - colProps: { span: 12 }, - dynamicDisabled: true, + colProps: { span: 12 } }, { label: '包装', field: 'kindPkgsName', component: 'Input', - colProps: { span: 12 }, - dynamicDisabled: true, + colProps: { span: 12 } }, { label: '', diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 93e1b706..c003a9b1 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -455,7 +455,6 @@ res.data.stlDate = res.data.stlDate.split(' ')[0] } bookingDetails.value = res.data - console.log(bookingDetails.value) // 如果是审批页面切状态是已审单弹出选择现舱非现舱 inPageLoading.value = false }) @@ -567,6 +566,18 @@ } } } + // 获取右侧勾选中的服务项目的code,拼接成字符串传给后台 + let serviceItem = '' + const seriveItems = RefrightContent.value.bookingServiceItem + if (seriveItems && seriveItems.length) { + const sitems = seriveItems.filter(item => { + return item.isYield == true + }) + const codes = sitems.map(item => { + return item.projectCode + }) + serviceItem = String(codes) + } // 提交的post数据 const postData = { ...baseinfoForm, @@ -577,7 +588,10 @@ ...customerForm, ...noteForm, ediInfo: ediFrom, - ctnInfo + ctnInfo, + soRemark: ediFrom.soRemark, + closeDocRemark: ediFrom.closeDocRemark, + serviceItem } // 处理截港截单时间 if (postData.closingDate && postData.closingDate.length == 13) { @@ -998,6 +1012,7 @@ Withdraw(postData).then(res => { if (res.succeeded) { createMessage.success('撤销成功!') + RefrightContent.value.getStatusServiceList(1, null) } init() }) @@ -1026,12 +1041,15 @@ businessType: '1', taskTypeName: type || route.query.status } - completeTask(type, true) + await completeTask(type, true) if (type) postData['hasCabin'] = true loading.value = true - await CreateTask(postData).then(res => { + CreateTask(postData).then(res => { loading.value = false if (!b) createMessage.success(res.message) + // 关闭当前页面 + const { fullPath } = route //获取当前路径 + tabStore.closeTabByKey(fullPath, router) }).catch(() => { loading.value = false }) @@ -1181,12 +1199,16 @@ if (res.data) { // 是最后一个审批人,若果此票是现舱,弹窗选择现舱弹窗 const shippingSpaceType = RefbasicInfo.value.formData.shippingSpaceType - if (shippingSpaceType == 'xc') { + if (shippingSpaceType == 'xc' && route.query.status == 'WAIT_ORDER_AUDIT') { // 选择现舱 sspace.value.init() } else { - // 非现舱直接审核通过 - seaExportTaskAudit(remark, true) + // 非现舱直接审核通过 (如果是审单,需要自动订舱) + if (route.query.status == 'WAIT_ORDER_AUDIT') { + seaExportTaskAudit(remark, true) + } else { + seaExportTaskAudit(remark, false) + } } } else { // 不是最后一个审批人,直接审核 @@ -1231,36 +1253,41 @@ return createMessage.warning('请填写订舱编号或主提单号!') } } - if (status == 'ORDER_AUDIT_REJECTED') { - SubmitAudit({ - businessId: id.value, - businessType: 1, - taskTypeName: 'WAIT_ORDER_AUDIT' - }).then(res => { - tabStore.closeTabByKey(fullPath, router) - }) - } else if (status == 'WAIT_SI_REJECT') { - SubmitAudit({ - businessId: id.value, - businessType: 1, - taskTypeName: 'WAIT_SI' - }).then(res => { - tabStore.closeTabByKey(fullPath, router) - }) - } else { - const postData = { - businessId: id.value, - businessType: 1, - taskTypeName: type || status, - taskStatus: 2, - autoCreateNext: true + return new Promise((resolve) => { + if (status == 'ORDER_AUDIT_REJECTED') { + SubmitAudit({ + businessId: id.value, + businessType: 1, + taskTypeName: 'WAIT_ORDER_AUDIT' + }).then(res => { + resolve(res) + tabStore.closeTabByKey(fullPath, router) + }) + } else if (status == 'WAIT_SI_REJECT') { + SubmitAudit({ + businessId: id.value, + businessType: 1, + taskTypeName: 'WAIT_SI' + }).then(res => { + resolve(res) + tabStore.closeTabByKey(fullPath, router) + }) + } else { + const postData = { + businessId: id.value, + businessType: 1, + taskTypeName: type || status, + taskStatus: 2, + autoCreateNext: true + } + if (type) postData.autoCreateNext = false + SetTaskStatus(postData).then(res => { + if (!b) createMessage.success('操作成功!') + resolve(res) + tabStore.closeTabByKey(fullPath, router) + }) } - if (type) postData.autoCreateNext = false - SetTaskStatus(postData).then(res => { - if (!b) createMessage.success('操作成功!') - tabStore.closeTabByKey(fullPath, router) - }) - } + }) } watch( () => copyFlag, diff --git a/src/views/operation/seaexport/detail/modules/cargoInfo.vue b/src/views/operation/seaexport/detail/modules/cargoInfo.vue index 04f4e177..377b2151 100644 --- a/src/views/operation/seaexport/detail/modules/cargoInfo.vue +++ b/src/views/operation/seaexport/detail/modules/cargoInfo.vue @@ -227,7 +227,7 @@ const data = getFieldsValue2() console.log(data) let gData = [{}] - if (data.ctnGoodsInfo.length != 0) gData = data.ctnGoodsInfo + if (data?.ctnGoodsInfo?.length != 0) gData = data.ctnGoodsInfo ctnGoodsInfo.value = gData } const handleOk = () => { diff --git a/src/views/operation/seaexport/detail/modules/ediMore.vue b/src/views/operation/seaexport/detail/modules/ediMore.vue index 02fea7a4..c23f90f1 100644 --- a/src/views/operation/seaexport/detail/modules/ediMore.vue +++ b/src/views/operation/seaexport/detail/modules/ediMore.vue @@ -46,7 +46,11 @@ () => props.details, (nval) => { if (nval.ediInfo) { - setFieldsValue(nval.ediInfo) + setFieldsValue({ + ...nval.ediInfo, + soRemark: props.details.soRemark, + closeDocRemark: props.details.closeDocRemark + }) } } ) @@ -73,7 +77,9 @@ }) }) setFieldsValue({ - ...props.details.ediInfo + ...props.details.ediInfo, + soRemark: props.details.soRemark, + closeDocRemark: props.details.closeDocRemark }) }) defineExpose({ diff --git a/src/views/operation/seaexport/detail/modules/operationArea.vue b/src/views/operation/seaexport/detail/modules/operationArea.vue index f5956382..55e95e52 100644 --- a/src/views/operation/seaexport/detail/modules/operationArea.vue +++ b/src/views/operation/seaexport/detail/modules/operationArea.vue @@ -1490,11 +1490,9 @@ ]) // 退舱按钮 const returnCabin = () => { - // 未订舱或者已开船,不可退舱 - const etd = props.details.etd - const now = new Date() - if (!props?.details?.isBooking || new Date(etd) < now) { - return createMessage.warning('未订舱或已开船不可退舱!') + // 未订舱不可退舱 + if (!props?.details?.isBooking) { + return createMessage.warning('该订单暂未订舱!') } returnCabinFlag.value = true } diff --git a/src/views/operation/seaexport/detail/modules/rightContent.vue b/src/views/operation/seaexport/detail/modules/rightContent.vue index 5d0aa2f3..0f4a5e3a 100644 --- a/src/views/operation/seaexport/detail/modules/rightContent.vue +++ b/src/views/operation/seaexport/detail/modules/rightContent.vue @@ -1116,7 +1116,9 @@ init, open, flag, - cancelGoodsStatus + cancelGoodsStatus, + getStatusServiceList, + bookingServiceItem })