Commit ab2242a1aecf989e6a13ffc45a0df69a6ddf0fa5

Authored by boyang
1 parent d4ba96aa

修改应付应收小数点

src/api/project/invoice.ts
... ... @@ -52,11 +52,24 @@ export const getInvoice = async (params: any) => {
52 52 url: Api.INVOICE,
53 53 params,
54 54 });
  55 + const formattedRecords = res.records.map((record: any) => {
  56 + return {
  57 + ...record,
  58 + actualPayedAmount1: record.actualPayedAmount1?.toFixed(2),
  59 + actualPayedAmount2: record.actualPayedAmount2?.toFixed(2),
  60 + actualPayedAmount3: record.actualPayedAmount3?.toFixed(2),
  61 + actualReceivableAmount: record.actualReceivableAmount?.toFixed(2),
  62 + deductAmount: record.deductAmount?.toFixed(2),
  63 + otherAmount: record.otherAmount?.toFixed(2),
  64 + totalCustomerAmount: record.totalCustomerAmount?.toFixed(2),
  65 + totalPayAmount: record.totalPayAmount?.toFixed(2),
  66 + };
  67 + });
55 68 const orderStore = useOrderStoreWithOut();
56 69 orderStore.setTotal(res.total);
57 70 return new Promise((resolve) => {
58 71 resolve({
59   - items: res.records,
  72 + items: formattedRecords,
60 73 total: res.total,
61 74 });
62 75 });
... ... @@ -148,12 +161,25 @@ export const getCheck = async (params: any) => {
148 161 url: Api.CHECK_BILL,
149 162 params,
150 163 });
  164 + const formattedRecords = res.records.map((record: any) => {
  165 + return {
  166 + ...record,
  167 + actualPayedAmount1: record.actualPayedAmount1?.toFixed(2),
  168 + actualPayedAmount2: record.actualPayedAmount2?.toFixed(2),
  169 + actualPayedAmount3: record.actualPayedAmount3?.toFixed(2),
  170 + actualPayedAmount: record.actualPayedAmount?.toFixed(2),
  171 + deductAmount: record.deductAmount?.toFixed(2),
  172 + unPayedAmount: record.unPayedAmount?.toFixed(2),
  173 + totalActualPayedAmount: record.totalActualPayedAmount?.toFixed(2),
  174 + totalProductionAmount: record.totalProductionAmount?.toFixed(2),
  175 + };
  176 + });
151 177 const orderStore = useOrderStoreWithOut();
152 178 orderStore.setTotal(res.total);
153 179 // return res.records;
154 180 return new Promise((resolve) => {
155 181 resolve({
156   - items: res.records,
  182 + items: formattedRecords,
157 183 total: res.total,
158 184 });
159 185 });
... ...
src/views/project/approve/PayPanel.vue
... ... @@ -323,14 +323,14 @@
323 323 itemArray.value = [];
324 324 mockData.value = data.fieldInfos.checkBillOrderDO;
325 325 console.log(mockData, '5656mockdata');
326   - actualPayCalculate.value = mockData.value.actualPayCalculate; // 实际付款金额计算
  326 + actualPayCalculate.value = mockData.value.actualPayCalculate?.toFixed(2); // 实际付款金额计算
327 327 checkNo.value = mockData.value.checkNo; // 对账单号
328   - actualPayedAmount.value = mockData.value.actualPayedAmount; // 实际应付金额
  328 + actualPayedAmount.value = mockData.value.actualPayedAmount?.toFixed(2); // 实际应付金额
329 329 payedDate.value = mockData.value.payedDate; // 付款日期
330 330 actualPayedDate.value = mockData.value.actualPayedDate; // 实际付款日期
331   - unPayedAmount.value = mockData.value.unPayedAmount; // 未付金额
332   - totalActualPayedAmount.value = mockData.value.totalActualPayedAmount; // 实际付款金额汇总
333   - deductAmount.value = mockData.value.deductAmount; // 扣款金额
  331 + unPayedAmount.value = mockData.value.unPayedAmount?.toFixed(2); // 未付金额
  332 + totalActualPayedAmount.value = mockData.value.totalActualPayedAmount?.toFixed(2); // 实际付款金额汇总
  333 + deductAmount.value = mockData.value.deductAmount?.toFixed(2); // 扣款金额
