Commit 56cd3fcb16b44a3078c6e791e120bf06587075e8
1 parent
e72d905f
开发invoice接口,订单管理:invoice创建,添加财务管理,应收款与应付款
Showing
26 changed files
with
1411 additions
and
30 deletions
src/api/project/invoice.ts
0 → 100644
1 | +import { defHttp } from '/@/utils/http/axios'; | ||
2 | + | ||
3 | +enum Api { | ||
4 | + REFUND_DATE = '/order/erp/invoice_bill/get_back_refund_date', //最后汇款日期 | ||
5 | + INVOICE_CREATE = '/order/erp/invoice_bill/create', //创建Invoice | ||
6 | + INVOICE = '/order/erp/invoice_bill/list_by_page', //分页查询列表 | ||
7 | + BASE_INVOICE = '/order/erp/invoice_bill/list_base_order_info_by', //基础订单查询 | ||
8 | + INVOICE_ANALYSIS = '/order/erp/invoice_bill/list_analysis_by', //分析列表 | ||
9 | + EXPORT_ANALYSIS = '/order/erp/invoice_bill/export', //导出分析列表 | ||
10 | + UPDATE_DEDUCT = '/order/erp/invoice_bill/update_deduct_info', //更新扣款信息 | ||
11 | + UPDATE_AMOUNT = '/order/erp/invoice_bill/update_amount_info', //更新其他金额信息 | ||
12 | + INVOICE_DELETE = '/order/erp/invoice_bill/delete_by_id', //删除数据 | ||
13 | + COMMIT = '/order/erp/invoice_bill/commit_apply', //提交审核 | ||
14 | +} | ||
15 | + | ||
16 | +export const getRefundDate = async (params: any) => { | ||
17 | + const res = await defHttp.post<any>({ | ||
18 | + url: Api.REFUND_DATE, | ||
19 | + params, | ||
20 | + }); | ||
21 | + return res; | ||
22 | +}; | ||
23 | + | ||
24 | +export const createInvoice = async (params: any) => { | ||
25 | + return await defHttp.post<any>({ | ||
26 | + url: Api.INVOICE_CREATE, | ||
27 | + params, | ||
28 | + }); | ||
29 | +}; | ||
30 | + | ||
31 | +export const getInvoice = async (params: any) => { | ||
32 | + const res = await defHttp.post<any>({ | ||
33 | + url: Api.INVOICE, | ||
34 | + params, | ||
35 | + }); | ||
36 | + console.log(res, 5656); | ||
37 | + return res.records; | ||
38 | +}; | ||
39 | +export const getBaseInvoice = async (params: any) => { | ||
40 | + const res = await defHttp.post<any>({ | ||
41 | + url: Api.BASE_INVOICE, | ||
42 | + params, | ||
43 | + }); | ||
44 | + return res; | ||
45 | +}; | ||
46 | +export const invoiceAnalysis = async (params: any) => { | ||
47 | + return await defHttp.post<any>({ | ||
48 | + url: Api.INVOICE_ANALYSIS, | ||
49 | + params, | ||
50 | + }); | ||
51 | +}; | ||
52 | +export const exportAnalysis = async (params: any) => { | ||
53 | + return await defHttp.post<any>({ | ||
54 | + url: Api.EXPORT_ANALYSIS, | ||
55 | + params, | ||
56 | + }); | ||
57 | +}; | ||
58 | +export const updateDeduct = async (params: any) => { | ||
59 | + return await defHttp.post<any>({ | ||
60 | + url: Api.UPDATE_DEDUCT, | ||
61 | + params, | ||
62 | + }); | ||
63 | +}; | ||
64 | +export const updateAmount = async (params: any, p0?: { id: any; bgUrl: any }) => { | ||
65 | + return await defHttp.post<any>({ | ||
66 | + url: Api.UPDATE_AMOUNT, | ||
67 | + params, | ||
68 | + }); | ||
69 | +}; | ||
70 | +export const deleteInvoice = async (params: any) => { | ||
71 | + return await defHttp.post<any>({ | ||
72 | + url: Api.INVOICE_DELETE, | ||
73 | + params, | ||
74 | + }); | ||
75 | +}; | ||
76 | +export const commit = async (params: any) => { | ||
77 | + return await defHttp.post<any>({ | ||
78 | + url: Api.COMMIT, | ||
79 | + params, | ||
80 | + }); | ||
81 | +}; |
src/api/project/order.ts
@@ -15,6 +15,7 @@ enum Api { | @@ -15,6 +15,7 @@ enum Api { | ||
15 | QUERY_PROJECT_NO_AND_INNER_NO = '/order/erp/order/queryProjectNoAndInnerNo', //查询项目号和内部编号 | 15 | QUERY_PROJECT_NO_AND_INNER_NO = '/order/erp/order/queryProjectNoAndInnerNo', //查询项目号和内部编号 |
16 | EXPORT = '/order/erp/order/export', | 16 | EXPORT = '/order/erp/order/export', |
17 | UPLOAD = '/api/localStorage/uploadOss', | 17 | UPLOAD = '/api/localStorage/uploadOss', |
18 | + UPLOAD_FILE = '/api/localStorage/upload_file_oss', //上传文件 | ||
18 | PROFIT_RATE = '/order/erp/profit/calculate', // 编辑订单实时获取利润率 | 19 | PROFIT_RATE = '/order/erp/profit/calculate', // 编辑订单实时获取利润率 |
19 | 20 | ||
20 | DICT_INIT = '/order/erp/dictionary/get_all', | 21 | DICT_INIT = '/order/erp/dictionary/get_all', |
@@ -30,6 +31,8 @@ enum Api { | @@ -30,6 +31,8 @@ enum Api { | ||
30 | AUDIT_LOG = '/order/erp/audit/log/list_by_page', //审批日志 | 31 | AUDIT_LOG = '/order/erp/audit/log/list_by_page', //审批日志 |
31 | ORDER_RATE_EXPORT = '/order/erp/report/export', // 所有设计师比重导出 | 32 | ORDER_RATE_EXPORT = '/order/erp/report/export', // 所有设计师比重导出 |
32 | ORDER_FIELD_CHECK = '/order/erp/order/check', // 校验内部编号是否重复 | 33 | ORDER_FIELD_CHECK = '/order/erp/order/check', // 校验内部编号是否重复 |
34 | + | ||
35 | + TRACK_HISTORY = '/order/erp/opinion/log/query_by_id', //跟单结果记录 | ||
33 | } | 36 | } |
34 | 37 | ||
35 | export const formatSearchData = (params) => { | 38 | export const formatSearchData = (params) => { |
@@ -293,3 +296,12 @@ export const dictList = async (data: any) => { | @@ -293,3 +296,12 @@ export const dictList = async (data: any) => { | ||
293 | const res = await defHttp.post<any>({ url: Api.DICT_LIST, data: { ...data, pageSize: 1000 } }); | 296 | const res = await defHttp.post<any>({ url: Api.DICT_LIST, data: { ...data, pageSize: 1000 } }); |
294 | return res; | 297 | return res; |
295 | }; | 298 | }; |
299 | + | ||
300 | +//订单跟单记录 | ||
301 | +export const trackHistory = async (data: any) => { | ||
302 | + const res = await defHttp.post<any>({ | ||
303 | + url: Api.TRACK_HISTORY, | ||
304 | + data: data, | ||
305 | + }); | ||
306 | + return res; | ||
307 | +}; |
src/api/sys/config.ts
@@ -90,14 +90,11 @@ export const getEmailList = async (params: any) => { | @@ -90,14 +90,11 @@ export const getEmailList = async (params: any) => { | ||
90 | url: Api.EMAIL_LIST, | 90 | url: Api.EMAIL_LIST, |
91 | params, | 91 | params, |
92 | }); | 92 | }); |
93 | - console.log(res, 111222); | ||
94 | const resAll = dealRecords(res.records); | 93 | const resAll = dealRecords(res.records); |
95 | - console.log(resAll, 111222); | ||
96 | return resAll; | 94 | return resAll; |
97 | }; | 95 | }; |
98 | 96 | ||
99 | function dealRecords(data: any) { | 97 | function dealRecords(data: any) { |
100 | - console.log(data, 111222); | ||
101 | for (const value of data) { | 98 | for (const value of data) { |
102 | const emailEvents = JSON.parse(value.configInfos); | 99 | const emailEvents = JSON.parse(value.configInfos); |
103 | value.configInfos = emailEvents; | 100 | value.configInfos = emailEvents; |
src/router/routes/modules/project/approve.ts
@@ -10,7 +10,7 @@ const order: AppRouteModule = { | @@ -10,7 +10,7 @@ const order: AppRouteModule = { | ||
10 | meta: { | 10 | meta: { |
11 | hideChildrenInMenu: true, | 11 | hideChildrenInMenu: true, |
12 | orderNo: 3, | 12 | orderNo: 3, |
13 | - icon: 'ion:grid-outline', | 13 | + // icon: 'ion:grid-outline', |
14 | title: '审批管理', | 14 | title: '审批管理', |
15 | }, | 15 | }, |
16 | children: [ | 16 | children: [ |
src/router/routes/modules/project/finance.ts
0 → 100644
1 | +import type { AppRouteModule } from '/@/router/types'; | ||
2 | + | ||
3 | +import { LAYOUT } from '/@/router/constant'; | ||
4 | +import { t } from '/@/hooks/web/useI18n'; | ||
5 | +import { RoleEnum } from '/@/enums/roleEnum'; | ||
6 | + | ||
7 | +const finance: AppRouteModule = { | ||
8 | + path: '/finance', | ||
9 | + name: 'Finance', | ||
10 | + component: LAYOUT, | ||
11 | + redirect: '/finance/receive', | ||
12 | + meta: { | ||
13 | + orderNo: 3, | ||
14 | + icon: 'ant-design:pay-circle-outlined', | ||
15 | + title: '财务管理', | ||
16 | + }, | ||
17 | + children: [ | ||
18 | + { | ||
19 | + path: 'receive', | ||
20 | + name: 'Receive', | ||
21 | + meta: { | ||
22 | + title: '应收款', | ||
23 | + // roles: [RoleEnum.ADMIN], | ||
24 | + ignoreKeepAlive: false, | ||
25 | + }, | ||
26 | + component: () => import('/@/views/project/finance/receive/index.vue'), | ||
27 | + }, | ||
28 | + { | ||
29 | + path: 'pay', | ||
30 | + name: 'Pay', | ||
31 | + meta: { | ||
32 | + title: '应付款', | ||
33 | + ignoreKeepAlive: true, | ||
34 | + }, | ||
35 | + component: () => import('/@/views/project/finance/pay/index.vue'), | ||
36 | + }, | ||
37 | + ], | ||
38 | +}; | ||
39 | + | ||
40 | +export default finance; |
src/router/routes/modules/project/system.ts
@@ -10,7 +10,7 @@ const system: AppRouteModule = { | @@ -10,7 +10,7 @@ const system: AppRouteModule = { | ||
10 | component: LAYOUT, | 10 | component: LAYOUT, |
11 | redirect: '/system/account', | 11 | redirect: '/system/account', |
12 | meta: { | 12 | meta: { |
13 | - orderNo: 3, | 13 | + orderNo: 4, |
14 | icon: 'ion:settings-outline', | 14 | icon: 'ion:settings-outline', |
15 | title: t('routes.demo.system.moduleName'), | 15 | title: t('routes.demo.system.moduleName'), |
16 | }, | 16 | }, |
src/views/project/account/account.data.tsx
1 | import { getRoleList } from '/@/api/project/account'; | 1 | import { getRoleList } from '/@/api/project/account'; |
2 | import { Tag } from 'ant-design-vue'; | 2 | import { Tag } from 'ant-design-vue'; |
3 | +import { BasicColumn, FormSchema } from '/@/components/Table'; | ||
3 | 4 | ||
4 | export const columns: BasicColumn[] = [ | 5 | export const columns: BasicColumn[] = [ |
5 | { | 6 | { |
@@ -12,11 +13,11 @@ export const columns: BasicColumn[] = [ | @@ -12,11 +13,11 @@ export const columns: BasicColumn[] = [ | ||
12 | dataIndex: 'nickName', | 13 | dataIndex: 'nickName', |
13 | width: 120, | 14 | width: 120, |
14 | }, | 15 | }, |
15 | - // { | ||
16 | - // title: '邮箱', | ||
17 | - // dataIndex: 'email', | ||
18 | - // width: 120, | ||
19 | - // }, | 16 | + { |
17 | + title: '邮箱', | ||
18 | + dataIndex: 'email', | ||
19 | + width: 300, | ||
20 | + }, | ||
20 | // { | 21 | // { |
21 | // title: '创建时间', | 22 | // title: '创建时间', |
22 | // dataIndex: 'createTime', | 23 | // dataIndex: 'createTime', |
@@ -120,12 +121,12 @@ export const accountFormSchema: FormSchema[] = [ | @@ -120,12 +121,12 @@ export const accountFormSchema: FormSchema[] = [ | ||
120 | required: true, | 121 | required: true, |
121 | }, | 122 | }, |
122 | 123 | ||
123 | - // { | ||
124 | - // label: '邮箱', | ||
125 | - // field: 'email', | ||
126 | - // component: 'Input', | ||
127 | - // required: true, | ||
128 | - // }, | 124 | + { |
125 | + label: '邮箱', | ||
126 | + field: 'email', | ||
127 | + component: 'InputTextArea', | ||
128 | + required: true, | ||
129 | + }, | ||
129 | 130 | ||
130 | { | 131 | { |
131 | label: '备注', | 132 | label: '备注', |
src/views/project/config/EmailPanel.vue
@@ -124,19 +124,16 @@ | @@ -124,19 +124,16 @@ | ||
124 | } | 124 | } |
125 | //删除 | 125 | //删除 |
126 | async function handleDelete(record: any) { | 126 | async function handleDelete(record: any) { |
127 | - console.log('点击了删除', record); | ||
128 | await emailDelete({ id: record.id }); | 127 | await emailDelete({ id: record.id }); |
129 | reload(); | 128 | reload(); |
130 | } | 129 | } |
131 | //启用 | 130 | //启用 |
132 | async function handleOpen(record) { | 131 | async function handleOpen(record) { |
133 | - console.log(record, 'opt'); | ||
134 | await emailOpt({ id: record.id, enableflag: record.enableFlag === 10 ? 30 : 10 }); | 132 | await emailOpt({ id: record.id, enableflag: record.enableFlag === 10 ? 30 : 10 }); |
135 | reload(); | 133 | reload(); |
136 | } | 134 | } |
137 | //禁用 | 135 | //禁用 |
138 | async function handleForbid(record) { | 136 | async function handleForbid(record) { |
139 | - console.log(record.id, record.enableFlag, 999); | ||
140 | await emailOpt({ id: record.id, enableflag: record.enableFlag === 10 ? 30 : 10 }); | 137 | await emailOpt({ id: record.id, enableflag: record.enableFlag === 10 ? 30 : 10 }); |
141 | reload(); | 138 | reload(); |
142 | } | 139 | } |
src/views/project/finance/pay/FinanceEdit.vue
0 → 100644
1 | +<template> | ||
2 | + <template> | ||
3 | + <BasicDrawer | ||
4 | + @register="register" | ||
5 | + v-bind="$attrs" | ||
6 | + title="编辑" | ||
7 | + width="30%" | ||
8 | + :isDetail="true" | ||
9 | + @ok="handleSubmit" | ||
10 | + :showDetailBack="false" | ||
11 | + okText="保存" | ||
12 | + showFooter | ||
13 | + :destroyOnClose="true" | ||
14 | + > | ||
15 | + <div> | ||
16 | + <BasicForm @register="registerForm" /> | ||
17 | + </div> | ||
18 | + | ||
19 | + <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | ||
20 | + <template #appendFooter> | ||
21 | + <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> | ||
22 | + </template> | ||
23 | + </BasicDrawer> | ||
24 | + </template> | ||
25 | +</template> | ||
26 | +<script lang="ts" setup> | ||
27 | + import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | ||
28 | + import { BasicForm, FormSchema, useForm } from '@/components/Form'; | ||
29 | + import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; | ||
30 | + import { getEmailList } from '/@/api/sys/config'; | ||
31 | + | ||
32 | + const schemas: FormSchema[] = [ | ||
33 | + { | ||
34 | + field: 'configSample', | ||
35 | + component: 'Input', | ||
36 | + labelWidth: 250, | ||
37 | + colProps: { | ||
38 | + span: 23, | ||
39 | + }, | ||
40 | + label: '生产科实际应付金额', | ||
41 | + }, | ||
42 | + { | ||
43 | + field: 'configSample', | ||
44 | + component: 'Input', | ||
45 | + labelWidth: 250, | ||
46 | + colProps: { | ||
47 | + span: 23, | ||
48 | + }, | ||
49 | + label: '实际应收金额1', | ||
50 | + }, | ||
51 | + { | ||
52 | + field: 'configSample', | ||
53 | + component: 'Input', | ||
54 | + labelWidth: 250, | ||
55 | + colProps: { | ||
56 | + span: 23, | ||
57 | + }, | ||
58 | + label: '实际应收金额2', | ||
59 | + }, | ||
60 | + { | ||
61 | + field: 'configSample', | ||
62 | + component: 'Input', | ||
63 | + labelWidth: 250, | ||
64 | + colProps: { | ||
65 | + span: 23, | ||
66 | + }, | ||
67 | + label: '实际应收金额3', | ||
68 | + }, | ||
69 | + ]; | ||
70 | + const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({ | ||
71 | + labelWidth: 120, | ||
72 | + schemas, | ||
73 | + layout: 'vertical', | ||
74 | + showActionButtonGroup: false, | ||
75 | + actionColOptions: { | ||
76 | + span: 24, | ||
77 | + }, | ||
78 | + }); | ||
79 | + const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { | ||
80 | + // 方式1 | ||
81 | + console.log(data, 56561); | ||
82 | + resetFields(); | ||
83 | + setDrawerProps({ confirmLoading: false }); | ||
84 | + setFieldsValue({ | ||
85 | + ...toRaw(data.data), | ||
86 | + }); | ||
87 | + }); | ||
88 | + //获取现有的列表 | ||
89 | + async function getData() { | ||
90 | + const emailAll = await getEmailList({}); | ||
91 | + return emailAll; | ||
92 | + } | ||
93 | + //完成编辑 | ||
94 | + async function handleSubmit() { | ||
95 | + const values = await validate(); | ||
96 | + console.log('5656handleSubmit'); | ||
97 | + } | ||
98 | +</script> |
src/views/project/finance/pay/InvoiceUpload.vue
0 → 100644
1 | +<template> | ||
2 | + <BasicModal | ||
3 | + v-bind="$attrs" | ||
4 | + @register="register" | ||
5 | + title="发票上传" | ||
6 | + width="500px" | ||
7 | + :bodyStyle="{ height: '200px' }" | ||
8 | + @ok="handleOk" | ||
9 | + ><a-upload-dragger | ||
10 | + v-model:fileList="fileList" | ||
11 | + name="file" | ||
12 | + :multiple="true" | ||
13 | + action="https://www.mocky.io/v2/5cc8019d300000980a055e76" | ||
14 | + @change="handleChange" | ||
15 | + @drop="handleDrop" | ||
16 | + > | ||
17 | + <p class="ant-upload-drag-icon"> | ||
18 | + <inbox-outlined></inbox-outlined> | ||
19 | + </p> | ||
20 | + <p class="ant-upload-text">点击或将文件拖拽到这里上传</p> | ||
21 | + </a-upload-dragger> | ||
22 | + </BasicModal> | ||
23 | +</template> | ||
24 | +<script lang="ts" setup> | ||
25 | + import { BasicModal, useModalInner } from '@/components/Modal'; | ||
26 | + import { computed, ref } from 'vue'; | ||
27 | + import type { UploadProps, UploadChangeParam } from 'ant-design-vue'; | ||
28 | + import { InboxOutlined } from '@ant-design/icons-vue'; | ||
29 | + import { message } from 'ant-design-vue'; | ||
30 | + | ||
31 | + const handleChange = (info: UploadChangeParam) => { | ||
32 | + const status = info.file.status; | ||
33 | + if (status !== 'uploading') { | ||
34 | + console.log(info.file, info.fileList); | ||
35 | + } | ||
36 | + if (status === 'done') { | ||
37 | + message.success(`${info.file.name} file uploaded successfully.`); | ||
38 | + } else if (status === 'error') { | ||
39 | + message.error(`${info.file.name} file upload failed.`); | ||
40 | + } | ||
41 | + }; | ||
42 | + function handleDrop(e: DragEvent) { | ||
43 | + console.log(e); | ||
44 | + } | ||
45 | + const fileList = ref<UploadProps['fileList']>([]); | ||
46 | + | ||
47 | + const Input1 = ref(''); | ||
48 | + const Input2 = ref('123'); | ||
49 | + | ||
50 | + const [register, { closeModal }] = useModalInner(async (data) => { | ||
51 | + title.value = data.title; | ||
52 | + }); | ||
53 | + const title = ref(''); | ||
54 | + async function handleOk() { | ||
55 | + closeModal(); | ||
56 | + } | ||
57 | +</script> |
src/views/project/finance/pay/TrackEdit.vue
0 → 100644
1 | +<template> | ||
2 | + <template> | ||
3 | + <BasicDrawer | ||
4 | + @register="register" | ||
5 | + v-bind="$attrs" | ||
6 | + title="编辑" | ||
7 | + width="30%" | ||
8 | + :isDetail="true" | ||
9 | + @ok="handleSubmit" | ||
10 | + :showDetailBack="false" | ||
11 | + okText="保存" | ||
12 | + showFooter | ||
13 | + :destroyOnClose="true" | ||
14 | + > | ||
15 | + <div> | ||
16 | + <div style="font-size: 15px">生产科扣款金额</div> | ||
17 | + <a-input v-model:value="Input1" placeholder="请输入" auto-size /> | ||
18 | + <div style="margin: 16px 0"></div> | ||
19 | + <div style="font-size: 15px">扣款责任部门</div> | ||
20 | + <a-input v-model:value="Input2" placeholder="请输入" auto-size /> | ||
21 | + <div style="margin: 16px 0"></div> | ||
22 | + <div>上传扣款单</div | ||
23 | + ><a-space direction="vertical" style="width: 100%" size="large"> | ||
24 | + <a-upload | ||
25 | + v-model:file-list="fileList" | ||
26 | + list-type="picture" | ||
27 | + :max-count="1" | ||
28 | + action="https://www.mocky.io/v2/5cc8019d300000980a055e76" | ||
29 | + > | ||
30 | + <a-button> | ||
31 | + <!-- <upload-outlined></upload-outlined> --> | ||
32 | + 上传报关单 | ||
33 | + </a-button> | ||
34 | + </a-upload> | ||
35 | + </a-space> | ||
36 | + </div> | ||
37 | + <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | ||
38 | + <template #appendFooter> | ||
39 | + <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> | ||
40 | + </template> | ||
41 | + </BasicDrawer> | ||
42 | + </template> | ||
43 | +</template> | ||
44 | +<script lang="ts" setup> | ||
45 | + import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | ||
46 | + import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; | ||
47 | + import { getEmailList } from '/@/api/sys/config'; | ||
48 | + import { UploadOutlined } from '@ant-design/icons-vue'; | ||
49 | + import type { UploadProps } from 'ant-design-vue'; | ||
50 | + | ||
51 | + const fileList = ref<UploadProps['fileList']>([]); | ||
52 | + | ||
53 | + const Input1 = ref(''); | ||
54 | + const Input2 = ref('123'); | ||
55 | + | ||
56 | + const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { | ||
57 | + console.log(data, 56561); | ||
58 | + }); | ||
59 | + //获取现有的列表 | ||
60 | + async function getData() { | ||
61 | + const emailAll = await getEmailList({}); | ||
62 | + return emailAll; | ||
63 | + } | ||
64 | + //完成编辑 | ||
65 | + async function handleSubmit() { | ||
66 | + console.log('5656handleSubmit'); | ||
67 | + } | ||
68 | +</script> |
src/views/project/finance/pay/index.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="p-4"> | ||
3 | + <BasicTable @register="registerTable"> | ||
4 | + <template #toolbar> | ||
5 | + <a-button type="primary">导出</a-button> | ||
6 | + <FinanceEdit @register="registerFinanceEdit" /> | ||
7 | + <TrackEdit @register="registerTrackEdit" /> | ||
8 | + <InvoiceUpload @register="registerInvoiceUpload" /> | ||
9 | + </template> | ||
10 | + <template #bodyCell="{ column, record }"> | ||
11 | + <template v-if="column.key === 'action'"> | ||
12 | + <TableAction | ||
13 | + :actions="[ | ||
14 | + { | ||
15 | + label: '财务编辑', | ||
16 | + onClick: handleFinanceEdit.bind(null, record), | ||
17 | + }, | ||
18 | + { | ||
19 | + label: '跟单编辑', | ||
20 | + onClick: handleTrackEdit.bind(null, record), | ||
21 | + }, | ||
22 | + { | ||
23 | + label: '发票上传', | ||
24 | + onClick: handleInvoiceUpload.bind(null, record), | ||
25 | + }, | ||
26 | + ]" | ||
27 | + :dropDownActions="[ | ||
28 | + { | ||
29 | + label: '应付款提交', | ||
30 | + onClick: handleDelete.bind(null, record), | ||
31 | + }, | ||
32 | + { | ||
33 | + label: '订单信息', | ||
34 | + onClick: handleDelete.bind(null, record), | ||
35 | + }, | ||
36 | + ]" | ||
37 | + /> | ||
38 | + </template> | ||
39 | + </template> | ||
40 | + </BasicTable> | ||
41 | + </div> | ||
42 | +</template> | ||
43 | +<script lang="ts" setup> | ||
44 | + import { defineComponent } from 'vue'; | ||
45 | + import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; | ||
46 | + import { searchFormSchema, columns } from './pay.data'; | ||
47 | + import { demoListApi } from '/@/api/demo/table'; | ||
48 | + import TrackEdit from './TrackEdit.vue'; | ||
49 | + import FinanceEdit from './FinanceEdit.vue'; | ||
50 | + import InvoiceUpload from './InvoiceUpload.vue'; | ||
51 | + import { useDrawer } from '/@/components/Drawer'; | ||
52 | + import { useModal } from '/@/components/Modal'; | ||
53 | + | ||
54 | + const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); | ||
55 | + const [registerTrackEdit, { openDrawer: openTrackEdit }] = useDrawer(); | ||
56 | + const [registerInvoiceUpload, { openModal: openInvoiceUpload }] = useModal(); | ||
57 | + | ||
58 | + const [registerTable] = useTable({ | ||
59 | + title: '', | ||
60 | + api: demoListApi, | ||
61 | + columns: columns, | ||
62 | + bordered: true, | ||
63 | + rowKey: 'id', | ||
64 | + rowSelection: { | ||
65 | + type: 'checkbox', | ||
66 | + }, | ||
67 | + formConfig: { | ||
68 | + labelWidth: 120, | ||
69 | + schemas: searchFormSchema, | ||
70 | + autoSubmitOnEnter: true, | ||
71 | + }, | ||
72 | + useSearchForm: true, | ||
73 | + showTableSetting: true, | ||
74 | + showIndexColumn: false, | ||
75 | + tableSetting: { | ||
76 | + setting: false, | ||
77 | + }, | ||
78 | + actionColumn: { | ||
79 | + width: 260, | ||
80 | + title: 'Action', | ||
81 | + dataIndex: 'action', | ||
82 | + // slots: { customRender: 'action' }, | ||
83 | + }, | ||
84 | + }); | ||
85 | + function handleFinanceEdit(record) { | ||
86 | + console.log('点击了编辑', record); | ||
87 | + openFinanceEdit(true, { | ||
88 | + data: record, | ||
89 | + }); | ||
90 | + } | ||
91 | + function handleTrackEdit(record) { | ||
92 | + console.log('点击了编辑', record); | ||
93 | + openTrackEdit(true, { | ||
94 | + data: record, | ||
95 | + }); | ||
96 | + } | ||
97 | + function handleInvoiceUpload(record) { | ||
98 | + console.log('点击了编辑', record); | ||
99 | + openInvoiceUpload(true, { | ||
100 | + data: record, | ||
101 | + }); | ||
102 | + } | ||
103 | + function handleDelete(record) { | ||
104 | + console.log('点击了编辑', record); | ||
105 | + openTrackEdit(true, { | ||
106 | + data: record, | ||
107 | + }); | ||
108 | + } | ||
109 | +</script> |
src/views/project/finance/pay/pay.data.tsx
0 → 100644
1 | +import { FormSchema } from '/@/components/Form'; | ||
2 | +import { BasicColumn } from '/@/components/Table'; | ||
3 | +import { icon } from 'ant-design-vue'; | ||
4 | +import { FolderAddOutlined } from '@ant-design/icons-vue'; | ||
5 | +import { size } from 'lodash-es'; | ||
6 | + | ||
7 | +export const searchFormSchema: FormSchema[] = [ | ||
8 | + { | ||
9 | + field: 'phone', | ||
10 | + label: '生产科对账单号', | ||
11 | + component: 'Input', | ||
12 | + colProps: { span: 8 }, | ||
13 | + }, | ||
14 | + { | ||
15 | + field: 'nickName', | ||
16 | + label: '总经理审核', | ||
17 | + component: 'Input', | ||
18 | + colProps: { span: 8 }, | ||
19 | + }, | ||
20 | +]; | ||
21 | + | ||
22 | +export const columns: BasicColumn[] = [ | ||
23 | + { | ||
24 | + title: '生产科对账单号', | ||
25 | + dataIndex: 'no', | ||
26 | + width: 120, | ||
27 | + customRender: (column) => { | ||
28 | + return '5667'; | ||
29 | + }, | ||
30 | + }, | ||
31 | + { | ||
32 | + title: '生产科应付款日期', | ||
33 | + dataIndex: 'no', | ||
34 | + width: 140, | ||
35 | + }, | ||
36 | + { | ||
37 | + title: '生产科扣款金额', | ||
38 | + dataIndex: 'no', | ||
39 | + width: 120, | ||
40 | + }, | ||
41 | + { | ||
42 | + title: '扣款责任部门', | ||
43 | + dataIndex: 'no', | ||
44 | + width: 120, | ||
45 | + }, | ||
46 | + { | ||
47 | + title: '上传扣款单', | ||
48 | + dataIndex: 'no', | ||
49 | + width: 120, | ||
50 | + }, | ||
51 | + { | ||
52 | + title: '生产科实际应付金额', | ||
53 | + dataIndex: 'no', | ||
54 | + width: 120, | ||
55 | + }, | ||
56 | + { | ||
57 | + title: '生产科发票上传', | ||
58 | + dataIndex: 'no', | ||
59 | + width: 80, | ||
60 | + customRender: (column) => { | ||
61 | + return <FolderAddOutlined style="font-size:25px" />; | ||
62 | + }, | ||
63 | + }, | ||
64 | + { | ||
65 | + title: '实际付款金额1', | ||
66 | + dataIndex: 'no', | ||
67 | + width: 120, | ||
68 | + }, | ||
69 | + { | ||
70 | + title: '实际付款金额2', | ||
71 | + dataIndex: 'no', | ||
72 | + width: 120, | ||
73 | + }, | ||
74 | + { | ||
75 | + title: '实际付款金额3', | ||
76 | + dataIndex: 'no', | ||
77 | + width: 120, | ||
78 | + }, | ||
79 | + { | ||
80 | + title: '生产科发票', | ||
81 | + dataIndex: 'no', | ||
82 | + width: 120, | ||
83 | + }, | ||
84 | + { | ||
85 | + title: '总经理审核', | ||
86 | + dataIndex: 'no', | ||
87 | + width: 120, | ||
88 | + }, | ||
89 | +]; |
src/views/project/finance/receive/FinanceEdit.vue
0 → 100644
1 | +<template> | ||
2 | + <template> | ||
3 | + <BasicDrawer | ||
4 | + @register="register" | ||
5 | + v-bind="$attrs" | ||
6 | + title="收入款单" | ||
7 | + width="30%" | ||
8 | + :isDetail="true" | ||
9 | + @ok="handleSubmit" | ||
10 | + :showDetailBack="false" | ||
11 | + okText="保存" | ||
12 | + showFooter | ||
13 | + :destroyOnClose="true" | ||
14 | + > | ||
15 | + <div> | ||
16 | + <BasicForm @register="registerForm" /> | ||
17 | + </div> | ||
18 | + | ||
19 | + <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | ||
20 | + <template #appendFooter> | ||
21 | + <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> | ||
22 | + </template> | ||
23 | + </BasicDrawer> | ||
24 | + </template> | ||
25 | +</template> | ||
26 | +<script lang="ts" setup> | ||
27 | + import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | ||
28 | + import { BasicForm, FormSchema, useForm } from '@/components/Form'; | ||
29 | + import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; | ||
30 | + import { getEmailList } from '/@/api/sys/config'; | ||
31 | + import { updateAmount } from '@/api/project/invoice'; | ||
32 | + | ||
33 | + const schemas: FormSchema[] = [ | ||
34 | + { | ||
35 | + field: 'actualReceivableAmount', | ||
36 | + component: 'Input', | ||
37 | + labelWidth: 250, | ||
38 | + colProps: { | ||
39 | + span: 23, | ||
40 | + }, | ||
41 | + label: '实际应收金额', | ||
42 | + }, | ||
43 | + { | ||
44 | + field: 'actualPayedAmount1', | ||
45 | + component: 'Input', | ||
46 | + labelWidth: 250, | ||
47 | + colProps: { | ||
48 | + span: 23, | ||
49 | + }, | ||
50 | + label: '实际应收金额1', | ||
51 | + }, | ||
52 | + { | ||
53 | + field: 'actualPayedAmount2', | ||
54 | + component: 'Input', | ||
55 | + labelWidth: 250, | ||
56 | + colProps: { | ||
57 | + span: 23, | ||
58 | + }, | ||
59 | + label: '实际应收金额2', | ||
60 | + }, | ||
61 | + { | ||
62 | + field: 'actualPayedAmount3', | ||
63 | + component: 'Input', | ||
64 | + labelWidth: 250, | ||
65 | + colProps: { | ||
66 | + span: 23, | ||
67 | + }, | ||
68 | + label: '实际应收金额3', | ||
69 | + }, | ||
70 | + { | ||
71 | + field: 'otherAmount', | ||
72 | + component: 'Input', | ||
73 | + labelWidth: 250, | ||
74 | + colProps: { | ||
75 | + span: 23, | ||
76 | + }, | ||
77 | + label: '其他费用金额', | ||
78 | + }, | ||
79 | + ]; | ||
80 | + const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({ | ||
81 | + labelWidth: 120, | ||
82 | + schemas, | ||
83 | + layout: 'vertical', | ||
84 | + showActionButtonGroup: false, | ||
85 | + actionColOptions: { | ||
86 | + span: 24, | ||
87 | + }, | ||
88 | + }); | ||
89 | + | ||
90 | + const update = ref(); | ||
91 | + const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { | ||
92 | + // 方式1 | ||
93 | + resetFields(); | ||
94 | + setDrawerProps({ confirmLoading: false }); | ||
95 | + setFieldsValue({ | ||
96 | + ...toRaw(data.data), | ||
97 | + }); | ||
98 | + update.value = data; | ||
99 | + }); | ||
100 | + //完成编辑 | ||
101 | + async function handleSubmit() { | ||
102 | + const values = await validate(); | ||
103 | + const updatedValues = { | ||
104 | + ...values, | ||
105 | + id: update.value.data.id, | ||
106 | + bgUrl: update.value.data.bgUrl, | ||
107 | + }; | ||
108 | + await updateAmount({ | ||
109 | + ...updatedValues, | ||
110 | + }); | ||
111 | + } | ||
112 | +</script> |
src/views/project/finance/receive/InvoiceAnalysis.vue
0 → 100644
1 | +<template> | ||
2 | + <BasicModal | ||
3 | + v-bind="$attrs" | ||
4 | + @register="register" | ||
5 | + title="收款单分析" | ||
6 | + width="700px" | ||
7 | + :bodyStyle="{ height: '400px' }" | ||
8 | + @ok="handleOk" | ||
9 | + > | ||
10 | + <a-space direction="vertical"> | ||
11 | + <div style="margin: 16px 0"></div> | ||
12 | + <div class="divAll"> | ||
13 | + <div | ||
14 | + style=" | ||
15 | + margin-left: 22px; | ||
16 | + margin-right: 5px; | ||
17 | + width: 100px; | ||
18 | + text-align: center; | ||
19 | + line-height: 30px; | ||
20 | + " | ||
21 | + >生产科对账单号</div | ||
22 | + ><a-input v-model:value="Input1" placeholder="请输入" style="width: 320px" /> | ||
23 | + </div> | ||
24 | + <div class="divAll"> | ||
25 | + <div | ||
26 | + style=" | ||
27 | + margin-left: 0px; | ||
28 | + margin-right: 1px; | ||
29 | + width: 180px; | ||
30 | + text-align: center; | ||
31 | + line-height: 30px; | ||
32 | + " | ||
33 | + >生产科应付款日期</div | ||
34 | + ><a-input v-model:value="Input2" disabled /> | ||
35 | + </div> </a-space | ||
36 | + ></BasicModal> | ||
37 | +</template> | ||
38 | +<script lang="ts" setup> | ||
39 | + import { BasicModal, useModalInner } from '@/components/Modal'; | ||
40 | + import { computed, ref } from 'vue'; | ||
41 | + import { getRefundDate } from '@/api/project/invoice'; | ||
42 | + | ||
43 | + const Input1 = ref(''); | ||
44 | + const Input2 = ref(); | ||
45 | + | ||
46 | + const [register, { closeModal }] = useModalInner(async (data) => { | ||
47 | + Input2.value = getRefundDate(data.data); | ||
48 | + console.log(Input2.value, 5656); | ||
49 | + }); | ||
50 | + async function handleOk() { | ||
51 | + closeModal(); | ||
52 | + } | ||
53 | +</script> | ||
54 | +<style scoped> | ||
55 | + .divAll { | ||
56 | + display: flex; | ||
57 | + justify-content: center; | ||
58 | + align-items: center; | ||
59 | + } | ||
60 | +</style> |
src/views/project/finance/receive/InvoiceDetail.vue
0 → 100644
1 | +<template> | ||
2 | + <template> | ||
3 | + <BasicDrawer | ||
4 | + @register="register" | ||
5 | + v-bind="$attrs" | ||
6 | + title="订单信息" | ||
7 | + width="60%" | ||
8 | + :isDetail="true" | ||
9 | + :showDetailBack="false" | ||
10 | + :destroyOnClose="true" | ||
11 | + > | ||
12 | + <div class="p-4"> | ||
13 | + <BasicTable @register="registerTable"> | ||
14 | + <template #bodyCell="{ column, record }"> | ||
15 | + <template v-if="column.key === 'action'"> </template> | ||
16 | + </template> | ||
17 | + </BasicTable> | ||
18 | + </div> | ||
19 | + </BasicDrawer> | ||
20 | + </template> | ||
21 | +</template> | ||
22 | +<script lang="ts" setup> | ||
23 | + import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | ||
24 | + import { BasicForm, FormSchema, useForm } from '@/components/Form'; | ||
25 | + import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; | ||
26 | + import { demoListApi } from '/@/api/demo/table'; | ||
27 | + import { BasicColumn, useTable, BasicTable, ColumnChangeParam } from '/@/components/Table'; | ||
28 | + import { getBaseInvoice } from '/@/api/project/invoice'; | ||
29 | + | ||
30 | + const columns: BasicColumn[] = [ | ||
31 | + { | ||
32 | + title: '客户编码', | ||
33 | + dataIndex: 'customerCode', | ||
34 | + width: 50, | ||
35 | + }, | ||
36 | + { | ||
37 | + title: '项目号', | ||
38 | + dataIndex: 'projectNo', | ||
39 | + width: 60, | ||
40 | + }, | ||
41 | + { | ||
42 | + title: '内部编码', | ||
43 | + dataIndex: 'innerNo', | ||
44 | + width: 60, | ||
45 | + }, | ||
46 | + { | ||
47 | + title: '客户po号', | ||
48 | + dataIndex: 'customerPo', | ||
49 | + width: 60, | ||
50 | + }, | ||
51 | + ]; | ||
52 | + const invoiceNo = ref(); | ||
53 | + const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { | ||
54 | + // 方式1 | ||
55 | + invoiceNo.value = data.data.invoiceNo; | ||
56 | + // getBaseInvoice({ invoiceNo: invoiceNo.value }); | ||
57 | + }); | ||
58 | + const params = ref({ | ||
59 | + invoiceNo: invoiceNo.value, | ||
60 | + }); | ||
61 | + const [registerTable] = useTable({ | ||
62 | + api: () => getBaseInvoice({ invoiceNo: invoiceNo.value }), | ||
63 | + columns: columns, | ||
64 | + bordered: true, | ||
65 | + }); | ||
66 | +</script> |
src/views/project/finance/receive/TrackEdit.vue
0 → 100644
1 | +<template> | ||
2 | + <template> | ||
3 | + <BasicDrawer | ||
4 | + @register="register" | ||
5 | + v-bind="$attrs" | ||
6 | + title="收入款单" | ||
7 | + width="30%" | ||
8 | + :isDetail="true" | ||
9 | + @ok="handleSubmit" | ||
10 | + :showDetailBack="false" | ||
11 | + okText="保存" | ||
12 | + showFooter | ||
13 | + :destroyOnClose="true" | ||
14 | + > | ||
15 | + <div> | ||
16 | + <div style="font-size: 15px">客户扣款金额</div> | ||
17 | + <a-input v-model:value="input1" placeholder="请输入" auto-size /> | ||
18 | + <div style="margin: 16px 0"></div> | ||
19 | + <div>上传扣款单</div | ||
20 | + ><a-space direction="vertical" style="width: 100%" size="large"> | ||
21 | + <a-upload | ||
22 | + v-model:file-list="fileList" | ||
23 | + :beforeUpload="beforeUpload" | ||
24 | + list-type="picture" | ||
25 | + :max-count="1" | ||
26 | + :action="updateDeductUrl" | ||
27 | + @change="handleChange" | ||
28 | + > | ||
29 | + <a-button> | ||
30 | + <!-- <upload-outlined></upload-outlined> --> | ||
31 | + 上传扣款单 | ||
32 | + </a-button> | ||
33 | + </a-upload> | ||
34 | + </a-space> | ||
35 | + </div> | ||
36 | + <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | ||
37 | + <template #appendFooter> | ||
38 | + <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> | ||
39 | + </template> | ||
40 | + </BasicDrawer> | ||
41 | + </template> | ||
42 | +</template> | ||
43 | +<script lang="ts" setup> | ||
44 | + import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | ||
45 | + import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; | ||
46 | + import { getEmailList } from '/@/api/sys/config'; | ||
47 | + import { UploadOutlined } from '@ant-design/icons-vue'; | ||
48 | + import type { UploadProps } from 'ant-design-vue'; | ||
49 | + import { updateDeduct } from '@/api/project/invoice'; | ||
50 | + | ||
51 | + const fileList = ref<UploadProps['fileList']>([]); | ||
52 | + | ||
53 | + const input1 = ref(''); | ||
54 | + const deductUrl = ref(); | ||
55 | + const id = ref(); | ||
56 | + const invoiceNo = ref(); | ||
57 | + const updateDeductUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | ||
58 | + | ||
59 | + const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { | ||
60 | + console.log(data, 56561); | ||
61 | + id.value = data.data.id; | ||
62 | + invoiceNo.value = data.data.invoiceNo; | ||
63 | + input1.value = data.data.deductAmount; | ||
64 | + deductUrl.value = data.data.deductUrl; | ||
65 | + }); | ||
66 | + | ||
67 | + function handleChange(info) { | ||
68 | + if (info.file.status == 'done') { | ||
69 | + updateDeductUrl.value = info.file.response.data.deductUrl; | ||
70 | + deductUrl.value = updateDeductUrl.value; | ||
71 | + } | ||
72 | + } | ||
73 | + function beforeUpload(info) { | ||
74 | + updateDeductUrl.value += info.name; | ||
75 | + } | ||
76 | + | ||
77 | + //完成编辑 | ||
78 | + async function handleSubmit() { | ||
79 | + await updateDeduct({ | ||
80 | + id: id.value, | ||
81 | + invoiceNo: invoiceNo.value, | ||
82 | + deductAmount: input1.value, | ||
83 | + deductUrl: deductUrl.value, | ||
84 | + }); | ||
85 | + } | ||
86 | +</script> |
src/views/project/finance/receive/index.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="p-4"> | ||
3 | + <BasicTable @register="registerTable"> | ||
4 | + <template #toolbar> | ||
5 | + <a-button type="primary" @click="handleInvoiceAnalysis">收款单分析</a-button> | ||
6 | + <FinanceEdit @register="registerFinanceEdit" /> | ||
7 | + <InvoiceAnalysis @register="registerInvoiceAnalysis" /> | ||
8 | + <TrackEdit @register="registerTrackEdit" /> | ||
9 | + <InvoiceDetail @register="registerInvoiceDetail" /> | ||
10 | + </template> | ||
11 | + <template #bodyCell="{ column, record }"> | ||
12 | + <template v-if="column.key === 'action'"> | ||
13 | + <TableAction | ||
14 | + :actions="[ | ||
15 | + { | ||
16 | + label: '财务编辑', | ||
17 | + onClick: handleFinanceEdit.bind(null, record), | ||
18 | + }, | ||
19 | + { | ||
20 | + label: '跟单编辑', | ||
21 | + onClick: handleTrackEdit.bind(null, record), | ||
22 | + }, | ||
23 | + { | ||
24 | + label: '提交审核', | ||
25 | + onClick: handleCommit.bind(null, record), | ||
26 | + }, | ||
27 | + ]" | ||
28 | + :dropDownActions="[ | ||
29 | + { | ||
30 | + label: '订单信息', | ||
31 | + onClick: handleInvoiceDetail.bind(null, record), | ||
32 | + }, | ||
33 | + { | ||
34 | + label: '删除', | ||
35 | + onClick: handleDelete.bind(null, record), | ||
36 | + }, | ||
37 | + ]" | ||
38 | + /> | ||
39 | + </template> | ||
40 | + </template> | ||
41 | + </BasicTable> | ||
42 | + </div> | ||
43 | +</template> | ||
44 | +<script lang="ts" setup> | ||
45 | + import { defineComponent } from 'vue'; | ||
46 | + import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; | ||
47 | + import { searchFormSchema, columns } from './receive.data'; | ||
48 | + import FinanceEdit from './FinanceEdit.vue'; | ||
49 | + import TrackEdit from './TrackEdit.vue'; | ||
50 | + import InvoiceAnalysis from './InvoiceAnalysis.vue'; | ||
51 | + import InvoiceDetail from './InvoiceDetail.vue'; | ||
52 | + import { useDrawer } from '/@/components/Drawer'; | ||
53 | + import { getInvoice, deleteInvoice, commit } from '@/api/project/invoice'; | ||
54 | + import { useModal } from '/@/components/Modal'; | ||
55 | + import { FilePptOutlined } from '@ant-design/icons-vue'; | ||
56 | + import { icon } from 'ant-design-vue'; | ||
57 | + | ||
58 | + const [registerInvoiceAnalysis, { openModal: openInvoiceAnalysis }] = useModal(); | ||
59 | + | ||
60 | + const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); | ||
61 | + const [registerTrackEdit, { openDrawer: openTrackEdit }] = useDrawer(); | ||
62 | + const [registerInvoiceDetail, { openDrawer: openInvoiceDetail }] = useDrawer(); | ||
63 | + | ||
64 | + const [registerTable] = useTable({ | ||
65 | + title: '', | ||
66 | + api: getInvoice, | ||
67 | + columns: columns, | ||
68 | + bordered: true, | ||
69 | + rowKey: 'id', | ||
70 | + rowSelection: { | ||
71 | + type: 'checkbox', | ||
72 | + }, | ||
73 | + formConfig: { | ||
74 | + labelWidth: 120, | ||
75 | + schemas: searchFormSchema, | ||
76 | + autoSubmitOnEnter: true, | ||
77 | + }, | ||
78 | + useSearchForm: true, | ||
79 | + showTableSetting: true, | ||
80 | + showIndexColumn: false, | ||
81 | + tableSetting: { | ||
82 | + setting: false, | ||
83 | + }, | ||
84 | + actionColumn: { | ||
85 | + width: 330, | ||
86 | + title: 'Action', | ||
87 | + dataIndex: 'action', | ||
88 | + // slots: { customRender: 'action' }, | ||
89 | + }, | ||
90 | + }); | ||
91 | + function handleFinanceEdit(record) { | ||
92 | + openFinanceEdit(true, { | ||
93 | + data: record, | ||
94 | + }); | ||
95 | + } | ||
96 | + function handleTrackEdit(record) { | ||
97 | + openTrackEdit(true, { | ||
98 | + data: record, | ||
99 | + }); | ||
100 | + } | ||
101 | + function handleDelete(record) { | ||
102 | + const id: string[] = Array.isArray(record.id) ? record.id : [record.id]; | ||
103 | + deleteInvoice({ ids: id }); | ||
104 | + } | ||
105 | + function handleCommit(record) { | ||
106 | + commit({ id: record.id }); | ||
107 | + } | ||
108 | + function handleInvoiceDetail(record) { | ||
109 | + openInvoiceDetail(true, { | ||
110 | + data: record, | ||
111 | + }); | ||
112 | + } | ||
113 | + function handleInvoiceAnalysis(record) { | ||
114 | + openInvoiceAnalysis(true, { | ||
115 | + data: record, | ||
116 | + }); | ||
117 | + } | ||
118 | +</script> |
src/views/project/finance/receive/receive.data.tsx
0 → 100644
1 | +import { FormSchema } from '/@/components/Form'; | ||
2 | +import { BasicColumn } from '/@/components/Table'; | ||
3 | +import { icon } from 'ant-design-vue'; | ||
4 | +import { FilePptOutlined } from '@ant-design/icons-vue'; | ||
5 | +import { size } from 'lodash-es'; | ||
6 | +import { ref } from 'vue'; | ||
7 | + | ||
8 | +export const searchFormSchema: FormSchema[] = [ | ||
9 | + { | ||
10 | + field: 'invoice', | ||
11 | + label: 'Invoice编号', | ||
12 | + component: 'Select', | ||
13 | + colProps: { span: 8 }, | ||
14 | + }, | ||
15 | + { | ||
16 | + field: 'nickName', | ||
17 | + label: '总经理审核', | ||
18 | + component: 'Input', | ||
19 | + colProps: { span: 8 }, | ||
20 | + }, | ||
21 | +]; | ||
22 | + | ||
23 | +export const columns: BasicColumn[] = [ | ||
24 | + { | ||
25 | + title: 'Invoice编号', | ||
26 | + dataIndex: 'invoiceNo', | ||
27 | + width: 180, | ||
28 | + }, | ||
29 | + { | ||
30 | + title: '报关单', | ||
31 | + dataIndex: 'bgUrl', | ||
32 | + width: 80, | ||
33 | + customRender: (column) => { | ||
34 | + const bgUrl = column.record.bgUrl; | ||
35 | + return <FilePptOutlined style="font-size:25px" onClick={() => window.open(bgUrl)} />; | ||
36 | + }, | ||
37 | + }, | ||
38 | + { | ||
39 | + title: '必须回款日期', | ||
40 | + dataIndex: 'backRefundDate', | ||
41 | + width: 120, | ||
42 | + }, | ||
43 | + { | ||
44 | + title: '发生扣款金额', | ||
45 | + dataIndex: 'deductAmount', | ||
46 | + width: 120, | ||
47 | + }, | ||
48 | + { | ||
49 | + title: '上传扣款单', | ||
50 | + dataIndex: 'deductUrl', | ||
51 | + width: 80, | ||
52 | + customRender: (column) => { | ||
53 | + const deductUrl = column.record.deductUrl; | ||
54 | + return <FilePptOutlined style="font-size:25px" onClick={() => window.open(deductUrl)} />; | ||
55 | + }, | ||
56 | + }, | ||
57 | + { | ||
58 | + title: '实际应收金额', | ||
59 | + dataIndex: 'actualReceivableAmount', | ||
60 | + width: 120, | ||
61 | + }, | ||
62 | + { | ||
63 | + title: '实际收款金额1', | ||
64 | + dataIndex: 'actualPayedAmount1', | ||
65 | + width: 120, | ||
66 | + }, | ||
67 | + { | ||
68 | + title: '实际收款金额2', | ||
69 | + dataIndex: 'actualPayedAmount2', | ||
70 | + width: 120, | ||
71 | + }, | ||
72 | + { | ||
73 | + title: '实际收款金额3', | ||
74 | + dataIndex: 'actualPayedAmount3', | ||
75 | + width: 120, | ||
76 | + }, | ||
77 | + { | ||
78 | + title: '其他费用', | ||
79 | + dataIndex: 'otherAmount', | ||
80 | + width: 120, | ||
81 | + }, | ||
82 | + { | ||
83 | + title: '总经理审核', | ||
84 | + dataIndex: 'status', | ||
85 | + width: 120, | ||
86 | + customRender: (column) => { | ||
87 | + if (column.record.status == -1) { | ||
88 | + return '未提交审核'; | ||
89 | + } else if (column.record.status == 0) { | ||
90 | + return '待审核'; | ||
91 | + } else if (column.record.status == 1) { | ||
92 | + return '审核通过'; | ||
93 | + } else if (column.record.status == 2) { | ||
94 | + return '审核驳回'; | ||
95 | + } | ||
96 | + }, | ||
97 | + }, | ||
98 | +]; |
src/views/project/order/FormDetail/index.vue
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | @ok="handleSubmit" | 6 | @ok="handleSubmit" |
7 | title="" | 7 | title="" |
8 | :destroyOnClose="true" | 8 | :destroyOnClose="true" |
9 | - width="28%" | 9 | + width="32%" |
10 | ref="formRef" | 10 | ref="formRef" |
11 | :isDetail="true" | 11 | :isDetail="true" |
12 | :showDetailBack="false" | 12 | :showDetailBack="false" |
@@ -158,6 +158,9 @@ | @@ -158,6 +158,9 @@ | ||
158 | const checkingMsg = ref(''); | 158 | const checkingMsg = ref(''); |
159 | //ppconfirm | 159 | //ppconfirm |
160 | const ppUpdate = ref(''); | 160 | const ppUpdate = ref(''); |
161 | + const shipUpdate = ref(''); | ||
162 | + const altexUpdate = ref(''); | ||
163 | + const sgsUpdate = ref(''); | ||
161 | 164 | ||
162 | //修改之前的包装费用 | 165 | //修改之前的包装费用 |
163 | const originPackagePrice = ref(-1.0); | 166 | const originPackagePrice = ref(-1.0); |
@@ -322,6 +325,9 @@ | @@ -322,6 +325,9 @@ | ||
322 | ...toRaw(data.trackStageInfo), | 325 | ...toRaw(data.trackStageInfo), |
323 | }); | 326 | }); |
324 | ppUpdate.value = data.trackStageInfo.ppConfirmResult; | 327 | ppUpdate.value = data.trackStageInfo.ppConfirmResult; |
328 | + shipUpdate.value = data.trackStageInfo.shippmentSampleConfirmTime; | ||
329 | + altexUpdate.value = data.trackStageInfo.aitexTestFinishTime; | ||
330 | + sgsUpdate.value = data.trackStageInfo.sgsTestFinishTime; | ||
325 | } | 331 | } |
326 | 332 | ||
327 | if (inspectionFormPanelRef.value) { | 333 | if (inspectionFormPanelRef.value) { |
@@ -403,9 +409,18 @@ | @@ -403,9 +409,18 @@ | ||
403 | } | 409 | } |
404 | //跟单信息标记 | 410 | //跟单信息标记 |
405 | if (forms.trackStageInfo.ppConfirmResult !== ppUpdate.value) { | 411 | if (forms.trackStageInfo.ppConfirmResult !== ppUpdate.value) { |
406 | - const today = new Date(); | ||
407 | - forms.trackStageInfo.ppUpdateTime = getFormattedDate(today); | 412 | + forms.trackStageInfo.ppConfirmTime = getFormattedDate(); |
408 | } | 413 | } |
414 | + if (forms.trackStageInfo.shippmentSampleConfirmResult !== shipUpdate.value) { | ||
415 | + forms.trackStageInfo.shippmentSampleConfirmTime = getFormattedDate(); | ||
416 | + } | ||
417 | + if (forms.trackStageInfo.aitexTestFinishResult !== altexUpdate.value) { | ||
418 | + forms.trackStageInfo.aitexTestFinishTime = getFormattedDate(); | ||
419 | + } | ||
420 | + if (forms.trackStageInfo.sgsTestFinishResult !== sgsUpdate.value) { | ||
421 | + forms.trackStageInfo.sgsTestFinishTime = getFormattedDate(); | ||
422 | + } | ||
423 | + // console.log(forms.trackStageInfo, 5656); | ||
409 | await orderUpdate(forms); | 424 | await orderUpdate(forms); |
410 | closeDrawer(); | 425 | closeDrawer(); |
411 | emit('success', {}); | 426 | emit('success', {}); |
@@ -431,11 +446,18 @@ | @@ -431,11 +446,18 @@ | ||
431 | console.log(error); | 446 | console.log(error); |
432 | } | 447 | } |
433 | }; | 448 | }; |
434 | - const getFormattedDate = (date: Date): string => { | 449 | + const getFormattedDate = (): string => { |
450 | + const date = new Date(); | ||
451 | + | ||
435 | const year = date.getFullYear(); | 452 | const year = date.getFullYear(); |
436 | - const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 | 453 | + const month = String(date.getMonth() + 1).padStart(2, '0'); |
437 | const day = String(date.getDate()).padStart(2, '0'); | 454 | const day = String(date.getDate()).padStart(2, '0'); |
438 | - return `${year}/${month}/${day}`; | 455 | + |
456 | + const hours = String(date.getHours()).padStart(2, '0'); | ||
457 | + const minutes = String(date.getMinutes()).padStart(2, '0'); | ||
458 | + const seconds = String(date.getSeconds()).padStart(2, '0'); | ||
459 | + | ||
460 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | ||
439 | }; | 461 | }; |
440 | return { | 462 | return { |
441 | id, | 463 | id, |
@@ -459,6 +481,9 @@ | @@ -459,6 +481,9 @@ | ||
459 | checkingMsg, | 481 | checkingMsg, |
460 | orderCount, | 482 | orderCount, |
461 | ppUpdate, | 483 | ppUpdate, |
484 | + shipUpdate, | ||
485 | + altexUpdate, | ||
486 | + sgsUpdate, | ||
462 | getFormattedDate, | 487 | getFormattedDate, |
463 | }; | 488 | }; |
464 | }, | 489 | }, |
src/views/project/order/InvoiceCreate.vue
0 → 100644
1 | +<template> | ||
2 | + <BasicModal | ||
3 | + v-bind="$attrs" | ||
4 | + @register="register" | ||
5 | + title="Invoice创建" | ||
6 | + width="500px" | ||
7 | + :bodyStyle="{ height: '300px' }" | ||
8 | + @ok="handleOk" | ||
9 | + > | ||
10 | + <div> | ||
11 | + <div style="font-size: 15px">Invoice编号</div> | ||
12 | + <a-textarea v-model:value="Input1" placeholder="请输入" auto-size /> | ||
13 | + <div style="margin: 16px 0"></div> | ||
14 | + <div>报关单(请上传PDF格式)</div | ||
15 | + ><a-space direction="vertical" style="width: 100%" size="large"> | ||
16 | + <a-upload | ||
17 | + v-model:file-list="fileList" | ||
18 | + :beforeUpload="beforeUpload" | ||
19 | + list-type="picture" | ||
20 | + :max-count="1" | ||
21 | + :action="uploadUrl" | ||
22 | + @change="handleChange" | ||
23 | + > | ||
24 | + <a-button> 上传报关单 </a-button> | ||
25 | + </a-upload> | ||
26 | + </a-space> | ||
27 | + <div style="font-size: 15px">最后汇款日期</div> | ||
28 | + <a-textarea v-model:value="Input2" auto-size disabled /></div | ||
29 | + ></BasicModal> | ||
30 | +</template> | ||
31 | +<script lang="ts" setup> | ||
32 | + import { BasicModal, useModalInner } from '@/components/Modal'; | ||
33 | + import { computed, ref } from 'vue'; | ||
34 | + import type { UploadProps } from 'ant-design-vue'; | ||
35 | + import { getRefundDate, getInvoice } from '@/api/project/invoice'; | ||
36 | + | ||
37 | + const fileList = ref<UploadProps['fileList']>([]); | ||
38 | + | ||
39 | + const Input1 = ref(''); | ||
40 | + const Input2 = ref(); | ||
41 | + const uploadUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | ||
42 | + const bgUrl = ref(); | ||
43 | + const orderIds = ref(); | ||
44 | + | ||
45 | + const [register, { closeModal }] = useModalInner(async (data) => { | ||
46 | + const res = getRefundDate(data.data); | ||
47 | + Input2.value = res.data; | ||
48 | + orderIds.value = data.data; | ||
49 | + }); | ||
50 | + // const title = ref(''); | ||
51 | + async function handleOk() { | ||
52 | + await getInvoice({ | ||
53 | + invoiceNo: Input1.value, | ||
54 | + bgUrl: bgUrl.value, | ||
55 | + backRefundDate: Input2.value, | ||
56 | + orderIds: orderIds.value, | ||
57 | + }); | ||
58 | + closeModal(); | ||
59 | + } | ||
60 | + function handleChange(info) { | ||
61 | + if (info.file.status == 'done') { | ||
62 | + bgUrl.value = info.file.response.data; | ||
63 | + } | ||
64 | + } | ||
65 | + function beforeUpload(info) { | ||
66 | + uploadUrl.value += info.name; | ||
67 | + } | ||
68 | +</script> |
src/views/project/order/PassCalculate.vue
@@ -23,6 +23,19 @@ | @@ -23,6 +23,19 @@ | ||
23 | const res = 1234; | 23 | const res = 1234; |
24 | return res; | 24 | return res; |
25 | }); | 25 | }); |
26 | + // onMounted(async () => { | ||
27 | + // // 获取包装费用和客户编码的关联关系 | ||
28 | + // const res = await getConfigList({ | ||
29 | + // page: 1, | ||
30 | + // pageSize: 1000, | ||
31 | + // // relationCode: 'packetPrice', | ||
32 | + // }); | ||
33 | + | ||
34 | + // configList.value = res?.items || []; | ||
35 | + | ||
36 | + // // 获取业务员 | ||
37 | + // const res1 = await getUserList({ page: 1, pageSize: 1000 }); | ||
38 | + // businessUsers.value = res1.items | ||
26 | 39 | ||
27 | async function handleOk() { | 40 | async function handleOk() { |
28 | closeModal(); | 41 | closeModal(); |
src/views/project/order/ProductInvoice.vue
0 → 100644
1 | +<template> | ||
2 | + <BasicModal | ||
3 | + v-bind="$attrs" | ||
4 | + @register="register" | ||
5 | + title="生产对账单" | ||
6 | + width="500px" | ||
7 | + :bodyStyle="{ height: '140px' }" | ||
8 | + @ok="handleOk" | ||
9 | + > | ||
10 | + <a-space direction="vertical"> | ||
11 | + <div style="margin: 16px 0"></div> | ||
12 | + <div class="divAll"> | ||
13 | + <div | ||
14 | + style=" | ||
15 | + margin-left: 22px; | ||
16 | + margin-right: 5px; | ||
17 | + width: 100px; | ||
18 | + text-align: center; | ||
19 | + line-height: 30px; | ||
20 | + " | ||
21 | + >生产科对账单号</div | ||
22 | + ><a-input v-model:value="Input1" placeholder="请输入" style="width: 320px" /> | ||
23 | + </div> | ||
24 | + <div class="divAll"> | ||
25 | + <div | ||
26 | + style=" | ||
27 | + margin-left: 0px; | ||
28 | + margin-right: 1px; | ||
29 | + width: 180px; | ||
30 | + text-align: center; | ||
31 | + line-height: 30px; | ||
32 | + " | ||
33 | + >生产科应付款日期</div | ||
34 | + ><a-input v-model:value="Input2" disabled /> | ||
35 | + </div> </a-space | ||
36 | + ></BasicModal> | ||
37 | +</template> | ||
38 | +<script lang="ts" setup> | ||
39 | + import { BasicModal, useModalInner } from '@/components/Modal'; | ||
40 | + import { computed, ref } from 'vue'; | ||
41 | + import { getRefundDate } from '@/api/project/invoice'; | ||
42 | + | ||
43 | + const Input1 = ref(''); | ||
44 | + const Input2 = ref(); | ||
45 | + | ||
46 | + const [register, { closeModal }] = useModalInner(async (data) => { | ||
47 | + Input2.value = getRefundDate(data.data); | ||
48 | + console.log(Input2.value, 5656); | ||
49 | + }); | ||
50 | + async function handleOk() { | ||
51 | + closeModal(); | ||
52 | + } | ||
53 | +</script> | ||
54 | +<style scoped> | ||
55 | + .divAll { | ||
56 | + display: flex; | ||
57 | + justify-content: center; | ||
58 | + align-items: center; | ||
59 | + } | ||
60 | +</style> |
src/views/project/order/TrackHistory.vue
1 | <template> | 1 | <template> |
2 | - <BasicDrawer v-bind="$attrs" title="Drawer Title" width="35%"> Drawer Info. </BasicDrawer> | 2 | + <template> |
3 | + <BasicDrawer | ||
4 | + @register="register" | ||
5 | + v-bind="$attrs" | ||
6 | + title="操作记录" | ||
7 | + width="40%" | ||
8 | + :isDetail="true" | ||
9 | + :showDetailBack="false" | ||
10 | + okText="保存" | ||
11 | + :destroyOnClose="true" | ||
12 | + > | ||
13 | + <a-list :pagination="pagination1" className="w-full"> | ||
14 | + <template v-for="item in list1" :key="item.id"> | ||
15 | + <a-list-item class="list"> | ||
16 | + <a-list-item-meta> | ||
17 | + <template #avatar> </template> | ||
18 | + <template #title> | ||
19 | + <div>TRACKER</div> | ||
20 | + <span>{{ item.opinionType }}</span> | ||
21 | + </template> | ||
22 | + <template #description> | ||
23 | + <div class="description"> | ||
24 | + {{ item.modifyTime }} | ||
25 | + </div> | ||
26 | + <div class="info"> | ||
27 | + <!-- <div><span>操作时间:</span>{{ formatToDateTime(item.createTime) }}</div> --> | ||
28 | + </div> | ||
29 | + </template> | ||
30 | + </a-list-item-meta> | ||
31 | + </a-list-item> | ||
32 | + </template> | ||
33 | + </a-list> | ||
34 | + | ||
35 | + <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | ||
36 | + <template #appendFooter> | ||
37 | + <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> | ||
38 | + </template> | ||
39 | + </BasicDrawer> | ||
40 | + </template> | ||
3 | </template> | 41 | </template> |
4 | <script lang="ts" setup> | 42 | <script lang="ts" setup> |
5 | - import { BasicDrawer } from '@/components/Drawer'; | 43 | + import { defineComponent, ref, computed } from 'vue'; |
44 | + import { Tabs, Progress, Row, Col, List } from 'ant-design-vue'; | ||
45 | + import { FormSchema, useForm } from '/@/components/Form/index'; | ||
46 | + | ||
47 | + import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | ||
48 | + import { trackHistory, getOrderOptLog } from '/@/api/project/order'; | ||
49 | + import { formatToDateTime } from '/@/utils/dateUtil'; | ||
50 | + | ||
51 | + const list1 = ref([]); | ||
52 | + const total1 = ref(0); | ||
53 | + const page1 = ref(1); | ||
54 | + const orderId = ref(''); | ||
55 | + // const activeKey = ref(1); | ||
56 | + | ||
57 | + const getOrderOptLogFunc = async (data, page) => { | ||
58 | + console.log('%c [ data ]-135', 'font-size:13px; background:pink; color:#bf2c9f;', data); | ||
59 | + const res = await trackHistory({ orderId: data, page: page, pageSize: 20 }); | ||
60 | + list1.value = res; | ||
61 | + // total1.value = res.total; | ||
62 | + // page1.value = page; | ||
63 | + }; | ||
64 | + const [register] = useDrawerInner((data) => { | ||
65 | + console.log(data, 5656); | ||
66 | + orderId.value = data.id; | ||
67 | + // const res = await trackHistory({ orderId: data, page: page, pageSize: 20 }); | ||
68 | + getOrderOptLogFunc(orderId.value, 1); | ||
69 | + }); | ||
70 | + | ||
71 | + const pagination1 = computed(() => { | ||
72 | + return { | ||
73 | + show: true, | ||
74 | + pageSize: 20, | ||
75 | + page: page1.value, | ||
76 | + total: total1.value, | ||
77 | + onChange(cur) { | ||
78 | + console.log(cur); | ||
79 | + getOrderOptLogFunc(orderId.value, 1, cur); | ||
80 | + }, | ||
81 | + }; | ||
82 | + }); | ||
6 | </script> | 83 | </script> |
src/views/project/order/index.vue
@@ -101,6 +101,18 @@ | @@ -101,6 +101,18 @@ | ||
101 | </template> | 101 | </template> |
102 | 102 | ||
103 | <template #toolbar> | 103 | <template #toolbar> |
104 | + <a-button | ||
105 | + type="primary" | ||
106 | + @click="handleProductInvoiceModal" | ||
107 | + v-if="role === ROLE.ADMIN || role === ROLE.BUSINESS || role === ROLE.TRACKER" | ||
108 | + >生产对账单创建</a-button | ||
109 | + > | ||
110 | + <a-button | ||
111 | + type="primary" | ||
112 | + @click="handleInvoiceCreateModal" | ||
113 | + v-if="role === ROLE.ADMIN || role === ROLE.BUSINESS || role === ROLE.TRACKER" | ||
114 | + >Invoice创建</a-button | ||
115 | + > | ||
104 | <a-select | 116 | <a-select |
105 | ref="select" | 117 | ref="select" |
106 | v-model:value="value1" | 118 | v-model:value="value1" |
@@ -155,6 +167,8 @@ | @@ -155,6 +167,8 @@ | ||
155 | :role="role" | 167 | :role="role" |
156 | :customerCodes="selectedCustomCodes" | 168 | :customerCodes="selectedCustomCodes" |
157 | /> | 169 | /> |
170 | + <InvoiceCreate @register="invoiceCreateModalRegister" /> | ||
171 | + <ProductInvoice @register="productInvoiceModalRegister" /> | ||
158 | <ProfitAnalysis @register="profitModalRegister" /> | 172 | <ProfitAnalysis @register="profitModalRegister" /> |
159 | <RateModal @register="rateModalRegister" /> | 173 | <RateModal @register="rateModalRegister" /> |
160 | <ExportModal @register="exportModalRegister" :role="role" :ids="checkedKeys" /> | 174 | <ExportModal @register="exportModalRegister" :role="role" :ids="checkedKeys" /> |
@@ -178,6 +192,8 @@ | @@ -178,6 +192,8 @@ | ||
178 | import RateModal from './RateModal.vue'; | 192 | import RateModal from './RateModal.vue'; |
179 | import ExportModal from './ExportModal.vue'; | 193 | import ExportModal from './ExportModal.vue'; |
180 | import PassCalculate from './PassCalculate.vue'; | 194 | import PassCalculate from './PassCalculate.vue'; |
195 | + import InvoiceCreate from './InvoiceCreate.vue'; | ||
196 | + import ProductInvoice from './ProductInvoice.vue'; | ||
181 | import { useModal } from '/@/components/Modal'; | 197 | import { useModal } from '/@/components/Modal'; |
182 | 198 | ||
183 | import { getFormConfig, getOrderColumns, SELECT_FIELD_COLUMNS } from './tableData'; | 199 | import { getFormConfig, getOrderColumns, SELECT_FIELD_COLUMNS } from './tableData'; |
@@ -212,12 +228,16 @@ | @@ -212,12 +228,16 @@ | ||
212 | TrackHistory, | 228 | TrackHistory, |
213 | FieldDetail, | 229 | FieldDetail, |
214 | RateModal, | 230 | RateModal, |
231 | + InvoiceCreate, | ||
232 | + ProductInvoice, | ||
215 | ExportModal, | 233 | ExportModal, |
216 | }, | 234 | }, |
217 | setup() { | 235 | setup() { |
218 | const checkedKeys = ref<Array<string | number>>([]); | 236 | const checkedKeys = ref<Array<string | number>>([]); |
219 | const selectedCustomCodes = ref<Array<string>>([]); | 237 | const selectedCustomCodes = ref<Array<string>>([]); |
220 | const [profitModalRegister, { openModal: openProfitModal }] = useModal(); | 238 | const [profitModalRegister, { openModal: openProfitModal }] = useModal(); |
239 | + const [invoiceCreateModalRegister, { openModal: openInvoiceCreateModal }] = useModal(); | ||
240 | + const [productInvoiceModalRegister, { openModal: openProductInvoiceModal }] = useModal(); | ||
221 | const [rateModalRegister, { openModal: openRateModal }] = useModal(); | 241 | const [rateModalRegister, { openModal: openRateModal }] = useModal(); |
222 | const [exportModalRegister, { openModal: openExportModal }] = useModal(); | 242 | const [exportModalRegister, { openModal: openExportModal }] = useModal(); |
223 | const [productModalRegister, { openModal: openProductModal }] = useModal(); | 243 | const [productModalRegister, { openModal: openProductModal }] = useModal(); |
@@ -357,6 +377,24 @@ | @@ -357,6 +377,24 @@ | ||
357 | }); | 377 | }); |
358 | } | 378 | } |
359 | 379 | ||
380 | + function handleInvoiceCreateModal() { | ||
381 | + const form = getForm(); | ||
382 | + const values = form.getFieldsValue(); | ||
383 | + openInvoiceCreateModal(true, { | ||
384 | + data: checkedKeys.value, | ||
385 | + searchData: values, | ||
386 | + }); | ||
387 | + } | ||
388 | + | ||
389 | + function handleProductInvoiceModal() { | ||
390 | + const form = getForm(); | ||
391 | + const values = form.getFieldsValue(); | ||
392 | + openProductInvoiceModal(true, { | ||
393 | + data: checkedKeys.value, | ||
394 | + searchData: values, | ||
395 | + }); | ||
396 | + } | ||
397 | + | ||
360 | //一次通过率 | 398 | //一次通过率 |
361 | const value1 = ref('一次通过率'); | 399 | const value1 = ref('一次通过率'); |
362 | function handleChange() {} | 400 | function handleChange() {} |
@@ -371,10 +409,18 @@ | @@ -371,10 +409,18 @@ | ||
371 | }); | 409 | }); |
372 | return false; | 410 | return false; |
373 | } else if (title == '生产样品') { | 411 | } else if (title == '生产样品') { |
374 | - openPassModal(true, title); | 412 | + openPassModal(true, { |
413 | + check: checkedKeys.value, | ||
414 | + data: values, | ||
415 | + title: title, | ||
416 | + }); | ||
375 | return false; | 417 | return false; |
376 | } else if (title == '测试样品') { | 418 | } else if (title == '测试样品') { |
377 | - openPassModal(true, title); | 419 | + openPassModal(true, { |
420 | + check: checkedKeys.value, | ||
421 | + data: values, | ||
422 | + title: title, | ||
423 | + }); | ||
378 | return false; | 424 | return false; |
379 | } | 425 | } |
380 | } | 426 | } |
@@ -444,6 +490,8 @@ | @@ -444,6 +490,8 @@ | ||
444 | SELECT_FIELD_COLUMNS, | 490 | SELECT_FIELD_COLUMNS, |
445 | fieldDetailRegister, | 491 | fieldDetailRegister, |
446 | profitModalRegister, | 492 | profitModalRegister, |
493 | + invoiceCreateModalRegister, | ||
494 | + productInvoiceModalRegister, | ||
447 | handleChange, | 495 | handleChange, |
448 | rateModalRegister, | 496 | rateModalRegister, |
449 | exportModalRegister, | 497 | exportModalRegister, |
@@ -453,6 +501,8 @@ | @@ -453,6 +501,8 @@ | ||
453 | trackHistoryRegister, | 501 | trackHistoryRegister, |
454 | formDetailRegister, | 502 | formDetailRegister, |
455 | handleProfitModal, | 503 | handleProfitModal, |
504 | + handleInvoiceCreateModal, | ||
505 | + handleProductInvoiceModal, | ||
456 | registerTable, | 506 | registerTable, |
457 | getFormValues, | 507 | getFormValues, |
458 | checkedKeys, | 508 | checkedKeys, |
src/views/project/order/tableData.tsx
@@ -1373,7 +1373,6 @@ export const FIELDS_INSPECTION_INFO = [ | @@ -1373,7 +1373,6 @@ export const FIELDS_INSPECTION_INFO = [ | ||
1373 | 1373 | ||
1374 | export function getFormConfig(businessUsers: any[]): Partial<FormProps> { | 1374 | export function getFormConfig(businessUsers: any[]): Partial<FormProps> { |
1375 | const orderStore = useOrderStoreWithOut(); | 1375 | const orderStore = useOrderStoreWithOut(); |
1376 | - | ||
1377 | const { | 1376 | const { |
1378 | customerCode, | 1377 | customerCode, |
1379 | projectNo, | 1378 | projectNo, |