|
|
@@ -238,10 +238,10 @@
|
|
|
<!-- <appSendTime :placeholder="'默认30分钟内配送'" @alterTime="purchaseFreight(ghsMsg)" :sendDate.sync="form.sendDate" :sendTime.sync="sendTime" ></appSendTime> -->
|
|
|
<appTimer :placeholder="'默认30分钟内配送'" @confirm="onConfirm" :sendTime="sendTime"></appTimer>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="form.sendType == 1">
|
|
|
- <view class="tui-title ">运费{{form.sendCost}}</view>
|
|
|
+ <view class="tui-title ">运费</view>
|
|
|
<input type="number" placeholder="留空表示免运费" @input="countAllPrices" v-model="form.sendCost" placeholder-class="tui-placeholder" disabled>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({url: '/admin/coupon/selectCouponList'})">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="toCoupon">
|
|
|
<view class="tui-title ">红包/抵用券</view>
|
|
|
<view class="coupon_box">{{couponText}}</view>
|
|
|
</tui-list-cell>
|
|
|
@@ -269,8 +269,8 @@
|
|
|
<text class="large" v-else-if="form.sendType==1 && couponSumText">{{ allPrice + Number(form.sendCost) - Number(couponSumText) }}</text>
|
|
|
<text class="large" v-else-if="form.sendType==2 && !couponSumText">{{ allPrice}}</text>
|
|
|
<text class="large" v-else-if="form.sendType==2 && couponSumText">{{ NumberSub(allPrice, Number(couponSumText))}}</text>
|
|
|
- <text class="large" v-else-if="!form.sendType && !couponSumText">{{ allPrice }}</text>
|
|
|
- <text class="large" v-else-if="!form.sendType && couponSumText">{{ NumberSub(allPrice, Number(couponSumText)) }}</text>
|
|
|
+ <!-- <text class="large" v-else-if="!form.sendType && !couponSumText">{{ allPrice }}</text> -->
|
|
|
+ <!-- <text class="large" v-else-if="!form.sendType && couponSumText">{{ NumberSub(allPrice, Number(couponSumText)) }}</text> -->
|
|
|
</text>
|
|
|
</view>
|
|
|
<button class="admin-button-com blue middle" @click="affirmFormSubmit">提交</button>
|
|
|
@@ -336,7 +336,8 @@ export default {
|
|
|
sendTime: "",
|
|
|
sendCost: "",
|
|
|
customId: "",
|
|
|
- product: ""
|
|
|
+ product: "",
|
|
|
+ couponId: '0'
|
|
|
},
|
|
|
// 详细地址
|
|
|
// showRegion: false,
|
|
|
@@ -364,8 +365,10 @@ export default {
|
|
|
if(uni.getStorageSync('selectCouponInfo').couponSum) {
|
|
|
this.couponSumText = uni.getStorageSync('selectCouponInfo').couponSum
|
|
|
this.couponText = '-¥' + this.couponSumText
|
|
|
+ this.form.couponId = uni.getStorageSync('selectCouponInfo').couponId
|
|
|
} else {
|
|
|
this.couponSumText = "0"
|
|
|
+ this.form.couponId = '0'
|
|
|
this.hasCoupon()
|
|
|
}
|
|
|
},
|
|
|
@@ -381,13 +384,19 @@ export default {
|
|
|
this.sendTime = val
|
|
|
},
|
|
|
toPhone(phone){
|
|
|
+ let amount = this.form.sendType == 1 ? this.allPrice+Number(this.form.sendCost) : this.allPrice
|
|
|
uni.makePhoneCall({
|
|
|
phoneNumber: phone
|
|
|
});
|
|
|
},
|
|
|
+ toCoupon() {
|
|
|
+ let amount = this.form.sendType == 1 ? this.numberAdd(this.allPrice, Number(this.form.sendCost)) : this.allPrice
|
|
|
+ console.log(amount)
|
|
|
+ this.pageTo({url: '/admin/coupon/selectCouponList?price=' + amount})
|
|
|
+ },
|
|
|
// 是否有可用优惠券
|
|
|
hasCoupon() {
|
|
|
- let amount = this.form.sendType == 1 ? this.allPrice+Number(this.form.sendCost) : this.allPrice
|
|
|
+ let amount = this.form.sendType == 1 ? this.numberAdd(this.allPrice, Number(this.form.sendCost)) : this.allPrice
|
|
|
shopHouponHas({amount}).then(res => {
|
|
|
console.log(377, res)
|
|
|
this.couponText = res.data.has ? '有可用优惠券' : ''
|
|
|
@@ -461,6 +470,7 @@ export default {
|
|
|
remark:this.remark,
|
|
|
product:JSON.stringify(product),
|
|
|
ghsId:this.ghsMsg.id,
|
|
|
+ couponId: this.form.couponId
|
|
|
}
|
|
|
let self = this;
|
|
|
uni.showModal({
|
|
|
@@ -472,7 +482,7 @@ export default {
|
|
|
createOrder(parameter).then(res => {
|
|
|
self.resetSelectInfoByType(self.pageType);
|
|
|
const {data: { orderSn,actPrice }} = res;
|
|
|
- uni.navigateTo({url: `/pagesPurchase/wechatPay?type=2&orderSn=${orderSn}&actPrice=${actPrice}`})
|
|
|
+ self.pageTo({url: `/pagesPurchase/wechatPay?type=2&orderSn=${orderSn}&actPrice=${actPrice}`, type: 2})
|
|
|
});
|
|
|
}
|
|
|
}
|