| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'}, |
| | | |
| | | ], |
| | |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let list = ref([]) |
| | | let projectNo = ref([]) |
| | | |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | projectNo.value = route.query.projectNo |
| | | onMounted(() => { |
| | | |
| | | request.post(`/processCard/getSelectPrintLabel`, data.value).then((res) => { |
| | | request.post(`/processCard/getSelectPrintLabel/${projectNo.value}`).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | console.log(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | |
| | | console.log(produceList.value) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | /*for (let i = 0; i < produceList.value.length; i++) { |
| | | let count= produceList.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < produceList.value[i].data[j].quantity; k++){ |
| | |
| | | |
| | | } |
| | | } |
| | | console.log(labelList.value) |
| | | console.log(labelList.value)*/ |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <div id="entirety" v-for="(item,id) in produceList" > |
| | | <div class="row1">{{ item.customer_name }}</div> |
| | | <div class="row2"> |
| | | <span>{{ item.order_id }}</span> |
| | | <span>{{ item.type_name }}</span> |
| | | </div> |
| | | <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div class="row3">{{item.width}}*{{item.height}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.project}}</span> |
| | | <span>{{ item.remarks }}</span> |
| | | <span>{{ item.building_number }}</span> |
| | | </div> |
| | | <div class="row6"> |
| | | <span>{{item.glass_child}}</span> |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }}) |
| | | router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no }}) |
| | | break |
| | | } |
| | | } |
| | |
| | | request.post(`/processCard/selectPrintPrintProject/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | produceList.value = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList.value) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', |
| | | field: 'project_no', |
| | | title: '工程号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | field: 'glass_total', |
| | | title: t('order.quantity'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'area', |
| | | field: 'glass_total_area', |
| | | title: t('order.area'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | } |
| | | |
| | | @ApiOperation("打印标签数据查询接口") |
| | | @PostMapping("/getSelectPrintLabel") |
| | | public Result getSelectPrintLabel(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintLabelSv(object)); |
| | | @PostMapping("/getSelectPrintLabel/{projectNo}") |
| | | public Result getSelectPrintLabel(@PathVariable String projectNo) { |
| | | return Result.seccess(flowCardService.getSelectPrintLabelSv(projectNo)); |
| | | } |
| | | |
| | | @ApiOperation("打印自定义标签数据查询接口") |
| | |
| | | return Result.seccess(flowCardService.getCustomLabelDetailSv(name,form,id, flowCard)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工程打印查询接口") |
| | | @SaCheckPermission("SelectPrintFlowCard.search") |
| | | @PostMapping("/selectPrintPrintProject/{selectTime1}/{selectTime2}") |
| | | public Result selectPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCard(selectTime1, selectTime2)); |
| | | } |
| | | } |
| | |
| | | |
| | | List<Map<String, String>> selectPrintFlowCardMp(Date selectTime1, Date selectTime2, String orderId, String project, FlowCard flowCard); |
| | | |
| | | List<Map<String, String>> selectPrintFlowCard(Date selectTime1, Date selectTime2); |
| | | |
| | | List<Map<String, String>> selectPrintMp(String orderId, FlowCard flowCard); |
| | | |
| | | List<Map<String, String>> getPrimaryList(String processId, Integer technologyNumber); |
| | |
| | | |
| | | Boolean updateComposing(String processId); |
| | | |
| | | List<Map<String, String>> getPrintLabel(String processId, Integer technologyNumber); |
| | | List<Map<String, String>> getPrintLabel(String projectNo); |
| | | |
| | | List<Map<String, String>> printFlowCardDetailsMp(String processId, String technologyNumber, FlowCard flowCard); |
| | | |
| | |
| | | |
| | | import java.io.StringReader; |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | import static com.example.erp.service.sd.OrderService.getOrderProcessDetails; |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintFlowCard(Date selectTime1, Date selectTime2) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintFlowCard(selectTime1, selectTime2)); |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintSv(String orderId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintMp(orderId, flowCard)); |
| | |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrintLabelSv(Map<String, Object> object) { |
| | | public Map<String, Object> getSelectPrintLabelSv(String projectNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.getPrintLabel(projectNo)); |
| | | return map; |
| | | /* 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()) { |
| | |
| | | } |
| | | |
| | | map.put("data", list); |
| | | return map; |
| | | return map;*/ |
| | | } |
| | | |
| | | public Map<String, Object> printFlowCardDetailsSv(String processId, String technologyNumber, FlowCard flowCard) { |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPrintFlowCard"> |
| | | select * from pp.optimize_project where create_time between #{selectTime1} and #{selectTime2} and state>=20 |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPrintMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | |
| | | </update> |
| | | |
| | | <select id="getPrintLabel"> |
| | | select c.customer_name, |
| | | c.order_id, |
| | | select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.building_number, |
| | | od.processing_note, |
| | | od.width, |
| | | od.height, |
| | | ogd.glass_child, |
| | | e.type_name, |
| | | b.remarks, |
| | | c.project, |
| | | a.child_width, |
| | | a.child_height, |
| | | sum(b.quantity) as quantity, |
| | | a.glass_child, |
| | | b.processing_note |
| | | from sd.order_glass_detail as a |
| | | left join sd.order_detail as b |
| | | on a.order_id = b.order_id |
| | | and a.order_number = b.order_number |
| | | left join sd.`order` as c |
| | | on c.order_id = a.order_id |
| | | left join flow_card as d |
| | | on d.order_id = a.order_id and d.order_number = a.order_number and |
| | | d.technology_number = a.technology_number |
| | | left join sd.basic_glass_type e |
| | | on e.type_id = b.product_id |
| | | where d.process_id = #{processId} |
| | | and d.technology_number = #{technologyNumber} |
| | | group by a.glass_child, a.child_width, a.child_height |
| | | order by d.technology_number |
| | | opd.stock_id, |
| | | od.quantity |
| | | from pp.optimize_detail opd |
| | | left join sd.`order` o on SUBSTR(opd.process_id,1,10)=o.order_id |
| | | left join sd.order_detail od on SUBSTR(opd.process_id,1,10)=od.order_id and opd.order_sort=od.order_number |
| | | left join sd.order_glass_detail ogd on SUBSTR(opd.process_id,1,10)=ogd.order_id and opd.order_sort=ogd.order_number |
| | | left join sd.product p on od.product_id = p.id |
| | | left join sd.basic_glass_type e on e.type_id = p.type_id |
| | | where opd.project_no=#{projectNo} order by opd.stock_id |
| | | </select> |
| | | |
| | | <select id="printFlowCardDetailsMp"> |