|
|
@@ -56,9 +56,9 @@
|
|
|
<view class="module-com input-line-wrap">
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;" @click="form.sendType = 0">有车到店</button>
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;" @click="form.sendType = 1">上门自取</button>
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="form.sendType = 2">发快递</button>
|
|
|
+ <button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(0)">有车到店</button>
|
|
|
+ <button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(1)">上门自取</button>
|
|
|
+ <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">发快递</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
@@ -79,7 +79,9 @@
|
|
|
<view><text>{{shopInfo.fullAddress}}</text></view>
|
|
|
<view><text>{{shopInfo.showAddress}}</text></view>
|
|
|
</view>
|
|
|
- <input v-else v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" @focus="form.name=''" placeholder="请完善门店地址" maxlength="50" type="text" />
|
|
|
+ <view v-else>
|
|
|
+ <view><text style="color:#CCCCCC;">请完善门店地址</text></view>
|
|
|
+ </view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2 && Number(form.sendCost)>0">
|
|
|
@@ -217,8 +219,10 @@ export default {
|
|
|
this.hasCoupon()
|
|
|
}
|
|
|
|
|
|
- //计算运费
|
|
|
- this.calcFreight()
|
|
|
+ if(this.form.sendType == 2){
|
|
|
+ //计算运费
|
|
|
+ this.calcFreight()
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -241,6 +245,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
+ changeSendType(num){
|
|
|
+ this.form.sendType = num
|
|
|
+ if(num == 2){
|
|
|
+ //计算运费
|
|
|
+ this.calcFreight()
|
|
|
+ }
|
|
|
+ },
|
|
|
modifyAddress(){
|
|
|
this.$util.pageTo({ url: '/admin/shop/add?id='+this.getLoginInfo.admin.currentShopId})
|
|
|
},
|
|
|
@@ -329,6 +340,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
init() {
|
|
|
+
|
|
|
this.getDetailData()
|
|
|
|
|
|
currentShop().then(res=>{
|
|
|
@@ -337,8 +349,7 @@ export default {
|
|
|
that.shopInfo = res.data
|
|
|
}
|
|
|
})
|
|
|
- //计算运费
|
|
|
- this.calcFreight()
|
|
|
+
|
|
|
},
|
|
|
calcFreight() {
|
|
|
let weight = 0
|