334 334 const match = mockData.value.invoiceUrl.match(/aliyuncs\.com\/(.*?)\?/);
335 335 if (match && match[1]) {
336 336 // 对提取的部分进行解码
... ...
src/views/project/approve/ReceivePanel.vue
... ... @@ -293,12 +293,12 @@
293 293 openModal(true, { data });
294 294 mockData.value = data.fieldInfos.invoiceBillOrderDO;
295 295 id.value = data.id;
296   - totalPayAmount.value = mockData.value.totalPayAmount;
297   - totalCustomerAmount.value = mockData.value.totalCustomerAmount;
298   - deductAmount.value = mockData.value.deductAmount;
  296 + totalPayAmount.value = mockData.value.totalPayAmount?.toFixed(2);
  297 + totalCustomerAmount.value = mockData.value.totalCustomerAmount?.toFixed(2);
  298 + deductAmount.value = mockData.value.deductAmount?.toFixed(2);
299 299 backRefundDate.value = mockData.value.backRefundDate;
300 300 actualRefundDate.value = mockData.value.actualRefundDate;
301   - otherAmount.value = mockData.value.otherAmount;
  301 + otherAmount.value = mockData.value.otherAmount?.toFixed(2);
302 302 invoiceNo.value = mockData.value.invoiceNo;
303 303 payee.value = mockData.value.payee;
304 304 }
... ...
src/views/project/finance/pay/CheckDetail.vue
... ... @@ -80,7 +80,7 @@
80 80 dataIndex: 'productionDepartmentPrice',
81 81 customRender: (column) => {
82 82 const { record } = column || {};
83   - return record?.profitAnalysisInfo?.productionDepartmentPrice;
  83 + return record?.profitAnalysisInfo?.productionDepartmentPrice?.toFixed(2);
84 84 // ? `¥ ${record?.profitAnalysisInfo?.productionDepartmentPrice}`
85 85 // : '';
86 86 },
... ... @@ -91,7 +91,7 @@
91 91 dataIndex: 'productionDepartmentTotalPrice',
92 92 customRender: (column) => {
93 93 const { record } = column || {};
94   - return record?.profitAnalysisInfo?.productionDepartmentTotalPrice;
  94 + return record?.profitAnalysisInfo?.productionDepartmentTotalPrice?.toFixed(2);
95 95 // ? `¥ ${record?.profitAnalysisInfo?.productionDepartmentTotalPrice}`
96 96 // : '';
97 97 },
... ...
src/views/project/finance/pay/CheckSum.vue
... ... @@ -41,26 +41,46 @@
41 41 title: '生产科总价汇总¥',
42 42 dataIndex: 'productionDepartmentTotalPrice',
43 43 width: 150,
  44 + customRender: (res) => {
  45 + // console.log(res, 56562);
  46 + return res.record.exportVOS[0].productionDepartmentTotalPrice.toFixed(2);
  47 + },
44 48 },
45 49 {
46 50 title: '生产科扣款金额汇总¥',
47 51 dataIndex: 'deductAmount',
48 52 width: 160,
  53 + customRender: (res) => {
  54 + // console.log(res, 56562);
  55 + return res.record.exportVOS[0].deductAmount.toFixed(2);
  56 + },
49 57 },
50 58 {
51 59 title: '生产科实际应付金额¥',
52 60 dataIndex: 'calculateActualPayedAmount',
53 61 width: 160,
  62 + customRender: (res) => {
  63 + // console.log(res, 56562);
  64 + return res.record.exportVOS[0].calculateActualPayedAmount.toFixed(2);
  65 + },
54 66 },
55 67 {
56 68 title: '实际付款金额汇总¥',
57 69 dataIndex: 'actualPayedAmount',
58 70 width: 160,
  71 + customRender: (res) => {
  72 + // console.log(res, 56562);
  73 + return res.record.exportVOS[0].actualPayedAmount.toFixed(2);
  74 + },
59 75 },
60 76 {
61 77 title: '未付金额¥',
62 78 dataIndex: 'unPayedAmount',
63 79 width: 150,
  80 + customRender: (res) => {
  81 + // console.log(res, 56562);
  82 + return res.record.exportVOS[0].unPayedAmount.toFixed(2);
  83 + },
64 84 },
65 85 ];
66 86 // const ids = ref<number[]>([]);
... ...
src/views/project/finance/pay/Commit.vue
... ... @@ -14,11 +14,11 @@
14 14 <script lang="ts" setup>
15 15 import { BasicModal, useModalInner } from '@/components/Modal';
16 16 import { ref } from 'vue';
17   - import type { Dayjs } from 'dayjs';
18 17 import { checkCommit } from '@/api/project/invoice';
19 18  
20 19 const id = ref();
21 20 const date = ref();
  21 + const emit = defineEmits(['success']);
