feat: add agent price

This commit is contained in:
Methapon Metanipat 2024-10-04 14:39:05 +07:00
parent bfc59d1d6f
commit c452f8b915

View file

@ -90,6 +90,7 @@ const { state: employeeFormState, currentFromDataEmployee } =
const { currentMyBranch } = storeToRefs(userBranch); const { currentMyBranch } = storeToRefs(userBranch);
const branchId = ref(''); const branchId = ref('');
const agentPrice = ref<boolean>(false);
const currentCustomerId = ref<string | undefined>(); const currentCustomerId = ref<string | undefined>();
const refreshImageState = ref(false); const refreshImageState = ref(false);
const emptyCreateDialog = ref(false); const emptyCreateDialog = ref(false);
@ -354,10 +355,16 @@ function triggerAddQuotationDialog() {
} }
function triggerQuotationDialog() { function triggerQuotationDialog() {
window.open( const params = new URLSearchParams();
`/quotation/add-quotation?branchId=${branchId.value}&customerBranchId=${quotationFormData.value.customerBranchId}&date=${Date.now()}`,
'_blank', params.set('branchId', branchId.value);
); params.set('customerBranchId', branchId.value);
params.set('date', Date.now().toString());
params.set('agentPrice', agentPrice.value.toString());
const query = params.toString();
window.open(`/quotation/add-quotation?${query}`, '_blank');
// TODO: form and state controll // TODO: form and state controll
} }
@ -863,6 +870,7 @@ watch(() => pageState.currentTab, fetchQuotationList);
on-create on-create
v-model:branch-id="branchId" v-model:branch-id="branchId"
v-model:customer-branch-id="quotationFormData.customerBranchId" v-model:customer-branch-id="quotationFormData.customerBranchId"
v-model:agent-price="agentPrice"
@add-customer="triggerSelectTypeCustomerd()" @add-customer="triggerSelectTypeCustomerd()"
/> />
</div> </div>