chore: install prettier
This commit is contained in:
@@ -1,43 +1,44 @@
|
||||
<script setup>
|
||||
import TransactionDetail from '@/components/transaction/TransactionDetail.vue';
|
||||
import TransactionDetail from "@/components/transaction/TransactionDetail.vue";
|
||||
|
||||
const props = defineProps({
|
||||
transaction__code: String,
|
||||
});
|
||||
|
||||
const { $exportpdf, $getdata, $snackbar, $store } = useNuxtApp();
|
||||
const { dealer} = $store;
|
||||
const { dealer } = $store;
|
||||
const txn = ref(null);
|
||||
const txndetails = ref(null);
|
||||
const showModal = ref(null);
|
||||
|
||||
function openChangeCustomerModal() {
|
||||
showModal.value = {
|
||||
title: 'Đổi khách hàng',
|
||||
height: '40vh',
|
||||
width: '50%',
|
||||
component: 'transaction/ChangeCustomerModal',
|
||||
vbind: { transactionId: txn.value.id }
|
||||
}
|
||||
title: "Đổi khách hàng",
|
||||
height: "40vh",
|
||||
width: "50%",
|
||||
component: "transaction/ChangeCustomerModal",
|
||||
vbind: { transactionId: txn.value.id },
|
||||
};
|
||||
}
|
||||
|
||||
function print() {
|
||||
const fileName = `Giao-dich-${props.transaction__code}`;
|
||||
const docId = 'print-area';
|
||||
$exportpdf(docId, fileName, 'a4', 'landscape');
|
||||
$snackbar('Đang xuất PDF...', { type: 'is-info' });
|
||||
const docId = "print-area";
|
||||
$exportpdf(docId, fileName, "a4", "landscape");
|
||||
$snackbar("Đang xuất PDF...", { type: "is-info" });
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const fetchedTxn = await $getdata('transaction', { code: props.transaction__code }, undefined, true);
|
||||
const fetchedTxn = await $getdata("transaction", { code: props.transaction__code }, undefined, true);
|
||||
txn.value = fetchedTxn;
|
||||
|
||||
const fetchedTxndetails = await $getdata('reservation', undefined, {
|
||||
|
||||
const fetchedTxndetails = await $getdata("reservation", undefined, {
|
||||
filter: {
|
||||
transaction__code: props.transaction__code
|
||||
transaction__code: props.transaction__code,
|
||||
},
|
||||
sort: 'create_time',
|
||||
values: 'id,code,date,amount,amount_remaining,amount_received,due_date,transaction,customer_old__fullname,customer_new__fullname,transaction__code,phase,phase__name,creator,creator__fullname,status,status__name,approver,approver__fullname,approve_time,create_time,update_time'
|
||||
sort: "create_time",
|
||||
values:
|
||||
"id,code,date,amount,amount_remaining,amount_received,due_date,transaction,customer_old__fullname,customer_new__fullname,transaction__code,phase,phase__name,creator,creator__fullname,status,status__name,approver,approver__fullname,approve_time,create_time,update_time",
|
||||
});
|
||||
txndetails.value = fetchedTxndetails;
|
||||
});
|
||||
@@ -77,15 +78,21 @@ onMounted(async () => {
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id="ignore" class="column is-narrow is-flex is-align-items-center is-gap-2">
|
||||
<button
|
||||
<div
|
||||
id="ignore"
|
||||
class="column is-narrow is-flex is-align-items-center is-gap-2"
|
||||
>
|
||||
<button
|
||||
v-if="txn?.phase === 4 && !dealer && $getEditRights('edit', { code: 'transaction', category: 'topmenu' })"
|
||||
@click="openChangeCustomerModal"
|
||||
@click="openChangeCustomerModal"
|
||||
class="button is-link"
|
||||
>
|
||||
Đổi khách hàng
|
||||
</button>
|
||||
<button @click="print" class="button is-light">
|
||||
<button
|
||||
@click="print"
|
||||
class="button is-light"
|
||||
>
|
||||
In thông tin
|
||||
</button>
|
||||
</div>
|
||||
@@ -99,9 +106,9 @@ onMounted(async () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Modal
|
||||
v-if="showModal"
|
||||
v-bind="showModal"
|
||||
@close="showModal = undefined"
|
||||
<Modal
|
||||
v-if="showModal"
|
||||
v-bind="showModal"
|
||||
@close="showModal = undefined"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user