| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import DeliveryPrinting from "@/views/sd/delivery/DeliveryPrinting.vue"; |
| | | import footSum from "@/hook/footSum" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import PrintSheet1 from "@/components/sd/delivery/PrintSheet1.vue"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | const dialogTableVisible = ref(false) |
| | | let sheetIndex = ref(-1) |
| | | let rowClickIndex = ref(null) |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | |
| | | case 'sheet1': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | console.log(rowClickIndex.value.deliveryId) |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=1 |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'getProcessList', name: t('basicData.print'), prefixIcon: 'vxe-icon-file-txt', visible: true} |
| | | { code: 'sheet1', name: t('basicData.print'), prefixIcon: 'vxe-icon-file-txt', visible: true}, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | } |
| | | |
| | | }) |
| | | const printContent = ref({ |
| | | id: 'child', |
| | | |
| | | }) |
| | | |
| | | |
| | | </script> |
| | |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | v-if="userStore.user.permissions.indexOf('selectDelivery.edit') > -1" |
| | | link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button> |
| | | <!-- <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button>--> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |
| | | <template #reference> |
| | | <el-button :disabled="row.deliveryState===2" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | |
| | | </vxe-grid> |
| | | |
| | | <el-dialog |
| | | :key="dialogKey" |
| | | id="print" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | id="deliveryPrinting" |
| | | style="width: 100%;height:100%;margin-top: 0; "> |
| | | <DeliveryPrinting |
| | | :deliveryId="rowClickIndex.deliveryId" |
| | | style="width: 100%;height: 100%;" /> |
| | | style="width: 75%;height:75% " |
| | | > |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" :icon="Printer" circle /> |
| | | </template> |
| | | <print-sheet1 id="child" v-if="sheetIndex===1" :deliveryId="rowClickIndex.deliveryId" /> |
| | | |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | :deep(.el-tabs__content) { |
| | | width: 100%; |
| | | height: 86%; |
| | | } |
| | | .el-tab-pane{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | :deep(#print .el-dialog__body){ |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | #child{ |
| | | width:100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | | |