guoyuji
2024-09-03 76bf2824bf55e8f4c3ccbc14b3b2719bf8fb219f
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabel.vue
@@ -37,10 +37,10 @@
const route = currentRoute.value
let type = props.type
let faceOrientation = props.faceOrientation
if (type==="英文标签" && faceOrientation==="此面为室内面"){
if (type.indexOf("英文")>-1 && faceOrientation==="此面为室内面"){
  faceOrientation='INSIDE'
}
else if (type==="英文标签" && faceOrientation==="此面为室外面"){
else if (type.indexOf("英文")>-1 && faceOrientation==="此面为室外面"){
  faceOrientation='OUTSIDE'
}
let lableType = props.lableType
@@ -76,7 +76,7 @@
//修改相同产品名称标签
const updateProductName = (event, index) => {
const updateProductName = (event, index,id) => {
  // 创建映射对象
  const propertyMapping = {};
  labelList.forEach(item => {
@@ -104,8 +104,8 @@
    // 获取前缀和 orderId
    const prefix = obj.processId.substring(0, 11);
    const orderId = obj.orderId;
    const glassNumber=obj.glassNumber
    const glassNumber=lastList.value[id].glassNumber
    const customerName = obj.customerName
    // 根据 propertyName 更新属性
    if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) {
      obj.productAbbreviation = result;
@@ -114,9 +114,11 @@
    if (propertyName === 'project' && orderId === obj.orderId) {
      obj.project = result;
    }
    if (propertyName === 'productName' && glassNumber === obj.glassNumber){
    if (propertyName === 'productName' && prefix === obj.processId.substring(0, 11)){
      obj.productName = result;
    }
    if (propertyName === 'customerName' && orderId === obj.orderId){
      obj.customerName = result;
    }
  });
}
@@ -127,10 +129,10 @@
<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"  contenteditable="true" @input="updateProductName($event, id)" v-text="item.title+':'+item1[item.name]"></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>