超市商品管理的修改
This commit is contained in:
1 parent
4e02c9bbea
commit
b70c1549ba
2 files changed
+4
-5
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="w-full h-full p-1">
|
||||
<el-row class="my-1">
|
||||
<el-button type="primary" @click="pushEvent">新增</el-button>
|
||||
<el-button type="primary" @click="pushEvent()">新增</el-button>
|
||||
<el-button @click="removeSelectRowEvent">删除选中</el-button>
|
||||
<el-tooltip effect="light" placement="right">
|
||||
<template #content>
|
||||
@@ -146,7 +146,7 @@ const validRules = {
|
||||
}
|
||||
|
||||
// 底部表格行新增
|
||||
const pushEvent = (row?: rowVU | null) => {
|
||||
const pushEvent = (row?: rowVU | undefined) => {
|
||||
const newRow = {} as rowVU
|
||||
if (row) {
|
||||
Object.assign(newRow, row)
|
||||
@@ -166,7 +166,6 @@ const pushEvent = (row?: rowVU | null) => {
|
||||
}
|
||||
Object.assign(newRow, row)
|
||||
}
|
||||
|
||||
packageUnitList.value.push(newRow)
|
||||
nextTick(() => {
|
||||
const $table = editableTableRef.value
|
||||
|
||||
@@ -206,7 +206,7 @@ const usePackageUnitList = () => {
|
||||
item.retailPrice = storePrice(item.retailPrice)
|
||||
if (item.isNew) {
|
||||
item.id = ""
|
||||
delete item.isNew
|
||||
// delete item.isNew
|
||||
}
|
||||
return item
|
||||
})
|
||||
@@ -218,7 +218,7 @@ const useAuxiliaryCode = () => {
|
||||
return smErpAuxiliaryCodeEntityList
|
||||
.filter((item: rowVC) => item.unitId)
|
||||
.map((item: rowVC) => {
|
||||
const curPackageUnitItem = form.smErpUnitEntityList.find((unitItem: any) => unitItem.id === item.unitId)
|
||||
const curPackageUnitItem = form.smErpUnitEntityList.find((unitItem: any) => unitItem.id == item.unitId)
|
||||
console.log(form.smErpUnitEntityList)
|
||||
|
||||
if (item.isNew) {
|
||||
|
||||
Reference in new issue
Block a user