Commit 5a520b62ca85787a458e144bb684c456b6be835e
1 parent
940821bb
修改财务页面
Showing
27 changed files
with
211 additions
and
49 deletions
src/api/project/invoice.ts
@@ -59,14 +59,14 @@ export const getInvoice = async (params: any) => { | @@ -59,14 +59,14 @@ export const getInvoice = async (params: any) => { | ||
59 | const formattedRecords = res.records.map((record: any) => { | 59 | const formattedRecords = res.records.map((record: any) => { |
60 | return { | 60 | return { |
61 | ...record, | 61 | ...record, |
62 | - actualPayedAmount1: record.actualPayedAmount1?.toFixed(2), | ||
63 | - actualPayedAmount2: record.actualPayedAmount2?.toFixed(2), | ||
64 | - actualPayedAmount3: record.actualPayedAmount3?.toFixed(2), | ||
65 | - actualReceivableAmount: record.actualReceivableAmount?.toFixed(2), | ||
66 | - deductAmount: record.deductAmount?.toFixed(2), | ||
67 | - otherAmount: record.otherAmount?.toFixed(2), | ||
68 | - totalCustomerAmount: record.totalCustomerAmount?.toFixed(2), | ||
69 | - totalPayAmount: record.totalPayAmount?.toFixed(2), | 62 | + // actualPayedAmount1: record.actualPayedAmount1?.toFixed(2), |
63 | + // actualPayedAmount2: record.actualPayedAmount2?.toFixed(2), | ||
64 | + // actualPayedAmount3: record.actualPayedAmount3?.toFixed(2), | ||
65 | + // actualReceivableAmount: record.actualReceivableAmount?.toFixed(2), | ||
66 | + // deductAmount: record.deductAmount?.toFixed(2), | ||
67 | + // otherAmount: record.otherAmount?.toFixed(2), | ||
68 | + // totalCustomerAmount: record.totalCustomerAmount?.toFixed(2), | ||
69 | + // totalPayAmount: record.totalPayAmount?.toFixed(2), | ||
70 | }; | 70 | }; |
71 | }); | 71 | }); |
72 | const orderStore = useOrderStoreWithOut(); | 72 | const orderStore = useOrderStoreWithOut(); |
src/router/routes/modules/project/finance.ts
@@ -8,9 +8,9 @@ const finance: AppRouteModule = { | @@ -8,9 +8,9 @@ const finance: AppRouteModule = { | ||
8 | path: '/finance', | 8 | path: '/finance', |
9 | name: 'Finance', | 9 | name: 'Finance', |
10 | component: LAYOUT, | 10 | component: LAYOUT, |
11 | - redirect: '/finance', | 11 | + redirect: '/finance/financeList', |
12 | meta: { | 12 | meta: { |
13 | - hideChildrenInMenu: true, | 13 | + hideChildrenInMenu: false, |
14 | orderNo: 3, | 14 | orderNo: 3, |
15 | icon: 'ant-design:pay-circle-outlined', | 15 | icon: 'ant-design:pay-circle-outlined', |
16 | title: '财务管理', | 16 | title: '财务管理', |
@@ -23,31 +23,31 @@ const finance: AppRouteModule = { | @@ -23,31 +23,31 @@ const finance: AppRouteModule = { | ||
23 | ], | 23 | ], |
24 | }, | 24 | }, |
25 | children: [ | 25 | children: [ |
26 | + // { | ||
27 | + // path: '', | ||
28 | + // name: 'Receive', | ||
29 | + // meta: { | ||
30 | + // title: '财务管理', | ||
31 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
32 | + // ignoreKeepAlive: false, | ||
33 | + // }, | ||
34 | + // // component: () => import('/@/views/project/finance/index.vue'), | ||
35 | + // }, | ||
26 | { | 36 | { |
27 | - path: '', | ||
28 | - name: 'Receive', | 37 | + path: 'financeList', |
38 | + name: 'financeList', | ||
29 | meta: { | 39 | meta: { |
30 | - title: '财务管理', | 40 | + title: '应收款应付款管理', |
31 | roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | 41 | roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], |
32 | ignoreKeepAlive: false, | 42 | ignoreKeepAlive: false, |
33 | }, | 43 | }, |
34 | - component: () => import('/@/views/project/finance/index.vue'), | 44 | + component: () => import('/@/views/project/finance/financeList/index.vue'), |
35 | }, | 45 | }, |
36 | // { | 46 | // { |
37 | - // path: 'receive', | ||
38 | - // name: 'Receive', | ||
39 | - // meta: { | ||
40 | - // title: '应收款', | ||
41 | - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
42 | - // ignoreKeepAlive: false, | ||
43 | - // }, | ||
44 | - // component: () => import('/@/views/project/finance/receive/index.vue'), | ||
45 | - // }, | ||
46 | - // { | ||
47 | - // path: 'pay', | ||
48 | - // name: 'Pay', | 47 | + // path: 'financeProfit', |
48 | + // name: 'FinanceProfit', | ||
49 | // meta: { | 49 | // meta: { |
50 | - // title: '应付款', | 50 | + // title: '净利润分析', |
51 | // ignoreKeepAlive: true, | 51 | // ignoreKeepAlive: true, |
52 | // roles: [ | 52 | // roles: [ |
53 | // RoleEnum.ADMIN, | 53 | // RoleEnum.ADMIN, |
@@ -58,7 +58,80 @@ const finance: AppRouteModule = { | @@ -58,7 +58,80 @@ const finance: AppRouteModule = { | ||
58 | // RoleEnum.DATA_REPORT_USER, | 58 | // RoleEnum.DATA_REPORT_USER, |
59 | // ], | 59 | // ], |
60 | // }, | 60 | // }, |
61 | - // component: () => import('/@/views/project/finance/pay/index.vue'), | 61 | + // children: [ |
62 | + // // { | ||
63 | + // // path: '', | ||
64 | + // // name: 'Receive', | ||
65 | + // // meta: { | ||
66 | + // // title: '财务管理', | ||
67 | + // // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
68 | + // // ignoreKeepAlive: false, | ||
69 | + // // }, | ||
70 | + // // // component: () => import('/@/views/project/finance/index.vue'), | ||
71 | + // // }, | ||
72 | + // { | ||
73 | + // path: 'serviceProfit', | ||
74 | + // name: 'ServiceProfit', | ||
75 | + // meta: { | ||
76 | + // title: '业务研发净利润分析', | ||
77 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
78 | + // ignoreKeepAlive: false, | ||
79 | + // }, | ||
80 | + // children: [ | ||
81 | + // { | ||
82 | + // path: 'serviceProfit', | ||
83 | + // name: 'ServiceProfit', | ||
84 | + // meta: { | ||
85 | + // title: '业务研发净利润分析', | ||
86 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
87 | + // ignoreKeepAlive: false, | ||
88 | + // }, | ||
89 | + // component: () => import('/@/views/project/finance/financeProfit/index.vue'), | ||
90 | + // }, | ||
91 | + // { | ||
92 | + // path: 'serviceProfit', | ||
93 | + // name: 'ServiceProfit', | ||
94 | + // meta: { | ||
95 | + // title: '业务研发净利润分析', | ||
96 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
97 | + // ignoreKeepAlive: false, | ||
98 | + // }, | ||
99 | + // component: () => import('/@/views/project/finance/financeProfit/index.vue'), | ||
100 | + // }, | ||
101 | + // ], | ||
102 | + // }, | ||
103 | + // { | ||
104 | + // path: 'productProfit', | ||
105 | + // name: 'ProductProfit', | ||
106 | + // meta: { | ||
107 | + // title: '内部生产净利润分析', | ||
108 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
109 | + // ignoreKeepAlive: false, | ||
110 | + // }, | ||
111 | + // children: [ | ||
112 | + // { | ||
113 | + // path: 'serviceProfit', | ||
114 | + // name: 'ServiceProfit', | ||
115 | + // meta: { | ||
116 | + // title: '业务研发净利润分析', | ||
117 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
118 | + // ignoreKeepAlive: false, | ||
119 | + // }, | ||
120 | + // component: () => import('/@/views/project/finance/index.vue'), | ||
121 | + // }, | ||
122 | + // { | ||
123 | + // path: 'serviceProfit', | ||
124 | + // name: 'ServiceProfit', | ||
125 | + // meta: { | ||
126 | + // title: '业务研发净利润分析', | ||
127 | + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], | ||
128 | + // ignoreKeepAlive: false, | ||
129 | + // }, | ||
130 | + // component: () => import('/@/views/project/finance/index.vue'), | ||
131 | + // }, | ||
132 | + // ], | ||
133 | + // }, | ||
134 | + // ], | ||
62 | // }, | 135 | // }, |
63 | ], | 136 | ], |
64 | }; | 137 | }; |
src/views/project/finance/CheckDetailCheck.vue renamed to src/views/project/finance/financeList/CheckDetailCheck.vue
src/views/project/finance/CheckSumCheck.vue renamed to src/views/project/finance/financeList/CheckSumCheck.vue
@@ -79,11 +79,13 @@ | @@ -79,11 +79,13 @@ | ||
79 | ]; | 79 | ]; |
80 | // const ids = ref<number[]>([]); | 80 | // const ids = ref<number[]>([]); |
81 | const ids = ref(); | 81 | const ids = ref(); |
82 | + const orderIds = ref(); | ||
82 | // const res = ref(); | 83 | // const res = ref(); |
83 | 84 | ||
84 | const [register, { closeModal }] = useModalInner(async (data) => { | 85 | const [register, { closeModal }] = useModalInner(async (data) => { |
85 | // ids.value = data.data; | 86 | // ids.value = data.data; |
86 | ids.value = data.data; | 87 | ids.value = data.data; |
88 | + orderIds.value = data.id; | ||
87 | setTimeout(() => { | 89 | setTimeout(() => { |
88 | reload(); | 90 | reload(); |
89 | }, 50); | 91 | }, 50); |
@@ -91,7 +93,7 @@ | @@ -91,7 +93,7 @@ | ||
91 | const [registerTable, { reload }] = useTable({ | 93 | const [registerTable, { reload }] = useTable({ |
92 | // api: () => invoiceAnalysis({ ids: ids.value }), | 94 | // api: () => invoiceAnalysis({ ids: ids.value }), |
93 | api: async () => { | 95 | api: async () => { |
94 | - const res = await checkAnalysis({ ids: ids.value }); | 96 | + const res = await checkAnalysis({ ids: ids.value, orderIds: orderIds.value }); |
95 | // 计算合计行 | 97 | // 计算合计行 |
96 | const sum = { | 98 | const sum = { |
97 | productionDepartmentTotalPrice: 0, | 99 | productionDepartmentTotalPrice: 0, |
@@ -133,7 +135,7 @@ | @@ -133,7 +135,7 @@ | ||
133 | axios | 135 | axios |
134 | .post( | 136 | .post( |
135 | '/basic-api/order/erp/check_bill/export', | 137 | '/basic-api/order/erp/check_bill/export', |
136 | - { ids: idss }, | 138 | + { ids: idss, orderIds: orderIds.value }, |
137 | { | 139 | { |
138 | responseType: 'blob', // 设置响应类型为 'blob' | 140 | responseType: 'blob', // 设置响应类型为 'blob' |
139 | }, | 141 | }, |
src/views/project/finance/Commit.vue renamed to src/views/project/finance/financeList/Commit.vue
src/views/project/finance/CommitCheck.vue renamed to src/views/project/finance/financeList/CommitCheck.vue
src/views/project/finance/DeductShow.vue renamed to src/views/project/finance/financeList/DeductShow.vue
src/views/project/finance/DeductShowCheck.vue renamed to src/views/project/finance/financeList/DeductShowCheck.vue
src/views/project/finance/EditRefundTime.vue renamed to src/views/project/finance/financeList/EditRefundTime.vue
src/views/project/finance/EditRefundTimeCheck.vue renamed to src/views/project/finance/financeList/EditRefundTimeCheck.vue
src/views/project/finance/FinanceEdit.vue renamed to src/views/project/finance/financeList/FinanceEdit.vue
src/views/project/finance/FinanceEditCheck.vue renamed to src/views/project/finance/financeList/FinanceEditCheck.vue
src/views/project/finance/InvoiceAnalysis.vue renamed to src/views/project/finance/financeList/InvoiceAnalysis.vue
@@ -87,11 +87,13 @@ | @@ -87,11 +87,13 @@ | ||
87 | ]; | 87 | ]; |
88 | // const ids = ref<number[]>([]); | 88 | // const ids = ref<number[]>([]); |
89 | const ids = ref(); | 89 | const ids = ref(); |
90 | + const orderIds = ref(); | ||
90 | const tableData = ref([]); | 91 | const tableData = ref([]); |
91 | // const res = ref(); | 92 | // const res = ref(); |
92 | 93 | ||
93 | const [register, { closeModal }] = useModalInner(async (data) => { | 94 | const [register, { closeModal }] = useModalInner(async (data) => { |
94 | ids.value = data.data; | 95 | ids.value = data.data; |
96 | + orderIds.value = data.id; | ||
95 | setTimeout(() => { | 97 | setTimeout(() => { |
96 | reload(); | 98 | reload(); |
97 | }, 50); | 99 | }, 50); |
@@ -99,7 +101,7 @@ | @@ -99,7 +101,7 @@ | ||
99 | const [registerTable, { reload }] = useTable({ | 101 | const [registerTable, { reload }] = useTable({ |
100 | // api: () => invoiceAnalysis({ ids: ids.value }), | 102 | // api: () => invoiceAnalysis({ ids: ids.value }), |
101 | api: async () => { | 103 | api: async () => { |
102 | - const res = await invoiceAnalysis({ ids: ids.value }); | 104 | + const res = await invoiceAnalysis({ ids: ids.value, orderId: orderIds.value }); |
103 | // 计算合计行 | 105 | // 计算合计行 |
104 | const sum = { | 106 | const sum = { |
105 | customerTotalPrice: 0, | 107 | customerTotalPrice: 0, |
@@ -139,7 +141,7 @@ | @@ -139,7 +141,7 @@ | ||
139 | axios | 141 | axios |
140 | .post( | 142 | .post( |
141 | '/basic-api/order/erp/invoice_bill/export', | 143 | '/basic-api/order/erp/invoice_bill/export', |
142 | - { ids: idss }, | 144 | + { ids: idss, orderId: orderIds.value }, |
143 | { | 145 | { |
144 | responseType: 'blob', // 设置响应类型为 'blob' | 146 | responseType: 'blob', // 设置响应类型为 'blob' |
145 | }, | 147 | }, |
src/views/project/finance/InvoiceDetail.vue renamed to src/views/project/finance/financeList/InvoiceDetail.vue
src/views/project/finance/InvoiceShowCheck.vue renamed to src/views/project/finance/financeList/InvoiceShowCheck.vue
src/views/project/finance/InvoiceUploadCheck.vue renamed to src/views/project/finance/financeList/InvoiceUploadCheck.vue
src/views/project/finance/Note.vue renamed to src/views/project/finance/financeList/Note.vue
src/views/project/finance/NoteCheck.vue renamed to src/views/project/finance/financeList/NoteCheck.vue
src/views/project/finance/ReUploadBgUrl.vue renamed to src/views/project/finance/financeList/ReUploadBgUrl.vue
src/views/project/finance/TrackEdit.vue renamed to src/views/project/finance/financeList/TrackEdit.vue
src/views/project/finance/TrackEditCheck.vue renamed to src/views/project/finance/financeList/TrackEditCheck.vue
src/views/project/finance/finance.data.tsx renamed to src/views/project/finance/financeList/finance.data.tsx
@@ -4,6 +4,29 @@ import { icon } from 'ant-design-vue'; | @@ -4,6 +4,29 @@ import { icon } from 'ant-design-vue'; | ||
4 | import { FolderAddOutlined, FilePptOutlined } from '@ant-design/icons-vue'; | 4 | import { FolderAddOutlined, FilePptOutlined } from '@ant-design/icons-vue'; |
5 | import { size } from 'lodash-es'; | 5 | import { size } from 'lodash-es'; |
6 | import { view } from '@/utils/pdfShow'; | 6 | import { view } from '@/utils/pdfShow'; |
7 | +import { ref } from 'vue'; | ||
8 | +import { queryNoOptions } from '/@/api/project/order'; | ||
9 | +import { useOrderStoreWithOut } from '/@/store/modules/order'; | ||
10 | +import { useOrderInfo } from '/@/hooks/component/order'; | ||
11 | + | ||
12 | +const innerNoOptions = ref([]); | ||
13 | +const projectNoOptions = ref([]); | ||
14 | +const orderStore = useOrderStoreWithOut(); | ||
15 | +const { | ||
16 | + customerCode, | ||
17 | + projectNo, | ||
18 | + productionDepartment, | ||
19 | + innerNo, | ||
20 | + poColor, | ||
21 | + cnColor, | ||
22 | + productStyle, | ||
23 | + outboundType, | ||
24 | + packetType, | ||
25 | + ideaSource, | ||
26 | + manualPreform, | ||
27 | + midCheckResult, | ||
28 | + endCheckResult, | ||
29 | +} = useOrderInfo(orderStore); | ||
7 | 30 | ||
8 | export const searchFormSchema: FormSchema[] = [ | 31 | export const searchFormSchema: FormSchema[] = [ |
9 | { | 32 | { |
@@ -47,32 +70,57 @@ export const searchFormSchema: FormSchema[] = [ | @@ -47,32 +70,57 @@ export const searchFormSchema: FormSchema[] = [ | ||
47 | { | 70 | { |
48 | field: 'customerCode', | 71 | field: 'customerCode', |
49 | label: '客户编码', | 72 | label: '客户编码', |
50 | - component: 'Input', | 73 | + component: 'Select', |
51 | colProps: { span: 8 }, | 74 | colProps: { span: 8 }, |
75 | + | ||
76 | + componentProps: { | ||
77 | + options: customerCode, | ||
78 | + showSearch: true, | ||
79 | + mode: 'multiple', | ||
80 | + }, | ||
52 | }, | 81 | }, |
53 | { | 82 | { |
54 | field: 'projectNo', | 83 | field: 'projectNo', |
55 | label: '项目号', | 84 | label: '项目号', |
56 | - component: 'Input', | 85 | + component: 'Select', |
57 | colProps: { span: 8 }, | 86 | colProps: { span: 8 }, |
87 | + | ||
88 | + componentProps: { | ||
89 | + options: projectNo, | ||
90 | + showSearch: true, | ||
91 | + mode: 'multiple', | ||
92 | + // onSearch: async (value: any) => { | ||
93 | + // projectNoOptions.value = await queryNoOptions('projectNo', value); | ||
94 | + // }, | ||
95 | + }, | ||
58 | }, | 96 | }, |
59 | { | 97 | { |
60 | field: 'productionDepartment', | 98 | field: 'productionDepartment', |
61 | label: '生产科', | 99 | label: '生产科', |
62 | - component: 'Input', | 100 | + component: 'Select', |
63 | colProps: { span: 8 }, | 101 | colProps: { span: 8 }, |
102 | + | ||
103 | + componentProps: { | ||
104 | + mode: 'multiple', | ||
105 | + | ||
106 | + options: productionDepartment, | ||
107 | + showSearch: true, | ||
108 | + }, | ||
64 | }, | 109 | }, |
65 | { | 110 | { |
66 | field: 'innerNo', | 111 | field: 'innerNo', |
67 | label: '内部编号', | 112 | label: '内部编号', |
68 | - component: 'Input', | ||
69 | - colProps: { span: 8 }, | ||
70 | - }, | ||
71 | - { | ||
72 | - field: 'customerPo', | ||
73 | - label: '客户PO号', | ||
74 | - component: 'Input', | 113 | + component: 'Select', |
75 | colProps: { span: 8 }, | 114 | colProps: { span: 8 }, |
115 | + | ||
116 | + componentProps: { | ||
117 | + options: innerNo, | ||
118 | + showSearch: true, | ||
119 | + mode: 'multiple', | ||
120 | + // onSearch: async (value: any) => { | ||
121 | + // innerNoOptions.value = await queryNoOptions('innerNo', value); | ||
122 | + // }, | ||
123 | + }, | ||
76 | }, | 124 | }, |
77 | { | 125 | { |
78 | field: 'invoiceStartTime', | 126 | field: 'invoiceStartTime', |
@@ -213,6 +261,9 @@ export const columns: BasicColumn[] = [ | @@ -213,6 +261,9 @@ export const columns: BasicColumn[] = [ | ||
213 | title: 'Invoice编号', | 261 | title: 'Invoice编号', |
214 | dataIndex: 'invoiceNo', | 262 | dataIndex: 'invoiceNo', |
215 | width: 180, | 263 | width: 180, |
264 | + customRender: (column) => { | ||
265 | + return <span style="color: red;">{column.record?.invoiceNo}</span>; | ||
266 | + }, | ||
216 | }, | 267 | }, |
217 | { | 268 | { |
218 | title: '报关单', | 269 | title: '报关单', |
@@ -336,6 +387,9 @@ export const columns: BasicColumn[] = [ | @@ -336,6 +387,9 @@ export const columns: BasicColumn[] = [ | ||
336 | title: 'CheckNo编号', | 387 | title: 'CheckNo编号', |
337 | dataIndex: 'checkNo', | 388 | dataIndex: 'checkNo', |
338 | width: 120, | 389 | width: 120, |
390 | + customRender: (column) => { | ||
391 | + return <span style="color: red;">{column.record?.checkNo}</span>; | ||
392 | + }, | ||
339 | }, | 393 | }, |
340 | { | 394 | { |
341 | title: '生产科应付款日期', | 395 | title: '生产科应付款日期', |
src/views/project/finance/index.vue renamed to src/views/project/finance/financeList/index.vue
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | title="请确认是否删除?" | 53 | title="请确认是否删除?" |
54 | ok-text="是" | 54 | ok-text="是" |
55 | cancel-text="否" | 55 | cancel-text="否" |
56 | - @confirm="handleDeleteInvoiceIds" | 56 | + @confirm="handleDeleteCheckIds" |
57 | > | 57 | > |
58 | <a-button type="primary" :style="{ borderRadius: '5px 5px 5px 5px' }" | 58 | <a-button type="primary" :style="{ borderRadius: '5px 5px 5px 5px' }" |
59 | >应付款删除</a-button | 59 | >应付款删除</a-button |
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | title="请确认是否删除?" | 63 | title="请确认是否删除?" |
64 | ok-text="是" | 64 | ok-text="是" |
65 | cancel-text="否" | 65 | cancel-text="否" |
66 | - @confirm="handleDeleteCheckIds" | 66 | + @confirm="handleDeleteInvoiceIds" |
67 | > | 67 | > |
68 | <a-button type="primary" :style="{ borderRadius: '5px 5px 5px 5px' }" | 68 | <a-button type="primary" :style="{ borderRadius: '5px 5px 5px 5px' }" |
69 | >应收款删除</a-button | 69 | >应收款删除</a-button |
@@ -247,7 +247,7 @@ | @@ -247,7 +247,7 @@ | ||
247 | </div> | 247 | </div> |
248 | </template> | 248 | </template> |
249 | <script lang="ts" setup> | 249 | <script lang="ts" setup> |
250 | - import { computed, defineComponent, ref } from 'vue'; | 250 | + import { computed, defineComponent, onMounted, ref } from 'vue'; |
251 | import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; | 251 | import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; |
252 | // import { searchFormSchema, columns } from './receive.data'; | 252 | // import { searchFormSchema, columns } from './receive.data'; |
253 | import { searchFormSchema, columns } from './finance.data'; | 253 | import { searchFormSchema, columns } from './finance.data'; |
@@ -287,6 +287,7 @@ | @@ -287,6 +287,7 @@ | ||
287 | import { ROLE } from './type.d'; | 287 | import { ROLE } from './type.d'; |
288 | import { useUserStoreWithOut } from '/@/store/modules/user'; | 288 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
289 | import { useMessage } from '/@/hooks/web/useMessage'; | 289 | import { useMessage } from '/@/hooks/web/useMessage'; |
290 | + import { useOrderStoreWithOut } from '/@/store/modules/order'; | ||
290 | 291 | ||
291 | const [registerInvoiceAnalysis, { openModal: openInvoiceAnalysis }] = useModal(); | 292 | const [registerInvoiceAnalysis, { openModal: openInvoiceAnalysis }] = useModal(); |
292 | const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); | 293 | const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); |
@@ -310,6 +311,7 @@ | @@ -310,6 +311,7 @@ | ||
310 | const checkedKeys = ref<Array<string | number>>([]); | 311 | const checkedKeys = ref<Array<string | number>>([]); |
311 | const invoiceIdKeys = ref<Array<string | number>>([]); | 312 | const invoiceIdKeys = ref<Array<string | number>>([]); |
312 | const checkIdKeys = ref<Array<string | number>>([]); | 313 | const checkIdKeys = ref<Array<string | number>>([]); |
314 | + const orderStore = useOrderStoreWithOut(); | ||
313 | const userStore = useUserStoreWithOut(); | 315 | const userStore = useUserStoreWithOut(); |
314 | const user = userStore.getUserInfo; | 316 | const user = userStore.getUserInfo; |
315 | const role = computed(() => { | 317 | const role = computed(() => { |
@@ -347,9 +349,12 @@ | @@ -347,9 +349,12 @@ | ||
347 | // }, | 349 | // }, |
348 | }); | 350 | }); |
349 | 351 | ||
352 | + onMounted(async () => { | ||
353 | + await orderStore.getDict(); | ||
354 | + }); | ||
355 | + | ||
350 | // 单选函数 | 356 | // 单选函数 |
351 | async function onSelect(record, selected: boolean) { | 357 | async function onSelect(record, selected: boolean) { |
352 | - | ||
353 | if (selected) { | 358 | if (selected) { |
354 | checkedKeys.value = [...checkedKeys.value, record.id]; | 359 | checkedKeys.value = [...checkedKeys.value, record.id]; |
355 | 360 | ||
@@ -484,6 +489,7 @@ | @@ -484,6 +489,7 @@ | ||
484 | } | 489 | } |
485 | openInvoiceAnalysis(true, { | 490 | openInvoiceAnalysis(true, { |
486 | data: invoiceIdKeys.value, | 491 | data: invoiceIdKeys.value, |
492 | + id: checkedKeys.value, | ||
487 | }); | 493 | }); |
488 | } | 494 | } |
489 | 495 | ||
@@ -545,6 +551,7 @@ | @@ -545,6 +551,7 @@ | ||
545 | } | 551 | } |
546 | openCheckSumCheck(true, { | 552 | openCheckSumCheck(true, { |
547 | data: checkIdKeys.value, | 553 | data: checkIdKeys.value, |
554 | + id: checkedKeys.value, | ||
548 | }); | 555 | }); |
549 | } | 556 | } |
550 | </script> | 557 | </script> |
src/views/project/finance/type.d.ts renamed to src/views/project/finance/financeList/type.d.ts
src/views/project/order/InvoiceCreate.vue
@@ -34,9 +34,11 @@ | @@ -34,9 +34,11 @@ | ||
34 | import { computed, ref } from 'vue'; | 34 | import { computed, ref } from 'vue'; |
35 | import type { UploadProps } from 'ant-design-vue'; | 35 | import type { UploadProps } from 'ant-design-vue'; |
36 | import { getRefundDate, getInvoice, createInvoice } from '@/api/project/invoice'; | 36 | import { getRefundDate, getInvoice, createInvoice } from '@/api/project/invoice'; |
37 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
37 | 38 | ||
38 | const fileList = ref<UploadProps['fileList']>([]); | 39 | const fileList = ref<UploadProps['fileList']>([]); |
39 | - | 40 | + const { createMessage } = useMessage(); |
41 | + const { error } = createMessage; | ||
40 | const Input1 = ref(''); | 42 | const Input1 = ref(''); |
41 | const Input2 = ref(); | 43 | const Input2 = ref(); |
42 | const uploadUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | 44 | const uploadUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); |
@@ -50,7 +52,16 @@ | @@ -50,7 +52,16 @@ | ||
50 | orderIds.value = data.data; | 52 | orderIds.value = data.data; |
51 | }); | 53 | }); |
52 | // const title = ref(''); | 54 | // const title = ref(''); |
55 | + const isDisabled = ref(false); | ||
53 | async function handleOk() { | 56 | async function handleOk() { |
57 | + if (isDisabled.value) { | ||
58 | + error('请勿连续点击生成按钮,需要等待三秒再点击生成'); | ||
59 | + return; | ||
60 | + } | ||
61 | + isDisabled.value = true; | ||
62 | + setTimeout(() => { | ||
63 | + isDisabled.value = false; | ||
64 | + }, 3000); | ||
54 | await createInvoice({ | 65 | await createInvoice({ |
55 | invoiceNo: Input1.value, | 66 | invoiceNo: Input1.value, |
56 | bgUrl: bgUrl.value, | 67 | bgUrl: bgUrl.value, |
src/views/project/order/ProductInvoice.vue
@@ -40,7 +40,10 @@ | @@ -40,7 +40,10 @@ | ||
40 | import { BasicModal, useModalInner } from '@/components/Modal'; | 40 | import { BasicModal, useModalInner } from '@/components/Modal'; |
41 | import { computed, ref } from 'vue'; | 41 | import { computed, ref } from 'vue'; |
42 | import { payDate, checkCreate } from '@/api/project/invoice'; | 42 | import { payDate, checkCreate } from '@/api/project/invoice'; |
43 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
43 | 44 | ||
45 | + const { createMessage } = useMessage(); | ||
46 | + const { error } = createMessage; | ||
44 | const Input1 = ref(''); | 47 | const Input1 = ref(''); |
45 | const Input2 = ref(); | 48 | const Input2 = ref(); |
46 | const res = ref(); | 49 | const res = ref(); |
@@ -48,7 +51,17 @@ | @@ -48,7 +51,17 @@ | ||
48 | res.value = data.data; | 51 | res.value = data.data; |
49 | Input2.value = await payDate({ orderIds: res.value }); | 52 | Input2.value = await payDate({ orderIds: res.value }); |
50 | }); | 53 | }); |
54 | + const isDisabled = ref(false); | ||
55 | + | ||
51 | async function handleOk() { | 56 | async function handleOk() { |
57 | + if (isDisabled.value) { | ||
58 | + error('请勿连续点击生成按钮,需要等待三秒再点击生成'); | ||
59 | + return; | ||
60 | + } | ||
61 | + isDisabled.value = true; | ||
62 | + setTimeout(() => { | ||
63 | + isDisabled.value = false; | ||
64 | + }, 3000); | ||
52 | await checkCreate({ | 65 | await checkCreate({ |
53 | orderIds: res.value, | 66 | orderIds: res.value, |
54 | payedDate: Input2.value, | 67 | payedDate: Input2.value, |
vite.config.ts
@@ -31,7 +31,7 @@ export default defineApplicationConfig({ | @@ -31,7 +31,7 @@ export default defineApplicationConfig({ | ||
31 | }, | 31 | }, |
32 | '/basic-api/order': { | 32 | '/basic-api/order': { |
33 | target: 'http://47.104.8.35:18000', | 33 | target: 'http://47.104.8.35:18000', |
34 | - // target: 'http://localhost:18001', | 34 | + // target: 'http://localhost:18000', |
35 | // target: 'http://39.108.227.113:8000', | 35 | // target: 'http://39.108.227.113:8000', |
36 | // target: 'http://localhost:8000', | 36 | // target: 'http://localhost:8000', |
37 | // target: 'http://39.108.227.113:3000/mock/35', | 37 | // target: 'http://39.108.227.113:3000/mock/35', |
@@ -42,7 +42,7 @@ export default defineApplicationConfig({ | @@ -42,7 +42,7 @@ export default defineApplicationConfig({ | ||
42 | }, | 42 | }, |
43 | '/api/localStorage/upload': { | 43 | '/api/localStorage/upload': { |
44 | target: 'http://47.104.8.35:18000', | 44 | target: 'http://47.104.8.35:18000', |
45 | - // target: 'http://localhost:18001', | 45 | + // target: 'http://localhost:18000', |
46 | // target: 'http://39.108.227.113:8000', | 46 | // target: 'http://39.108.227.113:8000', |
47 | // target: '192.168.31.250:18000', | 47 | // target: '192.168.31.250:18000', |
48 | // target: 'http://localhost:8000', | 48 | // target: 'http://localhost:8000', |