| | |
| | | const route = currentRoute.value |
| | | let type = props.type |
| | | let faceOrientation = props.faceOrientation |
| | | if (type.indexOf("英文")>-1 && faceOrientation==="此面为室内面"){ |
| | | faceOrientation='INSIDE' |
| | | } |
| | | else if (type.indexOf("英文")>-1 && faceOrientation==="此面为室外面"){ |
| | | faceOrientation='OUTSIDE' |
| | | } |
| | | let lableType = props.lableType |
| | | data.value.printList = JSON.parse(props.list) |
| | | onMounted(() => { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | |
| | | |
| | | //修改相同产品名称标签 |
| | | const updateProductName = (event, index) => { |
| | | const updateProductName = (event, index,id) => { |
| | | // 创建映射对象 |
| | | const propertyMapping = {}; |
| | | labelList.forEach(item => { |
| | |
| | | }); |
| | | // 输入的值 |
| | | const newValue = event.target.innerText; |
| | | const parts = newValue.split(':'); |
| | | const result = parts[1]; // 获取冒号后的部分 |
| | | |
| | | // 获取映射中所有的键 |
| | | const keys = Object.keys(propertyMapping); |
| | |
| | | // 获取前缀和 orderId |
| | | const prefix = obj.processId.substring(0, 11); |
| | | const orderId = obj.orderId; |
| | | |
| | | const glassNumber=lastList.value[id].glassNumber |
| | | // 根据 propertyName 更新属性 |
| | | if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) { |
| | | obj.productAbbreviation = newValue; |
| | | obj.productAbbreviation = result; |
| | | } |
| | | |
| | | if (propertyName === 'project' && orderId === obj.orderId) { |
| | | obj.project = newValue; |
| | | obj.project = result; |
| | | } |
| | | if (propertyName === 'productName' && glassNumber === obj.glassNumber){ |
| | | obj.productName = result; |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | <template> |
| | | <div id="print" :class="company.printLabel.className.custom.printFlowCardName()"> |
| | | <div v-for="(item1,id) in lastList" :class="company.printLabel.className.custom.entiretyName()"> |
| | | <div v-for="(item1,index) 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="item1[item.name] != null && item1[item.name] !== ''" class="row1">{{ item.title }}</div> |
| | | <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" contenteditable="true" @input="updateProductName($event, id,index)" v-text="item.title+':'+item1[item.name]"></div> |
| | | <!-- <div class="row2" style="width: 100%;"><input class="contentRow2" v-model="item1[item.name]" @keyup="updataProductName()" style="border: none;"/></div>--> |
| | | <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div> |
| | | <!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div>--> |
| | | </div> |
| | | <div v-html="company.printLabel.custom(item1)"></div> |
| | | </div> |
| | |
| | | body { |
| | | overflow: hidden; |
| | | font-family: Arial; |
| | | font-size: 10px; |
| | | font-size: 7px; |
| | | } |
| | | |
| | | #printButton { |
| | |
| | | } |
| | | |
| | | .contentRow .row1 { |
| | | width: 20%; |
| | | font-weight: bolder; |
| | | width: 100%; |
| | | } |
| | | |
| | | .entirety_finished .row4 { |
| | | font-weight: bolder; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .contentRow .row1, .contentRow .row2 { |
| | |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 18mm 4mm 0mm 4mm; /* this affects the margin in the printer settings */ |
| | | margin: 13mm 5mm 0mm 7mm; /* this affects the margin in the printer settings */ |
| | | } |
| | | |
| | | @media print { |