| | |
| | | |
| | | labelStyle:'Label Style', |
| | | customLabelPrinting:'Custom label printing', |
| | | labelPrinting:'Label printing', |
| | | sortingSuccessful:'Sorting successful', |
| | | sorting:'Sorting', |
| | | pleaseSelect:'Please select', |
| | |
| | | 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', |
| | | }, |
| | |
| | | |
| | | labelStyle:'标签样式', |
| | | customLabelPrinting:'自定义标签打印', |
| | | labelPrinting:'标签打印', |
| | | sortingSuccessful:'排序成功', |
| | | sorting:'排序', |
| | | pleaseSelect:'请选择', |
| | |
| | | </div>` |
| | | }, |
| | | labelType: '半品标签', |
| | | labelValue:2, |
| | | className:{ |
| | | custom:{ |
| | | printFlowCardName: () => { |
| | |
| | | <label style="font-weight: bolder;font-size:10px;">${item1.width}*${item1.height}=${item1.quantity}</label> |
| | | </div>` |
| | | }, |
| | | labelType: '成品标签2' |
| | | labelType: '成品标签2', |
| | | labelValue:3, |
| | | }, |
| | | |
| | | |
| | |
| | | /> |
| | | </el-select> |
| | | |
| | | <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" |
| | |
| | | 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) |
| | |
| | | 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) |
| | |
| | | value: '1', |
| | | label: t('processCard.finishedProductLabel'), |
| | | }, |
| | | // { |
| | | // value: '2', |
| | | // label: t('processCard.halfProductLabel'), |
| | | // }, |
| | | { |
| | | value: '2', |
| | | value: `${company.printLabel.labelValue}`, |
| | | label: `${company.printLabel.labelType}`, |
| | | }, |
| | | ] |
| | |
| | | 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, |
| | |
| | | let type=printType.value |
| | | let faceOrientation=stateValue.value |
| | | let lableTypes=lableType.value |
| | | let lableTitle=lableType.text |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'print': { |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | console.log(selectRecords) |
| | | router.push({path: '/main/processCard/PrintLabel', query: {printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | break |
| | |
| | | |
| | | <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> |
| | | |
| | | <label>{{$t('processCard.labelStyle')}}:</label> |
| | | <el-select v-model="printType" clearable default-value="default_city" :placeholder="$t('processCard.pleaseSelect')" style="width: 120px"> |
| | |
| | | /> |
| | | </el-select> |
| | | |
| | | <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" |
| | |
| | | } |
| | | |
| | | @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)); |
| | | |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | |
| | | 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); |