Commit 5ae00dc2 by zhangxw

bug修复

1 parent b1d21472
......@@ -11,7 +11,7 @@
<th><span class="required">*</span>套餐类型</th>
<th><span class="required">*</span>套餐名称</th>
<th><span class="required">*</span>套餐内容</th>
<th><span class="required">*</span>价格</th>
<th><span class="required">*</span>价格/元</th>
<th><span class="required">*</span>套餐简介</th>
<th><span class="required">*</span>话术介绍</th>
<th>操作</th>
......@@ -48,7 +48,7 @@
class="price-input"
@input="priceInput($event, pindex, 'marketPrice')"
v-model="pItem.marketPrice"
placeholder="请输入价格"
placeholder="请输入"
></el-input>
</div>
<div>
......@@ -57,7 +57,7 @@
class="price-input"
@input="priceInput($event, pindex, 'packagePrice')"
v-model="pItem.packagePrice"
placeholder="请输入价格"
placeholder="请输入"
></el-input>
</div>
<div>
......@@ -124,6 +124,7 @@
import { limitPrice } from '@/common/format'
import BigNumber from 'bignumber.js'
import { packageRecommendDetail, updatePackageRecommend } from '@api/contentManager'
import { deepClone } from "@/common/util"
export default{
name: 'PackageRecommend',
props: {
......@@ -168,7 +169,7 @@ export default{
})
},
initFormData() {
this.infoList = [this.initObj]
this.infoList = [deepClone(this.initObj)]
},
priceInput(newValue, index, key) {
newValue = newValue.replace(/[^\d.]/g, '')
......@@ -184,7 +185,7 @@ export default{
},
// 新增一行
handleAdd(i) {
if (i < 0) return this.infoList.push(this.initObj)
if (i < 0) return this.infoList.push(deepClone(this.initObj))
if (this.infoList?.length >= 10) return this.$message.error('最多支持新增10个套餐')
const result = this.validateForm(i)
if (result) this.infoList.push(result)
......@@ -228,7 +229,7 @@ export default{
this.$message.error(`${this.infoList[i]?.name}优惠金额≤0,请核实后重新录入`)
return false
}
return this.initObj
return deepClone(this.initObj)
},
handleDel(i) {
this.infoList.splice(i, 1)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!