Commit 8ea188c98aa08fc9f919aedc192d92b62d6e8bc6
Merge branch 'zwl-develop' into 'develop'
fix: 设置已发提成按钮修改,新增备注功能 See merge request !21
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 | 563 | }); |
564 | 564 | }; |
565 | 565 | |
566 | -export const setCommissionStatus = async (data: { orderIds: number[] }) => { | |
566 | +export const setCommissionStatus = async (data: { orderId: number[] }) => { | |
567 | 567 | return await defHttp.post<any>({ |
568 | 568 | url: '/order/cost/setCommissionStatus', |
569 | 569 | data, | ... | ... |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/FinanceEdit.vue
... | ... | @@ -39,6 +39,13 @@ |
39 | 39 | auto-size |
40 | 40 | /> |
41 | 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 | 50 | <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> |
44 | 51 | <template #appendFooter> |
... | ... | @@ -55,6 +62,7 @@ |
55 | 62 | import { useMessage } from '/@/hooks/web/useMessage'; |
56 | 63 | import { ROLE } from './type.d'; |
57 | 64 | |
65 | + | |
58 | 66 | const emit = defineEmits(['success']); |
59 | 67 | const role = computed(() => { |
60 | 68 | return user?.roleSmallVO?.code; |
... | ... | @@ -130,6 +138,7 @@ |
130 | 138 | const { createMessage } = useMessage(); |
131 | 139 | const { error } = createMessage; |
132 | 140 | |
141 | + const packNotes = ref(); | |
133 | 142 | const update = ref(); |
134 | 143 | const status = ref(); |
135 | 144 | const status_score = ref(); |
... | ... | @@ -150,6 +159,7 @@ |
150 | 159 | input1.value = data.data?.packetActualRmbTotalPrice; |
151 | 160 | input2.value = data.data?.orderScore; |
152 | 161 | input_issuedCommission.value = data.data?.issuedCommission; |
162 | + packNotes.value = data.data?.packNotes; | |
153 | 163 | resetFields(); |
154 | 164 | setDrawerProps({ confirmLoading: false }); |
155 | 165 | setFieldsValue({ |
... | ... | @@ -168,19 +178,14 @@ |
168 | 178 | setDrawerProps({ confirmLoading: false }); |
169 | 179 | } else { |
170 | 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 | 189 | emit('success'); |
185 | 190 | } finally { |
186 | 191 | loading.value = false; | ... | ... |
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/HistoryDetail.vue
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/data.tsx
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/index.vue
... | ... | @@ -55,14 +55,6 @@ |
55 | 55 | @click="handleAllProjectNoQuery" |
56 | 56 | style="margin-left: 8px;position: fixed;right: 29%;top: 107.5px;" |
57 | 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 | 58 | </template> |
67 | 59 | </BasicTable> |
68 | 60 | <!-- <BasicModal |
... | ... | @@ -266,6 +258,10 @@ |
266 | 258 | label: '历史记录', |
267 | 259 | onClick: handleHistoryDetail.bind(null, record), |
268 | 260 | }, |
261 | + { | |
262 | + label: '设置为已发提成', | |
263 | + onClick: () => handleSetCommissionStatusSingle(record), | |
264 | + }, | |
269 | 265 | ]; |
270 | 266 | return actions; |
271 | 267 | } |
... | ... | @@ -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 | 577 | try { |
586 | - await setCommissionStatus({ orderIds: orderIds.value }); | |
578 | + await setCommissionStatus({ orderId: record.orderId }); | |
587 | 579 | createMessage.success('设置成功'); |
588 | - handleClearChoose(); | |
589 | 580 | reload(); |
590 | 581 | } catch (e) { |
591 | 582 | createMessage.error('设置失败'); | ... | ... |