diff --git a/src/components/Form/src/Ds/components/DEdit.vue b/src/components/Form/src/Ds/components/DEdit.vue index 6cf40e9c..faaca36f 100644 --- a/src/components/Form/src/Ds/components/DEdit.vue +++ b/src/components/Form/src/Ds/components/DEdit.vue @@ -86,7 +86,7 @@ } function GetState() { let RData: any = null - if (state.value || state.value === false) { + if (state.value || state.value === false || state.value === 0) { if (props.treeData.length) { let FnFor = (Data) => { Data.forEach((item: any) => { diff --git a/src/views/ContainerManagement/CurrentState/index.vue b/src/views/ContainerManagement/CurrentState/index.vue index 635683f1..1d8cc74e 100644 --- a/src/views/ContainerManagement/CurrentState/index.vue +++ b/src/views/ContainerManagement/CurrentState/index.vue @@ -46,7 +46,7 @@ const refInfoModal = ref() const [registerModal, { openModal }] = useModal() const [registerInfoModal, { openModal: openInfoModal }] = useModal() - const [registerTable, { reload, getVxeSelectRows }] = useTable({ + const [registerTable, { reload, getDataSource }] = useTable({ title: '集装箱信息列表', api: async (p) => { const res: API.DataResult = await ApiList(p) @@ -103,7 +103,6 @@ CM_ctnSize = item } if (item.FieldName == 'stateTime') { - console.log(item) item.FieldValue = moment().subtract(item.FieldValue, 'days').format('YYYY-MM-DD') item.ConditionalType = 4 } @@ -182,14 +181,7 @@ id: '0', autoHeight: window.innerHeight - 325.5, }) - function handleCreate() { - const select = getVxeSelectRows() - openModal(true, { - isParent: false, - isUpdate: false, - select, - }) - } + function handleAudit(record: Recordable) { openInfoModal(true, { cntrno: record.cntrno, @@ -211,11 +203,7 @@ visible: true, }) }) - console.log(getVxeSelectRows()) - - getVxeSelectRows().forEach((item: any) => { - console.log(item, item.isOnlineId) - + getDataSource().forEach((item: any) => { if (item.isOnlineId === 0) { item.isHeavy = item.isHeavy ? '重箱' : '空箱' ApiData.jsonDataStr.push(item) diff --git a/src/views/operation/CheckBillAuto/api.ts b/src/views/operation/CheckBillAuto/api.ts index ca3889d7..577692e1 100644 --- a/src/views/operation/CheckBillAuto/api.ts +++ b/src/views/operation/CheckBillAuto/api.ts @@ -5,6 +5,13 @@ enum Api { edit = '/checkApi/CheckBillAuto/EditCheckBillAutoInfo', info = '/checkApi/CheckBillAuto/GetCheckBillAutoInfo', Del = '/checkApi/CheckBillAuto/BatchDelCheckBillAuto', + delDetail = '/checkApi/CheckBillAuto/BatchDelCheckBillAutoDetail', + + BasicsList = '/checkApi/CheckBillAuto/GetCheckBillAutoDetailList', + recount = '/checkApi/CheckBillAuto/RecountCheckBillAuto', + create = '/checkApi/CheckBillAuto/CreateCheckBill', + cancel = '/checkApi/CheckBillAuto/CancelCheckBill', + Import = '/checkApi/CheckBillAuto/ImportExcel', } // 列表 (Auth) export function ApiList(data: PageRequest) { @@ -39,3 +46,52 @@ export function ApiDel(data: PageRequest) { data, }) } +// 自动对账明细列表 (Auth) +export function ApiBasicsList(data: PageRequest) { + return request({ + url: Api.BasicsList, + method: 'post', + data, + }) +} +// 自动对账重新匹配 (Auth) +export function ApiRecount(data) { + return request({ + url: Api.recount, + method: 'post', + data: data, + }) +} +// 生成对账单 (Auth) +export function ApiCreate(data) { + return request({ + url: Api.create, + method: 'post', + data: data, + }) +} + +// 取消生成的对账单 (Auth) +export function ApiCancel(data) { + return request({ + url: Api.cancel, + method: 'post', + data: data, + }) +} +// 导入对账excel (Auth) +export function ApiImport(data) { + return request({ + url: Api.Import, + method: 'post', + data: data.data, + }) +} +// 对账明细批量删除 (Auth) +export function ApiDelDetail(data) { + return request({ + url: Api.delDetail, + method: 'post', + data: data, + }) +} diff --git a/src/views/operation/CheckBillAuto/columns.tsx b/src/views/operation/CheckBillAuto/columns.tsx index a019aee2..25b48d37 100644 --- a/src/views/operation/CheckBillAuto/columns.tsx +++ b/src/views/operation/CheckBillAuto/columns.tsx @@ -1,5 +1,14 @@ import { BasicColumn, FormSchema } from '/@/components/Table' -import { GetClientListByCode } from '/@/api/common' +import { GetAllClientList } from '/@/api/common' +import { GetOperatorUserList } from '/@/views/operation/seaexport/api/BookingLedger' +let customerData: any = [] +const res11: API.DataResult = await GetAllClientList() +if (res11.succeeded) { + customerData = [] + res11.data.forEach((e) => { + customerData.push({ label: e.shortName, value: e.id }) + }) +} export const columns: BasicColumn[] = [ { title: '自动对账编号', @@ -482,66 +491,7 @@ export const formSchema: FormSchema[] = [ // }, // }, ] -//左侧列表 -export const columnsL: BasicColumn[] = [ - // { title: '对账Id', dataIndex: 'checkId', align: 'left' }, - // { title: '业务Id', dataIndex: 'businessId', align: 'left' }, - // { title: '业务类型', dataIndex: 'businessType', align: 'left' }, - { title: '业务类型', dataIndex: 'businessTypeName', align: 'left' }, - { title: '委托编号', dataIndex: 'customerNo', align: 'left' }, - // { title: '委托单位Id', dataIndex: 'customerId', align: 'left' }, - { title: '委托单位', dataIndex: 'customerName', align: 'left' }, - { title: '船名', dataIndex: 'vessel', align: 'left' }, - // { title: '船名Id', dataIndex: 'vesselId', align: 'left' }, - { title: '航次', dataIndex: 'voyno', align: 'left' }, - { title: '开船日期', dataIndex: 'etd', align: 'left' }, - { title: '卸货港', dataIndex: 'dischargePort', align: 'left' }, - { title: '集装箱', dataIndex: 'cntrTotal', align: 'left' }, - { title: '财务日期', dataIndex: 'accountDate', align: 'left' }, - { title: '报关单号', dataIndex: 'customNo', align: 'left' }, - { title: '销售人', dataIndex: 'saleName', align: 'left' }, - { title: '操作人员', dataIndex: 'operatorName', align: 'left' }, - { title: '订舱编号', dataIndex: 'orderNo', align: 'left' }, - { title: '主提单号', dataIndex: 'mblno', align: 'left' }, - { title: '分提单号', dataIndex: 'hblno', align: 'left' }, - { title: '约号', dataIndex: 'serviceContractNo', align: 'left' }, - { title: 'RMB应收', dataIndex: 'rmbdr', align: 'left' }, - { title: 'RMB应付', dataIndex: 'rmbcr', align: 'left' }, - { title: 'RMB未收', dataIndex: 'balrmbdr', align: 'left' }, - { title: 'RMB未付', dataIndex: 'balrmbcr', align: 'left' }, - { title: 'USD应收', dataIndex: 'usddr', align: 'left' }, - { title: 'USD应付', dataIndex: 'usdcr', align: 'left' }, - { title: 'USD未收', dataIndex: 'balusddr', align: 'left' }, - { title: 'USD未付', dataIndex: 'balusdcr', align: 'left' }, - { title: '其他应收', dataIndex: 'otherDR', align: 'left' }, - { title: '其他应付', dataIndex: 'otherCR', align: 'left' }, - { title: '其他未收', dataIndex: 'balOtherDR', align: 'left' }, - { title: '其他未付', dataIndex: 'balOtherCR', align: 'left' }, - { title: 'TTL应收', dataIndex: 'ttldr', align: 'left' }, - { title: 'TTL应付', dataIndex: 'ttlcr', align: 'left' }, - { title: 'TTL未收', dataIndex: 'balttldr', align: 'left' }, - { title: 'TTL未付', dataIndex: 'balttlcr', align: 'left' }, - { title: '开票RMB应收', dataIndex: 'orderInvoiceRMBDR', align: 'left' }, - { title: '开票USD应收', dataIndex: 'orderInvoiceUSDDR', align: 'left' }, - { title: '开票RMB应付', dataIndex: 'orderInvoiceRMBCR', align: 'left' }, - { title: '开票USD应付', dataIndex: 'orderInvoiceUSDCR', align: 'left' }, - // { title: '主提单号', dataIndex: 'testTextarea1', align: 'left' }, - // { title: '船名', dataIndex: 'testTextarea2', align: 'left' }, - // { title: '航次', dataIndex: 'testTextarea3', align: 'left' }, - // { title: '开船日期', dataIndex: 'testTextarea4', align: 'left' }, - // { title: '操作', dataIndex: 'testTextarea5', align: 'left' }, - // { title: '费用状态', dataIndex: 'testTextarea6', align: 'left' }, - // { title: '应收RMB', dataIndex: 'testTextarea7', align: 'left' }, - // { title: '未收RMB', dataIndex: 'testTextarea8', align: 'left' }, - // { title: '应收USD', dataIndex: 'testTextarea9', align: 'left' }, - // { title: 'USD未收', dataIndex: 'testTextarea10', align: 'left' }, - // { title: '应收合计', dataIndex: 'testTextarea11', align: 'left' }, - // { title: '未收合计', dataIndex: 'testTextarea12', align: 'left' }, - // { title: '应付合计', dataIndex: 'testTextarea13', align: 'left' }, - // { title: 'RMB发票申请', dataIndex: 'testTextarea14', align: 'left' }, - // { title: 'USD发票申请', dataIndex: 'testTextarea14', align: 'left' }, - // { title: '卸货港', dataIndex: 'testTextarea14', align: 'left' }, -] + let businessTypeData = [ { label: '全部', value: 0 }, { label: '海运出口', value: 1 }, @@ -572,31 +522,34 @@ export const schemas: FormSchema[] = [ colProps: { span: 4 }, }, { - label: '结算人名称', - field: 'settlerName', + label: '结算人', + field: 'settlerId', component: 'Input', show: false, }, { + field: 'settlerName', label: '结算人', - field: 'settlerId', component: 'ApiSelect', - required: false, - dynamicDisabled: false, - // defaultValue: '', colProps: { span: 4 }, - componentProps: (a) => { + componentProps: ({ formModel }) => { return { - api: GetClientListByCode, - params: { code: '' }, - labelField: 'shortName', - valueField: 'id', - showName: 'description', - resultField: 'data', + api: GetOperatorUserList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + allowClear: true, + showSearch: true, immediate: false, + resultField: 'data', onChange: (e, obj) => { if (e && obj) { - a.formModel.settlerName = obj.shortName + formModel.settlerId = obj.id + formModel.settlerName = obj.pinYinCode + } + if (!e && !obj) { + formModel.settlerId = '' + formModel.settlerName = '' } }, } @@ -723,37 +676,39 @@ export const schemas: FormSchema[] = [ }, }, { - label: '对账客户Nmae', - field: 'customerName', + label: '对账客户', + field: 'customerId', component: 'Input', show: false, }, { + field: 'customerName', label: '对账客户', - field: 'customerId', component: 'ApiSelect', - required: false, - dynamicDisabled: false, - // defaultValue: '', colProps: { span: 4 }, - componentProps: (a) => { + componentProps: ({ formModel }) => { return { - api: GetClientListByCode, - params: { code: '' }, + api: GetAllClientList, labelField: 'shortName', valueField: 'id', - showName: 'description', - resultField: 'data', + showName: 'shortName', + allowClear: true, + showSearch: true, immediate: false, + resultField: 'data', onChange: (e, obj) => { if (e && obj) { - a.formModel.customerName = obj.shortName + formModel.customerId = obj.id + formModel.customerName = obj.pinYinCode + } + if (!e && !obj) { + formModel.customerId = '' + formModel.customerName = '' } }, } }, }, - { field: 'settlementTime', label: '结算日期', @@ -772,6 +727,13 @@ export const schemas: FormSchema[] = [ component: 'Input', colProps: { span: 4 }, }, + // --------------- + { + field: 'note', + label: '备注', + component: 'Input', + colProps: { span: 4 }, + }, ] // 表单 export const Editschemas: FormSchema[] = [ @@ -923,18 +885,17 @@ export const Editschemas: FormSchema[] = [ dynamicDisabled: false, // defaultValue: '', colProps: { span: 4 }, - componentProps: (e) => { + componentProps: (a) => { return { - api: GetClientListByCode, - params: { code: '' }, - labelField: 'shortName', - valueField: 'id', - showName: 'description', - resultField: 'data', - immediate: false, + options: customerData, + allowClear: true, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, onChange: (e, obj) => { if (e && obj) { - e.formModel.customerName = obj.shortName + a.formModel.customerName = obj.label } }, onEdit: () => { @@ -944,12 +905,33 @@ export const Editschemas: FormSchema[] = [ } }, }, + { field: 'feeScope', label: '费用范围', component: 'DEdit', + required: false, + dynamicDisabled: false, colProps: { span: 4 }, - componentProps: (e) => { + componentProps: { + options: billTypeData, + allowClear: true, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onEdit: () => { + const { formActionType } = e + formActionType ? formActionType.linkageForm(e) : null + }, + }, + }, + { + label: '结算人', + field: 'settlerId', + component: 'DEdit', + show: false, + componentProps: ({ formModel }) => { return { onEdit: () => { const { formActionType } = e @@ -959,31 +941,29 @@ export const Editschemas: FormSchema[] = [ }, }, { - label: '结算人名称', field: 'settlerName', - component: 'Input', - show: false, - }, - { label: '结算人', - field: 'settlerId', component: 'DEdit', - required: false, - dynamicDisabled: false, - // defaultValue: '', colProps: { span: 4 }, componentProps: (e) => { return { - api: GetClientListByCode, - params: { code: '' }, - labelField: 'shortName', - valueField: 'id', - showName: 'description', - resultField: 'data', + api: GetOperatorUserList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + allowClear: true, + showSearch: true, immediate: false, + resultField: 'data', onChange: (e, obj) => { + const { formModel } = e if (e && obj) { - a.formModel.settlerName = obj.shortName + formModel.settlerId = obj.id + formModel.settlerName = obj.pinYinCode + } + if (!e && !obj) { + formModel.settlerId = '' + formModel.settlerName = '' } }, onEdit: () => { @@ -993,6 +973,7 @@ export const Editschemas: FormSchema[] = [ } }, }, + { field: 'settlementTime', label: '结算日期', @@ -1054,3 +1035,90 @@ export const Editschemas: FormSchema[] = [ }, }, ] +// 详情 明细表格 +export const formcolumns: BasicColumn[] = [ + { + title: '主提单号', + dataIndex: 'mblno', + sorter: true, + width: 150, + }, + { + title: '本地RMB金额', + dataIndex: 'rmbLocalAmount', + sorter: true, + width: 150, + }, + { + title: '本地USD金额', + dataIndex: 'usdLocalAmount', + sorter: true, + width: 150, + }, + { + title: '对账RMB金额', + dataIndex: 'rmbCheckAmount', + sorter: true, + width: 150, + }, + { + title: '对账USD金额', + dataIndex: 'usdCheckAmount', + sorter: true, + width: 150, + }, + { + title: 'RMB差异金额', + dataIndex: 'rmbDifferenceAmount', + sorter: true, + width: 150, + }, + { + title: 'USD差异金额', + dataIndex: 'usdDifferenceAmount', + sorter: true, + width: 150, + }, + { + title: '结算单位', + dataIndex: 'customerName', + sorter: true, + width: 150, + }, + { + title: '开船日期', + dataIndex: 'etd', + sorter: true, + width: 150, + }, + { + title: '船名', + dataIndex: 'vessel', + sorter: true, + width: 150, + }, + { + title: '海关航次', + dataIndex: 'voyno', + sorter: true, + width: 150, + }, + { + title: '操作员', + dataIndex: 'operatorName', + sorter: true, + width: 150, + }, + { + title: '揽货人', + dataIndex: 'saleName', + sorter: true, + width: 150, + }, + { + title: '是否一致', + dataIndex: 'isEqual', + sorter: true, + width: 150, + }, +] diff --git a/src/views/operation/CheckBillAuto/detail.vue b/src/views/operation/CheckBillAuto/detail.vue index 24b0f2d8..c77cd209 100644 --- a/src/views/operation/CheckBillAuto/detail.vue +++ b/src/views/operation/CheckBillAuto/detail.vue @@ -12,188 +12,159 @@ 根据区间对账 -
-
+
+ + +
+ +
+
+
重新对账
-
+
- - 生成对账单 - 取消生成 - + + + + 对账单 + + +
-
+
+
+
+ + + +
+ +
- -
diff --git a/src/views/operation/CheckBillAuto/index.vue b/src/views/operation/CheckBillAuto/index.vue index e4280cdc..24fd116b 100644 --- a/src/views/operation/CheckBillAuto/index.vue +++ b/src/views/operation/CheckBillAuto/index.vue @@ -21,7 +21,7 @@ const { notification } = useMessage() import { useGo } from '/@/hooks/web/usePage' const go = useGo() - const [registerTable, { reload, getForm, getSelectRows }] = useTable({ + const [registerTable, { reload, getForm, getVxeSelectRows }] = useTable({ title: '', rowSelection: { type: 'checkbox' }, clickToRowSelect: false, @@ -59,7 +59,7 @@ go(`/checkBillAutoDetail`) } function handleDel() { - const select = getSelectRows() + const select = getVxeSelectRows() if (select.length === 0) { notification.error({ message: '请选择一条数据', duration: 3 }) return false