chore: clean
This commit is contained in:
parent
0a832974f5
commit
3e7755f6dc
1 changed files with 6 additions and 34 deletions
|
|
@ -2,17 +2,8 @@
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useRouter } from 'vue-router';
|
||||
import {
|
||||
computed,
|
||||
nextTick,
|
||||
onBeforeMount,
|
||||
onMounted,
|
||||
reactive,
|
||||
ref,
|
||||
watch,
|
||||
} from 'vue';
|
||||
import { dialog, dialogCheckData } from 'stores/utils';
|
||||
import { computed, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||
import { dialogCheckData } from 'stores/utils';
|
||||
import { quotationProductTree } from './utils';
|
||||
|
||||
// NOTE: Import stores
|
||||
|
|
@ -21,7 +12,6 @@ import { useEmployeeForm } from 'src/pages/03_customer-management/form';
|
|||
import useProductServiceStore from 'stores/product-service';
|
||||
import { baseUrl, waitAll } from 'src/stores/utils';
|
||||
import useCustomerStore from 'stores/customer';
|
||||
import useEmployeeStore from 'stores/employee';
|
||||
import useOptionStore from 'stores/options';
|
||||
import { useQuotationForm } from './form';
|
||||
import useOcrStore from 'stores/ocr';
|
||||
|
|
@ -36,12 +26,10 @@ import {
|
|||
ProductGroup,
|
||||
Product,
|
||||
Service,
|
||||
Work,
|
||||
} from 'src/stores/product-service/types';
|
||||
|
||||
// NOTE: Import Components
|
||||
import FormEmployeePassport from 'components/03_customer-management/FormEmployeePassport.vue';
|
||||
import BasicInformation from 'components/03_customer-management/employee/BasicInformation.vue';
|
||||
import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa.vue';
|
||||
import FormReferDocument from 'src/components/05_quotation/FormReferDocument.vue';
|
||||
import { UploadFileGroup, noticeJobEmployment } from 'components/upload-file';
|
||||
|
|
@ -63,12 +51,10 @@ import ProductServiceForm from './ProductServiceForm.vue';
|
|||
import QuotationFormInfo from './QuotationFormInfo.vue';
|
||||
import ProfileBanner from 'components/ProfileBanner.vue';
|
||||
import DialogForm from 'components/DialogForm.vue';
|
||||
import SideMenu from 'components/SideMenu.vue';
|
||||
import {
|
||||
uploadFileListEmployee,
|
||||
columnsAttachment,
|
||||
} from 'src/pages/03_customer-management/constant';
|
||||
import { group } from 'node:console';
|
||||
import { precisionRound } from 'src/utils/arithmetic';
|
||||
import { useConfigStore } from 'src/stores/config';
|
||||
|
||||
|
|
@ -87,18 +73,15 @@ type Node = {
|
|||
};
|
||||
|
||||
type ProductGroupId = string;
|
||||
type Id = string;
|
||||
|
||||
const configStore = useConfigStore();
|
||||
const productServiceStore = useProductServiceStore();
|
||||
const employeeFormStore = useEmployeeForm();
|
||||
const customerStore = useCustomerStore();
|
||||
const quotationForm = useQuotationForm();
|
||||
const employeeStore = useEmployeeStore();
|
||||
const optionStore = useOptionStore();
|
||||
const { t, locale } = useI18n();
|
||||
const { locale } = useI18n();
|
||||
const ocrStore = useOcrStore();
|
||||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
|
||||
const {
|
||||
|
|
@ -113,10 +96,7 @@ const { data: config } = storeToRefs(configStore);
|
|||
|
||||
const refSelectZoneEmployee = ref<InstanceType<typeof SelectZone>>();
|
||||
const mrz = ref<Awaited<ReturnType<typeof parseResultMRZ>>>();
|
||||
const selectedBranchIssuer = ref('');
|
||||
const selectedCustomer = ref('');
|
||||
const toggleWorker = ref(true);
|
||||
const rows = ref<Node[]>([]);
|
||||
const branchId = ref('');
|
||||
const currentQuotationId = ref<string | undefined>(undefined);
|
||||
const date = ref();
|
||||
|
|
@ -172,7 +152,6 @@ const summaryPrice = computed(() =>
|
|||
),
|
||||
);
|
||||
|
||||
const quotationNo = ref('');
|
||||
const payBank = ref('');
|
||||
|
||||
const pageState = reactive({
|
||||
|
|
@ -197,14 +176,7 @@ const productGroup = ref<ProductGroup[]>([]);
|
|||
const { state: employeeFormState, currentFromDataEmployee } =
|
||||
storeToRefs(employeeFormStore);
|
||||
|
||||
const product = ref<Record<Id, Product>>({});
|
||||
const service = ref<Record<Id, Service>>({});
|
||||
|
||||
const selectedGroupSub = ref<'product' | 'service' | null>(null);
|
||||
const selectedGroup = ref<ProductGroup | null>(null);
|
||||
|
||||
const selectedProductServiceId = ref('');
|
||||
|
||||
const formDataEmployee = ref<
|
||||
EmployeeWorker & {
|
||||
attachment?: {
|
||||
|
|
@ -249,7 +221,7 @@ async function assignToProductServiceList() {
|
|||
vat: v.vat || 0,
|
||||
pricePerUnit: v.pricePerUnit || 0,
|
||||
discount: v.discount || 0,
|
||||
amount: v.discount || 0,
|
||||
amount: v.amount || 0,
|
||||
product: v.product,
|
||||
work: v.work || null,
|
||||
service: v.service || null,
|
||||
|
|
@ -623,7 +595,7 @@ watch(
|
|||
v-model:branch-id="branchId"
|
||||
v-model:customer-branch-id="quotationFormData.customerBranchId"
|
||||
:readonly="readonly"
|
||||
@add-customer="triggerSelectTypeCustomerd()"
|
||||
@add-customer=""
|
||||
/>
|
||||
</header>
|
||||
|
||||
|
|
@ -824,7 +796,7 @@ watch(
|
|||
:class="{ 'full-height': $q.screen.gt.xs }"
|
||||
>
|
||||
<QuotationFormInfo
|
||||
:quotation-no="quotationFull && quotationFull.code"
|
||||
:quotation-no="(quotationFull && quotationFull.code) || ''"
|
||||
v-model:urgent="quotationFormData.urgent"
|
||||
v-model:actor="quotationFormData.actorName"
|
||||
v-model:work-name="quotationFormData.workName"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue