| | |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <!-- <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="结算单名称:" prop="settlementOrderName"> |
| | | <ProFormText v-model="form.settlementOrderName"> </ProFormText> |
| | |
| | | ></ProFormDatePicker> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | </ProFormCol> --> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="结算金额:" prop="settlementAmount"> |
| | |
| | | </ProFormCol> |
| | | </ProForm> |
| | | </ChunkCell> |
| | | <!-- <ChunkCell title="结算流程"> |
| | | <div class="step-wrapper"> |
| | | <el-steps :active="1" align-center finish-status="process"> |
| | | <el-step title="结算单上传" :icon="Edit"> |
| | | <template #description> |
| | | <div>创建人:{{ form.name }}</div> |
| | | <div>时间:{{ form.name }}</div> |
| | | <TextOverTooltip>备注:{{ form.name }}</TextOverTooltip> |
| | | </template> |
| | | </el-step> |
| | | <el-step title="结算付款" :icon="Upload"> |
| | | <template #description> |
| | | <div>创建人:{{ form.name }}</div> |
| | | <div>时间:{{ form.name }}</div> |
| | | <TextOverTooltip |
| | | >备注:{{ 'form.nameform.nameform.eform.nameform.nameform.name' }}</TextOverTooltip |
| | | > |
| | | </template> |
| | | </el-step> |
| | | </el-steps> |
| | | </div> |
| | | </ChunkCell> --> |
| | | <ChunkCell title="结算名单" style="flex: 1" class="settlement-user-list-chunk"> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn v-if="isSettlement"> |
| | | <BlFileUpload |
| | | v-model:file-url="form.settlementUrl" |
| | | ref="uploadRef" |
| | | :showTip="false" |
| | | :show-file-list="false" |
| | | class="pro-table-operation-btn upload-style-btn" |
| | | :on-success="(event) => handleUploadSuccess(event)" |
| | | :limitFileSize="null" |
| | | :limit="1" |
| | | accept="xlsx,xls" |
| | | > |
| | | <el-button text type="primary" class="pro-table-operation-btn">导入</el-button> |
| | | </BlFileUpload> |
| | | <el-button type="primary" link @click="handleDownload()">导出</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button class="chuck-add-or-edit-actions" @click="handleBack">取消</el-button> |
| | | <el-button |
| | | v-if="!isDetail" |
| | | v-if="isSettlement" |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit" |
| | | >确认</el-button |
| | | >结算</el-button |
| | | > |
| | | </div> |
| | | </ChunkCell> |
| | | </AppContainer> |
| | | <EditAccountInfoDialog v-bind="dialogProps"></EditAccountInfoDialog> |
| | | <SettleDetailDialog v-bind="dialogSettleProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { |
| | | LoadingLayout, |
| | | AppContainer, |
| | | AppScrollContainer, |
| | | ChunkCell, |
| | | ProForm, |
| | | ProFormItemV2, |
| | |
| | | ProTableQueryFilterBar, |
| | | useFormDialog, |
| | | XLSXUtils, |
| | | BlFileUpload, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { SettlementListColumns } from './constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import EditAccountInfoDialog from './components/EditAccountInfoDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { paginateList, setOssFileName, toThousand } from '@/utils'; |
| | | |
| | |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | const url = (route.query.url as string) ?? ''; |
| | | const settlement = (route.query.settlement as string) ?? ''; |
| | | |
| | | const isDetail = computed(() => !url); |
| | | const isSettlement = computed(() => !!url || !!settlement); |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | |
| | | settlementOrderName: '', |
| | | settlementOrderTime: '', |
| | | settlementTaskUsers: [] as API.GetSettlementTaskUsersQueryResultItem[], |
| | | |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }); |
| | | |
| | | const BaseState = { |
| | |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | // onMounted(async () => { |
| | | // await getList(); |
| | | // state.loading = false; |
| | | // }); |
| | | |
| | | // const { isLoading } = useQuery({ |
| | | // queryKey: ['taskServices/getSettlementTask', id], |
| | | // queryFn: async () => { |
| | | // return await taskServices.getSettlementTask( |
| | | // { id: id }, |
| | | // { |
| | | // showLoading: false, |
| | | // } |
| | | // ); |
| | | // }, |
| | | // placeholderData: () => ({} as API.GetSettlementTaskQueryResult), |
| | | // onSuccess(data) { |
| | | // form.name = data.name; |
| | | // form.settlementAmount = data.settlementAmount ?? 0; |
| | | // form.actualSettlementAmount = data.actualSettlementAmount ?? 0; |
| | | // form.code = data.code; |
| | | // form.settlementOrderName = setOssFileName(data.settlementOrderName); |
| | | // form.settlementOrderTime = data.settlementOrderTime ?? ''; |
| | | // }, |
| | | // enabled: !!id, |
| | | // }); |
| | | const { isLoading } = useQuery({ |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers', id, url], |
| | | queryFn: async () => { |
| | |
| | | |
| | | async function handleAddOrEdit() {} |
| | | |
| | | async function handleSubmit() { |
| | | async function sureTaskSettlementOrder() { |
| | | try { |
| | | let params: API.SureTaskSettlementOrderCommand = { |
| | | taskInfoId: id, |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleUploadSuccess(response: UploadUserFile & { file: File & { uid: number } }) { |
| | | if (response.path) { |
| | | // sureTaskSettlementOrder(); |
| | | } |
| | | } |
| | | |
| | | function handleSubmit() { |
| | | handleSettleEdit({ |
| | | id: id, |
| | | name: form.name, |
| | | code: form.code, |
| | | settlementUserCount: form.settlementTaskUsers.length, |
| | | actualSettlementAmount: form.actualSettlementAmount, |
| | | }); |
| | | } |
| | | |
| | | const { |
| | | dialogProps: dialogSettleProps, |
| | | handleEdit: handleSettleEdit, |
| | | editForm: settleEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleSettle, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | code: '', |
| | | settlementUserCount: 0, |
| | | actualSettlementAmount: 0, |
| | | }, |
| | | }); |
| | | |
| | | async function handleSettle() { |
| | | try { |
| | | let params: API.SureTaskSettlementCommand = { |
| | | taskInfoId: settleEditForm.id, |
| | | }; |
| | | console.log('params: ', params); |
| | | // let res = await taskServices.sureTaskSettlement(params); |
| | | // if (res) { |
| | | // Message.successMessage('操作成功'); |
| | | // eventContext.emit('sureTaskSettlementOrder'); |
| | | // handleBack(); |
| | | // } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleDownload() {} |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'ServiceChargeManageList', |