1.对接扫码分配桌码

huipay-app-dev
杨杰 1 year ago
parent aeae307634
commit d415f3b8ff
  1. 15
      App.vue
  2. 9
      pages.json
  3. 10
      pages/index/merchant-details/merchant-details.vue
  4. 25
      pages/index/salesOrderList/salesOrderList.vue
  5. 107
      pages/index/scanCodeAllocation/scanCodeAllocation.vue
  6. 12
      pages/index/serviceApplicationList/serviceApplicationList.vue

@ -4,11 +4,11 @@
// url: 'http://192.168.3.4:9301/crest', // url: 'http://192.168.3.4:9301/crest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
url: 'https://pay.dctpay.com/crest', // url: 'https://pay.dctpay.com/crest',
imgUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com', // imgUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com',
// //
// url: 'https://gratia-pay.dctpay.com/crest', url: 'https://gratia-pay.dctpay.com/crest',
// imgUrl: 'https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com', imgUrl: 'https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com',
userInfo: "", userInfo: "",
openId: '', openId: '',
h5code: '', h5code: '',
@ -57,6 +57,13 @@
} }
}); });
const res = uni.getSystemInfoSync();
uni.setStorageSync('platform', res.platform);
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
uni.setStorageSync('version', inf.version); //
uni.setStorageSync('versionCode', inf.versionCode); //
});
let uuid = plus.device.uuid;
}, },
onShow: function() {}, onShow: function() {},

@ -421,6 +421,15 @@
"backgroundColorTop": "#6fbdee" "backgroundColorTop": "#6fbdee"
} }
}
,{
"path" : "pages/index/scanCodeAllocation/scanCodeAllocation",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} }
], ],
"subpackages": [{ "subpackages": [{

@ -9,7 +9,7 @@
<!-- 商户信息 --> <!-- 商户信息 -->
<view class="mart15 width100 backcorfff" v-if="current == 0"> <view class="mart15 width100 backcorfff" v-if="current == 0">
<view class="notes"> <view class="notes" v-if="merDesInfo.account">
<view class="fcor666 width25">账号</view> <view class="fcor666 width25">账号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.account.loginName}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.account.loginName}}</view>
</view> </view>
@ -22,12 +22,12 @@
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merName}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merName}}</view>
</view> </view>
<view class="notes"> <view class="notes" v-if="merDesInfo.account">
<view class="fcor666 width25">商户状态</view> <view class="fcor666 width25">商户状态</view>
<view class="font14 fcor333 text2 width75 fotrt" v-if="merDesInfo.account.status == 1">正常</view> <view class="font14 fcor333 text2 width75 fotrt" v-if="merDesInfo.account.status == 1">正常</view>
<view class="font14 fcor333 text2 width75 fotrt" v-if="merDesInfo.account.status == 4">违规</view> <view class="font14 fcor333 text2 width75 fotrt" v-if="merDesInfo.account.status == 4">违规</view>
</view> </view>
<view class="notes"> <view class="notes" v-if="merDesInfo.account">
<view class="fcor666 width25">联系人</view> <view class="fcor666 width25">联系人</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.account.userName}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.account.userName}}</view>
</view> </view>
@ -39,11 +39,11 @@
<view class="fcor666 width25">身份证号</view> <view class="fcor666 width25">身份证号</view>
<view class="font14 fcor333 text2 width75 fotrt">-</view> <view class="font14 fcor333 text2 width75 fotrt">-</view>
</view> --> </view> -->
<view class="notes"> <view class="notes" v-if="merDesInfo.merSettleAcct">
<view class="fcor666 width25">银行卡号</view> <view class="fcor666 width25">银行卡号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merSettleAcct.bankCardNo}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merSettleAcct.bankCardNo}}</view>
</view> </view>
<view class="notes"> <view class="notes" v-if="merDesInfo.merSettleAcct">
<view class="fcor666 width25">所属银行</view> <view class="fcor666 width25">所属银行</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merSettleAcct.bankName}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merSettleAcct.bankName}}</view>
</view> </view>

