From 60f392e1e8e7c45a3ea617ff82bf59ecdd9d1ab0 Mon Sep 17 00:00:00 2001 From: zxf <1532322479@qq.com> Date: Sun, 15 Feb 2026 14:14:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B4=A7=E6=9E=B6?= =?UTF-8?q?=EF=BC=8C=E8=B4=A7=E4=BD=8D=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/api/cmshelf.js | 63 +++ admin/src/api/cmstoragelocation.js | 63 +++ admin/src/views/ck/ckwarehouse/index.vue | 5 +- admin/src/views/cm/cust/qualify/index.vue | 2 +- .../views/cm/shelf/cmshelf-add-and-update.vue | 87 ++++ admin/src/views/cm/shelf/index.vue | 204 +++++++++ .../cmstoragelocation-add-and-update.vue | 88 ++++ admin/src/views/cm/storage/location/index.vue | 204 +++++++++ admin/src/views/cm/warehouse/DispatchList.vue | 359 +++++++++++++++ .../warehouse/cmwarehouse-add-and-update.vue | 62 ++- admin/src/views/cm/warehouse/index.vue | 111 +++-- admin/src/views/eb/user/index-all.vue | 2 +- admin/src/views/eb/user/index.vue | 2 +- admin/src/views/fm/dunning/record/index.vue | 48 -- .../pm/building/pmbuilding-add-and-update.vue | 72 ++- .../views/pm/complaint/suggestion/index.vue | 2 +- .../pm/houser/pmhouse-add-and-update.vue | 10 +- .../src/views/pm/maintenance/order/index.vue | 2 +- admin/src/views/pm/project/DispatchList.vue | 415 ++++++++++++++++++ admin/src/views/pm/project/index.vue | 79 +++- .../pm/project/pmproject-add-and-update.vue | 48 +- admin/src/views/pub/notice/index.vue | 2 +- .../controller/CmShelfController.java | 189 ++++++++ .../CmStorageLocationController.java | 173 ++++++++ .../controller/CmWarehouseController.java | 25 +- .../controller/PmCanteenDemandController.java | 16 + .../PmCanteenPurchasePlanController.java | 18 + .../modules/autogencode/dao/CmShelfDao.java | 13 + .../autogencode/dao/CmStorageLocationDao.java | 13 + .../modules/autogencode/entity/CmShelf.java | 79 ++++ .../autogencode/entity/CmStorageLocation.java | 79 ++++ .../entity/PmFoodTraceability.java | 252 +++++------ .../autogencode/service/CmShelfService.java | 25 ++ .../service/CmStorageLocationService.java | 25 ++ .../service/impl/CmShelfServiceImpl.java | 42 ++ .../impl/CmStorageLocationServiceImpl.java | 42 ++ .../mapper/autogencode/CmShelfDao.xml | 23 + .../autogencode/CmStorageLocationDao.xml | 23 + 38 files changed, 2659 insertions(+), 308 deletions(-) create mode 100644 admin/src/api/cmshelf.js create mode 100644 admin/src/api/cmstoragelocation.js create mode 100644 admin/src/views/cm/shelf/cmshelf-add-and-update.vue create mode 100644 admin/src/views/cm/shelf/index.vue create mode 100644 admin/src/views/cm/storage/location/cmstoragelocation-add-and-update.vue create mode 100644 admin/src/views/cm/storage/location/index.vue create mode 100644 admin/src/views/cm/warehouse/DispatchList.vue create mode 100644 admin/src/views/pm/project/DispatchList.vue create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/controller/CmShelfController.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/controller/CmStorageLocationController.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/dao/CmShelfDao.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/dao/CmStorageLocationDao.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/entity/CmShelf.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/entity/CmStorageLocation.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/service/CmShelfService.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/service/CmStorageLocationService.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/service/impl/CmShelfServiceImpl.java create mode 100644 crmeb/crmeb-admin/src/main/java/com/zbkj/modules/autogencode/service/impl/CmStorageLocationServiceImpl.java create mode 100644 crmeb/crmeb-admin/src/main/resources/mapper/autogencode/CmShelfDao.xml create mode 100644 crmeb/crmeb-admin/src/main/resources/mapper/autogencode/CmStorageLocationDao.xml diff --git a/admin/src/api/cmshelf.js b/admin/src/api/cmshelf.js new file mode 100644 index 0000000..8aa5cc7 --- /dev/null +++ b/admin/src/api/cmshelf.js @@ -0,0 +1,63 @@ + +import request from '@/utils/request' + +/** + * 新增cmshelf + * @param pram + */ +export function cmshelfCreateApi(data) { + return request({ + url: `autogencode/cmshelf/save`, + method: 'POST', + data + }) +} + +/** + * cmshelf更新 + * @param pram + */ +export function cmshelfUpdateApi(data) { + return request({ + url: `autogencode/cmshelf/update`, + method: 'POST', + data + }) +} + +/** + * cmshelf详情 + * @param pram + */ +export function cmshelfDetailApi(id) { + return request({ + url: `autogencode/cmshelf/info/${id}`, + method: 'GET' + }) +} + +/** + * cmshelf批量删除 + * @param ids + */ +export function cmshelfDeleteApi(ids) { + return request({ + url: `autogencode/cmshelf/delete`, + method: 'POST', + data: ids + }) +} + + +/** + * cmshelf列表 + * @param pram + */ +export function cmshelfListApi(params) { + return request({ + url: `autogencode/cmshelf/list`, + method: 'GET', + params + }) +} + diff --git a/admin/src/api/cmstoragelocation.js b/admin/src/api/cmstoragelocation.js new file mode 100644 index 0000000..9d765a7 --- /dev/null +++ b/admin/src/api/cmstoragelocation.js @@ -0,0 +1,63 @@ + +import request from '@/utils/request' + +/** + * 新增cmstoragelocation + * @param pram + */ +export function cmstoragelocationCreateApi(data) { + return request({ + url: `autogencode/cmstoragelocation/save`, + method: 'POST', + data + }) +} + +/** + * cmstoragelocation更新 + * @param pram + */ +export function cmstoragelocationUpdateApi(data) { + return request({ + url: `autogencode/cmstoragelocation/update`, + method: 'POST', + data + }) +} + +/** + * cmstoragelocation详情 + * @param pram + */ +export function cmstoragelocationDetailApi(id) { + return request({ + url: `autogencode/cmstoragelocation/info/${id}`, + method: 'GET' + }) +} + +/** + * cmstoragelocation批量删除 + * @param ids + */ +export function cmstoragelocationDeleteApi(ids) { + return request({ + url: `autogencode/cmstoragelocation/delete`, + method: 'POST', + data: ids + }) +} + + +/** + * cmstoragelocation列表 + * @param pram + */ +export function cmstoragelocationListApi(params) { + return request({ + url: `autogencode/cmstoragelocation/list`, + method: 'GET', + params + }) +} + diff --git a/admin/src/views/ck/ckwarehouse/index.vue b/admin/src/views/ck/ckwarehouse/index.vue index 0d5d2aa..ea5920c 100644 --- a/admin/src/views/ck/ckwarehouse/index.vue +++ b/admin/src/views/ck/ckwarehouse/index.vue @@ -291,7 +291,10 @@ export default { }, created() { listWarehouse({}).then(response => { - this.warehouses = response.data; + this.warehouses = response.data || []; + }).catch(error => { + console.error('获取仓库列表失败:', error); + this.warehouses = []; }); }, methods: { diff --git a/admin/src/views/cm/cust/qualify/index.vue b/admin/src/views/cm/cust/qualify/index.vue index 4ee3799..a3d2d6f 100644 --- a/admin/src/views/cm/cust/qualify/index.vue +++ b/admin/src/views/cm/cust/qualify/index.vue @@ -34,7 +34,7 @@ 查询 重置 - 新增数据 + 新增资质设置 批量删除 diff --git a/admin/src/views/cm/shelf/cmshelf-add-and-update.vue b/admin/src/views/cm/shelf/cmshelf-add-and-update.vue new file mode 100644 index 0000000..c91f10c --- /dev/null +++ b/admin/src/views/cm/shelf/cmshelf-add-and-update.vue @@ -0,0 +1,87 @@ + + + diff --git a/admin/src/views/cm/shelf/index.vue b/admin/src/views/cm/shelf/index.vue new file mode 100644 index 0000000..428f667 --- /dev/null +++ b/admin/src/views/cm/shelf/index.vue @@ -0,0 +1,204 @@ + + + diff --git a/admin/src/views/cm/storage/location/cmstoragelocation-add-and-update.vue b/admin/src/views/cm/storage/location/cmstoragelocation-add-and-update.vue new file mode 100644 index 0000000..a2f1fde --- /dev/null +++ b/admin/src/views/cm/storage/location/cmstoragelocation-add-and-update.vue @@ -0,0 +1,88 @@ + + + diff --git a/admin/src/views/cm/storage/location/index.vue b/admin/src/views/cm/storage/location/index.vue new file mode 100644 index 0000000..62c00c2 --- /dev/null +++ b/admin/src/views/cm/storage/location/index.vue @@ -0,0 +1,204 @@ + + + diff --git a/admin/src/views/cm/warehouse/DispatchList.vue b/admin/src/views/cm/warehouse/DispatchList.vue new file mode 100644 index 0000000..8f01d3a --- /dev/null +++ b/admin/src/views/cm/warehouse/DispatchList.vue @@ -0,0 +1,359 @@ + + + + + diff --git a/admin/src/views/cm/warehouse/cmwarehouse-add-and-update.vue b/admin/src/views/cm/warehouse/cmwarehouse-add-and-update.vue index 36aef5d..15093c4 100644 --- a/admin/src/views/cm/warehouse/cmwarehouse-add-and-update.vue +++ b/admin/src/views/cm/warehouse/cmwarehouse-add-and-update.vue @@ -3,9 +3,10 @@ - + @@ -13,13 +14,27 @@ - + - + - + @@ -37,11 +52,11 @@ visible: false, dataForm: { id: 0, - stockCode: '' , - stockName: '' , - validityStart: '' , - validityEnd: '' , - remark: '' , + stockCode: '' , + stockName: '' , + validityStart: '' , + validityEnd: '' , + remark: '' , }, dataRule: { stockCode: [ @@ -50,15 +65,6 @@ stockName: [ { required: true, message: '仓库名称 为必填项', trigger: 'blur' } ], - validityStart: [ - { required: true, message: '仓库有效期起 为必填项', trigger: 'blur' } - ], - validityEnd: [ - { required: true, message: '仓库有效期止 为必填项', trigger: 'blur' } - ], - remark: [ - { required: true, message: '备注 为必填项', trigger: 'blur' } - ], } } }, @@ -70,6 +76,13 @@ this.$refs['dataForm'].resetFields() if (this.dataForm.id) { api.cmwarehouseDetailApi(id).then(function(res) { + // 处理日期字段,只保留年月日部分 + if (res.validityStart) { + res.validityStart = res.validityStart.substring(0, 10) + } + if (res.validityEnd) { + res.validityEnd = res.validityEnd.substring(0, 10) + } this.dataForm = res; }.bind(this)) } @@ -79,14 +92,23 @@ dataSubmit () { this.$refs['dataForm'].validate((valid) => { if (valid) { + // 为日期字段拼接时分秒 + const submitData = { ...this.dataForm } + if (submitData.validityStart) { + submitData.validityStart = submitData.validityStart + ' 00:00:00' + } + if (submitData.validityEnd) { + submitData.validityEnd = submitData.validityEnd + ' 23:59:59' + } + if (this.dataForm.id) { - api.cmwarehouseUpdateApi(this.dataForm).then(function(res) { + api.cmwarehouseUpdateApi(submitData).then(function(res) { this.$message.success('保存成功') this.visible = false this.$emit('refreshDataList') }.bind(this)); } else { - api.cmwarehouseCreateApi(this.dataForm).then(function(res) { + api.cmwarehouseCreateApi(submitData).then(function(res) { this.$message.success('新增成功') this.visible = false this.$emit('refreshDataList') diff --git a/admin/src/views/cm/warehouse/index.vue b/admin/src/views/cm/warehouse/index.vue index 75c8088..d59d6f6 100644 --- a/admin/src/views/cm/warehouse/index.vue +++ b/admin/src/views/cm/warehouse/index.vue @@ -7,19 +7,10 @@ - - - - - - - - - 查询 重置 - 新增数据 + 新增仓库 批量删除 @@ -28,6 +19,8 @@ border v-loading="dataListLoading" @selection-change="selectionChangeHandle" + @expand-change="handleExpandChange" + :expand-row-keys="expandedRowKeys" style="width: 100%;"> + align="center"> + + + - - - - - - - - - - - - - - @@ -141,6 +101,7 @@ diff --git a/admin/src/views/eb/user/index-all.vue b/admin/src/views/eb/user/index-all.vue index 9e0162d..9abb520 100644 --- a/admin/src/views/eb/user/index-all.vue +++ b/admin/src/views/eb/user/index-all.vue @@ -45,7 +45,7 @@ 查询 重置 - 新增数据 + 新增员工 批量删除 diff --git a/admin/src/views/eb/user/index.vue b/admin/src/views/eb/user/index.vue index fb807b0..6ddf0f2 100644 --- a/admin/src/views/eb/user/index.vue +++ b/admin/src/views/eb/user/index.vue @@ -45,7 +45,7 @@ 查询 重置 - 新增数据 + 新增员工 批量删除 diff --git a/admin/src/views/fm/dunning/record/index.vue b/admin/src/views/fm/dunning/record/index.vue index ac65246..e3340e1 100644 --- a/admin/src/views/fm/dunning/record/index.vue +++ b/admin/src/views/fm/dunning/record/index.vue @@ -41,12 +41,6 @@ align="center" width="50"> - - - - - - - - - - - - - - - - + +
+ +
- 新增房屋 - 取消 + + 取消 确定
@@ -126,6 +140,10 @@ }, // 房屋列表数据 houseList: [], + // 房屋分页参数 + housePageIndex: 1, + housePageSize: 10, + houseTotal: 0, // 房屋新增/修改弹窗显示状态 houseVisible: false, dataRule: { @@ -216,9 +234,14 @@ loadHouseList (buildingId) { if (!buildingId) return - // 调用房屋API获取该楼栋下的房屋列表 - houseApi.pmhouseListApi({ buildingId: buildingId }).then(res => { + // 调用房屋API获取该楼栋下的房屋列表(支持分页) + houseApi.pmhouseListApi({ + buildingId: buildingId, + page: this.housePageIndex, + limit: this.housePageSize + }).then(res => { this.houseList = res.list || [] + this.houseTotal = res.count || 0 }).catch(err => { this.$message.error('加载房屋列表失败') console.error(err) @@ -274,6 +297,19 @@ this.$emit('refreshHouseList') }, + // 房屋列表分页大小变化 + handleHouseSizeChange (size) { + this.housePageSize = size + this.housePageIndex = 1 + this.loadHouseList(this.dataForm.id) + }, + + // 房屋列表当前页码变化 + handleHouseCurrentChange (current) { + this.housePageIndex = current + this.loadHouseList(this.dataForm.id) + }, + // 添加房屋到列表(用于楼栋未保存时的临时存储) addHouseToList (houseData) { // 深拷贝房屋数据,避免引用问题 @@ -300,10 +336,30 @@ return house.id === null }) - // 无论是新增还是编辑,都将数据传递给父组件 - this.$emit('addBuildingToList', buildingData) - this.$message.success(buildingData.id ? '修改成功' : '添加成功') - this.$emit('close') + // 调用 API 保存楼栋数据 + if (buildingData.id) { + // 编辑模式 + api.pmbuildingUpdateApi(buildingData).then(() => { + this.$message.success('修改成功') + this.$emit('refreshDataList') + this.$emit('close') + }).catch(err => { + this.$message.error('修改失败') + this.$emit('refreshDataList') + console.error(err) + }) + } else { + // 新增模式 + api.pmbuildingCreateApi(buildingData).then(() => { + this.$message.success('添加成功') + this.$emit('refreshDataList') + this.$emit('close') + }).catch(err => { + this.$message.error('添加失败') + this.$emit('refreshDataList') + console.error(err) + }) + } } }) } diff --git a/admin/src/views/pm/complaint/suggestion/index.vue b/admin/src/views/pm/complaint/suggestion/index.vue index dc51fd9..87c7261 100644 --- a/admin/src/views/pm/complaint/suggestion/index.vue +++ b/admin/src/views/pm/complaint/suggestion/index.vue @@ -34,7 +34,7 @@ 查询 重置 - 新增数据 + 新增投诉/建议 批量删除 diff --git a/admin/src/views/pm/houser/pmhouse-add-and-update.vue b/admin/src/views/pm/houser/pmhouse-add-and-update.vue index 185771e..26b6adb 100644 --- a/admin/src/views/pm/houser/pmhouse-add-and-update.vue +++ b/admin/src/views/pm/houser/pmhouse-add-and-update.vue @@ -3,6 +3,7 @@ @@ -124,18 +125,15 @@ floorNo: [ { required: true, message: '楼层号 为必填项', trigger: 'blur' } ], - houseNo: [ - { required: true, message: '房号 为必填项', trigger: 'blur' } - ], + // houseNo: [ + // { required: true, message: '房号 为必填项', trigger: 'blur' } + // ], propertyType: [ { required: true, message: '产权类型 为必填项', trigger: 'blur' } ], houseStatus: [ { required: true, message: '房屋状态 为必填项', trigger: 'blur' } ], - propertyCertNo: [ - { required: true, message: '房产证号 为必填项', trigger: 'blur' } - ], } } }, diff --git a/admin/src/views/pm/maintenance/order/index.vue b/admin/src/views/pm/maintenance/order/index.vue index 558736c..fcfd1b1 100644 --- a/admin/src/views/pm/maintenance/order/index.vue +++ b/admin/src/views/pm/maintenance/order/index.vue @@ -13,7 +13,7 @@ 查询 重置 - 新增数据 + 新增报修 批量删除 diff --git a/admin/src/views/pm/project/DispatchList.vue b/admin/src/views/pm/project/DispatchList.vue new file mode 100644 index 0000000..df8cac7 --- /dev/null +++ b/admin/src/views/pm/project/DispatchList.vue @@ -0,0 +1,415 @@ + + + + + diff --git a/admin/src/views/pm/project/index.vue b/admin/src/views/pm/project/index.vue index a0d5ddf..0ee61ca 100644 --- a/admin/src/views/pm/project/index.vue +++ b/admin/src/views/pm/project/index.vue @@ -22,8 +22,8 @@ 重置 新增项目 批量删除 - 导入 - 导出 + + + + + @@ -148,12 +162,23 @@ 确 定 + +