|
@@ -33,6 +33,17 @@
|
|
|
<view style="margin-top:20upx;">
|
|
<view style="margin-top:20upx;">
|
|
|
<button style="width:25vh;" class="admin-button-com big blue" @click="gotoOrderDetail()">订单详情</button>
|
|
<button style="width:25vh;" class="admin-button-com big blue" @click="gotoOrderDetail()">订单详情</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view style="margin-top:20upx;">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
+ <button style="width:25vh;" class="admin-button-com big blue" open-type="share">邀请付款</button>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
|
|
+ <button style="width:25vh;" class="admin-button-com big blue" @click="shareOrder()">邀请付款</button>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
<view style="margin-top:20upx;">
|
|
<view style="margin-top:20upx;">
|
|
|
<button style="width:25vh;" @click="changePayWay(2)" class="admin-button-com big default">记赊账</button>
|
|
<button style="width:25vh;" @click="changePayWay(2)" class="admin-button-com big default">记赊账</button>
|
|
|
</view>
|
|
</view>
|
|
@@ -50,13 +61,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import { mapGetters } from "vuex";
|
|
|
|
|
+import { IMGHOST } from '@/config'
|
|
|
import { cancel,debtPay,getDetail,codePay,codePayCheck} from "@/api/order";
|
|
import { cancel,debtPay,getDetail,codePay,codePayCheck} from "@/api/order";
|
|
|
export default {
|
|
export default {
|
|
|
name: "toPay",
|
|
name: "toPay",
|
|
|
components: {
|
|
components: {
|
|
|
},
|
|
},
|
|
|
mixins: [],
|
|
mixins: [],
|
|
|
- computed: {},
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
orderId:0,
|
|
orderId:0,
|
|
@@ -87,16 +99,62 @@ export default {
|
|
|
getDetail({ id: option.orderId }).then(res=>{
|
|
getDetail({ id: option.orderId }).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
this.orderInfo = res.data
|
|
this.orderInfo = res.data
|
|
|
|
|
+
|
|
|
|
|
+ let customName = this.orderInfo.customName ? this.orderInfo.customName : ''
|
|
|
|
|
+ let actPrice = this.orderInfo.actPrice ? parseFloat(this.orderInfo.actPrice) : 0
|
|
|
|
|
+ this.title = customName+' '+this.orderInfo.addTime.substr(5,11)+' ¥'+actPrice
|
|
|
|
|
+ if(this.orderInfo.payTime!='0000-00-00 00:00:00'){
|
|
|
|
|
+ this.title = customName+' '+this.orderInfo.payTime.substr(5,11)+' ¥'+actPrice
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.orderInfo.tkPrice && Number(this.orderInfo.tkPrice)>0){
|
|
|
|
|
+ this.title = this.title+' 已退¥'+parseFloat(this.orderInfo.tkPrice)
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.orderInfo.status == 1){
|
|
|
|
|
+ this.title = this.title+' 点击付款,10分钟后失效'
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- //在微信端,主动发起扫码
|
|
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
|
|
- this.beginScan()
|
|
|
|
|
- // #endif
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters({dictInfo:"getDictionariesInfo" }),
|
|
|
|
|
+ },
|
|
|
|
|
+ onShareAppMessage(res) {
|
|
|
|
|
+ console.log("pagesOrder/showOrder?id="+this.orderInfo.purchaseId)
|
|
|
|
|
+ return {
|
|
|
|
|
+ title: this.title,
|
|
|
|
|
+ desc: "",
|
|
|
|
|
+ imageUrl: IMGHOST+'/custom/order_share.jpg',
|
|
|
|
|
+ path: "pagesOrder/showOrder?id="+this.orderInfo.purchaseId,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ shareOrder(){
|
|
|
|
|
+ console.log("pagesOrder/showOrder?id="+this.orderInfo.purchaseId)
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
|
|
|
|
|
+ uni.share({
|
|
|
|
|
+ provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
|
|
|
|
|
+ scene: 'WXSceneSession', //场景,可取值参考下面说明。
|
|
|
|
|
+ type: 5, //分享形式
|
|
|
|
|
+ title: that.title, //分享内容的标题
|
|
|
|
|
+ summary: '暂无', //分享内容的摘要
|
|
|
|
|
+ imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
|
|
|
|
|
+ miniProgram: {
|
|
|
|
|
+ id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台账号
|
|
|
|
|
+ path: "pagesOrder/showOrder?id="+this.orderInfo.purchaseId,
|
|
|
|
|
+ type: 0,// 0-正式版; 1-测试版; 2-体验版
|
|
|
|
|
+ webUrl: 'https://www.wixhb.com'
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ //console.log(res)
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: function(err) {
|
|
|
|
|
+ //console.log(err)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
gotoOrderDetail() {
|
|
gotoOrderDetail() {
|
|
|
let id = this.option.orderId ? this.option.orderId : 0
|
|
let id = this.option.orderId ? this.option.orderId : 0
|
|
|
this.$util.pageTo({url: "/pagesOrder/detail?id="+id,type:2})
|
|
this.$util.pageTo({url: "/pagesOrder/detail?id="+id,type:2})
|