mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
加入设备扫码功能
This commit is contained in:
parent
394b10185f
commit
e610aae848
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
import {
|
||||
request
|
||||
request, requestNoAuth
|
||||
} from '../../lib/java110/java110Request.js'
|
||||
import
|
||||
url
|
||||
@ -45,4 +45,21 @@ export function getMachineTranslates(_objData) {
|
||||
});
|
||||
};
|
||||
|
||||
export function getMachines(_objData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
requestNoAuth({
|
||||
url: url.listEquipmentAccount,
|
||||
method: "GET",
|
||||
data:_objData,
|
||||
success: function(res) {
|
||||
let _data = res.data;
|
||||
resolve(_data);
|
||||
},
|
||||
fail: function(res) {
|
||||
reject(res);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -139,6 +139,11 @@
|
||||
name: '球场预约',
|
||||
src: this.imgUrl + '/h5/images/serve/order4.png',
|
||||
href: '/pages/appointment/appointment'
|
||||
},
|
||||
{
|
||||
name: '设备',
|
||||
src: this.imgUrl + '/h5/images/serve/order4.png',
|
||||
href: '/pages/machine/machine?machineId=102022110791780032'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@ -165,7 +165,8 @@ export default {
|
||||
bookingUnifiedPayment: baseUrl + "app/payment.unifiedPayment",
|
||||
|
||||
// 修改预约订单
|
||||
saveCommunitySpacePersonTime: baseUrl + "app/communitySpace.saveCommunitySpacePersonTime",
|
||||
saveCommunitySpacePersonTime: baseUrl + "app/communitySpace.saveCommunitySpacePersonTime",
|
||||
listEquipmentAccount:baseUrl +"app/equipmentAccount.listEquipmentAccount",
|
||||
|
||||
|
||||
|
||||
|
||||
11
pages.json
11
pages.json
@ -610,7 +610,16 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
,{
|
||||
"path" : "pages/machine/machine",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "设备说明",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#272636",
|
||||
"selectedColor": "#00AA00",
|
||||
|
||||
207
pages/machine/machine.vue
Normal file
207
pages/machine/machine.vue
Normal file
@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="block__title">设备信息</view>
|
||||
<view class="cu-list menu">
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">设备名称</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.machineName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">设备编码</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.machineCode}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">重要等级</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.levelName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">使用状态</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.stateName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">设备品牌</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.brand}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">设备型号</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.model}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">位置详情</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.locationDetail}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">首次启用时间</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.firstEnableTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">保修截止日期</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.warrantyDeadline}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">使用年限(年)</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.usefulLife}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">采购价格</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.purchasePrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">资产净值</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.netWorth}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">使用人</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.useUserName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">责任人</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.chargeUseName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="cuIcon-info text-green"></text>
|
||||
<text class="text-grey">备注</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{equipmentAccountDetail.remark}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="block__title">保养记录</view>
|
||||
<view class="block__title">巡检记录</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// pages/viewBindOwner/viewBindOwner.js
|
||||
import context from '../../lib/java110/Java110Context.js';
|
||||
const constant = context.constant;
|
||||
|
||||
import {getMachines} from '@/api/machine/machineApi.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineId:'',
|
||||
equipmentAccountDetail: {}
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function(options) {
|
||||
this.machineId = options.machineId;
|
||||
context.onLoad(options);
|
||||
this._loadMachine();
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function() {},
|
||||
methods: {
|
||||
_loadMachine: function() {
|
||||
let _that = this;
|
||||
getMachines({
|
||||
page:1,
|
||||
row:1,
|
||||
machineId:this.machineId
|
||||
}).then(_data=>{
|
||||
if(_data.data.length < 1){
|
||||
return ;
|
||||
}
|
||||
_that.equipmentAccountDetail = _data.data[0];
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.block__title {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(69, 90, 100, .6);
|
||||
padding: 60rpx 30rpx 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.button_up_blank {
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user