Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-03-29 22:41:02 +03:00
parent 96ede55936
commit 05c6103a3a
10 changed files with 629 additions and 92 deletions

View File

@@ -850,7 +850,8 @@ function toggleAllDetails() {
function buildLevel3Rows(grp3) {
const byKey = new Map()
const gk = activeGrpKey.value || 'tak'
const gk = activeGrpKey.value
if (!gk) return []
for (const item of grp3.items || []) {
const model = String(item.Urun_Kodu || '').trim()
@@ -1045,6 +1046,7 @@ async function fetchStockByCode() {
if (!orderStore.schemaMap || !Object.keys(orderStore.schemaMap).length) {
orderStore.initSchemaMap()
}
await orderStore.ensureProductSizeMatchRules()
const res = await api.get('/product-stock-query', { params: { code } })
const list = Array.isArray(res?.data) ? res.data : []
@@ -1059,14 +1061,27 @@ async function fetchStockByCode() {
const grpKey = detectBedenGroup(
list.map((x) => x?.Beden || ''),
first?.URUN_ANA_GRUBU || '',
first?.YETISKIN_GARSON || ''
first?.KATEGORI || first?.YETISKIN_GARSON || '',
first?.YETISKIN_GARSON || '',
first?.URUN_ALT_GRUBU || ''
)
const schemaMap = Object.keys(orderStore.schemaMap || {}).length
? orderStore.schemaMap
: storeSchemaByKey
activeGrpKey.value = grpKey || 'tak'
activeSchema.value = schemaMap?.[grpKey] || storeSchemaByKey.tak
if (!grpKey || !schemaMap?.[grpKey]) {
rawRows.value = []
openState.value = {}
errorMessage.value = 'Beden grubu eşleşmesi bulunamadı.'
$q.notify({
type: 'negative',
position: 'top-right',
message: 'Beden grubu eşleşmesi bulunamadı (kategori/ana grup/alt grup).'
})
return
}
activeGrpKey.value = grpKey
activeSchema.value = schemaMap[grpKey]
rawRows.value = list
productImageCache.value = {}
@@ -1308,7 +1323,8 @@ onUnmounted(() => {
productImageBlobUrls.value = []
})
onMounted(() => {
onMounted(async () => {
await orderStore.ensureProductSizeMatchRules()
loadProductOptions()
window.addEventListener('mousemove', onFullscreenMouseMove)
window.addEventListener('mouseup', onFullscreenMouseUp)