2022-11-05 赵玉瑞 修改款式模块管理

zhc4dev
赵玉瑞 2 years ago
parent 096a8f739c
commit 347f8afb10
  1. 5
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 2
      ant-design-vue-jeecg/src/views/personel/shift/ZyShiftList.vue
  3. 27
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  4. 32
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  5. 29
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleForm.vue
  6. 4
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue
  7. 5
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/entity/ZyShift.java
  8. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/rule/OrderNumberRule.java
  9. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
  10. 35
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  11. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/NewStyleModule.java
  12. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  13. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml

@ -266,6 +266,11 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
styleModuleHandleAdd: function (id) {
this.$refs.modalForm.add(id);
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false;
},
handleAdd1: function (id) { handleAdd1: function (id) {
this.$refs.modalForm.add1(id); this.$refs.modalForm.add1(id);
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "新增";

@ -116,7 +116,7 @@
}, },
data () { data () {
return { return {
description: 'zy_shift管理页面', description: '班次管理 zy_shift管理页面',
// //
columns: [ columns: [
{ {

@ -155,30 +155,32 @@
} }
}, },
{ {
title:'服装类型', title:'款式名称',
align:"center", align:"center",
dataIndex: 'typeId' dataIndex: 'styleNames'
}, },
{ {
title:'形式', title:'编号',
align:"center", align:"center",
dataIndex: 'shape_dictText' dataIndex: 'nums'
}, },
{ {
title:'编号', title:'规格',
align:"center", align:"center",
dataIndex: 'nums' dataIndex: 'specification'
}, },
{ {
title:'名称', title:'服装类型',
align:"center", align:"center",
dataIndex: 'styleNames' dataIndex: 'typeId'
}, },
{ {
title:'规格', title:'形式',
align:"center", align:"center",
dataIndex: 'specification' dataIndex: 'shape_dictText'
}, },
{ {
title:'企业', title:'企业',
align:"center", align:"center",
@ -229,14 +231,17 @@
methods: { methods: {
initDictConfig(){ initDictConfig(){
}, },
//
jumpPage1(record) { jumpPage1(record) {
this.$router.push({ this.$router.push({
path: '/src/views/zystylemodule/ZyStyleModuleList', path: '/src/views/zystylemodule/ZyStyleModuleList',
query: { // query: { //
'id': record.id, 'id': record.id,
//'typeId': record.typeId,
} }
}); });
}, },
//
jumpPage2(record) { jumpPage2(record) {
this.$router.push({ this.$router.push({
path: '/src/views/zystylefabric/ZyStyleFabricList', path: '/src/views/zystylefabric/ZyStyleFabricList',
@ -245,6 +250,7 @@
} }
}); });
}, },
//
jumpPage4(record) { jumpPage4(record) {
this.$router.push({ this.$router.push({
path: '/src/views/zystylemodel/ZyStyleModelList', path: '/src/views/zystylemodel/ZyStyleModelList',
@ -253,6 +259,7 @@
} }
}); });
}, },
//
jumpPage5(record) { jumpPage5(record) {
this.$router.push({ this.$router.push({
path: '/process/ZyProcessList', path: '/process/ZyProcessList',

@ -35,7 +35,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="styleModuleHandleAdd(id)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
@ -147,9 +147,9 @@ export default {
} }
}, },
{ {
title: '服装类型', title: '款式名称',
align: "center", align: "center",
dataIndex: 'typeName' dataIndex: 'styleNames'
}, },
{ {
title: '款式编号', title: '款式编号',
@ -157,9 +157,14 @@ export default {
dataIndex: 'styleNums' dataIndex: 'styleNums'
}, },
{ {
title: '款式名称', title: '服装类型',
align: "center", align: "center",
dataIndex: 'styleNames' dataIndex: 'typeName'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularName'
}, },
{ {
title: '模块编号', title: '模块编号',
@ -167,10 +172,11 @@ export default {
dataIndex: 'modularNums' dataIndex: 'modularNums'
}, },
{ {
title: '模块名称', title: '创建时间',
align: "center", align: "center",
dataIndex: 'modularName' dataIndex: 'createTime'
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -209,15 +215,17 @@ export default {
}, },
// //
loadParameter() { loadParameter() {
if (this.loadRouteType == false) { if (this.loadRouteType === false) {
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log(this.id) //this.typeId = this.$route.query.typeId;
console.log('********id对应的为款式style_id: '+this.id);
console.log('******typeId此为类型typeId: '+this.typeId);
this.loadRouteType = true; this.loadRouteType = true;
} }
}, },
loadData(arg) { loadData(arg) {
if(!this.url.list){ if(!this.url.list){
this.$message.error("请设置url.list属性!") this.$message.error("请设置url.list属性!");
return return
} }
// 1 // 1
@ -256,7 +264,8 @@ export default {
param.field = this.getQueryField(); param.field = this.getQueryField();
param.pageNo = this.ipagination.current; param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize; param.pageSize = this.ipagination.pageSize;
param.id=this.id; //param.id=this.id;
param.id=this.$route.query.id;
return filterObj(param); return filterObj(param);
}, },
getSuperFieldList() { getSuperFieldList() {
@ -264,6 +273,7 @@ export default {
fieldList.push({type: 'string', value: 'typeId', text: '类型id', dictCode: "zy_cloths_type,id,type_name"}) fieldList.push({type: 'string', value: 'typeId', text: '类型id', dictCode: "zy_cloths_type,id,type_name"})
fieldList.push({type: 'string', value: 'styleId', text: '款式id', dictCode: "zy_cloths_style,id,style_names"}) fieldList.push({type: 'string', value: 'styleId', text: '款式id', dictCode: "zy_cloths_style,id,style_names"})
fieldList.push({type: 'string', value: 'modularId', text: '模块id', dictCode: "zy_cloths_modular ,id,modular_name"}) fieldList.push({type: 'string', value: 'modularId', text: '模块id', dictCode: "zy_cloths_modular ,id,modular_name"})
fieldList.push({type: 'string', value: 'createTime', text: '创建时间'})
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }

@ -3,16 +3,18 @@
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId"> <a-form-model-item label="款式名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式" /> <j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>-->
<!-- <a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" />
</a-form-model-item>
</a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId"> <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">
<j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular ,modular_name,id" placeholder="请选择模块" /> <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular ,modular_name,id" placeholder="请选择模块" />
@ -44,6 +46,8 @@
data () { data () {
return { return {
model:{ model:{
typeId: '',
styleId: '',
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -55,9 +59,9 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
typeId: [ /*typeId: [
{ required: true, message: '请输入类型id!'}, { required: true, message: '请输入类型id!'},
], ],*/
styleId: [ styleId: [
{ required: true, message: '请输入款式id!'}, { required: true, message: '请输入款式id!'},
], ],
@ -82,8 +86,11 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
add () { add (id) {
this.edit(this.modelDefault); this.edit(this.modelDefault);
//this.model.typeId = typeId;
this.model.styleId = id;
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);

@ -29,10 +29,10 @@
} }
}, },
methods: { methods: {
add () { add (id) {
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(); this.$refs.realForm.add(id);
}) })
}, },
edit (record) { edit (record) {

@ -7,6 +7,11 @@ import lombok.Data;
import java.util.Date; import java.util.Date;
/**
* 这是人员管理子系统下面的班组管理下面的班次管理
* 对应数据库表为 zy_shift
*/
@Data @Data
public class ZyShift { public class ZyShift {

@ -32,5 +32,4 @@ public class OrderNumberRule implements IFillRuleHandler {
} }
return value; return value;
} }
} }

@ -14,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface ZyClothSampleMapper extends BaseMapper<ZyClothSample> { public interface ZyClothSampleMapper extends BaseMapper<ZyClothSample> {
} }

@ -8,8 +8,11 @@ import java.util.stream.Collectors;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
@ -28,6 +31,7 @@ import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule; import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.INewZyStyleModuleService; import org.jeecg.modules.zystylemodule.service.INewZyStyleModuleService;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService; import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -66,6 +70,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@Autowired @Autowired
private IZyClothsTypeService zyClothsTypeService; private IZyClothsTypeService zyClothsTypeService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -82,6 +87,13 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
/*LambdaQueryWrapper<ZyStyleModule> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyStyleModule::getStyleId,id);
Page<NewStyleModule> page = new Page<>(pageNo,pageSize);
Page<NewStyleModule> pageList = zyStyleModuleService.page(page, lambdaQueryWrapper);
System.out.println(pageList.getRecords());
return Result.OK(pageList);*/
List<NewStyleModule> listNewStyleModules = new ArrayList<>(); List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
if (id != null) { if (id != null) {
@ -99,6 +111,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
} }
} }
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper); List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
//System.out.println(list);
for (ZyStyleModule zyStyleModule : list) { for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule(); NewStyleModule newSeMo = new NewStyleModule();
//编辑回显 //编辑回显
@ -119,13 +132,22 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
//服装类型 //服装类型
String typeId = zyStyleModule.getTypeId(); String typeId = zyStyleModule.getTypeId();
ZyClothsType typeById = zyClothsTypeService.getById(typeId); ZyClothsType typeById = zyClothsTypeService.getById(typeId);
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
if (typeById != null){
newSeMo.setTypeName(typeById.getTypeName()); newSeMo.setTypeName(typeById.getTypeName());
} else {
newSeMo.setTypeName("typeName为空");
}
listNewStyleModules.add(newSeMo); listNewStyleModules.add(newSeMo);
} }
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, list.size()); IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, listNewStyleModules.size());
pageList.setRecords(listNewStyleModules); pageList.setRecords(listNewStyleModules);
System.out.println(pageList.getRecords());
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -147,7 +169,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize); Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper); IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
System.out.println(zyStyleModule); //System.out.println(zyStyleModule);
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -162,6 +184,15 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add") //@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) { public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
String styleId = zyStyleModule.getStyleId();
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId);
LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId());
ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper);
zyStyleModule.setTypeId(zyClothsType.getId());
zyStyleModuleService.save(zyStyleModule); zyStyleModuleService.save(zyStyleModule);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

@ -2,11 +2,19 @@ package org.jeecg.modules.zystylemodule.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 增强ZyStyleModule
* 原有的属性太少
*/
@Data @Data
public class NewStyleModule { public class NewStyleModule {
/**主键*/ /**主键*/
@ -48,4 +56,9 @@ public class NewStyleModule {
@Excel(name = "模块名称", width = 15) @Excel(name = "模块名称", width = 15)
@ApiModelProperty(value = "模块名称") @ApiModelProperty(value = "模块名称")
private java.lang.String modularName; private java.lang.String modularName;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
} }

@ -15,4 +15,5 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
*/ */
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> { public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
List<ZyStyleModule> handWritingList(String id);
} }

@ -2,4 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper"> <mapper namespace="org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper">
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule" parameterType="string">
select * from zy_style_module
where style_id = #{id}
</select>
</mapper> </mapper>
Loading…
Cancel
Save