|
@@ -385,7 +385,7 @@ export default {
|
|
|
|
|
|
typeList: [{ name: '商品类型(请先选择所属店铺)', id: '' }],
|
|
|
typeIndex: 0,
|
|
|
- typeId: '1',
|
|
|
+ typeId: '',
|
|
|
typeDisabled: true,
|
|
|
|
|
|
shopList: [{ name: '商品名称(请先选择商品类型)', id: '' }],
|
|
@@ -409,9 +409,10 @@ export default {
|
|
|
|
|
|
Icon: '',
|
|
|
Imglist: [],
|
|
|
+ progressimgs: 0,
|
|
|
|
|
|
- price: 0.0,
|
|
|
- rateprice: 0.0,
|
|
|
+ price: 0.00,
|
|
|
+ rateprice: 0.00,
|
|
|
|
|
|
// -------------- 编辑分界线 ------------------------------------
|
|
|
|
|
@@ -524,10 +525,10 @@ export default {
|
|
|
if (rule) {
|
|
|
this.astrictDate.data.saleDay = rule.data.saleDay
|
|
|
? rule.data.saleDay
|
|
|
- : 0;
|
|
|
+ : 1;
|
|
|
this.astrictDate.data.saleNum = rule.data.saleNum
|
|
|
? rule.data.saleNum
|
|
|
- : 0;
|
|
|
+ : 1;
|
|
|
// 有效期模式
|
|
|
this.astrictDate.dateSetting = rule.data.dateSetting;
|
|
|
this.patterIndex = +rule.data.dateSetting;
|
|
@@ -572,9 +573,6 @@ export default {
|
|
|
this.getShopList()
|
|
|
}
|
|
|
},
|
|
|
- // onPageScroll (option) {
|
|
|
- // console.log(option);
|
|
|
- // },
|
|
|
methods: {
|
|
|
// 获取单个商品信息
|
|
|
async getShopBuyId (id) {
|
|
@@ -661,7 +659,7 @@ export default {
|
|
|
html: this.shopData.describ, //this.EditGoodsDetail.content为赋值内容。
|
|
|
});
|
|
|
})
|
|
|
- .exec(-1000)
|
|
|
+ .exec()
|
|
|
},
|
|
|
// -----------------------------------------------------------------
|
|
|
// 跳转到管理分类页面
|
|
@@ -786,14 +784,15 @@ export default {
|
|
|
this.shopList[0] = { name: this.shopData.name, id: '' };
|
|
|
this.shopIndex = 0
|
|
|
this.shopId = this.shopList[this.shopIndex].id;
|
|
|
- if (this.shopList[0].name === this.shopList[1].name) {
|
|
|
- this.shopList.length = 1
|
|
|
+ if (this.shopList.length != 1) {
|
|
|
+ if (this.shopList[0].name === this.shopList[1].name) {
|
|
|
+ this.shopList.length = 1
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
// 自营商品直接赋值
|
|
|
this.shopname = this.shopData.name;
|
|
|
}
|
|
|
-
|
|
|
this.loading = false;
|
|
|
}
|
|
|
}
|
|
@@ -834,6 +833,7 @@ export default {
|
|
|
},
|
|
|
subtractUser () {
|
|
|
if (this.astrictDate.data.saleDay <= 1) {
|
|
|
+ this.astrictDate.data.saleDay = 1
|
|
|
this.$mHelper.toast('最少一天');
|
|
|
return;
|
|
|
} else {
|
|
@@ -845,6 +845,7 @@ export default {
|
|
|
},
|
|
|
subtractDate () {
|
|
|
if (this.astrictDate.data.saleNum <= 1) {
|
|
|
+ this.astrictDate.data.saleNum = 1
|
|
|
this.$mHelper.toast('最少一张票');
|
|
|
return;
|
|
|
} else {
|
|
@@ -876,7 +877,9 @@ export default {
|
|
|
_self.Icon = res.fileID;
|
|
|
}
|
|
|
},
|
|
|
- fail: function (msg) { },
|
|
|
+ fail: function (msg) {
|
|
|
+ _self.$mHelper.toast('图标上传失败,请重新上传')
|
|
|
+ },
|
|
|
onUploadProgress: function (progressEvent) {
|
|
|
_self.progress = Math.round(
|
|
|
(progressEvent.loaded * 100) / progressEvent.total
|
|
@@ -919,7 +922,7 @@ export default {
|
|
|
},
|
|
|
success: (res) => {
|
|
|
_self.Imglist.push({url:res.fileID,uid:res.filePath})
|
|
|
- },
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -943,6 +946,11 @@ export default {
|
|
|
submitMesage () {
|
|
|
let _this = this;
|
|
|
|
|
|
+ if (this.progress > 0 && this.progress < 100) {
|
|
|
+ this.$mHelper.toast('您有图标正在上传,请在上传完成后提交内容!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
// 判断是否限制账号购买
|
|
|
if (this.showoperat) {
|
|
|
this.showoperat = '1';
|
|
@@ -953,7 +961,11 @@ export default {
|
|
|
}
|
|
|
let name = '';
|
|
|
if (this.typeProperty === 1) {
|
|
|
- name = this.shopList[this.shopIndex].name;
|
|
|
+ if (this.SHOPID) {
|
|
|
+ name = this.shopList[this.shopIndex].name
|
|
|
+ } else {
|
|
|
+ name = this.shopList[this.shopIndex].id;
|
|
|
+ }
|
|
|
} else if (this.typeProperty === 0) {
|
|
|
name = this.shopname;
|
|
|
}
|
|
@@ -983,7 +995,7 @@ export default {
|
|
|
this.$mHelper.toast('请输入商品划线价!');
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.expirationDate) {
|
|
|
+ if (this.expirationDate === '请选择商品过期日期') {
|
|
|
this.$mHelper.toast('请选择商品过期日期');
|
|
|
return;
|
|
|
}
|