@ -29,11 +29,17 @@
<view class="margle10 font13 fcor999">申请数量: 1</view> <view class="margle10 font13 fcor999">申请数量: 1</view>
</view> </view>
<view class="width90 paddbotm10 alijusstart"> <view class="width90 paddbotm10 alijusstart">
<view class="otstatucs border-r marRight10" @click.stop="orderRefund(item.orderNo)" v-if="item.status == 2"> <view class="otstatucs border-r marRight10" @click.stop="scanNo(item)"
v-if="item.status == 2 && item.deviceType == 2">
分配桌码
</view>
<view class="otstatucs border-r marRight10" @click.stop="orderRefund(item.orderNo)"
v-if="item.status == 2 && item.deviceType == 1">
订单退款 订单退款
</view> </view>
<view class="otstatucs border-r marRight10" @click.stop="replace(item.orderAssignList[0].id)" <view class="otstatucs border-r marRight10" @click.stop="replace(item.orderAssignList[0].id)"
v-if="item.status == 3"> v-if="item.status == 3 && item.deviceType == 1">
更换设备 更换设备
</view> </view>
</view> </view>
@ -128,6 +134,21 @@
} }
}) })
}, },
//
scanNo(item) {
//
uni.scanCode({
success: function(res) {
let scanCont = res.result.split('=');
let scanNo = scanCont[1];
uni.navigateTo({
url: '/pages/index/scanCodeAllocation/scanCodeAllocation?storename=' +
item.storeName + '&scanno=' + scanNo + '&orderno=' + item.orderNo
})
}
});
},
// //
jumpService(item) { jumpService(item) {
if (this.goodtyid == 2) { if (this.goodtyid == 2) {

@ -0,0 +1,107 @@
<template>
<view>
<view class="username">
<view class="namecont">绑定门店</view>
<view class="font14 fcor333 text2 width75 fotrt">{{storeName}}</view>
</view>
<view class="username">
<view class="namecont">绑定编号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{scanNo}}</view>
</view>
<view class="btn" @tap="assignOrder">提交绑定</view>
</view>
</template>
<script>
import {
assignOrder
} from '../../../Utils/Api.js';
export default {
data() {
return {
scanNo: '', //,
storeName: '', //
orderNo: '' //
}
},
onLoad(options) {
this.scanNo = options.scanno;
this.storeName = options.storename;
this.orderNo = options.orderno;
},
methods: {
//
assignOrder() {
uni.showModal({
title: '温馨提示',
content: '是否分配当前设备',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '加载中'
})
let serviceList = [];
serviceList.push(this.scanNo);
let datas = {
"orderNo": this.orderNo,
"deviceNoList": serviceList
}
assignOrder(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '分配成功',
duration: 2000,
icon: 'none'
})
uni.navigateBack({})
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
})
} else if (res.cancel) {}
}
});
}
}
}
</script>
<style lang="scss">
.username {
width: calc(100% - 90upx);
height: 100upx;
display: flex;
align-items: center;
background-color: rgba($color: #ffffff, $alpha: 0.1);
border-bottom: 1px solid #f6f6f6;
padding: 8upx 45upx;
.namecont {
color: #666666;
width: 28%;
}
}
.btn {
color: #FFFFFF;
background-color: #0083f5;
width: 90%;
margin-left: 5%;
margin-top: 80rpx;
margin-bottom: 50rpx;
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10rpx;
font-size: 40rpx;
}
</style>

@ -78,12 +78,14 @@
}, },
// //
jumpaddservice() { jumpaddservice() {
uni.showToast({ // uni.showToast({
title:'请前往微信小程序申请设备' // title: '',
}) // duration: 2000,
// uni.navigateTo({ // icon: 'none'
// url: '../addService/addService'
// }) // })
uni.navigateTo({
url: '../addService/addService'
})
}, },
// //
jumpdetails(item) { jumpdetails(item) {

Loading…
Cancel
Save