diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue index af5aa95c..e5f6f3ba 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue @@ -3,28 +3,47 @@ - - + + + + + + + + - + + + + + + - + + :dictCode="modenumber" @change="gaibian"> + + + + + + @@ -90,7 +109,8 @@ export default { model: { nums:'', }, - dict:"zy_cloths_style,style_names,nums", + dict:"zy_cloths_style,style_names,id", + modenumber:'zy_style_model,model_number,id', labelCol: { xs: {span: 24}, sm: {span: 5}, @@ -152,30 +172,34 @@ export default { }, // kuanshi(){ - this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'"; + this.dict="zy_cloths_style,style_names,id,enterprise_id="+"'"+this.model.enterpriseId+"'"; this.model.styleId=null + this.model.nums=null }, xiugai(){ - if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){ - this.gaibian() - } + this.modenumber="zy_style_model,model_number,id,style_id="+"'"+this.model.styleId+"'" + this.model.stylemodelId=null + this.model.nums=null + // if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){ + // this.gaibian() + // } }, gaibian(){ var n=3; console.log(this.model) getAction(this.url.sort,this.model).then((res)=>{ - console.log(res) - if(this.model.id==null||parseInt(res.result,10)==0){ - var num=parseInt(res.result,10)+1 + console.log(res.result[1]) + if(this.model.id==null||parseInt(res.result[1],10)==0){ + var num=parseInt(res.result[1],10)+1 }else{ - var num=parseInt(res.result,10) + var num=parseInt(res.result[1],10) } num=num.toString() while(num.length sort(ZyClothSample zyClothSample) { String s=zyClothSampleService.findSort(zyClothSample.getStyleId(),zyClothSample.getStylemodelId()); + String code=zyClothSampleService.findCode(zyClothSample.getStylemodelId()); + String styleId=zyClothSampleService.findStyleNums(zyClothSample.getStyleId()); + List list=new ArrayList<>(); + list.add(code); + if(s==null){ - return Result.OK(0); - }else - return Result.OK(s.substring(21)); + list.add("0"); + }else{ + list.add(s.substring(21)); + } + list.add(styleId); + return Result.OK(list); } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java index a294e9d6..cc727712 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java @@ -64,12 +64,12 @@ public class ZyClothSample implements Serializable { */ @Excel(name = "款式", width = 15) @ApiModelProperty(value = "款式") - @Dict(dicCode = "nums",dictTable = "zy_cloths_style",dicText = "style_names") + @Dict(dicCode = "id",dictTable = "zy_cloths_style",dicText = "style_names") private String styleId; /**型号*/ @Excel(name = "型号", width = 15) @ApiModelProperty(value = "型号") - @Dict(dicCode = "modenumber", dictTable = "", dicText = "") + @Dict(dicCode = "id", dictTable = "zy_style_model", dicText = "model_number") private String stylemodelId; /**管理模块样板*/ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java index e77c0c66..1951d03f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java @@ -18,4 +18,10 @@ public interface ZyClothSampleMapper extends BaseMapper { @Select("select nums from zy_cloth_sample where style_id=#{styleId} and stylemodel_id=#{stylemodelId} order by nums desc limit 0,1") String findSort(@Param("styleId") String styleId, @Param("stylemodelId") String stylemodelId); + + @Select("select model_code from zy_style_model where id=#{stylemodelId}") + String findCode(String stylemodelId); + + @Select("select nums from zy_cloths_style where id=#{styleId}") + String findNums(String styleId); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java index 8c63f4cd..370380bd 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java @@ -12,4 +12,8 @@ import com.baomidou.mybatisplus.extension.service.IService; public interface IZyClothSampleService extends IService { String findSort(String styleId, String stylemodelId); + + String findCode(String stylemodelId); + + String findStyleNums(String styleId); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java index 9752a8f9..2efb511b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java @@ -23,4 +23,14 @@ public class ZyClothSampleServiceImpl extends ServiceImpl