From 27f05bdade922a485709300e504c9bf35b276155 Mon Sep 17 00:00:00 2001 From: lenovo <123> Date: Mon, 26 Dec 2022 16:59:01 +0800 Subject: [PATCH] =?UTF-8?q?2022-12-26=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/accessories/ZyAccessoriesList.vue | 28 ++++++++----------- .../erp/accessories/ZyAccessoriesTypeList.vue | 13 +++------ .../accessories/modules/ZyAccessoriesForm.vue | 14 +++++----- .../src/views/erp/fabric/ZyFabricList.vue | 8 +++--- .../views/erp/fabric/modules/ZyFabricForm.vue | 24 ++++++++++++---- .../modules/ZyFabricFormDetailModel.vue | 5 +++- .../src/views/process/ZyProcessList.vue | 15 ++++++---- .../views/process/modules/ZyProcessForm.vue | 25 +++++++++++++---- .../views/process/modules/ZyProcessModal1.vue | 2 +- .../views/process/modules/ZyProcessModal2.vue | 2 +- .../views/process/modules/ZyProcessModal3.vue | 2 +- .../views/process/modules/ZyProcessModal4.vue | 2 +- .../views/process/modules/ZyProcessModal5.vue | 2 +- .../modules/ZyClothSampleForm.vue | 14 +++++++++- .../fabric/controller/ZyFabricController.java | 2 +- .../modules/demo/fabric/entity/ZyFabric.java | 4 +-- .../demo/fabric/mapper/ZyFabricMapper.java | 2 +- .../base/controller/ZyProcessController.java | 5 ---- .../modules/demo/base/entity/ZyProcess.java | 1 + 19 files changed, 101 insertions(+), 69 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue b/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue index fe45a212..ca716b1f 100644 --- a/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue +++ b/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue @@ -84,22 +84,18 @@ - 编辑 + + + + - - - 更多 - - 详情 - - + + 删除 - - - + @@ -154,11 +150,11 @@ align:"center", dataIndex: 'contents' }, - { - title:'图片', - align:"center", - dataIndex: 'picture' - }, + // { + // title:'图片', + // align:"center", + // dataIndex: 'picture' + // }, { title:'材质', align:"center", diff --git a/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesTypeList.vue b/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesTypeList.vue index 1e6a4cbf..8850cc7a 100644 --- a/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesTypeList.vue +++ b/ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesTypeList.vue @@ -87,19 +87,14 @@ 编辑 - - 更多 - - + 详情 - - + + 删除 - - - + diff --git a/ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue b/ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue index e68d0658..800d65bf 100644 --- a/ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue +++ b/ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue @@ -33,20 +33,20 @@ - - - - + + + + - + - - + + diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue index fabb3be3..40347003 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue @@ -122,10 +122,10 @@ 编辑 - 复制 + 复制 - 详情 + 详情 @@ -332,8 +332,8 @@ import ZyFabricFormDetailModel from './modules/ZyFabricFormDetailModel' fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''}) this.superFieldList = fieldList }, - handleDetail(id){ - this.$refs.ZyFabricFormDetailModel.showModal(id) + handleDetail(id,name){ + this.$refs.ZyFabricFormDetailModel.showModal(id,name) // this.$children[0].showModal(id) } } diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue index 6dd9161c..360110ce 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue @@ -44,7 +44,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -91,8 +91,8 @@ - - + + @@ -317,11 +317,11 @@ ], money: [ { required: true, message: '请输入单价!'}, - {pattern: /^\d+$/,message:'请输入正整数'} + {pattern: /^\d*\.?\d+$/,message:'请输入正数'} ], retailPrice: [ { required: true, message: '请输入零售价!'}, - {pattern: /^\d+$/,message:'请输入正整数'} + {pattern: /^\d*\.?\d+$/,message:'请输入正数'} ], // money: [ // { required: false}, @@ -374,6 +374,18 @@ }, edit (record) { this.model = Object.assign({}, record); + if(this.model.codes==1){ + getAction(this.url.sort,this.model).then((res)=>{ + console.log(res) + var num=parseInt(res.result,10)+1 + num=num.toString() + while(num.length<10){ + num="0"+num + } + this.model.fabricNumber="ML"+this.model.typeId+this.model.material+num; + console.log(this.model.typeId) + }) + } this.visible = true; }, submitForm () { diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue index 3af969dc..b03df04d 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue @@ -217,15 +217,18 @@ this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, methods: { - showModal(id) { + showModal(id,name) { this.visible = true; + this.$http.get('/fabric/zyFabric/queryById?id='+id).then( res=>{ this.model = res.result + this.model.supplierInfo=name console.log(this.model) } ) + }, handleOk() { this.ModalText = 'The modal will be closed after two seconds'; diff --git a/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue b/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue index ccb9a065..cb0d37f7 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue @@ -109,15 +109,18 @@ 复制 - 动作 + 动作 - 设备 + 面料 + - 面料 + 辅料 - 工具 + 设备 + - 辅料 + 工具 + 更多 @@ -235,7 +238,7 @@ export default { { title: '工序等级', align: "center", - dataIndex: 'grade' + dataIndex: 'grade_dictText' }, // { // title:'面料代码', diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue index 777262af..61122e2f 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue @@ -42,7 +42,7 @@ - + @@ -52,7 +52,8 @@ - + @@ -77,7 +78,7 @@ - + @@ -92,7 +93,7 @@ - + @@ -107,7 +108,7 @@ - + @@ -301,6 +302,20 @@ }, edit (record) { this.model = Object.assign({}, record); + this.model.typeName=this.model.styleId_dictText + if(this.model.codes==1){ + var n=6; + getAction(this.url.sort,{id:this.model.styleId}).then((res)=>{ + // console.log(res.result) + var num=parseInt(res.result,10)+1 + num=num.toString() + while(num.length + :dict-code="dict" @change="xiugai"> @@ -153,13 +153,24 @@ export default { // kuanshi(){ this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'"; + this.model.styleId=null + }, + xiugai(){ + if(this.model.stylemodelId!=null&&this.model.userId!=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){ + var num=parseInt(res.result,10) + }else{ var num=parseInt(res.result,10)+1 + + } num=num.toString() while(num.length page = new Page<>(pageNo, pageSize); IPage pageList = zyFabricService.page(page, queryWrapper); diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java index 9faf2297..07a4f8a7 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java @@ -60,7 +60,7 @@ public class ZyFabric implements Serializable { /**单价*/ @Excel(name = "单价", width = 15) @ApiModelProperty(value = "单价") - private java.lang.Integer money; + private BigDecimal money; /**图片地址*/ // @Excel(name = "图片地址", width = 15) @ApiModelProperty(value = "图片地址") @@ -95,7 +95,7 @@ public class ZyFabric implements Serializable { /**零售价*/ @Excel(name = "零售价", width = 15) @ApiModelProperty(value = "零售价") - private java.lang.Integer retailPrice; + private BigDecimal retailPrice; /**密度*/ @Excel(name = "密度", width = 15, dictTable = "", dicText = "", dicCode = "density") @Dict(dictTable = "", dicText = "", dicCode = "density") diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java index c6e12195..2c1497f5 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java @@ -52,7 +52,7 @@ public interface ZyFabricMapper extends BaseMapper { //查出所有的工具统计信息:编号,库存和所在仓库 public List findAllStaticTool(); - @Select("select id from zy_fabric_type where content like #{s}") + @Select("select nums from zy_fabric_type where content like #{s}") List findAllid(String s); @Select("select fabric_number from zy_fabric where type_id=#{typeId} and material=#{material} order by fabric_number desc limit 0,1") diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java index ce9481c0..549fde8a 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java @@ -111,11 +111,6 @@ public class ZyProcessController extends JeecgController edit(@RequestBody ZyProcess zyProcess) { - QueryWrapper queryWrapper = new QueryWrapper(); - queryWrapper.eq("process_name", zyProcess.getProcessName()); - int a = zyProcessService.count(queryWrapper); - if (a != 0) - return Result.error("编辑失败,该工序名称已存在!!!"); zyProcessService.updateById(zyProcess); return Result.OK("编辑成功!"); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java index 96c3b8fe..5769aa4c 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java @@ -85,6 +85,7 @@ public class ZyProcess implements Serializable { */ @Excel(name = "工序等级", width = 15) @ApiModelProperty(value = "工序等级") + @Dict(dicCode = "fabric_grade") private java.lang.String grade; // /**面料代码*/ // @Excel(name = "面料代码", width = 15)