22 22  
23 23 const [register, { closeModal }] = useModalInner(async (data) => {
24 24 id.value = data.data.id;
... ... @@ -40,6 +40,7 @@
40 40 const formattedDate = formatDate(date.value);
41 41  
42 42 checkCommit({ id: id.value, actualPayedDate: formattedDate });
  43 + emit('success');
43 44 closeModal();
44 45 }
45 46 </script>
... ...
src/views/project/finance/pay/DeductShow.vue
... ... @@ -74,17 +74,6 @@
74 74 const baseUrl = url.split('?')[0];
75 75 return imageExtensions.some((ext) => baseUrl.toLowerCase().endsWith(ext));
76 76 }
77   - // function openPic(url) {
78   - // window.open('', '', '').document.write(`<!DOCTYPE html>
79   - // <html>
80   - // <body
81   - // style="display: flex;
82   - // justify-content: center;
83   - // align-items: center;">
84   - // <img src='${url}' width="500px" height="500px"/>
85   - // </body>
86   - // </html>`);
87   - // }
88 77 // 检查 URL 是否为 PDF 格式
89 78 function isPdfUrl(url: string): boolean {
90 79 return url.toLowerCase().endsWith('.pdf');
... ...
src/views/project/finance/pay/FinanceEdit.vue
... ... @@ -12,9 +12,18 @@
12 12 showFooter
13 13 :destroyOnClose="true"
14 14 >
15   - <div>
  15 + <!-- <div>
16 16 <BasicForm @register="registerForm" />
17   - </div>
  17 + </div> -->
  18 + <div style="font-size: 15px">实际应收金额1$</div>
  19 + <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size />
  20 + <div style="margin: 16px 0"></div>
  21 + <div style="font-size: 15px">实际应收金额2$</div>
  22 + <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size />
  23 + <div style="margin: 16px 0"></div>
  24 + <div style="font-size: 15px">实际应收金额3$</div>
  25 + <a-input v-model:value="input3" placeholder="请输入" :disabled="status === 10" auto-size />
  26 + <div style="margin: 16px 0"></div>
18 27  
19 28 <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> -->
20 29 <template #appendFooter>
... ... @@ -29,6 +38,7 @@
29 38 import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue';
30 39 import { getEmailList } from '/@/api/sys/config';
31 40 import { updateAmountInfo } from '@/api/project/invoice';
  41 + import { useMessage } from '/@/hooks/web/useMessage';
32 42  
33 43 const emit = defineEmits(['success']);
34 44 const schemas: FormSchema[] = [
... ... @@ -87,14 +97,33 @@
87 97 span: 24,
88 98 },
89 99 });
90   -
  100 + const { createMessage } = useMessage();
  101 + const { error } = createMessage;
91 102 const update = ref();
92 103 const status = ref();
  104 + const input1 = ref();
  105 + const input2 = ref();
  106 + const input3 = ref();
  107 + const id = ref();
93 108 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
94 109 // 方式1
95 110 resetFields();
96 111 status.value = data.data.status;
  112 + id.value = data.data.id;
  113 + input1.value = data.data.actualPayedAmount1;
  114 + input2.value = data.data.actualPayedAmount2;
  115 + input3.value = data.data.actualPayedAmount3;
