diff --git a/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue index 0f0b9fe1..0104a486 100644 --- a/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue +++ b/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue @@ -146,32 +146,32 @@ align:"center", dataIndex: 'nums' }, - { - title:'成衣名称', - align:"center", - dataIndex: 'clothName' - }, - { - title:'描述', - align:"center", - dataIndex: 'descr' - }, + // { + // title:'成衣名称', + // align:"center", + // dataIndex: 'clothName' + // }, + // { + // title:'描述', + // align:"center", + // dataIndex: 'descr' + // }, { title:'图片', align:"center", dataIndex: 'url', scopedSlots: {customRender: 'imgSlot'} }, - { - title:'用户', - align:"center", - dataIndex: 'userId' - }, - { - title:'用户类型', - align:"center", - dataIndex: 'type' - }, + // { + // title:'用户', + // align:"center", + // dataIndex: 'userId' + // }, + // { + // title:'用户类型', + // align:"center", + // dataIndex: 'type' + // }, { title: '操作', dataIndex: 'action', diff --git a/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue b/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue index f044b220..36ee0827 100644 --- a/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue +++ b/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue @@ -3,36 +3,61 @@ + + + + + + + + + + - - + + + + + + + - + - - + + - - + + + + + + + + + + + + diff --git a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue index 5536562f..89ea75bf 100644 --- a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue +++ b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue @@ -155,6 +155,7 @@ + @@ -164,6 +165,7 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ZyOrdersModal from '@/views/zyorders/modules/ZyOrdersModal' + import JSelectProductionDep from './workdep/JSelectProductionDep' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import Area from '@/components/_util/Area' import { httpAction, getAction } from '@/api/manage' @@ -172,7 +174,8 @@ name: 'ZyProductionOrderList', mixins:[JeecgListMixin, mixinDevice], components: { - ZyOrdersModal + ZyOrdersModal, + JSelectProductionDep }, data () { return { @@ -376,7 +379,7 @@ deleteBatch: "/zyorders/zyOrders/deleteBatch", exportXlsUrl: "/zyorders/zyOrders/exportXls", importExcelUrl: "zyorders/zyOrders/importExcel", - paidan:"/workorder/workOrder/paidan", + paidan:"/workOrder/workOrder/paidan", }, dictOptions:{}, @@ -395,7 +398,20 @@ }, methods: { paidan(record){ - getAction(this.url.paidan,{id:record.id}).then((res) => { + this.$refs.productionForm.showModal(record.id) + + // getAction(this.url.paidan,{id:record.id}).then((res) => { + // if (res.success) { + // this.$message.success("派单成功!"); + // this.loadData(); + // }else{ + // this.$message.error(res.message); + // } + // }) + }, + paidanFormOk(orderId,depId) { + // 新增/修改 成功时,重载列表 + getAction(this.url.paidan,{'orderId':orderId,'depId':depId}).then((res) => { if (res.success) { this.$message.success("派单成功!"); this.loadData(); diff --git a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue index 786379cc..3515ade4 100644 --- a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue +++ b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue @@ -185,11 +185,11 @@ } ], url: { - list: "/workorder/workOrder/workList", - delete: "/workorder/workOrder/delete", - deleteBatch: "/workorder/workOrder/deleteBatch", - exportXlsUrl: "/workorder/workOrder/exportXls", - importExcelUrl: "workorder/workOrder/importExcel", + list: "/workOrder/workOrder/workList", + delete: "/workOrder/workOrder/delete", + deleteBatch: "/workOrder/workOrder/deleteBatch", + exportXlsUrl: "/workOrder/workOrder/exportXls", + importExcelUrl: "workOrder/workOrder/importExcel", }, dictOptions:{}, diff --git a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue new file mode 100644 index 00000000..9ac09076 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue @@ -0,0 +1,203 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue index d3dcca18..139a80d0 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue @@ -217,7 +217,7 @@ export default { { title: '企业', align: "center", - dataIndex: 'userId_dictText' + dataIndex: 'enterpriseId_dictText' }, { title: '创建时间', 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 cdf42a2e..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.userId+"'"; + 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.userId!=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){ - var num=parseInt(res.result,10) - }else{ - 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[1],10) } num=num.toString() while(num.length queryPageJSelectPDList(SysDepart sysDepart, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(sysDepart, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + queryWrapper.eq("org_type",1); + queryWrapper.eq("org_category",2); + IPage pageList = sysDepartService.page(page, queryWrapper); + return Result.OK(pageList); + } + /** * 派单(讲订单转为工单) * @@ -261,8 +298,8 @@ public class WorkOrderController extends JeecgController paidan(@RequestParam(name="id",required=true) String id,HttpServletRequest req) { - ZyOrders zyOrders = zyOrdersService.getById(id); + public Result paidan(@RequestParam(name="orderId",required=true) String orderId,@RequestParam(name="depId",required=true) String depId,HttpServletRequest req) { + ZyOrders zyOrders = zyOrdersService.getById(orderId); if(zyOrders==null) { return Result.error("未找到对应数据!"); }else{ @@ -273,30 +310,44 @@ public class WorkOrderController extends JeecgController ogWrapper=new QueryWrapper(); - ogWrapper.eq("orders_id",id); + ogWrapper.eq("orders_id",orderId); List ogList=orderGoodsService.list(ogWrapper); if(ogList.size()>0) {//start if 02 // 保存工单 OrderGoods ogModel=ogList.get(0); + //服装款式 //QueryWrapper csWrapper=new QueryWrapper(); ZyClothsStyle csModel=zyClothsStyleService.getById(ogModel.getStyleId()); //服装型号 //QueryWrapper sm=new QueryWrapper(); ZyStyleModel smModel=zyStyleModelService.getById(ogModel.getModelId()); + if(csModel==null ||smModel==null) + { + return Result.error("该订单服装型号或服装款式不存在,请检查后在操作!"); + } + //得到结构图和排排料图 + QueryWrapper csWrapper=new QueryWrapper(); + csWrapper.eq("style_id",ogModel.getStyleId()); + csWrapper.eq("stylemodel_id",ogModel.getModelId()); + List csList=zyClothSampleService.list(csWrapper); +// if(csList.size()<=0) +// { +// return Result.error("商品成衣样板不存在,请检查后在操作!"); +// } +// ZyClothSample cSampleModel=csList.get(0); + int goodNum=ogModel.getGoodsNum(); WorkOrder workOrder=new WorkOrder(); workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号 - workOrder.setOrdersId(id);//订单id + workOrder.setOrdersId(orderId);//订单id workOrder.setOrderGoodsId(ogModel.getId());// 订单商品 workOrder.setGoodsNum(goodNum);//商品数量 workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间 workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期 workOrder.setWorkOrderStatus(0);//工单状态 - - //暂时存疑 - //workOrder.setEnterprisesId();//企业id + workOrder.setEnterprisesId(depId);//企业id workOrderService.save(workOrder); //保存产品 @@ -307,6 +358,8 @@ public class WorkOrderController extends JeecgController 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 64a04bb6..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 @@ -35,6 +35,23 @@ public class ZyClothSample implements Serializable { @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") private String id; + /**创建人*/ + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建时间*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新时间*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间") + private java.util.Date updateTime; /**编号*/ @Excel(name = "编号", width = 15) @ApiModelProperty(value = "编号") @@ -47,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; /**管理模块样板*/ @@ -66,40 +83,41 @@ public class ZyClothSample implements Serializable { @Dict(dicCode = "id",dictTable = "zy_module_sample",dicText = "module_name") //@NotBlank(message = "模块样板不能为空") private String modelSample; - /**用户*/ - @Excel(name = "用户", width = 15) - @ApiModelProperty(value = "用户") - @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") - private String userId; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; +// /**用户*/ +// @Excel(name = "用户", width = 15) +// @ApiModelProperty(value = "用户") +// @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") +// private String userId; - /**成衣名称*/ - @Excel(name = "成衣名称", width = 15) - @ApiModelProperty(value = "成衣名称") - private String clothName; +// /**成衣名称*/ +// @Excel(name = "成衣名称", width = 15) +// @ApiModelProperty(value = "成衣名称") +// private String clothName; /**描述*/ @Excel(name = "描述", width = 15) @ApiModelProperty(value = "描述") private String descr; - /**图片*/ - @Excel(name = "图片", width = 15) - @ApiModelProperty(value = "图片") + /**效果图片*/ + @Excel(name = "效果图片", width = 15) + @ApiModelProperty(value = "效果图片片") private String url; - /**用户类型*/ - @Excel(name = "用户类型", width = 15) - @ApiModelProperty(value = "用户类型") - private String type; +// /**用户类型*/ +// @Excel(name = "用户类型", width = 15) +// @ApiModelProperty(value = "用户类型") +// private String type; + + /**结构图*/ + @Excel(name = "结构图", width = 15) + @ApiModelProperty(value = "结构图") + private java.lang.String structureDiagram; + /**排料图*/ + @Excel(name = "排料图", width = 15) + @ApiModelProperty(value = "排料图") + private java.lang.String layoutDiagram; + /**企业*/ + @Excel(name = "企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @ApiModelProperty(value = "企业") + private java.lang.String enterpriseId; } 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