Commit e5bc083b6cec61be936951360fdeb4519fa42212
1 parent
3a52b75d
fix: 设置已发提成按钮修改,新增备注功能
Showing
5 changed files
with
31 additions
and
30 deletions
src/api/project/invoice.ts
@@ -563,7 +563,7 @@ export const setInnerProfitSetStatus = async (params: any) => { | @@ -563,7 +563,7 @@ export const setInnerProfitSetStatus = async (params: any) => { | ||
563 | }); | 563 | }); |
564 | }; | 564 | }; |
565 | 565 | ||
566 | -export const setCommissionStatus = async (data: { orderIds: number[] }) => { | 566 | +export const setCommissionStatus = async (data: { orderId: number[] }) => { |
567 | return await defHttp.post<any>({ | 567 | return await defHttp.post<any>({ |
568 | url: '/order/cost/setCommissionStatus', | 568 | url: '/order/cost/setCommissionStatus', |
569 | data, | 569 | data, |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/FinanceEdit.vue
@@ -39,6 +39,13 @@ | @@ -39,6 +39,13 @@ | ||
39 | auto-size | 39 | auto-size |
40 | /> | 40 | /> |
41 | <div style="margin: 16px 0"></div> | 41 | <div style="margin: 16px 0"></div> |
42 | + <div style="font-size: 15px">备注</div> | ||
43 | + <a-textarea | ||
44 | + v-model:value="packNotes" | ||
45 | + placeholder="请输入" | ||
46 | + rows="4" | ||
47 | + /> | ||
48 | + <div style="margin: 16px 0"></div> | ||
42 | 49 | ||
43 | <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> | 50 | <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> |
44 | <template #appendFooter> | 51 | <template #appendFooter> |
@@ -55,6 +62,7 @@ | @@ -55,6 +62,7 @@ | ||
55 | import { useMessage } from '/@/hooks/web/useMessage'; | 62 | import { useMessage } from '/@/hooks/web/useMessage'; |
56 | import { ROLE } from './type.d'; | 63 | import { ROLE } from './type.d'; |
57 | 64 | ||
65 | + | ||
58 | const emit = defineEmits(['success']); | 66 | const emit = defineEmits(['success']); |
59 | const role = computed(() => { | 67 | const role = computed(() => { |
60 | return user?.roleSmallVO?.code; | 68 | return user?.roleSmallVO?.code; |
@@ -130,6 +138,7 @@ | @@ -130,6 +138,7 @@ | ||
130 | const { createMessage } = useMessage(); | 138 | const { createMessage } = useMessage(); |
131 | const { error } = createMessage; | 139 | const { error } = createMessage; |
132 | 140 | ||
141 | + const packNotes = ref(); | ||
133 | const update = ref(); | 142 | const update = ref(); |
134 | const status = ref(); | 143 | const status = ref(); |
135 | const status_score = ref(); | 144 | const status_score = ref(); |
@@ -150,6 +159,7 @@ | @@ -150,6 +159,7 @@ | ||
150 | input1.value = data.data?.packetActualRmbTotalPrice; | 159 | input1.value = data.data?.packetActualRmbTotalPrice; |
151 | input2.value = data.data?.orderScore; | 160 | input2.value = data.data?.orderScore; |
152 | input_issuedCommission.value = data.data?.issuedCommission; | 161 | input_issuedCommission.value = data.data?.issuedCommission; |
162 | + packNotes.value = data.data?.packNotes; | ||
153 | resetFields(); | 163 | resetFields(); |
154 | setDrawerProps({ confirmLoading: false }); | 164 | setDrawerProps({ confirmLoading: false }); |
155 | setFieldsValue({ | 165 | setFieldsValue({ |
@@ -168,19 +178,14 @@ | @@ -168,19 +178,14 @@ | ||
168 | setDrawerProps({ confirmLoading: false }); | 178 | setDrawerProps({ confirmLoading: false }); |
169 | } else { | 179 | } else { |
170 | try { | 180 | try { |
171 | - if (!input2.value && !input_issuedCommission.value) { | ||
172 | - await getPackageEdit({ | ||
173 | - orderId: id.value, | ||
174 | - packetActualRmbTotalPrice: input1.value, | ||
175 | - }); | ||
176 | - } else { | ||
177 | - await getPackageEdit({ | ||
178 | - orderId: id.value, | ||
179 | - packetActualRmbTotalPrice: input1.value, | ||
180 | - orderScore: Number(input2.value), | ||
181 | - issuedCommission: Number(input_issuedCommission.value), | ||
182 | - }); | ||
183 | - } | 181 | + const params = { |
182 | + orderId: id.value, | ||
183 | + packetActualRmbTotalPrice: Number(input1.value), | ||
184 | + ...(input2.value ? { orderScore: Number(input2.value) } : {}), | ||
185 | + ...(input_issuedCommission.value ? { issuedCommission: Number(input_issuedCommission.value) } : {}), | ||
186 | + ...(packNotes.value ? { packNotes: packNotes.value } : {}), | ||
187 | + }; | ||
188 | + await getPackageEdit(params); | ||
184 | emit('success'); | 189 | emit('success'); |
185 | } finally { | 190 | } finally { |
186 | loading.value = false; | 191 | loading.value = false; |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/HistoryDetail.vue
@@ -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: [80,81], | 149 | + type: [80,81,82], |
150 | page: page, | 150 | page: page, |
151 | pageSize: 20 | 151 | pageSize: 20 |
152 | }); | 152 | }); |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/data.tsx
@@ -264,6 +264,11 @@ export const COLUMNS = [ | @@ -264,6 +264,11 @@ export const COLUMNS = [ | ||
264 | }, | 264 | }, |
265 | }, | 265 | }, |
266 | { | 266 | { |
267 | + title: '备注', | ||
268 | + dataIndex: 'packNotes', | ||
269 | + width: 200, | ||
270 | + }, | ||
271 | + { | ||
267 | title: '状态', | 272 | title: '状态', |
268 | dataIndex: 'status', | 273 | dataIndex: 'status', |
269 | width: 120, | 274 | width: 120, |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/index.vue
@@ -55,14 +55,6 @@ | @@ -55,14 +55,6 @@ | ||
55 | @click="handleAllProjectNoQuery" | 55 | @click="handleAllProjectNoQuery" |
56 | style="margin-left: 8px;position: fixed;right: 29%;top: 107.5px;" | 56 | style="margin-left: 8px;position: fixed;right: 29%;top: 107.5px;" |
57 | >全选</a-button> | 57 | >全选</a-button> |
58 | - <a-button | ||
59 | - type="primary" | ||
60 | - @click="handleSetCommissionStatus" | ||
61 | - v-if="role == ROLE.ADMIN || role == ROLE.FINANCE" | ||
62 | - :style="{ borderRadius: '5px 5px 5px 5px' }" | ||
63 | - > | ||
64 | - 设置为已发提成 | ||
65 | - </a-button> | ||
66 | </template> | 58 | </template> |
67 | </BasicTable> | 59 | </BasicTable> |
68 | <!-- <BasicModal | 60 | <!-- <BasicModal |
@@ -266,6 +258,10 @@ | @@ -266,6 +258,10 @@ | ||
266 | label: '历史记录', | 258 | label: '历史记录', |
267 | onClick: handleHistoryDetail.bind(null, record), | 259 | onClick: handleHistoryDetail.bind(null, record), |
268 | }, | 260 | }, |
261 | + { | ||
262 | + label: '设置为已发提成', | ||
263 | + onClick: () => handleSetCommissionStatusSingle(record), | ||
264 | + }, | ||
269 | ]; | 265 | ]; |
270 | return actions; | 266 | return actions; |
271 | } | 267 | } |
@@ -577,15 +573,10 @@ | @@ -577,15 +573,10 @@ | ||
577 | } | 573 | } |
578 | } | 574 | } |
579 | 575 | ||
580 | - const handleSetCommissionStatus = async () => { | ||
581 | - if (!orderIds.value.length) { | ||
582 | - createMessage.warning('请先选择要设置的订单'); | ||
583 | - return; | ||
584 | - } | 576 | + const handleSetCommissionStatusSingle = async (record) => { |
585 | try { | 577 | try { |
586 | - await setCommissionStatus({ orderIds: orderIds.value }); | 578 | + await setCommissionStatus({ orderId: record.orderId }); |
587 | createMessage.success('设置成功'); | 579 | createMessage.success('设置成功'); |
588 | - handleClearChoose(); | ||
589 | reload(); | 580 | reload(); |
590 | } catch (e) { | 581 | } catch (e) { |
591 | createMessage.error('设置失败'); | 582 | createMessage.error('设置失败'); |