Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | const worksheet = XLSX.utils.aoa_to_sheet(result); |
| | | const workbook = XLSX.utils.book_new(); |
| | | XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1'); |
| | | XLSX.writeFile(workbook, 'data.xlsx'); |
| | | XLSX.writeFile(workbook, `${props.childrenData.exportName}.xlsx`); |
| | | } |
| | | break |
| | | } |
| | |
| | | component: () => import('../views/pp/processCard/PrintProcess.vue'), |
| | | }, |
| | | { |
| | | path: 'printLabel', |
| | | name: 'printLabel', |
| | | component: () => import('../views/pp/processCard/PrintLabel.vue'), |
| | | }, |
| | | { |
| | | path: 'productionScheduling', |
| | | name: 'productionScheduling', |
| | | component: () => import('../views/pp/processCard/ProductionScheduling.vue'), |
| | |
| | | import {VXETable} from "vxe-table"; |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/views/pp/processCard/PrintProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | let selectRecords = ref(null) |
| | | |
| | | //定义滚动条高度 |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: '打印', status: 'primary'}, |
| | | {code: 'print', name: '打印流程卡', status: 'primary'}, |
| | | {code: 'printLabel', name: '打印标签', status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | |
| | | } |
| | | router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | // let routeData = router.resolve({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}}); |
| | | // window.open(routeData.href, '_blank'); |
| | | //dialogTableVisible.value = true |
| | | break |
| | | } |
| | | |
| | | case 'printLabel': { |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | router.push({path: '/main/processCard/PrintLabel', query: {printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | break |
| | | } |
| | | |
| | |
| | | <PrintProcess :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-model="dialogTableVisibleLabel" |
| | | destroy-on-close |
| | | title="标签打印" |
| | | style="width: 80%;height:75% "> |
| | | <PrintLabel :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from 'vue-i18n' |
| | | import deepClone from "@/utils/deepClone"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let list = ref() |
| | | |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | onMounted(() => { |
| | | |
| | | request.post(`/processCard/getSelectPrintLabel`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.data) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | let count= produceList.value[i].quantity |
| | | for (let j = 0; j < count; j++) { |
| | | labelList.value.push(produceList.value[i]) |
| | | |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | ) |
| | | |
| | | |
| | | |
| | | // 打印方法 |
| | | const printFlowCard = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("printFlowCard"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | | "body>#" + |
| | | printId + |
| | | "{display:none}@media print{body>:not(#" + |
| | | printId + |
| | | "){display:none !important}body>#" + |
| | | printId + |
| | | "{display:block;padding-top:1px}}"; |
| | | // |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | | setTimeout(() => { |
| | | window.print(); |
| | | body.removeChild(content); |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <el-button id="printButton" @click="printFlowCard();">打印</el-button> |
| | | <div id="printFlowCard" > |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <div class="row1">{{ item.customer_name }}</div> |
| | | <div class="row2">{{ item.order_id }} {{ item.type_name }}</div> |
| | | <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div class="row5">{{item.project}} {{ item.remarks }}</div> |
| | | <div class="row6">{{item.glass_child}} {{item.processing_note}}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | #printButton { |
| | | margin-top: -20px; |
| | | width: 100px; |
| | | } |
| | | |
| | | #printFlowCard { |
| | | display: flex; |
| | | justify-content: left; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | #entirety{ |
| | | text-align: center; |
| | | width: 196px; |
| | | height: 88px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .row1 { |
| | | font-size: 8pt; |
| | | font-weight: bold; |
| | | height: 16px; |
| | | } |
| | | |
| | | .row2 { |
| | | font-size: 8pt; |
| | | font-weight: bold; |
| | | height: 16px; |
| | | } |
| | | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 19px; |
| | | font-size: 12pt; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .row5 { |
| | | height: 15px; |
| | | font-weight: bold; |
| | | font-size: 8pt; |
| | | } |
| | | |
| | | .row6 { |
| | | height: 15px; |
| | | font-weight: bold; |
| | | font-size: 8pt; |
| | | } |
| | | |
| | | |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 7mm 2mm 2mm 0mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | | @media print { |
| | | div { |
| | | page-break-inside: avoid; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | {field: 'technology_number', width: 90,title: '小片顺序',showOverflow:"ellipsis"}, |
| | | {field: 'quantity', width: 90,title: '数量'}, |
| | | {field: 'broken_num',width: 90, title: '次破数量'}, |
| | | {field: 'shippedQuantity',width: 120, title: '发货数量'}, |
| | | {field: 'inventory',width: 120, title: '入库数量'}, |
| | | {field: 'inventoryArea',width: 120, title: '入库面积'}, |
| | | ] |
| | | //需要合并的列 |
| | |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | { |
| | | field: 'process_id', width: 120, title: '流程卡号', filters: [{data: ''}], |
| | | field: 'processId', width: 120, title: '流程卡号', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'order_number', |
| | | field: 'orderNumber', |
| | | width: 120, |
| | | title: '订单序号', |
| | | showOverflow: "ellipsis", |
| | |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', width: 130, title: '小片顺序', filters: [{data: ''}], |
| | | field: 'technologyNumber', width: 130, title: '小片顺序', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'child_width', width: 120, title: '宽'}, |
| | | {field: 'child_height', width: 120, title: '高'}, |
| | | {field: 'childWidth', width: 120, title: '宽'}, |
| | | {field: 'childHeight', width: 120, title: '高'}, |
| | | {field: 'quantity', width: 120, title: '订单数'}, |
| | | |
| | | {field: 'area', width: 100, title: '面积'}, |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | import exportExcel from "@/hook/exportExcel"; |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | |
| | | }) |
| | | const columns = [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'customer_name', width: 150, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'customerName', width: 150, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'project',width: 130, title: '项目名称' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'batch', width: 120,title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'order_id',width: 110, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'orderId',width: 110, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'quantity', width: 90,title: '订单数量',showOverflow:"ellipsis"}, |
| | | {field: 'area', width: 90,title: '订单面积'}, |
| | | {field: 'shippedQuantity',width: 90, title: '发货数量'}, |
| | |
| | | // }], |
| | | // import: false, |
| | | // export: true, |
| | | print: true, |
| | | // print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | <template #quantitySum="{ row,column }"> |
| | | <span>{{ quantitySum(row,column) }} </span> |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportTaskCompletionStatus', |
| | | '任务完成情况报表', |
| | | form.date1)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true}, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | trigger: 'dblclick', |
| | | mode: 'cell', |
| | | showStatus: true, |
| | | showIcon:false |
| | | },//表头参数 |
| | | columns:[ |
| | | |
| | |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | |
| | | :deep(#product .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | //表头参数 |
| | | columns:[ |
| | | {type:'expand',slots: { content:'content' },width: 60}, |
| | | {title: t('basicData.operate'), width: 150, slots: { default: 'button_slot' }}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80 }, |
| | | {type:'expand',slots: { content:'content' },width: 60,fixed:"left"}, |
| | | {title: t('basicData.operate'), width: 150, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80}, |
| | | |
| | | {field: 'deliveryState',title: t('basicData.review'), width: 40, slots: { default: 'state' }}, |
| | | {field: 'stockState',title: t('productStock.outbound'), width: 40, slots: { default: 'state' }}, |
| | |
| | | return Result.seccess(flowCardService.getSelectPrintingSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("打印标签数据查询接口") |
| | | @PostMapping("/getSelectPrintLabel") |
| | | public Result getSelectPrintLabel( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(flowCardService.getSelectPrintLabelSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("复选框修改排版状态") |
| | | @SaCheckPermission("SelectProcessCard.review") |
| | | @PostMapping("/updateComposing") |
| | |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, WorkInProgressDTO.class, reportService.exportWorkInProgressSv(dates), "WorkInProgress"); |
| | | } |
| | | |
| | | @ApiOperation("任务完成情况导出") |
| | | @PostMapping("/exportTaskCompletionStatus") |
| | | public void exportTaskCompletionStatus(HttpServletResponse response, |
| | | @RequestBody Map<String,Object> dates) |
| | | throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, WorkInProgressDTO.class, reportService.exportWorkInProgressSv(dates), "WorkInProgress"); |
| | | } |
| | | |
| | | } |
| | |
| | | Boolean updateInventory(String processId, String orderNumber, String technologyNumber, int completedQuantity); |
| | | |
| | | Boolean updateComposing(String processId); |
| | | |
| | | List<Map<String, String>> getPrintLabel(String processId, Integer technologyNumber); |
| | | } |
| | |
| | | List<WorkInProgressDTO> exportWorkInProgressMp(List<LocalDate> date, String process, String inputVal, String project); |
| | | |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | | // @Param("orderId") String orderId, @Param("inputProject") String inputProject, |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrintLabelSv(Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Integer count=flowCard.getQuantity(); |
| | | for (int i = 0; i < count; i++) { |
| | | map.put("data", flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber())); |
| | | //System.out.println(flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | } |
| | |
| | | } |
| | | return reportMapper.exportWorkInProgressMp(date,process,inputVal,project); |
| | | } |
| | | |
| | | } |
| | |
| | | select * from sd.order where create_time between #{selectTime1} and #{selectTime2} and |
| | | position(#{orderId} in order_id ) and position(#{project} in project) |
| | | and processing_card=2 |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPrintMp"> |
| | |
| | | o.project, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | od.quantity, |
| | | ogd.total_area, |
| | | sum(od.quantity) as quantity, |
| | | sum(ogd.total_area) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | fc.founder, |
| | |
| | | set fc.layout_status=1 |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <select id="getPrintLabel"> |
| | | select c.customer_name, |
| | | c.order_id, |
| | | 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 |
| | | </select> |
| | | </mapper> |
| | |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityCount, |
| | | e.broken_num, |
| | | round(ifnull(f.inventory,0)*a.area,2) as inventoryArea |
| | | |
| | | ifnull(f.inventory,0) as inventory , |
| | | round(ifnull(f.inventory,0)*a.area,2) as inventoryArea, |
| | | ifnull(dd.quantity,0) as shippedQuantity |
| | | from |
| | | flow_card as c |
| | | left join |
| | |
| | | on c.order_id = d.order_id |
| | | left join mm.finished_goods_inventory as f |
| | | on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join sd.delivery_detail as dd on dd.order_id=a.order_id and dd.order_number=a.order_number |
| | | left join ( |
| | | SELECT process_id, |
| | | technology_number, |
| | |
| | | where a.order_id=#{orderId} |
| | | GROUP BY process_id,a.technology_number |
| | | ) as e |
| | | |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | |
| | |
| | | |
| | | <select id="splittingDetailsOutsideMp"> |
| | | SELECT |
| | | fc.process_id, |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | fc.process_id processId, |
| | | fc.order_number orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | o.project, |
| | | o.batch, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | ogd.child_width as childWidth, |
| | | ogd.child_height as childHeight, |
| | | fc.quantity, |
| | | round( ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2 ) as area, |
| | | od.shape, |
| | |
| | | c.quantity, |
| | | c.technology_number, |
| | | b.glass_child, |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityCount, |
| | | ifnull(e.reportWorkQuantity,0) as reportWorkQuantity, |
| | | ifnull(e.reportWorkQuantityCount,0) as reportWorkQuantityCount, |
| | | ifnull(f.inventory,0) as inventoryNum, |
| | | round(ifnull(f.inventory,0)*a.area,2) as inventoryArea, |
| | | dd.quantity as shippedQuantity, |
| | | dd.area |
| | | ifnull(dd.quantity,0) as shippedQuantity, |
| | | ifnull(dd.area,0) as area |
| | | |
| | | from |
| | | flow_card as c |
| | |
| | | </select> |
| | | |
| | | <select id="taskCompletionStatusMp"> |
| | | select d.customer_name, |
| | | select d.customer_name as customerName, |
| | | d.project, |
| | | d.batch, |
| | | c.order_id, |
| | | c.order_id as orderId, |
| | | d.quantity, |
| | | d.area, |
| | | dd.quantity as shippedQuantity, |
| | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | |
| | | </mapper> |