Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit 50f6ef8390
  1. 1
      ant-design-vue-jeecg/src/components/jeecg/JVxeTable/jvxeTypes.js
  2. 16
      ant-design-vue-jeecg/src/views/pdcomponentprocess/ProductComponentProcessList.vue
  3. 8
      ant-design-vue-jeecg/src/views/pdmodulecomponent/ProductModuleComponentList.vue
  4. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  5. 14
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  6. 167
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  7. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java
  8. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java
  9. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  10. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  11. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  12. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  13. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
  14. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -17,6 +17,7 @@ export const JVXETypes = {
rowDragSort: 'row-drag-sort',
input: 'input',
//数字输入框 只能输入数字 小数也可以 其它类型的无法输入
inputNumber: 'inputNumber',
textarea: 'textarea',
select: 'select',

@ -1,5 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -33,6 +34,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="fanhui" 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>-->
@ -127,6 +129,8 @@
productId:'',
processId:'',
componentId:'',
biaoTi: '',
idt:'',
//
columns: [
{
@ -188,6 +192,7 @@
}
},
created() {
this.idt=this.$route.query.product;
this.getSuperFieldList();
},
computed: {
@ -214,6 +219,15 @@
this.$message.warning(res.message);
}
})},
fanhui(){
this.$router.push({
/*返回产品*/
path: '/pdmodulecomponent/ProductModuleComponentList',/*在引号中填写返回vue*/
query:{
id:this.idt,
}
});
},
initDictConfig(){
},
valueChange(value){
@ -232,7 +246,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
console.log("***********")
this.biaoTi = this.$route.query.styleNames+"部件工序管理";
this.loadRouteType = true;
}
},

@ -83,7 +83,7 @@
</a-button>
</template>
<span slot="action1" slot-scope="text, record">
<a @click="bujian(record.id)">管理</a>
<a @click="bujian(record.id,record.componentId_dictText,idt)">管理</a>
</span>
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@ -122,6 +122,7 @@
description: '产品模块部件表管理页面',
component:'',
productId:'',
idt:'',
//
columns: [
{
@ -188,6 +189,7 @@
}
},
created() {
this.idt=this.$route.query.id;
this.getSuperFieldList();
},
computed: {
@ -214,11 +216,13 @@
this.$message.warning(res.message);
}
})},
bujian(id){
bujian(id,name,product){
this.$router.push({
path: '/pdcomponentprocess/ProductComponentProcessList',
query: { //
'id': id,
name:name,
product:product
}
});
},

@ -208,7 +208,7 @@
// this.data.push(res.result)
// }
//console.log("List "+this.model.nums);
console.log("制衣部件 编号: "+this.model.nums);
},
// bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {

