廖井涛
2024-07-05 615d0a9e2011510b589ccc3b4bc58894a39e8295
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
12个文件已修改
141 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/lang/en.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderGlassDetail.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js
@@ -387,6 +387,8 @@
        pleaseSelectCustomPrintLabelStyle:'Please select a custom print label style',
        mergePrinting:'Merge printing',
        printStatus:'Print status',
        addAutomatically:'Auto fill',
        selectFill:'Select fill'
    },
    reportingWorks:{
        glassNumber:'number',
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -389,6 +389,8 @@
        mergePrinting:'合并打印',
        printStatus:'打印状态',
        labelPrinting2:'标签打印2',
        addAutomatically:'自动填充',
        selectFill:'选中填充'
    },
    reportingWorks:{
        glassNumber:'编号',
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -91,6 +91,7 @@
]
//标签类型
let  filteredOptions=[]
const lableType = ref('1')
const lableTypeOptions = [
  {
@@ -110,6 +111,13 @@
    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('')
@@ -135,16 +143,17 @@
  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)
  }
@@ -276,13 +285,18 @@
        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
@@ -290,6 +304,7 @@
    if ($grid) {
      switch (code) {
        case 'print': {
          console.log(selectRecords)
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
@@ -564,14 +579,14 @@
          },
          {
            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
@@ -704,6 +719,18 @@
  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>
@@ -722,7 +749,7 @@
    &nbsp;
    <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"
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -161,6 +161,9 @@
      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'),
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -258,6 +258,7 @@
    {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,
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -244,6 +244,7 @@
    {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'),
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderGlassDetail.java
@@ -34,12 +34,9 @@
    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;
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java
@@ -28,4 +28,6 @@
    Integer cancelOrder(String id);
    List<Order> selectOrder(@Param("order") Order order);
    Integer selectMaxOrderIdByMonth();
}
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -118,23 +118,41 @@
    }
    //生成订单数据
    public void insertOrder(Order order,List<OrderDetail> OrderDetails,List<OrderOtherMoney> orderOtherMoneyList) {
        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;
        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);
            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<>();
@@ -214,11 +232,7 @@
        //修改订单主表面积与周长以及重量
        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) {
@@ -273,6 +287,8 @@
        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);
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -63,6 +63,7 @@
        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
@@ -93,7 +94,9 @@
        <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};
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -15,6 +15,7 @@
            <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"/>-->
@@ -37,7 +38,8 @@
        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
@@ -55,6 +57,9 @@
        </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 != ''">
@@ -79,7 +84,8 @@
        (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
@@ -103,6 +109,9 @@
        <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 }
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -22,6 +22,16 @@
            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">