diff --git a/ant-design-vue-jeecg/src/config/router.config.js b/ant-design-vue-jeecg/src/config/router.config.js index 5aa5dcd2..b360df4f 100644 --- a/ant-design-vue-jeecg/src/config/router.config.js +++ b/ant-design-vue-jeecg/src/config/router.config.js @@ -668,4 +668,8 @@ export const constantRouterMap = [ path: '/shopping/placeOrder',//这里是你需要设置新窗口打开的页面的路径s component: () => import('@/views/shopping/pages/placeOrder'), }, + { + path: '/shopping/billDetail',//这里是你需要设置新窗口打开的页面的路径s + component: () => import('@/views/shopping/components/billDetail'), + }, ] diff --git a/ant-design-vue-jeecg/src/views/shopping/components/billDetail.vue b/ant-design-vue-jeecg/src/views/shopping/components/billDetail.vue new file mode 100644 index 00000000..39d79ac0 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/shopping/components/billDetail.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/ant-design-vue-jeecg/src/views/shopping/components/billTitle.vue b/ant-design-vue-jeecg/src/views/shopping/components/billTitle.vue new file mode 100644 index 00000000..fa23d660 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/shopping/components/billTitle.vue @@ -0,0 +1,394 @@ + + + + + diff --git a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue index 12c413cc..146b45ff 100644 --- a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue +++ b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue @@ -126,7 +126,7 @@
-
+
{{item.date}} 已开票 @@ -144,13 +144,14 @@
开票金额:{{item.price}}
-
申请换开
-
查看详情
+
申请开票
+
申请换开
+
查看详情
- -
+ +
@@ -201,15 +202,16 @@ import PasswordModal from '../../system/modules/PasswordModal' import Collection from "../components/collection"; import AddrView from "../components/addrView" + import BillTitle from "../components/billTitle" export default { name: "gerenzhongxin", - components: { Header,Footer,PasswordModal ,Collection,AddrView}, + components: { Header,Footer,PasswordModal ,Collection,AddrView,BillTitle}, data() { return { model:{ username1: "" }, - current: ['invoice1'],//目前打开的菜单 + current: ['allorders'],//目前打开的菜单 key:'',//当前选择的订单状态(待支付、待收货等) allOrders2:[], allOrders1:[ @@ -293,7 +295,7 @@ price:2456,//价格 }, ],//全部发票数据 - + billTitle:[],//发票抬头列表 url: { list: "/starehouse/starehouse/list", getusername: "/sys/user/getusername", @@ -364,6 +366,14 @@ } }, methods: { + toBillDetail(id){ + this.$router.push({ + path: "/shopping/billDetail", + query: { + id: id, + }, + }); + }, passwordModalOk() { //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下 }, @@ -471,26 +481,36 @@ if(key.key == 'allorders'){ /* this.allOrders = this.allOrders1*/ this.allOrders = this.allOrders2 + this.invoiceList=[] } else if(key.key == 'daizhifu'){ /* this.allOrders = this.allOrders1.filter(item=>item.pay == false)*/ this.allOrders = this.allOrders2.filter(item=>item.pay == false) + this.invoiceList=[] } else if(key.key == 'daishouhuo'){ /*this.allOrders = this.allOrders1.filter(item=>item.receipt == false && item.pay == true)*/ this.allOrders = this.allOrders2.filter(item=>item.receipt == false && item.pay == true) + this.invoiceList=[] } else if(key.key == 'yiwancheng'){ /*this.allOrders = this.allOrders1.filter(item=>item.receipt == true)*/ this.allOrders = this.allOrders2.filter(item=>item.receipt == true) + this.invoiceList=[] }else if(key.key == 'invoice1'){//选择全部发票选项 this.invoiceList = this.invoiceList1 + this.allOrders=[] } else if(key.key == 'invoice2'){//选择已开发票选项 this.invoiceList = this.invoiceList1.filter(item=>item.billing == true) + this.allOrders=[] } else if(key.key == 'invoice3'){//选择未开发票选项 this.invoiceList = this.invoiceList1.filter(item=>item.billing == false) + this.allOrders=[] + }else{ + this.allOrders=[] + this.invoiceList=[] } // else{ // this.allOrders=[] diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanAutoController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanAutoController.java index 092fa021..942d9ef3 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanAutoController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanAutoController.java @@ -1,36 +1,22 @@ package org.jeecg.modules.productplan.controller; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; 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.productplan.entity.ZyPlanProcess; import org.jeecg.modules.productplan.entity.ZyProductPlan; -import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo; import org.jeecg.modules.productplan.service.IZyProductPlanAutoService; import org.jeecg.modules.productplan.service.IZyProductPlanService; -import org.jeecg.modules.system.entity.SysDepart; -import org.jeecg.modules.system.entity.SysUser; -import org.jeecg.modules.system.service.ISysDepartService; -import org.jeecg.modules.system.service.ISysUserService; -import org.jeecg.modules.workproduct.entity.ZyProduct; -import org.jeecg.modules.workproduct.service.IZyProductService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; import java.util.List; +import java.util.Map; /** * @Description: 生产计划自动化 @@ -50,15 +36,15 @@ public class ZyProductPlanAutoController extends JeecgController productPlanAuto4Mock(List workOrderIds) { - iZyProductPlanAutoService.doAuto(workOrderIds); - return Result.OK(); + List>> list = iZyProductPlanAutoService.doAuto(workOrderIds); + return Result.OK(list); } @ApiOperation(value = "生产计划自动化", notes = "生产计划自动化") @GetMapping(value = "/productPlanAuto") public Result productPlanAuto() { - iZyProductPlanAutoService.doAuto(null); - return Result.OK(); + List>> list = iZyProductPlanAutoService.doAuto(null); + return Result.OK(list); } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyProductPlanAutoService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyProductPlanAutoService.java index d8963946..ccf7f440 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyProductPlanAutoService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyProductPlanAutoService.java @@ -1,12 +1,14 @@ package org.jeecg.modules.productplan.service; import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.productplan.entity.ZyPlanProcess; import org.jeecg.modules.productplan.entity.ZyProductPlan; import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo; import org.jeecg.modules.workorder.entity.WorkOrder; import javax.servlet.http.HttpServletRequest; import java.util.List; +import java.util.Map; /** * @Description: 生产计划 @@ -16,7 +18,7 @@ import java.util.List; */ public interface IZyProductPlanAutoService extends IService { - void doAuto(List workOrderList); + List>> doAuto(List workOrderList); boolean filling4Auto(String planId); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java index a854b4f2..3d62fd3e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java @@ -13,13 +13,8 @@ import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories; import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric; import org.jeecg.modules.productplan.entity.ZyProductPlan; import org.jeecg.modules.productplan.enums.ProductPlanStatusEnum; -import org.jeecg.modules.productplan.mapper.ZyPlanProcessAccessoriesMapper; -import org.jeecg.modules.productplan.mapper.ZyPlanProcessFabricMapper; import org.jeecg.modules.productplan.mapper.ZyProductPlanMapper; import org.jeecg.modules.productplan.service.*; -import org.jeecg.modules.productprocessaccessories.service.IProductProcessAccessoriesService; -import org.jeecg.modules.productprocessfabric.entity.ProductProcessFabric; -import org.jeecg.modules.productprocessfabric.service.IProductProcessFabricService; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysDepartService; @@ -36,8 +31,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.ObjectUtils; -import javax.servlet.http.HttpServletRequest; -import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -259,7 +252,7 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl workOrderList4Mock) { + public List>> doAuto(List workOrderList4Mock) { //1,获取未排产工单 List workOrderList; @@ -274,12 +267,12 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl workOrderList = iWorkOrderService.list(new LambdaQueryWrapper() // .eq(WorkOrder::getWorkOrderStatus, WorkOrderStatusEnum.UNAUDITED.getCode())); - if (ObjectUtils.isEmpty(workOrderList)) return; + if (ObjectUtils.isEmpty(workOrderList)) return Collections.EMPTY_LIST; //2,保存生产计划 // List productPlanList = this.saveProductPlan(workOrderList); List productPlanList = this.saveProductPlan4Mock(workOrderList); - if (ObjectUtils.isEmpty(productPlanList)) return; + if (ObjectUtils.isEmpty(productPlanList)) return Collections.EMPTY_LIST; //3,同步计划生产工序、同步生产计划工序面料、同步生产计划辅料 productPlanList.stream().forEach(f -> { @@ -291,6 +284,7 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl>> returnList = new LinkedList<>(); productPlanList.stream().forEach(k -> { //TODO 数据不完整,测试时注释 // boolean b = this.filling4Auto(k.getId()); @@ -304,14 +298,19 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl> map = new HashMap<>(); + map.put(k.getProductCode(), planProcessList); + //测试需要返回生产计划工序 + returnList.add(map); }); + return returnList; } /** * 匹配设备&工具&工人 *

* 匹配车间工位设备与工序设备,工位设备包含工序设备即匹配成功,匹配失败做异常处理 - * 匹配车间工位工具与工序设备,工位设备包含工序设备即匹配成功,匹配失败做异常处理 + * 匹配车间工位工具与工序工具,工位设备包含工序设备即匹配成功,匹配失败做异常处理 * * @param planId */