1.对接扫码分配桌码

huipay-app-dev
杨杰 1 year ago
parent aeae307634
commit d415f3b8ff
  1. 15
      App.vue
  2. 11
      pages.json
  3. 2
      pages/index/addService/addService.vue
  4. 26
      pages/index/merchant-details/merchant-details.vue
  5. 29
      pages/index/salesOrderList/salesOrderList.vue
  6. 107
      pages/index/scanCodeAllocation/scanCodeAllocation.vue
  7. 16
      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() {},

@ -422,7 +422,16 @@
} }
} }
], ,{
"path" : "pages/index/scanCodeAllocation/scanCodeAllocation",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"subpackages": [{ "subpackages": [{
"root": "subPages", "root": "subPages",

@ -134,7 +134,7 @@
"deviceType": this.serviceid, "deviceType": this.serviceid,
"deviceNum": "1" "deviceNum": "1"
} }
createDeviceOrder(datas).then(res => { createDeviceOrder(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.payOrder(res.return_data.orderNo); this.payOrder(res.return_data.orderNo);
} else { } else {

@ -9,41 +9,41 @@
<!-- 商户信息 --> <!-- 商户信息 -->
<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>
<view class="notes"> <view class="notes">
<view class="fcor666 width25">商户ID</view> <view class="fcor666 width25">商户ID</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merNo}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merNo}}</view>
</view>
<view class="notes">
<view class="fcor666 width25">商户名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merName}}</view>
</view> </view>
<view class="notes"> <view class="notes">
<view class="fcor666 width25">商户名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.merName}}</view>
</view>
<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>
<view class="notes"> <view class="notes">
<view class="fcor666 width25">手机号</view> <view class="fcor666 width25">手机号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.regPhone}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{merDesInfo.regPhone}}</view>
</view> </view>
<!-- <view class="notes"> <!-- <view class="notes">
<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>
@ -66,7 +72,7 @@
], // ], //
pageNum: 1, pageNum: 1,
pagesize: 15, pagesize: 15,
goodtyid: 2, // goodtyid: 2, //
isLoadMore: false, // isLoadMore: false, //
serviceList: [] //˚ serviceList: [] //˚
} }
@ -98,7 +104,7 @@
methods: { methods: {
//id //id
switchid(item) { switchid(item) {
this.goodtyid = item.id; this.goodtyid = item.id;
this.pageNum = 1; this.pageNum = 1;
this.serviceList = []; this.serviceList = [];
this.getOrderList(); this.getOrderList();
@ -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>

@ -77,13 +77,15 @@
}) })
}, },
// //
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) {
@ -134,4 +136,4 @@
position: fixed; position: fixed;
right: 40rpx; right: 40rpx;
} }
</style> </style>
Loading…
Cancel
Save