guoyuji
2024-04-23 8449b7205be9e73ddd353f9835a40fd1d72462d4
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -14,7 +14,7 @@
const {t} = useI18n()
let router = useRouter()
const dialogTableVisible = ref(false)
let rowClickIndex = ref(null)
let selectRecords = ref(null)
//定义滚动条高度
let scrollTop = ref(null)
@@ -185,17 +185,34 @@
})
const gridEvents = {
  async toolbarButtonClick({code}) {
  toolbarButtonClick ({ code}) {
    const $grid = xGrid.value
     selectRecords = $grid.getCheckboxRecords()
    if ($grid) {
      switch (code) {
        case 'print': {
          const $table = xGrid.value
          const selectRecords = $table.getCheckboxRecords()
          console.log(selectRecords.order_id)
          dialogTableVisible.value = true
          return;
          console.log( selectRecords)
          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 + "|"
            }
          }
          router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}})
          // let routeData = router.resolve({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}});
          // window.open(routeData.href, '_blank');
          //dialogTableVisible.value = true
          break
        }
      }
    }
  },
@@ -252,7 +269,7 @@
        destroy-on-close
        title="流程卡打印"
        style="width: 80%;height:75% ">
      <PrintProcess
      <PrintProcess :printList="selectRecords"
          style="width: 100%;height: 100%" />
    </el-dialog>
  </div>