diff --git a/src/api/index.ts b/src/api/index.ts index a9652ea..a3299d3 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,12 +3,14 @@ import login from './login' import commodity from './commodity' import resource from './resource' import order from './order' +import inner from './inner' const totalApiConfig = { login, commodity, resource, - order + order, + inner } Object.values(totalApiConfig).forEach((apiConfig) => { diff --git a/src/api/inner.ts b/src/api/inner.ts new file mode 100644 index 0000000..97be084 --- /dev/null +++ b/src/api/inner.ts @@ -0,0 +1,11 @@ +const publicMoney = { + /** + * 公款管理 + */ + getPublicMoneyList: ['/my/settlement/list'], // 获取公款列表 + addPublicMoney: ['/my/settlement/add'], // 添加公款 + approvalPublicMoney: ['/my/settlement/approval'], // 审批公款 + updatePublicMoney: ['/my/settlement/update'] // 更新公款 +} + +export default publicMoney diff --git a/src/api/order.ts b/src/api/order.ts index e2c29e6..c577e27 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -5,8 +5,9 @@ const order = { getOrderList: ['/order/list'], // 获取订单管理 getOrderDetail: ['/order/detail'], // 获取订单详情 packOrder: ['/order/toShipping'], // 打包 - unpackOrder: ['/order/unpack'], // 取消打包 - finishDeliver: ['/order/delivered'], // 妥投 + unpackOrder: ['/order/unShipping'], // 取消发货 + finishDeliver: ['/order/shipped'], // 签收 + cancelOrder: ['/order/cancel'], // 取消订单 getLogisticsInfo: ['/logistics/query'], // 获取物流信息 /** @@ -21,7 +22,13 @@ const order = { */ getSellerList: ['/seller/list'], // 卖家列表 updateSeller: ['/seller/insertOrUpdate'], // 添加卖家 - updateAddress: ['/warehouse/insertOrUpdate'] // 添加仓库 + updateAddress: ['/warehouse/insertOrUpdate'], // 添加仓库 + + /** + * 逆向管理 + */ + getReverseList: ['/reverse/list'], // 获取逆向列表 + approvalReverse: ['/reverse/approve'] // 审批逆向 } export default order diff --git a/src/config/menuList.ts b/src/config/menuList.ts index 202bd2b..2160a62 100644 --- a/src/config/menuList.ts +++ b/src/config/menuList.ts @@ -489,14 +489,13 @@ export default [ childList: [] } ] - } - /* + }, { id: 110, - resourceName: '产品管理', + resourceName: '内部管理', resourceType: 0, resourceCode: null, - path: '/product', + path: '/inner', pid: 0, resourceDesc: null, tenantId: 2, @@ -510,10 +509,10 @@ export default [ childList: [ { id: 111, - resourceName: '产品管理', + resourceName: '公款', resourceType: 1, resourceCode: null, - path: '/product/production/index', + path: '/inner/public-money/index', pid: 110, resourceDesc: null, tenantId: 2, @@ -525,8 +524,10 @@ export default [ modifyTime: '2025-05-12 14:37:00', tag: null, childList: [] - }, - { + } + ] + } + /* { id: 112, resourceName: '进件计划', resourceType: 1, diff --git a/src/utils/page/index.ts b/src/utils/page/index.ts index f1c5c75..af83fda 100644 --- a/src/utils/page/index.ts +++ b/src/utils/page/index.ts @@ -55,14 +55,20 @@ export const getTableData = ( .$api(params) .then((res) => { const result = res as { - data: { rows: []; totalPage: number } + data: { rows: []; totalPage: number; pageUtils?: any; vvMyAccountEntity?: any } code: string resultMsg: string totalPage: number } table.$loading = false - table.$data = result.data.rows - table.$pages.total = result.data.totalPage + if (result.data.pageUtils) { + table.$data = result.data.pageUtils.rows + table.$pages.total = result.data.pageUtils.total + return result.data + } else { + table.$data = result.data.rows + table.$pages.total = result.data.totalPage + } }) .catch(() => { table.$loading = false diff --git a/src/views/inner/public-money/config.ts b/src/views/inner/public-money/config.ts new file mode 100644 index 0000000..0b441bf --- /dev/null +++ b/src/views/inner/public-money/config.ts @@ -0,0 +1,68 @@ +export const statusOptions = [ + { label: '同意', value: 'agree_approval' }, + { label: '驳回', value: 'reject_approval' } +] + +const configData = ref() +export const initConfig = () => { + configData.value = pageConfig({ + search: { + applyReason: { label: '申请原因' }, + status: { label: '状态', el: 'select', options: statusOptions } + }, + table: [ + { + // index: { label: '序号' }, + applyReason: { label: '申请原因' }, + amount: { label: '金额', formatter: (row: any) => row.operate + row.amount }, + applyUserName: { label: '申请人' }, + approvalUserName: { label: '审批人' }, + createTime: { + label: '创建时间', + formatter: (row: any) => new Date(row.createTime).toLocaleString(), + width: 160 + }, + status: { label: '状态', slot: 'status' }, + rejectReason: { label: '驳回原因', 'show-overflow-tooltip': true, width: 160 }, + btn: { + types: ['success', 'warning', 'danger'], + names: ['通过', '驳回', '删除'], + disableds: [ + (row: any) => row.status !== 'apply_for_approval', + (row: any) => row.status !== 'apply_for_approval', + (row: any) => row.status !== 'apply_for_approval' + ], + width: 160 + } + }, + { + // index: { label: '序号' }, + applyReason: { label: '备注' }, + amount: { label: '金额', formatter: (row: any) => row.operate + row.amount }, + createTime: { + label: '创建时间', + formatter: (row: any) => new Date(row.createTime).toLocaleString(), + width: 160 + } + } + ], + dialog: [ + { + operate: { + label: '类型', + el: 'select', + options: [ + { label: '充值', value: '+' }, + { label: '报销', value: '-' } + ] + }, + amount: { label: '金额' }, + applyReason: { label: '申请原因' } + }, + { + rejectReason: { label: '驳回原因', rule: true } + } + ] + }) + return configData +} diff --git a/src/views/inner/public-money/index.vue b/src/views/inner/public-money/index.vue new file mode 100644 index 0000000..bb94bb1 --- /dev/null +++ b/src/views/inner/public-money/index.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/src/views/order/list/index.vue b/src/views/order/list/index.vue index 63716b1..499c93e 100644 --- a/src/views/order/list/index.vue +++ b/src/views/order/list/index.vue @@ -158,28 +158,24 @@ :key="orderActionIndex" :class="[ 'goods-actions-item flex flex-col gap-2 justify-center items-center', - orderActionIndex ? '!mt-2' : '' + orderActionIndex ? '!ml-2' : '' ]" > {{ orderAction.desc.replace('admin', '').replace('按钮', '') }} - 查看物流信息 @@ -391,14 +387,14 @@ const onButtonClick = (interfaceUri: string, packageData: PackageItem) => { if ('/mm/order/toShipping' === interfaceUri) { // 打包 handlePack(packageData.vvTradeOrderLineDOList) - } else if ('/mm/order/testzc' === interfaceUri) { - // testzc 物流的接口 + } else if ('/mm/logistics/query' === interfaceUri) { + // 查看物流信息 handleViewLogistics(packageData) } else { - // testzc其他按钮的接口 const apiMap = { - '/mm/order/unpack': 'unpackOrder', - '/mm/order/delivered': 'finishDeliver' + '/mm/order/unShipping': 'unpackOrder', // 取消发货 + '/mm/order/shipped': 'finishDeliver', // 签收 + '/mm/order/cancel': 'cancelOrder' // 取消订单 } handleMessageBox({ msg: '是否确认该操作?', @@ -842,7 +838,6 @@ handleGetOrderList() .actions { border-left: 1px solid #f0f2f5; display: flex; - flex-direction: column; align-items: center; justify-content: center; padding: 8px 0;