库存商品修改

This commit is contained in:
zjf committed 2025-08-21 17:34:18 +08:00
1 parent 6517d33d1c
commit 017cba3a05
4 files changed
+34 -22

No files matched your search

@@ -35,7 +35,7 @@
<template v-for="item in unitSelectOptions">
<el-option :label="item.unit" :value="item.id">
<span class="float-left">单位:{{ item.unit }}</span>
<span class="float-right ml-4">口味:{{ item.taste }}</span>
<span class="float-right ml-4">口味:{{ item.tasteName }}</span>
</el-option>
</template>
</el-select>
@@ -45,9 +45,9 @@
<span v-else style="color: #c0c4cf">请选择</span>
</template>
</vxe-column>
<vxe-column field="taste" title="口味">
<vxe-column field="tasteName" title="口味">
<template #default="{ row }">
{{ unitSelectOptions?.find((item: rowVU) => item.id === row.unitId)?.taste }}
{{ unitSelectOptions?.find((item: rowVU) => item.id === row.unitId)?.tasteName }}
</template>
</vxe-column>
<vxe-column field="barCode" title="辅助条码" :edit-render="{ autoFocus: 'input', placeholder: '请输入' }">
@@ -74,7 +74,7 @@ export interface rowVC {
id: string
unitId: string
unit: string
taste: string
tasteName: string
barCode: string
}
@@ -96,7 +96,7 @@ const pushEvent = () => {
id: "tmp_" + nanoid(5),
unitId: "",
unit: "",
taste: "",
tasteName: "",
barCode: "",
}
auxiliaryCodeList.value.push(newRow)
@@ -132,7 +132,7 @@ watch(
const handleUnitIdChange = (unitId: string, rowIndex: number) => {
const unitItem = unitSelectOptions.value?.find((item: rowVU) => item.id == unitId)
;(auxiliaryCodeList.value[rowIndex] as any).unit = unitItem?.unit
;(auxiliaryCodeList.value[rowIndex] as any).taste = unitItem?.taste
;(auxiliaryCodeList.value[rowIndex] as any).tasteName = unitItem?.tasteName
}
// 校验可编辑表格 成功返回 true 失败返回 false
@@ -1,18 +1,28 @@
<template>
<el-row class="mb-2">
<el-button type="primary" @click="pushEvent()">新增</el-button>
<el-tooltip effect="light" placement="right">
<template #content>
<el-alert class="w-[500px] h-24" type="warning" show-icon :closable="false">
<p>
注:内装数据必须为该商品的最小售卖的基本单位,否则无法完成库存数量转换,影响erp库存自动扣减操作。
例如:一瓶矿泉水内装填'1',为售卖的最小基础单位,如果想按箱卖,在继续添加包装单位为箱,内装为24
</p>
</el-alert>
</template>
<el-icon class="text-xl my-auto mx-4 text-yellow-600"><WarningFilled /></el-icon>
</el-tooltip>
<el-button type="primary" @click="tasteFormRef.openDialog()">新增口味</el-button>
<el-tooltip effect="light" placement="right">
<template #content>
<el-alert class="w-[500px] h-24" type="warning" show-icon :closable="false">
<p>
注:内装数据必须为该商品的最小售卖的基本单位,否则无法完成库存数量转换,影响erp库存自动扣减操作。
例如:一瓶矿泉水内装填'1',为售卖的最小基础单位,如果想按箱卖,在继续添加包装单位为箱,内装为24
</p>
</el-alert>
</template>
<el-icon class="text-xl my-auto mx-4 text-yellow-600"><WarningFilled /></el-icon>
</el-tooltip>
<el-button type="success" @click="tasteFormRef.openDialog()">口味管理</el-button>
<el-tooltip effect="light" placement="right">
<template #content>
<el-alert class="w-[500px] h-24" type="warning" show-icon :closable="false">
<p>
注:口味管理则可以实现通过对该商品的口味划分+设置改口味的基础库存,以此实现对某个的口味商品进行不同包装形式售卖
</p>
</el-alert>
</template>
<el-icon class="text-xl my-auto mx-4 text-yellow-600"><WarningFilled /></el-icon>
</el-tooltip>
</el-row>
<vxe-table
@@ -143,9 +153,8 @@ export interface rowVU {
costPrice: number
isBase?: boolean | null
flag?: string
taste?: string
tasteId: string
tasteName?: string
tasteId: string
}
export interface TasteItem {
id: string
@@ -219,7 +228,7 @@ const pushEvent = (row?: rowVU | undefined) => {
retailPrice: 0.01,
promotionPrice: 0,
costPrice: 0,
taste: "",
tasteName: "",
tasteId: "",
}
Object.assign(newRow, row)
@@ -22,8 +22,11 @@
<span class="text-lg">
注:此处库存数应该填写最小售卖单位的总库存,否则无法换算成完整的库存扣减。每卖出一个包装形式的商品,都会进行总库存数 -
内装数,从而进行多种包装形式的售卖。
<br>
期初库存指的是该商品还未录入到本系统时所剩库存数,即初始库存
</span>
</el-alert>
</el-row>
</template>
@@ -155,7 +155,7 @@
<upload-excel-update ref="excelUploadUpdateRef" title="覆盖导入库存商品"
url="/supermarket/supermarketSpu/importNewUpdate" @refreshDataList="refreshDataList" />
<upload-excel ref="excelUploadPd" title="导入库存盘点" url="/supermarket/supermarketSpu/importPD"
<upload-excel ref="excelUploadPd" title="导入库存盘点" url="/supermarket/supermarketSpu/importPDNew"
@refreshDataList="refreshDataList" />
</div>
</template>