| | |
| | | <template #query> |
| | | <QueryFilterItem tip-content="结算单状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.flexEnterpriseSettingStatus" |
| | | v-model="extraParamState.status" |
| | | :value-enum="[ |
| | | { label: '已安排', value: 1 }, |
| | | { label: '待安排', value: 0 }, |
| | |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="结算状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.flexEnterpriseSettingStatus" |
| | | v-model="extraParamState.status" |
| | | :value-enum="[ |
| | | { label: '已安排', value: 1 }, |
| | | { label: '待安排', value: 0 }, |
| | |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.flexEnterpriseSettingStatus" |
| | | v-model="extraParamState.time" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始日期" |
| | |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" link @click="handleDownloadTemplate()">结算单模板</el-button> |
| | | <BlFileUpload |
| | | :limitFileSize="10" |
| | | accept="xls,xlsx" |
| | | :showTip="false" |
| | | :show-file-list="false" |
| | | :on-success="handleUploadSuccess" |
| | | style="margin-right: 10px; margin-left: 10px" |
| | | > |
| | | <template #default> |
| | | <el-button type="primary">上传结算单</el-button> |
| | | </template> |
| | | </BlFileUpload> |
| | | |
| | | <el-button type="primary" @click="openDialog()">上传结算单</el-button> |
| | | <el-button type="primary" @click="handleDownloadTemplate()">导出</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | |
| | | :columns="ServiceChargeManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <template #operationBtn-uploadBtn="{ data, row }"> |
| | | <BlFileUpload |
| | | v-model:file-url="row.fileUrl" |
| | | :limitFileSize="2" |
| | | :limit="1" |
| | | accept="doc,docx" |
| | | ref="uploadRef" |
| | | :showTip="false" |
| | | :on-success="(response) => handleUpload(response, row)" |
| | | :show-file-list="false" |
| | | class="pro-table-operation-btn upload-style-btn" |
| | | > |
| | | <el-button link type="primary">上传</el-button> |
| | | </BlFileUpload> |
| | | </template> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <UploadStatementDialog v-bind="dialogProps" /> |
| | | <SettleDetailDialog v-bind="dialogSettleProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | BlFileUpload, |
| | | useFormDialog, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { ServiceChargeManageColumns } from './constants'; |
| | | import { EnumUserGender } from '@/constants'; |
| | | import { downloadFileByUrl } from '@/utils'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import UploadStatementDialog from './components/UploadStatementDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'ServiceChargeManageList', |
| | |
| | | enCode: 'uploadBtn', |
| | | name: '上传', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'reUploadBtn', |
| | | name: '重新上传', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | |
| | | name: '结算', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goSettle(role), |
| | | onClick: (role) => openSettleDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'recallBtn', |
| | | name: '撤回', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleRecall(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | emits: { |
| | | onClick: (role) => handleExport(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | | eventContext.addEvent('serviceChargeSettle', () => { |
| | | getList(paginationState.pageIndex); |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetFlexEnterpriseInput = { |
| | | let params: API.GetTaskInfosQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | flexEnterpriseSettingStatus: extraParamState.flexEnterpriseSettingStatus, |
| | | searchWord: extraParamState.searchWord, |
| | | }; |
| | | |
| | | let res = await flexEnterpriseServices.getFlexEnterpriseList(params, { |
| | | let res = await taskServices.getTaskInfos(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | status: 0, |
| | | time: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus, |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | | queryKey: ['taskServices/getTaskInfos'], |
| | | columnsRenderProps: {}, |
| | | } |
| | | ); |
| | | |
| | | function goSettle(row) { |
| | | const { dialogProps, handleAdd, handleEdit, editForm } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row?) { |
| | | if (row) { |
| | | handleEdit({ |
| | | id: row?.id, |
| | | name: row?.name, |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | } |
| | | } |
| | | |
| | | async function handleAddOrEdit() {} |
| | | |
| | | const { |
| | | dialogProps: dialogSettleProps, |
| | | handleEdit: handleSettleEdit, |
| | | editForm: settleEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: goSettle, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | count: 0, |
| | | }, |
| | | }); |
| | | |
| | | function openSettleDialog(row?) { |
| | | handleSettleEdit({ |
| | | id: row.id, |
| | | name: row.name, |
| | | count: row.count, |
| | | }); |
| | | } |
| | | |
| | | async function goSettle() { |
| | | router.push({ |
| | | name: 'ServiceChargeSettle', |
| | | params: { |
| | | id: row.id, |
| | | id: settleEditForm.id, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function handleRecall(row) {} |
| | | |
| | | function goDetail(row) { |
| | | router.push({ |
| | |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function handleUploadSuccess(response: UploadUserFile) {} |
| | | |
| | | function handleUpload(val, row) { |
| | | console.log('val: ', val); |
| | | } |
| | | |
| | | function handleExport(val) { |