97 116 setDrawerProps({ confirmLoading: false });
  117 + // 将金额格式化为两位小数
  118 + // setFieldsValue({
  119 + // actualPayedAmount1:
  120 + // data.data.actualPayedAmount1 !== null ? data.data.actualPayedAmount1.toFixed(2) : undefined,
  121 + // actualPayedAmount2:
  122 + // data.data.actualPayedAmount2 !== null ? data.data.actualPayedAmount2.toFixed(2) : undefined,
  123 + // actualPayedAmount3:
  124 + // data.data.actualPayedAmount3 !== null ? data.data.actualPayedAmount3.toFixed(2) : undefined,
  125 + // ...toRaw(data.data), // 其他字段
  126 + // });
98 127 setFieldsValue({
99 128 ...toRaw(data.data),
100 129 });
... ... @@ -103,16 +132,22 @@
103 132 });
104 133 //完成编辑
105 134 async function handleSubmit() {
106   - const values = await validate();
107   - const updatedValues = {
108   - ...values,
109   - id: update.value.data.id,
110   - };
111   - console.log(updatedValues, 56565);
112   - await updateAmountInfo({
113   - ...updatedValues,
114   - });
115   - emit('success');
116   - closeDrawer();
  135 + // const values = await validate();
  136 + // const updatedValues = {
  137 + // ...values,
  138 + // id: update.value.data.id,
  139 + // };
  140 + if (!input1.value || !input2.value || !input3.value) {
  141 + error('选项不能为空');
  142 + } else {
  143 + await updateAmountInfo({
  144 + id: id.value,
  145 + actualPayedAmount1: input1.value,
  146 + actualPayedAmount2: input2.value,
  147 + actualPayedAmount3: input3.value,
  148 + });
  149 + emit('success');
  150 + closeDrawer();
  151 + }
117 152 }
118 153 </script>
... ...
src/views/project/finance/pay/index.vue
... ... @@ -15,7 +15,7 @@
15 15 <CheckDetail @register="registerInvoiceDetail" />
16 16 <DeductShow @register="registerDeductShow" />
17 17 <InvoiceShow @register="registerInvoiceShow" />
18   - <Commit @register="registerCommit" />
  18 + <Commit @register="registerCommit" @success="handleSuccess" />
