Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | pleaseSelectCustomPrintLabelStyle:'Please select a custom print label style', |
| | | mergePrinting:'Merge printing', |
| | | printStatus:'Print status', |
| | | addAutomatically:'Auto fill', |
| | | selectFill:'Select fill' |
| | | }, |
| | | reportingWorks:{ |
| | | glassNumber:'number', |
| | |
| | | mergePrinting:'合并打印', |
| | | printStatus:'打印状态', |
| | | labelPrinting2:'标签打印2', |
| | | addAutomatically:'自动填充', |
| | | selectFill:'选中填充' |
| | | }, |
| | | reportingWorks:{ |
| | | glassNumber:'编号', |
| | |
| | | ] |
| | | |
| | | //标签类型 |
| | | let filteredOptions=[] |
| | | const lableType = ref('1') |
| | | const lableTypeOptions = [ |
| | | { |
| | |
| | | label: `${company.printLabel.labelType3}`, |
| | | }, |
| | | ] |
| | | let hidePrintLabels = company.printLabel.hideButton; |
| | | |
| | | if (hidePrintLabels=='true'){ |
| | | filteredOptions = lableTypeOptions.filter((option, index) => index !== 2); |
| | | }else { |
| | | filteredOptions = lableTypeOptions; |
| | | } |
| | | |
| | | //合片流程卡打印下拉选项 |
| | | const printMerge = ref('') |
| | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.dataType = res.data.type |
| | | // produceList.forEach(item => { |
| | | // if(item.print_status == 1){ |
| | | // item.print_status='已打印' |
| | | // } |
| | | // else if (item.print_status == 0){ |
| | | // item.print_status='未打印' |
| | | // } |
| | | // }); |
| | | produceList.forEach(item => { |
| | | if(item.print_status == 1){ |
| | | item.print_status='已打印' |
| | | } |
| | | else if (item.print_status == 0){ |
| | | item.print_status='未打印' |
| | | } |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | hideButton() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code}) { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | selectRecords.forEach(obj => { |
| | | delete obj.print_status; |
| | | }); |
| | | let type=printType.value |
| | | let faceOrientation=stateValue.value |
| | | let lableTypes=lableType.value |
| | |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'print': { |
| | | console.log(selectRecords) |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | |
| | | }, |
| | | { |
| | | code: 'addAutomatically', |
| | | name: "自动填充", |
| | | name: t('processCard.addAutomatically'), |
| | | prefixIcon: 'vxe-icon-indicator', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | { |
| | | code: 'selectFill', |
| | | name: "选中填充", |
| | | name: t('processCard.selectFill'), |
| | | prefixIcon: 'vxe-icon-indicator', |
| | | visible: true, |
| | | disabled: false |
| | |
| | | addListener(xGridDetail.value, detailGridOptions) |
| | | } |
| | | |
| | | const hideButton = () =>{ |
| | | // 根据条件值 hidePrintLabels 过滤按钮数组 |
| | | gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => { |
| | | // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2 |
| | | if (hidePrintLabels=='true') { |
| | | return button.code !== 'printLabel' && button.code !== 'printLabel2'; |
| | | } else { |
| | | return true; // 不隐藏任何按钮 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | |
| | | <el-select v-model="lableType" class="m-2" :placeholder="lableTypeOptions[0].label" style="width: 140px"> |
| | | <el-option |
| | | v-for="item in lableTypeOptions" |
| | | v-for="item in filteredOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'customer_name', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 110}, |
| | | |
| | | { |
| | | field: 'project', |
| | | title: t('order.project'), |
| | |
| | | {title: t('basicData.operate'), width: 100, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {field: 'orderId', title: t('order.orderId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'order.customerName', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | { |
| | | field: 'processId', |
| | | width: 140, |
| | |
| | | {title: t('basicData.operate'), width: 110, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {field: 'orderId', title: t('order.orderId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'order.customerName', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | { |
| | | field: 'productionId', |
| | | title: t('workOrder.productionId'), |
| | |
| | | private Integer group; |
| | | private LocalDate productionTime; |
| | | private LocalDate createTime; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private Order order; |
| | | //@TableField(select = false) |
| | | // @ManyToOne(fetch = FetchType.LAZY) |
| | | @TableField(select = false,exist = false) |
| | | private OrderDetail orderDetail; |
| | | |
| | | |
| | | } |
| | |
| | | Integer cancelOrder(String id); |
| | | |
| | | List<Order> selectOrder(@Param("order") Order order); |
| | | |
| | | Integer selectMaxOrderIdByMonth(); |
| | | } |
| | |
| | | } |
| | | //生成订单数据 |
| | | public void insertOrder(Order order,List<OrderDetail> OrderDetails,List<OrderOtherMoney> orderOtherMoneyList) { |
| | | |
| | | String orderId = getOrderId("day"); |
| | | //往主表插数据 |
| | | order.setOrderId(orderId); |
| | | order.setCreateOrder(2); |
| | | orderMapper.insert(order); |
| | | |
| | | insertOtherDetail(orderId,OrderDetails,orderOtherMoneyList); |
| | | } |
| | | |
| | | private String getOrderId(String dateType){ |
| | | String orderId = null; |
| | | if(dateType.equals("day")){ |
| | | Integer maxOrderId = orderMapper.selectMaxOrderId(); |
| | | //查询订单id,并且自增 |
| | | String formattedNumber = String.format("%02d", maxOrderId+1); |
| | |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | String orderId = "NG"+formattedDate+formattedNumber; |
| | | //往主表插数据 |
| | | order.setOrderId(orderId); |
| | | order.setCreateOrder(2); |
| | | orderMapper.insert(order); |
| | | |
| | | insertOtherDetail(orderId,OrderDetails,orderOtherMoneyList); |
| | | |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | }else if(dateType.equals("month")){ |
| | | Integer maxOrderId = orderMapper.selectMaxOrderIdByMonth(); |
| | | String formattedNumber = String.format("%04d", maxOrderId+1); |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMM"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | |
| | | } |
| | | |
| | | return orderId; |
| | | } |
| | | |
| | | |
| | | //修改订单数据,并且重新生成多个副表数据 |
| | | public void updateOrder(Order order,List<OrderDetail> OrderDetails,List<OrderOtherMoney> orderOtherMoneyList) { |
| | | LambdaUpdateWrapper<Order> updateWrapper = new LambdaUpdateWrapper<>(); |
| | |
| | | //修改订单主表面积与周长以及重量 |
| | | orderMapper.updateOrderParameter(orderId); |
| | | |
| | | //查询订单小片表获取工艺传入小片工艺表 |
| | | //List<OrderGlassDetail> orderGlassDetails = orderGlassDetailMapper.selectOrderGlassDetail(orderId); |
| | | /*List<OrderProcessDetail> orderProcessDetailList = getOrderProcessDetails(orderGlassDetails); |
| | | //赋值订单工艺表 |
| | | orderProcessDetailMapper.insertOrderProcessDetail(orderProcessDetailList);*/ |
| | | |
| | | } |
| | | |
| | | public static List<OrderProcessDetail> getOrderProcessDetails(List<OrderGlassDetail> orderGlassDetails) { |
| | |
| | | Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",id)); |
| | | List<OrderDetail> orderDetails = orderDetailMapper.selectList(new QueryWrapper<OrderDetail>().eq("order_id",id)); |
| | | List<OrderOtherMoney> orderOtherMoneyList = orderOtherMoneyMapper.findById(id); |
| | | |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("order",order); |
| | | map.put("orderDetails",orderDetails); |
| | |
| | | sum(c.compute_gross_area) as compute_gross_area, |
| | | a.founder, |
| | | c.processing_note, |
| | | b.customer_name, |
| | | if(a.layout_status=0,'不可排版',if(a.layout_status=1,'可排版','已排版')) as layout_status |
| | | from (select id,order_id,process_id,order_number, quantity,founder,layout_status,create_time from flow_card |
| | | group by process_Id,order_number) as a left join sd.`order` as b on a.order_Id=b.order_id |
| | |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '已排版'"> |
| | | and a.layout_status regexp 2 |
| | | </if> |
| | | |
| | | <if test="flowCard.order.customerName != null and flowCard.order.customerName!= ''"> |
| | | and b.customer_name regexp #{flowCard.order.customerName} |
| | | </if> |
| | | group by a.process_Id |
| | | ORDER BY a.id desc |
| | | limit #{offset},#{pageSize}; |
| | |
| | | <result column="project" property="order.project"/> |
| | | <result column="area" property="order.area"/> |
| | | <result column="creator" property="order.creator"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | | <!-- <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">--> |
| | | <!-- <result column="product_id" property="productId"/>--> |
| | | <!-- <result column="product_name" property="productName"/>--> |
| | |
| | | o.order_type, |
| | | o.area as gross_area, |
| | | o.quantity as quantity, |
| | | o.creator |
| | | o.creator, |
| | | o.customer_name |
| | | from sd.order_detail as od |
| | | left join `order` as o |
| | | on o.order_id=od.order_id |
| | |
| | | </if> |
| | | <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''"> |
| | | and o.order_type regexp #{orderGlassDetail.order.orderType} |
| | | </if> |
| | | <if test="orderGlassDetail.order.customerName != null and orderGlassDetail.order.customerName!= ''"> |
| | | and o.customer_name regexp #{orderGlassDetail.order.customerName} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | |
| | | (od.gross_area) as gross_area, |
| | | (od.quantity) as quantity, |
| | | o.creator, |
| | | od.id |
| | | od.id, |
| | | o.customer_name |
| | | from sd.order_glass_detail as ogd |
| | | left join order_detail as od |
| | | on od.order_id=ogd.order_id |
| | |
| | | <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''"> |
| | | and o.order_type regexp #{orderGlassDetail.order.orderType} |
| | | </if> |
| | | <if test="orderGlassDetail.order.customerName != null and orderGlassDetail.order.customerName!= ''"> |
| | | and o.customer_name regexp #{orderGlassDetail.order.customerName} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | |
| | | date(a.create_time) = curdate() |
| | | order by id desc,order_id desc limit 1 |
| | | </select> |
| | | |
| | | <select id="selectMaxOrderIdByMonth"> |
| | | select |
| | | ifnull(SUBSTR(order_id from 7),0) |
| | | from |
| | | `order` as a |
| | | where |
| | | date(a.create_time) BETWEEN DATE_FORMAT(DATE(NOW()), '%Y-%m-01') AND DATE(NOW()) |
| | | order by id desc limit 1 |
| | | </select> |
| | | |
| | | |
| | | <update id="updateOrderParameter"> |