| | |
| | | ) |
| | | |
| | | //修改相同产品名称标签 |
| | | const updateProductName = (event, index, id) => { |
| | | const updateProductName = (event, id, index) => { |
| | | console.log(event, index, id) |
| | | // 创建映射对象 |
| | | const propertyMapping = {}; |
| | |
| | | const keys = Object.keys(propertyMapping); |
| | | |
| | | // 根据 index 获取对应的属性名 |
| | | const propertyName = keys[index]; |
| | | const propertyName = keys[id]; |
| | | |
| | | // 如果映射中没有该 index,直接返回 |
| | | if (!propertyName) { |
| | |
| | | // 遍历 lastList 并更新对应的属性 |
| | | props.lastList.forEach(obj => { |
| | | // 获取前缀和 orderId |
| | | const prefix = props.lastList[id].processId.substring(0, 11); |
| | | const prefix = props.lastList[index].processId.substring(0, 11); |
| | | const orderId = obj.orderId; |
| | | const glassNumber = props.lastList[id].glassNumber |
| | | const glassNumber = props.lastList[index].glassNumber |
| | | // 根据 propertyName 更新属性 |
| | | if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) { |
| | | obj.productAbbreviation = result; |
| | |
| | | <template> |
| | | <div id="print" class="printFlowCard_semi"> |
| | | |
| | | <template v-for="(item1, id) in props.lastList"> |
| | | <template v-for="(item1, index) in props.lastList"> |
| | | <div class="entirety_semi"> |
| | | <div class="row4">{{ faceOrientation }}</div> |
| | | <div v-for="(item, id ,index) in labelList" class="contentRow"> |
| | | <div v-for="(item, id) in labelList" class="contentRow"> |
| | | <div contenteditable="true" v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" |
| | | @input="updateProductName($event, id, id)">{{ item.title }}:{{ item1[item.name] }}</div> |
| | | @input="updateProductName($event, id, index)">{{ item.title }}:{{ item1[item.name] }}</div> |
| | | <!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2">{{ item1[item.name] }}</div>--> |
| | | </div> |
| | | <!-- <div v-html="company.printLabel.customSemi(item1)"></div> --> |