19 19 </template>
20 20 <template #bodyCell="{ column, record }">
21 21 <template v-if="column.key === 'action'">
... ...
src/views/project/finance/pay/pay.data.tsx
... ... @@ -56,6 +56,9 @@ export const columns: BasicColumn[] = [
56 56 title: '生产科扣款金额¥',
57 57 dataIndex: 'deductAmount',
58 58 width: 160,
  59 + // customRender: (column) => {
  60 + // return column.record.deductAmount?.toFixed(2);
  61 + // },
59 62 },
60 63 {
61 64 title: '扣款责任部门',
... ... @@ -78,6 +81,9 @@ export const columns: BasicColumn[] = [
78 81 title: '生产科实际应付金额¥',
79 82 dataIndex: 'actualPayedAmount',
80 83 width: 180,
  84 + // customRender: (column) => {
  85 + // return column.record.actualPayedAmount?.toFixed(2);
  86 + // },
81 87 },
82 88 {
83 89 title: '生产科发票上传',
... ... @@ -95,16 +101,26 @@ export const columns: BasicColumn[] = [
95 101 title: '实际付款金额1¥',
96 102 dataIndex: 'actualPayedAmount1',
97 103 width: 160,
  104 + // customRender: (column) => {
  105 + // console.log(column, '5656ccc');
  106 + // return column.record.actualPayedAmount1?.toFixed(2);
  107 + // },
98 108 },
99 109 {
100 110 title: '实际付款金额2¥',
101 111 dataIndex: 'actualPayedAmount2',
102 112 width: 160,
  113 + // customRender: (column) => {
  114 + // return column.record.actualPayedAmount2?.toFixed(2);
  115 + // },
103 116 },
104 117 {
105 118 title: '实际付款金额3¥',
106 119 dataIndex: 'actualPayedAmount3',
107 120 width: 160,
  121 + // customRender: (column) => {
  122 + // return column.record.actualPayedAmount3?.toFixed(2);
  123 + // },
108 124 },
109 125 {
110 126 title: '生产科发票审核',
... ...
src/views/project/finance/receive/Commit.vue
... ... @@ -25,6 +25,7 @@
25 25 const id = ref();
26 26 const payee = ref();
27 27 const date = ref();
  28 + const emit = defineEmits(['success']);
28 29  
29 30 const [register, { closeModal }] = useModalInner(async (data) => {
30 31 id.value = data.data.id;
... ... @@ -45,6 +46,7 @@
45 46 async function handleOk() {
46 47 const formattedDate = formatDate(date.value);
47 48 commit({ id: id.value, actualRefundDate: formattedDate, payee: payee.value });
  49 + emit('success');
48 50 closeModal();
49 51 }
50 52 </script>
... ...
src/views/project/finance/receive/DeductShow.vue
... ... @@ -13,7 +13,20 @@
13 13 <a-list-item-meta>
14 14 <template #title>
15 15 <!-- <a :href="item.url" target="_blank" rel="noopener noreferrer">{{ item.name }}</a> -->
16   - <a @click="openPic(item.url)">{{ item.name }}</a>
  16 + <!-- <a @click="openPic(item.url)">{{ item.name }}</a> -->
  17 + <a
  18 + v-if="isImageUrl(item.url)"
  19 + @click="openPic(item.url)"
  20 + style="display: flex; align-items: center"
  21 + >
  22 + <img
  23 + :src="item.url"
  24 + alt="Image"
  25 + style="max-width: 150px; max-height: 150px; margin-right: 10px"
  26 + />
  27 + {{ item.name }}
  28 + </a>
  29 + <a v-else @click="openPic(item.url)">{{ item.name }}</a>
17 30 </template>
18 31 </a-list-item-meta>
19 32 </a-list-item>
... ... @@ -28,6 +41,7 @@
28 41 import { InboxOutlined } from '@ant-design/icons-vue';
29 42 import { message } from 'ant-design-vue';
30 43 import { getInvoiceDeductUrlById } from '@/api/project/invoice';
  44 + import { view } from '@/utils/pdfShow';
31 45  
32 46 interface Item {
33 47 name: string;
... ... @@ -54,15 +68,41 @@
54 68 itemArray.value = [];
55 69 closeModal();
56 70 }
57   - function openPic(url) {
58   - window.open('', '', '').document.write(`<!DOCTYPE html>
59   - <html>
60   - <body
61   - style="display: flex;
62   - justify-content: center;
63   - align-items: center;">
64   - <img src='${url}' width="500px" height="500px"/>
65   - </body>
66   - </html>`);
  71 + // function openPic(url) {
  72 + // window.open('', '', '').document.write(`<!DOCTYPE html>
  73 + // <html>
  74 + // <body
  75 + // style="display: flex;
  76 + // justify-content: center;
  77 + // align-items: center;">
  78 + // <img src='${url}' width="500px" height="500px"/>
  79 + // </body>
  80 + // </html>`);
  81 + // }
  82 + // 新增的函数:判断 URL 是否为图片格式
  83 + function isImageUrl(url: string): boolean {
  84 + const imageExtensions = ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'];
  85 + const baseUrl = url.split('?')[0];
  86 + return imageExtensions.some((ext) => baseUrl.toLowerCase().endsWith(ext));
  87 + }
  88 + // 检查 URL 是否为 PDF 格式
  89 + function isPdfUrl(url: string): boolean {
  90 + return url.toLowerCase().endsWith('.pdf');
  91 + }
  92 + // 打开图片或 PDF
  93 + function openPic(url: string) {
  94 + const baseUrl = url.split('?')[0]; // 获取问号前的部分
  95 + if (isImageUrl(baseUrl)) {
  96 + window.open('', '', '').document.write(`<!DOCTYPE html>
  97 + <html>
  98 + <body style="display: flex; justify-content: center; align-items: center;">
  99 + <img src='${url}' width="500px" height="500px"/>
  100 + </body>
  101 + </html>`);
  102 + } else if (isPdfUrl(baseUrl)) {
  103 + view(url); // 新标签页打开 PDF
  104 + } else {
  105 + console.log('不支持的文件类型');
  106 + }
67 107 }
68 108 </script>
... ...
src/views/project/finance/receive/FinanceEdit.vue
... ... @@ -12,9 +12,21 @@
12 12 showFooter
13 13 :destroyOnClose="true"
14 14 >
15   - <div>
  15 + <!-- <div>
16 16 <BasicForm @register="registerForm" />
17   - </div>
  17 + </div> -->
  18 + <div style="font-size: 15px">实际应收金额1$</div>
  19 + <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size />
  20 + <div style="margin: 16px 0"></div>
  21 + <div style="font-size: 15px">实际应收金额2$</div>
  22 + <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size />
  23 + <div style="margin: 16px 0"></div>
  24 + <div style="font-size: 15px">实际应收金额3$</div>
  25 + <a-input v-model:value="input3" placeholder="请输入" :disabled="status === 10" auto-size />
  26 + <div style="margin: 16px 0"></div>
  27 + <div style="font-size: 15px">其他费用金额$</div>
  28 + <a-input v-model:value="input4" placeholder="请输入" :disabled="status === 10" auto-size />
  29 + <div style="margin: 16px 0"></div>
18 30  
19 31 <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> -->
20 32 <template #appendFooter>
... ... @@ -29,6 +41,7 @@
29 41 import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue';
30 42 import { getEmailList } from '/@/api/sys/config';
31 43 import { updateAmount } from '@/api/project/invoice';
  44 + import { useMessage } from '/@/hooks/web/useMessage';
32 45  
33 46 const emit = defineEmits(['success']);
34 47 const schemas: FormSchema[] = [
... ... @@ -99,15 +112,28 @@
99 112 span: 24,
100 113 },
101 114 });
  115 + const { createMessage } = useMessage();
  116 + const { error } = createMessage;
102 117  
103 118 const update = ref();
104 119 const status = ref();
  120 +
  121 + const input1 = ref();
  122 + const input2 = ref();
  123 + const input3 = ref();
  124 + const input4 = ref();
  125 + const id = ref();
105 126 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
106 127 // 方式1
107   - console.log(data, '56565dataaa');
108 128 status.value = data.data.status;
  129 + id.value = data.data.id;
  130 + input1.value = data.data.actualPayedAmount1;
  131 + input2.value = data.data.actualPayedAmount2;
  132 + input3.value = data.data.actualPayedAmount3;
  133 + input4.value = data.data.otherAmount;
109 134 resetFields();
110 135 setDrawerProps({ confirmLoading: false });
  136 + console.log(data, '5656666dd');
111 137 setFieldsValue({
112 138 ...toRaw(data.data),
113 139 });
... ... @@ -115,16 +141,24 @@
115 141 });
116 142 //完成编辑
117 143 async function handleSubmit() {
118   - const values = await validate();
119   - const updatedValues = {
120   - ...values,
121   - id: update.value.data.id,
122   - bgUrl: update.value.data.bgUrl,
123   - };
124   - await updateAmount({
125   - ...updatedValues,
126   - });
127   - emit('success');
128   - closeDrawer();
  144 + // const values = await validate();
  145 + // const updatedValues = {
  146 + // ...values,
  147 + // id: update.value.data.id,
  148 + // bgUrl: update.value.data.bgUrl,
  149 + // };
  150 + if (!input1.value || !input2.value || !input3.value || !input4.value) {
  151 + error('选项不能为空');
  152 + } else {
  153 + await updateAmount({
  154 + id: id.value,
  155 + actualPayedAmount1: input1.value,
  156 + actualPayedAmount2: input2.value,
  157 + actualPayedAmount3: input3.value,
  158 + otherAmount: input4.value,
  159 + });
  160 + emit('success');
  161 + closeDrawer();
  162 + }
129 163 }
130 164 </script>
... ...
src/views/project/finance/receive/InvoiceAnalysis.vue
... ... @@ -41,31 +41,50 @@
41 41 title: '客户总金额汇总$',
42 42 dataIndex: 'customerTotalPrice',
43 43 width: 50,
  44 + customRender: (res) => {
  45 + console.log(res, '5656analres');
  46 + return res.record.exportVOS[0].customerTotalPrice.toFixed(2);
  47 + },
44 48 },
45 49 {
46 50 title: '客户扣款金额汇总$',
47 51 dataIndex: 'deductAmount',
48 52 width: 50,
  53 + customRender: (res) => {
  54 + return res.record.exportVOS[0].deductAmount.toFixed(2);
  55 + },
49 56 },
50 57 {
51 58 title: '实际应收款$',
52   - dataIndex: 'otherAmount',
  59 + dataIndex: 'actualReceivableAmount',
53 60 width: 50,
  61 + customRender: (res) => {
  62 + return res.record.exportVOS[0].actualReceivableAmount.toFixed(2);
  63 + },
54 64 },
55 65 {
56 66 title: '实际收款金额汇总$',
57   - dataIndex: 'actualReceivableAmount',
  67 + dataIndex: 'actualPayedAmount',
58 68 width: 50,
  69 + customRender: (res) => {
  70 + return res.record.exportVOS[0].actualPayedAmount.toFixed(2);
  71 + },
59 72 },
60 73 {
61 74 title: '其他费用金额汇总$',
62   - dataIndex: 'otherTotalAmount',
  75 + dataIndex: 'otherAmount',
63 76 width: 50,
  77 + customRender: (res) => {
  78 + return res.record.exportVOS[0].otherAmount.toFixed(2);
  79 + },
64 80 },
65 81 {
66 82 title: '未收金额合计$',
67   - dataIndex: 'actualPayedAmount',
  83 + dataIndex: 'otherTotalAmount',
68 84 width: 50,
  85 + customRender: (res) => {
  86 + return res.record.exportVOS[0].otherTotalAmount.toFixed(2);
  87 + },
69 88 },
70 89 ];
71 90 // const ids = ref<number[]>([]);
... ...
src/views/project/finance/receive/TrackEdit.vue
... ... @@ -86,10 +86,10 @@
86 86 }
87 87 function handleShow() {
88 88 // if (!visible) {
89   - input1.value = 0;
90   - deductUrl.value = '';
91   - updateDeductUrl.value = '';
92   - fileList.value = [];
  89 + // input1.value = 0;
  90 + // deductUrl.value = '';
  91 + // updateDeductUrl.value = '';
  92 + // fileList.value = [];
93 93 // }
94 94 // input1.value = '';
95 95 // deductUrl.value = '';
... ...
src/views/project/finance/receive/index.vue
... ... @@ -13,7 +13,7 @@
13 13 <TrackEdit @register="registerTrackEdit" @success="handleSuccess" />
14 14 <InvoiceDetail @register="registerInvoiceDetail" />
15 15 <DeductShow @register="registerDeductShow" />
16   - <Commit @register="registerCommit" />
  16 + <Commit @register="registerCommit" @success="handleSuccess" />
17 17 <ReUploadBgUrl @register="registerReUploadBgUrl" />
18 18 </template>
19 19 <template #bodyCell="{ column, record }">
... ...
src/views/project/finance/receive/receive.data.tsx
... ... @@ -62,6 +62,9 @@ export const columns: BasicColumn[] = [
62 62 title: '发生扣款金额$',
63 63 dataIndex: 'deductAmount',
64 64 width: 120,
  65 + // customRender: (column) => {
  66 + // return column.record.deductAmount?.toFixed(2);
  67 + // },
65 68 },
66 69 {
67 70 title: '上传扣款单',
... ... @@ -80,26 +83,41 @@ export const columns: BasicColumn[] = [
80 83 title: '实际应收金额$',
81 84 dataIndex: 'actualReceivableAmount',
82 85 width: 120,
  86 + // customRender: (column) => {
  87 + // return column.record.actualReceivableAmount?.toFixed(2);
  88 + // },
83 89 },
84 90 {
85 91 title: '实际收款金额1$',
86 92 dataIndex: 'actualPayedAmount1',
87 93 width: 120,
  94 + // customRender: (column) => {
  95 + // return column.record.actualPayedAmount1?.toFixed(2);
  96 + // },
88 97 },
89 98 {
90 99 title: '实际收款金额2$',
91 100 dataIndex: 'actualPayedAmount2',
92 101 width: 120,
  102 + // customRender: (column) => {
  103 + // return column.record.actualPayedAmount2?.toFixed(2);
  104 + // },
93 105 },
94 106 {
95 107 title: '实际收款金额3$',
96 108 dataIndex: 'actualPayedAmount3',
97 109 width: 120,
  110 + // customRender: (column) => {
  111 + // return column.record.actualPayedAmount3?.toFixed(2);
  112 + // },
98 113 },
99 114 {
100 115 title: '其他费用$',
101 116 dataIndex: 'otherAmount',
102 117 width: 120,
  118 + // customRender: (column) => {
  119 + // return column.record.otherAmount?.toFixed(2);
  120 + // },
103 121 },
104 122 {
105 123 title: '总经理审核',
... ... @@ -124,39 +142,56 @@ export const columnsAnalysis: BasicColumn[] = [
124 142 title: '实际应付金额总计$',
125 143 dataIndex: 'actualPayedAmount',
126 144 width: 50,
127   - // customRender: (column) => {
128   - // console.log(column, 5656666);
129   - // return 1;
130   - // },
  145 + customRender: (column) => {
  146 + return column.record.actualPayedAmount?.toFixed(2);
  147 + },
131 148 },
132 149 {
133 150 title: '实际应收金额总计$',
134 151 dataIndex: 'actualReceivableAmount',
135 152 width: 50,
  153 + customRender: (column) => {
  154 + return column.record.actualReceivableAmount?.toFixed(2);
  155 + },
136 156 },
137 157 {
138 158 title: '客户总价$',
139 159 dataIndex: 'customerTotalPrice',
140 160 width: 50,
  161 + customRender: (column) => {
  162 + return column.record.customerTotalPrice?.toFixed(2);
  163 + },
141 164 },
142 165 {
143 166 title: '发生扣款金额总计$',
144 167 dataIndex: 'deductAmount',
145 168 width: 50,
  169 + customRender: (column) => {
  170 + return column.record.deductAmount?.toFixed(2);
  171 + },
146 172 },
147 173 {
148 174 title: '实际应收金额总计$',
149 175 dataIndex: 'actualReceivableAmount',
150 176 width: 50,
  177 + customRender: (column) => {
  178 + return column.record.actualReceivableAmount?.toFixed(2);
  179 + },
151 180 },
152 181 {
153 182 title: '实际应收$',
154 183 dataIndex: 'otherAmount',
155 184 width: 50,
  185 + customRender: (column) => {
  186 + return column.record.otherAmount?.toFixed(2);
  187 + },
156 188 },
157 189 {
158 190 title: '其他费用金额汇总$',
159 191 dataIndex: 'otherTotalAmount',
160 192 width: 50,
  193 + customRender: (column) => {
  194 + return column.record.otherTotalAmount?.toFixed(2);
  195 + },
161 196 },
162 197 ];
... ...
vite.config.ts
... ... @@ -21,14 +21,14 @@ export default defineApplicationConfig({
21 21 },
22 22 server: {
23 23 proxy: {
24   - // '/aliyun-oss-pdf': {
25   - // target: VITE_ALIYUN_OSS_DOMAIN,
26   - // changeOrigin: true,
27   - // secure: true, // 确保使用 HTTPS
28   - // rewrite(path) {
29   - // return path.replace(/^\/aliyun-oss-pdf/, '');
30   - // },
31   - // },
  24 + '/aliyun-oss-pdf': {
  25 + target: 'https://test-alterego.oss-cn-qingdao.aliyuncs.com',
  26 + changeOrigin: true,
  27 + secure: true, // 确保使用 HTTPS
  28 + rewrite(path) {
  29 + return path.replace(/^\/aliyun-oss-pdf/, '');
  30 + },
  31 + },
32 32 '/basic-api/order': {
33 33 target: 'http://47.104.8.35:18001',
34 34 // target: 'http://localhost:8001',
... ...