fourPayProject/51uni/homePages/Manage/DeviceDetails.vue
2025-03-31 10:23:28 +08:00

173 lines
3.6 KiB
Vue

<template>
<view class="content">
<view class="container">
<headers :titles="titles"><uni-icons type="arrow-left" color="#fff" size="22px"></uni-icons></headers>
<view class="hang-box">
<view class="">设备类型</view>
<view class="b-a-s">{{formData.terminalType}}</view>
</view>
<view class="hang-box">
<view class="">设备型号</view>
<view class="b-a-s">{{formData.machineModel}}</view>
</view>
<view class="hang-box">
<view class="">厂商名称</view>
<view class="b-a-s">{{formData.manufacturerName}}</view>
</view>
<view class="hang-box">
<view class="">SN</view>
<view class="b-a-s">{{formData.sn}}</view>
</view>
<view class="hang-box">
<view class="">绑定时间</view>
<view class="b-a-s">{{formData.merchantBindTime}}</view>
</view>
<view class="hang-box">
<view class="">使用状态</view>
<view class="b-a-s">{{'绑定'}}</view>
</view>
<view class="hang-box">
<view class="">设备奖励</view>
<view class="b-a-s">{{formData.remarks}}</view>
</view>
<view class="hang-box">
<view class="">代理联系人</view>
<view class="b-a-s">{{formData.agentName}}</view>
</view>
<view class="hang-box" @click="goList">
<view class="">交易记录</view>
<u-icon name="arrow-right" size="18"></u-icon>
</view>
<view class="hang-box" @click="goRemark">
<view class="">备注</view>
<view class="b-a-s">{{formData.remarks}}</view>
<u-icon name="arrow-right" size="18"></u-icon>
</view>
</view>
<view class="bottom-anniu" @click="delStaffTerminal()" v-if="type==1">解除绑定</view>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue'
import request from '../../utils/request.js'
export default {
data() {
return {
titles: "设备信息",
sn: null,
formData: {},
type: 0,
staffId: null
}
},
onLoad(option) {
this.sn = option.sn
this.staffId = option.staffId
if (option.type) {
this.type = option.type
}
},
onShow() {
this.getDetail()
},
components: {
headers
},
methods: {
delStaffTerminal() {
request({
url: 'app/uaMer/delStaffTerminal/' + this.staffId + '/' + this.formData.terminalId,
method: 'post'
}).then(res => {
uni.navigateBack()
})
},
goRemark() {
uni.navigateTo({
url: '/homePages/Manage/remark?terminalId=' + this.formData.terminalId
})
},
getDetail() {
request({
url: 'app/uaMer/terminalDetail',
method: 'post',
data: {
sn: this.sn
},
}).then(res => {
this.formData = res.data
})
},
goList() {
uni.navigateTo({
url: '/homePages/Manage/CollectionList?sn=' + this.sn
})
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
height: 100vh;
}
.container {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
.hang-box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15px 20px;
border-bottom: 1px solid #dededf;
}
.anniu {
width: 100%;
background: #E4612E;
height: 50px;
position: fixed;
bottom: 0px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
.b-a-s {
width: 80%;
text-align: right;
}
.bottom-anniu {
width: 100%;
height: 50px;
background: #E4612E;
display: flex;
align-items: center;
justify-content: center;
color: white;
position: fixed;
bottom: 0px;
}
</style>