|
@@ -105,7 +105,7 @@ export default {
|
|
|
priceType: 'TERMINAL_PRICE', // 售价类型
|
|
|
price: '', // 售价
|
|
|
hotFlag: undefined, // 是否是热销产品
|
|
|
- hotSort: ''// 热销产品优先级
|
|
|
+ hotSort: undefined// 热销产品优先级
|
|
|
},
|
|
|
// 必填项校验
|
|
|
rules: {
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
shopProductDetail({ shopProductSn: this.itemSn }).then(res => {
|
|
|
if (res.status == 200 && res.data) {
|
|
|
res.data.oldPrice = res.data.price
|
|
|
- res.data.hotSort = res.data.hotFlag == '0' ? '' : res.data.hotSort
|
|
|
+ res.data.hotSort = res.data.hotFlag == '0' ? undefined : res.data.hotSort
|
|
|
this.form = res.data
|
|
|
this.spinning = false
|
|
|
} else {
|
|
@@ -140,7 +140,7 @@ export default {
|
|
|
// 热销产品切换时清空数据
|
|
|
handleHotProduct (e) {
|
|
|
if (e == 0) {
|
|
|
- this.form.hotSort = ''
|
|
|
+ this.form.hotSort = undefined
|
|
|
}
|
|
|
},
|
|
|
// 保存
|
|
@@ -172,8 +172,8 @@ export default {
|
|
|
reSetForm () {
|
|
|
this.form.priceType = 'TERMINAL_PRICE'
|
|
|
this.form.price = ''
|
|
|
- this.form.hotFlag = 'undefined'
|
|
|
- this.form.hotSort = ''
|
|
|
+ this.form.hotFlag = undefined
|
|
|
+ this.form.hotSort = undefined
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
}
|
|
|
},
|