guoyuji
2024-07-16 098dadcc34468f9fe37ffca45a55821d8d57fae8
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -45,7 +45,8 @@
//打印
let  printRow = ref({
  list:null,
  printMergeVal:null
  printMergeVal:null,
  like:null
})
@@ -281,6 +282,7 @@
      {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'},
      {code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'},
      {code: 'printLabel2', name: t('processCard.labelPrinting2'), status: 'primary'},
      {code: 'printLike', name: "同配置打印", status: 'primary'},
    ],
    // import: false,
    // export: true,
@@ -337,6 +339,7 @@
          }
          printRow.value.list = JSON.stringify(selectRecords)
          printRow.value.printMergeVal=printMerge.value
          printRow.value.like=null
        // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          dialogTableVisible.value=true
          break
@@ -440,6 +443,27 @@
          break
        }
        case 'printLike': {
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          let id = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
              id += selectRecords[i].id
            } else {
              id += selectRecords[i].id + "|"
            }
          }
          printRow.value.list = JSON.stringify(selectRecords)
          printRow.value.printMergeVal=printMerge.value
          printRow.value.like="1"
          // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          dialogTableVisible.value=true
          break
        }
      }
    }
  },
@@ -457,9 +481,9 @@
  gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
    // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2
    if (hidePrintLabels=='true') {
      return button.code !== 'printLabel' && button.code !== 'printLabel2';
      return button.code !== 'printLabel' && button.code !== 'printLabel2' ;
    } else {
      return true; // 不隐藏任何按钮
      return true && button.code !=='printLike'; // 显示该按钮
    }
  })
}
@@ -569,7 +593,7 @@
      <template #header="{ close, titleId, titleClass }">
        <el-button v-print="printContent" @click="printNumber"  :icon="Printer" circle />
      </template>
      <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal"
      <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" :printLike="printRow.like"
                    style="width: 100%;height: 100%" />
    </el-dialog>