Commit 47b3c41c050ec5af39ffc9583895e9ae32bc0381
1 parent
43dc180b
修改bug
Showing
22 changed files
with
529 additions
and
153 deletions
src/views/project/config/CreateModal.vue
... | ... | @@ -65,7 +65,9 @@ |
65 | 65 | ? '包装费用' |
66 | 66 | : props.column === 5 |
67 | 67 | ? '最后回款日期' |
68 | - : '销售额', | |
68 | + : props.column === 7 | |
69 | + ? '销售额' | |
70 | + : '生产科回款日期', | |
69 | 71 | rules: [{ required: true }], |
70 | 72 | colProps: { |
71 | 73 | span: 24, |
... | ... | @@ -110,7 +112,9 @@ |
110 | 112 | ? 'packetPrice' |
111 | 113 | : props.column === 5 |
112 | 114 | ? 'orderHodTime' |
113 | - : 'salesAmount', | |
115 | + : props.column === 7 | |
116 | + ? 'salesAmount' | |
117 | + : 'produHodTime', | |
114 | 118 | relationName: '包装费用', |
115 | 119 | relationValue: values.relationValue, |
116 | 120 | }; | ... | ... |
src/views/project/config/ProduCostCreate.vue
0 → 100644
1 | +<template> | |
2 | + <BasicModal | |
3 | + v-bind="$attrs" | |
4 | + destroyOnClose | |
5 | + @register="register" | |
6 | + title="创建配置" | |
7 | + width="600px" | |
8 | + @visible-change="handleShow" | |
9 | + @ok="handleOk" | |
10 | + > | |
11 | + <a-space direction="vertical" style="width: 100%"> | |
12 | + <div | |
13 | + ><span style="margin-right: 8px">客户编码:</span> | |
14 | + <a-select | |
15 | + ref="select" | |
16 | + style="width: 100%" | |
17 | + v-model:value="customerCode" | |
18 | + :options="customerCodeOptions" | |
19 | + /></div> | |
20 | + <div | |
21 | + ><span style="margin-right: 8px; width: 80%">固定成本:</span> | |
22 | + <a-input v-model:value="fixCost" | |
23 | + /></div> | |
24 | + <div | |
25 | + ><span style="margin-right: 8px; width: 80%">提成比例:</span> | |
26 | + <a-input v-model:value="ratio" /> | |
27 | + </div> | |
28 | + </a-space> | |
29 | + </BasicModal> | |
30 | +</template> | |
31 | +<script lang="ts"> | |
32 | + import { defineComponent, ref, defineEmits } from 'vue'; | |
33 | + import { BasicModal, useModalInner } from '/@/components/Modal'; | |
34 | + import { orderGravity } from '/@/api/project/order'; | |
35 | + import { useOrderStoreWithOut } from '/@/store/modules/order'; | |
36 | + import { useOrderInfo } from '/@/hooks/component/order'; | |
37 | + import { BasicForm, useForm } from '/@/components/Form/index'; | |
38 | + import { addConfig } from '/@/api/sys/config'; | |
39 | + | |
40 | + export default defineComponent({ | |
41 | + components: { BasicModal, BasicForm }, | |
42 | + props: { | |
43 | + column: { type: Number }, | |
44 | + }, | |
45 | + emits: ['modal-success'], | |
46 | + setup(props, { emit }) { | |
47 | + const orderStore = useOrderStoreWithOut(); | |
48 | + const loading = ref(true); | |
49 | + const activeUser = ref(); | |
50 | + const info = ref(); | |
51 | + const [register, { setModalProps, closeModal }] = useModalInner(async (data) => { | |
52 | + listAll.value = data; | |
53 | + console.log(listAll.value, '5656modaldata.value'); | |
54 | + }); | |
55 | + //获取现有的列表 | |
56 | + const listAll = ref(); | |
57 | + const fixCost = ref(); | |
58 | + const ratio = ref(); | |
59 | + // const relationValue = ref(); | |
60 | + const customerCode = ref(); | |
61 | + const relationValue = ref([ | |
62 | + { | |
63 | + relationCode: 'fixCost', | |
64 | + relationName: '固定成本', | |
65 | + relationValue: '', | |
66 | + }, | |
67 | + { | |
68 | + relationCode: 'ratio', | |
69 | + relationName: '提成比例', | |
70 | + relationValue: '', | |
71 | + }, | |
72 | + ]); | |
73 | + // const loading = ref(true); | |
74 | + | |
75 | + const { customerCode: customerCodeOptions } = useOrderInfo(orderStore); | |
76 | + | |
77 | + function handleShow(visible: boolean) { | |
78 | + if (visible) { | |
79 | + loading.value = true; | |
80 | + // setModalProps({ loading: true, confirmLoading: true }); | |
81 | + setModalProps({ loading: false, confirmLoading: false }); | |
82 | + } | |
83 | + } | |
84 | + | |
85 | + async function handleOk() { | |
86 | + try { | |
87 | + relationValue.value[0].relationValue = fixCost.value; | |
88 | + relationValue.value[1].relationValue = ratio.value; | |
89 | + await addConfig({ | |
90 | + settingCode: 'customerCode', | |
91 | + settingName: '生产提成成本配置', | |
92 | + settingValue: customerCode.value, | |
93 | + settingType: 4, | |
94 | + relationCode: 'ProduceSettingItem', | |
95 | + relationName: '成本配置项集合', | |
96 | + costSettingItemVOS: relationValue.value, | |
97 | + }); | |
98 | + emit('modal-success'); | |
99 | + closeModal(); | |
100 | + } catch (error) { | |
101 | + console.log('%c [ error ]-108', 'font-size:13px; background:pink; color:#bf2c9f;', error); | |
102 | + } | |
103 | + } | |
104 | + return { | |
105 | + register, | |
106 | + loading, | |
107 | + handleShow, | |
108 | + info, | |
109 | + activeUser, | |
110 | + fixCost, | |
111 | + ratio, | |
112 | + customerCode, | |
113 | + customerCodeOptions, | |
114 | + handleOk, | |
115 | + }; | |
116 | + }, | |
117 | + }); | |
118 | +</script> | |
119 | +<style scoped> | |
120 | + .empty-tips { | |
121 | + height: 100px; | |
122 | + line-height: 100px; | |
123 | + text-align: center; | |
124 | + } | |
125 | +</style> | ... | ... |
src/views/project/config/ProduCostEdit.vue
0 → 100644
1 | +<template> | |
2 | + <BasicDrawer | |
3 | + v-cloakv-bind="$attrs" | |
4 | + @register="register" | |
5 | + title="编辑" | |
6 | + width="35%" | |
7 | + showFooter | |
8 | + @ok="handleSubmit" | |
9 | + ref="formRef" | |
10 | + okText="保存" | |
11 | + :destroyOnClose="true" | |
12 | + :isDetail="true" | |
13 | + :showDetailBack="false" | |
14 | + :mask="false" | |
15 | + class="z-20" | |
16 | + > | |
17 | + <a-space direction="vertical" style="width: 100%"> | |
18 | + <a-input v-model:value="fixCost" addonBefore="固定成本 " /> | |
19 | + <a-input v-model:value="ratio" addonBefore="提成比例 " /> | |
20 | + </a-space> | |
21 | + </BasicDrawer> | |
22 | +</template> | |
23 | +<script lang="ts" setup> | |
24 | + import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | |
25 | + import { BasicForm, FormSchema, useForm } from '@/components/Form'; | |
26 | + import { defineComponent, ref, computed, unref, toRaw, reactive, onMounted } from 'vue'; | |
27 | + import { saveConfig } from '/@/api/sys/config'; | |
28 | + | |
29 | + // const emit = defineEmits(['success']); | |
30 | + // const isUpdate = ref(true); | |
31 | + const emit = defineEmits(['success']); | |
32 | + | |
33 | + const [register, { closeDrawer }] = useDrawerInner((data) => { | |
34 | + listAll.value = data.data; | |
35 | + console.log(listAll.value, '5656listAll.value'); | |
36 | + relationValue.value = JSON.parse(listAll.value.relationValue); | |
37 | + fixCost.value = relationValue.value[0].relationValue; | |
38 | + ratio.value = relationValue.value[1].relationValue; | |
39 | + }); | |
40 | + //获取现有的列表 | |
41 | + const listAll = ref(); | |
42 | + const fixCost = ref(); | |
43 | + const ratio = ref(); | |
44 | + const relationValue = ref(); | |
45 | + | |
46 | + //完成编辑 | |
47 | + async function handleSubmit() { | |
48 | + relationValue.value[0].relationValue = fixCost.value; | |
49 | + relationValue.value[1].relationValue = ratio.value; | |
50 | + console.log(relationValue.value, '5656relationValue.value'); | |
51 | + await saveConfig({ | |
52 | + id: listAll.value.id, | |
53 | + settingCode: 'customerCode', | |
54 | + settingName: '生产提成成本配置', | |
55 | + settingValue: listAll.value.settingValue, | |
56 | + settingType: 4, | |
57 | + relationCode: 'ProduceSettingItem', | |
58 | + relationName: '成本配置项集合', | |
59 | + costSettingItemVOS: relationValue.value, | |
60 | + }); | |
61 | + emit('success'); | |
62 | + closeDrawer(); | |
63 | + } | |
64 | +</script> | ... | ... |
src/views/project/config/TablePanel.vue
1 | 1 | <template> |
2 | 2 | <BasicTable @register="registerTable" :bordered="true"> |
3 | 3 | <template #toolbar> |
4 | - <a-button | |
4 | + <!-- <a-button | |
5 | 5 | v-if="props.column !== 3 && props.column !== 6" |
6 | 6 | type="primary" |
7 | 7 | @click="handleCreateModal" |
8 | 8 | >新建</a-button |
9 | 9 | > |
10 | 10 | <a-button v-if="props.column == 6" type="primary" @click="handleCostCreate">新建</a-button> |
11 | + <a-button v-if="props.column == 9" type="primary" @click="handleProduCostCreate" | |
12 | + >新建</a-button | |
13 | + > --> | |
14 | + <a-button | |
15 | + v-if="props.column !== 3 && props.column !== 6 && props.column !== 9" | |
16 | + type="primary" | |
17 | + @click="handleCreateModal" | |
18 | + >新建</a-button | |
19 | + > | |
20 | + | |
21 | + <a-button v-else-if="props.column == 6" type="primary" @click="handleCostCreate"> | |
22 | + 新建</a-button | |
23 | + > | |
24 | + | |
25 | + <a-button v-else-if="props.column == 9" type="primary" @click="handleProduCostCreate"> | |
26 | + 新建</a-button | |
27 | + > | |
11 | 28 | </template> |
12 | 29 | <template #bodyCell="{ column, record }"> |
13 | 30 | <template v-if="column.key === 'action'"> |
... | ... | @@ -16,7 +33,9 @@ |
16 | 33 | </template> |
17 | 34 | </BasicTable> |
18 | 35 | <CostEdit @register="registerEdit" @success="handleModalSuccess" /> |
36 | + <ProduCostEdit @register="registerProduEdit" @success="handleModalSuccess" /> | |
19 | 37 | <CostCreate @register="registerCostCreate" @modal-success="handleModalSuccess" /> |
38 | + <ProduCostCreate @register="registerProduCostCreate" @modal-success="handleModalSuccess" /> | |
20 | 39 | <CreateModal |
21 | 40 | @register="createModalRegister" |
22 | 41 | @modal-success="handleModalSuccess" |
... | ... | @@ -31,7 +50,9 @@ |
31 | 50 | import { useModal } from '/@/components/Modal'; |
32 | 51 | import { useDrawer } from '/@/components/Drawer'; |
33 | 52 | import CostEdit from './costEdit.vue'; |
53 | + import ProduCostEdit from './ProduCostEdit.vue'; | |
34 | 54 | import CostCreate from './costCreate.vue'; |
55 | + import ProduCostCreate from './ProduCostCreate.vue'; | |
35 | 56 | |
36 | 57 | const props = defineProps({ |
37 | 58 | searchInfo: { |
... | ... | @@ -44,6 +65,8 @@ |
44 | 65 | const [createModalRegister, { openModal }] = useModal(); |
45 | 66 | const [registerCostCreate, { openModal: openCostCreateModal }] = useModal(); |
46 | 67 | const [registerEdit, { openDrawer: openDrawerEdit }] = useDrawer(); |
68 | + const [registerProduEdit, { openDrawer: openDrawerProduEdit }] = useDrawer(); | |
69 | + const [registerProduCostCreate, { openModal: openProduCreateModal }] = useModal(); | |
47 | 70 | |
48 | 71 | const [registerTable, { reload }] = useTable({ |
49 | 72 | api: getList, |
... | ... | @@ -78,6 +101,13 @@ |
78 | 101 | onClick: handleCostEdit.bind(null, record), |
79 | 102 | }, |
80 | 103 | ] |
104 | + : props.column === 9 | |
105 | + ? [ | |
106 | + { | |
107 | + label: '编辑', | |
108 | + onClick: handleProduEdit.bind(null, record), | |
109 | + }, | |
110 | + ] | |
81 | 111 | : props.column !== 6 |
82 | 112 | ? [ |
83 | 113 | { |
... | ... | @@ -128,12 +158,24 @@ |
128 | 158 | isUpdate: true, |
129 | 159 | }); |
130 | 160 | } |
161 | + function handleProduEdit(record: any) { | |
162 | + openDrawerProduEdit(true, { | |
163 | + data: record, | |
164 | + isUpdate: true, | |
165 | + }); | |
166 | + } | |
131 | 167 | function handleCostCreate(record: any) { |
132 | 168 | openCostCreateModal(true, { |
133 | 169 | data: record, |
134 | 170 | isUpdate: true, |
135 | 171 | }); |
136 | 172 | } |
173 | + function handleProduCostCreate(record: any) { | |
174 | + openProduCreateModal(true, { | |
175 | + data: record, | |
176 | + isUpdate: true, | |
177 | + }); | |
178 | + } | |
137 | 179 | function handleEdit(record: any) { |
138 | 180 | record.onEdit?.(true); |
139 | 181 | } | ... | ... |
src/views/project/config/costCreate.vue
... | ... | @@ -29,10 +29,10 @@ |
29 | 29 | ><span style="margin-right: 8px; width: 80%">西班牙提成比例:</span> |
30 | 30 | <a-input v-model:value="spainRatio" /> |
31 | 31 | </div> |
32 | - <div | |
32 | + <!-- <div | |
33 | 33 | ><span style="margin-right: 8px; width: 80%">生产提成单价:</span> |
34 | 34 | <a-input v-model:value="price" /> |
35 | - </div> | |
35 | + </div> --> | |
36 | 36 | </a-space> |
37 | 37 | </BasicModal> |
38 | 38 | </template> |
... | ... | @@ -84,11 +84,11 @@ |
84 | 84 | relationName: '西班牙提成比例', |
85 | 85 | relationValue: '', |
86 | 86 | }, |
87 | - { | |
88 | - relationCode: 'price', | |
89 | - relationName: '生产提成单价', | |
90 | - relationValue: '', | |
91 | - }, | |
87 | + // { | |
88 | + // relationCode: 'price', | |
89 | + // relationName: '生产提成单价', | |
90 | + // relationValue: '', | |
91 | + // }, | |
92 | 92 | ]); |
93 | 93 | // const loading = ref(true); |
94 | 94 | ... | ... |
src/views/project/config/costEdit.vue
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | <a-input v-model:value="fixCost" addonBefore="固定成本 " /> |
19 | 19 | <a-input v-model:value="ratio" addonBefore="提成比例 " /> |
20 | 20 | <a-input v-model:value="spainRatio" addonBefore="西班牙提成比例 " /> |
21 | - <a-input v-model:value="price" addonBefore="生产提成单价" /> | |
21 | + <!-- <a-input v-model:value="price" addonBefore="生产提成单价" /> --> | |
22 | 22 | </a-space> |
23 | 23 | </BasicDrawer> |
24 | 24 | </template> | ... | ... |
src/views/project/config/data.tsx
... | ... | @@ -93,30 +93,69 @@ export const COLUMNS = { |
93 | 93 | return value[2].relationValue; |
94 | 94 | }, |
95 | 95 | }, |
96 | + // { | |
97 | + // title: '生产提成单价', | |
98 | + // dataIndex: 'relationValue', | |
99 | + // width: 150, | |
100 | + // customRender: (column) => { | |
101 | + // const value = JSON.parse(column.record.relationValue); | |
102 | + // return value[3].relationValue; | |
103 | + // }, | |
104 | + // }, | |
105 | + ], | |
106 | + 7: [ | |
107 | + { | |
108 | + title: '客户编码', | |
109 | + dataIndex: 'settingValue', | |
110 | + width: 150, | |
111 | + }, | |
96 | 112 | { |
97 | - title: '生产提成单价', | |
113 | + title: '销售额', | |
98 | 114 | dataIndex: 'relationValue', |
99 | 115 | width: 150, |
100 | - customRender: (column) => { | |
101 | - const value = JSON.parse(column.record.relationValue); | |
102 | - return value[3].relationValue; | |
103 | - }, | |
116 | + editComponent: 'InputNumber', | |
117 | + editRow: true, | |
104 | 118 | }, |
105 | 119 | ], |
106 | - 7: [ | |
120 | + 8: [ | |
107 | 121 | { |
108 | 122 | title: '客户编码', |
109 | 123 | dataIndex: 'settingValue', |
110 | 124 | width: 150, |
111 | 125 | }, |
112 | 126 | { |
113 | - title: '销售额', | |
127 | + title: '生产科应付日期', | |
114 | 128 | dataIndex: 'relationValue', |
115 | 129 | width: 150, |
116 | 130 | editComponent: 'InputNumber', |
117 | 131 | editRow: true, |
118 | 132 | }, |
119 | 133 | ], |
134 | + 9: [ | |
135 | + { | |
136 | + title: '客户编码', | |
137 | + dataIndex: 'settingValue', | |
138 | + width: 150, | |
139 | + }, | |
140 | + { | |
141 | + title: '固定成本', | |
142 | + dataIndex: 'relationValue', | |
143 | + width: 150, | |
144 | + customRender: (column) => { | |
145 | + const value = JSON.parse(column.record.relationValue); | |
146 | + return value[0].relationValue; | |
147 | + }, | |
148 | + }, | |
149 | + { | |
150 | + title: '提成比例', | |
151 | + dataIndex: 'relationValue', | |
152 | + width: 150, | |
153 | + customRender: (column) => { | |
154 | + const value = JSON.parse(column.record.relationValue); | |
155 | + return value[1].relationValue; | |
156 | + }, | |
157 | + }, | |
158 | + ], | |
120 | 159 | }; |
121 | 160 | |
122 | 161 | export const columns: BasicColumn[] = [ | ... | ... |
src/views/project/config/index.vue
... | ... | @@ -25,6 +25,12 @@ |
25 | 25 | <Tabs.TabPane key="7" tab="销售额配置"> |
26 | 26 | <TablePanel :searchInfo="{ relationCode: 'salesAmount' }" :column="7" /> |
27 | 27 | </Tabs.TabPane> |
28 | + <Tabs.TabPane key="8" tab="生产科应付日期"> | |
29 | + <TablePanel :searchInfo="{ relationCode: 'produHodTime' }" :column="8" /> | |
30 | + </Tabs.TabPane> | |
31 | + <Tabs.TabPane key="9" tab="生产科固定成本"> | |
32 | + <TablePanel :searchInfo="{ relationCode: 'ProduceSettingItem' }" :column="9" /> | |
33 | + </Tabs.TabPane> | |
28 | 34 | </Tabs> |
29 | 35 | </div> |
30 | 36 | </PageWrapper> | ... | ... |
src/views/project/finance/pay/CheckSum.vue
... | ... | @@ -2,8 +2,9 @@ |
2 | 2 | <BasicModal |
3 | 3 | v-bind="$attrs" |
4 | 4 | @register="register" |
5 | - title="收款单汇总" | |
6 | - width="80%" | |
5 | + title="应收款汇总" | |
6 | + width="60%" | |
7 | + okText="导出" | |
7 | 8 | :isDetail="true" |
8 | 9 | :showDetailBack="false" |
9 | 10 | @ok="handleOk" |
... | ... | @@ -30,36 +31,36 @@ |
30 | 31 | { |
31 | 32 | title: '生产科名称', |
32 | 33 | dataIndex: 'productionDepartment', |
33 | - width: 50, | |
34 | + width: 150, | |
34 | 35 | customRender: (res) => { |
35 | 36 | // console.log(res, 56562); |
36 | 37 | return res.record.exportVOS[0].productionDepartment; |
37 | 38 | }, |
38 | 39 | }, |
39 | 40 | { |
40 | - title: '生产科总价汇总', | |
41 | + title: '生产科总价汇总¥', | |
41 | 42 | dataIndex: 'productionDepartmentTotalPrice', |
42 | - width: 50, | |
43 | + width: 150, | |
43 | 44 | }, |
44 | 45 | { |
45 | - title: '生产科扣款金额汇总', | |
46 | - dataIndex: 'actualReceivableAmount', | |
47 | - width: 50, | |
46 | + title: '生产科扣款金额汇总¥', | |
47 | + dataIndex: 'deductAmount', | |
48 | + width: 160, | |
48 | 49 | }, |
49 | 50 | { |
50 | - title: '生产科实际应付金额', | |
51 | + title: '生产科实际应付金额¥', | |
51 | 52 | dataIndex: 'calculateActualPayedAmount', |
52 | - width: 50, | |
53 | + width: 160, | |
53 | 54 | }, |
54 | 55 | { |
55 | - title: '实际付款金额汇总', | |
56 | + title: '实际付款金额汇总¥', | |
56 | 57 | dataIndex: 'actualPayedAmount', |
57 | - width: 50, | |
58 | + width: 160, | |
58 | 59 | }, |
59 | 60 | { |
60 | - title: '未付金额', | |
61 | + title: '未付金额¥', | |
61 | 62 | dataIndex: 'unPayedAmount', |
62 | - width: 50, | |
63 | + width: 150, | |
63 | 64 | }, |
64 | 65 | ]; |
65 | 66 | // const ids = ref<number[]>([]); |
... | ... | @@ -79,7 +80,7 @@ |
79 | 80 | const arrayRes = ref([]); |
80 | 81 | arrayRes.value.push(res); |
81 | 82 | console.log(res, 56561); |
82 | - return arrayRes.value; | |
83 | + return res; | |
83 | 84 | }, |
84 | 85 | columns: columnsAnalysis, |
85 | 86 | bordered: true, | ... | ... |
src/views/project/finance/pay/FinanceEdit.vue
... | ... | @@ -32,15 +32,15 @@ |
32 | 32 | |
33 | 33 | const emit = defineEmits(['success']); |
34 | 34 | const schemas: FormSchema[] = [ |
35 | - { | |
36 | - field: 'actualPayedAmount', | |
37 | - component: 'InputNumber', | |
38 | - labelWidth: 250, | |
39 | - colProps: { | |
40 | - span: 23, | |
41 | - }, | |
42 | - label: '生产科实际应付金额', | |
43 | - }, | |
35 | + // { | |
36 | + // field: 'actualPayedAmount', | |
37 | + // component: 'InputNumber', | |
38 | + // labelWidth: 250, | |
39 | + // colProps: { | |
40 | + // span: 23, | |
41 | + // }, | |
42 | + // label: '生产科实际应付金额', | |
43 | + // }, | |
44 | 44 | { |
45 | 45 | field: 'actualPayedAmount1', |
46 | 46 | component: 'InputNumber', |
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | colProps: { |
49 | 49 | span: 23, |
50 | 50 | }, |
51 | - label: '实际应付金额1', | |
51 | + label: '实际应付金额1¥', | |
52 | 52 | }, |
53 | 53 | { |
54 | 54 | field: 'actualPayedAmount2', |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | colProps: { |
58 | 58 | span: 23, |
59 | 59 | }, |
60 | - label: '实际应付金额2', | |
60 | + label: '实际应付金额2¥', | |
61 | 61 | }, |
62 | 62 | { |
63 | 63 | field: 'actualPayedAmount3', |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | colProps: { |
67 | 67 | span: 23, |
68 | 68 | }, |
69 | - label: '实际应付金额3', | |
69 | + label: '实际应付金额3¥', | |
70 | 70 | }, |
71 | 71 | ]; |
72 | 72 | const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({ | ... | ... |
src/views/project/finance/pay/InvoiceUpload.vue
... | ... | @@ -32,8 +32,8 @@ |
32 | 32 | import { updateInvoiceInfo } from '@/api/project/invoice'; |
33 | 33 | |
34 | 34 | const emit = defineEmits(['success']); |
35 | - const uploadUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
36 | - const updateInvoiceUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
35 | + const uploadUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
36 | + const updateInvoiceUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
37 | 37 | const invoiceUrl = ref(); |
38 | 38 | const id = ref(); |
39 | 39 | ... | ... |
src/views/project/finance/pay/TrackEdit.vue
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | :destroyOnClose="true" |
14 | 14 | > |
15 | 15 | <div> |
16 | - <div style="font-size: 15px">生产科扣款金额</div> | |
16 | + <div style="font-size: 15px">生产科扣款金额¥</div> | |
17 | 17 | <a-input v-model:value="input1" placeholder="请输入" auto-size /> |
18 | 18 | <div style="margin: 16px 0"></div> |
19 | 19 | <div style="font-size: 15px">扣款责任部门</div> |
... | ... | @@ -57,8 +57,8 @@ |
57 | 57 | const id = ref(); |
58 | 58 | const checkNo = ref(); |
59 | 59 | const deductDept = ref(); |
60 | - const uploadUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
61 | - const updateDeductUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
60 | + const uploadUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
61 | + const updateDeductUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
62 | 62 | const deductUrlOld = ref(); |
63 | 63 | const { createMessage } = useMessage(); |
64 | 64 | const { error } = createMessage; | ... | ... |
src/views/project/finance/pay/pay.data.tsx
... | ... | @@ -53,9 +53,9 @@ export const columns: BasicColumn[] = [ |
53 | 53 | width: 140, |
54 | 54 | }, |
55 | 55 | { |
56 | - title: '生产科扣款金额', | |
56 | + title: '生产科扣款金额¥', | |
57 | 57 | dataIndex: 'deductAmount', |
58 | - width: 120, | |
58 | + width: 160, | |
59 | 59 | }, |
60 | 60 | { |
61 | 61 | title: '扣款责任部门', |
... | ... | @@ -75,9 +75,9 @@ export const columns: BasicColumn[] = [ |
75 | 75 | }, |
76 | 76 | }, |
77 | 77 | { |
78 | - title: '生产科实际应付金额', | |
78 | + title: '生产科实际应付金额¥', | |
79 | 79 | dataIndex: 'actualPayedAmount', |
80 | - width: 150, | |
80 | + width: 180, | |
81 | 81 | }, |
82 | 82 | { |
83 | 83 | title: '生产科发票上传', |
... | ... | @@ -88,23 +88,23 @@ export const columns: BasicColumn[] = [ |
88 | 88 | if (deductUrl == undefined) { |
89 | 89 | return; |
90 | 90 | } |
91 | - return <FilePptOutlined style="font-size:25px" onClick={() => window.open(deductUrl)} />; | |
91 | + return <FilePptOutlined style="font-size:25px" />; | |
92 | 92 | }, |
93 | 93 | }, |
94 | 94 | { |
95 | - title: '实际付款金额1', | |
95 | + title: '实际付款金额1¥', | |
96 | 96 | dataIndex: 'actualPayedAmount1', |
97 | - width: 120, | |
97 | + width: 160, | |
98 | 98 | }, |
99 | 99 | { |
100 | - title: '实际付款金额2', | |
100 | + title: '实际付款金额2¥', | |
101 | 101 | dataIndex: 'actualPayedAmount2', |
102 | - width: 120, | |
102 | + width: 160, | |
103 | 103 | }, |
104 | 104 | { |
105 | - title: '实际付款金额3', | |
105 | + title: '实际付款金额3¥', | |
106 | 106 | dataIndex: 'actualPayedAmount3', |
107 | - width: 120, | |
107 | + width: 160, | |
108 | 108 | }, |
109 | 109 | { |
110 | 110 | title: '生产科发票审核', | ... | ... |
src/views/project/finance/receive/FinanceEdit.vue
... | ... | @@ -32,15 +32,15 @@ |
32 | 32 | |
33 | 33 | const emit = defineEmits(['success']); |
34 | 34 | const schemas: FormSchema[] = [ |
35 | - { | |
36 | - field: 'actualReceivableAmount', | |
37 | - component: 'InputNumber', | |
38 | - labelWidth: 250, | |
39 | - colProps: { | |
40 | - span: 23, | |
41 | - }, | |
42 | - label: '实际应收金额', | |
43 | - }, | |
35 | + // { | |
36 | + // field: 'actualReceivableAmount', | |
37 | + // component: 'InputNumber', | |
38 | + // labelWidth: 250, | |
39 | + // colProps: { | |
40 | + // span: 23, | |
41 | + // }, | |
42 | + // label: '实际应收金额', | |
43 | + // }, | |
44 | 44 | { |
45 | 45 | field: 'actualPayedAmount1', |
46 | 46 | component: 'InputNumber', |
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | colProps: { |
49 | 49 | span: 23, |
50 | 50 | }, |
51 | - label: '实际应收金额1', | |
51 | + label: '实际应收金额1$', | |
52 | 52 | }, |
53 | 53 | { |
54 | 54 | field: 'actualPayedAmount2', |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | colProps: { |
58 | 58 | span: 23, |
59 | 59 | }, |
60 | - label: '实际应收金额2', | |
60 | + label: '实际应收金额2$', | |
61 | 61 | }, |
62 | 62 | { |
63 | 63 | field: 'actualPayedAmount3', |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | colProps: { |
67 | 67 | span: 23, |
68 | 68 | }, |
69 | - label: '实际应收金额3', | |
69 | + label: '实际应收金额3$', | |
70 | 70 | }, |
71 | 71 | { |
72 | 72 | field: 'otherAmount', |
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | colProps: { |
76 | 76 | span: 23, |
77 | 77 | }, |
78 | - label: '其他费用金额', | |
78 | + label: '其他费用金额$', | |
79 | 79 | }, |
80 | 80 | ]; |
81 | 81 | const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({ | ... | ... |
src/views/project/finance/receive/InvoiceAnalysis.vue
... | ... | @@ -3,7 +3,8 @@ |
3 | 3 | v-bind="$attrs" |
4 | 4 | @register="register" |
5 | 5 | title="收款单分析" |
6 | - width="80%" | |
6 | + width="60%" | |
7 | + okText="导出" | |
7 | 8 | :isDetail="true" |
8 | 9 | :showDetailBack="false" |
9 | 10 | @ok="handleOk" |
... | ... | @@ -37,33 +38,33 @@ |
37 | 38 | }, |
38 | 39 | }, |
39 | 40 | { |
40 | - title: '实际应付金额总计', | |
41 | - dataIndex: 'actualPayedAmount', | |
41 | + title: '客户总金额汇总$', | |
42 | + dataIndex: 'customerTotalPrice', | |
42 | 43 | width: 50, |
43 | 44 | }, |
44 | 45 | { |
45 | - title: '实际应收金额总计', | |
46 | - dataIndex: 'actualReceivableAmount', | |
46 | + title: '客户扣款金额汇总$', | |
47 | + dataIndex: 'deductAmount', | |
47 | 48 | width: 50, |
48 | 49 | }, |
49 | 50 | { |
50 | - title: '客户总价', | |
51 | - dataIndex: 'customerTotalPrice', | |
51 | + title: '实际应收款$', | |
52 | + dataIndex: 'otherAmount', | |
52 | 53 | width: 50, |
53 | 54 | }, |
54 | 55 | { |
55 | - title: '发生扣款金额总计', | |
56 | - dataIndex: 'deductAmount', | |
56 | + title: '实际收款金额汇总$', | |
57 | + dataIndex: 'actualReceivableAmount', | |
57 | 58 | width: 50, |
58 | 59 | }, |
59 | 60 | { |
60 | - title: '实际应收', | |
61 | - dataIndex: 'otherAmount', | |
61 | + title: '其他费用金额汇总$', | |
62 | + dataIndex: 'otherTotalAmount', | |
62 | 63 | width: 50, |
63 | 64 | }, |
64 | 65 | { |
65 | - title: '其他费用金额汇总', | |
66 | - dataIndex: 'otherTotalAmount', | |
66 | + title: '未收金额合计$', | |
67 | + dataIndex: 'actualPayedAmount', | |
67 | 68 | width: 50, |
68 | 69 | }, |
69 | 70 | ]; |
... | ... | @@ -84,7 +85,9 @@ |
84 | 85 | const arrayRes = ref([]); |
85 | 86 | arrayRes.value.push(res); |
86 | 87 | console.log(res, 56561); |
87 | - return arrayRes.value; | |
88 | + console.log(arrayRes.value, '56562'); | |
89 | + return res; | |
90 | + // return arrayRes.value; | |
88 | 91 | }, |
89 | 92 | columns: columnsAnalysis, |
90 | 93 | bordered: true, | ... | ... |
src/views/project/finance/receive/TrackEdit.vue
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | :destroyOnClose="true" |
14 | 14 | > |
15 | 15 | <div> |
16 | - <div style="font-size: 15px">客户扣款金额</div> | |
16 | + <div style="font-size: 15px">客户扣款金额$</div> | |
17 | 17 | <a-input v-model:value="input1" placeholder="请输入" auto-size /> |
18 | 18 | <div style="margin: 16px 0"></div> |
19 | 19 | <div>上传扣款单</div |
... | ... | @@ -53,8 +53,8 @@ |
53 | 53 | const deductUrl = ref(); |
54 | 54 | const id = ref(); |
55 | 55 | const invoiceNo = ref(); |
56 | - const uploadUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
57 | - const updateDeductUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
56 | + const uploadUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
57 | + const updateDeductUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
58 | 58 | const deductUrlOld = ref(); |
59 | 59 | const { createMessage } = useMessage(); |
60 | 60 | const { error } = createMessage; | ... | ... |
src/views/project/finance/receive/index.vue
src/views/project/finance/receive/receive.data.tsx
... | ... | @@ -58,7 +58,7 @@ export const columns: BasicColumn[] = [ |
58 | 58 | width: 120, |
59 | 59 | }, |
60 | 60 | { |
61 | - title: '发生扣款金额', | |
61 | + title: '发生扣款金额$', | |
62 | 62 | dataIndex: 'deductAmount', |
63 | 63 | width: 120, |
64 | 64 | }, |
... | ... | @@ -76,27 +76,27 @@ export const columns: BasicColumn[] = [ |
76 | 76 | }, |
77 | 77 | }, |
78 | 78 | { |
79 | - title: '实际应收金额', | |
79 | + title: '实际应收金额$', | |
80 | 80 | dataIndex: 'actualReceivableAmount', |
81 | 81 | width: 120, |
82 | 82 | }, |
83 | 83 | { |
84 | - title: '实际收款金额1', | |
84 | + title: '实际收款金额1$', | |
85 | 85 | dataIndex: 'actualPayedAmount1', |
86 | 86 | width: 120, |
87 | 87 | }, |
88 | 88 | { |
89 | - title: '实际收款金额2', | |
89 | + title: '实际收款金额2$', | |
90 | 90 | dataIndex: 'actualPayedAmount2', |
91 | 91 | width: 120, |
92 | 92 | }, |
93 | 93 | { |
94 | - title: '实际收款金额3', | |
94 | + title: '实际收款金额3$', | |
95 | 95 | dataIndex: 'actualPayedAmount3', |
96 | 96 | width: 120, |
97 | 97 | }, |
98 | 98 | { |
99 | - title: '其他费用', | |
99 | + title: '其他费用$', | |
100 | 100 | dataIndex: 'otherAmount', |
101 | 101 | width: 120, |
102 | 102 | }, |
... | ... | @@ -120,7 +120,7 @@ export const columns: BasicColumn[] = [ |
120 | 120 | |
121 | 121 | export const columnsAnalysis: BasicColumn[] = [ |
122 | 122 | { |
123 | - title: '实际应付金额总计', | |
123 | + title: '实际应付金额总计$', | |
124 | 124 | dataIndex: 'actualPayedAmount', |
125 | 125 | width: 50, |
126 | 126 | // customRender: (column) => { |
... | ... | @@ -129,32 +129,32 @@ export const columnsAnalysis: BasicColumn[] = [ |
129 | 129 | // }, |
130 | 130 | }, |
131 | 131 | { |
132 | - title: '实际应收金额总计', | |
132 | + title: '实际应收金额总计$', | |
133 | 133 | dataIndex: 'actualReceivableAmount', |
134 | 134 | width: 50, |
135 | 135 | }, |
136 | 136 | { |
137 | - title: '客户总价', | |
137 | + title: '客户总价$', | |
138 | 138 | dataIndex: 'customerTotalPrice', |
139 | 139 | width: 50, |
140 | 140 | }, |
141 | 141 | { |
142 | - title: '发生扣款金额总计', | |
142 | + title: '发生扣款金额总计$', | |
143 | 143 | dataIndex: 'deductAmount', |
144 | 144 | width: 50, |
145 | 145 | }, |
146 | 146 | { |
147 | - title: '实际应收金额总计', | |
147 | + title: '实际应收金额总计$', | |
148 | 148 | dataIndex: 'actualReceivableAmount', |
149 | 149 | width: 50, |
150 | 150 | }, |
151 | 151 | { |
152 | - title: '实际应收', | |
152 | + title: '实际应收$', | |
153 | 153 | dataIndex: 'otherAmount', |
154 | 154 | width: 50, |
155 | 155 | }, |
156 | 156 | { |
157 | - title: '其他费用金额汇总', | |
157 | + title: '其他费用金额汇总$', | |
158 | 158 | dataIndex: 'otherTotalAmount', |
159 | 159 | width: 50, |
160 | 160 | }, | ... | ... |
src/views/project/order/InvoiceCreate.vue
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | width="500px" |
7 | 7 | :bodyStyle="{ height: '300px' }" |
8 | 8 | @ok="handleOk" |
9 | + @visible-change="handleShow" | |
9 | 10 | > |
10 | 11 | <div> |
11 | 12 | <div style="font-size: 15px">Invoice编号</div> |
... | ... | @@ -38,7 +39,7 @@ |
38 | 39 | |
39 | 40 | const Input1 = ref(''); |
40 | 41 | const Input2 = ref(); |
41 | - const uploadUrl = ref('http://47.104.8.35:18000/api/localStorage/upload_file_oss?name='); | |
42 | + const uploadUrl = ref('http://47.104.8.35:8081/api/localStorage/upload_file_oss?name='); | |
42 | 43 | const bgUrl = ref(); |
43 | 44 | const orderIds = ref(); |
44 | 45 | |
... | ... | @@ -66,4 +67,10 @@ |
66 | 67 | function beforeUpload(info) { |
67 | 68 | uploadUrl.value += info.name; |
68 | 69 | } |
70 | + function handleShow(visible: boolean) { | |
71 | + if (!visible) { | |
72 | + Input1.value = ''; | |
73 | + fileList.value = []; | |
74 | + } | |
75 | + } | |
69 | 76 | </script> | ... | ... |
src/views/project/order/ProductInvoice.vue
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | width="500px" |
7 | 7 | :bodyStyle="{ height: '140px' }" |
8 | 8 | @ok="handleOk" |
9 | + @visible-change="handleShow" | |
9 | 10 | > |
10 | 11 | <a-space direction="vertical"> |
11 | 12 | <div style="margin: 16px 0"></div> |
... | ... | @@ -56,6 +57,11 @@ |
56 | 57 | }); |
57 | 58 | closeModal(); |
58 | 59 | } |
60 | + function handleShow(visible: boolean) { | |
61 | + if (!visible) { | |
62 | + Input1.value = ''; | |
63 | + } | |
64 | + } | |
59 | 65 | </script> |
60 | 66 | <style scoped> |
61 | 67 | .divAll { | ... | ... |
src/views/project/order/ProductProfit.vue
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | <td style="border: 1px solid black; width: 20%"></td> |
101 | 101 | </tr> |
102 | 102 | <tr> |
103 | - <td style="border: 1px solid black; width: 40%" colspan="2">内部生产提交</td> | |
103 | + <td style="border: 1px solid black; width: 40%" colspan="2">内部生产提成</td> | |
104 | 104 | <td style="border: 1px solid black; width: 20%">{{ innerProduceTotalPrice }}</td> |
105 | 105 | <td style="border: 1px solid black; width: 20%"></td> |
106 | 106 | <td style="border: 1px solid black; width: 20%"></td> |
... | ... | @@ -133,10 +133,10 @@ |
133 | 133 | const innerProduceTotalPrice = ref(); // 内部生产提成 |
134 | 134 | const innerProduceTotalProfit = ref(); // 内部生产净利润 |
135 | 135 | const predictRatio = ref(); // 预算占比 |
136 | - const predictRatioDeduct = ref(); // 预算占比差 | |
136 | + const predictRatioDeduct = ref(0); // 预算占比差 | |
137 | 137 | const productionActualPrice = ref(); // 实际发生费用 |
138 | 138 | const productionDepartmentPredictPrice = ref(); // 生产科预算金额 |
139 | - const productionDepartmentTotalPrice = ref(); // 生产科总价合计 | |
139 | + const productionDepartmentTotalPrice = ref(0); // 生产科总价合计 | |
140 | 140 | const projectDays = ref(); // 生产持续时间 |
141 | 141 | const sumCount = ref(0); |
142 | 142 | const sumMoney = ref(0); |
... | ... | @@ -148,12 +148,22 @@ |
148 | 148 | const ids = ref(); |
149 | 149 | |
150 | 150 | const [register, { closeModal }] = useModalInner(async (data) => { |
151 | + console.log(data, '5656datapro'); | |
151 | 152 | res.value = data.data; |
153 | + filteredItems.value = data.filteredItems; | |
154 | + filteredItems.value.forEach((item) => { | |
155 | + console.log(item); | |
156 | + if (item?.profitAnalysisInfo == undefined) { | |
157 | + item.profitAnalysisInfo = { productionDepartmentTotalPrice: 0 }; // 这里初始化 | |
158 | + } | |
159 | + sumMoney.value += item?.profitAnalysisInfo?.productionDepartmentTotalPrice; | |
160 | + sumCount.value += item.orderCount; | |
161 | + }); | |
152 | 162 | customerCode.value = data.customerCode[0][0]; |
153 | 163 | const extractedValues = ref<string[]>(data.projectNo.map((item) => item[0])); |
154 | - projectNo.value = extractedValues.value; | |
164 | + projectNo.value = extractedValues.value.join(','); | |
155 | 165 | ids.value = data.data; |
156 | - console.log(data.projectNo, '5656projectNo'); | |
166 | + console.log(customerCode.value, '5656customerCode.value'); | |
157 | 167 | console.log(Input2.value, 565656); |
158 | 168 | filteredItems.value = data.filteredItems; |
159 | 169 | }); |
... | ... | @@ -194,7 +204,7 @@ |
194 | 204 | // 创建一个链接元素用于下载 |
195 | 205 | const link = document.createElement('a'); |
196 | 206 | link.href = window.URL.createObjectURL(blob); |
197 | - link.download = `内部生产净利润分析${date}.pdf`; // 你可以为文件命名 | |
207 | + link.download = `内部生产净利润分析${date}.xlsx`; // 你可以为文件命名 | |
198 | 208 | document.body.appendChild(link); |
199 | 209 | link.click(); // 自动点击链接,触发下载 |
200 | 210 | console.log(link, 5656); |
... | ... | @@ -205,14 +215,41 @@ |
205 | 215 | }); |
206 | 216 | closeModal(); |
207 | 217 | } |
218 | + // function handleShow(visible: boolean) { | |
219 | + // if (visible) { | |
220 | + // projectStartTime.value = null; | |
221 | + // projectEndTime.value = null; | |
222 | + // productionDepartmentPredictPrice.value = null; | |
223 | + // productionActualPrice.value = null; | |
224 | + // projectNo.value = null; | |
225 | + // ids.value = null; | |
226 | + // } | |
227 | + // } | |
208 | 228 | function handleShow(visible: boolean) { |
209 | 229 | if (visible) { |
210 | - projectStartTime.value = null; | |
211 | - projectEndTime.value = null; | |
212 | - productionDepartmentPredictPrice.value = null; | |
213 | - productionActualPrice.value = null; | |
214 | - projectNo.value = null; | |
215 | - ids.value = null; | |
230 | + projectStartTime.value = null; // 项目开发开始时间 | |
231 | + projectEndTime.value = null; // 项目开发结束时间 | |
232 | + productionDepartmentPredictPrice.value = null; // 生产科预算金额 | |
233 | + productionActualPrice.value = null; // 实际发生费用 | |
234 | + projectNo.value = null; // 项目号 | |
235 | + ids.value = null; // 假设存在的 ID 列表 | |
236 | + | |
237 | + // 新增的数据 | |
238 | + Input1.value = ''; // 输入框 1 | |
239 | + Input2.value = null; // 输入框 2 | |
240 | + res.value = null; // 结果 | |
241 | + customerCode.value = null; // 客户编码 | |
242 | + grossProfit.value = null; // 内部生产毛利润 | |
243 | + innerProduceFixProfit.value = null; // 内部生产固定成本 | |
244 | + innerProduceTotalPrice.value = null; // 内部生产提成 | |
245 | + innerProduceTotalProfit.value = null; // 内部生产净利润 | |
246 | + predictRatio.value = null; // 预算占比 | |
247 | + predictRatioDeduct.value = 0; // 预算占比差 | |
248 | + productionDepartmentTotalPrice.value = 0; // 生产科总价合计 | |
249 | + projectDays.value = null; // 生产持续时间 | |
250 | + sumCount.value = 0; // 总计数量 | |
251 | + sumMoney.value = 0; // 总金额 | |
252 | + filteredItems.value = null; // 筛选后的项目 | |
216 | 253 | } |
217 | 254 | } |
218 | 255 | function formatDateTime(dateTime: string): string { |
... | ... | @@ -241,13 +278,13 @@ |
241 | 278 | productionDepartmentPredictPrice.value = res.productionDepartmentPredictPrice; |
242 | 279 | productionDepartmentTotalPrice.value = res.productionDepartmentTotalPrice; |
243 | 280 | projectDays.value = res.projectDays; |
244 | - predictRatioDeduct.value = 1 - predictRatio.value; | |
281 | + predictRatioDeduct.value = res.predictAndActualRatio; | |
245 | 282 | console.log(filteredItems.value, '5656filteredItems'); |
246 | - filteredItems.value.forEach((item) => { | |
247 | - sumMoney.value += item.profitAnalysisInfo.productionDepartmentTotalPrice; | |
248 | - sumCount.value += item.orderCount; | |
249 | - }); | |
250 | - console.log(sumMoney.value, '5656filteredItems', sumCount.value); | |
283 | + // filteredItems.value.forEach((item) => { | |
284 | + // sumMoney.value += item.profitAnalysisInfo.productionDepartmentTotalPrice; | |
285 | + // sumCount.value += item.orderCount; | |
286 | + // }); | |
287 | + // console.log(sumMoney.value, '5656filteredItems', sumCount.value); | |
251 | 288 | } |
252 | 289 | </script> |
253 | 290 | <style scoped> | ... | ... |
src/views/project/order/ServiceProfit.vue
... | ... | @@ -146,20 +146,13 @@ |
146 | 146 | <td style="border: 1px solid black">{{ orderCount }}</td> |
147 | 147 | <td style="border: 1px solid black"></td> |
148 | 148 | </tr> |
149 | - <tr> | |
150 | - <td style="border: 1px solid black" colspan="2">实际汇率</td> | |
151 | - <td style="border: 1px solid black" | |
152 | - ><a-input v-model:value="actualRatio" placeholder="请输入" | |
153 | - /></td> | |
154 | - <td style="border: 1px solid black"></td> | |
155 | - </tr> | |
156 | - <tr> | |
149 | + <!-- <tr> | |
157 | 150 | <td style="border: 1px solid black" colspan="2">实际跟单费用</td> |
158 | 151 | <td style="border: 1px solid black" |
159 | 152 | ><a-input v-model:value="actualdocumentaryPrice" placeholder="请输入" |
160 | 153 | /></td> |
161 | 154 | <td style="border: 1px solid black"></td> |
162 | - </tr> | |
155 | + </tr> --> | |
163 | 156 | <tr> |
164 | 157 | <td style="border: 1px solid black" colspan="2">实际跟单单价=实际跟单费用/件数</td> |
165 | 158 | <td style="border: 1px solid black">{{ actualRmbPrice }}</td> |
... | ... | @@ -176,6 +169,13 @@ |
176 | 169 | <td style="border: 1px solid black"></td> |
177 | 170 | </tr> |
178 | 171 | <tr> |
172 | + <td style="border: 1px solid black" colspan="2">实际汇率</td> | |
173 | + <td style="border: 1px solid black" | |
174 | + ><a-input v-model:value="actualRatio" placeholder="请输入" | |
175 | + /></td> | |
176 | + <td style="border: 1px solid black"></td> | |
177 | + </tr> | |
178 | + <tr> | |
179 | 179 | <td style="border: 1px solid black" colspan="2">汇率收益</td> |
180 | 180 | <td style="border: 1px solid black">{{ actualRatioProfitPrice }}</td> |
181 | 181 | <td style="border: 1px solid black"></td> |
... | ... | @@ -226,7 +226,7 @@ |
226 | 226 | const chinaRatioProfitPrice = ref(); //中国团队提成比例 |
227 | 227 | const developProfit = ref(); //研发贸易利润 |
228 | 228 | const fixCost = ref(); // 固定成本 |
229 | - const orderCount = ref(); //订单总数量 | |
229 | + const orderCount = ref(0); //订单总数量 | |
230 | 230 | const outTotalPrice = ref(); //支出合计计 |
231 | 231 | const packetProfitPrice = ref(); //包装费用收益计算 |
232 | 232 | const packetTotalPrice = ref(); //包装费用合计¥ |
... | ... | @@ -238,12 +238,16 @@ |
238 | 238 | // const orderRes = await getOrderList({}); |
239 | 239 | // console.log(orderRes, '5656orderRes'); |
240 | 240 | const [register, { closeModal }] = useModalInner(async (data) => { |
241 | + console.log(data, '5656yewudata'); | |
241 | 242 | res.value = data.data; |
242 | 243 | orderList.value = data.res; |
244 | + orderList.value.forEach((item) => { | |
245 | + orderCount.value += item.orderCount; | |
246 | + }); | |
243 | 247 | customerCode.value = data.customerCode[0][0]; |
244 | 248 | ids.value = data.data; |
245 | 249 | const extractedValues = ref<string[]>(data.projectNo.map((item) => item[0])); |
246 | - projectNo.value = extractedValues.value; | |
250 | + projectNo.value = extractedValues.value.join(','); | |
247 | 251 | console.log(orderList.value, 565656); |
248 | 252 | }); |
249 | 253 | async function handleOk() { |
... | ... | @@ -259,7 +263,7 @@ |
259 | 263 | produceStartTime: produceStartTime.value, |
260 | 264 | produceEndTime: produceEndTime.value, |
261 | 265 | developTotalPrice: developTotalPrice.value, |
262 | - actualdocumentaryPrice: actualdocumentaryPrice.value, | |
266 | + // actualdocumentaryPrice: actualdocumentaryPrice.value, | |
263 | 267 | copyTotalPrice: copyTotalPrice.value, |
264 | 268 | spainRatio: spainRatio.value, |
265 | 269 | chinaRatio: chinaRatio.value, |
... | ... | @@ -292,7 +296,7 @@ |
292 | 296 | // 创建一个链接元素用于下载 |
293 | 297 | const link = document.createElement('a'); |
294 | 298 | link.href = window.URL.createObjectURL(blob); |
295 | - link.download = `业务/研发净利润分析${date}.pdf`; // 你可以为文件命名 | |
299 | + link.download = `业务/研发净利润分析${date}.xlsx`; // 你可以为文件命名 | |
296 | 300 | document.body.appendChild(link); |
297 | 301 | link.click(); // 自动点击链接,触发下载 |
298 | 302 | console.log(link, 5656); |
... | ... | @@ -303,19 +307,60 @@ |
303 | 307 | }); |
304 | 308 | closeModal(); |
305 | 309 | } |
310 | + // function handleShow(visible: boolean) { | |
311 | + // if (visible) { | |
312 | + // projectStartTime.value = null; | |
313 | + // projectEndTime.value = null; | |
314 | + // produceStartTime.value = null; | |
315 | + // produceEndTime.value = null; | |
316 | + // customerCode.value = null; | |
317 | + // projectNo.value = null; | |
318 | + // ids.value = null; | |
319 | + // developTotalPrice.value = null; | |
320 | + // actualdocumentaryPrice.value = null; | |
321 | + // copyTotalPrice.value = null; | |
322 | + // packetActualTotalPrice.value = null; | |
323 | + // orderCount.value = 0; | |
324 | + // } | |
325 | + // } | |
306 | 326 | function handleShow(visible: boolean) { |
307 | 327 | if (visible) { |
308 | - projectStartTime.value = null; | |
309 | - projectEndTime.value = null; | |
310 | - produceStartTime.value = null; | |
311 | - produceEndTime.value = null; | |
312 | - customerCode.value = null; | |
313 | - projectNo.value = null; | |
314 | - ids.value = null; | |
315 | - developTotalPrice.value = null; | |
316 | - actualdocumentaryPrice.value = null; | |
317 | - copyTotalPrice.value = null; | |
318 | - packetActualTotalPrice.value = null; | |
328 | + projectStartTime.value = null; // 项目开发开始时间 | |
329 | + projectEndTime.value = null; // 项目开发结束时间 | |
330 | + produceStartTime.value = null; // 生产开始时间 | |
331 | + produceEndTime.value = null; // 生产结束时间 | |
332 | + customerCode.value = null; // 客户编码 | |
333 | + projectNo.value = null; // 项目号 | |
334 | + ids.value = null; // 假设存在的 ID 列表 | |
335 | + developTotalPrice.value = null; // 开发总价格 | |
336 | + actualdocumentaryPrice.value = null; // 实际跟单费用 | |
337 | + copyTotalPrice.value = null; // 复制总价格 | |
338 | + packetActualTotalPrice.value = null; // 包装实际总价格 | |
339 | + orderCount.value = 0; // 订单总数量 | |
340 | + | |
341 | + // 新增的数据 - 修改的位置 | |
342 | + testinput.value = null; // 新增输入框 | |
343 | + Input1.value = ''; // 输入框 1 | |
344 | + Input2.value = null; // 输入框 2 | |
345 | + res.value = null; // 结果 | |
346 | + orderList.value = null; // 订单列表 | |
347 | + spainRatio.value = 0; // 西班牙比例 | |
348 | + chinaRatio.value = 0; // 中国比例 | |
349 | + actualRmbPrice.value = 0; // 实际跟单单价 | |
350 | + actualPrice.value = 0; // 实际跟单单价折算美金 | |
351 | + actualRatio.value = null; // 实际汇率 | |
352 | + customerTotalPrice.value = null; // 客户总价合计 | |
353 | + actualRatioProfitPrice.value = null; // 汇率收益 | |
354 | + grossProfit.value = null; // 毛利润合计 | |
355 | + chinaRatioProfitPrice.value = null; // 中国团队提成比例 | |
356 | + developProfit.value = null; // 研发贸易利润 | |
357 | + fixCost.value = null; // 固定成本 | |
358 | + outTotalPrice.value = null; // 支出合计 | |
359 | + packetProfitPrice.value = null; // 包装费用收益计算 | |
360 | + packetTotalPrice.value = null; // 包装费用合计 | |
361 | + productionDepartmentTotalPrice.value = null; // 生成科总价 | |
362 | + totalProfitPrice.value = null; // 综合收益计算 | |
363 | + spainRatioProfitPrice.value = null; // 西班牙提成金额 | |
319 | 364 | } |
320 | 365 | } |
321 | 366 | //提成接口 |
... | ... | @@ -352,6 +397,7 @@ |
352 | 397 | actualPrice.value = actualRmbPrice.value / actualRatio.value; |
353 | 398 | // const ratioList = (await getList({ settingType: 3 })) as Array<RatioListItem>; |
354 | 399 | const ratioList = (await getList({ settingType: 3 })) as RatioList; |
400 | + console.log(ratioList, '5656ratioList'); | |
355 | 401 | const ratios = ratioList.items.filter((item) => item.settingValue === customerCode.value); |
356 | 402 | console.log(ratios, '5656ratios'); |
357 | 403 | const ratioAll = JSON.parse(ratios[0].relationValue); |
... | ... | @@ -368,7 +414,7 @@ |
368 | 414 | produceStartTime: produceStartTime.value, |
369 | 415 | produceEndTime: produceEndTime.value, |
370 | 416 | developTotalPrice: developTotalPrice.value, |
371 | - actualdocumentaryPrice: actualdocumentaryPrice.value, | |
417 | + // actualdocumentaryPrice: actualdocumentaryPrice.value, | |
372 | 418 | copyTotalPrice: copyTotalPrice.value, |
373 | 419 | spainRatio: spainRatio.value, |
374 | 420 | chinaRatio: chinaRatio.value, |
... | ... | @@ -387,7 +433,7 @@ |
387 | 433 | produceStartTime: produceStartTime.value, |
388 | 434 | produceEndTime: produceEndTime.value, |
389 | 435 | developTotalPrice: developTotalPrice.value, |
390 | - actualdocumentaryPrice: actualdocumentaryPrice.value, | |
436 | + // actualdocumentaryPrice: actualdocumentaryPrice.value, | |
391 | 437 | copyTotalPrice: copyTotalPrice.value, |
392 | 438 | spainRatio: spainRatio.value, |
393 | 439 | chinaRatio: chinaRatio.value, | ... | ... |