|
| 1 | +<!-- |
| 2 | +ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution |
| 3 | +Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com |
| 4 | +Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt |
| 5 | +This program is free software: you can redistribute it and/or modify |
| 6 | +it under the terms of the GNU General Public License as published by |
| 7 | +the Free Software Foundation, either version 3 of the License, or |
| 8 | +(at your option) any later version. |
| 9 | + |
| 10 | +This program is distributed in the hope that it will be useful, |
| 11 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +GNU General Public License for more details. |
| 14 | + |
| 15 | +You should have received a copy of the GNU General Public License |
| 16 | +along with this program. If not, see <https:www.gnu.org/licenses/>. |
| 17 | +--> |
| 18 | + |
| 19 | +<template> |
| 20 | + <el-button |
| 21 | + v-if="!isEmptyValue(process) && isDocument" |
| 22 | + plain |
| 23 | + type="info" |
| 24 | + size="small" |
| 25 | + style="margin-left: 5px;padding-top: 1px;padding-right: 5px;padding-bottom: 8px;padding-left: 5px;" |
| 26 | + @click="printProcess()" |
| 27 | + > |
| 28 | + <svg-icon |
| 29 | + style="font-size: 21px;" |
| 30 | + icon-class="print" |
| 31 | + /> |
| 32 | + </el-button> |
| 33 | +</template> |
| 34 | + |
| 35 | +<script> |
| 36 | +import { defineComponent } from '@vue/composition-api' |
| 37 | + |
| 38 | +import store from '@/store' |
| 39 | + |
| 40 | +export default defineComponent({ |
| 41 | + name: 'PrintProcess', |
| 42 | + |
| 43 | + props: { |
| 44 | + parentUuid: { |
| 45 | + type: [String, Number], |
| 46 | + required: false |
| 47 | + }, |
| 48 | + containerManager: { |
| 49 | + type: Object, |
| 50 | + required: true |
| 51 | + }, |
| 52 | + tabAttributes: { |
| 53 | + type: Object, |
| 54 | + default: () => ({}) |
| 55 | + } |
| 56 | + }, |
| 57 | + |
| 58 | + setup(props) { |
| 59 | + /** |
| 60 | + * Const |
| 61 | + */ |
| 62 | + const containerUuid = props.tabAttributes.uuid |
| 63 | + const { process } = props.tabAttributes |
| 64 | + const { isDocument } = props.tabAttributes |
| 65 | + /** |
| 66 | + * Methods |
| 67 | + */ |
| 68 | + |
| 69 | + function printProcess() { |
| 70 | + const { uuid } = process |
| 71 | + store.commit('setSelectProcessWindows', uuid) |
| 72 | + |
| 73 | + store.commit('setShowedModalDialog', { |
| 74 | + parentUuid: containerUuid, |
| 75 | + containerUuid: uuid, |
| 76 | + isShowed: true |
| 77 | + }) |
| 78 | + } |
| 79 | + return { |
| 80 | + // Const |
| 81 | + process, |
| 82 | + isDocument, |
| 83 | + // Methods |
| 84 | + printProcess |
| 85 | + } |
| 86 | + } |
| 87 | +}) |
| 88 | +</script> |
0 commit comments