chenlu
2025-06-09 6be0988d016ffc1fcffbe6a7ea917af9c7328546
打印成品小片标签重复点击打印按钮重复添加问题,
4个文件已修改
62 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/天津北玻.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
@@ -75,12 +75,14 @@
            }
          })
          labelList = a
          props.lastList.length = 0;
          for (let i = 0; i < list.value.length; i++) {
            let count = list.value[i].data.length
            for (let j = 0; j < count; j++) {
            //  for (let k = 0; k < list.value[i].data[j].quantity; k++) {
              for (let k = 0; k < list.value[i].data[j].quantity; k++) {
                props.lastList.push(list.value[i].data[j])
            //  }
              }
            }
          }
        } else {
@@ -168,16 +170,20 @@
</script>
<template>
  <div id="print" :class="company.printLabel.className.semi.printFlowCardName()">
    <div v-for="(item1,id) in props.lastList" :class="company.printLabel.className.semi.entiretyName()">
  <div id="print" class="printFlowCard_semi">
      <template v-for="(item1,id) in props.lastList">
        <div class="entirety_semi">
      <div class="row4">{{ faceOrientation }}</div>
      <div  v-for="(item,id) in labelList" :class="company.printLabel.className.semi.contentRowName()">
      <div  v-for="(item,id) in labelList" class="contentRow">
        <div contenteditable="true" v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" @input="updateProductName($event, id,index)">{{ item.title }}:{{ item1[item.name] }}</div>
        <!--        <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2">{{ item1[item.name] }}</div>-->
      </div>
      <div v-html="company.printLabel.customSemi(item1)"></div>
      <div v-if="(id + 1) % 2 === 0" class="pagebreak"></div>
    </div>
        </div>
        <div v-if="(id + 1) % 2 === 0" class="pagebreak"></div>
      </template>
  </div>
north-glass-erp/northglass-erp/src/stores/sd/companySet/Ìì½ò±±²£.js
@@ -34,7 +34,7 @@
        deliveryRemark: ['备注:本批玻璃为优等合格品,请在卸货时,当面消点验收、如有质量问题在一周内与本公司联系,否则概不负责!'],
        deliveryOutbound: false,//发货默认出库
        flowCardMerge: 0,//流程卡合片打印
        printBtn:0,//打印界面三个按钮中是否显示标签打印相关按钮,0显示常州,0其它不显示
        printBtn:1,//打印界面三个按钮中是否显示标签打印相关按钮,0显示常州,1其它不显示
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -223,7 +223,6 @@
request.post(`/processCard/selectPrintDetails/${inquiryMode}/${type}`, data.value).then((res) => {
  if (res.code == 200) {
    console.log(res.data.data)
    let newDataCollection = [];
    for (let i = 0; i < res.data.data.length; i++) {
      res.data.data[i].detail.forEach((item) => {
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -304,8 +304,11 @@
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            Set<String> processedProcessIds = new HashSet<>();  // ç”¨æ¥å­˜æ”¾å·²å¤„理过的 processId
            Set<String> processedKeys = new HashSet<>();
            for (FlowCard flowCard : flowCardList) {
                String processId = flowCard.getProcessId();
                Integer orderNumber = flowCard.getOrderNumber();
                String uniqueKey = processId + "|" + orderNumber;  // ç”¨ç‰¹æ®Šå­—符连接防止冲突
                Map<String, Object> itemmap = new HashMap<>();
                //流程卡表头表尾数据
                //是否传入合并层数
@@ -323,11 +326,11 @@
                    } else {
                        if (merge.equals("1") && flowCard.getMerge().equals(1)) {
                            // æ£€æŸ¥æ˜¯å¦å·²ç»å¤„理过该 processId,如果处理过则跳过
                            if (processedProcessIds.contains(flowCard.getProcessId())) {
                            if (processedKeys.contains(uniqueKey)) {
                                continue;
                            }
                            // å°†è¯¥ processId åŠ å…¥å·²å¤„ç†é›†åˆ
                            processedProcessIds.add(flowCard.getProcessId());
                            processedKeys.add(uniqueKey);
                            itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess());
@@ -400,11 +403,14 @@
        }
        List<FlowCard> flowCardList = flowCardMapper.getFlowCardListPrintProject(printProject);
        if (!flowCardList.isEmpty()) {
            Set<String> processedProcessIds = new HashSet<>();  // ç”¨æ¥å­˜æ”¾å·²å¤„理过的 processId
            Set<String> processedKeys = new HashSet<>();
            for (FlowCard flowCard : flowCardList) {
                Map<String, Object> itemmap = new HashMap<>();
                String processId = flowCard.getProcessId();
                Integer orderNumber = flowCard.getOrderNumber();
                String uniqueKey = processId + "|" + orderNumber;  // ç”¨ç‰¹æ®Šå­—符连接防止冲突
                //是否包含切割
                //boolean containsCutting = flowCard.getProcess().contains("切割");
                String processSub = flowCard.getProcess().substring(0, 2);
@@ -425,11 +431,11 @@
                    if (flowCard.getPatchState().equals(0)) {
                        if (merge.equals("1") && flowCard.getMerge().equals(1)) {
                            // æ£€æŸ¥æ˜¯å¦å·²ç»å¤„理过该 processId,如果处理过则跳过
                            if (processedProcessIds.contains(flowCard.getProcessId())) {
                            if (processedKeys.contains(uniqueKey)) {
                                continue;
                            }
                            // å°†è¯¥ processId åŠ å…¥å·²å¤„ç†é›†åˆ
                            processedProcessIds.add(flowCard.getProcessId());
                            processedKeys.add(uniqueKey);
                            itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess());
@@ -589,14 +595,15 @@
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            Set<String> processedProcessIds = new HashSet<>();  // ç”¨æ¥å­˜æ”¾å·²å¤„理过的 processId
            Set<String> processedKeys = new HashSet<>();
            if (lableType != 2) {//成品标签
                for (FlowCard flowCard : flowCardList) {
                    String processId = flowCard.getProcessId();
                    Integer orderNumber = flowCard.getOrderNumber();
                    String uniqueKey = processId + "|" + orderNumber;  // ç”¨ç‰¹æ®Šå­—符连接防止冲突
                    // æ£€æŸ¥æ˜¯å¦å·²ç»å¤„理过该 processId,如果处理过则跳过
                    if (processedProcessIds.contains(processId)) {
                    if (processedKeys.contains(uniqueKey)) {
                        continue;
                    }
                    Map<String, Object> itemmap = new HashMap<>();
@@ -604,7 +611,7 @@
                    list.add(itemmap);
                    // å°†è¯¥ processId åŠ å…¥å·²å¤„ç†é›†åˆ
                    processedProcessIds.add(processId);
                    processedKeys.add(uniqueKey);
                }
            } else {//小片标签
                for (FlowCard flowCard : flowCardList) {
@@ -624,14 +631,15 @@
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            Set<String> processedProcessIds = new HashSet<>();  // ç”¨æ¥å­˜æ”¾å·²å¤„理过的 processId
            Set<String> processedKeys = new HashSet<>();
            if (lableType != 2) {//成品标签
                for (FlowCard flowCard : flowCardList) {
                    String processId = flowCard.getProcessId();
                    Integer orderNumber = flowCard.getOrderNumber();
                    String uniqueKey = processId + "|" + orderNumber;  // ç”¨ç‰¹æ®Šå­—符连接防止冲突
                    // æ£€æŸ¥æ˜¯å¦å·²ç»å¤„理过该 processId,如果处理过则跳过
                    if (processedProcessIds.contains(processId)) {
                    if (processedKeys.contains(uniqueKey)) {
                        continue;
                    }
                    Map<String, Object> itemmap = new HashMap<>();
@@ -639,7 +647,7 @@
                    list.add(itemmap);
                    // å°†è¯¥ processId åŠ å…¥å·²å¤„ç†é›†åˆ
                    processedProcessIds.add(processId);
                    processedKeys.add(uniqueKey);
                }
            } else {//小片标签
                for (FlowCard flowCard : flowCardList) {
@@ -1008,7 +1016,6 @@
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            Set<String> processedProcessIds = new HashSet<>();  // ç”¨æ¥å­˜æ”¾å·²å¤„理过的 processId
            for (FlowCard flowCard : flowCardList) {
                Map<String, Object> itemmap = new HashMap<>();
                //是否是工程明细打印