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