| File was renamed from north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue |
| | |
| | | printList: [] |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | | list:null,//勾选的数据 |
| | | faceOrientation:null,//内外面 |
| | | type:null,//标签模板 |
| | | lableType:null//标签类型 |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | const type = route.query.type |
| | | const faceOrientation = route.query.faceOrientation |
| | | const lableType = route.query.lableType |
| | | |
| | | let type = props.type |
| | | let faceOrientation = props.faceOrientation |
| | | let lableType = props.lableType |
| | | data.value.printList = JSON.parse(props.list) |
| | | onMounted(() => { |
| | | request.post(`/processCard/getSelectPrintCustomLabel/${type}/${lableType}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | "{display:block;padding-top:1px}}"; |
| | | // |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | |
| | | |
| | | //修改相同产品名称标签 |
| | | const updataProductName = () => { |
| | | |
| | | for (let i = 0; i < lastList.value.length; i++) { |
| | | let prefix = lastList.value[i].processId.substring(0, 11); |
| | | let orderId= lastList.value[i].orderId |
| | | let enName= lastList.value[i].productAbbreviation |
| | | let project=lastList.value[i].project |
| | | lastList.value.forEach(obj => { |
| | | if (prefix === obj.processId.substring(0, 11)){ |
| | | obj.productAbbreviation = enName |
| | | } |
| | | if (orderId === obj.orderId){ |
| | | obj.project=project |
| | | } |
| | | }) |
| | | } |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button> |
| | | <div id="print" :class="company.printLabel.className.custom.printFlowCardName()"> |
| | | <div v-for="(item1,id) in lastList" :class="company.printLabel.className.custom.entiretyName()"> |
| | | <div class="row4">{{ faceOrientation }}</div> |
| | | <div v-for="(item,id) in labelList" :class="company.printLabel.className.custom.contentRowName()"> |
| | | <div v-if="item.title==null" class="row1">{{ item.title }}</div> |
| | | <div v-else class="row1">{{ item.title }}:</div> |
| | | <div class="row2" style="width: 100%;"><input v-model="item1[item.name]" @keyup="updataProductName()" style="background-color: #D5EAFF;border: none;"/></div> |
| | | <div id="print" :class="company.printLabel.className.custom.printFlowCardName()"> |
| | | <div v-for="(item1,id) in lastList" :class="company.printLabel.className.custom.entiretyName()"> |
| | | <div class="row4">{{ faceOrientation }}</div> |
| | | <div v-for="(item,id) in labelList" :class="company.printLabel.className.custom.contentRowName()"> |
| | | <div v-if="item.title==null" class="row1">{{ item.title }}</div> |
| | | <div v-else class="row1">{{ item.title }}:</div> |
| | | <div class="row2" style="width: 100%;"><input v-model="item1[item.name]" @keyup="updataProductName()" style="border: none;"/></div> |
| | | </div> |
| | | <div v-html="company.printLabel.custom(item1)"></div> |
| | | </div> |
| | | <div v-html="company.printLabel.custom(item1)"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | </template> |
| | | |
| | |
| | | width: 100px; |
| | | } |
| | | |
| | | .print{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | /*成*/ |
| | | .printFlowCard_finished { |
| | | /* |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | */ |
| | | flex-wrap: wrap; |
| | | flex-wrap: nowrap; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | |
| | | |
| | | input{ |
| | | width: 100%; |
| | | background-color: #D5EAFF; |
| | | border: none; |
| | | } |
| | | |