fix: กด สร้าง ใหม่ไม่ล้างค่า
This commit is contained in:
parent
bbfa9e8dbd
commit
60b852761d
1 changed files with 6 additions and 2 deletions
|
|
@ -101,7 +101,7 @@ const profileUrl = ref<string | null>('');
|
|||
|
||||
const groupName = ref<string>('งาน MOU');
|
||||
const dialogProductServiceType = ref<boolean>(false);
|
||||
const dialogTotalProduct = ref<boolean>(true);
|
||||
const dialogTotalProduct = ref<boolean>(false);
|
||||
const productMode = ref<'group' | 'type' | 'service' | 'product'>('group');
|
||||
|
||||
const productGroup = ref<ProductGroup[]>();
|
||||
|
|
@ -418,6 +418,8 @@ async function assignFormDataProductService(id: string) {
|
|||
}
|
||||
|
||||
function assignFormDataProduct(data: ProductList) {
|
||||
console.log(data.detail);
|
||||
|
||||
formDataProduct.value = {
|
||||
productTypeId: data.productTypeId,
|
||||
remark: data.remark,
|
||||
|
|
@ -425,7 +427,7 @@ function assignFormDataProduct(data: ProductList) {
|
|||
agentPrice: data.agentPrice,
|
||||
price: data.price,
|
||||
process: data.process,
|
||||
detail: data.detail,
|
||||
detail: data.detail === '' ? '-' : data.detail,
|
||||
name: data.name,
|
||||
code: data.code,
|
||||
image: undefined,
|
||||
|
|
@ -588,6 +590,7 @@ watch(currentStatus, async () => {
|
|||
icon="mdi-folder-multiple-plus"
|
||||
@click="
|
||||
() => {
|
||||
clearFormProduct();
|
||||
dialogProduct = true;
|
||||
}
|
||||
"
|
||||
|
|
@ -1048,6 +1051,7 @@ watch(currentStatus, async () => {
|
|||
@viewDetail="
|
||||
() => {
|
||||
currentIdProduct = i.id;
|
||||
infoProductEdit = false;
|
||||
assignFormDataProduct(i);
|
||||
dialogProductEdit = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue