diff --git a/apps/web-antd/src/api/property/assetManage/application/index.ts b/apps/web-antd/src/api/property/assetManage/application/index.ts index 677eb0c6..6c31ff59 100644 --- a/apps/web-antd/src/api/property/assetManage/application/index.ts +++ b/apps/web-antd/src/api/property/assetManage/application/index.ts @@ -42,6 +42,14 @@ export function applicationAdd(data: ApplicationForm) { return requestClient.postWithMsg('/property/application', data); } +/** + * 领用审核 + * @param data + */ +export function applicationVerified(data: ApplicationForm) { + return requestClient.postWithMsg('/property/application/verified', data); +} + /** * 更新资产领用 * @param data diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts index 4cfbd81f..acc9be74 100644 --- a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts @@ -12,6 +12,22 @@ import { requestClient } from '#/api/request'; export function workOrdersTypeList(params?: WorkOrdersTypeQuery) { return requestClient.get>('/property/workOrdersType/list', { params }); } +/** + * 查询工单类型不分页 + * @param params + * @returns 工单类型管理列表 + */ +export function workOrdersTypeListAll(params?: WorkOrdersTypeQuery) { + return requestClient.get('/property/workOrdersType/queryList', { params }); +} + +/** + * 查询工单类型树结构 + * @param params + */ +export function workOrdersTypeTree(params?: WorkOrdersTypeQuery) { + return requestClient.get('/property/workOrdersType/typeTree', { params }); +} /** * 导出工单类型管理列表 diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts index f1f10907..ce780780 100644 --- a/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts @@ -1,4 +1,4 @@ -import type { PageQuery, BaseEntity } from '#/api/common'; +import type {PageQuery, BaseEntity} from '#/api/common'; export interface WorkOrdersTypeVO { /** @@ -34,7 +34,9 @@ export interface WorkOrdersTypeVO { /** * 是否支持转单(0支持,1不支持) */ - isTransfers: number; + isTransfers: string; + + excludeId: string; } export interface WorkOrdersTypeForm extends BaseEntity { @@ -72,6 +74,11 @@ export interface WorkOrdersTypeForm extends BaseEntity { * 是否支持转单(0支持,1不支持) */ isTransfers?: number; + + /** + * 上级类型id + */ + parentId?: string; } export interface WorkOrdersTypeQuery extends PageQuery { @@ -106,7 +113,12 @@ export interface WorkOrdersTypeQuery extends PageQuery { isTransfers?: number; /** - * 日期范围参数 - */ + * 日期范围参数 + */ params?: any; + + /** + * 是否过滤子级 + */ + filterSubNodes?: boolean; } diff --git a/apps/web-antd/src/views/property/assetManage/application/application-modal.vue b/apps/web-antd/src/views/property/assetManage/application/application-modal.vue index 0ba82bec..93d7f91c 100644 --- a/apps/web-antd/src/views/property/assetManage/application/application-modal.vue +++ b/apps/web-antd/src/views/property/assetManage/application/application-modal.vue @@ -109,6 +109,7 @@ async function setupPackageSelect() { const assets = await assetList({ pageNum: 1, pageSize: 1000, + params: {stock: 1} //库存不为0 }); assetsData.value = assets.rows const options = users.rows.map((item) => ({ @@ -145,7 +146,8 @@ async function setupPackageSelect() { if (assetInfo) { formApi.updateSchema([{ componentProps: { - max:assetInfo.stock + max: assetInfo.stock, + min: 1 }, fieldName: 'number', }]) diff --git a/apps/web-antd/src/views/property/assetManage/application/data.ts b/apps/web-antd/src/views/property/assetManage/application/data.ts index 8afff06c..855878e0 100644 --- a/apps/web-antd/src/views/property/assetManage/application/data.ts +++ b/apps/web-antd/src/views/property/assetManage/application/data.ts @@ -28,7 +28,7 @@ export const querySchema: FormSchemaGetter = () => [ options:getDictOptions(DictEnum.WY_ZCSHZT) }, fieldName: 'state', - label: '领用状态', + label: '审核状态', }, // { // component: 'Input', @@ -78,7 +78,7 @@ export const columns: VxeGridProps['columns'] = [ field: 'applicationTime', }, { - title: '领用状态', + title: '审核状态', field: 'state', slots: { default: ({ row }) => { diff --git a/apps/web-antd/src/views/property/assetManage/application/index.vue b/apps/web-antd/src/views/property/assetManage/application/index.vue index 2569b981..df7c3417 100644 --- a/apps/web-antd/src/views/property/assetManage/application/index.vue +++ b/apps/web-antd/src/views/property/assetManage/application/index.vue @@ -14,7 +14,7 @@ import { import { applicationExport, applicationList, - applicationRemove, applicationUpdate, + applicationRemove, applicationVerified, } from '#/api/property/assetManage/application'; import type {ApplicationForm} from '#/api/property/assetManage/application/model'; import {commonDownloadExcel} from '#/utils/file/download'; @@ -98,7 +98,7 @@ async function handleAudit(row: Required, status: number) { info.state = status info.acceptanceTime = new Date() info.acceptanceUserId = userStore.userInfo?.userId - await applicationUpdate(info) + await applicationVerified(info) await tableApi.query(); } diff --git a/apps/web-antd/src/views/property/assetManage/log/data.ts b/apps/web-antd/src/views/property/assetManage/log/data.ts index 96bed83e..c40ad90e 100644 --- a/apps/web-antd/src/views/property/assetManage/log/data.ts +++ b/apps/web-antd/src/views/property/assetManage/log/data.ts @@ -1,6 +1,7 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; import {getDictOptions} from "#/utils/dict"; +import {renderDict} from "#/utils/render"; export const querySchema: FormSchemaGetter = () => [ @@ -69,19 +70,24 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '仓库id', - field: 'depotId', + title: '仓库', + field: 'depotName', minWidth:150, }, { - title: '资产id', - field: 'assetId', + title: '资产', + field: 'assetName', width:180, }, { title: '流转类型', field: 'type', width:120, + slots:{ + default:({row})=>{ + return renderDict(row.type,'wy_cklzlx') + } + } }, { @@ -95,8 +101,8 @@ export const columns: VxeGridProps['columns'] = [ width:150, }, { - title: '操作人id', - field: 'userId', + title: '操作人', + field: 'userName', width:150, }, { diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts index 5ecf2907..0b7b199a 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts @@ -152,8 +152,7 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '工单类型', fieldName: 'type', - component: 'ApiSelect', - componentProps: {}, + component: 'TreeSelect', rules: 'selectRequired', }, { diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue index 26ac66cb..fef94b5f 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue @@ -17,7 +17,10 @@ import workOrdersDetail from './work-orders-detail.vue'; import ordersModal from './orders-modal.vue'; import {columns, querySchema} from './data'; import {onMounted, ref} from "vue"; -import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType"; +import { + workOrdersTypeList, + workOrdersTypeListAll +} from "#/api/property/businessManagement/workOrdersType"; const ordersTypeList = ref([]); const ordersType = ref('0'); @@ -130,11 +133,10 @@ function handleMultiDelete() { async function queryOrderType() { let params = { - pageSize: 1000, - pageNum: 1 + filterSubNodes:true } - const res = await workOrdersTypeList(params) - ordersTypeList.value = res.rows.map((item) => ({ + const res = await workOrdersTypeListAll(params) + ordersTypeList.value = res.map((item) => ({ label: item.orderTypeName, value: item.id, })); diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue index a641283f..7712c344 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue @@ -14,9 +14,7 @@ import { import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup'; import {modalSchema} from './data'; -import {personList} from "#/api/property/resident/person"; -import {renderDictValue} from "#/utils/render"; -import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType"; +import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType"; const emit = defineEmits<{ reload: [] }>(); @@ -61,7 +59,7 @@ const [BasicModal, modalApi] = useVbenModal({ return null; } modalApi.modalLoading(true); - await queryPersonData() + await queryWorkOrdersType() const {id} = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; @@ -106,34 +104,35 @@ async function handleClosed() { resetInitialized(); } -async function queryPersonData() { - let params = { - pageSize: 1000, - pageNum: 1, - } - const res = await personList(params); - const options = res.rows.map((user) => ({ - label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone, - value: user.id, - })); - formApi.updateSchema([{ - componentProps: () => ({ - options: options, - showSearch:true, - filterOption: filterOption - }), - fieldName: 'initiatorName', - }, +async function queryWorkOrdersType() { + const options = await workOrdersTypeTree() + formApi.updateSchema([ { componentProps: () => ({ - options: options, - showSearch:true, - filterOption: filterOption + class: 'w-full', + fieldNames: { + key: 'id', + label: 'orderTypeName', + value: 'id', + children: 'children', + }, + placeholder: '请选择工单类型', + showSearch: true, + treeData: options, + treeDefaultExpandAll: true, + treeLine: { showLeafIcon: false }, + treeNodeFilterProp: 'orderTypeName', + treeNodeLabelProp: 'orderTypeName', }), - fieldName: 'handler', - }]) + fieldName: 'type', + }, + ]); } +const filterOption = (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; +}; +