Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | labelList = a |
| | | |
| | | props.lastList.length = 0; |
| | | for (let i = 0; i < list.value.length; i++) { |
| | | let count = list.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++) { |
| | | props.lastList.push(list.value[i].data[j]) |
| | | // 遍历列表(替换 i 为更语义化的变量名) |
| | | for (const group of list.value) { |
| | | // 遍历每组中的数据(替换 j) |
| | | for (const item of group.data) { |
| | | const { quantity, newList } = item; |
| | | // 跳过 quantity 为 0 或无效的情况 |
| | | if (!quantity || quantity <= 0) continue; |
| | | |
| | | // 处理 newList:确保是数组,不足时用空对象兜底 |
| | | const safeNewList = Array.isArray(newList) ? newList : []; |
| | | |
| | | // 循环 quantity 次,添加数据到 lastList |
| | | for (let k = 0; k < quantity; k++) { |
| | | // 深拷贝 item,避免重复引用(关键!) |
| | | const newItem = JSON.parse(JSON.stringify(item)); |
| | | |
| | | // 若 newList 有对应索引数据,填充字段;否则置空 |
| | | const listItem = safeNewList[k]; |
| | | if (listItem) { |
| | | newItem.heat_layout_sort = listItem.glass_id || ''; // 兜底空字符串 |
| | | newItem.stockPolysId = `${listItem.stock_id || ''}/${listItem.polys_id || ''}`; // 避免 undefined/ |
| | | } else { |
| | | // 无对应数据时,字段置空(避免保留原始值) |
| | | newItem.heat_layout_sort = ''; |
| | | newItem.stockPolysId = ''; |
| | | } |
| | | |
| | | // 添加到目标列表 |
| | | props.lastList.push(newItem); |
| | | } |
| | | } |
| | | } |
| | | console.log(props) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | 时间:{{formattedTime}} |
| | | |
| | | <span style="font-weight: bolder;" > |
| | | 总数量:{{itemFlow.orderQuantity}} |
| | | 总面积:{{itemFlow.orderArea}} |
| | | </span> |
| | | |
| | | <span style="font-weight: bolder;" > |
| | | 打印总数量:{{totalQuantity}} |
| | | 打印总面积:{{totalArea}} |
| | | </span> |
| | |
| | | <td rowspan='2'>图号</td> |
| | | <td rowspan='2'>编号</td> |
| | | <td rowspan="2">小片顺序</td> |
| | | <td v-if="name=='浙江巨星嘉泰新材料有限公司'" rowspan='2' style="width: 90px">宽(弧长)×高</td> |
| | | <td v-if="name=='浙江巨星嘉泰新材料有限公司'" rowspan='2' style="width: 90px">宽(弧长)*高</td> |
| | | <td v-else rowspan='2' style="width: 90px">宽*高</td> |
| | | <td rowspan='2' >数量</td> |
| | | <td rowspan='2'>面积</td> |
| | |
| | | <td>{{ itemDatile.technology_number }}</td> |
| | | <td>{{ itemDatile.child_width }}</td> |
| | | <td class="item" style="width: 60px;height: 100%;"> |
| | | <input v-model="itemDatile.quantity" style="width: 100%;height: 100%" @keyup="handleSummary()"/> |
| | | <input v-model="itemDatile.quantity" style="width: 100%;height: 100%;font-weight: bold;" @keyup="handleSummary()"/> |
| | | </td> |
| | | <td>{{ itemDatile.total_area }}</td> |
| | | <td>{{ itemDatile.perimeter }}</td> |
| | |
| | | |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="31" style="width: 480px;height: 150px "> |
| | | <div style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | <div v-if="name=='浙江巨星嘉泰新材料有限公司'" style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | <div v-else style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | <td colspan="4" rowspan="5" style="width: 480px;height: 100px "> |
| | | <div> |
| | | |
| | | </div> |
| | | </td> |
| | | |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2">生产签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | </tr> |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="34" rowspan="6" style="width: 99%;height: 150px "> |
| | | <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px;text-align: left">{{itemtextareas.processing_note}}</textarea> |
| | | <div v-if="name=='浙江巨星嘉泰新材料有限公司'" style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | <div v-else style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | <td colspan="4" rowspan="5" style="width: 480px;height: 100px "> |
| | | <div> |
| | | |
| | | </div> |
| | | </td> |
| | | |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2">生产签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | </tr> |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="34" rowspan="6" style="width: 99%;height: 150px "> |
| | | <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px;text-align: left">{{itemtextareas.processing_note}}</textarea> |
| | | <div v-if="name=='浙江巨星嘉泰新材料有限公司'" style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | <div v-else style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | let result = ref(null) |
| | | let props = defineProps({ |
| | | rowIndex:null, |
| | | orderId:null |
| | | orderId:null, |
| | | state:null |
| | | }) |
| | | |
| | | const form = reactive({ |
| | |
| | | type="primary" |
| | | :loading="converting" |
| | | @click="loadSupportedFormats" |
| | | :disabled="!form.format" |
| | | :disabled="!form.format || props.state !== 1 || converting" |
| | | > |
| | | <template #icon> |
| | | <el-icon><MagicStick /></el-icon> |
| | |
| | | </el-button> |
| | | |
| | | <el-button @click="handleReset" |
| | | :loading="converting"> |
| | | :loading="converting" |
| | | :disabled="props.state !== 1 || converting"> |
| | | <template #icon> |
| | | <el-icon><RefreshLeft /></el-icon> |
| | | </template> |
| | |
| | | </el-button> |
| | | <el-button |
| | | @click = 'deleteFile' |
| | | :disabled="props.state !== 1" |
| | | ><template #icon> |
| | | <el-icon><Delete /></el-icon> |
| | | </template> |
| | |
| | | component: () => import('../components/pp/TagStyleDesigner.vue'), |
| | | }, |
| | | { |
| | | path: 'printProjectDetailSmallPiece', |
| | | name: 'printProjectDetailSmallPiece', |
| | | component: () => import('../views/pp/processCard/PrintProjectDetailSmallPiece.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/selectProcessCard' |
| | | } |
| New file |
| | |
| | | <script setup> |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {VXETable} from "vxe-table"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/components/pp/PrintProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | import PrintCustomLabel from '@/components/pp/PrintCustomLabelDetails.vue' |
| | | import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.vue' |
| | | import PrintCustomLabelXJ from '@/components/pp/PrintCustomLabelTwo.vue' |
| | | import PrintCustomLabelXJTwo from '@/components/pp/PrintCustomLabelXJTwo.vue' |
| | | import PrintCustomLabelProject from '@/components/pp/PrintCustomLabelProject.vue' |
| | | import SortDetail from '@/components/pp/SelectSortDetailProcessCard.vue' |
| | | import footSum from "@/hook/footSum" |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue"; |
| | | import {hiprint} from "vue-plugin-hiprint"; |
| | | import QueuePrinter from "@/hook/queue" |
| | | import TagStyleSet from "@/hook/tagStyleSet"; |
| | | import {createTemplate} from "@/hook/createTemplateTag"; |
| | | |
| | | const company = companyInfo() |
| | | |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | const dialogTableVisibleCustomLabel = ref(false) |
| | | const dialogTableVisibleLabelXJ = ref(false) |
| | | const dialogTableVisibleLabelXJTwo = ref(false) |
| | | const dialogTableVisibleLabelProject = ref(false) |
| | | const printVisible = ref(false) |
| | | let selectRecords = ref(null) |
| | | let titleStyleVisible = ref(false) |
| | | let lastList = ref([]) |
| | | const selectRecordsData = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const xGrid = ref(null) |
| | | const xGridDetail = ref(null) |
| | | |
| | | |
| | | |
| | | const tagType = ref() |
| | | |
| | | //排序 |
| | | let editRow = ref({ |
| | | processId: null, |
| | | technologyNumber: null, |
| | | process: null |
| | | }) |
| | | |
| | | //打印 |
| | | let printRow = ref({ |
| | | list: null, |
| | | printMergeVal: null, |
| | | like: null |
| | | }) |
| | | |
| | | //标签 |
| | | let labelRow = ref({ |
| | | list: null,//勾选的数据 |
| | | faceOrientation: null,//内外面 |
| | | type: null,//标签模板 |
| | | lableType: null,//标签类型 |
| | | dataType: null,//标签类型 |
| | | detailType: 0//是否是工程明细打印 |
| | | }) |
| | | |
| | | |
| | | onMounted(async () => { |
| | | await getTags(); |
| | | await hiprint.init(); |
| | | |
| | | }) |
| | | let hiprintTemplate = ref() |
| | | |
| | | |
| | | |
| | | |
| | | const tags = ref([]) |
| | | |
| | | const tag = ref({ |
| | | id: null, |
| | | name: null, |
| | | type: 1, |
| | | tagWidth: null, |
| | | tagHeight: null, |
| | | value: null, |
| | | size: null |
| | | }) |
| | | |
| | | const changeTag = () => { |
| | | hiprintTemplate.value = new hiprint.PrintTemplate({}); |
| | | hiprintTemplate.value.design("#hiprint-printTemplate2",{grid:true}); |
| | | const json = tag.value.value |
| | | hiprintTemplate.value.update(json) |
| | | } |
| | | //标签类型 |
| | | const lableType = ref('1') |
| | | |
| | | //合片流程卡打印下拉选项 |
| | | |
| | | const printContent = ref({ |
| | | id: 'child', |
| | | |
| | | }) |
| | | |
| | | const printContentLabel = ref({ |
| | | id: 'childLabel', |
| | | }) |
| | | |
| | | |
| | | //打印类型 |
| | | const printType = ref() |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | dataType: [], |
| | | }) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const getTags = () => { |
| | | request.get('tagStyle/getTagList').then(res => { |
| | | res.data.forEach(item => { |
| | | item.value = JSON.parse(item.value) |
| | | }) |
| | | tags.value = res.data |
| | | }) |
| | | } |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let projectNo = route.query.projectNo |
| | | let stockId = route.query.stockId |
| | | let flowData=ref({ |
| | | projectNo:projectNo, |
| | | stockId:stockId |
| | | }) |
| | | |
| | | // 第一次加载查询 |
| | | request.post(`/processCard/selectPrintProjectDetailSmallPiece`,flowData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | xGrid.value.reloadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }).catch(err => { |
| | | console.log('请求地址错误:', err.config.url); |
| | | console.log('错误详情:', err); |
| | | }); |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'printFlowCard_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'project_no', |
| | | title: t('ingredientsStock.projectNo'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'stock_id', |
| | | title: t('processCard.layoutNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'polys_id', |
| | | title: t('小片序号'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'o_width', |
| | | title: t('order.width'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'o_height', |
| | | title: t('order.height'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'printLabel3', name: t('basicData.print'), status: 'primary'}, |
| | | ], |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["glass_count"] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | }, |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | let type = printType.value |
| | | let faceOrientation = '' |
| | | let lableTypes = lableType.value |
| | | let lableTitle = lableType.text |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'printLabel3': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('processCard.projectMsg1')) |
| | | return |
| | | } |
| | | if (tag.value.name == null || tag.value.name == '') { |
| | | ElMessage.warning(t('processCard.projectMsg2')) |
| | | return |
| | | } |
| | | let name = company.companyName |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | if (name == '新疆恒鑫玻璃科技有限公司') { |
| | | labelRow.value.type = '恒鑫带数量' |
| | | labelRow.value.dataType = 3 |
| | | dialogTableVisibleLabelXJTwo.value = true |
| | | } else { |
| | | labelRow.value.type = tag.value.name |
| | | labelRow.value.dataType = 3 |
| | | labelRow.value.lableType = lableTypes |
| | | labelRow.value.switch = true |
| | | lastList.value = [] |
| | | dialogTableVisibleLabelProject.value = true |
| | | } |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | const printObjectProcess = (type) => { |
| | | const list = tag.value.value |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | if( element.options.field !== undefined){ |
| | | if(type===3 ){ |
| | | element.options.hideTitle = true |
| | | } |
| | | } |
| | | if(type!==3){ |
| | | element.options.hideTitle = false |
| | | if( element.options.field === undefined){ |
| | | element.options.hideTitle = true |
| | | } |
| | | } |
| | | }) |
| | | |
| | | //hiprintTemplate.value.update(list) |
| | | let object = JSON.parse(JSON.stringify(lastList.value)) |
| | | //判断是否为表格 |
| | | let columnsNum = null |
| | | if(list.panels[0].printElements[0].options.field==='table'){ |
| | | object = {table:lastList.value} |
| | | columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1) |
| | | } |
| | | //判断是否有 嵌套自定义纸张 |
| | | if(tag.value.tagHeight && tag.value.tagWidth){ |
| | | const print =createTemplate(list,object,tag.value.tagWidth,tag.value.tagHeight) |
| | | hiprintTemplate.value.update(print.template) |
| | | object = print.printData |
| | | } |
| | | hiprintTemplate.value.print(object) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div> |
| | | <label>{{ $t('processCard.labelStyle') }}:</label> |
| | | <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag"> |
| | | <el-option |
| | | v-for="(tag,index) in tags" |
| | | :key="index" |
| | | :label="tag.name" |
| | | :value="tag" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" |
| | | type="text" |
| | | @input="changeFilterEvent($event, option, $panel)" |
| | | @keyup.enter.native="$panel.confirmFilter()"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | |
| | | <!-- 成品标签两列新疆--> |
| | | <el-dialog |
| | | id="sizeCustom" |
| | | v-model="dialogTableVisibleLabelXJTwo" |
| | | :title="$t('processCard.printLabel')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContentLabel" :icon="Printer" circle/> |
| | | </template> |
| | | <print-custom-label-x-j-two id="childLabel" |
| | | :dataType="labelRow.dataType" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :lableType="labelRow.lableType" |
| | | :list="labelRow.list" |
| | | :type="labelRow.type" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | | <!-- 成品标签工程打印--> |
| | | <el-dialog |
| | | id="sizeCustom" |
| | | v-model="dialogTableVisibleLabelProject" |
| | | :title="$t('processCard.printLabel')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <!-- <el-button :icon="Printer" circle @click="printObjectProcess(1)"/>--> |
| | | <!-- <el-button @click="printObjectProcess(3)" >{{ $t('processCard.noTitle') }}</el-button>--> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.yesTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button :icon="Printer" circle @click="printObjectProcess(1)"/> |
| | | </el-tooltip> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.noTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button @click="printObjectProcess(3)"> |
| | | <i class="vxe-icon-print"></i> |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | <print-custom-label-project id="childLabel" |
| | | :detailType="labelRow.detailType" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :lableType="labelRow.lableType" |
| | | :lastList='lastList' |
| | | :list="labelRow.list" |
| | | :switch="labelRow.switch" |
| | | :titleList="labelRow.titleList" |
| | | :type="labelRow.type" |
| | | |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 92%; |
| | | } |
| | | |
| | | |
| | | :deep(#sizeCheck .el-dialog__body) { |
| | | height: 90%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizeCustom .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizeCustomSemi .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#titleStyle .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | </style> |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'printLabel3', name: t('basicData.print'), status: 'primary'}, |
| | | {code: 'printSmallPiece', name: t('小片打印'), status: 'primary'}, |
| | | ], |
| | | zoom: true, |
| | | custom: true |
| | |
| | | } |
| | | break |
| | | } |
| | | case 'printSmallPiece': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('processCard.projectMsg1')) |
| | | return |
| | | } |
| | | let stock_id=[] |
| | | for (let i=0;i<selectRecords.length;i++){ |
| | | stock_id.push(selectRecords[i].stock_id) |
| | | } |
| | | console.log(stock_id) |
| | | router.push({path: '/main/processCard/printProjectDetailSmallPiece', query: {projectNo: projectNo,stockId:JSON.stringify(stock_id)}}) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | { code: 'sizeCheck', name: t('basicData.sizeReview'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'updateOrderId', name: t('searchOrder.updateOrderId'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'reportingTransfer', name: t('searchOrder.reportingTransfer'), prefixIcon: 'vxe-icon-send', visible: true, disabled: true }, |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, }, |
| | | { code: 'fileUpload', name: t('上传dwg文件'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | ] |
| | | ] |
| | | } |
| | |
| | | return |
| | | } |
| | | rowIndex=row |
| | | if(orderTypeState.value===1){ |
| | | fileUploadVisible.value=true |
| | | }else{ |
| | | alienEditorVisible.value=true |
| | | alienEditorVisible.value=true |
| | | break |
| | | } |
| | | case 'fileUpload':{ |
| | | const row = xGrid.value.getCurrentRecord() |
| | | if(row===null){ |
| | | ElMessage.warning(t('components.pleaseClickToSelectARowFirst')) |
| | | return |
| | | } |
| | | rowIndex=row |
| | | fileUploadVisible.value=true |
| | | break |
| | | } |
| | | |
| | | } |
| | |
| | | <upload-picture |
| | | :rowIndex="rowIndex" |
| | | :orderId="titleUploadData.orderId" |
| | | :state="orderTypeState" |
| | | /> |
| | | </el-dialog> |
| | | |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @ApiOperation("工程明细打印查询") |
| | | @PostMapping("/selectPrintProjectDetails/{projectNo}") |
| | | public Result selectPrintProjectDetails( |
| | | @PathVariable String projectNo) { |
| | | public Result selectPrintProjectDetails( @PathVariable String projectNo) { |
| | | return Result.success(flowCardService.getPrintProjectDetails(projectNo)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工程明细小片打印查询") |
| | | @PostMapping("/selectPrintProjectDetailSmallPiece") |
| | | public Result selectPrintProjectDetailSmallPiece( |
| | | @RequestBody Map<String, Object> object) throws JsonProcessingException { |
| | | return Result.success(flowCardService.selectPrintProjectDetailSmallPiece(object)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工程明细打印标签查询") |
| | | @PostMapping("/getPrintCustomDataProjectNoDetail/{type}/{detailType}") |
| | | public Result getPrintCustomDataProjectNoDetail( |
| | |
| | | //版图ID |
| | | @TableField(select = false,exist = false) |
| | | private String stockId; |
| | | //小片序号 |
| | | @TableField(select = false,exist = false) |
| | | private Integer polysId; |
| | | //小片数量 |
| | | @TableField(select = false,exist = false) |
| | | private String glassCount; |
| | |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataSemi(String processId, String technologyNumber, String process, Integer orderNumber, Integer printQuantity); |
| | | |
| | | List<Map<String, Object>> getgetPrintCustomDataSemiSp(String processId, String technologyNumber, Integer orderNumber); |
| | | |
| | | List<Map<String, String>> selectPrintNotMp(String orderId); |
| | | |
| | | List<Map<String, String>> selectPrintNotMergeMp(String orderId); |
| | |
| | | |
| | | List<Map<String, Object>> getPrintProjectDetailsMp(String projectNo); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProjectDetail(String projectNo, String stockId); |
| | | List<Map<String, Object>> getPrintProjectDetailsMpSp(String projectNo,List<Integer> stockId); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProjectDetail(String projectNo, String stockId,Integer polysId); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProject(String projectNo); |
| | | |
| | |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | //获取工序对应的别称 |
| | | String processName = flowCardMapper.getProcessName(processSub); |
| | | //processName.equals("stepC") || processName.equals("stepD") |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空 |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空,流程卡查询合并 |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), |
| | | String.valueOf("null".equals(compound) |
| | | ? flowCard.getTechnologyNumber()//正常层 |
| | |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } else { |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) {//否 |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) {//未启用,配置文件flowCardMerge值为1 |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | |
| | | |
| | | } |
| | | |
| | | } else {//否 |
| | | //流程卡明细数据 |
| | | if (printLike.equals("") || printLike.equals("null")) { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListMerge(flowCard.getProcessId(), printMerge, flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(), flashback, landingSequence); |
| | | itemmap.put("detailList", detailList); |
| | | } else { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), printMerge, flowCard.getProcess(), flashback, landingSequence); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } |
| | | |
| | | //工艺流程 |
| | |
| | | // 判断是否为非空字符串 |
| | | if (orderNumber != null && !orderNumber.trim().isEmpty()) { |
| | | |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi( |
| | | List<Map<String, Object>> customDataSemi =flowCardMapper.getPrintCustomDataSemi( |
| | | flowCard.getProcessId(), |
| | | flowCard.getTechnologyNumber(), |
| | | flowCard.getProcess(), |
| | | flowCard.getOrderNumber(), flowCard.getPrintQuantity() |
| | | )); |
| | | flowCard.getOrderNumber(), flowCard.getPrintQuantity()); |
| | | for (Map<String, Object> dataMap : customDataSemi) { |
| | | dataMap.put("newList", flowCardMapper.getgetPrintCustomDataSemiSp( |
| | | flowCard.getProcessId(), |
| | | dataMap.get("technologyNumber").toString(), |
| | | flowCard.getOrderNumber() |
| | | )); |
| | | } |
| | | itemmap.put("data", customDataSemi); |
| | | } else { |
| | | //用于天津现场流程卡打印界面的小片标签打印 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemiTj( |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> selectPrintProjectDetailSmallPiece(Map<String, Object> object) throws JsonProcessingException { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String projectNo=object.get("projectNo").toString(); |
| | | String stockIdsStr=object.get("stockId").toString(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | if (stockIdsStr != null && !stockIdsStr.isEmpty()) { |
| | | List<Integer> list = objectMapper.readValue(stockIdsStr, new TypeReference<List<Integer>>() {}); |
| | | map.put("data", flowCardMapper.getPrintProjectDetailsMpSp(projectNo,list)); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Integer detailType, Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | //是否是工程明细打印 |
| | | if (detailType == 0) {//工程打印明细 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(), flowCard.getStockId())); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(), flowCard.getStockId(),flowCard.getPolysId())); |
| | | |
| | | |
| | | } |
| | | //非工程打印 |
| | |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | '' as qrcode, |
| | | ifnull(rack,"") as rack |
| | | ifnull(rack,"") as rack, |
| | | o.quantity as orderQuantity, |
| | | o.area as orderArea |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | </select> |
| | | |
| | | <select id="getgetPrintCustomDataSemiSp"> |
| | | select * from pp.optimize_detail opd |
| | | where opd.process_id= #{processId} and opd.order_sort = #{orderNumber} |
| | | <if test="technologyNumber != null and technologyNumber != ''"> |
| | | and opd.layer = #{technologyNumber} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectPrintNotMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | fc.technology_number as qrcode, |
| | | o.other_remarks |
| | | o.other_remarks, |
| | | o.quantity as orderQuantity, |
| | | o.area as orderArea |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | ORDER BY opd.stock_id |
| | | </select> |
| | | |
| | | <select id="getPrintProjectDetailsMpSp"> |
| | | SELECT opd.project_no,opd.stock_id,opd.polys_id,o_width,o_height,p_width,p_height |
| | | FROM optimize_detail as opd left join optimize_layout as opl on opl.project_no=opd.project_no and opl.stock_id=opd.stock_id |
| | | where opd.project_no=#{projectNo} and opd.stock_id in |
| | | <foreach item="item" index="index" collection="stockId" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | order BY opd.stock_id |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataProjectDetail"> |
| | | select |
| | | opt.glass_id as heat_layout_sort , |
| | |
| | | left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and |
| | | pd.glass_sort = fc.technology_number |
| | | where opt.project_no=#{projectNo} and opt.stock_id=#{stockId} |
| | | <if test="polysId != null"> |
| | | and opt.polys_id=#{polysId} |
| | | </if> |
| | | order by opt.stock_id,opt.polys_id |
| | | </select> |
| | | |
| | |
| | | <select id="mesSelectWorkBasicDeviceMp"> |
| | | SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM sd.basic_data as bd left join `basic_data_produce` as bdp |
| | | on bd.id=bdp.basic_category |
| | | where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process} |
| | | where bd.basic_category="process" and bdp.basic_type="device" |
| | | </select> |
| | | |
| | | <select id="mesSelectWorkBasicTeamsMp"> |
| | | select id,login_name,user_name,address from erp_user_info.`user` |
| | | select id,login_name,user_name,address from erp_user_info.`user` where address is not null |
| | | </select> |
| | | </mapper> |