2022-12-06 赵玉瑞 修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent cf30e0c0e1
commit bd82ec72a6
  1. 12
      ant-design-vue-jeecg/src/components/jeecg/JTreeSelect.vue
  2. 3
      ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue
  3. 19
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue
  4. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java
  5. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java

@ -11,12 +11,18 @@
:value="treeValue"
:treeData="treeData"
:multiple="multiple"
:treeDefaultExpandAll="treeDefaultExpand"
@change="onChange"
@search="onSearch">
</a-tree-select>
</template>
<script>
/*
* 异步树加载组件 通过传入表名 显示字段 存储字段 加载一个树控件
* <j-tree-select dict="aa_tree_test,aad,id" pid-field="pid" ></j-tree-select>
@ -70,6 +76,12 @@
type: Boolean,
default: false,
},
//
treeDefaultExpand: {
type: Boolean,
default: true,
},
loadTriggleChange:{
type: Boolean,
default: false,

@ -150,7 +150,8 @@ export default {
{
title: '部件名称',
align: "center",
dataIndex: 'partsName_dictText'
dataIndex: 'partsName'
//dataIndex: 'partsName_dictText'
},
{
title: '创建时间',

@ -15,15 +15,26 @@
dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块名称" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">
<!-- <a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>-->
<j-dict-select-tag type="list" v-model="model.partsName"
dictCode="zy_cloths_component,parts_name,id" placeholder="请选择制衣模块类型" />
<j-popup
v-model="model.partsName"
field="partsName"
org-fields="nums,parts_name"
dest-fields="nums,partsName"
code="parts_name"
/>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">-->
<!-- <a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>-->
<!-- <j-dict-select-tag type="list" v-model="model.partsName"-->
<!-- dictCode="zy_cloths_component,parts_name,id" placeholder="请选择制衣模块类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编码" ></a-input>

@ -10,15 +10,22 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.base.entity.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent;
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.NumberUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
/**
* @Description: 制衣模块部件中间表
@ -33,6 +40,8 @@ import java.util.Arrays;
public class ZyClothsModularCompentController extends JeecgController<ZyClothsModularCompent, IZyClothsModularCompentService> {
@Autowired
private IZyClothsModularCompentService zyClothsModularCompentService;
@Autowired
IZyClothsComponentService zyClothsComponentService;
/**
* 分页列表查询
@ -53,6 +62,16 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
QueryWrapper<ZyClothsModularCompent> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModularCompent, req.getParameterMap());
Page<ZyClothsModularCompent> page = new Page<ZyClothsModularCompent>(pageNo, pageSize);
IPage<ZyClothsModularCompent> pageList = zyClothsModularCompentService.page(page, queryWrapper);
List<ZyClothsModularCompent> records = pageList.getRecords();
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
for (ZyClothsModularCompent s : records) {
String partsName = s.getPartsName();
if (pattern.matcher(partsName).matches()){
ZyClothsComponent byId = zyClothsComponentService.getById(partsName);
s.setPartsName(byId.getPartsName()) ;
}
}
return Result.OK(pageList);
}

@ -64,7 +64,7 @@ public class ZyClothsModularCompent implements Serializable {
/**部件名称*/
@Excel(name = "部件名称", width = 15)
@ApiModelProperty(value = "部件名称")
@Dict(dictTable = "zy_cloths_component",dicText = "parts_name",dicCode = "id")
//@Dict(dictTable = "zy_cloths_component",dicText = "parts_name",dicCode = "id")
private String partsName;
/**制衣模块类型*/
@Excel(name = "制衣模块类型", width = 15)

Loading…
Cancel
Save