2022-11-10 赵玉瑞 修改服装类型及相关问题

zhc4dev
赵玉瑞 2 years ago
parent 3091022d6f
commit 3a4c15df00
  1. 9
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 4
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  3. 26
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  4. 19
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  5. 9
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricForm.vue
  6. 5
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricModal.vue
  7. 15
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  8. 2
      ant-design-vue-jeecg/src/views/zystylemodel/modules/ZyStyleModelForm.vue
  9. 10
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  10. 24
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleForm.vue
  11. 4
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue
  12. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsType.java
  13. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  14. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/ZyClothsStyle.java
  15. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  16. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  17. 2
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml

@ -9,6 +9,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import store from '@/store'
import {Modal} from 'ant-design-vue'
import type from "@views/exception/type";
export const JeecgListMixin = {
data(){
@ -266,9 +267,15 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false;
},
styleModuleHandleAdd: function (id) {
zyStyleFabricHandleAdd: function (id) {
this.$refs.modalForm.add(id);
this.$refs.modalForm.title = "新增";
console.log("js层id的传递"+id);
this.$refs.modalForm.disableSubmit = false;
},
styleModuleHandleAdd: function (id,typeId) {
this.$refs.modalForm.add(id,typeId);
this.$refs.modalForm.title = "新增";
this.$refs.modalForm.disableSubmit = false;
},
handleAdd1: function (id) {

@ -173,7 +173,7 @@
{
title:'服装类型',
align:"center",
dataIndex: 'typeId'
dataIndex: 'typeId_dictText'
},
{
title:'形式',
@ -237,7 +237,7 @@
path: '/src/views/zystylemodule/ZyStyleModuleList',
query: { //
'id': record.id,
//'typeId': record.typeId,
'typeId': record.typeId,
}
});
},

@ -6,15 +6,16 @@
<a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup
v-model="model.typeId"
field="other"
org-fields="id,type_name"
dest-fields="popup,other"
v-model="model.typeName"
field="type_name"
org-fields="type_name,id"
dest-fields="typeName,typeId"
code="cloths_type"
:multi="false"
@input="popupCallback"
/> {{ typeId }}
/>
</a-form-model-item>
<a-input v-model="model.typeId" hidden/>
</a-col>
<a-col :span="24">
<a-form-model-item label="形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shape">
@ -52,8 +53,8 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="特征" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入特征" ></a-input>
<a-form-model-item label="风格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入风格" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -67,13 +68,13 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="测量方法" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measuringMethod">
<a-input v-model="model.measuringMethod" placeholder="请输入测量方法" ></a-input>
<a-form-model-item label="制衣参数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measuringMethod">
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数" ></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="误差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">
<a-input v-model="model.error" placeholder="请输入误差" ></a-input>
<a-form-model-item label="测体余量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">
<a-input v-model="model.error" placeholder="请输入测体余量" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -127,6 +128,7 @@
data () {
return {
typeId : "",
typeName:"",
model:{
shape:1
},
@ -203,7 +205,7 @@
that.confirmLoading = false;
})
}
})
},
popupCallback(value,row){

@ -27,7 +27,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="zyStyleFabricHandleAdd(id)" type="primary" icon="plus">新增</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-button type="primary" icon="import">导入</a-button>
@ -130,15 +130,20 @@
return parseInt(index)+1;
}
},
{
title:'款式名称',
align:"center",
dataIndex: 'styleNames'
},
{
title:'款式编号',
align:"center",
dataIndex: 'styleNums'
},
{
title:'款式名称',
title:'面料名称',
align:"center",
dataIndex: 'styleNames'
dataIndex: 'fabricName'
},
{
title:'面料编号',
@ -146,9 +151,9 @@
dataIndex: 'fabricNumber'
},
{
title:'面料名称',
title:'创建时间',
align:"center",
dataIndex: 'fabricName'
dataIndex: 'createTime'
},
{
title: '操作',
@ -165,7 +170,7 @@
deleteBatch: "/zystylefabric/zyStyleFabric/deleteBatch",
exportXlsUrl: "/zystylefabric/zyStyleFabric/exportXls",
importExcelUrl: "zystylefabric/zyStyleFabric/importExcel",
},
//
loadRouteType:false,
@ -190,7 +195,7 @@
loadParameter() {
if (this.loadRouteType == false) {
this.id = this.$route.query.id;
console.log(this.id)
console.log("*******传递的id"+this.id)
this.loadRouteType = true;
}
},

@ -5,7 +5,7 @@
<a-row>
<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="请选择款式类型" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -40,6 +40,7 @@
data () {
return {
model:{
styleId: '',
},
labelCol: {
xs: { span: 24 },
@ -75,8 +76,10 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
add (id) {
this.edit(this.modelDefault);
this.model.styleId = id;
console.log("form层的id接收"+id);
},
edit (record) {
this.model = Object.assign({}, record);
@ -108,7 +111,7 @@
that.confirmLoading = false;
})
}
})
},
}

