Commit 447fa3f368d341506951602e38e324d83ac8b534
1 parent
862e532e
fix: bug修复
Showing
25 changed files
with
160 additions
and
90 deletions
src/api/project/approve.ts
@@ -43,7 +43,6 @@ export const getApprovedListApi = async (params: any) => { | @@ -43,7 +43,6 @@ export const getApprovedListApi = async (params: any) => { | ||
43 | res.records = res.records.map((item) => { | 43 | res.records = res.records.map((item) => { |
44 | return item; | 44 | return item; |
45 | }); | 45 | }); |
46 | - console.log(res, '56567ressss'); | ||
47 | return new Promise((resolve) => { | 46 | return new Promise((resolve) => { |
48 | resolve({ items: res.records, total: res.total }); | 47 | resolve({ items: res.records, total: res.total }); |
49 | }); | 48 | }); |
src/views/project/config/ProduCostCreate.vue
@@ -25,6 +25,12 @@ | @@ -25,6 +25,12 @@ | ||
25 | ><span style="margin-right: 8px; width: 80%">提成单价:</span> | 25 | ><span style="margin-right: 8px; width: 80%">提成单价:</span> |
26 | <a-input v-model:value="ratio" /> | 26 | <a-input v-model:value="ratio" /> |
27 | </div> | 27 | </div> |
28 | + <div | ||
29 | + ><span style="margin-right: 8px; width: 80%">年份:</span> | ||
30 | + <a-select v-model:value="year" style="width: 100%"> | ||
31 | + <a-select-option v-for="y in yearOptions" :key="y" :value="y">{{ y }}</a-select-option> | ||
32 | + </a-select> | ||
33 | + </div> | ||
28 | </a-space> | 34 | </a-space> |
29 | </BasicModal> | 35 | </BasicModal> |
30 | </template> | 36 | </template> |
@@ -54,6 +60,13 @@ | @@ -54,6 +60,13 @@ | ||
54 | //获取现有的列表 | 60 | //获取现有的列表 |
55 | const listAll = ref(); | 61 | const listAll = ref(); |
56 | const fixCost = ref(); | 62 | const fixCost = ref(); |
63 | + const year = ref(new Date().getFullYear().toString()); | ||
64 | + // Generate year options from 2023 to current year | ||
65 | + const currentYear = new Date().getFullYear(); | ||
66 | + const yearOptions = ref<string[]>([]); | ||
67 | + for (let y = 2023; y <= currentYear; y++) { | ||
68 | + yearOptions.value.push(y.toString()); | ||
69 | + } | ||
57 | const ratio = ref(); | 70 | const ratio = ref(); |
58 | // const relationValue = ref(); | 71 | // const relationValue = ref(); |
59 | const customerCode = ref(); | 72 | const customerCode = ref(); |
@@ -91,7 +104,7 @@ | @@ -91,7 +104,7 @@ | ||
91 | settingValue: customerCode.value, | 104 | settingValue: customerCode.value, |
92 | settingType: 4, | 105 | settingType: 4, |
93 | relationCode: 'ProduceSettingItem', | 106 | relationCode: 'ProduceSettingItem', |
94 | - relationName: '成本配置项集合', | 107 | + relationName: year.value, |
95 | costSettingItemVOS: relationValue.value, | 108 | costSettingItemVOS: relationValue.value, |
96 | }); | 109 | }); |
97 | emit('modal-success'); | 110 | emit('modal-success'); |
@@ -108,6 +121,8 @@ | @@ -108,6 +121,8 @@ | ||
108 | activeUser, | 121 | activeUser, |
109 | fixCost, | 122 | fixCost, |
110 | ratio, | 123 | ratio, |
124 | + year, | ||
125 | + yearOptions, | ||
111 | customerCode, | 126 | customerCode, |
112 | customerCodeOptions, | 127 | customerCodeOptions, |
113 | handleOk, | 128 | handleOk, |
src/views/project/config/ProduCostEdit.vue
@@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
17 | <a-space direction="vertical" style="width: 100%"> | 17 | <a-space direction="vertical" style="width: 100%"> |
18 | <a-input v-model:value="fixCost" addonBefore="固定成本 " /> | 18 | <a-input v-model:value="fixCost" addonBefore="固定成本 " /> |
19 | <a-input v-model:value="ratio" addonBefore="提成单价 " /> | 19 | <a-input v-model:value="ratio" addonBefore="提成单价 " /> |
20 | + <a-input v-model:value="year" :disabled="true" addonBefore="年份 " /> | ||
20 | </a-space> | 21 | </a-space> |
21 | </BasicDrawer> | 22 | </BasicDrawer> |
22 | </template> | 23 | </template> |
@@ -35,13 +36,14 @@ | @@ -35,13 +36,14 @@ | ||
35 | relationValue.value = JSON.parse(listAll.value.relationValue); | 36 | relationValue.value = JSON.parse(listAll.value.relationValue); |
36 | fixCost.value = relationValue.value[0].relationValue; | 37 | fixCost.value = relationValue.value[0].relationValue; |
37 | ratio.value = relationValue.value[1].relationValue; | 38 | ratio.value = relationValue.value[1].relationValue; |
39 | + year.value = listAll.value.relationName; | ||
38 | }); | 40 | }); |
39 | //获取现有的列表 | 41 | //获取现有的列表 |
40 | const listAll = ref(); | 42 | const listAll = ref(); |
41 | const fixCost = ref(); | 43 | const fixCost = ref(); |
42 | const ratio = ref(); | 44 | const ratio = ref(); |
43 | const relationValue = ref(); | 45 | const relationValue = ref(); |
44 | - | 46 | + const year = ref(); |
45 | //完成编辑 | 47 | //完成编辑 |
46 | async function handleSubmit() { | 48 | async function handleSubmit() { |
47 | relationValue.value[0].relationValue = fixCost.value; | 49 | relationValue.value[0].relationValue = fixCost.value; |
@@ -53,7 +55,7 @@ | @@ -53,7 +55,7 @@ | ||
53 | settingValue: listAll.value.settingValue, | 55 | settingValue: listAll.value.settingValue, |
54 | settingType: 4, | 56 | settingType: 4, |
55 | relationCode: 'ProduceSettingItem', | 57 | relationCode: 'ProduceSettingItem', |
56 | - relationName: '成本配置项集合', | 58 | + relationName: year.value, |
57 | costSettingItemVOS: relationValue.value, | 59 | costSettingItemVOS: relationValue.value, |
58 | }); | 60 | }); |
59 | emit('success'); | 61 | emit('success'); |
src/views/project/config/TablePanel.vue
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 46 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
47 | import CreateModal from './CreateModal.vue'; | 47 | import CreateModal from './CreateModal.vue'; |
48 | import { deleteConfig, getList, saveConfig } from '/@/api/sys/config'; | 48 | import { deleteConfig, getList, saveConfig } from '/@/api/sys/config'; |
49 | - import { COLUMNS } from './data'; | 49 | + import { COLUMNS, searchFormSchema } from './data'; |
50 | import { useModal } from '/@/components/Modal'; | 50 | import { useModal } from '/@/components/Modal'; |
51 | import { useDrawer } from '/@/components/Drawer'; | 51 | import { useDrawer } from '/@/components/Drawer'; |
52 | import CostEdit from './costEdit.vue'; | 52 | import CostEdit from './costEdit.vue'; |
@@ -74,6 +74,10 @@ | @@ -74,6 +74,10 @@ | ||
74 | pagination: false, | 74 | pagination: false, |
75 | columns: COLUMNS[props.column!], | 75 | columns: COLUMNS[props.column!], |
76 | rowKey: 'id', | 76 | rowKey: 'id', |
77 | + useSearchForm: props.column === 6 || props.column === 9, | ||
78 | + formConfig: { | ||
79 | + schemas: props.column === 6 || props.column === 9 ? searchFormSchema : [], | ||
80 | + }, | ||
77 | actionColumn: { | 81 | actionColumn: { |
78 | width: 160, | 82 | width: 160, |
79 | title: 'Action', | 83 | title: 'Action', |
src/views/project/config/costCreate.vue
@@ -29,6 +29,12 @@ | @@ -29,6 +29,12 @@ | ||
29 | ><span style="margin-right: 8px; width: 80%">西班牙提成比例:</span> | 29 | ><span style="margin-right: 8px; width: 80%">西班牙提成比例:</span> |
30 | <a-input v-model:value="spainRatio" /> | 30 | <a-input v-model:value="spainRatio" /> |
31 | </div> | 31 | </div> |
32 | + <div | ||
33 | + ><span style="margin-right: 8px; width: 80%">年份:</span> | ||
34 | + <a-select v-model:value="year" style="width: 100%"> | ||
35 | + <a-select-option v-for="y in yearOptions" :key="y" :value="y">{{ y }}</a-select-option> | ||
36 | + </a-select> | ||
37 | + </div> | ||
32 | <!-- <div | 38 | <!-- <div |
33 | ><span style="margin-right: 8px; width: 80%">生产提成单价:</span> | 39 | ><span style="margin-right: 8px; width: 80%">生产提成单价:</span> |
34 | <a-input v-model:value="price" /> | 40 | <a-input v-model:value="price" /> |
@@ -65,6 +71,13 @@ | @@ -65,6 +71,13 @@ | ||
65 | const ratio = ref(); | 71 | const ratio = ref(); |
66 | const spainRatio = ref(); | 72 | const spainRatio = ref(); |
67 | const price = ref(); | 73 | const price = ref(); |
74 | + const year = ref(new Date().getFullYear().toString()); | ||
75 | + // Generate year options from 2023 to current year | ||
76 | + const currentYear = new Date().getFullYear(); | ||
77 | + const yearOptions = ref<string[]>([]); | ||
78 | + for (let y = 2023; y <= currentYear; y++) { | ||
79 | + yearOptions.value.push(y.toString()); | ||
80 | + } | ||
68 | // const relationValue = ref(); | 81 | // const relationValue = ref(); |
69 | const customerCode = ref(); | 82 | const customerCode = ref(); |
70 | const relationValue = ref([ | 83 | const relationValue = ref([ |
@@ -89,8 +102,6 @@ | @@ -89,8 +102,6 @@ | ||
89 | // relationValue: '', | 102 | // relationValue: '', |
90 | // }, | 103 | // }, |
91 | ]); | 104 | ]); |
92 | - // const loading = ref(true); | ||
93 | - | ||
94 | const { customerCode: customerCodeOptions } = useOrderInfo(orderStore); | 105 | const { customerCode: customerCodeOptions } = useOrderInfo(orderStore); |
95 | 106 | ||
96 | function handleShow(visible: boolean) { | 107 | function handleShow(visible: boolean) { |
@@ -124,7 +135,7 @@ | @@ -124,7 +135,7 @@ | ||
124 | settingValue: customerCode.value, | 135 | settingValue: customerCode.value, |
125 | settingType: 3, | 136 | settingType: 3, |
126 | relationCode: 'costSettingItem', | 137 | relationCode: 'costSettingItem', |
127 | - relationName: '成本配置项集合', | 138 | + relationName: year.value, |
128 | costSettingItemVOS: relationValue.value, | 139 | costSettingItemVOS: relationValue.value, |
129 | }); | 140 | }); |
130 | emit('modal-success'); | 141 | emit('modal-success'); |
@@ -144,6 +155,8 @@ | @@ -144,6 +155,8 @@ | ||
144 | spainRatio, | 155 | spainRatio, |
145 | price, | 156 | price, |
146 | customerCode, | 157 | customerCode, |
158 | + year, | ||
159 | + yearOptions, | ||
147 | customerCodeOptions, | 160 | customerCodeOptions, |
148 | handleOk, | 161 | handleOk, |
149 | }; | 162 | }; |
src/views/project/config/costEdit.vue
@@ -18,6 +18,7 @@ | @@ -18,6 +18,7 @@ | ||
18 | <a-input v-model:value="fixCost" addonBefore="固定成本 " /> | 18 | <a-input v-model:value="fixCost" addonBefore="固定成本 " /> |
19 | <a-input v-model:value="ratio" addonBefore="提成比例 " /> | 19 | <a-input v-model:value="ratio" addonBefore="提成比例 " /> |
20 | <a-input v-model:value="spainRatio" addonBefore="西班牙提成比例 " /> | 20 | <a-input v-model:value="spainRatio" addonBefore="西班牙提成比例 " /> |
21 | + <a-input v-model:value="year" :disabled="true" addonBefore="年份 " /> | ||
21 | <!-- <a-input v-model:value="price" addonBefore="生产提成单价" /> --> | 22 | <!-- <a-input v-model:value="price" addonBefore="生产提成单价" /> --> |
22 | </a-space> | 23 | </a-space> |
23 | </BasicDrawer> | 24 | </BasicDrawer> |
@@ -40,6 +41,7 @@ | @@ -40,6 +41,7 @@ | ||
40 | spainRatio.value = relationValue.value[2].relationValue | 41 | spainRatio.value = relationValue.value[2].relationValue |
41 | ? (parseFloat(relationValue.value[2].relationValue) * 100).toFixed(2) + '%' | 42 | ? (parseFloat(relationValue.value[2].relationValue) * 100).toFixed(2) + '%' |
42 | : ''; | 43 | : ''; |
44 | + year.value = listAll.value.relationName; | ||
43 | }); | 45 | }); |
44 | //获取现有的列表 | 46 | //获取现有的列表 |
45 | const listAll = ref(); | 47 | const listAll = ref(); |
@@ -47,6 +49,7 @@ | @@ -47,6 +49,7 @@ | ||
47 | const ratio = ref(); | 49 | const ratio = ref(); |
48 | const spainRatio = ref(); | 50 | const spainRatio = ref(); |
49 | const relationValue = ref(); | 51 | const relationValue = ref(); |
52 | + const year = ref(); | ||
50 | 53 | ||
51 | // 格式化百分比值,去除百分号并除以100 | 54 | // 格式化百分比值,去除百分号并除以100 |
52 | function formatPercentage(value) { | 55 | function formatPercentage(value) { |
@@ -72,7 +75,7 @@ | @@ -72,7 +75,7 @@ | ||
72 | settingValue: listAll.value.settingValue, | 75 | settingValue: listAll.value.settingValue, |
73 | settingType: 3, | 76 | settingType: 3, |
74 | relationCode: 'costSettingItem', | 77 | relationCode: 'costSettingItem', |
75 | - relationName: '成本配置项集合', | 78 | + relationName: year.value, |
76 | costSettingItemVOS: relationValue.value, | 79 | costSettingItemVOS: relationValue.value, |
77 | }); | 80 | }); |
78 | emit('success'); | 81 | emit('success'); |
src/views/project/config/data.tsx
1 | import { Tag } from 'ant-design-vue'; | 1 | import { Tag } from 'ant-design-vue'; |
2 | import { BasicColumn } from '@/components/Table'; | 2 | import { BasicColumn } from '@/components/Table'; |
3 | import { h } from 'vue'; | 3 | import { h } from 'vue'; |
4 | +import { queryNoOptions } from '/@/api/project/order'; | ||
4 | 5 | ||
5 | export const COLUMNS = { | 6 | export const COLUMNS = { |
6 | 1: [ | 7 | 1: [ |
@@ -66,6 +67,11 @@ export const COLUMNS = { | @@ -66,6 +67,11 @@ export const COLUMNS = { | ||
66 | width: 150, | 67 | width: 150, |
67 | }, | 68 | }, |
68 | { | 69 | { |
70 | + title: '年份', | ||
71 | + dataIndex: 'relationName', | ||
72 | + width: 150, | ||
73 | + }, | ||
74 | + { | ||
69 | title: '固定成本', | 75 | title: '固定成本', |
70 | dataIndex: 'relationValue', | 76 | dataIndex: 'relationValue', |
71 | width: 150, | 77 | width: 150, |
@@ -137,6 +143,11 @@ export const COLUMNS = { | @@ -137,6 +143,11 @@ export const COLUMNS = { | ||
137 | width: 150, | 143 | width: 150, |
138 | }, | 144 | }, |
139 | { | 145 | { |
146 | + title: '年份', | ||
147 | + dataIndex: 'relationName', | ||
148 | + width: 150, | ||
149 | + }, | ||
150 | + { | ||
140 | title: '固定成本', | 151 | title: '固定成本', |
141 | dataIndex: 'relationValue', | 152 | dataIndex: 'relationValue', |
142 | width: 150, | 153 | width: 150, |
@@ -256,3 +267,23 @@ export const columnsProduct: BasicColumn[] = [ | @@ -256,3 +267,23 @@ export const columnsProduct: BasicColumn[] = [ | ||
256 | editRow: true, | 267 | editRow: true, |
257 | }, | 268 | }, |
258 | ]; | 269 | ]; |
270 | + | ||
271 | +export const searchFormSchema = [ | ||
272 | + { | ||
273 | + field: 'relationName', | ||
274 | + label: '年份', | ||
275 | + component: 'Select', | ||
276 | + colProps: { span: 8 }, | ||
277 | + componentProps: { | ||
278 | + showSearch: true, | ||
279 | + options: (() => { | ||
280 | + const options = []; | ||
281 | + const currentYear = new Date().getFullYear(); | ||
282 | + for (let y = 2023; y <= currentYear; y++) { | ||
283 | + options.push({ label: y.toString(), value: y.toString() }); | ||
284 | + } | ||
285 | + return options; | ||
286 | + })(), | ||
287 | + }, | ||
288 | + }, | ||
289 | +] | ||
259 | \ No newline at end of file | 290 | \ No newline at end of file |
src/views/project/config/index.vue
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <TablePanel :searchInfo="{ relationCode: 'orderHodTime' }" :column="5" /> | 22 | <TablePanel :searchInfo="{ relationCode: 'orderHodTime' }" :column="5" /> |
23 | </Tabs.TabPane> | 23 | </Tabs.TabPane> |
24 | <Tabs.TabPane key="6" tab="提成成本配置"> | 24 | <Tabs.TabPane key="6" tab="提成成本配置"> |
25 | - <TablePanel :searchInfo="{ relationCode: 'costSettingItem' }" :column="6" /> | 25 | + <TablePanel :searchInfo="{ relationCode: 'costSettingItem', relationName: currentYear }" :column="6" /> |
26 | </Tabs.TabPane> | 26 | </Tabs.TabPane> |
27 | <Tabs.TabPane key="7" tab="销售额配置" v-if="role !== ROLE.FINANCE"> | 27 | <Tabs.TabPane key="7" tab="销售额配置" v-if="role !== ROLE.FINANCE"> |
28 | <TablePanel :searchInfo="{ relationCode: 'salesAmount' }" :column="7" /> | 28 | <TablePanel :searchInfo="{ relationCode: 'salesAmount' }" :column="7" /> |
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | <TablePanel :searchInfo="{ relationCode: 'produHodTime' }" :column="8" /> | 31 | <TablePanel :searchInfo="{ relationCode: 'produHodTime' }" :column="8" /> |
32 | </Tabs.TabPane> | 32 | </Tabs.TabPane> |
33 | <Tabs.TabPane key="9" tab="生产科固定成本"> | 33 | <Tabs.TabPane key="9" tab="生产科固定成本"> |
34 | - <TablePanel :searchInfo="{ relationCode: 'ProduceSettingItem' }" :column="9" /> | 34 | + <TablePanel :searchInfo="{ relationCode: 'ProduceSettingItem', relationName: currentYear }" :column="9" /> |
35 | </Tabs.TabPane> | 35 | </Tabs.TabPane> |
36 | <Tabs.TabPane key="10" tab="客户公司" v-if="role !== ROLE.FINANCE"> | 36 | <Tabs.TabPane key="10" tab="客户公司" v-if="role !== ROLE.FINANCE"> |
37 | <TablePanel :searchInfo="{ relationCode: 'companyConfiguration' }" :column="10" /> | 37 | <TablePanel :searchInfo="{ relationCode: 'companyConfiguration' }" :column="10" /> |
@@ -56,6 +56,7 @@ | @@ -56,6 +56,7 @@ | ||
56 | const orderStore = useOrderStoreWithOut(); | 56 | const orderStore = useOrderStoreWithOut(); |
57 | const userStore = useUserStoreWithOut(); | 57 | const userStore = useUserStoreWithOut(); |
58 | const user = userStore.getUserInfo; | 58 | const user = userStore.getUserInfo; |
59 | + const currentYear = new Date().getFullYear().toString(); | ||
59 | const role = computed(() => { | 60 | const role = computed(() => { |
60 | return user?.roleSmallVO?.code; | 61 | return user?.roleSmallVO?.code; |
61 | }); | 62 | }); |
src/views/project/finance/financeList/index.vue
@@ -497,7 +497,6 @@ | @@ -497,7 +497,6 @@ | ||
497 | }); | 497 | }); |
498 | } | 498 | } |
499 | function handleDeleteDeduct(record) { | 499 | function handleDeleteDeduct(record) { |
500 | - console.log(record, '5656record'); | ||
501 | deleteDeduct({ id: record.invoiceId }); | 500 | deleteDeduct({ id: record.invoiceId }); |
502 | } | 501 | } |
503 | function handleCheckDeleteDeduct(record) { | 502 | function handleCheckDeleteDeduct(record) { |
src/views/project/finance/financeProfit/ProductProfit/InnerData/FinanceEdit.vue
@@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
51 | <script lang="ts" setup> | 51 | <script lang="ts" setup> |
52 | import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; | 52 | import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; |
53 | import { BasicForm, FormSchema, useForm } from '@/components/Form'; | 53 | import { BasicForm, FormSchema, useForm } from '@/components/Form'; |
54 | - import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; | 54 | + import { defineComponent, ref, computed, watch, toRaw, reactive } from 'vue'; |
55 | import { getPackageEdit } from '@/api/project/invoice'; | 55 | import { getPackageEdit } from '@/api/project/invoice'; |
56 | import { useMessage } from '/@/hooks/web/useMessage'; | 56 | import { useMessage } from '/@/hooks/web/useMessage'; |
57 | import { ROLE } from './type.d'; | 57 | import { ROLE } from './type.d'; |
@@ -141,8 +141,14 @@ | @@ -141,8 +141,14 @@ | ||
141 | const input3 = ref(); | 141 | const input3 = ref(); |
142 | const orderCount = ref(); | 142 | const orderCount = ref(); |
143 | const id = ref(); | 143 | const id = ref(); |
144 | + watch(input3, (newVal) => { | ||
145 | + if (newVal && orderCount.value) { | ||
146 | + input1.value = (parseFloat(newVal) * parseFloat(orderCount.value)).toFixed(2); | ||
147 | + } else { | ||
148 | + input1.value = ''; | ||
149 | + } | ||
150 | + }); | ||
144 | const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { | 151 | const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { |
145 | - console.log(data,'5656fdsfa'); | ||
146 | // 方式1 | 152 | // 方式1 |
147 | if (data.data?.lockFields) { | 153 | if (data.data?.lockFields) { |
148 | status1.value = data.data?.lockFields?.productionDepartmentPredictPrice; | 154 | status1.value = data.data?.lockFields?.productionDepartmentPredictPrice; |
src/views/project/finance/financeProfit/ProductProfit/InnerData/HistoryDetail.vue
@@ -136,7 +136,7 @@ | @@ -136,7 +136,7 @@ | ||
136 | if (index === 1) { | 136 | if (index === 1) { |
137 | const res = await getOrderCostDetailedOptLog({ | 137 | const res = await getOrderCostDetailedOptLog({ |
138 | orderId: data, | 138 | orderId: data, |
139 | - type: 40, | 139 | + type: [40], |
140 | page: page, | 140 | page: page, |
141 | pageSize: 20, | 141 | pageSize: 20, |
142 | }); | 142 | }); |
@@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
146 | } else { | 146 | } else { |
147 | const res = await getOrderCostDetailedOptLog({ | 147 | const res = await getOrderCostDetailedOptLog({ |
148 | orderId: data, | 148 | orderId: data, |
149 | - type: 70, | 149 | + type: [90,91], |
150 | page: page, | 150 | page: page, |
151 | pageSize: 20, | 151 | pageSize: 20, |
152 | }); | 152 | }); |
src/views/project/finance/financeProfit/ProductProfit/InnerData/index.vue
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | message.value = ''; | 111 | message.value = ''; |
112 | } | 112 | } |
113 | }; | 113 | }; |
114 | - const [registerTable, { reload, setSelectedRowKeys }] = useTable({ | 114 | + const [registerTable, { reload, setSelectedRowKeys, getForm }] = useTable({ |
115 | api: getInnerProfit, | 115 | api: getInnerProfit, |
116 | bordered: true, | 116 | bordered: true, |
117 | columns: COLUMNS, | 117 | columns: COLUMNS, |
@@ -298,28 +298,35 @@ | @@ -298,28 +298,35 @@ | ||
298 | } | 298 | } |
299 | 299 | ||
300 | function handleExport() { | 300 | function handleExport() { |
301 | - console.log('Selected data:', { | ||
302 | - orderIds: orderIds.value, | ||
303 | - projectNo: projectNo.value, | ||
304 | - customerCode: customerCode.value, | ||
305 | - innerNo: innerNo.value, | ||
306 | - productionDepartment: productionDepartment.value | ||
307 | - }); | ||
308 | - if (checkedKeys.value.length <= 0) { | ||
309 | - createMessage.warn('请选择数据!'); | ||
310 | - return; | 301 | + // Get current search parameters from the form |
302 | + const values = getForm().getFieldsValue(); | ||
303 | + | ||
304 | + // Create export parameters based on whether orderIds are selected | ||
305 | + let exportParams; | ||
306 | + | ||
307 | + // If orderIds are selected, only use those and ignore search params | ||
308 | + if (orderIds.value.length > 0) { | ||
309 | + exportParams = { | ||
310 | + orderIds: orderIds.value | ||
311 | + }; | ||
312 | + } | ||
313 | + // Otherwise use the search parameters | ||
314 | + else { | ||
315 | + exportParams = { | ||
316 | + ...values, | ||
317 | + projectNo: values.projectNo || undefined, | ||
318 | + customerCode: values.customerCode || undefined, | ||
319 | + innerNo: values.innerNo || undefined, | ||
320 | + productionDepartment: values.productionDepartment || undefined | ||
321 | + }; | ||
311 | } | 322 | } |
323 | + | ||
324 | + | ||
312 | const token = userStore.getToken; | 325 | const token = userStore.getToken; |
313 | axios | 326 | axios |
314 | .post( | 327 | .post( |
315 | '/basic-api/order/cost/innerProfitDetail/exportExcel', | 328 | '/basic-api/order/cost/innerProfitDetail/exportExcel', |
316 | - { | ||
317 | - orderIds: orderIds.value, | ||
318 | - projectNo: projectNo.value, | ||
319 | - customerCode: customerCode.value, | ||
320 | - innerNo: innerNo.value, | ||
321 | - productionDepartment: productionDepartment.value | ||
322 | - }, | 329 | + exportParams, |
323 | { | 330 | { |
324 | headers: { | 331 | headers: { |
325 | Authorization: `${token}`, | 332 | Authorization: `${token}`, |
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/ApproveReason.vue
@@ -25,7 +25,6 @@ | @@ -25,7 +25,6 @@ | ||
25 | const [register, { setModalProps, redoModalHeight, closeModal }] = useModalInner(async (data) => { | 25 | const [register, { setModalProps, redoModalHeight, closeModal }] = useModalInner(async (data) => { |
26 | baseFieldValues.value = data.data; | 26 | baseFieldValues.value = data.data; |
27 | baseFieldValues.value.projectNoPrefix = data.id; | 27 | baseFieldValues.value.projectNoPrefix = data.id; |
28 | - console.log(data, '5656appr'); | ||
29 | }); | 28 | }); |
30 | async function handleOk() { | 29 | async function handleOk() { |
31 | baseFieldValues.value.applyRemark = input.value; | 30 | baseFieldValues.value.applyRemark = input.value; |
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/CheckDetail.vue
@@ -77,7 +77,6 @@ | @@ -77,7 +77,6 @@ | ||
77 | const [register, { closeDrawer }] = useDrawerInner((data) => { | 77 | const [register, { closeDrawer }] = useDrawerInner((data) => { |
78 | Object.assign(lockFields, data.lockFields); | 78 | Object.assign(lockFields, data.lockFields); |
79 | id.value = data.projectNoPrefix; | 79 | id.value = data.projectNoPrefix; |
80 | - console.log(data, '5656checkdetail'); | ||
81 | }); | 80 | }); |
82 | function handleCloseModal() { | 81 | function handleCloseModal() { |
83 | closeDrawer(); | 82 | closeDrawer(); |
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/FinanceEdit.vue
@@ -188,7 +188,6 @@ | @@ -188,7 +188,6 @@ | ||
188 | status6.value = data?.data?.lockFields?.actualExchangeRate; | 188 | status6.value = data?.data?.lockFields?.actualExchangeRate; |
189 | } | 189 | } |
190 | id.value = data?.data?.projectNoPrefix; | 190 | id.value = data?.data?.projectNoPrefix; |
191 | - console.log(data.data, '5656datafff'); | ||
192 | input1.value = data?.data?.developmentCopyRmbTotalPrice?.toFixed(2); | 191 | input1.value = data?.data?.developmentCopyRmbTotalPrice?.toFixed(2); |
193 | input2.value = data?.data?.spainPaidRmbCommission?.toFixed(2); | 192 | input2.value = data?.data?.spainPaidRmbCommission?.toFixed(2); |
194 | input3.value = data?.data?.produceStartTime ? dayjs(data?.data?.produceStartTime) : null; | 193 | input3.value = data?.data?.produceStartTime ? dayjs(data?.data?.produceStartTime) : null; |
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/HistoryDetail.vue
@@ -136,7 +136,7 @@ | @@ -136,7 +136,7 @@ | ||
136 | if (index === 1) { | 136 | if (index === 1) { |
137 | const res = await getProjectOptLog({ | 137 | const res = await getProjectOptLog({ |
138 | projectNoPrefix: data, | 138 | projectNoPrefix: data, |
139 | - type: 30, | 139 | + type: [30], |
140 | page: page, | 140 | page: page, |
141 | pageSize: 20 | 141 | pageSize: 20 |
142 | }); | 142 | }); |
@@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
146 | } else { | 146 | } else { |
147 | const res = await getProjectOptLog({ | 147 | const res = await getProjectOptLog({ |
148 | projectNoPrefix: data, | 148 | projectNoPrefix: data, |
149 | - type: 1, | 149 | + type: [1,3], |
150 | page: page, | 150 | page: page, |
151 | pageSize: 20 | 151 | pageSize: 20 |
152 | }); | 152 | }); |
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/index.vue
@@ -212,7 +212,6 @@ | @@ -212,7 +212,6 @@ | ||
212 | }); | 212 | }); |
213 | 213 | ||
214 | function handleFinanceEdit(record) { | 214 | function handleFinanceEdit(record) { |
215 | - console.log(record, '565656ddd'); | ||
216 | openFinanceEdit(true, { | 215 | openFinanceEdit(true, { |
217 | data: record, | 216 | data: record, |
218 | }); | 217 | }); |
@@ -360,7 +359,6 @@ | @@ -360,7 +359,6 @@ | ||
360 | setSelectedRowKeys(checkedKeys.value as any); | 359 | setSelectedRowKeys(checkedKeys.value as any); |
361 | } | 360 | } |
362 | function handleExport() { | 361 | function handleExport() { |
363 | - console.log(detailProjectNoKeys.value, '5656detailProjectNoKeys.value'); | ||
364 | if (checkedKeys.value.length <= 0) { | 362 | if (checkedKeys.value.length <= 0) { |
365 | createMessage.warn('请选择数据!'); | 363 | createMessage.warn('请选择数据!'); |
366 | return; | 364 | return; |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/HistoryDetail.vue
@@ -136,7 +136,7 @@ | @@ -136,7 +136,7 @@ | ||
136 | if (index === 1) { | 136 | if (index === 1) { |
137 | const res = await getOrderCostDetailedOptLog({ | 137 | const res = await getOrderCostDetailedOptLog({ |
138 | orderId: data, | 138 | orderId: data, |
139 | - type: 20, | 139 | + type: [20], |
140 | page: page, | 140 | page: page, |
141 | pageSize: 20 | 141 | pageSize: 20 |
142 | }); | 142 | }); |
@@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
146 | } else { | 146 | } else { |
147 | const res = await getOrderCostDetailedOptLog({ | 147 | const res = await getOrderCostDetailedOptLog({ |
148 | orderId: data, | 148 | orderId: data, |
149 | - type: 60, | 149 | + type: [80,81], |
150 | page: page, | 150 | page: page, |
151 | pageSize: 20 | 151 | pageSize: 20 |
152 | }); | 152 | }); |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/index.vue
@@ -115,7 +115,7 @@ | @@ -115,7 +115,7 @@ | ||
115 | message.value = ''; | 115 | message.value = ''; |
116 | } | 116 | } |
117 | }; | 117 | }; |
118 | - const [registerTable, { reload, setSelectedRowKeys }] = useTable({ | 118 | + const [registerTable, { reload, setSelectedRowKeys, getForm }] = useTable({ |
119 | api: getPackageProfit, | 119 | api: getPackageProfit, |
120 | bordered: true, | 120 | bordered: true, |
121 | columns: COLUMNS, | 121 | columns: COLUMNS, |
@@ -301,28 +301,36 @@ | @@ -301,28 +301,36 @@ | ||
301 | } | 301 | } |
302 | 302 | ||
303 | function handleExport() { | 303 | function handleExport() { |
304 | - console.log('Selected data:', { | ||
305 | - orderIds: orderIds.value, | ||
306 | - projectNo: projectNo.value, | ||
307 | - customerCode: customerCode.value, | ||
308 | - innerNo: innerNo.value, | ||
309 | - productionDepartment: productionDepartment.value | ||
310 | - }); | ||
311 | - if (checkedKeys.value.length <= 0) { | ||
312 | - createMessage.warn('请选择数据!'); | ||
313 | - return; | 304 | + // Get current search parameters from the form |
305 | + const values = getForm().getFieldsValue(); | ||
306 | + | ||
307 | + // Create export parameters based on whether orderIds are selected | ||
308 | + let exportParams; | ||
309 | + | ||
310 | + // If orderIds are selected, only use those and ignore search params | ||
311 | + if (orderIds.value.length > 0) { | ||
312 | + exportParams = { | ||
313 | + orderIds: orderIds.value | ||
314 | + }; | ||
315 | + } | ||
316 | + // Otherwise use the search parameters | ||
317 | + else { | ||
318 | + exportParams = { | ||
319 | + ...values, | ||
320 | + projectNo: values.projectNo || undefined, | ||
321 | + customerCode: values.customerCode || undefined, | ||
322 | + innerNo: values.innerNo || undefined, | ||
323 | + productionDepartment: values.productionDepartment || undefined | ||
324 | + }; | ||
314 | } | 325 | } |
326 | + | ||
327 | + console.log('Export parameters:', exportParams); | ||
328 | + | ||
315 | const token = userStore.getToken; | 329 | const token = userStore.getToken; |
316 | axios | 330 | axios |
317 | .post( | 331 | .post( |
318 | '/basic-api/order/cost/businessProfitDetail/exportExcel', | 332 | '/basic-api/order/cost/businessProfitDetail/exportExcel', |
319 | - { | ||
320 | - orderIds: orderIds.value, | ||
321 | - projectNo: projectNo.value, | ||
322 | - customerCode: customerCode.value, | ||
323 | - innerNo: innerNo.value, | ||
324 | - productionDepartment: productionDepartment.value | ||
325 | - }, | 333 | + exportParams, |
326 | { | 334 | { |
327 | headers: { | 335 | headers: { |
328 | Authorization: `${token}`, // 去掉引号 | 336 | Authorization: `${token}`, // 去掉引号 |
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/FinanceEdit.vue
@@ -46,14 +46,6 @@ | @@ -46,14 +46,6 @@ | ||
46 | auto-size | 46 | auto-size |
47 | /> | 47 | /> |
48 | <div style="margin: 16px 0"></div> | 48 | <div style="margin: 16px 0"></div> |
49 | - <div style="font-size: 15px">实际汇率¥</div> | ||
50 | - <a-input | ||
51 | - v-model:value="input6" | ||
52 | - placeholder="请输入" | ||
53 | - :disabled="status6 === 'LOCKED'" | ||
54 | - auto-size | ||
55 | - /> | ||
56 | - <div style="margin: 16px 0"></div> | ||
57 | <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | 49 | <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> |
58 | <template #appendFooter> | 50 | <template #appendFooter> |
59 | <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> | 51 | <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> |
@@ -146,7 +138,6 @@ | @@ -146,7 +138,6 @@ | ||
146 | const status3 = ref(); | 138 | const status3 = ref(); |
147 | const status4 = ref(); | 139 | const status4 = ref(); |
148 | const status5 = ref(); | 140 | const status5 = ref(); |
149 | - const status6 = ref(); | ||
150 | 141 | ||
151 | const input1 = ref(); | 142 | const input1 = ref(); |
152 | const input2 = ref(); | 143 | const input2 = ref(); |
@@ -154,7 +145,6 @@ | @@ -154,7 +145,6 @@ | ||
154 | const input4 = ref(); | 145 | const input4 = ref(); |
155 | 146 | ||
156 | const input5 = ref(); | 147 | const input5 = ref(); |
157 | - const input6 = ref(); | ||
158 | const id = ref(); | 148 | const id = ref(); |
159 | // function formatDate(dateStr: string): string { | 149 | // function formatDate(dateStr: string): string { |
160 | // const date = new Date(dateStr); | 150 | // const date = new Date(dateStr); |
@@ -185,7 +175,6 @@ | @@ -185,7 +175,6 @@ | ||
185 | status3.value = data?.data?.lockFields?.projectStartTime; | 175 | status3.value = data?.data?.lockFields?.projectStartTime; |
186 | status4.value = data?.data?.lockFields?.projectEndTime; | 176 | status4.value = data?.data?.lockFields?.projectEndTime; |
187 | status5.value = data?.data?.lockFields?.paidRmbCommission; | 177 | status5.value = data?.data?.lockFields?.paidRmbCommission; |
188 | - status6.value = data?.data?.lockFields?.actualExchangeRate; | ||
189 | } | 178 | } |
190 | id.value = data?.data?.projectNoPrefix; | 179 | id.value = data?.data?.projectNoPrefix; |
191 | input1.value = data?.data?.developmentCopyRmbTotalPrice.toFixed(2); | 180 | input1.value = data?.data?.developmentCopyRmbTotalPrice.toFixed(2); |
@@ -193,7 +182,6 @@ | @@ -193,7 +182,6 @@ | ||
193 | input3.value = dayjs(formatDateToDateOnly(data?.data?.projectStartTime)); | 182 | input3.value = dayjs(formatDateToDateOnly(data?.data?.projectStartTime)); |
194 | input4.value = dayjs(formatDateToDateOnly(data?.data?.projectEndTime)); | 183 | input4.value = dayjs(formatDateToDateOnly(data?.data?.projectEndTime)); |
195 | input5.value = data?.data?.paidRmbCommission.toFixed(2); | 184 | input5.value = data?.data?.paidRmbCommission.toFixed(2); |
196 | - input6.value = data?.data?.actualExchangeRate.toFixed(2); | ||
197 | 185 | ||
198 | resetFields(); | 186 | resetFields(); |
199 | setDrawerProps({ confirmLoading: false }); | 187 | setDrawerProps({ confirmLoading: false }); |
@@ -220,7 +208,6 @@ | @@ -220,7 +208,6 @@ | ||
220 | projectStartTime: input3.value, | 208 | projectStartTime: input3.value, |
221 | projectEndTime: input4.value, | 209 | projectEndTime: input4.value, |
222 | paidRmbCommission: input5.value, | 210 | paidRmbCommission: input5.value, |
223 | - actualExchangeRate: input6.value, | ||
224 | }); | 211 | }); |
225 | emit('success'); | 212 | emit('success'); |
226 | closeDrawer(); | 213 | closeDrawer(); |
@@ -233,7 +220,6 @@ | @@ -233,7 +220,6 @@ | ||
233 | input3.value = ''; | 220 | input3.value = ''; |
234 | input4.value = ''; | 221 | input4.value = ''; |
235 | input5.value = ''; | 222 | input5.value = ''; |
236 | - input6.value = ''; | ||
237 | } | 223 | } |
238 | } | 224 | } |
239 | </script> | 225 | </script> |
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/HistoryDetail.vue
@@ -136,18 +136,17 @@ | @@ -136,18 +136,17 @@ | ||
136 | if (index === 1) { | 136 | if (index === 1) { |
137 | const res = await getProjectOptLog({ | 137 | const res = await getProjectOptLog({ |
138 | projectNoPrefix: data, | 138 | projectNoPrefix: data, |
139 | - type: 10, | 139 | + type: [10], |
140 | page: page, | 140 | page: page, |
141 | pageSize: 20 | 141 | pageSize: 20 |
142 | }); | 142 | }); |
143 | - console.log(res, '5656res'); | ||
144 | list1.value = res.items; | 143 | list1.value = res.items; |
145 | total1.value = res.total; | 144 | total1.value = res.total; |
146 | page1.value = page; | 145 | page1.value = page; |
147 | } else { | 146 | } else { |
148 | const res = await getProjectOptLog({ | 147 | const res = await getProjectOptLog({ |
149 | projectNoPrefix: data, | 148 | projectNoPrefix: data, |
150 | - type: 0, | 149 | + type: [0,2], |
151 | page: page, | 150 | page: page, |
152 | pageSize: 20 | 151 | pageSize: 20 |
153 | }); | 152 | }); |
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/data.tsx
@@ -302,14 +302,6 @@ export const COLUMNS = [ | @@ -302,14 +302,6 @@ export const COLUMNS = [ | ||
302 | }, | 302 | }, |
303 | }, | 303 | }, |
304 | { | 304 | { |
305 | - title: '实际汇率¥', | ||
306 | - dataIndex: 'actualExchangeRate', | ||
307 | - width: 120, | ||
308 | - customRender: (column) => { | ||
309 | - return column.record?.actualExchangeRate?.toFixed(2); | ||
310 | - }, | ||
311 | - }, | ||
312 | - { | ||
313 | title: '综合收益¥', | 305 | title: '综合收益¥', |
314 | dataIndex: 'comprehensiveProfit', | 306 | dataIndex: 'comprehensiveProfit', |
315 | width: 120, | 307 | width: 120, |
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/index.vue
@@ -207,7 +207,6 @@ | @@ -207,7 +207,6 @@ | ||
207 | } | 207 | } |
208 | 208 | ||
209 | function handleExport() { | 209 | function handleExport() { |
210 | - console.log(detailProjectNoKeys.value, '5656detailProjectNoKeys.value'); | ||
211 | if (checkedKeys.value.length <= 0) { | 210 | if (checkedKeys.value.length <= 0) { |
212 | createMessage.warn('请选择数据!'); | 211 | createMessage.warn('请选择数据!'); |
213 | return; | 212 | return; |
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/tableData.tsx
@@ -62,5 +62,19 @@ export const FIELDS_BASE_INFO = [ | @@ -62,5 +62,19 @@ export const FIELDS_BASE_INFO = [ | ||
62 | label: '实际汇率¥', | 62 | label: '实际汇率¥', |
63 | rules: [{ required: true }], | 63 | rules: [{ required: true }], |
64 | }, | 64 | }, |
65 | + { | ||
66 | + field: 'projectInnerProfitInfoStartTime', | ||
67 | + component: 'Select', | ||
68 | + labelWidth: 150, | ||
69 | + label: '项目开始时间', | ||
70 | + rules: [{ required: true }], | ||
71 | + }, | ||
72 | + { | ||
73 | + field: 'projectInnerProfitInfoEndTime', | ||
74 | + component: 'Select', | ||
75 | + labelWidth: 150, | ||
76 | + label: '项目结束时间', | ||
77 | + rules: [{ required: true }], | ||
78 | + }, | ||
65 | ]; | 79 | ]; |
66 | 80 |
src/views/project/finance/pay/index.vue
@@ -322,9 +322,6 @@ | @@ -322,9 +322,6 @@ | ||
322 | }); | 322 | }); |
323 | } | 323 | } |
324 | 324 | ||
325 | - // console.log(checkedKeys.value, 565666666); // 输出当前的 selectedCustomCodes 值 | ||
326 | - // console.log(selectedCustomCodes.value, 565666666); // 输出当前的 selectedCustomCodes 值 | ||
327 | - // console.log(selectedProductionDepartment.value, 565666666); // 输出当前的 selectedCustomCodes 值 | ||
328 | } | 325 | } |
329 | 326 | ||
330 | function handleFinanceEdit(record) { | 327 | function handleFinanceEdit(record) { |