guoyuji
2024-05-31 3ee23fa2bfb5f90863a1e2579c882b4bae875aa3
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -10,10 +10,12 @@
import {VXETable} from "vxe-table";
import {toolbarButtonClickEvent} from "@/hook/mouseMove";
import PrintProcess from '@/views/pp/processCard/PrintProcess.vue'
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
//语言获取
const {t} = useI18n()
let router = useRouter()
const dialogTableVisible = ref(false)
const dialogTableVisibleLabel = ref(false)
let selectRecords = ref(null)
//定义滚动条高度
@@ -158,7 +160,8 @@
  toolbarConfig: {
    buttons: [
        {code: 'print', name: '打印', status: 'primary'},
        {code: 'print', name: '打印流程卡', status: 'primary'},
        {code: 'printLabel', name: '打印标签', status: 'primary'},
    ],
    // import: false,
    // export: true,
@@ -206,9 +209,25 @@
          }
          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
        }
        case 'printLabel': {
          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/PrintLabel', query: {printList: JSON.stringify(selectRecords)}})
          break
        }
@@ -271,6 +290,15 @@
      <PrintProcess :printList="selectRecords"
          style="width: 100%;height: 100%" />
    </el-dialog>
    <el-dialog
        v-model="dialogTableVisibleLabel"
        destroy-on-close
        title="标签打印"
        style="width: 80%;height:75% ">
      <PrintLabel :printList="selectRecords"
                    style="width: 100%;height: 100%" />
    </el-dialog>
  </div>
</template>
@@ -279,4 +307,5 @@
  width: 99%;
  height: 100%;
}
</style>