|
@@ -95,7 +95,7 @@
|
|
<view class="txt" @tap="toClassify">管理分类</view>
|
|
<view class="txt" @tap="toClassify">管理分类</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 西线推荐 -->
|
|
|
|
|
|
+ <!-- 分类 -->
|
|
<view class="xiline detail-list">
|
|
<view class="xiline detail-list">
|
|
<view class="menu">
|
|
<view class="menu">
|
|
<view class="uni-list-cell">
|
|
<view class="uni-list-cell">
|
|
@@ -217,10 +217,7 @@
|
|
<view class="txt">
|
|
<view class="txt">
|
|
<text class="txt1"> {{ item.name }}</text>
|
|
<text class="txt1"> {{ item.name }}</text>
|
|
<text> {{ item.know }}</text>
|
|
<text> {{ item.know }}</text>
|
|
- <view
|
|
|
|
- class="inventory"
|
|
|
|
- v-if="item.name === '限日库存模式'"
|
|
|
|
- >
|
|
|
|
|
|
+ <view class="inventory" v-if="item.name === '限日库存模式'">
|
|
<text class="name">日库存数:</text>
|
|
<text class="name">日库存数:</text>
|
|
<input
|
|
<input
|
|
class="dateInventory"
|
|
class="dateInventory"
|
|
@@ -229,6 +226,12 @@
|
|
v-model="dateInventory"
|
|
v-model="dateInventory"
|
|
/>
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
|
|
+ <view class="ref" v-if="item.name === '限日库存模式'">
|
|
|
|
+ <text class="residue">今日剩余库存:<text class="residuenum"> {{ todayResidue }}</text></text>
|
|
|
|
+ <image class="reficon" src="../../static/images/ref.png" @tap="refToday"></image>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
<view
|
|
<view
|
|
class="inventory"
|
|
class="inventory"
|
|
v-if="item.name === '限总库存模式'"
|
|
v-if="item.name === '限总库存模式'"
|
|
@@ -241,6 +244,11 @@
|
|
v-model="sunInventory"
|
|
v-model="sunInventory"
|
|
/>
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
|
|
+ <view class="ref" v-if="item.name === '限总库存模式'">
|
|
|
|
+ <text class="residue">当前剩余总库存:<text class="residuenum"> {{ sunResidue }}</text></text>
|
|
|
|
+ <image class="reficon" src="../../static/images/ref.png" @tap="refSun"></image>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</label>
|
|
</label>
|
|
</radio-group>
|
|
</radio-group>
|
|
@@ -374,6 +382,7 @@ export default {
|
|
scenicId: uni.getStorageSync('scenicId'),
|
|
scenicId: uni.getStorageSync('scenicId'),
|
|
title: '商品详情',
|
|
title: '商品详情',
|
|
showoperat: false,
|
|
showoperat: false,
|
|
|
|
+ salerule: '',
|
|
|
|
|
|
placeholderContent: '请输入内容...',
|
|
placeholderContent: '请输入内容...',
|
|
mastKnow: '',
|
|
mastKnow: '',
|
|
@@ -448,6 +457,9 @@ export default {
|
|
sunInventory: 0,
|
|
sunInventory: 0,
|
|
inventory: '',
|
|
inventory: '',
|
|
|
|
|
|
|
|
+ todayResidue: 0,
|
|
|
|
+ sunResidue: 0,
|
|
|
|
+
|
|
bookingnum: '',
|
|
bookingnum: '',
|
|
|
|
|
|
bookingList: [
|
|
bookingList: [
|
|
@@ -475,9 +487,6 @@ export default {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onUnload () {
|
|
|
|
- uni.removeStorageSync('Id');
|
|
|
|
- },
|
|
|
|
onShow () {
|
|
onShow () {
|
|
if (this.storeId != '') {
|
|
if (this.storeId != '') {
|
|
this.getLine(this.storeId)
|
|
this.getLine(this.storeId)
|
|
@@ -523,6 +532,7 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
let rule = JSON.parse(this.shopData.saleRuleJson);
|
|
let rule = JSON.parse(this.shopData.saleRuleJson);
|
|
|
|
+
|
|
if (rule) {
|
|
if (rule) {
|
|
this.astrictDate.data.saleDay = rule.data.saleDay
|
|
this.astrictDate.data.saleDay = rule.data.saleDay
|
|
? rule.data.saleDay
|
|
? rule.data.saleDay
|
|
@@ -531,10 +541,11 @@ export default {
|
|
? rule.data.saleNum
|
|
? rule.data.saleNum
|
|
: 1;
|
|
: 1;
|
|
// 有效期模式
|
|
// 有效期模式
|
|
- this.astrictDate.dateSetting = rule.data.dateSetting;
|
|
|
|
|
|
+ this.astrictDate.data.dateSetting = rule.data.dateSetting;
|
|
this.patterIndex = +rule.data.dateSetting;
|
|
this.patterIndex = +rule.data.dateSetting;
|
|
// 库存模式
|
|
// 库存模式
|
|
- this.astrictDate.goodsStockFlag = rule.data.goodsStockFlag;
|
|
|
|
|
|
+ this.astrictDate.data.goodsStockFlag = rule.data.goodsStockFlag;
|
|
|
|
+ this.getResidue()
|
|
this.shopNumIndex = +rule.data.goodsStockFlag;
|
|
this.shopNumIndex = +rule.data.goodsStockFlag;
|
|
|
|
|
|
if (this.shopNumIndex === 1) {
|
|
if (this.shopNumIndex === 1) {
|
|
@@ -544,6 +555,7 @@ export default {
|
|
}
|
|
}
|
|
// 预订数量
|
|
// 预订数量
|
|
this.astrictDate.data.bookRule = rule.data.bookRule;
|
|
this.astrictDate.data.bookRule = rule.data.bookRule;
|
|
|
|
+
|
|
// 实名制
|
|
// 实名制
|
|
if (rule.data.isRealName === '0') {
|
|
if (rule.data.isRealName === '0') {
|
|
this.trueNme = true;
|
|
this.trueNme = true;
|
|
@@ -551,9 +563,10 @@ export default {
|
|
this.trueNme = false;
|
|
this.trueNme = false;
|
|
}
|
|
}
|
|
this.astrictDate.data.isRealName = rule.data.isRealName;
|
|
this.astrictDate.data.isRealName = rule.data.isRealName;
|
|
|
|
+
|
|
// 可退规则
|
|
// 可退规则
|
|
this.bookingIndex = +rule.data.usubscribeRule;
|
|
this.bookingIndex = +rule.data.usubscribeRule;
|
|
- this.astrictDate.usubscribeRule = rule.data.usubscribeRule;
|
|
|
|
|
|
+ this.astrictDate.data.usubscribeRule = rule.data.usubscribeRule;
|
|
// 二维码
|
|
// 二维码
|
|
if (rule.data.isShowQrcode === '0') {
|
|
if (rule.data.isShowQrcode === '0') {
|
|
this.codeShow = true;
|
|
this.codeShow = true;
|
|
@@ -565,8 +578,10 @@ export default {
|
|
// 限制购票回显
|
|
// 限制购票回显
|
|
if (this.shopData.saleRule === '1') {
|
|
if (this.shopData.saleRule === '1') {
|
|
this.showoperat = true;
|
|
this.showoperat = true;
|
|
|
|
+ this.salerule = '1'
|
|
} else {
|
|
} else {
|
|
this.showoperat = false;
|
|
this.showoperat = false;
|
|
|
|
+ this.salerule = '0'
|
|
}
|
|
}
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
@@ -621,6 +636,31 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
this.astrictDate.data.goodsStockFlag = e.detail.value;
|
|
this.astrictDate.data.goodsStockFlag = e.detail.value;
|
|
|
|
+ this.getResidue()
|
|
|
|
+ },
|
|
|
|
+ // 剩余库存
|
|
|
|
+ async getResidue () {
|
|
|
|
+ console.log(this.astrictDate.data.goodsStockFlag);
|
|
|
|
+ await this.$http.get('/goods/getInventory',{
|
|
|
|
+ id:this.SHOPID,
|
|
|
|
+ goodsStockFlag: this.astrictDate.data.goodsStockFlag
|
|
|
|
+ }).then( res =>{
|
|
|
|
+ if (res.code === 200 && res.msg ==='OK') {
|
|
|
|
+ if (+this.astrictDate.data.goodsStockFlag === 1) {
|
|
|
|
+ this.todayResidue = res.data.now_inventory
|
|
|
|
+ } else if (+this.astrictDate.data.goodsStockFlag === 2) {
|
|
|
|
+ this.sunResidue = res.data.now_inventory
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ refToday () {
|
|
|
|
+ this.todayResidue = '...'
|
|
|
|
+ this.getResidue()
|
|
|
|
+ },
|
|
|
|
+ refSun () {
|
|
|
|
+ this.sunResidue = '...'
|
|
|
|
+ this.getResidue()
|
|
},
|
|
},
|
|
// 可退模式
|
|
// 可退模式
|
|
bookingChange (e) {
|
|
bookingChange (e) {
|
|
@@ -952,13 +992,13 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- // 判断是否限制账号购买
|
|
|
|
|
|
+ // 判断是否限制账号购买
|
|
if (this.showoperat) {
|
|
if (this.showoperat) {
|
|
- this.showoperat = '1';
|
|
|
|
|
|
+ this.salerule = '1'
|
|
} else {
|
|
} else {
|
|
- this.showoperat = '0';
|
|
|
|
- this.astrictDate.data.saleDay = 0;
|
|
|
|
- this.astrictDate.data.saleNum = 0;
|
|
|
|
|
|
+ this.salerule = '0'
|
|
|
|
+ this.astrictDate.data.saleDay = '';
|
|
|
|
+ this.astrictDate.data.saleNum = '';
|
|
}
|
|
}
|
|
let name = '';
|
|
let name = '';
|
|
if (this.typeProperty === 1) {
|
|
if (this.typeProperty === 1) {
|
|
@@ -1037,17 +1077,14 @@ export default {
|
|
imges: JSON.stringify(this.Imglist) || '',
|
|
imges: JSON.stringify(this.Imglist) || '',
|
|
del: this.shopData.del || '',
|
|
del: this.shopData.del || '',
|
|
upDown: this.shopData.upDown || '',
|
|
upDown: this.shopData.upDown || '',
|
|
- saleRule: this.showoperat, // 限制购票
|
|
|
|
|
|
+ saleRule: this.salerule, // 限制购票
|
|
saleRuleJson: JSON.stringify(this.astrictDate),
|
|
saleRuleJson: JSON.stringify(this.astrictDate),
|
|
// 自营
|
|
// 自营
|
|
name: name,
|
|
name: name,
|
|
salePrice: this.price * 100 || null,
|
|
salePrice: this.price * 100 || null,
|
|
price: this.rateprice * 100 || null,
|
|
price: this.rateprice * 100 || null,
|
|
- expiredTime:
|
|
|
|
- this.expirationDate === '请选择商品过期日期'
|
|
|
|
- ? ''
|
|
|
|
- : this.expirationDate,
|
|
|
|
- inventory: this.inventory,
|
|
|
|
|
|
+ expiredTime:this.expirationDate === '请选择商品过期日期'? '': this.expirationDate,
|
|
|
|
+ inventory: this.inventory
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.code === 200 && res.msg === 'OK') {
|
|
if (res.code === 200 && res.msg === 'OK') {
|
|
@@ -1330,6 +1367,25 @@ export default {
|
|
}
|
|
}
|
|
.dateInventory {
|
|
.dateInventory {
|
|
flex: 1;
|
|
flex: 1;
|
|
|
|
+ color: #232828;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .ref {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .residue {
|
|
|
|
+ color: #232828;
|
|
|
|
+ }
|
|
|
|
+ .residuenum{
|
|
|
|
+ margin-left: 15upx;
|
|
|
|
+ color: firebrick;
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ }
|
|
|
|
+ .reficon{
|
|
|
|
+ margin-left: 30upx;
|
|
|
|
+ width: 30upx;
|
|
|
|
+ height: 30upx;
|
|
|
|
+ z-index: 10;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|