1.业务员设备绑定 解除功能

huipay-master
杨杰 1 year ago
parent 2044dbe2e3
commit f9ffe473ae
  1. 12
      Utils/Api.js
  2. 14
      pages/index/merchant-details/merchant-details.vue
  3. 100
      pages/index/mineService/mineService.vue
  4. 2
      pages/index/rateReview/rateReview.vue
  5. 2
      pages/tabBar/home/home.vue
  6. 42
      pages/welcome/welcome.vue

@ -310,5 +310,17 @@ export const getNewRateApplyDetail = params => {
export const getRateApplyDetail = params => {
return POST('GET', `${base}/merRate/getRateApplyDetail`, params).then(res => res.data);
}
// # 设备绑定门店
export const devicebindStore = params => {
return POST('POST', `${base}/device/bindStore`, params).then(res => res.data);
}
//# 设备解绑门店
export const unbindStore = params => {
return POST('POST', `${base}/device/unbindStore`, params).then(res => res.data);
}

@ -92,7 +92,7 @@
<view class="height45 width100">
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,1)">绑定二维码</button>
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,2)">二维码列表</button>
<!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,1)">绑定设备</button> -->
<button class="btns mart10 margle10" @click.stop="jumpService(item.id)">绑定设备</button>
<!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,2)">设备列表</button> -->
</view>
<view class="lin10"></view>
@ -112,8 +112,8 @@
</view>
</view>
<view class="width94 alijus" v-if="current == 0">
<view class="subbtn" @tap="updateFigMerBasis()" >修改结算</view>
<view class="subbtn" @tap="updatemodifyRate()" >修改费率</view>
<view class="subbtn" @tap="updateFigMerBasis()">修改结算</view>
<view class="subbtn" @tap="updatemodifyRate()">修改费率</view>
</view>
</view>
</template>
@ -228,9 +228,9 @@
})
},
//
jumpService(item, items) {
jumpService(item) {
uni.navigateTo({
url: '../serviceBuild/serviceBuild?storeid=' + item + '&type=' + items
url: '/pages/index/mineService/mineService?id=6' + '&storeid=' + item
})
},
//
@ -240,9 +240,9 @@
})
},
//
updatemodifyRate(){
updatemodifyRate() {
uni.navigateTo({
url:'/pages/index/modifyRate/modifyRate?id=' + this.merid
url: '/pages/index/modifyRate/modifyRate?id=' + this.merid
})
},
//

@ -9,7 +9,7 @@
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image>
</view>
<view class="width94 serlist border-r mart15" v-for="(item,index) in serviceList" :key="index"
@click="assignOrder(item.deviceNo)">
@click="assignOrder(item.deviceNo,item.bindStatus)">
<view class="notes">
<view class="width75 margle">
<view class="font18 fcor333 fontwig6">编号: {{item.deviceNo}}</view>
@ -24,6 +24,13 @@
未绑定
</view>
</view>
<view class="conts" v-if="item.bindStatus">
<view class="margle10 font13 fcor999">商户名称: {{item.merName}}</view>
</view>
<view class="conts" v-if="item.bindStatus">
<view class="margle10 font13 fcor999">名店名称: {{item.storeName}}</view>
</view>
<view class="conts">
<view class="margle10 font13 fcor999">设备类型: {{item.deviceType | toFilter()}}</view>
</view>
@ -36,7 +43,9 @@
import {
getDeviceList,
assignOrder,
replace
replace,
devicebindStore,
unbindStore
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -48,7 +57,7 @@
buildStatus: false, //
deviceNo: '', //
assderid: '', //id
storeid:'', //id
storeid: '', //id
pageNum: 1,
pagesize: 10,
isLoadMore: false, //
@ -82,7 +91,7 @@
this.buildStatus = true;
this.getDeviceList();
}
if (this.sourceId == 2 || this.sourceId == 4) {
if (this.sourceId == 2 || this.sourceId == 4 || this.sourceId == 6) {
this.buildStatus = false;
this.getDeviceList();
}
@ -94,12 +103,18 @@
methods: {
//
getDeviceList() {
let storeno;
if (this.sourceId == 6) {
storeno = '';
} else {
storeno = this.storeid;
}
let datas = {
pageNum: this.pageNum,
pageSize: this.pagesize,
buildStatus: this.buildStatus,
deviceNo: this.deviceNo,
storeId: this.storeid
storeId: storeno
}
getDeviceList(datas).then(res => {
if (res.return_code == '000000' && res.return_data.list != '') {
@ -122,7 +137,7 @@
this.getDeviceList();
},
//
assignOrder(item) {
assignOrder(item, item1) {
if (this.sourceId == 2) {
uni.showModal({
title: '温馨提示',
@ -160,6 +175,75 @@
});
}
if (this.sourceId == 6) {
uni.showModal({
title: '温馨提示',
content: '是否分配当前设备',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '加载中'
})
let datas = {
"storeId": this.storeid,
"deviceNo": item
}
devicebindStore(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) {}
}
});
}
if (this.sourceId == 3 && item1) {
uni.showModal({
title: '温馨提示',
content: '是否解除当前设备',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '加载中'
})
let datas = {
"deviceNo": item
}
unbindStore(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) {}
}
});
}
if (this.sourceId == 4) {
uni.showModal({
title: '温馨提示',
@ -264,8 +348,8 @@
width: calc(100% - 60rpx);
display: flex;
align-items: center;
margin-bottom: 10px;
padding: 0 0rpx 30rpx 14rpx;
margin-bottom: 4px;
padding: 0 0rpx 2rpx 6rpx;
}
.xfimg {

@ -8,7 +8,7 @@
<view class="titlename width100 font18 fontwig6 fcor333">费率信息审核</view>
<view class="width100 backcorfff">
<view class="notes" v-for="(item,index) in RateApplyDetail.merRateApplyDetailList">
<view class="notes" v-for="(item,index) in RateApplyDetail.merRateApplyDetailList" :key="index">
<view class="fcor666 width25">{{item.rateTypeName}}</view>
<view class="font14 fcor333 text2 width75 fotrt">{{item.ratePct}} (单位: 百分之一)</view>
</view>

@ -140,7 +140,7 @@
},
{
title: '我的设备',
url: '../../index/mineService/mineService?id=1',
url: '../../index/mineService/mineService?id=1&storeid=',
img: '../../../static/img/casihr.png'
},
{

@ -17,28 +17,28 @@
},
onLoad(options) {
let that = this;
// uni.reLaunch({
// url: '../tabBar/home/home'
// })
// #ifdef H5
let arr1 = window.location.href;
let arr2 = arr1.split('=');
if (arr2[2]) {
var arr3 = arr2[2].split('&');
if (arr3[0] != undefined && arr3[0]) {
app.globalData.h5code = arr3[0];
uni.setStorage({
key: "h5code",
data: arr3[0]
uni.reLaunch({
url: '../tabBar/home/home'
})
}
} else {
// openid
that.jumpcdx();
}
if (app.globalData.h5code) {
that.getAccessToken();
}
// #ifdef H5
// let arr1 = window.location.href;
// let arr2 = arr1.split('=');
// if (arr2[2]) {
// var arr3 = arr2[2].split('&');
// if (arr3[0] != undefined && arr3[0]) {
// app.globalData.h5code = arr3[0];
// uni.setStorage({
// key: "h5code",
// data: arr3[0]
// })
// }
// } else {
// // openid
// that.jumpcdx();
// }
// if (app.globalData.h5code) {
// that.getAccessToken();
// }
// #endif
},
methods: {

Loading…
Cancel
Save