@ -29,10 +29,11 @@
}
},
methods: {
add () {
add (id) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
this.$refs.realForm.add(id);
console.log("Modal层的id传递"+id);
})
},
edit (record) {

@ -87,14 +87,14 @@
total: 0,
showQuickJumper: true,
showSizeChanger: true,
id:null
id:null
},
//
columns: [
{
title: '款式',
title: '服装款式',
width: '150px',
fixed: 'left',
key: 'styleId',
@ -187,7 +187,7 @@
var str = props.rowId;
let httpurl = '';
let method = '';
if (str.search("row") != -1) {
if (str.search("row") !== -1) {
httpurl += this.url.add;
method = 'post';
} else {
@ -203,14 +203,15 @@
}
})
},
//
//
loadParameter() {
if (this.loadRouteType == false) {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
console.log("**********传递到此层的id:"+this.id);
this.loadRouteType = true;
}
},
//
//
loadData(arg) {
// 1
if (arg === 1) {
@ -289,5 +290,5 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -35,7 +35,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="styleModuleHandleAdd(id)" type="primary" icon="plus">新增</a-button>
<a-button @click="styleModuleHandleAdd(id,typeId)" type="primary" icon="plus">新增</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-button type="primary" icon="import">导入</a-button>
@ -156,6 +156,11 @@ export default {
align: "center",
dataIndex: 'styleNums'
},
/*{
title: '服装类型',
align: "center",
dataIndex: 'typeId'
},*/
{
title: '服装类型',
align: "center",
@ -197,6 +202,7 @@ export default {
//
loadRouteType:false,
id:"",
typeId: "",
dictOptions: {},
superFieldList: [],
}
@ -217,7 +223,7 @@ export default {
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
//this.typeId = this.$route.query.typeId;
this.typeId = this.$route.query.typeId;
console.log('********id对应的为款式style_id: '+this.id);
console.log('******typeId此为类型typeId: '+this.typeId);
this.loadRouteType = true;

@ -3,21 +3,28 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<!-- <a-col :span="24">
<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="请选择款式" disabled />
</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 label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-model="model.typeNme" placeholder="请输入服装类型" disabled></a-input>
<a-input v-model="model.typeid" hidden />
</a-form-model-item>
</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="请选择类型" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<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="请选择模块" />
</a-form-model-item>
</a-col>
</a-row>
@ -46,8 +53,8 @@
data () {
return {
model:{
typeId: '',
styleId: '',
typeId: '',
},
labelCol: {
xs: { span: 24 },
@ -86,11 +93,12 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add (id) {
add (id,typeId) {
this.edit(this.modelDefault);
//this.model.typeId = typeId;
this.model.styleId = id;
this.model.typeId = typeId;
},
edit (record) {
this.model = Object.assign({}, record);

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

@ -54,15 +54,15 @@ public class ZyClothsType implements Serializable {
@ApiModelProperty(value = "企业")
private java.lang.String enterpriseId;
/**createTime*/
@Excel(name = "创建时间", width = 15,format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "创建时间", width = 15,format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
/**updateTime*/
@Excel(name = "更新时间", width = 15 ,format = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 15 ,format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
}

@ -159,7 +159,7 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -173,7 +173,7 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
zyClothsStyleService.updateById(zyClothsStyle);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -187,7 +187,7 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
zyClothsStyleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -201,7 +201,7 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
this.zyClothsStyleService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -36,9 +36,14 @@ public class ZyClothsStyle implements Serializable {
@ApiModelProperty(value = "id")
private String id;
/**类型id*/
@Dict(dictTable = "zy_cloths_type", dicText = "type_name", dicCode = "id")
@Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id")
private String typeId;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
private String typeName;
/**形式*/
@Excel(name = "形式", width = 15)
@Dict(dicCode = "style_shape")
@ -110,13 +115,13 @@ public class ZyClothsStyle implements Serializable {
@ApiModelProperty(value = "企业id")
private String enterpriseId;
/**创建时间*/
@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 Date createTime;
/**更新时间*/
@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 Date updateTime;
}

@ -69,7 +69,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyFabricService zyFabricService;
/**
* 分页列表查询
*
@ -117,13 +117,14 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
ZyFabric fabricById = zyFabricService.getById(fabricId);
newZySF.setFabricNumber(fabricById.getFabricNumber());
newZySF.setFabricName(fabricById.getName());
newZySF.setCreateTime(zyStyleF.getCreateTime());
newZyStyleFabrics.add(newZySF);
}
IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size());
pageList.setRecords(newZyStyleFabrics);
return Result.OK(pageList);
}
/**
* 添加
*
@ -138,7 +139,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
zyStyleFabricService.save(zyStyleFabric);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -153,7 +154,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
zyStyleFabricService.updateById(zyStyleFabric);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -168,7 +169,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
zyStyleFabricService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -183,7 +184,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
this.zyStyleFabricService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -96,6 +96,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
System.err.println("传来的 "+id);
if (id != null) {
queryWrapper.eq("style_id", id);
}
@ -111,7 +112,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
}
}
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
//System.out.println(list);
System.out.println(list);
for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule();
//编辑回显
@ -129,10 +130,12 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
ZyClothsModular modularById = zyClothsModularService.getById(modularId);
newSeMo.setModularNums(modularById.getNums());
newSeMo.setModularName(modularById.getModularName());
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
//服装类型
String typeId = zyStyleModule.getTypeId();
ZyClothsType typeById = zyClothsTypeService.getById(typeId);
newSeMo.setCreateTime(zyStyleModule.getCreateTime());
if (typeById != null){
newSeMo.setTypeName(typeById.getTypeName());
} else {
@ -185,13 +188,13 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
String styleId = zyStyleModule.getStyleId();
//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());
//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);
return Result.OK("添加成功!");

@ -169,7 +169,7 @@ mybatis-plus:
table-underline: true
configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true
#jeecg专用配置

Loading…
Cancel
Save