|
@@ -433,11 +433,7 @@ export default {
|
|
|
|
|
|
// 商品库存
|
|
// 商品库存
|
|
shopNumList: [
|
|
shopNumList: [
|
|
- {
|
|
|
|
- id: '0',
|
|
|
|
- name: '无限库存模式',
|
|
|
|
- know: '售卖商品不计算库存,无限售卖。',
|
|
|
|
- },
|
|
|
|
|
|
+ {id: '0',name: '无限库存模式',know: '售卖商品不计算库存,无限售卖。'},
|
|
{ id: '1', name: '限日库存模式', know: '每日固定库存售卖。' },
|
|
{ id: '1', name: '限日库存模式', know: '每日固定库存售卖。' },
|
|
{ id: '2', name: '限总库存模式', know: '总库存限制,卖完为止。' },
|
|
{ id: '2', name: '限总库存模式', know: '总库存限制,卖完为止。' },
|
|
],
|
|
],
|
|
@@ -478,9 +474,9 @@ export default {
|
|
uni.removeStorageSync('Id');
|
|
uni.removeStorageSync('Id');
|
|
},
|
|
},
|
|
onShow () {
|
|
onShow () {
|
|
- // if (this.storeId != '') {
|
|
|
|
- // this.getLine(this.storeId)
|
|
|
|
- // }
|
|
|
|
|
|
+ if (this.storeId != '') {
|
|
|
|
+ this.getLine(this.storeId)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onReady () {
|
|
onReady () {
|
|
myCloud = uniCloud.init({
|
|
myCloud = uniCloud.init({
|
|
@@ -489,11 +485,11 @@ export default {
|
|
clientSecret: '8nOzV70edtpCd0El6qce3g==',
|
|
clientSecret: '8nOzV70edtpCd0El6qce3g==',
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onLoad () {
|
|
|
|
- this.SHOPID = uni.getStorageSync('Id');
|
|
|
|
-
|
|
|
|
- if (this.SHOPID) {
|
|
|
|
- this.getShopBuyId(this.SHOPID).then(() => {
|
|
|
|
|
|
+ onLoad ( option ) {
|
|
|
|
+
|
|
|
|
+ if (option.id != 'undefined') {
|
|
|
|
+ this.SHOPID = option.id
|
|
|
|
+ this.getShopBuyId(option.id).then(() => {
|
|
this.getShopList().then(() => {
|
|
this.getShopList().then(() => {
|
|
this.getShopName(this.typeId, this.storeId);
|
|
this.getShopName(this.typeId, this.storeId);
|
|
});
|
|
});
|
|
@@ -601,6 +597,7 @@ export default {
|
|
},
|
|
},
|
|
// 库存模式
|
|
// 库存模式
|
|
shopNumChange (e) {
|
|
shopNumChange (e) {
|
|
|
|
+ console.log(e);
|
|
for (let i = 0; i < this.shopNumList.length; i++) {
|
|
for (let i = 0; i < this.shopNumList.length; i++) {
|
|
if (this.shopNumList[i].id === e.target.value) {
|
|
if (this.shopNumList[i].id === e.target.value) {
|
|
this.shopNumIndex = i;
|
|
this.shopNumIndex = i;
|
|
@@ -614,6 +611,7 @@ export default {
|
|
if (e.detail.value === '2') {
|
|
if (e.detail.value === '2') {
|
|
this.dateInventory = 0;
|
|
this.dateInventory = 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
this.astrictDate.data.goodsStockFlag = e.detail.value;
|
|
this.astrictDate.data.goodsStockFlag = e.detail.value;
|
|
},
|
|
},
|
|
// 可退模式
|
|
// 可退模式
|
|
@@ -653,7 +651,6 @@ export default {
|
|
html: this.shopData.describ, //this.EditGoodsDetail.content为赋值内容。
|
|
html: this.shopData.describ, //this.EditGoodsDetail.content为赋值内容。
|
|
});
|
|
});
|
|
})
|
|
})
|
|
- .exec();
|
|
|
|
},
|
|
},
|
|
// -----------------------------------------------------------------
|
|
// -----------------------------------------------------------------
|
|
// 跳转到管理分类页面
|
|
// 跳转到管理分类页面
|
|
@@ -933,6 +930,7 @@ export default {
|
|
// 内容提交
|
|
// 内容提交
|
|
submitMesage () {
|
|
submitMesage () {
|
|
let _this = this;
|
|
let _this = this;
|
|
|
|
+
|
|
// 判断是否限制账号购买
|
|
// 判断是否限制账号购买
|
|
if (this.showoperat) {
|
|
if (this.showoperat) {
|
|
this.showoperat = '1';
|
|
this.showoperat = '1';
|
|
@@ -941,15 +939,12 @@ export default {
|
|
this.astrictDate.data.saleDay = 0;
|
|
this.astrictDate.data.saleDay = 0;
|
|
this.astrictDate.data.saleNum = 0;
|
|
this.astrictDate.data.saleNum = 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
let name = '';
|
|
let name = '';
|
|
if (this.typeProperty === 1) {
|
|
if (this.typeProperty === 1) {
|
|
name = this.shopList[this.shopIndex].name;
|
|
name = this.shopList[this.shopIndex].name;
|
|
} else if (this.typeProperty === 0) {
|
|
} else if (this.typeProperty === 0) {
|
|
name = this.shopname;
|
|
name = this.shopname;
|
|
}
|
|
}
|
|
-
|
|
|
|
- console.log(name);
|
|
|
|
if (!this.storeId) {
|
|
if (!this.storeId) {
|
|
this.$mHelper.toast('请选择所属商铺!');
|
|
this.$mHelper.toast('请选择所属商铺!');
|
|
return;
|
|
return;
|
|
@@ -958,17 +953,16 @@ export default {
|
|
this.$mHelper.toast('请选择商品类型!');
|
|
this.$mHelper.toast('请选择商品类型!');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
if (!name) {
|
|
if (!name) {
|
|
this.$mHelper.toast('请选择商品名称或者输入商品名称!');
|
|
this.$mHelper.toast('请选择商品名称或者输入商品名称!');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (this.typeProperty === '0') {
|
|
|
|
|
|
+ if (this.typeProperty === 0) {
|
|
if (!this.lineId) {
|
|
if (!this.lineId) {
|
|
this.$mHelper.toast('请选择商品分类!');
|
|
this.$mHelper.toast('请选择商品分类!');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
if (!this.price) {
|
|
if (!this.price) {
|
|
this.$mHelper.toast('请输入商品卖价!');
|
|
this.$mHelper.toast('请输入商品卖价!');
|
|
return;
|
|
return;
|