服装款式相关问题

zhc4dev
赵玉瑞 2 years ago
parent e9d6d744d9
commit 31eee28888
  1. 25
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  2. 95
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  3. 8
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  4. 4
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  5. 2
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  6. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  7. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  8. 23
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  9. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  10. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  11. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java

@ -5,7 +5,7 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId"/>
<j-select-depart v-model="model.enterpriseId" @change="getEnterNums"/>
</a-form-model-item>
</a-col>
</a-row>
@ -167,7 +167,9 @@ export default {
edit: "/base/zyClothsComponent/edit",
queryById: "/base/zyClothsComponent/queryById",
//
sort: "/base/zyClothsComponent/sort"
sort: "/base/zyClothsComponent/sort",
//
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@ -181,6 +183,25 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
getEnterNums() {
if (this.model.id) {
getAction(this.url.enterpriseNum, {id: this.model.enterpriseId}).then((res) => {
if (res.code === 500) {
this.$message({
type: 'error',
message: '只能选择一个企业!'
});
} else if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result + this.model.nums.substring(4);
console.log('编辑中改变企业编号 res.result ' + this.model.nums)
})
}
},
async getNumberClothsComponentList() {
//const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {

@ -5,7 +5,7 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业" @change="getEnterNums"/>
</a-form-model-item>
</a-col>
</a-row>
@ -49,7 +49,8 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">
<j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType" placeholder="请选择模块类型" />
<j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType"
placeholder="请选择模块类型"/>
</a-form-model-item>
</a-col>
</a-row>
@ -68,44 +69,44 @@
</a-form-model-item>
</a-col>
</a-row>
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" 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="modularName">-->
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="模块名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularName">-->
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" 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="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" 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="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
</a-form-model>
</j-form-container>
</a-spin>
@ -162,7 +163,9 @@ export default {
edit: "/base/zyClothsModular/edit",
queryById: "/base/zyClothsModular/queryById",
//getActionurl
sort: "/base/zyClothsModular/sort"
sort: "/base/zyClothsModular/sort",
//
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@ -176,8 +179,26 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
getEnterNums() {
if (this.model.id) {
getAction(this.url.enterpriseNum, {id: this.model.enterpriseId}).then((res) => {
if (res.code === 500) {
this.$message({
type: 'error',
message: '只能选择一个企业!'
});
} else if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result + this.model.nums.substring(4);
console.log('编辑中改变企业编号 res.result ' + this.model.nums)
})
}
},
async bianhao() {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
//let num = res.result;
console.log("+6++++aaa: " + res.result)

@ -78,6 +78,9 @@ export default {
},
confirmLoading: false,
validatorRules: {
enterpriseId: [
{required: true, message: '请选择一个企业!'},
],
nums: [
{required: true, message: '请输入编号!'},
],
@ -85,9 +88,6 @@ export default {
{required: true, message: '请输入类型名称!'},
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
],
enterpriseId: [
{required: true, message: '请选择一个企业!'},
],
},
url: {
add: "/base/zyClothsType/add",
@ -95,7 +95,7 @@ export default {
queryById: "/base/zyClothsType/queryById",
weiyi: "/base/zyClothsType/weiyi",
//
enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},

@ -383,7 +383,7 @@ export default {
//getActionurl
sort: "/zyclothsstyle/zyClothsStyle/sort",
//
enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@ -404,7 +404,7 @@ export default {
if (res.code === 500) {
this.$message({
type: 'error',
message: '只能选择一个企业!'
message: res.message,
});
} else if (res.code !== 200) {
this.$message({

@ -75,6 +75,8 @@ import {filterObj, validateDuplicateValue} from '@/utils/util'
import ZyStyleModelListDetails from "@views/zystylemodel/modules/ZyStyleModelListDetails";
export default {
// Jv
//JVXETable
name: 'ZyStyleModelList',
mixins: [JeecgListMixin, mixinDevice],
components: {

@ -14,6 +14,7 @@ import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
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;
@ -79,6 +80,11 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
@ApiOperation(value = "zy_cloths_type-添加", notes = "zy_cloths_type-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsType zyClothsType) {
//处理空值问题
// Result<?> resultEmpty = zyClothsTypeService.handleEmpty(zyClothsType);
// if (resultEmpty.getMessage().equals("都不为空")){
// return resultEmpty;
// }
if (StringUtils.isEmpty(zyClothsType.getNums())) {
return Result.error("服装类型编号 不能为空");
}
@ -207,5 +213,18 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
return Result.OK(a);
}
@GetMapping(value = "/getEnterpriseNum")
public Result<?> enterpriseNum(@RequestParam(name = "id", required = true)String id) {
if (StringUtils.isEmpty(id)) {
return Result.error("请先选择一个企业");
} else if (id.contains(",")) {
//id.contains(",") 判断是否字符中是否包含","
return Result.error("只能选择一个企业");
} else {
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(id);
//根据企业名称拿到企业编号
return Result.OK(zyClothsTypeService.getEnterpriseNums(enterpriseName));
}
}
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.extension.service.IService;
@ -30,4 +31,5 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
*/
Long getListMax(List<String> stringList, int digits);
Result<?> handleEmpty(ZyClothsType zyClothsType);
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
@ -7,6 +8,7 @@ import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
@ -93,7 +95,10 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
* @return 返回一个long类型的digits位数最大值
*/
@Override
public Long getListMax(@NotNull List<String> stringList, int digits) {
public Long getListMax(List<String> stringList, int digits) {
if (ObjectUtils.isEmpty(stringList)){
return 1L;
}
List<Long> longList = new ArrayList<>();
String REGEX = "[^0-9]";
for (String nums : stringList) {
@ -116,4 +121,20 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
return max;
}
@Override
public Result<?> handleEmpty(ZyClothsType zyClothsType) {
if (ObjectUtils.isEmpty(zyClothsType)){
return Result.error("服装类型数据 不能为空");
}
if (StringUtils.isEmpty(zyClothsType.getNums())) {
return Result.error("服装类型编号 不能为空");
}
//type_name,类型名称,varchar,50,非空,同类型下不重复
if (!StringUtils.hasText(zyClothsType.getTypeName())) {
return Result.error("类型名称 不能为空");
}
return Result.error("true");
}
}

@ -172,20 +172,20 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.OK("添加成功!");
}
@GetMapping(value = "/enterpriseNum")
public Result<?> enterpriseNum(@RequestParam(name = "id", required = true) String id) {
//id.contains(",") 判断是否字符中是否包含","
if (id.contains(",")) {
return Result.error("只能选择一个企业");
} else {
String sort = zyClothsStyleService.enterpriseNum(id);
//System.err.println(sort + " enterpriseNum");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}
return Result.OK(sort);
}
}
// @GetMapping(value = "/enterpriseNum")
// public Result<?> enterpriseNum(@RequestParam(name = "id", required = true) String id) {
// //id.contains(",") 判断是否字符中是否包含","
// if (id.contains(",")) {
// return Result.error("只能选择一个企业");
// } else {
// String sort = zyClothsStyleService.enterpriseNum(id);
// //System.err.println(sort + " enterpriseNum");
// if (StringUtils.isEmpty(sort)) {
// return Result.OK(0);
// }
// return Result.OK(sort);
// }
// }
/**
* getAction的url sort 编码

@ -24,5 +24,5 @@ public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
*/
AllClothStyle queryDetail(String id);
String enterpriseNum(String id);
//String enterpriseNum(String id);
}

@ -59,7 +59,7 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
public AllClothStyle queryDetail(String id) {
AllClothStyle zyAll = new AllClothStyle();
//服装款式详情
List<ZyClothsStyle> zyClothsStyles = detail(id);
List<ZyClothsStyle> zyClothsStyles = this.detail(id);
zyAll.setZyClothsStyles(zyClothsStyles);
//服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
@ -80,12 +80,12 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
return zyAll;
}
@Override
public String enterpriseNum(String id) {
String enterpriseName = zyClothsStyleMapper.getEnterpriseName(id);
//根据企业名称拿到企业编号
return zyClothsTypeService.getEnterpriseNums(enterpriseName);
}
// @Override
// public String enterpriseNum(String id) {
// String enterpriseName = zyClothsStyleMapper.getEnterpriseName(id);
// //根据企业名称拿到企业编号
// return zyClothsTypeService.getEnterpriseNums(enterpriseName);
// }
public List<ZyClothsStyle> detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);

Loading…
Cancel
Save