From 73b5a00c842b8f9f02b80f4e5265ceecb443a2fe Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Tue, 3 Jan 2023 11:26:07 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=BD=A6=E9=97=B4=E5=B7=A5=E4=BD=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=201.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/devicetype/ZyDevicetypeListRef.vue | 479 +++++++++--------- .../src/views/erp/tool/ZyToolListRef.vue | 31 +- .../src/views/team/StationList.vue | 42 +- .../src/views/team/StationMachineList.vue | 10 +- .../src/views/team/StationToolList.vue | 10 +- .../tool/controller/ZyToolController.java | 4 +- .../team/controller/StationController.java | 23 +- .../modules/team/service/IStationService.java | 4 + .../team/service/impl/StationServiceImpl.java | 28 + 9 files changed, 374 insertions(+), 257 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue b/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue index 8c94a44b..9a27a0cc 100644 --- a/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue +++ b/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue @@ -1,23 +1,48 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + - - - + + + - 已选择 {{ selectedRowKeys.length }}项 + 已选择 {{ selectedRowKeys.length }}项 清空 @@ -36,244 +61,244 @@ :customRow="clickThenSelect" @change="handleTableChange"> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue b/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue index c660ea12..e1fdaddf 100644 --- a/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue +++ b/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue @@ -1,13 +1,28 @@ - - - - - - - + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + @@ -116,7 +131,7 @@ export default { { title: '工具编号', align: "center", - dataIndex: 'nums' + dataIndex: 'id' }, { title: '工具名称', diff --git a/ant-design-vue-jeecg/src/views/team/StationList.vue b/ant-design-vue-jeecg/src/views/team/StationList.vue index 5d09a1e9..e2b50faa 100644 --- a/ant-design-vue-jeecg/src/views/team/StationList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationList.vue @@ -84,7 +84,9 @@ {{ text }} - {{ text }} + {{ + text + }} @@ -92,12 +94,13 @@ {{ text }} - {{ text }} + {{ + text + }} - 管理 @@ -112,6 +115,10 @@ handleDelete2(record.id)"> 删除 + + 升序 + + 降序 @@ -214,6 +221,8 @@ export default { url: { list: "/team/station/list", queryIsCanDelete: "/team/station/queryIsCanDelete", + up: "/team/station/up", + down: "/team/station/down", delete: "/team/station/delete", deleteBatch: "/team/station/deleteBatch", exportXlsUrl: "/team/station/exportXls", @@ -279,9 +288,30 @@ export default { } }) }, + + up(id) { + getAction(this.url.up, {id: id}).then((res) => { + if (res.success) { + this.loadData(); + this.$message.success(res.message); + } else { + this.$message.warning(res.message); + } + }) + }, + down(id) { + getAction(this.url.down, {id: id}).then((res) => { + if (res.success) { + this.loadData(); + this.$message.success(res.message); + } else { + this.$message.warning(res.message); + } + }) + }, } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue index 70a4aeee..8bff2842 100644 --- a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue @@ -146,11 +146,11 @@ export default { align: "center", dataIndex: 'stationName', }, - // { - // title: '设备ID', - // align: "center", - // dataIndex: 'machineId' - // }, + { + title: '设备编号', + align: "center", + dataIndex: 'machineId' + }, { title: '设备名称', align: "center", diff --git a/ant-design-vue-jeecg/src/views/team/StationToolList.vue b/ant-design-vue-jeecg/src/views/team/StationToolList.vue index bb576a5a..7aa6b5fb 100644 --- a/ant-design-vue-jeecg/src/views/team/StationToolList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationToolList.vue @@ -144,11 +144,11 @@ export default { align: "center", dataIndex: 'stationName', }, - // { - // title: '工具ID', - // align: "center", - // dataIndex: 'toolsId' - // }, + { + title: '工具编号', + align: "center", + dataIndex: 'toolsId' + }, { title: '工具名称', align: "center", diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tool/controller/ZyToolController.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tool/controller/ZyToolController.java index 721a5422..d2d60e4e 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tool/controller/ZyToolController.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/tool/controller/ZyToolController.java @@ -66,8 +66,8 @@ public class ZyToolController extends JeecgController { @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { - //QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyTool, req.getParameterMap()); - QueryWrapper queryWrapper = new QueryWrapper(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyTool, req.getParameterMap()); +// QueryWrapper queryWrapper = new QueryWrapper(); Page page = new Page(pageNo, pageSize); IPage pageList = zyToolService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java index 937e20a4..c0fe44ff 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java @@ -7,12 +7,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.modules.activiti.entity.ActBusiness; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.team.entity.Station; @@ -28,9 +26,11 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * @Description: 车间工位管理 @@ -197,4 +197,19 @@ public class StationController extends JeecgController return super.importExcel(request, response, Station.class); } + @ApiOperation(value = "排序", notes = "排序") + @GetMapping(value = "/up") + public Result> up(@RequestParam(name = "id", required = true) String id) { + stationService.up(id); + return Result.OK(); + } + + @AutoLog(value = "排序") + @ApiOperation(value = "排序", notes = "排序") + @GetMapping(value = "/down") + public Result> down(@RequestParam(name = "id", required = true) String id) { + stationService.down(id); + return Result.OK(); + } + } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java index b610b3f7..d5d5e240 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java @@ -13,4 +13,8 @@ import org.jeecg.modules.team.entity.Station; public interface IStationService extends IService { int queryIsCanDelete(Station station); + + void up(String id); + + void down(String id); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java index 4976de9e..ec60d37c 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java @@ -3,6 +3,7 @@ package org.jeecg.modules.team.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.common.exception.JeecgBootException; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.team.entity.Station; import org.jeecg.modules.team.entity.StationMachine; @@ -13,6 +14,7 @@ import org.jeecg.modules.team.service.IStationService; import org.jeecg.modules.team.service.IStationToolService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; /** * @Description: 车间工位管理 @@ -36,4 +38,30 @@ public class StationServiceImpl extends ServiceImpl impl } return count; } + + @Override + public void up(String id) { + Station entity = this.getById(id); + if (ObjectUtils.isEmpty(entity)) { + throw new JeecgBootException(id + "不存在"); + } + Station station = new Station(); + station.setId(id); + station.setStationNum(entity.getStationNum() + 1); + this.updateById(station); + } + + @Override + public void down(String id) { + Station entity = this.getById(id); + if (ObjectUtils.isEmpty(entity)) { + throw new JeecgBootException(id + "不存在"); + } + if (entity.getStationNum() > 1) { + Station station = new Station(); + station.setId(id); + station.setStationNum(entity.getStationNum() - 1); + this.updateById(station); + } + } } From 8388f0199ff66eb6d6d3718de0f1b645abe1bd53 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Tue, 3 Jan 2023 18:06:27 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=8F=AD=E7=BB=84=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=2012.230?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/User2ListRef.vue | 80 ++++++++++++------- .../src/views/team/GroupxMemberList.vue | 65 ++------------- .../views/team/modules/GroupxMemberModal.vue | 62 ++------------ .../src/views/team/modules/GroupxModal.vue | 2 +- .../system/controller/SysUserController.java | 28 +++---- .../controller/GroupxMemberController.java | 16 ++++ .../modules/team/entity/GroupxMember.java | 3 +- 7 files changed, 96 insertions(+), 160 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/system/User2ListRef.vue b/ant-design-vue-jeecg/src/views/system/User2ListRef.vue index 2462d157..3258a38d 100644 --- a/ant-design-vue-jeecg/src/views/system/User2ListRef.vue +++ b/ant-design-vue-jeecg/src/views/system/User2ListRef.vue @@ -11,14 +11,17 @@ @@ -40,10 +43,12 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import UserModalDetail from './modules/UserModalDetail' import {filterObj} from "@/utils/util"; +import {mixinDevice} from '@/utils/mixin' + export default { name: "User2ListRef", - mixins: [JeecgListMixin], + mixins: [JeecgListMixin, mixinDevice], components: { JThirdAppButton, SysUserAgentModal, @@ -58,7 +63,7 @@ export default { return { description: '这是用户管理页面', queryParam: {}, - groupxId:'', + groupId:'', recycleBinVisible: false, columns: [ /*{ @@ -138,19 +143,27 @@ export default { // } ], - // superQueryFieldList: [ - // {type: 'input', value: 'username', text: '用户账号',}, - // {type: 'input', value: 'realname', text: '用户姓名',}, - // {type: 'select', value: 'sex', text: '性别', dictCode: 'sex'}, - // ], url: { - syncUser: "/act/process/extActProcess/doSyncUser", - listByDepartId: "/sys/user/listByDepartId", - delete: "/sys/user/delete", - deleteBatch: "/sys/user/deleteBatch", - exportXlsUrl: "/sys/user/exportXls", - importExcelUrl: "sys/user/importExcel", + list: "/sys/user/listByDepartId", + }, + loadRouteType: false, + dictOptions:{ + }, + /* 分页参数 */ + ipagination:{ + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 共" + total + "条" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 }, + selectedMainId:'', + superFieldList:[], + selectedRowKeys: [], } }, computed: { @@ -158,23 +171,24 @@ export default { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; } }, - created() { - this.loadData(); - }, + // created() { + // this.loadData(); + // }, methods: { // valueChange(value) { // if (value) this.loadData() // }, + //加载传递参数 loadParameter() { if (this.loadRouteType === false) { - this.groupxId = this.$router. + this.groupId = this.$route.query.groupxId; this.loadRouteType = true; } }, - loadData2(groupxId) { - alert("loadData groupxId:"+groupxId) - if (!this.url.listByDepartId) { + loadData(arq) { + // alert("loadData groupId:"+arq) + if (!this.url.list) { this.$message.error("请设置url.list属性!") return } @@ -182,11 +196,12 @@ export default { // if (arg === 1) { // this.ipagination.current = 1; // } + this.onClearSelected(); this.loadParameter(); var params = this.getQueryParams();//查询条件 this.loading = true; - console.log("----------------the params:", params); - getAction(this.url.listByDepartId, params).then((res) => { + console.log("----------------loadData()-the params:", params); + getAction(this.url.list, params).then((res) => { if (res.success) { this.dataSource = res.result.records || res.result; if (res.result.total) { @@ -198,10 +213,10 @@ export default { this.$message.warning(res.message) } }).finally(() => { - this.dataSource.forEach(item => { - item['stationName'] = this.stationName; - item['stationNum'] = this.stationNum; - }) + // this.dataSource.forEach(item => { + // item['stationName'] = this.stationName; + // item['stationNum'] = this.stationNum; + // }) this.loading = false }) }, @@ -216,7 +231,7 @@ export default { param.field = this.getQueryField(); param.pageNo = this.ipagination.current; param.pageSize = this.ipagination.pageSize; - param.groupxId = this.groupxId; + param.groupId = this.groupId; return filterObj(param); }, onClearSelected() { @@ -228,6 +243,15 @@ export default { console.log('selectedRowKeys changed: ', selectedRowKeys); this.selectedRowKeys = selectedRowKeys; }, + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, } } diff --git a/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue b/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue index 6a04cc9f..2ce52a4b 100644 --- a/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue +++ b/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue @@ -1,65 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 新增 导出 - - - - - - - - - - - - - - - 返回 @@ -141,12 +86,12 @@ export default { { title: '工号', align: "center", - dataIndex: 'workNo_dictText' + dataIndex: 'workNo' }, { title: '成员名称', align: "center", - dataIndex: 'userId_dictText' + dataIndex: 'userId' }, { title: '加入时间', @@ -253,6 +198,6 @@ export default { } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue b/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue index 5eadd80c..9c8d1857 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue @@ -39,15 +39,16 @@ export default { confirmLoading: false, validatorRules: { - userId: [ - {required: true, message: "成员不能为空"}, - ], + // userId: [ + // {required: true, message: "成员不能为空"}, + // ], // joinTime: [ // {required: true}, // ] }, url: { add: "/groupxMember/add", + list: "/sys/user/listByDepartId", addBatch: "/groupxMember/addBatch", edit: "/groupxMember/edit", } @@ -58,10 +59,9 @@ export default { add(groupxId) { this.model.groupxId = groupxId; console.log("Modal层接收到上级参数-groupxId:" + this.model.groupxId); - this.$refs["modalForm"].loadData2(this.model.groupxId); this.edit(this.model); }, - // add () { + // add() { // //初始化默认值 // this.edit({}); // }, @@ -76,13 +76,8 @@ export default { this.$refs.form.clearValidate(); }, handleOk2() { - // this.$refs["modalForm2"].loadData(this.model.groupxId); this.model.userId = this.$refs["modalForm"].selectedRowKeys.toString(); - // console.log("model.toolids:"+this.model.toolsId); const that = this; - // 触发表单验证 - // this.$refs.form.validate(valid => { - // if (valid) { that.confirmLoading = true; let httpurl = ''; let method = ''; @@ -104,53 +99,12 @@ export default { }).finally(() => { that.confirmLoading = false; that.close(); - }) - // } else { - // return false; - // } - // }) - }, - handleOk() { - const that = this; - // 触发表单验证 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if (!this.model.id) { - httpurl += this.url.addBatch; - method = 'post'; - } else { - httpurl += this.url.edit; - method = 'put'; - } - console.log("----------the add() model:", this.model); - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - } else { - return false; - } + that.loadData(); }) }, handleCancel() { this.close() }, - - - } + }, } - - - \ No newline at end of file + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue b/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue index e1e47dc5..e0a7a31a 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue @@ -67,7 +67,7 @@ export default { }, data() { return { - enterprisesManager: "sys_user,username,id", + enterprisesManager: "sys_user,realname,id", title: "操作", visible: false, // mobileVal: "", diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index f6da8b10..d09d1523 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -20,6 +20,7 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.PermissionData; import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.common.system.query.QueryGenerator; @@ -34,6 +35,10 @@ import org.jeecg.modules.system.model.SysUserSysDepartModel; import org.jeecg.modules.system.service.*; import org.jeecg.modules.system.vo.SysDepartUsersVO; import org.jeecg.modules.system.vo.SysUserRoleVO; +import org.jeecg.modules.team.entity.Groupx; +import org.jeecg.modules.team.entity.Station; +import org.jeecg.modules.team.service.IGroupxService; +import org.jeecg.modules.team.service.IStationService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -41,6 +46,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; @@ -95,6 +101,9 @@ public class SysUserController { @Autowired private ICollectTypeService collectTypeService; + @Autowired + private IGroupxService iGroupxService; + @Value("${jeecg.path.upload}") private String upLoadPath; @@ -149,30 +158,19 @@ public class SysUserController { */ @RequestMapping(value = "/listByDepartId", method = RequestMethod.GET) public Result> listByDepartId(SysUser user, - @RequestParam(name = "departId") String departId, + @RequestParam(name = "groupId") String groupId, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { Result> result = new Result>(); // QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap()); -// queryWrapper.ne("username", "_reserve_user_external"); Page page = new Page(pageNo, pageSize); // IPage pageList = sysUserService.page(page, queryWrapper); - IPage pageList = sysUserService.getUserByDepId(page, departId, ""); - - //批量查询用户的所属部门 - //step.1 先拿到全部的 useids - //step.2 通过 useids,一次性查询用户的所属部门名字 -// List userIds = pageList.getRecords().stream().map(SysUser::getId).collect(Collectors.toList()); -// if (userIds != null && userIds.size() > 0) { -// Map useDepNames = sysUserService.getDepNamesByUserIds(userIds); -// pageList.getRecords().forEach(item -> { -// item.setOrgCodeTxt(useDepNames.get(item.getId())); -// }); -// } + Groupx group = iGroupxService.getById(groupId); + if (ObjectUtils.isEmpty(group)) throw new JeecgBootException(groupId + "不存在"); + IPage pageList = sysUserService.getUserByDepId(page, group.getDepartId(), ""); result.setSuccess(true); result.setResult(pageList); -// log.info(pageList.toString()); return result; } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/GroupxMemberController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/GroupxMemberController.java index e93f65c6..b466845f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/GroupxMemberController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/GroupxMemberController.java @@ -11,11 +11,14 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.system.entity.SysUser; +import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.team.entity.GroupxMember; import org.jeecg.modules.team.entity.GroupxMember; import org.jeecg.modules.team.service.IGroupxMemberService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -39,6 +42,9 @@ public class GroupxMemberController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(groupxMember, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = groupxMemberService.page(page, queryWrapper); + List records = pageList.getRecords(); + if (!ObjectUtils.isEmpty(records)) { + records.forEach(e -> { + SysUser sysUser = iSysUserService.getById(e.getUserId()); + if (!ObjectUtils.isEmpty(sysUser)) { + e.setUserId(sysUser.getRealname()); + e.setWorkNo(sysUser.getWorkNo()); + } + }); + } return Result.OK(pageList); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/GroupxMember.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/GroupxMember.java index 13d8af6e..22e478f9 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/GroupxMember.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/GroupxMember.java @@ -46,11 +46,10 @@ public class GroupxMember { */ @Excel(name = "用户id FK 用户表", width = 15) @ApiModelProperty(value = "用户id FK 用户表") - @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") +// @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") private String userId; @TableField(exist = false) - @Dict(dictTable = "sys_user", dicText = "work_no", dicCode = "id") private String workNo; /** * 加入时间 From 6a3b93701a127c94a5d568906301afe1c168fdac Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Fri, 6 Jan 2023 17:23:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BB=93=E5=BA=93=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/starehouse/admin/StarehouseList.vue | 257 ++++++++++++++++++ .../admin/modules/StarehouseForm.vue | 160 +++++++++++ .../admin/modules/StarehouseModal.vue | 60 ++++ .../modules/StarehouseModal__Style#Drawer.vue | 84 ++++++ .../controller/StarehouseController.java | 172 ++++++++++++ .../demo/starehouse/entity/Starehouse.java | 99 +++++++ .../starehouse/mapper/StarehouseMapper.java | 19 ++ .../mapper/xml/StarehouseMapper.xml | 5 + .../service/IStarehouseService.java | 16 ++ .../service/impl/StarehouseServiceImpl.java | 21 ++ 10 files changed, 893 insertions(+) create mode 100644 ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue create mode 100644 ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue create mode 100644 ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue create mode 100644 ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/controller/StarehouseController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/entity/Starehouse.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/StarehouseMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/xml/StarehouseMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/IStarehouseService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/impl/StarehouseServiceImpl.java diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue new file mode 100644 index 00000000..d44ef7ec --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + {{ toggleSearchStatus ? '收起' : '展开' }} + + + + + + + + + + + + 新增 + 导出 + + 导入 + + + + + + 删除 + + 批量操作 + + + + + + + 已选择 {{ selectedRowKeys.length }}项 + 清空 + + + + + + + + + 无图片 + + + + 无文件 + + 下载 + + + + + 编辑 + + + + 更多 + + + 详情 + + + handleDelete(record.id)"> + 删除 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue new file mode 100644 index 00000000..b7698e44 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue new file mode 100644 index 00000000..a0d225f9 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue @@ -0,0 +1,60 @@ + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue new file mode 100644 index 00000000..bf8593e7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/controller/StarehouseController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/controller/StarehouseController.java new file mode 100644 index 00000000..37fe40b8 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/controller/StarehouseController.java @@ -0,0 +1,172 @@ +package org.jeecg.modules.demo.starehouse.controller; + + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.starehouse.entity.Starehouse; +import org.jeecg.modules.demo.starehouse.service.IStarehouseService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 仓库管理 + * @Author: jeecg-boot + * @Date: 2023-01-06 + * @Version: V1.0 + */ +@Api(tags="仓库管理") +@RestController +@RequestMapping("/starehouse/starehouse") +@Slf4j +public class StarehouseController extends JeecgController { + @Autowired + private IStarehouseService starehouseService; + + /** + * 分页列表查询 + * + * @param starehouse + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "仓库管理-分页列表查询") + @ApiOperation(value="仓库管理-分页列表查询", notes="仓库管理-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Starehouse starehouse, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(starehouse, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = starehouseService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param starehouse + * @return + */ + @AutoLog(value = "仓库管理-添加") + @ApiOperation(value="仓库管理-添加", notes="仓库管理-添加") + @PostMapping(value = "/add") + public Result> add(@RequestBody Starehouse starehouse) { + starehouseService.save(starehouse); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param starehouse + * @return + */ + @AutoLog(value = "仓库管理-编辑") + @ApiOperation(value="仓库管理-编辑", notes="仓库管理-编辑") + @PutMapping(value = "/edit") + public Result> edit(@RequestBody Starehouse starehouse) { + starehouseService.updateById(starehouse); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "仓库管理-通过id删除") + @ApiOperation(value="仓库管理-通过id删除", notes="仓库管理-通过id删除") + @DeleteMapping(value = "/delete") + public Result> delete(@RequestParam(name="id",required=true) String id) { + starehouseService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "仓库管理-批量删除") + @ApiOperation(value="仓库管理-批量删除", notes="仓库管理-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result> deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.starehouseService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "仓库管理-通过id查询") + @ApiOperation(value="仓库管理-通过id查询", notes="仓库管理-通过id查询") + @GetMapping(value = "/queryById") + public Result> queryById(@RequestParam(name="id",required=true) String id) { + Starehouse starehouse = starehouseService.getById(id); + if(starehouse==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(starehouse); + } + + /** + * 导出excel + * + * @param request + * @param starehouse + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Starehouse starehouse) { + return super.exportXls(request, starehouse, Starehouse.class, "仓库管理"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result> importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Starehouse.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/entity/Starehouse.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/entity/Starehouse.java new file mode 100644 index 00000000..96fdd2a4 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/entity/Starehouse.java @@ -0,0 +1,99 @@ +package org.jeecg.modules.demo.starehouse.entity; + + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 仓库管理 + * @Author: jeecg-boot + * @Date: 2023-01-06 + * @Version: V1.0 + */ +@Data +@TableName("starehouse") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="starehouse对象", description="仓库管理") +public class Starehouse implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /**名称*/ + @Excel(name = "名称", width = 15) + @ApiModelProperty(value = "名称") + private String name; + /**部门*/ + @Excel(name = "部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @ApiModelProperty(value = "部门") + private String partmentId; + /**部门*/ + @Excel(name = "部门", width = 15) + @ApiModelProperty(value = "部门") + private String partmentnae; + /**是否专属*/ + @Excel(name = "是否专属", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否专属") + private Integer exclusive; + /**仓库存储规则*/ + @Excel(name = "仓库存储规则", width = 15, dicCode = "goods_category") + @Dict(dicCode = "goods_category") + @ApiModelProperty(value = "仓库存储规则") + private java.lang.String type; + /**地址*/ + @Excel(name = "地址", width = 15) + @ApiModelProperty(value = "地址") + private String address; + /**管理员*/ + @Excel(name = "管理员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") + @ApiModelProperty(value = "管理员") + private String userId; + /**管理员*/ + @Excel(name = "管理员", width = 15) + @ApiModelProperty(value = "管理员") + private String username; + /**库存预定*/ + @Excel(name = "库存预定", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "库存预定") + private String state; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/StarehouseMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/StarehouseMapper.java new file mode 100644 index 00000000..3336198b --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/StarehouseMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.starehouse.mapper; + + + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.starehouse.entity.Starehouse; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 仓库管理 + * @Author: jeecg-boot + * @Date: 2023-01-06 + * @Version: V1.0 + */ +public interface StarehouseMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/xml/StarehouseMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/xml/StarehouseMapper.xml new file mode 100644 index 00000000..a75a853a --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/mapper/xml/StarehouseMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/IStarehouseService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/IStarehouseService.java new file mode 100644 index 00000000..a08ad778 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/IStarehouseService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.demo.starehouse.service; + + + +import org.jeecg.modules.demo.starehouse.entity.Starehouse; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 仓库管理 + * @Author: jeecg-boot + * @Date: 2023-01-06 + * @Version: V1.0 + */ +public interface IStarehouseService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/impl/StarehouseServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/impl/StarehouseServiceImpl.java new file mode 100644 index 00000000..9b1ce33d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/starehouse/service/impl/StarehouseServiceImpl.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.demo.starehouse.service.impl; + + + +import org.jeecg.modules.demo.starehouse.entity.Starehouse; +import org.jeecg.modules.demo.starehouse.mapper.StarehouseMapper; +import org.jeecg.modules.demo.starehouse.service.IStarehouseService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 仓库管理 + * @Author: jeecg-boot + * @Date: 2023-01-06 + * @Version: V1.0 + */ +@Service +public class StarehouseServiceImpl extends ServiceImpl implements IStarehouseService { + +} From d51bed698c459cf93d101bb6da5a5a7fe1d81db1 Mon Sep 17 00:00:00 2001 From: mors <3067699729@qq.com> Date: Fri, 6 Jan 2023 17:32:12 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/jeecg/JVxeTable/index.js | 4 +- .../views/zyclothsample/ZyClothSampleList.vue | 2 +- .../views/zystylemodel/ZyStyleModelList.vue | 107 ++++++++++++++---- .../zyStyleModular/entity/ZyStyleModular.java | 16 +-- .../demo/base/entity/ZyClothsComponent.java | 8 +- .../base/entity/ZyClothsModularCompent.java | 28 ++--- .../ZyProcessComponentController.java | 16 +-- .../demo/pro/entity/ZyProcessComponent.java | 10 +- .../impl/ZyProcessComponentServiceImpl.java | 14 +-- .../entity/ZyStyleAccessories.java | 16 +-- .../jeecg/modules/maker/entity/ZyMaker.java | 6 +- .../productModule/entity/ProductModule.java | 36 +++--- .../entity/ZyProcessModular.java | 28 ++--- .../mapper/ZyStyleFabricMapper.java | 2 + .../controller/ZyStyleModelController.java | 59 ++++------ .../zystylemodel/entity/ZyStyleModel.java | 6 +- .../service/impl/ZyStyleModelServiceImpl.java | 4 +- 17 files changed, 204 insertions(+), 158 deletions(-) diff --git a/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js b/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js index e325327d..b6c9b6ca 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js +++ b/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js @@ -30,8 +30,8 @@ export const AllCells = { ...mapCell(JVXETypes.select, JVxeSelectCell), ...mapCell(JVXETypes.selectSearch, JVxeSelectCell), // 下拉搜索 ...mapCell(JVXETypes.selectMultiple, JVxeSelectCell), // 下拉多选 - ...mapCell(JVXETypes.date, JVxeDateCell), - ...mapCell(JVXETypes.datetime, JVxeDateCell), + ...mapCell(JVXETypes.date, JVxeDateCell),//yyyy-MM-dd 弹出日历提供选择 有日期没有时间 + ...mapCell(JVXETypes.datetime, JVxeDateCell),//yyyy-MM-dd HH:mm:ss 弹出日历提供选择 有日期有时间 ...mapCell(JVXETypes.upload, JVxeUploadCell), ...mapCell(JVXETypes.textarea, JVxeTextareaCell), diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue index 92c18b29..d3dcca18 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue @@ -108,7 +108,7 @@ - // TODO: 跳转到模块样板 + 模块样板 diff --git a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue index a632b523..b82a502c 100644 --- a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue +++ b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue @@ -1,20 +1,20 @@ + + {{biaoTi}} - - - - + + + + - {{biaoTi}} - - - - - + + + + - 返回 + + + 返回 + + + + + + + - 保存 - + + 详情 @@ -82,9 +92,9 @@ export default { btn: ['add'], }, validatorRules: { - styleId: [ - {required: true, message: '请选择服装类型!'}, - ], + // styleId: [ + // {required: true, message: '请选择服装类型!'}, + // ], }, // 是否正在加载 loading: false, @@ -113,22 +123,25 @@ export default { key: 'styleId', type: JVXETypes.select, placeholder: '请输入${title}', - dictCode: 'zy_cloths_style,style_names,id', - validateRules: [{required: true, message: '${title}不能为空'}] + //dictCode: 'zy_cloths_style,style_names,id', + validateRules: [ + {required: true, message: '${title}不能为空'}, + ], + disabled: true, }, { title: '是否默认尺码', align: "center", - width: '150px', + width: '50px', key: 'isdefault', type: JVXETypes.select, dictCode: 'isdefault', defaultValue: 0, }, {key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '120px', type: JVXETypes.select}, - {key: 'size', title: '码数', width: '100px', dictCode: 'size', type: JVXETypes.select}, - {key: 'anumbers', title: '型', width: '100px', dictCode: 'hsize', type: JVXETypes.select}, - {key: 'bnumbers', title: '号', width: '100px', dictCode: 'xsize', type: JVXETypes.select}, + {key: 'size', title: '码数', width: '90px', dictCode: 'size', type: JVXETypes.select}, + {key: 'anumbers', title: '型', width: '80px', dictCode: 'hsize', type: JVXETypes.select}, + {key: 'bnumbers', title: '号', width: '80px', dictCode: 'xsize', type: JVXETypes.select}, {key: 'collarLarge', title: '领大', width: '80px', type: JVXETypes.input}, {key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input}, {key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input}, @@ -138,13 +151,14 @@ export default { {key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input}, {key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input}, {key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input}, + {key: 'createTime', title: '创建时间', width: '100px', type: JVXETypes.datetime}, { title: '操作', key: 'action', type: JVXETypes.slot, fixed: 'right', - minWidth: '100px', + minWidth: '80px', align: 'center', slotName: 'action', } @@ -159,6 +173,7 @@ export default { importExcelUrl: "zystylemodel/zyStyleModel/importExcel", }, //参数 + styleId: '', loadRouteType: false, id: null, rowId: '', @@ -178,6 +193,46 @@ export default { }, }, methods: { + + //新增触发事件 + added(event){ + //this.styleId = this.$route.query.id; + event.row.styleId = this.$route.query.id; + console.log("新增触发事件", event) + let httpUrl = this.url.add; + let method = 'post'; + //httpUrl += this.url.add; + //method = 'post'; + httpAction(httpUrl, event.row, method).then((res) => { + if (res.success) { + this.$message.success(res.message); + this.$emit('ok'); + } else { + this.$message.warning(res.message); + } + }) + }, + //数据发生变化时事件 + handleValueChange(event) { + + //this.submitForm(event) + console.log("//数据发生变化时事件", event); + //const str = event.row.id; + let httpUrl = ''; + let method = ''; + + httpUrl += this.url.edit; + method = 'put'; + + httpAction(httpUrl, event.row, method).then((res) => { + if (res.success) { + this.$message.success(res.message); + this.$emit('ok'); + } else { + this.$message.warning(res.message); + } + }) + }, // 详情 viewDetail(id) { this.$refs.ZyStyleModelListDetails.showModal(id) @@ -234,8 +289,9 @@ export default { loadParameter() { if (this.loadRouteType === false) { this.id = this.$route.query.id; + //this.styleId = this.id; this.biaoTi = this.$route.query.styleNames + "款式型号管理"; - console.log("**********传递到此层的id:" + this.id); + //console.log("**********传递到此层的id:" + this.id); this.loadRouteType = true; } }, @@ -271,6 +327,7 @@ export default { this.loading = false }) }, + // 当分页参数变化时触发的事件 handlePageChange(event) { // 重新赋值 diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java index f697df02..99e97886 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java @@ -43,14 +43,14 @@ public class ZyStyleModular implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期") private Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private Date updateTime; +// /**更新人*/ +// @ApiModelProperty(value = "更新人") +// private String updateBy; +// /**更新日期*/ +// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// @ApiModelProperty(value = "更新日期") +// private Date updateTime; /**所属部门*/ @ApiModelProperty(value = "所属部门") private String sysOrgCode; diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java index 64c98d96..9898921b 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java @@ -70,10 +70,10 @@ public class ZyClothsComponent implements Serializable { @Dict(dicCode = "zyModularType") private java.lang.String modularType; - /**部件类型*/ - @Excel(name = "部件类型", width = 15) - @ApiModelProperty(value = "部件类型") - private java.lang.String componentType; +// /**部件类型*/ +// @Excel(name = "部件类型", width = 15) +// @ApiModelProperty(value = "部件类型") +// private java.lang.String componentType; /**企业*/ @Excel(name = "企业", width = 15) diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java index a8f1ae88..abff8e31 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java @@ -34,25 +34,25 @@ public class ZyClothsModularCompent implements Serializable { @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") private String id; - /**创建人*/ - @ApiModelProperty(value = "创建人") - private String createBy; +// /**创建人*/ +// @ApiModelProperty(value = "创建人") +// private String createBy; /**创建日期*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期") private Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private Date updateTime; - /**所属部门*/ - @ApiModelProperty(value = "所属部门") - private String sysOrgCode; +// /**更新人*/ +// @ApiModelProperty(value = "更新人") +// private String updateBy; +// /**更新日期*/ +// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// @ApiModelProperty(value = "更新日期") +// private Date updateTime; +// /**所属部门*/ +// @ApiModelProperty(value = "所属部门") +// private String sysOrgCode; /**编码*/ @Excel(name = "编码", width = 15) @ApiModelProperty(value = "编码") diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java index aefddbe9..07a2b2e2 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java @@ -217,14 +217,14 @@ public class ZyProcessComponentController extends JeecgController { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java index fb978fb5..19dedfe3 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java @@ -1,46 +1,29 @@ package org.jeecg.modules.zystylemodel.controller; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.alibaba.fastjson.JSONObject; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.util.oConvertUtils; - - import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; - -import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper; import org.jeecg.modules.zystylemodel.entity.ZyStyleModel; import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO; import org.jeecg.modules.zystylemodel.service.IZyStyleModelService; -import org.jeecgframework.poi.excel.ExcelImportUtil; -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; -import org.jeecg.common.system.base.controller.JeecgController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; /** * @Description: zy_style_model @@ -55,6 +38,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class ZyStyleModelController extends JeecgController { @Autowired private IZyStyleModelService zyStyleModelService; + @Autowired + private ZyStyleFabricMapper zyStyleFabricMapper; /** * 分页列表查询 @@ -65,7 +50,7 @@ public class ZyStyleModelController extends JeecgController> queryPageList(ZyStyleModel zyStyleModel,String id, @@ -73,15 +58,18 @@ public class ZyStyleModelController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap()); - System.out.println(zyStyleModel.getStyleId()); //queryWrapper.eq("style_id", id); Page page = new Page(pageNo, pageSize); IPage pageList = zyStyleModelService.page(page, queryWrapper); + List records = pageList.getRecords(); + for (ZyStyleModel zy : records){ + zy.setStyleId(zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId())); + } return Result.OK(pageList); } /** - * 添加 + * 添加 * * @param zyStyleModel * @return @@ -91,8 +79,8 @@ public class ZyStyleModelController extends JeecgController add(@RequestBody ZyStyleModel zyStyleModel) { + //System.err.println("zyStyleModel add: "+zyStyleModel+ LocalDateTime.now()); zyStyleModel.setId(null); - System.out.println("zyStyleModel add"+zyStyleModel); zyStyleModelService.save(zyStyleModel); return Result.OK("添加成功!"); } @@ -108,6 +96,7 @@ public class ZyStyleModelController extends JeecgController edit(@RequestBody ZyStyleModel zyStyleModel) { + //System.err.println("zyStyleModel edit: "+zyStyleModel+ LocalDateTime.now()); zyStyleModelService.updateById(zyStyleModel); return Result.OK("编辑成功!"); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java index 0e8bbb23..9d8a5be8 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java @@ -38,7 +38,7 @@ public class ZyStyleModel implements Serializable { private java.lang.String id; /**款式id*/ @Excel(name = "款式id", width = 15) - @Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id") + //@Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id") @ApiModelProperty(value = "款式id") private java.lang.String styleId; /**是否默认尺码*/ @@ -107,8 +107,8 @@ public class ZyStyleModel implements Serializable { @ApiModelProperty(value = "下摆") private java.lang.Float hem; /**创建时间*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern="yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建时间") private java.util.Date createTime; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java index abf60418..110e2773 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java @@ -66,11 +66,11 @@ public class ZyStyleModelServiceImpl extends ServiceImpl Date: Fri, 6 Jan 2023 18:07:31 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=B7=A5=E5=BA=8F?= =?UTF-8?q?=E5=88=B6=E5=AE=9A=201.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/device/ZyDeviceListRef.vue | 195 ++++++ .../views/devicetype/ZyDevicetypeListRef.vue | 579 +++++++++--------- .../productplan/ZyPlanProcessDataList.vue | 497 +++++---------- .../ZyPlanProcessDataList_back1223.vue | 282 ++++++--- .../views/productplan/ZyPlanProcessList.vue | 34 +- .../src/views/team/GroupxList.vue | 37 +- .../team/modules/StationMachineModal.vue | 23 +- .../jeecg/modules/device/entity/ZyDevice.java | 134 ++-- .../controller/ZyPlanProcessController.java | 13 +- .../productplan/entity/vo/ProcessDataVo.java | 9 +- .../impl/ZyPlanProcessServiceImpl.java | 22 +- .../controller/StationMachineController.java | 28 + .../controller/StationToolController.java | 35 ++ .../jeecg/modules/team/entity/Station.java | 2 +- .../modules/team/entity/StationMachine.java | 2 +- .../modules/team/vo/StationMachineVo.java | 16 + .../jeecg/modules/team/vo/StationToolVo.java | 33 + .../org/jeecg/modules/team/vo/StationVo.java | 16 + 18 files changed, 1132 insertions(+), 825 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/vo/StationMachineVo.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/vo/StationToolVo.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/vo/StationVo.java diff --git a/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue b/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue new file mode 100644 index 00000000..0299a93c --- /dev/null +++ b/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + + + + 已选择 {{ selectedRowKeys.length }}项 + 清空 + + + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue b/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue index 9a27a0cc..ecfcb124 100644 --- a/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue +++ b/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue @@ -1,304 +1,301 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - 查询 - 重置 - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - 已选择 {{ selectedRowKeys.length }}项 - 清空 - + + + + + + + - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue index bef4569a..2a210fd6 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue @@ -1,111 +1,30 @@ - - - 导出 + 返回 - - - - - {{ item.stationName }} - - - - - - - - {{ item.name }} - - - - - - - - {{ item.name }} - - - - - - - - - - - - - - - - - - - - - - - - 提交 + @valueChange="handleValueChange" + @save="handleTableSave" + /> - - @@ -114,189 +33,135 @@ import '@/assets/less/TableExpand.less' import {mixinDevice} from '@/utils/mixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin' -import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' -import {getAction} from "@api/manage"; -import {filterObj} from "@/utils/util"; +import {getAction, postAction} from "@api/manage"; +import {filterObj, pushIfNotExist, randomNumber, randomUUID} from "@/utils/util"; +import {JVXETypes} from '@/components/jeecg/JVxeTable' export default { - name: 'ZyPlanProcessList', + name: 'ZyPlanProcessDataList', mixins: [JeecgListMixin, mixinDevice], - components: { - ZyPlanProcessModal - }, data() { - // this.cacheData = this.dataSource.map(item => ({ ...item })); - this.cacheData = []; return { + toolbarConfig: { + // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 + btn: ['save'] + }, description: '生产计划工序管理页面', + loading: false, + // 分页器参数 + // pagination: { + // // 当前页码 + // current: 1, + // // 每页的条数 + // pageSize: 10, + // // 可切换的条数 + // pageSizeOptions: ['10', '20', '30', '50'], + // // 数据总数(目前并不知道真实的总数,所以先填写0,在后台查出来后再赋值) + // total: 0, + // }, + // 选择的行 + // selectedRows: [], + // 数据源,控制表格的数据 + dataSource: [], // columns, - // 表头 columns: [ - { - title: '#', - dataIndex: 'productProcessId', - key: 'rowIndex', - width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; - } - }, - /* { - title: '计划id', - align: "center", - dataIndex: 'planId' - },*/ - { - title: '工单编号', - align: "center", - dataIndex: 'workOrderId', - scopedSlots: {customRender: 'workOrderId'} - }, - /*{ - title: '产品id', - align: "center", - dataIndex: 'productId' - }, - { - title: '工序id', - align: "center", - dataIndex: 'productProcessId' - },*/ - { - title: '产品', - align: "center", - dataIndex: 'productName' - }, - { - title: '车间', - align: "center", - dataIndex: 'departName' - }, - { - title: '工序', - align: "center", - dataIndex: 'processName' - }, + {key: 'workOrderId', title: '工单编号', width: '180px'}, + {key: 'productName', title: '产品名称', width: '180px'}, + {key: 'departName', title: '车间名称', width: '180px'}, + {key: 'processName', title: '工序名称', width: '180px'}, { title: '工位列表', - align: "center", - dataIndex: 'stationList', - width: 150, - scopedSlots: {customRender: 'stationList'} - }, - { - title: '工位工具列表', - align: "center", - dataIndex: 'toolsList', - width: 150, - // scopedSlots: {customRender: this.toolsList} - scopedSlots: {customRender: 'toolsList'} - }, - { - title: '工具设备列表', - align: "center", - dataIndex: 'machineList', - width: 150, - scopedSlots: {customRender: 'machineList'} + key: 'stationId', + type: JVXETypes.select, + width: '200px', + options: [], + placeholder: '请选择${title}', + }, { + title: '设备列表', + key: 'machineIds', + type: JVXETypes.selectMultiple, + width: '200px', + options: [], + placeholder: '请选择${title}', + }, { + title: '工具列表', + key: 'toolsIds', + type: JVXETypes.selectMultiple, + width: '200px', + options: [], + placeholder: '请选择${title}', }, { + key: 'proProcess', title: '前导工序', - align: "center", - dataIndex: 'proProcess', - width: 150, - scopedSlots: {customRender: 'proProcess'} + dictCode: 'zy_process,process_name,id,id in(select process_id from zy_product_process where product_id="1")', + width: '150', + type: JVXETypes.select }, - { - title: '后导工序', - align: "center", - dataIndex: 'proProcess', - width: 150, - scopedSlots: {customRender: 'postProcess'} - }, - { - title: '输入产品', - align: "center", - dataIndex: 'inputProduct', - width: 150, - scopedSlots: {customRender: 'inputProduct'} - }, - { - title: '成品/半成品', - align: "center", - dataIndex: 'semiProduct', - width: 150, - scopedSlots: {customRender: 'semiProduct'} - }, - - // { - // title: 'operation', - // dataIndex: 'operation', - // scopedSlots: {customRender: 'operation'}, - // }, - - // { - // title: '操作', - // dataIndex: 'action', - // align: "center", - // fixed: "right", - // width: 147, - // scopedSlots: {customRender: 'action'} - // } + {key: 'postProcess', title: '后导工序', width: '150', type: JVXETypes.select}, + {key: 'inputProduct', title: '输入产品', width: '150', type: JVXETypes.input}, + {key: 'semiProduct', title: '成品/半成品', width: '150', type: JVXETypes.input}, ], - editingKey: '', url: { list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", - stationToolslist: "/stationTool/list", - stationMachinelist: "/stationMachine/list", - // productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", - delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", - // deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", - // exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", - // importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", + stationToolslist: "/stationTool/list2", + stationMachinelist: "/stationMachine/list2", + addProcessBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addProcessBatch", }, loadRouteType: false, planId: "", dictOptions: {}, - // superFieldList: [], + superFieldList: [], + stationList: [], toolsList: [], machineList: [], + clickTrue: true, } }, created() { - this.getSuperFieldList(); - }, - computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, }, methods: { + + // 【整体保存】点击保存按钮时触发的事件 + handleTableSave({$table, target}) { + console.log("保存开始-----") + // 校验整个表格 + $table.validate().then((errMap) => { + // 校验通过 + if (!errMap) { + // 获取所有数据 + let tableData = target.getTableData() + tableData.forEach(item => { + item.id = ''; + }) + console.log('当前保存的数据是:', tableData) + // // 获取新增的数据 + // let newData = target.getNewData() + // console.log('-- 新增的数据:', newData) + // // 获取删除的数据 + // let deleteData = target.getDeleteData() + // console.log('-- 删除的数据:', deleteData) + + // 【模拟保存】 + this.loading = true + postAction(this.url.addProcessBatch, tableData).then(res => { + if (res.success) { + this.$message.success(`保存成功!`) + } else { + this.$message.warn(`保存失败:` + res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) + }, fanHui() { this.$router.push({ path: '/productplan/ZyPlanProcessList', }); }, - getToolAndMachine(stationId) { - // alert("stationId=" + stationId); - getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => { - if (res.success) { - this.toolsList = res.result.records || res.result; - console.log("toolsList", JSON.stringify(this.toolsList)) - } else { - this.$message.warning(res.message) - } - }); - getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => { - if (res.success) { - this.machineList = res.result.records || res.result; - console.log("machineList", JSON.stringify(this.toolsList)) - } else { - this.$message.warning(res.message) - } - }); - }, //加载传递参数 loadParameter() { if (this.loadRouteType === false) { @@ -307,14 +172,16 @@ export default { } }, loadData(arg) { + console.log("the loadData---------开始"); + // var that = this; if (!this.url.list) { this.$message.error("请设置url.list属性!") return } //加载数据 若传入参数1则加载第一页的内容 - if (arg === 1) { - this.ipagination.current = 1; - } + // if (arg === 1) { + // this.ipagination.current = 1; + // } this.loadParameter(); var params = this.getQueryParams();//查询条件 this.loading = true; @@ -322,19 +189,12 @@ export default { getAction(this.url.list, params).then((res) => { if (res.success) { this.dataSource = res.result.records || res.result; - if (res.result.total) { - this.ipagination.total = res.result.total; - } else { - this.ipagination.total = 0; - } + this.stationList = this.dataSource[0].stationList; } else { + // this.stationIdCode = "station,station_name,id,depart_id in (select workshop_id from zy_product_plan where id='" + this.planId + "')"; this.$message.warning(res.message) } }).finally(() => { - // this.dataSource.forEach(item => { - // item['stationName'] = this.stationName; - // item['stationNum'] = this.stationNum; - // }) this.loading = false }) }, @@ -352,78 +212,61 @@ export default { param.planId = this.planId; return filterObj(param); }, - // initDictConfig() { - // }, - getSuperFieldList() { - // let fieldList = []; - // fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'productName', text: '生产计划id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) - // this.superFieldList = fieldList - }, - // handleChange(value, key, column) { - // const newData = [...this.data]; - // const target = newData.find(item => key === item.key); - // if (target) { - // target[column] = value; - // this.data = newData; - // } - // }, - edit(key) { - alert("the edit() record =" + JSON.stringify(key)) - // const newData = [...this.data]; - const newData = [...this.dataSource]; - // const newData = record; - console.log("the edit() newData =", JSON.stringify(newData)); - // this.editingKey = '0'; - // record.editable = true; - // const target = newData.find(item => key === item.key); - const target = newData[0]; - console.log("the edit() target =", JSON.stringify(target)); - this.editingKey = key; - console.log("the edit() editingKey =", this.editingKey); - if (target) { - // debugger; - target.editable = true; - this.dataSource = newData; - } - }, - save(key) { - // const newData = [...this.data]; - const newData = this.dataSource; - console.log("save() newData=", JSON.stringify(newData)) - const newCacheData = [...this.cacheData]; - const target = newData.find(item => key === item.key); - const targetCache = newCacheData.find(item => key === item.key); - if (target && targetCache) { - delete target.editable; - this.dataSource = newData; - Object.assign(targetCache, target); - this.cacheData = newCacheData; - } - this.editingKey = ''; + + // 当选择的行变化时触发的事件 + handleSelectRowChange(event) { + console.log("handleSelectRowChange") + console.log("handleSelectRowChange-event:", event) + const {type, row, column, value, target, $table} = event + console.log(JSON.stringify(this.stationList)); + // target.$refs.vxe.columns[6].dictCode = this.stationIdCode; + target.$refs.vxe.columns[6].options = this.stationList; + // 清空后两列的数据 + // target.setValues([{ + // rowKey: row.id, + // values: {machineIds: '', toolsIds: ''} + // }]) + // target.$refs.vxe.columns[4].options = [] }, - cancel(key) { - const newData = this.dataSource; - const target = newData.find(item => key === item.key); - this.editingKey = ''; - if (target) { - Object.assign(target, this.cacheData.find(item => key === item.key)); - delete target.editable; - this.dataSource = newData; + /** 当选项被改变时,联动其他组件 */ + handleValueChange(event) { + const {type, row, column, value, target} = event + console.log("event", event) + console.log("row", row) + // if (type === JVXETypes.select) { + // 第一列 + if (column.key === 'stationId') { + // 设置第二列的 options + console.log('this stationid(row.id):', row.stationId) + // 清空后两列的数据 + target.setValues([{ + rowKey: row.id, + values: {machineIds: '', toolsIds: ''} + }]) + target.$refs.vxe.columns[7].options = [] + target.$refs.vxe.columns[8].options = [] + + getAction(this.url.stationMachinelist, {"stationId": row.stationId}).then((res) => { + if (res.success) { + this.machineList = res.result.records || res.result; + console.log("machineList", JSON.stringify(this.machineList)) + target.$refs.vxe.columns[7].options = this.machineList; + } else { + this.$message.warning(res.message) + } + }); + + getAction(this.url.stationToolslist, {"stationId": row.stationId}).then((res) => { + if (res.success) { + this.toolsList = res.result.records || res.result; + console.log("toolsList", JSON.stringify(this.toolsList)) + target.$refs.vxe.columns[8].options = this.toolsList; + } else { + this.$message.warning(res.message) + } + }); } - }, + } }, }; - \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue index f17cd089..6f91939d 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue @@ -1,52 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 导出 + 导出 + 保存 返回 - - - - - - - - - {{ item.name }} - - + + + {{ item.name }} + + + + + + + + + + + + + + + + + + @@ -110,13 +118,16 @@ export default { ZyPlanProcessModal }, data() { + // this.cacheData = this.dataSource.map(item => ({ ...item })); + this.cacheData = []; return { description: '生产计划工序管理页面', + // columns, // 表头 columns: [ { title: '#', - dataIndex: '', + dataIndex: 'productProcessId', key: 'rowIndex', width: 60, align: "center", @@ -124,21 +135,27 @@ export default { return parseInt(index) + 1; } }, - // { - // title: '计划id', - // align: "center", - // dataIndex: 'planId' - // }, + /* { + title: '计划id', + align: "center", + dataIndex: 'planId' + },*/ { title: '工单编号', align: "center", - dataIndex: 'workOrderId' + dataIndex: 'workOrderId', + scopedSlots: {customRender: 'workOrderId'} }, - { + /*{ title: '产品id', align: "center", dataIndex: 'productId' }, + { + title: '工序id', + align: "center", + dataIndex: 'productProcessId' + },*/ { title: '产品', align: "center", @@ -166,8 +183,8 @@ export default { align: "center", dataIndex: 'toolsList', width: 150, - scopedSlots: {customRender: 'toolsList'} // scopedSlots: {customRender: this.toolsList} + scopedSlots: {customRender: 'toolsList'} }, { title: '工具设备列表', @@ -177,14 +194,50 @@ export default { scopedSlots: {customRender: 'machineList'} }, { - title: '操作', - dataIndex: 'action', + title: '前导工序', align: "center", - fixed: "right", - width: 147, - scopedSlots: {customRender: 'action'} - } + dataIndex: 'proProcess', + width: 150, + scopedSlots: {customRender: 'proProcess'} + }, + { + title: '后导工序', + align: "center", + dataIndex: 'proProcess', + width: 150, + scopedSlots: {customRender: 'postProcess'} + }, + { + title: '输入产品', + align: "center", + dataIndex: 'inputProduct', + width: 150, + scopedSlots: {customRender: 'inputProduct'} + }, + { + title: '成品/半成品', + align: "center", + dataIndex: 'semiProduct', + width: 150, + scopedSlots: {customRender: 'semiProduct'} + }, + + // { + // title: 'operation', + // dataIndex: 'operation', + // scopedSlots: {customRender: 'operation'}, + // }, + + // { + // title: '操作', + // dataIndex: 'action', + // align: "center", + // fixed: "right", + // width: 147, + // scopedSlots: {customRender: 'action'} + // } ], + editingKey: '', url: { list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", stationToolslist: "/stationTool/list", @@ -198,7 +251,7 @@ export default { loadRouteType: false, planId: "", dictOptions: {}, - superFieldList: [], + // superFieldList: [], toolsList: [], machineList: [], } @@ -295,48 +348,75 @@ export default { // initDictConfig() { // }, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) - fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) - fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) - fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) - fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''}) - fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) - this.superFieldList = fieldList + // let fieldList = []; + // fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'productName', text: '生产计划id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) + // this.superFieldList = fieldList }, - // jumpPage1(record) { - // this.$router.push({ - // // path: '/productplan/ZyProductPlanList', - // path: '/productplan/ZyPlanProcessDataList', - // - // // query: { // 路由携带参数 - // // 'stationId': record.id, - // // 'stationName': record.stationName, - // // }, - // }); - // }, - // pf(record) { - // this.$router.push({ - // path: '/productplan/ZyPlanProcessAddList', - // query: { // 路由携带参数 - // } - // }); - - // getAction("productPlanlist", {id: record.id}).then((res) => { - // if (res.success) { - // this.$router.push({ - // path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', - // query: { // 路由携带参数 - // } - // }); - // } else { - // this.$message.error(res.message) + // handleChange(value, key, column) { + // const newData = [...this.data]; + // const target = newData.find(item => key === item.key); + // if (target) { + // target[column] = value; + // this.data = newData; // } - // }); // }, - } -} + edit(key) { + alert("the edit() record =" + JSON.stringify(key)) + // const newData = [...this.data]; + const newData = [...this.dataSource]; + // const newData = record; + console.log("the edit() newData =", JSON.stringify(newData)); + // this.editingKey = '0'; + // record.editable = true; + // const target = newData.find(item => key === item.key); + const target = newData[0]; + console.log("the edit() target =", JSON.stringify(target)); + this.editingKey = key; + console.log("the edit() editingKey =", this.editingKey); + if (target) { + // debugger; + target.editable = true; + this.dataSource = newData; + } + }, + save(key) { + // const newData = [...this.data]; + const newData = this.dataSource; + console.log("save() newData=", JSON.stringify(newData)) + const newCacheData = [...this.cacheData]; + const target = newData.find(item => key === item.key); + const targetCache = newCacheData.find(item => key === item.key); + if (target && targetCache) { + delete target.editable; + this.dataSource = newData; + Object.assign(targetCache, target); + this.cacheData = newCacheData; + } + this.editingKey = ''; + }, + cancel(key) { + const newData = this.dataSource; + const target = newData.find(item => key === item.key); + this.editingKey = ''; + if (target) { + Object.assign(target, this.cacheData.find(item => key === item.key)); + delete target.editable; + this.dataSource = newData; + } + }, + }, +}; \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue index 0177564e..fd3b237b 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue @@ -20,17 +20,17 @@ - - - - - 删除 - - - 批量操作 - - - + + + + + + + + + + + @@ -171,12 +171,12 @@ export default { dataIndex: 'toolsIds_dictText', scopedSlots: {customRender: 'toolsIds_dictText'} }, - { - title: '成员', - align: "center", - dataIndex: 'userIds_dictText', - scopedSlots: {customRender: 'userIds_dictText'} - }, + // { + // title: '成员', + // align: "center", + // dataIndex: 'userIds_dictText', + // scopedSlots: {customRender: 'userIds_dictText'} + // }, { title:'前导工序', align:"center", diff --git a/ant-design-vue-jeecg/src/views/team/GroupxList.vue b/ant-design-vue-jeecg/src/views/team/GroupxList.vue index 3f2afa55..4256b0c9 100644 --- a/ant-design-vue-jeecg/src/views/team/GroupxList.vue +++ b/ant-design-vue-jeecg/src/views/team/GroupxList.vue @@ -16,26 +16,31 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + 查询 重置 - - {{ toggleSearchStatus ? '收起' : '展开' }} - - + + + + diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue index e2dad99c..9136ab59 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue @@ -27,19 +27,18 @@ - +
{{ text }}
{{biaoTi}}