|
|
@@ -380,7 +380,6 @@
|
|
|
this.getProductGroup()
|
|
|
this.getLeftTree()
|
|
|
this.getForm()
|
|
|
- this.updateRangeTime()
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
if (options.productId) {
|
|
|
@@ -392,43 +391,20 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- let that = this
|
|
|
uni.getStorage({
|
|
|
key: 'login_user_info',
|
|
|
- success: function(res) {
|
|
|
- that.form.merchantId = res.data.merchantId
|
|
|
- }
|
|
|
- })
|
|
|
- uni.getStorage({
|
|
|
- key: 'smdate',
|
|
|
success: (res) => {
|
|
|
- if (res.data.availableEndDate) {
|
|
|
- this.showSellDate = res.data.availableStartDate + '-' + res.data.availableEndDate
|
|
|
- this.form.availableStartDate = res.data.availableStartDate
|
|
|
- this.form.availableEndDate = res.data.availableEndDate
|
|
|
- this.form.expirationDays = null
|
|
|
- this.form.useType = 2
|
|
|
- } else if (res.data.expirationDays) {
|
|
|
- this.form.expirationDays = res.data.expirationDays
|
|
|
- this.form.availableEndDate = null
|
|
|
- this.form.availableStartDate = null
|
|
|
- this.form.useType = 1
|
|
|
- this.$nextTick(() => {
|
|
|
- this.showSellDate = res.data.expirationDays + '天后失效'
|
|
|
- });
|
|
|
- }else if(res.data.useType == 3){
|
|
|
- this.form.useType = 3
|
|
|
- this.showSellDate = '长期有效'
|
|
|
- }
|
|
|
-
|
|
|
+ this.form.merchantId = res.data.merchantId
|
|
|
}
|
|
|
})
|
|
|
uni.getStorage({
|
|
|
key: 'group',
|
|
|
- success: function(res) {
|
|
|
- that.form.productGroups = res.data
|
|
|
+ success: (res) => {
|
|
|
+ this.form.productGroups = res.data
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ this.updateRangeTime()
|
|
|
},
|
|
|
methods: {
|
|
|
//全选
|