diff --git a/apps/web-antd/src/api/property/clean_order/model.d.ts b/apps/web-antd/src/api/property/clean_order/model.d.ts index 688abd97..9715d000 100644 --- a/apps/web-antd/src/api/property/clean_order/model.d.ts +++ b/apps/web-antd/src/api/property/clean_order/model.d.ts @@ -77,7 +77,7 @@ export interface Clean_orderForm extends BaseEntity { /** * 主键 */ - id?: string | number; + id?: string; /** * 位置 diff --git a/apps/web-antd/src/api/sis/personLib/index.ts b/apps/web-antd/src/api/sis/personLib/index.ts index e2f43600..dcc1ed0c 100644 --- a/apps/web-antd/src/api/sis/personLib/index.ts +++ b/apps/web-antd/src/api/sis/personLib/index.ts @@ -1,18 +1,20 @@ -import type { PersonLibVO, PersonLibForm, PersonLibQuery } from './model'; +import type { PersonLibForm, PersonLibQuery, PersonLibVO } from './model'; -import type { ID, IDS } from '#/api/common'; -import type { PageResult } from '#/api/common'; +import type { ID, IDS, PageResult } from '#/api/common'; import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; /** -* 查询人像库列表 -* @param params -* @returns 人像库列表 -*/ + 查询人像库列表 + @param params + @returns 人像库列表 + * @param params + */ export function personLibList(params?: PersonLibQuery) { - return requestClient.get>('/sis/personLib/list', { params }); + return requestClient.get>('/sis/personLib/list', { + params, + }); } /** @@ -39,7 +41,7 @@ export function personLibInfo(id: ID) { * @returns void */ export function personLibAdd(data: PersonLibForm) { - return requestClient.postWithMsg('/sis/personLib', data); + return requestClient.postWithMsg('/sis/personLib/add', data); } /** diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue index f123686c..83cd446f 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue @@ -7,16 +7,24 @@ import { useVbenForm } from '#/adapter/form'; import { cleanList } from '#/api/property/clean'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; -const emit = defineEmits<{ reload: [data: any] }>(); +const emit = defineEmits<{ reload: [data: any], editReload: [data: any] }>(); const isUpdate = ref(false); +const isAdd = ref(false); +const isView = ref(false); const title = computed(() => { - return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add'); + if(isAdd.value){ + return $t('pages.common.add'); + }else if(isView.value){ + return '查看'; + }else{ + return $t('pages.common.edit'); + } }); // 缓存清洁服务数据 let cleanListData: any[] = []; - +const detailIndex = ref();//传index对应详情的某条数据,对该条数据进行编辑修改 const detailSchema = [ { label: '劳务名称', @@ -50,7 +58,7 @@ const detailSchema = [ }, rules: 'required', }, - { + { label: '保洁面积', fieldName: 'area', component: 'InputNumber', @@ -132,7 +140,6 @@ const detailSchema = [ }, rules: 'required', }, - { label: '合计费用', fieldName: 'sumPeices', @@ -170,11 +177,20 @@ const [BasicModal, modalApi] = useVbenModal({ return null; } modalApi.modalLoading(true); - const { id } = modalApi.getData() as { id?: number | string }; - isUpdate.value = !!id; - if (isUpdate.value && id) { - // TODO: 获取详情数据 + const data = modalApi.getData(); + detailIndex.value = modalApi.getData().index; + if(!data || Object.keys(data).length === 0){ + //modalApi.getData()为空时表示添加 + isAdd.value = true; + }else if(detailIndex.value == undefined || detailIndex.value == null){ + //不存在detailIndex.value时表示查看 + isView.value = true; + }else{ + //表示编辑 + isUpdate.value = true; } + // TODO: 获取详情数据 + await formApi.setValues(modalApi.getData()); await markInitialized(); modalApi.modalLoading(false); }, @@ -188,6 +204,7 @@ async function handleConfirm() { return; } const data = cloneDeep(await formApi.getValues()); + console.log(data); // 获取选中的服务名称 const selectedService = cleanListData.find(item => item.id === data.name); @@ -195,8 +212,10 @@ async function handleConfirm() { data.name = selectedService.name; data.id = selectedService.id } - console.log(data); - + //index>=0时表示编辑 + if (detailIndex.value! >= 0) { + emit('editReload', data); + } handleClosed() await markInitialized(); emit('reload', data); @@ -209,6 +228,9 @@ async function handleConfirm() { } async function handleClosed() { + isAdd.value = false; + isView.value = false; + isUpdate.value = false; await formApi.resetForm(); resetInitialized(); } @@ -216,9 +238,10 @@ async function handleClosed() { + \ No newline at end of file + diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue index 4c2b938e..551b9a80 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue @@ -1,7 +1,7 @@ + -
费用合计:{{ totalSumPeices }}元
+ + + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts index 9a7a359e..aff9b7eb 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts @@ -1,6 +1,7 @@ -import type { FormSchemaGetter } from '#/adapter/form'; -import type { VxeGridProps } from '#/adapter/vxe-table'; +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 = () => [ @@ -17,7 +18,7 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Select', componentProps: { - options:getDictOptions('wy_khlx') + options: getDictOptions('wy_khlx') }, fieldName: 'customerType', label: '客户类型', @@ -25,7 +26,7 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Select', componentProps: { - options:getDictOptions('wy_zlfs') + options: getDictOptions('wy_zlfs') }, fieldName: 'rentalType', label: '租赁方式', @@ -33,7 +34,7 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Select', componentProps: { - options:getDictOptions('pro_charging_status') + options: getDictOptions('pro_charging_status') }, fieldName: 'paymentStatus', label: '支付状态', @@ -42,83 +43,107 @@ export const querySchema: FormSchemaGetter = () => [ ]; export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, + {type: 'checkbox', width: 60}, { title: '订单号', field: 'orderNo', - width:100 + width: 100 }, { title: '客户名称', field: 'customerName', - width:100 + width: 100 }, { title: '客户类型', field: 'customerType', - slots: {default: 'customerType'}, - width:100 + slots: { + default: ({ row }) => { + return renderDict(row.customerType, 'wy_khlx'); + }, + }, + width: 100 }, { title: '租赁周期', field: 'rentalPeriod', - slots: {default: 'rentalPeriod'}, - width:100 + slots: { + default: ({ row }) => { + return renderDict(row.rentalPeriod, 'wy_sjdw'); + }, + }, + width: 100 }, { title: '租赁开始时间', field: 'startTime', - width:120 + width: 120 }, { title: '租赁结束时间', field: 'endTime', - width:120 + width: 120 }, { title: '应付总额', field: 'totalAmount', - width:100 + width: 100 }, { title: '租赁方式', field: 'rentalType', - slots: {default: 'rentalType'}, - width:100 + slots: { + default: ({ row }) => { + return renderDict(row.rentalType, 'wy_zlfs'); + }, + }, + width: 100 }, { title: '租赁商品', field: 'planId', - slots: {default: 'planId'}, - width:100 + // slots: {default: 'planId'}, + width: 100 }, { title: '支付状态', field: 'paymentStatus', - slots: {default: 'paymentStatus'}, - width:100 + slots: { + default: ({ row }) => { + return renderDict(row.paymentStatus, 'pro_charging_status'); + }, + }, + width: 100 }, { title: '是否续租', field: 'isRelet', - slots: {default: 'isRelet'}, - width:100 + slots: { + default: ({ row }) => { + return renderDict(row.isRelet, 'wy_sf'); + }, + }, + width: 100 }, { title: '合同状态', field: 'contractStatus', - slots: {default: 'contractStatus'}, - width:100 + slots: { + default: ({ row }) => { + return renderDict(row.contractStatus, 'wy_htzt'); + }, + }, + width: 100 }, { title: '签署时间', field: 'signTime', - width:100 + width: 100 }, { field: 'action', fixed: 'right', - slots: { default: 'action' }, + slots: {default: 'action'}, title: '操作', minWidth: 180, }, @@ -134,12 +159,6 @@ export const modalSchema: FormSchemaGetter = () => [ triggerFields: [''], }, }, - // { - // label: '订单号', - // fieldName: 'orderNo', - // component: 'Input', - // rules: 'required', - // }, { label: '客户名称', fieldName: 'customerName', @@ -151,7 +170,7 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'customerType', component: 'Select', componentProps: { - options:getDictOptions('wy_khlx') + options: getDictOptions('wy_khlx') }, rules: 'selectRequired', }, @@ -160,7 +179,7 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'rentalPeriod', component: 'Select', componentProps: { - options:getDictOptions('wy_time_unit') + options: getDictOptions('wy_time_unit') }, rules: 'selectRequired', }, @@ -180,33 +199,45 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'rentalType', component: 'Select', componentProps: { - options:getDictOptions('wy_zlfs') + options: getDictOptions('wy_zlfs') }, rules: 'selectRequired', - formItemClass:'col-span-2' + formItemClass: 'col-span-2' }, { - label: '租赁方案id', + label: '租赁方案', fieldName: 'planId', - component: 'Input', + component: 'Select', dependencies: { // 仅当 租赁方式 为 2(套餐) 时显示 show: (formValues) => formValues.rentalType === '2', triggerFields: ['rentalType'], }, - rules: 'required', - formItemClass:'col-span-2' + rules: 'selectRequired', + formItemClass: 'col-span-2' }, { - label: '绿植产品id', - fieldName: 'productId', + label: '方案详情', + fieldName: 'planInfo', component: 'Input', + dependencies: { + // 仅当 租赁方式 为 2(套餐) 时显示 + show: (formValues) => formValues.rentalType === '2' && formValues.planId != null, + triggerFields: ['rentalType'], + }, + formItemClass: 'col-span-2' + }, + { + label: '绿植产品', + fieldName: 'productId', + component: 'Select', dependencies: { // 仅当 租赁方式 为 1(单点) 时显示 show: (formValues) => formValues.rentalType === '1', triggerFields: ['rentalType'], }, - rules: 'required', + rules: 'selectRequired', + formItemClass: 'col-span-2' }, { label: '租赁数量', @@ -215,29 +246,31 @@ export const modalSchema: FormSchemaGetter = () => [ componentProps: { min: 1, precision: 0, - step: 1 + step: 1, + placeholder:'租赁数量不可超出绿植产品库存数量' }, dependencies: { // 仅当 租赁方式 为 1(单点) 时显示 show: (formValues) => formValues.rentalType === '1', - triggerFields: ['rentalType'], + triggerFields: ['rentalType', 'productId'], }, rules: 'required', }, - { - label: '应付总额', - fieldName: 'totalAmount', - component: 'Input', - rules: 'required', - }, - { - label: '支付状态', - fieldName: 'paymentStatus', - component: 'Select', - componentProps: { - }, - rules: 'selectRequired', - }, + // { + // label: '应付总额', + // fieldName: 'totalAmount', + // component: 'Input', + // rules: 'required', + // }, + // { + // label: '支付状态', + // fieldName: 'paymentStatus', + // component: 'Select', + // componentProps: { + // options: getDictOptions('pro_charging_status'), + // }, + // rules: 'selectRequired', + // }, // { // label: '是否续租', // fieldName: 'isRelet', @@ -255,6 +288,17 @@ export const modalSchema: FormSchemaGetter = () => [ componentProps: { options: getDictOptions('wy_htzt'), }, + rules: 'selectRequired' + }, + { + label: '合同编号', + fieldName: 'contractCode', + component: 'Input', + dependencies: { + show: (formValues) => formValues.contractStatus != null && formValues.contractStatus != 1, + triggerFields: ['contractStatus'], + }, + rules: 'required' }, { label: '签署时间', @@ -262,8 +306,13 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'DatePicker', componentProps: { showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', }, + dependencies: { + show: (formValues) => formValues.contractStatus != null && formValues.contractStatus != 1, + triggerFields: ['contractStatus'], + }, + rules: 'required' }, ]; diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue index e87ceff6..1560bce0 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/rentalOrder-modal.vue @@ -1,23 +1,230 @@ diff --git a/apps/web-antd/src/views/property/resident/unit/unit-modal.vue b/apps/web-antd/src/views/property/resident/unit/unit-modal.vue index ad8b4401..c3caed84 100644 --- a/apps/web-antd/src/views/property/resident/unit/unit-modal.vue +++ b/apps/web-antd/src/views/property/resident/unit/unit-modal.vue @@ -10,7 +10,6 @@ import { resident_unitAdd, resident_unitInfo, resident_unitUpdate } from '#/api/ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { modalSchema } from './data'; -import RoomSelect from "#/views/property/room/room-select.vue"; import {communityTree} from "#/api/property/community"; const emit = defineEmits<{ reload: [] }>(); @@ -134,9 +133,6 @@ async function handleClosed() { diff --git a/apps/web-antd/src/views/property/room/room-select.vue b/apps/web-antd/src/views/property/room/room-select.vue deleted file mode 100644 index 10b4bf59..00000000 --- a/apps/web-antd/src/views/property/room/room-select.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - - diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index df232ceb..77d61004 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -28,9 +28,8 @@ export default defineConfig(async () => { rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 // target: 'http://by.missmoc.top:3010/', - target: 'http://192.168.0.106:8080', - // target: 'http://47.109.37.87:3010', - // target: 'http://47.109.37.87:3010', + // target: 'http://192.168.0.103:8080', + target: 'http://47.109.37.87:3010', ws: true, }, },