chenlu
2024-07-02 0d91c32f348565109b40c5e1c516bfdd28538bd3
补充语言,修改成品标签打印
9个文件已修改
63 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/lang/en.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companyInfo.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js
@@ -375,6 +375,7 @@
        labelStyle:'Label Style',
        customLabelPrinting:'Custom label printing',
        labelPrinting:'Label printing',
        sortingSuccessful:'Sorting successful',
        sorting:'Sorting',
        pleaseSelect:'Please select',
@@ -382,7 +383,7 @@
        thisIsTheIndoorSurface:'This is the indoor surface',
        thisSideIsOutsideTheRoom:'This side is outside the room',
        finishedProductLabel:'Finished product label',
        halfProductLabel:'Half product label',
        halfProductLabel:'Half-finished product label',
        pleaseSelectCustomPrintLabelStyle:'Please select a custom print label style',
        mergePrinting:'Merge printing',
    },
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -375,6 +375,7 @@
        labelStyle:'标签样式',
        customLabelPrinting:'自定义标签打印',
        labelPrinting:'标签打印',
        sortingSuccessful:'排序成功',
        sorting:'排序',
        pleaseSelect:'请选择',
north-glass-erp/northglass-erp/src/stores/sd/companyInfo.js
@@ -32,6 +32,7 @@
                </div>`
            },
            labelType: '半品标签',
            labelValue:2,
            className:{
                   custom:{
                       printFlowCardName: () => {
@@ -72,7 +73,8 @@
                      <label style="font-weight: bolder;font-size:10px;">${item1.width}*${item1.height}=${item1.quantity}</label>
                </div>`
            },
            labelType: '成品标签2'
            labelType: '成品标签2',
            labelValue:3,
        },
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
@@ -572,7 +572,7 @@
      />
    </el-select>
    &nbsp;
    <el-select v-model="stateValue" class="m-2" placeholder='' clearable allow-create filterable style="width: 140px">
    <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
      <el-option
          v-for="item in stateOptions"
          :key="item.value"
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue
@@ -35,7 +35,7 @@
const lableType = route.query.lableType
onMounted(() => {
      request.post(`/processCard/getSelectPrintCustomLabel/${type}`, data.value).then((res) => {
      request.post(`/processCard/getSelectPrintCustomLabel/${type}/${lableType}`, data.value).then((res) => {
        if (res.code == 200) {
          produceList.value = deepClone(res.data.title)
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi.vue
@@ -35,7 +35,7 @@
const lableType = route.query.lableType
onMounted(() => {
      request.post(`/processCard/getSelectPrintCustomLabel/${type}`, data.value).then((res) => {
      request.post(`/processCard/getSelectPrintCustomLabel/${type}/${lableType}`, data.value).then((res) => {
        if (res.code == 200) {
          produceList.value = deepClone(res.data.title)
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -98,8 +98,12 @@
    value: '1',
    label: t('processCard.finishedProductLabel'),
  },
  // {
  //   value: '2',
  //   label: t('processCard.halfProductLabel'),
  // },
  {
    value: '2',
    value: `${company.printLabel.labelValue}`,
    label: `${company.printLabel.labelType}`,
  },
]
@@ -230,7 +234,7 @@
    buttons: [
      {code: 'print', name: t('processCard.print'), status: 'primary'},
      {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'},
      {code: 'printLabel', name: '标签打印', status: 'primary'},
      {code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'},
    ],
    // import: false,
    // export: true,
@@ -263,6 +267,7 @@
    let type=printType.value
    let faceOrientation=stateValue.value
    let lableTypes=lableType.value
    let lableTitle=lableType.text
    if ($grid) {
      switch (code) {
        case 'print': {
@@ -298,7 +303,6 @@
              id += selectRecords[i].id + "|"
            }
          }
          console.log(selectRecords)
          router.push({path: '/main/processCard/PrintLabel', query: {printList: JSON.stringify(selectRecords)}})
          break
@@ -517,7 +521,7 @@
<template>
  <div class="main-div-customer">
    <el-input clearable placeholder="合并打印" v-model="printMerge" style="width: 90px"></el-input>
    <el-input clearable :placeholder="$t('processCard.mergePrinting')" v-model="printMerge" style="width: 90px"></el-input>
    &nbsp;
    <label>{{$t('processCard.labelStyle')}}:</label>
    <el-select v-model="printType" clearable default-value="default_city" :placeholder="$t('processCard.pleaseSelect')" style="width: 120px">
@@ -538,7 +542,7 @@
      />
    </el-select>
    &nbsp;
    <el-select v-model="stateValue" class="m-2" placeholder='' clearable allow-create filterable style="width: 140px">
    <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
      <el-option
          v-for="item in stateOptions"
          :key="item.value"
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -196,10 +196,11 @@
    }
    @ApiOperation("打印自定义标签数据查询接口")
    @PostMapping("/getSelectPrintCustomLabel/{type}")
    @PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}")
    public Result getSelectPrintCustomLabel( @PathVariable String type,
                                             @PathVariable Integer lableType,
                                             @RequestBody Map<String, Object> object) {
        return Result.seccess(flowCardService.getSelectPrintCustomLabelSv(type,object));
        return Result.seccess(flowCardService.getSelectPrintCustomLabelSv(type,lableType,object));
    }
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -6,27 +6,22 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.ProductionScheduling;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.entity.sd.OrderProcessDetail;
import com.example.erp.mapper.pp.FlowCardMapper;
import com.example.erp.mapper.sd.OrderGlassDetailMapper;
import com.example.erp.mapper.sd.OrderProcessDetailMapper;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import jdk.nashorn.internal.parser.JSONParser;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.IOException;
import java.io.StringReader;
import java.sql.Date;
import java.time.LocalDate;
import java.util.*;
import static com.example.erp.service.sd.OrderService.getOrderProcessDetails;
@@ -322,18 +317,35 @@
    }
    public Map<String, Object> getSelectPrintCustomLabelSv(String type, Map<String, Object> object) {
    public Map<String, Object> getSelectPrintCustomLabelSv(String type, Integer lableType, Map<String, Object> object) {
        Map<String, Object> map = new HashMap<>();
        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()) {
            for (FlowCard flowCard : flowCardList) {
            Set<String> processedProcessIds = new HashSet<>();  // 用来存放已处理过的 processId
            if (lableType != 2){
                for (FlowCard flowCard : flowCardList) {
                    String processId = flowCard.getProcessId();
                    // 检查是否已经处理过该 processId,如果处理过则跳过
                    if (processedProcessIds.contains(processId)) {
                        continue;
                    }
                    Map<String, Object> itemmap = new HashMap<>();
                    itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber()));
                    list.add(itemmap);
                    // 将该 processId 加入已处理集合
                    processedProcessIds.add(processId);
                }
            }
            else{
                for (FlowCard flowCard : flowCardList) {
                    Map<String, Object> itemmap = new HashMap<>();
                    itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber()));
                    list.add(itemmap);
                }
            }
        }
        map.put("data", list);