fix: แก้ขนาดการแสดงเลือกสินค้า
This commit is contained in:
parent
65878708be
commit
d3c03ef233
1 changed files with 68 additions and 73 deletions
|
|
@ -1170,7 +1170,8 @@ watch(currentStatus, async () => {
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="product && product.length > 0"
|
v-if="product && product.length > 0"
|
||||||
class="row q-col-gutter-md flex q-pa-md"
|
class="row q-col-gutter-lg flex"
|
||||||
|
style="padding: 20px"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
:class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
|
:class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
|
||||||
|
|
@ -1375,16 +1376,8 @@ watch(currentStatus, async () => {
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div class="full-width">
|
||||||
style="
|
<div class="row items-center">
|
||||||
width: 75vw;
|
|
||||||
display: grid;
|
|
||||||
background: none;
|
|
||||||
grid-template-rows: auto;
|
|
||||||
gap: var(--size-3);
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="row items-center" style="max-height: 20%">
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1400,70 +1393,72 @@ watch(currentStatus, async () => {
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
<AppBox class="row q-gutter-md" no-padding>
|
<AppBox class="row">
|
||||||
<div
|
<div
|
||||||
class="co-2"
|
class="q-pa-xs"
|
||||||
v-for="i in (!!searchTotalProduct
|
:class="`${$q.screen.gt.sm ? 'col-3 ' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
|
||||||
? resultSearchProduct
|
v-for="i in (!!searchTotalProduct
|
||||||
: product
|
? resultSearchProduct
|
||||||
)?.filter((i) => {
|
: product
|
||||||
if (i.status === 'INACTIVE') {
|
)?.filter((i) => {
|
||||||
return false;
|
if (i.status === 'INACTIVE') {
|
||||||
}
|
return false;
|
||||||
return true;
|
|
||||||
})"
|
|
||||||
:key="i.id"
|
|
||||||
>
|
|
||||||
<TotalProductCardComponent
|
|
||||||
:index="selectProduct.findIndex((v) => v.id === i.id)"
|
|
||||||
:isAddProduct="!!selectProduct.find((v) => v.id === i.id)"
|
|
||||||
:isSelected="true"
|
|
||||||
:data="i"
|
|
||||||
:code="i.code"
|
|
||||||
:price="i.price"
|
|
||||||
:process="i.process"
|
|
||||||
:id="i.id"
|
|
||||||
typeProduct="product"
|
|
||||||
:title="i.name"
|
|
||||||
:status="i.status === 'INACTIVE' ? true : false"
|
|
||||||
@menuViewDetail="
|
|
||||||
() => {
|
|
||||||
currentIdProduct = i.id;
|
|
||||||
assignFormDataProduct(i);
|
|
||||||
dialogProductEdit = true;
|
|
||||||
}
|
}
|
||||||
"
|
return true;
|
||||||
@menuEdit="
|
})"
|
||||||
() => {
|
:key="i.id"
|
||||||
currentIdProduct = i.id;
|
>
|
||||||
infoProductEdit = true;
|
<TotalProductCardComponent
|
||||||
assignFormDataProduct(i);
|
:index="selectProduct.findIndex((v) => v.id === i.id)"
|
||||||
dialogProductEdit = true;
|
:isAddProduct="!!selectProduct.find((v) => v.id === i.id)"
|
||||||
}
|
:isSelected="true"
|
||||||
"
|
:data="i"
|
||||||
@viewDetail="
|
:code="i.code"
|
||||||
() => {
|
:price="i.price"
|
||||||
currentIdProduct = i.id;
|
:process="i.process"
|
||||||
infoProductEdit = false;
|
:id="i.id"
|
||||||
assignFormDataProduct(i);
|
typeProduct="product"
|
||||||
dialogProductEdit = true;
|
:title="i.name"
|
||||||
}
|
:status="i.status === 'INACTIVE' ? true : false"
|
||||||
"
|
@menuViewDetail="
|
||||||
@select="
|
() => {
|
||||||
(data) => {
|
currentIdProduct = i.id;
|
||||||
const tempValue = selectProduct.find((v) => v.id === i.id);
|
assignFormDataProduct(i);
|
||||||
|
dialogProductEdit = true;
|
||||||
if (tempValue) {
|
|
||||||
selectProduct = selectProduct.filter((v) => v.id !== i.id);
|
|
||||||
} else {
|
|
||||||
selectProduct.push(data);
|
|
||||||
}
|
}
|
||||||
}
|
"
|
||||||
"
|
@menuEdit="
|
||||||
/>
|
() => {
|
||||||
</div>
|
currentIdProduct = i.id;
|
||||||
</AppBox>
|
infoProductEdit = true;
|
||||||
|
assignFormDataProduct(i);
|
||||||
|
dialogProductEdit = true;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@viewDetail="
|
||||||
|
() => {
|
||||||
|
currentIdProduct = i.id;
|
||||||
|
infoProductEdit = false;
|
||||||
|
assignFormDataProduct(i);
|
||||||
|
dialogProductEdit = true;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@select="
|
||||||
|
(data) => {
|
||||||
|
const tempValue = selectProduct.find((v) => v.id === i.id);
|
||||||
|
|
||||||
|
if (tempValue) {
|
||||||
|
selectProduct = selectProduct.filter((v) => v.id !== i.id);
|
||||||
|
} else {
|
||||||
|
selectProduct.push(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</AppBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</FormDialog>
|
</FormDialog>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue