From 85778d433adf077da0fa628bd6c73612a405a0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?HUOJIN=5C=E9=9C=8D=E5=85=88=E6=A3=AE?= Date: Fri, 14 Mar 2025 23:50:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=95=8C=E9=9D=A2=E3=80=81=E7=89=A9=E6=96=99=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=9F=A5=E8=AF=A2=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/business/base/area/area-api.ts | 12 +-- .../src/api/business/base/item/item-api.ts | 7 ++ .../business/base/location/location-api.ts | 12 +-- .../views/business/base/area/area-list.vue | 4 +- .../views/business/base/area/area-select.vue | 15 +-- .../views/business/base/item/item-form.vue | 102 ++++++++++-------- .../views/business/base/item/item-list.vue | 29 +++-- .../views/business/base/item/item-select.vue | 98 +++++++++++++++++ .../business/base/location/location-form.vue | 2 +- .../business/base/location/location-list.vue | 6 +- .../base/location/location-select.vue | 2 +- 11 files changed, 213 insertions(+), 76 deletions(-) create mode 100644 smart-admin-web-typescript/src/views/business/base/item/item-select.vue diff --git a/smart-admin-web-typescript/src/api/business/base/area/area-api.ts b/smart-admin-web-typescript/src/api/business/base/area/area-api.ts index 04d0c4b..1efda39 100644 --- a/smart-admin-web-typescript/src/api/business/base/area/area-api.ts +++ b/smart-admin-web-typescript/src/api/business/base/area/area-api.ts @@ -12,21 +12,21 @@ export const areaApi = { /** * 分页查询 @author hj */ - queryPage: (param: any) => { + queryPage: (param: object) => { return postRequest('/area/queryPage', param); }, /** * 增加 @author hj */ - add: (param: any) => { + add: (param: object) => { return postRequest('/area/add', param); }, /** * 修改 @author hj */ - update: (param: any) => { + update: (param: object) => { return postRequest('/area/update', param); }, @@ -41,15 +41,15 @@ export const areaApi = { /** * 批量删除 @author hj */ - batchDelete: (idList: any) => { + batchDelete: (idList: number[]) => { return postRequest('/area/batchDelete', idList); }, /** * 下拉查询 @author hj */ - queryArea: (param: any) => { - return postRequest('/area/queryArea', {param}); + queryArea: (param: object) => { + return postRequest('/area/queryArea', param); }, }; diff --git a/smart-admin-web-typescript/src/api/business/base/item/item-api.ts b/smart-admin-web-typescript/src/api/business/base/item/item-api.ts index 6f3ac8e..0510676 100644 --- a/smart-admin-web-typescript/src/api/business/base/item/item-api.ts +++ b/smart-admin-web-typescript/src/api/business/base/item/item-api.ts @@ -45,4 +45,11 @@ export const itemApi = { return postRequest('/item/batchDelete', idList); }, + /** + * 下拉查询 @author hj + */ + queryItem: (param: object) => { + return postRequest('/item/queryItem', param); + }, + }; diff --git a/smart-admin-web-typescript/src/api/business/base/location/location-api.ts b/smart-admin-web-typescript/src/api/business/base/location/location-api.ts index ce5d3c5..6657ed4 100644 --- a/smart-admin-web-typescript/src/api/business/base/location/location-api.ts +++ b/smart-admin-web-typescript/src/api/business/base/location/location-api.ts @@ -12,21 +12,21 @@ export const locationApi = { /** * 分页查询 @author 霍锦 */ - queryPage: (param: any) => { + queryPage: (param: object) => { return postRequest('/location/queryPage', param); }, /** * 增加 @author 霍锦 */ - add: (param: any) => { + add: (param: object) => { return postRequest('/location/add', param); }, /** * 修改 @author 霍锦 */ - update: (param: any) => { + update: (param: object) => { return postRequest('/location/update', param); }, @@ -41,21 +41,21 @@ export const locationApi = { /** * 批量删除 @author 霍锦 */ - batchDelete: (idList: any) => { + batchDelete: (idList: number[]) => { return postRequest('/location/batchDelete', idList); }, /** * 下拉查询 @author hj */ - queryLocation: (param: any) => { + queryLocation: (param: number[]) => { return postRequest('/location/queryLocation', param); }, /** * 批量调整 @author hj */ - multipleAdjust: (param: any) => { + multipleAdjust: (param: object) => { return postRequest('/location/multipleAdjust', param); }, }; diff --git a/smart-admin-web-typescript/src/views/business/base/area/area-list.vue b/smart-admin-web-typescript/src/views/business/base/area/area-list.vue index 9179e15..603f4f6 100644 --- a/smart-admin-web-typescript/src/views/business/base/area/area-list.vue +++ b/smart-admin-web-typescript/src/views/business/base/area/area-list.vue @@ -10,7 +10,7 @@ - + @@ -19,7 +19,7 @@ - + diff --git a/smart-admin-web-typescript/src/views/business/base/area/area-select.vue b/smart-admin-web-typescript/src/views/business/base/area/area-select.vue index 230ce4f..66018e2 100644 --- a/smart-admin-web-typescript/src/views/business/base/area/area-select.vue +++ b/smart-admin-web-typescript/src/views/business/base/area/area-select.vue @@ -48,20 +48,23 @@ const props = defineProps({ type: Boolean, default: false, }, - // 类型 ENTERPRISE_TYPE_ENUM - type: { - type: Number, - }, areaNames: { type: Array as () => any[], default: () => [] + }, + disabledFlag: { + type: Boolean, + default: null, } }); const areas = ref([]); async function queryData() { - let res = await areaApi.queryArea({areaNames: props.areaNames}); + let res = await areaApi.queryArea({ + areaNames: props.areaNames, + disabledFlag: props.disabledFlag + }); areas.value = res.data; } @@ -88,7 +91,7 @@ function handleChange(value: any) { selectedLocations = areas.value.find((item: any) => item.areaId === value); } emit('update:value', value); - emit('change', JSON.parse(JSON.stringify(selectedLocations))); + emit('change', selectedLocations); } diff --git a/smart-admin-web-typescript/src/views/business/base/item/item-form.vue b/smart-admin-web-typescript/src/views/business/base/item/item-form.vue index e50bc17..8d5c589 100644 --- a/smart-admin-web-typescript/src/views/business/base/item/item-form.vue +++ b/smart-admin-web-typescript/src/views/business/base/item/item-form.vue @@ -7,43 +7,64 @@ -->