| | |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | let rowClickIndex = ref(null) |
| | | let selectRecords = ref(null) |
| | | |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | |
| | | }) |
| | | |
| | | 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 |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | |
| | | destroy-on-close |
| | | title="流程卡打印" |
| | | style="width: 80%;height:75% "> |
| | | <PrintProcess |
| | | <PrintProcess :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | </div> |