Commit 940821bb27a84b5b726e658084508ed4031577e3

Authored by boyang
1 parent 54f17338

修改审核权限

src/views/project/approve/PayPanel.vue
... ... @@ -44,8 +44,8 @@
44 44 width="900px"
45 45 @ok="handleTrue"
46 46 @visible-change="handleShow"
47   - :showCancelBtn="!isApproved && role === ROLE.ADMIN"
48   - :showOkBtn="!isApproved && role === ROLE.ADMIN"
  47 + :showCancelBtn="(!isApproved && role === ROLE.ADMIN) || (showInvoice && role === ROLE.FINANCE)"
  48 + :showOkBtn="(!isApproved && role === ROLE.ADMIN) || (showInvoice && role === ROLE.FINANCE)"
49 49 >
50 50 <!-- <Description
51 51 v-if="!showInvoice"
... ... @@ -228,10 +228,16 @@
228 228 width: 150,
229 229 customRender: (column) => {
230 230 const { record } = column || {};
  231 + const data = ref();
231 232 if (record?.type === 40) {
232   - return record?.fieldInfos?.producePaymentCheckBillFieldVO?.financePerson;
  233 + data.value = record?.fieldInfos?.producePaymentCheckBillFieldVO;
233 234 } else if (record?.type == 50) {
234   - return record?.fieldInfos?.producePaymentCheckBillFieldVO?.productionName;
  235 + data.value = record?.fieldInfos?.checkBillOrderDO;
  236 + }
  237 + if (record?.type === 40) {
  238 + return data.value?.financePerson;
  239 + } else if (record?.type == 50) {
  240 + return record.createBy;
235 241 }
236 242 },
237 243 },
... ... @@ -241,13 +247,16 @@
241 247 width: 150,
242 248 customRender: (column) => {
243 249 const { record } = column || {};
244   - console.log(record, '565656565');
245   - const extractedValues = ref<string[]>(
246   - record?.fieldInfos?.producePaymentCheckBillFieldVO?.innerNo.map((item) => item),
247   - );
248   - // projectNo.value = extractedValues.value.join(',');
249   - // return record?.fieldInfos?.producePaymentCheckBillFieldVO?.innerNo[0];
250   - return extractedValues.value.join(',');
  250 + const data = ref();
  251 + if (record?.type === 40) {
  252 + data.value = record?.fieldInfos?.producePaymentCheckBillFieldVO;
  253 + const extractedValues = ref<string[]>(data.value?.innerNo.map((item) => item));
  254 + return extractedValues.value.join(',');
  255 + } else if (record?.type == 50) {
  256 + if (record?.orderBaseInfo) {
  257 + return record?.orderBaseInfo?.innerNo;
  258 + }
  259 + }
251 260 },
252 261 },
253 262 {
... ... @@ -269,7 +278,13 @@
269 278 width: 150,
270 279 customRender: (column) => {
271 280 const { record } = column || {};
272   - return record?.fieldInfos?.producePaymentCheckBillFieldVO?.productionName;
  281 + const data = ref();
  282 + if (record?.type === 40) {
  283 + data.value = record?.fieldInfos?.producePaymentCheckBillFieldVO;
  284 + } else if (record?.type == 50) {
  285 + data.value = record?.fieldInfos?.checkBillOrderDO;
  286 + }
  287 + return data.value?.productionName;
273 288 },
274 289 },
275 290 ];
... ... @@ -334,13 +349,14 @@
334 349 async function handleDetail(data) {
335 350 if (data.type == 50) {
336 351 showInvoice.value = true;
  352 + mockData.value = data.fieldInfos.checkBillOrderDO;
337 353 } else if (data.type == 40) {
338 354 showInvoice.value = false;
  355 + mockData.value = data.fieldInfos.producePaymentCheckBillFieldVO;
339 356 }
340 357 openModal(true, { data });
341 358 id.value = data.id;
342 359 itemArray.value = [];
343   - mockData.value = data.fieldInfos.producePaymentCheckBillFieldVO;
344 360 actualPayCalculate.value = mockData.value.actualPayCalculate?.toFixed(2); // 实际付款金额计算
345 361 checkNo.value = mockData.value.checkNo; // 对账单号
346 362 actualPayedAmount.value = mockData.value.actualPayedAmount?.toFixed(2); // 实际应付金额
... ...
src/views/project/finance/Note.vue
... ... @@ -26,6 +26,7 @@
26 26 const { error } = createMessage;
27 27 const [register, { closeModal }] = useModalInner(async (data) => {
28 28 id.value = data.data.invoiceId;
  29 + notes.value = data.data?.invoiceNotes;
29 30 });
30 31 const isDisabled = ref(false);
31 32 async function handleOk() {
... ...
src/views/project/finance/NoteCheck.vue
... ... @@ -26,6 +26,7 @@
26 26 const { error } = createMessage;
27 27 const [register, { closeModal }] = useModalInner(async (data) => {
28 28 id.value = data.data.checkId;
  29 + notes.value = data.data?.checkNotes;
29 30 });
30 31 const isDisabled = ref(false);
31 32 async function handleOk() {
... ...
src/views/project/finance/TrackEditCheck.vue
... ... @@ -67,21 +67,9 @@
67 67 import type { UploadProps } from 'ant-design-vue';
68 68 import { updateDeductInfo } from '@/api/project/invoice';
69 69 import { useMessage } from '/@/hooks/web/useMessage';
70   - import { useOrderInfo } from '/@/hooks/component/order';
71   - import { useOrderStoreWithOut } from '/@/store/modules/order';
72 70  
73 71 const emit = defineEmits(['success']);
74 72 const fileList = ref<UploadProps['fileList']>([]);
75   - // const orderStore = useOrderStoreWithOut();
76   - // const { productionDepartment: productionDepartmentOptions } = useOrderInfo(orderStore);
77   - // console.log(productionDepartmentOptions.value, '565656565665orderStore');
78   - // onMounted(() => {
79   - // const { productionDepartment } = useOrderInfo(orderStore);
80   - // console.log(productionDepartment.value, '565656565665orderStore1');
81   - // });
82   - const orderStore = useOrderStoreWithOut();
83   - const { productionDepartment: productDepartmentOptions } = useOrderInfo(orderStore);
84   - const productionDepartment = ref();
85 73 const input1 = ref(0);
86 74 const deductUrl = ref();
87 75 const id = ref();
... ... @@ -92,7 +80,6 @@
92 80 // const uploadUrl = ref('');
93 81 // const updateDeductUrl = ref('');
94 82 const deductUrlOld = ref();
95   - const selectedProductionDepartment = ref(); // 新增: 用于存储选中的生产科
96 83 const { createMessage } = useMessage();
97 84 const { error } = createMessage;
98 85 const status = ref();
... ...
src/views/project/finance/finance.data.tsx
... ... @@ -8,19 +8,19 @@ import { view } from &#39;@/utils/pdfShow&#39;;
8 8 export const searchFormSchema: FormSchema[] = [
9 9 {
10 10 field: 'invoiceNo',
11   - label: '发票单号',
  11 + label: 'invoice单号',
12 12 component: 'Input',
13 13 colProps: { span: 8 },
14 14 },
15 15 {
16 16 field: 'checkNo',
17   - label: '生产科对账单号',
  17 + label: 'checkNo单号',
18 18 component: 'Input',
19 19 colProps: { span: 8 },
20 20 },
21 21 {
22 22 field: 'invoiceStatus',
23   - label: '发票状态',
  23 + label: 'invoice状态',
24 24 component: 'Select',
25 25 colProps: { span: 8 },
26 26 componentProps: {
... ... @@ -33,7 +33,7 @@ export const searchFormSchema: FormSchema[] = [
33 33 },
34 34 {
35 35 field: 'checkNoStatus',
36   - label: '对账单号状态',
  36 + label: 'checkNo状态',
37 37 component: 'Select',
38 38 colProps: { span: 8 },
39 39 componentProps: {
... ... @@ -76,35 +76,35 @@ export const searchFormSchema: FormSchema[] = [
76 76 },
77 77 {
78 78 field: 'invoiceStartTime',
79   - label: '发票开始时间',
  79 + label: 'invoice创建时间',
80 80 component: 'DatePicker',
81 81 colProps: { span: 8 },
82 82 labelWidth: 150,
83 83 },
84 84 {
85 85 field: 'invoiceEndTime',
86   - label: '发票结束时间',
  86 + label: 'invoice结束时间',
87 87 component: 'DatePicker',
88 88 colProps: { span: 8 },
89 89 labelWidth: 150,
90 90 },
91 91 {
92 92 field: 'checkStartTime',
93   - label: '对账开始时间',
  93 + label: 'checkNo创建时间',
94 94 component: 'DatePicker',
95 95 colProps: { span: 8 },
96 96 labelWidth: 150,
97 97 },
98 98 {
99 99 field: 'checkEndTime',
100   - label: '对账结束时间',
  100 + label: 'checkNo结束时间',
101 101 component: 'DatePicker',
102 102 colProps: { span: 8 },
103 103 labelWidth: 150,
104 104 },
105 105 {
106 106 field: 'createStartTime',
107   - label: '订单开始时间',
  107 + label: '订单创建时间',
108 108 component: 'DatePicker',
109 109 colProps: { span: 8 },
110 110 labelWidth: 150,
... ...
src/views/project/finance/index.vue
1 1 <template>
2 2 <div class="p-4">
3 3 <BasicTable @register="registerTable">
  4 + <template #headerTop>
  5 + <a-alert type="info" show-icon>
  6 + <template #message>
  7 + <template v-if="checkedKeys.length > 0">
  8 + <span>已选中{{ checkedKeys.length }}条记录(可跨页)</span>
  9 + <a-button
  10 + :style="{ borderRadius: '5px 5px 5px 5px' }"
  11 + type="link"
  12 + @click="handleClearChoose"
  13 + size="small"
  14 + >清空</a-button
  15 + >
  16 + </template>
  17 + <template v-else>
  18 + <span>未选中任何订单</span>
  19 + </template>
  20 + </template>
  21 + </a-alert>
  22 + </template>
4 23 <template #toolbar>
5 24 <a-button
6 25 type="primary"
... ... @@ -330,7 +349,6 @@
330 349  
331 350 // 单选函数
332 351 async function onSelect(record, selected: boolean) {
333   - console.log(record, '5656565656record');
334 352  
335 353 if (selected) {
336 354 checkedKeys.value = [...checkedKeys.value, record.id];
... ... @@ -359,10 +377,6 @@
359 377 checkIdKeys.value = checkIdKeys.value.filter((checkId) => checkId !== record.checkId);
360 378 }
361 379 }
362   -
363   - console.log(checkedKeys.value, 565666666); // 输出当前的 checkedKeys 值
364   - console.log(invoiceIdKeys.value, 565666666); // 输出当前的 selectedCustomCodes 值
365   - console.log(checkIdKeys.value, 565666666); // 输出当前的 selectedProductionDepartment 值
366 380 }
367 381  
368 382 // 全选函数
... ... @@ -394,10 +408,12 @@
394 408 // 仅当 checkId 不为 undefined 时,才删除
395 409 checkIdKeys.value = checkIdKeys.value.filter((checkId) => checkIds.indexOf(checkId) === -1);
396 410 }
  411 + }
397 412  
398   - console.log(checkedKeys.value, 565666666); // 输出当前的 checkedKeys 值
399   - console.log(invoiceIdKeys.value, 565666666); // 输出当前的 selectedCustomCodes 值
400   - console.log(checkIdKeys.value, 565666666); // 输出当前的 selectedProductionDepartment 值
  413 + function handleClearChoose() {
  414 + checkedKeys.value = [];
  415 + invoiceIdKeys.value = [];
  416 + checkIdKeys.value = [];
401 417 }
402 418  
403 419 function handleFinanceEdit(record) {
... ... @@ -418,15 +434,13 @@
418 434 }, 50);
419 435 }
420 436 function handleDeleteInvoiceIds() {
421   - // console.log(checkedKeys.value, '5656checkedKeys.value');
422 437 deleteInvoice({ ids: invoiceIdKeys.value });
423 438 setTimeout(() => {
424 439 reloadTable();
425 440 }, 50);
426 441 }
427 442 function handleDeleteCheckIds() {
428   - // console.log(checkedKeys.value, '5656checkedKeys.value');
429   - deleteInvoice({ ids: checkIdKeys.value });
  443 + checkDelete({ ids: checkIdKeys.value });
430 444 setTimeout(() => {
431 445 reloadTable();
432 446 }, 50);
... ...
src/views/project/finance/pay/CheckSum.vue
... ... @@ -33,7 +33,6 @@
33 33 dataIndex: 'productionDepartment',
34 34 width: 150,
35 35 customRender: (res) => {
36   - // console.log(res, 56562);
37 36 return res.record.exportVOS[0].productionDepartment;
38 37 },
39 38 },
... ... @@ -42,7 +41,6 @@
42 41 dataIndex: 'productionDepartmentTotalPrice',
43 42 width: 150,
44 43 customRender: (res) => {
45   - // console.log(res, 56562);
46 44 return res.record.productionDepartmentTotalPrice.toFixed(2);
47 45 },
48 46 },
... ... @@ -51,7 +49,6 @@
51 49 dataIndex: 'deductAmount',
52 50 width: 160,
53 51 customRender: (res) => {
54   - // console.log(res, 56562);
55 52 return res.record.deductAmount.toFixed(2);
56 53 },
57 54 },
... ... @@ -68,7 +65,6 @@
68 65 dataIndex: 'actualPayedAmount',
69 66 width: 160,
70 67 customRender: (res) => {
71   - // console.log(res, 56562);
72 68 return res.record.actualPayedAmount.toFixed(2);
73 69 },
74 70 },
... ... @@ -77,7 +73,6 @@
77 73 dataIndex: 'unPayedAmount',
78 74 width: 150,
79 75 customRender: (res) => {
80   - // console.log(res, 56562);
81 76 return res.record.unPayedAmount.toFixed(2);
82 77 },
83 78 },
... ... @@ -98,7 +93,6 @@
98 93 const res = await checkAnalysis({ ids: ids.value });
99 94 const arrayRes = ref([]);
100 95 arrayRes.value.push(res);
101   - console.log(res, '5656payana');
102 96 return res;
103 97 },
104 98 columns: columnsAnalysis,
... ...
src/views/project/finance/pay/index.vue
... ... @@ -245,9 +245,6 @@
245 245 }
246 246 }
247 247 }
248   - // console.log(checkedKeys.value, 565666666); // 输出当前的 selectedCustomCodes 值
249   - // console.log(selectedCustomCodes.value, 565666666); // 输出当前的 selectedCustomCodes 值
250   - // console.log(selectedProductionDepartment.value, 565666666); // 输出当前的 selectedCustomCodes 值
251 248 }
252 249  
253 250 // 全选函数
... ...
src/views/project/finance/receive.data.tsx deleted 100644 → 0
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   -import { view } from '@/utils/pdfShow';
8   -
9   -export const searchFormSchema: FormSchema[] = [
10   - {
11   - field: 'invoiceNo',
12   - label: 'Invoice编号',
13   - component: 'Input',
14   - colProps: { span: 6 },
15   - },
16   - {
17   - field: 'status',
18   - label: '总经理审核',
19   - component: 'Select',
20   - colProps: { span: 6 },
21   - componentProps: {
22   - options: [
23   - { label: '未提交审核', value: -1 },
24   - { label: '待审核', value: 0 },
25   - { label: '审核通过', value: 10 },
26   - { label: '审核驳回', value: 20 },
27   - ],
28   - },
29   - },
30   - {
31   - field: 'customerCode',
32   - label: '客户编码',
33   - component: 'Input',
34   - colProps: {
35   - span: 6,
36   - },
37   - // labelWidth: 140,
38   - },
39   -];
40   -
41   -export const columns: BasicColumn[] = [
42   - {
43   - title: 'Invoice编号',
44   - dataIndex: 'invoiceNo',
45   - width: 180,
46   - },
47   - {
48   - title: '报关单',
49   - dataIndex: 'bgUrl',
50   - width: 80,
51   - customRender: (column) => {
52   - const bgUrl = column.record.bgUrl;
53   - if (bgUrl == undefined) {
54   - return;
55   - }
56   - return <FilePptOutlined style="font-size:25px" onClick={() => view(bgUrl)} />;
57   - },
58   - },
59   - {
60   - title: '必须回款日期',
61   - dataIndex: 'backRefundDate',
62   - width: 120,
63   - },
64   - {
65   - title: '发生扣款金额$',
66   - dataIndex: 'deductAmount',
67   - width: 120,
68   - // customRender: (column) => {
69   - // return column.record.deductAmount?.toFixed(2);
70   - // },
71   - },
72   - {
73   - title: '上传扣款单',
74   - dataIndex: 'deductUrl',
75   - width: 80,
76   - customRender: (column) => {
77   - const deductUrl = column.record.deductUrl;
78   - if (deductUrl == undefined) {
79   - return;
80   - }
81   - // return <FilePptOutlined style="font-size:25px" onClick={() => window.open(deductUrl[0])} />;
82   - return <FilePptOutlined style="font-size:25px" />;
83   - },
84   - },
85   - {
86   - title: '实际应收金额$',
87   - dataIndex: 'actualReceivableAmount',
88   - width: 120,
89   - // customRender: (column) => {
90   - // return column.record.actualReceivableAmount?.toFixed(2);
91   - // },
92   - },
93   - {
94   - title: '实际收款金额1$',
95   - dataIndex: 'actualPayedAmount1',
96   - width: 120,
97   - // customRender: (column) => {
98   - // return column.record.actualPayedAmount1?.toFixed(2);
99   - // },
100   - },
101   - {
102   - title: '实际收款金额2$',
103   - dataIndex: 'actualPayedAmount2',
104   - width: 120,
105   - // customRender: (column) => {
106   - // return column.record.actualPayedAmount2?.toFixed(2);
107   - // },
108   - },
109   - {
110   - title: '实际收款金额3$',
111   - dataIndex: 'actualPayedAmount3',
112   - width: 120,
113   - // customRender: (column) => {
114   - // return column.record.actualPayedAmount3?.toFixed(2);
115   - // },
116   - },
117   - {
118   - title: '其他费用$',
119   - dataIndex: 'otherAmount',
120   - width: 120,
121   - customRender: (column) => {
122   - return column.record.otherAmount?.toFixed(2);
123   - },
124   - },
125   - {
126   - title: '总经理审核',
127   - dataIndex: 'status',
128   - width: 120,
129   - customRender: (column) => {
130   - if (column.record.status == -1) {
131   - return '未提交审核';
132   - } else if (column.record.status == 0) {
133   - return '待审核';
134   - } else if (column.record.status == 10) {
135   - return '审核通过';
136   - } else if (column.record.status == 20) {
137   - return '审核驳回';
138   - }
139   - },
140   - },
141   - {
142   - title: '操作1',
143   - key: 'action', // 对应 #bodyCell 中的 column.key
144   - width: 280,
145   - },
146   - {
147   - title: '操作2',
148   - key: 'action2', // 对应 #bodyCell 中的 column.key
149   - width: 280,
150   - },
151   -];
152   -
153   -export const columnsAnalysis: BasicColumn[] = [
154   - {
155   - title: '实际应付金额总计$',
156   - dataIndex: 'actualPayedAmount',
157   - width: 50,
158   - customRender: (column) => {
159   - return column.record.actualPayedAmount?.toFixed(2);
160   - },
161   - },
162   - {
163   - title: '实际应收金额总计$',
164   - dataIndex: 'actualReceivableAmount',
165   - width: 50,
166   - customRender: (column) => {
167   - return column.record.actualReceivableAmount?.toFixed(2);
168   - },
169   - },
170   - {
171   - title: '客户总价$',
172   - dataIndex: 'customerTotalPrice',
173   - width: 50,
174   - customRender: (column) => {
175   - return column.record.customerTotalPrice?.toFixed(2);
176   - },
177   - },
178   - {
179   - title: '发生扣款金额总计$',
180   - dataIndex: 'deductAmount',
181   - width: 50,
182   - customRender: (column) => {
183   - return column.record.deductAmount?.toFixed(2);
184   - },
185   - },
186   - {
187   - title: '实际应收金额总计$',
188   - dataIndex: 'actualReceivableAmount',
189   - width: 50,
190   - customRender: (column) => {
191   - return column.record.actualReceivableAmount?.toFixed(2);
192   - },
193   - },
194   - {
195   - title: '实际应收$',
196   - dataIndex: 'otherAmount',
197   - width: 50,
198   - customRender: (column) => {
199   - return column.record.otherAmount?.toFixed(2);
200   - },
201   - },
202   - {
203   - title: '其他费用金额汇总$',
204   - dataIndex: 'otherTotalAmount',
205   - width: 50,
206   - customRender: (column) => {
207   - return column.record.otherTotalAmount?.toFixed(2);
208   - },
209   - },
210   -];