2022-11-10 赵玉瑞 修改款式辅料及相关问题

zhc4dev
赵玉瑞 2 years ago
parent 3a4c15df00
commit 16a6112ecd
  1. 35
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  2. 4
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  3. 18
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  4. 29
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyStyleAccessoriesForm.vue
  5. 7
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleForm.vue
  6. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  7. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/mapper/ZyStyleAccessoriesMapper.java
  8. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -6,7 +6,8 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式"> <a-form-item label="服装款式">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag> <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -28,19 +29,26 @@
<!-- <a-button type="primary" icon="import">导入</a-button>--> <!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>--> <!-- </a-upload>-->
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown> </a-dropdown>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div>
@ -63,7 +71,8 @@
</template> </template>
<template slot="imgSlot" slot-scope="text"> <template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> <img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -140,6 +149,7 @@
import ZyProcessDetail from './modules/ZyProcessDetail' import ZyProcessDetail from './modules/ZyProcessDetail'
import {getAction} from "@api/manage"; import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util"; import {filterObj} from "@/utils/util";
export default { export default {
name: 'ZyProcessList', name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
@ -222,11 +232,11 @@
// align:"center", // align:"center",
// dataIndex: 'toolId_dictText' // dataIndex: 'toolId_dictText'
// }, // },
{ // {
title:'款式名称', // title: '',
align:"center", // align: "center",
dataIndex: 'styleId_dictText' // dataIndex: 'styleId_dictText'
}, // },
{ {
title: '工段代码', title: '工段代码',
align: "center", align: "center",
@ -331,8 +341,7 @@
if (res.success) { if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------ //update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result; this.dataSource = res.result.records || res.result;
if(res.result.total) if (res.result.total) {
{
this.ipagination.total = res.result.total; this.ipagination.total = res.result.total;
} else { } else {
this.ipagination.total = 0; this.ipagination.total = 0;

@ -84,7 +84,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging"> <a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">
<a-textarea v-model="model.foldingPackaging" rows="4" placeholder="请输入折叠搭配及包装" /> <j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装" dict-code="foldingPackaging" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -94,7 +94,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="缝纫形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sewingForm"> <a-form-model-item label="缝纫形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sewingForm">
<a-textarea v-model="model.sewingForm" rows="4" placeholder="请输入缝纫形式" /> <j-dict-select-tag v-model="model.sewingForm" placeholder="请输入缝纫形式" dict-code="sewingForm"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">

@ -6,7 +6,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式" v-if="styleId==undefined"> <a-form-item label="服装款式" v-if="styleId===undefined">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag> <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag>
</a-form-item> </a-form-item>
<a-form-item label="服装款式" v-else=""> <a-form-item label="服装款式" v-else="">
@ -14,8 +14,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="料类型" > <a-form-item label="料类型" >
<j-dict-select-tag placeholder="请选择料类型" dictCode="zy_accessories,contents,id" v-model="queryParam.accessoriesId" ></j-dict-select-tag> <j-dict-select-tag placeholder="请选择料类型" dictCode="zy_accessories,contents,id" v-model="queryParam.accessoriesId" ></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -144,15 +144,20 @@
} }
}, },
{ {
title:'款式', title:'款式名称',
align:"center", align:"center",
dataIndex: 'styleId_dictText' dataIndex: 'styleId_dictText'
}, },
{ {
title:'面料', title:'辅料类型',
align:"center", align:"center",
dataIndex: 'accessoriesId_dictText' dataIndex: 'accessoriesId_dictText'
}, },
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -189,7 +194,7 @@
initDictConfig(){ initDictConfig(){
}, },
loadParameter() { loadParameter() {
if (this.loadRouteType == false) { if (this.loadRouteType === false) {
this.styleId = this.$route.query.id; this.styleId = this.$route.query.id;
this.loadRouteType = true; this.loadRouteType = true;
} }
@ -235,6 +240,7 @@
param.field = this.getQueryField(); param.field = this.getQueryField();
param.pageNo = this.ipagination.current; param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize; param.pageSize = this.ipagination.pageSize;
if(this.styleId!==undefined)
param.styleId=this.styleId; param.styleId=this.styleId;
return filterObj(param); return filterObj(param);
}, },

@ -4,23 +4,23 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-if="model.styleId==undefined"> <a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" /> v-if="model.styleId===undefined">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id"
placeholder="请选择款式类型"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-else=""> <a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-else="">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" disabled /> <j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id"
placeholder="请选择款式类型" disabled/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="面料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accessoriesId"> <a-form-model-item label="辅料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accessoriesId">
<j-dict-select-tag type="list" v-model="model.accessoriesId" placeholder="请选择面料类型" dictCode="zy_accessories,contents,id" /> <j-dict-select-tag type="list" v-model="model.accessoriesId" placeholder="请选择面料类型"
dictCode="zy_accessories,contents,id"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="面料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricId">-->
<!-- <j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>
@ -34,8 +34,7 @@
export default { export default {
name: 'ZyStyleAccessoriesForm', name: 'ZyStyleAccessoriesForm',
components: { components: {},
},
props: { props: {
// //
disabled: { disabled: {
@ -46,8 +45,7 @@
}, },
data() { data() {
return { return {
model:{ model: {},
},
labelCol: { labelCol: {
xs: {span: 24}, xs: {span: 24},
sm: {span: 5}, sm: {span: 5},
@ -57,8 +55,7 @@
sm: {span: 16}, sm: {span: 16},
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {},
},
url: { url: {
add: "/zyaccessories/zyStyleAccessories/add", add: "/zyaccessories/zyStyleAccessories/add",
edit: "/zyaccessories/zyStyleAccessories/edit", edit: "/zyaccessories/zyStyleAccessories/edit",

@ -9,13 +9,6 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-model="model.typeNme" placeholder="请输入服装类型" disabled></a-input>
<a-input v-model="model.typeid" hidden />
</a-form-model-item>
</a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId"> <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" disabled/> <j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" disabled/>

@ -9,6 +9,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.zyaccessories.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories; import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2022-11-10 * @Date: 2022-11-10
* @Version: V1.0 * @Version: V1.0
*/ */
@Mapper
public interface ZyStyleAccessoriesMapper extends BaseMapper<ZyStyleAccessories> { public interface ZyStyleAccessoriesMapper extends BaseMapper<ZyStyleAccessories> {
@Select("select count(*) from zy_style_accessories where style_id=#{styleId} and accessories_id=#{accessoriesId}") @Select("select count(*) from zy_style_accessories where style_id=#{styleId} and accessories_id=#{accessoriesId}")

@ -87,12 +87,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
/*LambdaQueryWrapper<ZyStyleModule> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyStyleModule::getStyleId,id);
Page<NewStyleModule> page = new Page<>(pageNo,pageSize);
Page<NewStyleModule> pageList = zyStyleModuleService.page(page, lambdaQueryWrapper);
System.out.println(pageList.getRecords());
return Result.OK(pageList);*/
List<NewStyleModule> listNewStyleModules = new ArrayList<>(); List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
@ -112,7 +106,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
} }
} }
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper); List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
System.out.println(list);
for (ZyStyleModule zyStyleModule : list) { for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule(); NewStyleModule newSeMo = new NewStyleModule();
//编辑回显 //编辑回显
@ -146,8 +139,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
} }
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, listNewStyleModules.size()); IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, listNewStyleModules.size());
pageList.setRecords(listNewStyleModules); pageList.setRecords(listNewStyleModules);
//System.out.println(pageList.getRecords());
System.out.println(pageList.getRecords());
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -172,7 +164,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize); Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper); IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
//System.out.println(zyStyleModule);
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -187,14 +178,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add") //@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) { public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
//String styleId = zyStyleModule.getStyleId();
//ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId);
//LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
//lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId());
//ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper);
//zyStyleModule.setTypeId(zyClothsType.getId());
zyStyleModuleService.save(zyStyleModule); zyStyleModuleService.save(zyStyleModule);
return Result.OK("添加成功!"); return Result.OK("添加成功!");

Loading…
Cancel
Save