| | |
| | | :columns="ServiceChargeManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <template #operationBtn-uploadBtn="{ row }"> |
| | | <!-- <template #operationBtn-uploadBtn="{ row }"> |
| | | <BlFileUpload |
| | | v-model:file-url="editForm.settlementUrl" |
| | | ref="uploadRef" |
| | |
| | | > |
| | | <el-button text type="primary" class="pro-table-operation-btn">重新上传</el-button> |
| | | </BlFileUpload> |
| | | </template> |
| | | </template> --> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <UploadStatementDialog v-bind="dialogProps" /> |
| | | <SettleDetailDialog v-bind="dialogSettleProps" /> |
| | | <RechargeEnterpriseWalletDialog v-bind="dialogRechargeProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | import { ModelValueType } from 'element-plus'; |
| | | import UploadStatementDialog from './components/UploadStatementDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | import RechargeEnterpriseWalletDialog from './components/RechargeEnterpriseWalletDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | |
| | | defineOptions({ |
| | |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'uploadBtn', |
| | | name: '上传', |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | row.settlementOrderStatus !== EnumTaskSettlementOrderStatus.Wait, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'reUploadBtn', |
| | | name: '重新上传', |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | !( |
| | | row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed && |
| | | row.settlementStatus === EnumTaskSettlementStatus.Wait |
| | | ), |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'uploadBtn', |
| | | // name: '上传', |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | // row.settlementOrderStatus !== EnumTaskSettlementOrderStatus.Wait, |
| | | // }, |
| | | // }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'reUploadBtn', |
| | | // name: '重新上传', |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | // !( |
| | | // row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed && |
| | | // row.settlementStatus === EnumTaskSettlementStatus.Wait |
| | | // ), |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'settleBtn', |
| | | name: '结算', |
| | | }, |
| | | emits: { |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => openSettleDialog(role), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role, 'settlement'), |
| | | }, |
| | | extraProps: { |
| | | hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | |
| | | onClick: (role) => handleExport(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | hide: () => true, |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const { userDetail } = useUser(); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | |
| | | }); |
| | | |
| | | async function handleAddOrEdit() { |
| | | console.log('editForm: ', editForm); |
| | | goDetail(editForm.id, editForm.settlementUrl[0]?.path); |
| | | goSettlementDetail(editForm.id, editForm.settlementUrl[0]?.path); |
| | | } |
| | | |
| | | const { |
| | |
| | | name: '', |
| | | code: '', |
| | | settlementUserCount: 0, |
| | | settlementAmount: 0, |
| | | actualSettlementAmount: 0, |
| | | }, |
| | | }); |
| | | |
| | |
| | | let params: API.SureTaskSettlementCommand = { |
| | | taskInfoId: settleEditForm.id, |
| | | }; |
| | | let res = await taskServices.sureTaskSettlement(params); |
| | | let res = await taskServices.sureTaskSettlement(params, { |
| | | skipErrorHandler: true, |
| | | }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } catch (error) { |
| | | if (error?.info?.errorCode == 's510') { |
| | | handleRechargeAdd(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogRechargeProps, |
| | | handleAdd: handleRechargeAdd, |
| | | editForm: rechargeEditForm, |
| | | } = useFormDialog({ |
| | | defaultFormParams: { |
| | | access: EnumEnterpriseWalletAccess.Alipay, |
| | | amount: null as number, |
| | | remark: '', |
| | | }, |
| | | }); |
| | | |
| | | function openSettleDialog(row: API.GetSettlementTasksQueryResultItem) { |
| | | handleSettleEdit({ |
| | |
| | | name: row.name, |
| | | code: row.code, |
| | | settlementUserCount: row.settlementUserCount ?? 0, |
| | | settlementAmount: row.settlementAmount ?? 0, |
| | | actualSettlementAmount: row.actualSettlementAmount ?? 0, |
| | | }); |
| | | } |
| | | |
| | |
| | | row: API.GetSettlementTasksQueryResultItem |
| | | ) { |
| | | if (response.path) { |
| | | goDetail(row.id, response.path); |
| | | goSettlementDetail(row.id, response.path); |
| | | } |
| | | } |
| | | |
| | | async function goDetail(id: string, url?: string) { |
| | | async function goSettlementDetail(id: string, url?: string) { |
| | | await router.push({ |
| | | name: 'ServiceChargeDetail', |
| | | params: { |
| | |
| | | editForm.settlementUrl = [] as UploadUserFile[]; |
| | | } |
| | | |
| | | function goDetail(row: API.GetSettlementTasksQueryResultItem, settlement?: string) { |
| | | router.push({ |
| | | name: 'ServiceChargeDetail', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | query: { |
| | | settlement: settlement ? settlement : '', |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function handleExport(val) { |
| | | console.log('val: ', val); |
| | | } |