@ -132,7 +132,9 @@ export default {
},
data() {
return {
model: {},
model: {
nums: '',
},
labelCol: {
xs: {span: 24},
sm: {span: 4},
@ -174,17 +176,17 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
bianhao() {
async bianhao() {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
let num = res.result;
console.log("+6++++aaa" + num)
//let num = res.result;
console.log("+6++++aaa: " + res.result)
//num=num.toString()
//while(num.length<n){
//num="0"+num
//}
console.log(num)
this.model.nums = num;
//console.log(num)
this.model.nums = res.result;
})
},
add() {

@ -91,11 +91,11 @@ export default {
// add remove clearSelection
btn: ['add'],
},
validatorRules: {
// validatorRules: {
// styleId: [
// {required: true, message: '!'},
// ],
},
// },
//
loading: false,
//
@ -117,40 +117,140 @@ export default {
columns: [
{
title: '服装款式',
width: '110px',
fixed: 'left',
key: 'styleId',
type: JVXETypes.select,
title: '服装款式', width: '100px', fixed: 'left', key: 'styleId',
type: JVXETypes.normal,
placeholder: '请输入${title}',
//dictCode: 'zy_cloths_style,style_names,id',
validateRules: [
{required: true, message: '${title}不能为空'},
],
// validateRules: [
// {required: true, message: '${title}'},
// ],
disabled: true,
},
{
title: '是否默认尺码',
align: "center",
width: '130px',
key: 'isdefault',
title: '是否默认尺码', align: "center", width: '130px', key: 'isdefault',
type: JVXETypes.select,
dictCode: 'isdefault',
defaultValue: 0,
},
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px', type: JVXETypes.select},
{key: 'size', title: '码数', width: '85px', dictCode: 'size', type: JVXETypes.select},
{key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize', type: JVXETypes.select},
{key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize', type: JVXETypes.select},
{key: 'collarLarge', title: '领大', width: '70px', type: JVXETypes.input},
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input},
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input},
{key: 'shslLength', title: '连肩袖长', width: '100px', type: JVXETypes.input},
{
key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px',
type: JVXETypes.select
},
{
key: 'size', title: '码数', width: '85px', dictCode: 'size',
type: JVXETypes.select
},
{
key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize',
type: JVXETypes.select
},
{
key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize',
type: JVXETypes.select
},
{
key: 'collarLarge',
title: '领大', width: '70px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{
key: 'bust', title: '胸围', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /\D/g, message: '${title}只能输入数字类型',
},
]
},
{
key: 'sleeveLength', title: '袖长', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
]
},
{
key: 'shslLength', title: '连肩袖长', width: '100px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{key: 'tsWidth', title: '总肩宽', width: '80px', type: JVXETypes.input},
{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: 'tsWidth', title: '总肩宽', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{
key: 'cuff', title: '袖口', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{
key: 'waistline', title: '腰围', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{pattern: /[^\d]/g, message: '${title}只能输入数字类型'},
],
},
{
key: 'hem', title: '下摆', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{ required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{key: 'createTime', title: '创建时间', width: '60px', type: JVXETypes.datetime},
{
@ -201,8 +301,6 @@ export default {
console.log("新增触发事件", event)
let httpUrl = this.url.add;
let method = 'post';
//httpUrl += this.url.add;
//method = 'post';
let that = this;
httpAction(httpUrl, event.row, method).then((res) => {
if (res.success) {
@ -216,18 +314,13 @@ export default {
})
},
//
handleValueChange(event) {
async 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) => {
let httpUrl = this.url.edit;
let method = 'put';
await httpAction(httpUrl, event.row, method).then((res) => {
if (res.success) {
this.$message.success(res.message);
this.$emit('ok');

@ -112,7 +112,7 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
@ApiOperation(value = "制衣部件详情", notes = "根据制衣部件详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id:zy_cloths_component对象 Id: "+id);
//System.out.println("controller层接受到的id:zy_cloths_component对象 Id: "+id);
ZyClothsComponentDetail detail = zyClothsComponentService.queryDetail(id);
return Result.OK(detail);
}
@ -154,7 +154,7 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
//编码规则:服装类型(10)+序号(8)
String sort = zyClothsComponentService.sort(id);
System.err.println(sort+ " 制衣部件 sort");
//System.err.println(sort+ " 制衣部件 sort");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}

@ -107,7 +107,7 @@ public class ZyClothsModularController extends JeecgController<ZyClothsModular,
@ApiOperation(value = "制衣模块详情详情", notes = "根据制衣模块详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id: zy_cloths_modularId: "+id);
//System.out.println("controller层接受到的id: zy_cloths_modularId: "+id);
ZyClothsModularDetail detail = zyClothsModularService.queryDetail(id);
return Result.OK(detail);
}

@ -139,7 +139,7 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
listLong.add(Long.valueOf(newNums));
}
System.out.println(listLong);
//System.out.println(listLong);
return Collections.max(listLong) + 1;
}

@ -163,15 +163,11 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.error("添加失败!编号不能为空");
}
LambdaQueryWrapper<ZyClothsStyle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName());
queryWrapper.eq(ZyClothsStyle::getStyleNames, zyClothsStyle.getStyleNames());
int a = zyClothsStyleService.count(queryWrapper);
if (a >= 1)
if (a >= 1) {
return Result.error("存在以添加过的数据!");
// for (ZyClothsStyle zy : zyClothsStyleList) {
// if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) {
// return Result.error("添加失败!数据已存在");
// }
// }
}
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}

@ -95,7 +95,12 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
@ApiOperation(value="zy_style_model-编辑", notes="zy_style_model-编辑")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyStyleModel zyStyleModel) {
public Result<?> edit(@RequestBody ZyStyleModel zyStyleModel) {
zyStyleModel.setStyleId(null);
//限制一些类型的数据只能为数字 否则无法保存
if(!zyStyleModelService.dataTypeProblem(zyStyleModel)){
return Result.error("只能输入数字类型");
}
//System.err.println("zyStyleModel edit: "+zyStyleModel+ LocalDateTime.now());
zyStyleModelService.updateById(zyStyleModel);
return Result.OK("编辑成功!");
@ -141,7 +146,7 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
List<String> idList = (List<String>) map.get("id");
// List<Integer> list = Arrays.asList(ids);
zyStyleModelService.removeByIds(idList);
System.out.println(map);
//System.out.println(map);
//this.zyStyleModelService.removeByIds(Arrays.asList(map.get("deleteIds").split(",")));
return Result.OK("批量删除成功!");
}

@ -18,4 +18,6 @@ public interface IZyStyleModelService extends IService<ZyStyleModel> {
List<ZyStyleModel> detail(String id);
ZyStyleModelDetailsVO queryDetails(String id);
boolean dataTypeProblem(ZyStyleModel zyStyleModel);
}

@ -19,6 +19,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
import java.util.regex.Pattern;
/**
@ -115,6 +116,37 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
return detailsVO;
}
@Override
public boolean dataTypeProblem(ZyStyleModel zyStyleModel) {
// Pattern pattern = Pattern.compile("/[^\\d]/g");
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//正则表达式判断是否是数字字符串(可判断正数,负数和小数)
if (!ObjectUtils.isEmpty(zyStyleModel.getCollarLarge())){
return pattern.matcher(zyStyleModel.getCollarLarge().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getBust())){
return pattern.matcher(zyStyleModel.getBust().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getSleeveLength())){
return pattern.matcher(zyStyleModel.getSleeveLength().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getShslLength())){
return pattern.matcher(zyStyleModel.getShslLength().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getTsWidth())){
return pattern.matcher(zyStyleModel.getTsWidth().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getCuff())){
return pattern.matcher(zyStyleModel.getCuff().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getWaistline())){
return pattern.matcher(zyStyleModel.getWaistline().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getHem())){
return pattern.matcher(zyStyleModel.getHem().toString()).matches();
}
return true;
}
@Contract(pure = true)

@ -31,6 +31,7 @@ import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -87,13 +88,18 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
Page<ZyStyleModule> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords());
if (!ObjectUtils.isEmpty(newStyleModuleList)){
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, newStyleModuleList.size());
pageList2.setRecords(newStyleModuleList);
return Result.OK(pageList2);
} else {
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
}

Loading…
Cancel
Save