| | |
| | | faceOrientation:null,//内外面 |
| | | type:null,//标签模板 |
| | | lableType:null,//标签类型 |
| | | switch:null//判断是否为新打印 |
| | | switch:null,//判断是否为新打印 |
| | | dataType:null, |
| | | projectNo:null |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | let type = props.type |
| | | let dataType = props.dataType |
| | | let faceOrientation = props.faceOrientation |
| | | let projectNo=props.projectNo |
| | | if (type.indexOf("英文")>-1 && faceOrientation==="此面为室内面"){ |
| | | faceOrientation='INSIDE' |
| | | } |
| | |
| | | faceOrientation='OUTSIDE' |
| | | } |
| | | let lableType = props.lableType |
| | | data.value.printList = JSON.parse(props.list) |
| | | let switchType = props.switch |
| | | onMounted(() => { |
| | | request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if(parseInt(dataType)===1){ |
| | | data.value.printList = JSON.parse(props.list) |
| | | request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.title) |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | if (switchType===true){ |
| | | labelList = props.titleList |
| | | }else { |
| | | labelList = dataList[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++) { |
| | | lastList.value.push(list.value[i].data[j]) |
| | | } |
| | | produceList.value = deepClone(res.data.title) |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | if (switchType===true){ |
| | | labelList = props.titleList |
| | | }else { |
| | | labelList = dataList[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++) { |
| | | lastList.value.push(list.value[i].data[j]) |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | ) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | }else if(parseInt(dataType)===2){ |
| | | request.post(`/processCard/getPrintCustomDataProjectNo/${type}/${projectNo}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.title) |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | if (switchType===true){ |
| | | labelList = props.titleList |
| | | }else { |
| | | labelList = dataList[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++) { |
| | | lastList.value.push(list.value[i].data[j]) |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | //修改相同产品名称标签 |
| | | const updateProductName = (event, index,id) => { |
| | |
| | | list: null,//勾选的数据 |
| | | faceOrientation: null,//内外面 |
| | | type: null,//标签模板 |
| | | lableType: null//标签类型 |
| | | lableType: null,//标签类型 |
| | | dataType: null//标签类型 |
| | | }) |
| | | |
| | | |
| | |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = type |
| | | labelRow.value.lableType = lableTypes |
| | | labelRow.value.dataType=1 |
| | | let columnsLabel=company.printLabel.columnsLabel |
| | | if (columnsLabel==1){ |
| | | dialogTableVisibleLabelXJTwo.value = true |
| | |
| | | :lableType="labelRow.lableType" |
| | | :list="labelRow.list" |
| | | :type="labelRow.type" |
| | | :dataType="labelRow.dataType" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | import TagStyle from "@/components/pp/TagStyle.vue" |
| | | import PrintCustomLabelXJTwo from '@/components/pp/PrintCustomLabelXJTwo.vue' |
| | | import {Printer} from "@element-plus/icons-vue/global"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | | let router = useRouter() |
| | | const dialogTableVisibleLabelXJTwo = ref(false) |
| | | let rowClickIndex = ref(null) |
| | | |
| | | |
| | | |
| | |
| | | let produceList = ref([]) |
| | | let titleStyleVisible = ref(false) |
| | | |
| | | //标签 |
| | | let labelRow = ref({ |
| | | list: null,//勾选的数据 |
| | | faceOrientation: null,//内外面 |
| | | type: "",//标签模板 |
| | | lableType: null,//标签类型 |
| | | dataType: 0,//标签类型 |
| | | projectNo:null |
| | | }) |
| | | const company = companyInfo() |
| | | let hidePrintLabels = company.printLabel.hideButton; |
| | | |
| | | const form = reactive({ |
| | | date1: '', |
| | |
| | | request.post(`/processCard/selectPrintPrintProject/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | if(hidePrintLabels=="true"){ |
| | | const button = {'code': 'printLabel', |
| | | status: 'primary', |
| | | 'name': "成品打印2"} |
| | | gridOptions.toolbarConfig.buttons.push(button) |
| | | } |
| | | produceList.value = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList.value) |
| | | gridOptions.loading = false |
| | |
| | | titleStyleVisible.value = true |
| | | break |
| | | } |
| | | case 'printLabel': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('请选择工程')) |
| | | return |
| | | } |
| | | labelRow.value.type = '恒鑫' |
| | | labelRow.value.dataType=2 |
| | | labelRow.value.projectNo=rowClickIndex.value.project_no |
| | | dialogTableVisibleLabelXJTwo.value = true |
| | | |
| | | |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | | } |
| | | } |
| | | const printContentLabel = ref({ |
| | | id: 'childLabel', |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | v-model="titleStyleVisible"> |
| | | <tag-style style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | | <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" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :type="labelRow.type" |
| | | :dataType="labelRow.dataType" |
| | | :projectNo="labelRow.projectNo" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation("打印自定义标签数据按工程查询接口") |
| | | @PostMapping("/getPrintCustomDataProjectNo/{type}/{projectNo}") |
| | | public Result getPrintCustomDataProjectNo( @PathVariable String type, |
| | | @PathVariable String projectNo) { |
| | | return Result.seccess(flowCardService.getPrintCustomDataProjectNo(type,projectNo)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("排序汇总查询接口") |
| | | @PostMapping("/selectSortTable") |
| | | public Result selectSortTable( |
| | |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataDetails(String processId, Integer orderNumber); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProjectNo(String projectNo); |
| | | |
| | | String selectUserMp(String userId); |
| | | |
| | | List<Map<String, Object>> selectSortTableMp(String orderId); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getPrintCustomDataProjectNo(String type, String projectNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | if (!projectNo.isEmpty()) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectNo(projectNo)); |
| | | list.add(itemmap); |
| | | |
| | | } |
| | | map.put("data", list); |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | | } |
| | | |
| | | public Object selectSortTableSv(Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | |
| | | order by fc.process_id |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataProjectNo"> |
| | | select |
| | | o.order_id as orderId, |
| | | project, |
| | | customer_id as customerId, |
| | | o.customer_name as customerName, |
| | | order_type as orderType, |
| | | order_classify as orderClassify, |
| | | batch, |
| | | o.icon, |
| | | pack_type as packType, |
| | | delivery_date as deliveryDate, |
| | | al_type as alType, |
| | | money, |
| | | contract_id as contractId, |
| | | customer_batch customerBatch, |
| | | contacts, |
| | | delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | od.width, |
| | | od.height, |
| | | fc.quantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | fc.process_id as processId, |
| | | o.create_time as createTime, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5, |
| | | p.remarks as filmNumber, |
| | | od.bend_radius as bendRadius, |
| | | od.other_columns, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color, |
| | | '文本' as custom1, |
| | | '文本' as custom2, |
| | | '文本' as custom3, |
| | | '文本' as custom4, |
| | | '文本' as custom5 |
| | | from optimize_detail as opt |
| | | left join flow_card as fc on opt.project_no=fc.project_no and opt.process_id=fc.process_id and opt.layer=fc.technology_number and opt.order_sort=fc.order_number |
| | | left join sd.order as o on o.order_id=fc.order_id |
| | | left join sd.order_detail as od on fc.order_id = od.order_id and od.order_number = fc.order_number |
| | | left join sd.product as p on p.id = od.product_id |
| | | left join sd.customer as c on c.id = o.customer_id |
| | | 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} |
| | | group by od.order_id,od.order_number,fc.process_id |
| | | order by od.order_id,od.order_number |
| | | </select> |
| | | |
| | | <select id="selectUserMp"> |
| | | select role_id |
| | | from erp_user_info.`user` as u |