合并流程卡打印功能,修改报表部分语言显示错误和问题
| | |
| | | component: () => import('../views/pp/Replenish/SelectReplenish.vue'), |
| | | }, |
| | | { |
| | | path: 'selectPrintRepairFlowCard', |
| | | name: 'selectPrintRepairFlowCard', |
| | | component: () => import('../views/pp/Replenish/SelectPrintRepairFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: 'printRepairFlowCard', |
| | | name: 'printRepairFlowCard', |
| | | component: () => import('../views/pp/Replenish/PrintRepairFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: 'printRepairProcess', |
| | | name: 'printRepairProcess', |
| | | component: () => import('../views/pp/Replenish/PrintRepairProcess.vue'), |
| | | }, |
| | | { |
| | | path: 'printReplenishFlowCard', |
| | | name: 'printReplenishFlowCard', |
| | | component: () => import('../views/pp/Replenish/PrintReplenishFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/Replenish/SelectReplenish' |
| | | } |
| | |
| | | }, |
| | | ] |
| | | |
| | | //合片流程卡打印下拉选项 |
| | | const printMerge = ref('') |
| | | const printMergeOptions=[{}] |
| | | |
| | | |
| | | //打印类型 |
| | | const printType = ref() |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | 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'}, |
| | | |
| | | ], |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}}) |
| | | router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMerge.value}}) |
| | | |
| | | break |
| | | } |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-input clearable placeholder="合并打印" 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-option |
| | |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <!-- v-if="userStore.user.permissions.indexOf('SelectProductionBasicData.edit') > -1"--> |
| | | <!-- v-if="userStore.user.permissions.indexOf('SelectProductionBasicData.edit') > -1"--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | link |
| | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | const printMerge = route.query.printMerge |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | let flowCardCount = data.value.printList.length |
| | | onMounted(() => { |
| | |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.data) |
| | | console.log(produceList.value) |
| | | if (printMerge!==null && printMerge!==undefined && printMerge!==""){ |
| | | |
| | | produceList.value.forEach(item => { |
| | | item.detail[0].technologyNumber = printMerge; |
| | | }); |
| | | } |
| | | handleGetQRCode() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | |
| | | const handleGetQRCode = async () => { |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | list= produceList.value[i].detail[0].processIdNumber; |
| | | const url = `${list}`; |
| | | // 生成 QR Code 并存储到变量中 |
| | | const qrcode = ref(''); |
| | | qrcode.value = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcode"]=qrcode.value |
| | | const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | for (let j = 0; j < technologyNumber.length; j++) { |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber[j]}`; |
| | | |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber[j] |
| | | }); |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | |
| | | |
| | | // 打印方法 |
| | | 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(); |
| | | 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 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); |
| | | // 样式控制与打印无关的元素隐藏 |
| | | 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); |
| | | } |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | | setTimeout(() => { |
| | | window.print(); |
| | | body.removeChild(content); |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <td></td> |
| | | </tr> |
| | | <tr v-for="(qrCodeItem,index) in item.detail" :key="index"> |
| | | <td rowspan="2"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src= qrCodeItem.qrcode> |
| | | <td colspan="19" > |
| | | <span style="display: flex;"> |
| | | <span style="display: flex;width: 25%" v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src= qrCodeItems.qrcode> |
| | | </div> |
| | | |
| | | </td> |
| | | <td colspan="16"> |
| | | <span style="float: left;font-weight: bolder">{{ qrCodeItem.processIdNumber }}</span> |
| | | <span style="float: left;font-weight: bolder">{{ qrCodeItem.process_id+"/"+qrCodeItems.technologyNumber }}</span> |
| | | </span> |
| | | </span> |
| | | </td> |
| | | |
| | | </tr> |
| | |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { id: row.id }}) |
| | | router.push({path: '/main/processCard/PrintRepairFlowCard', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/Replenish/SelectReplenish' }">{{$t('replenish.patchManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/Replenish/AddReplenish' }">{{$t('replenish.addPatches')}}</el-breadcrumb-item> |
| | | <!-- <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/Replenish/PrintReplenishFlowCard' }">{{$t('replenish.printPatches')}}</el-breadcrumb-item>--> |
| | | <!-- <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/Replenish/SelectPrintRepairFlowCard' }">{{$t('replenish.printPatches')}}</el-breadcrumb-item>--> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }}) |
| | | router.push({path: '/main/processCard/PrintRepairFlowCard', query: { orderId: row.order_id }}) |
| | | break |
| | | } |
| | | } |
| | |
| | | } |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => { |
| | | request.post(`/Replenish/selectReplenishPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | |
| | | }, |
| | | ] |
| | | |
| | | //合片流程卡打印下拉选项 |
| | | const printMerge = ref('') |
| | | const printMergeOptions=[{}] |
| | | |
| | | |
| | | //打印类型 |
| | | const printType = ref() |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}}) |
| | | router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMerge.value}}) |
| | | |
| | | break |
| | | } |
| | |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-input clearable placeholder="合并打印" 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-option |
| | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | const printMerge = route.query.printMerge |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | let flowCardCount = data.value.printList.length |
| | | onMounted(() => { |
| | |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.data) |
| | | console.log(produceList.value) |
| | | if (printMerge!==null && printMerge!==undefined && printMerge!==""){ |
| | | |
| | | produceList.value.forEach(item => { |
| | | item.detail[0].technologyNumber = printMerge; |
| | | }); |
| | | } |
| | | handleGetQRCode() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | |
| | | const handleGetQRCode = async () => { |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | list= produceList.value[i].detail[0].processIdNumber; |
| | | const url = `${list}`; |
| | | // 生成 QR Code 并存储到变量中 |
| | | const qrcode = ref(''); |
| | | qrcode.value = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcode"]=qrcode.value |
| | | const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | for (let j = 0; j < technologyNumber.length; j++) { |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber[j]}`; |
| | | |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber[j] |
| | | }); |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | <td></td> |
| | | </tr> |
| | | <tr v-for="(qrCodeItem,index) in item.detail" :key="index"> |
| | | <td rowspan="2"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src= qrCodeItem.qrcode> |
| | | <td colspan="19" > |
| | | <span style="display: flex;"> |
| | | <span style="display: flex;width: 25%" v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src= qrCodeItems.qrcode> |
| | | </div> |
| | | |
| | | </td> |
| | | <td colspan="16"> |
| | | <span style="float: left;font-weight: bolder">{{ qrCodeItem.processIdNumber }}</span> |
| | | <span style="float: left;font-weight: bolder">{{ qrCodeItem.process_id+"/"+qrCodeItems.technologyNumber }}</span> |
| | | </span> |
| | | </span> |
| | | </td> |
| | | |
| | | </tr> |
| | |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'material_name', width: 120, title: t('mainIngredient.materialName'), filters: [{data: ''}], |
| | | field: 'material_name', width: 120, title: t('mainIngredientStock.materialName'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'producer',title: t('mainIngredient.producer'), filters: [{data: ''}], |
| | | field: 'producer',title: t('mainIngredientStock.producer'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | |
| | | {field: 'height', title: t('order.height'), showOverflow: "ellipsis"}, |
| | | {field: 'quantity', title: t('report.quantityClaimed')}, |
| | | {field: 'area', title: t('report.areaClaimed')}, |
| | | {field: 'date_of_manufacture', title: t('mainIngredient.dateOfManufacture')}, |
| | | {field: 'date_of_manufacture', title: t('mainIngredientStock.dateOfManufacture')}, |
| | | {field: 'date', title: t('report.dateClaimed')}, |
| | | ],//表头按钮 |
| | | |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.exception.ServiceException; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public Result updateReplenish( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(replenishService.updateReplenish(object)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡补片打印查询接口") |
| | | @PostMapping("/selectReplenishPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}") |
| | | public Result selectReplenishPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String project, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(replenishService.selectReplenishPrintFlowCardSv(selectTime1, selectTime2, orderId, project, flowCard)); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public Object selectReplenishPrintFlowCardSv(java.sql.Date selectTime1, java.sql.Date selectTime2, String orderId, String project, FlowCard flowCard) { |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | if ("null".equals(project)) { |
| | | project = ""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project, flowCard)); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | |
| | | <select id="productionScheduleMp"> |
| | | select |
| | | a.order_number, |
| | | if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape, |
| | | if(a.shape=1,'普形',if(a.shape=2,'异形','')) as shape, |
| | | a.product_name, |
| | | b.child_width, |
| | | b.child_height, |