From 6ec71c6b2e3dbf3dd0988a9cb9bf31a4b96c0ecc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=88=86=E7=B1=B3=E8=8A=B1?= <417727563@qq.com>
Date: Mon, 9 Jan 2023 15:41:25 +0800
Subject: [PATCH] =?UTF-8?q?2023-07-09-01-=E6=B4=BE=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mall/clothSample/ZyClothSampleList.vue | 40 ++--
.../clothSample/modules/ZyClothSampleForm.vue | 39 +++-
.../ZyProductionOrderList.vue | 22 +-
.../zyWorkorderManagement/ZyWorkOrderList.vue | 10 +-
.../workdep/JSelectProductionDep.vue | 203 ++++++++++++++++++
.../controller/WorkOrderController.java | 80 ++++++-
.../zyclothsample/entity/ZyClothSample.java | 76 ++++---
7 files changed, 395 insertions(+), 75 deletions(-)
create mode 100644 ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue
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/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
index b6184ec5..4a265df2 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
@@ -23,10 +23,14 @@ import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
+import org.jeecg.modules.zyclothsample.entity.ZyClothSample;
+import org.jeecg.modules.zyclothsample.service.IZyClothSampleService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
@@ -84,6 +88,14 @@ public class WorkOrderController extends JeecgController 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