Browse Source

v1.1.13 formal&&merge clash

feat-230721
刘嘉炜 3 years ago
parent
commit
5cefcbd8d5
  1. 11
      .hbuilderx/launch.json
  2. 87
      src/components/order_list/retail/retail.vue
  3. 63
      src/components/order_list/ym_card/ym_card.vue
  4. 10
      src/components/site/order_modal/order_modal.vue
  5. 8
      src/js/api.js
  6. 2
      src/js/once_name.js
  7. 1
      src/js/server.js
  8. 36
      src/pages.json
  9. 26
      src/pages/order_list/order_list.vue
  10. 10
      src/pages/site/manage/manage.vue
  11. 6
      src/pages/write_off/operate/operate.vue
  12. 127
      src/pages/write_off/ym_card_gated/ym_card_gated.vue
  13. 193
      src/pages/write_off/ym_confirm/ym_confirm.vue
  14. 477
      src/subpackage/device/pages/air_conditioner/detail/detail.vue
  15. 200
      src/subpackage/device/pages/switch_manage/switch_manage.vue
  16. BIN
      src/subpackage/device/static/images/air_conditioner/close.png
  17. BIN
      src/subpackage/device/static/images/air_conditioner/heating.png
  18. BIN
      src/subpackage/device/static/images/air_conditioner/in_under_heating.png
  19. BIN
      src/subpackage/device/static/images/air_conditioner/lock.png
  20. BIN
      src/subpackage/device/static/images/air_conditioner/normal.png
  21. BIN
      src/subpackage/device/static/images/air_conditioner/open.png
  22. BIN
      src/subpackage/device/static/images/air_conditioner/refrigeration.png
  23. BIN
      src/subpackage/device/static/images/air_conditioner/switch.png
  24. BIN
      src/subpackage/device/static/images/air_conditioner/temp_add.png
  25. BIN
      src/subpackage/device/static/images/air_conditioner/temp_reduce.png
  26. BIN
      src/subpackage/device/static/images/air_conditioner/under_heating.png
  27. BIN
      src/subpackage/device/static/images/air_conditioner/ventilate.png
  28. BIN
      src/subpackage/device/static/images/air_conditioner/wind_0.png
  29. BIN
      src/subpackage/device/static/images/air_conditioner/wind_1.png
  30. BIN
      src/subpackage/device/static/images/air_conditioner/wind_2.png
  31. BIN
      src/subpackage/device/static/images/air_conditioner/wind_3.png
  32. 5
      src/subpackage/order/js/api.js
  33. 11
      src/subpackage/order/pages/mall/check_logistic/check_logistic.vue
  34. 11
      src/subpackage/order/pages/mall/refund_operate/refund_operate.vue
  35. 17
      src/subpackage/order/pages/mall/send_out/send_out.vue
  36. 4
      src/subpackage/order/pages/order_manage/order_manage.vue
  37. 140
      src/subpackage/order/pages/retail/detail/detail.vue
  38. 295
      src/subpackage/order/pages/ym_card/detail/detail.vue
  39. 112
      src/subpackage/order/pages/ym_card/use_record/use_record.vue
  40. BIN
      src/subpackage/order/static/images/order_manage/order_18.png
  41. BIN
      src/subpackage/order/static/images/order_manage/order_19.png
  42. BIN
      src/subpackage/order/static/images/ym_card/status_1.png
  43. BIN
      src/subpackage/order/static/images/ym_card/status_2.png
  44. BIN
      src/subpackage/order/static/images/ym_card/status_3.png

11
.hbuilderx/launch.json

@ -1,11 +0,0 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "remote"
}
}
]
}

87
src/components/order_list/retail/retail.vue

@ -0,0 +1,87 @@
<template>
<view class="retail-order" @click="toInfo">
<a-header :source="orderInfo.source || '-'" :status="getStatus(orderInfo.pay_status)"></a-header>
<!-- 商品名称: 操作人 购买时间: -->
<view class="ro-info">
<a-line :value="orderInfo.order_no || '-'">
<block slot="name">订单编号</block>
</a-line>
<a-line :value="getGoodsName || '-'">
<block slot="name">商品名称</block>
</a-line>
<a-line :value="orderInfo.sys_optuname || '-'">
<block slot="name">操作人</block>
</a-line>
<a-line :value="orderInfo.pay_time || '-'">
<block slot="name">购买时间</block>
</a-line>
</view>
<view class="ro-total"><text>合计支付</text>{{ orderInfo.pay_amount || 0 }}</view>
</view>
</template>
<script>
import util from '../../../utils/util';
import a_header from '../a_header/a_header.vue';
import a_line from '../a_line/a_line.vue';
export default {
computed: {
getGoodsName(){
let { orderInfo } = this;
let _ls = orderInfo&&orderInfo.retail_order_goods || [];
let _str = _ls.map(e=>e.name).join(';');
if(_ls.length)_str += ';'
return _str
}
},
components: {
'a-header': a_header,
'a-line': a_line,
},
props: {
orderInfo: {
default: {},
type: Object
}
},
methods: {
getStatus(status){
let _obj = {
1: '交易成功'
}
return _obj[status] || '-'
},
toInfo(){
let { orderInfo } = this;
util.routeTo(`/subpackage/order/pages/retail/detail/detail?order_no=${orderInfo.order_no}`, 'nT');
}
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.retail-order{
background-color: #fff;
padding: 0 20upx 20upx;
border-radius: 10upx;
}
.ro-info{
}
.ro-total{
line-height: 96upx;
font-size: 28upx;
color: #1a1a1a;
font-weight: 500;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
>text{
color: #9a9a9d;
font-weight: 400;
}
}
</style>

63
src/components/order_list/ym_card/ym_card.vue

@ -0,0 +1,63 @@
<template>
<view class="ym-card-container" @click="toInfo">
<a-header :source="orderInfo.extension.name || '-'" :status="statusTxt(orderInfo.status)"></a-header>
<view class="ycc-info">
<a-line :value="orderInfo.card_info.name || '-'">
<block slot="name">卡名称</block>
</a-line>
<a-line :value="orderInfo.card_no || '-'">
<block slot="name">年月卡号</block>
</a-line>
<a-line :value="orderInfo.mobile || '-'">
<block slot="name">手机号码</block>
</a-line>
<a-line :value="'至' + (orderInfo.expired_at || '-')">
<block slot="name">有效期</block>
</a-line>
</view>
</view>
</template>
<script>
import util from '../../../utils/util';
import a_header from '../a_header/a_header.vue';
import a_line from '../a_line/a_line.vue';
export default {
components: {
'a-header': a_header,
'a-line': a_line,
},
props: {
orderInfo: {
default: {
card_info: {},
extension: {}
},
}
},
methods: {
toInfo(){
let { orderInfo } = this;
util.routeTo(`/subpackage/order/pages/ym_card/detail/detail?id=${orderInfo.id}&card_no=${orderInfo.card_no}`, 'nT');
},
statusTxt(status){
let _obj = {
0: '待激活',
1: '使用中',
2: '已失效',
3: '已退卡',
}
return _obj[status] || '-'
}
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.ym-card-container{
background-color: #fff;
padding: 0 20upx 20upx;
border-radius: 10upx;
}
</style>

10
src/components/site/order_modal/order_modal.vue

@ -67,15 +67,21 @@
<view class="onl-view">预订信息</view> <view class="onl-view">预订信息</view>
</view> </view>
<view class="om-info-line"> <view class="om-info-line">
<view class="oil-view">固定场名称</view>
<view class="oil-view">
<view class="ov-view">{{ orderInfo.fix_name || '-' }}</view>
</view>
</view>
<view class="om-info-line">
<view class="oil-view">预订项目</view> <view class="oil-view">预订项目</view>
<view class="oil-view"> <view class="oil-view">
<view class="ov-view">{{ orderInfo.project || ' ' }}</view>
<view class="ov-view">{{ orderInfo.project || '-' }}</view>
</view> </view>
</view> </view>
<view class="om-info-line"> <view class="om-info-line">
<view class="oil-view">预订日期</view> <view class="oil-view">预订日期</view>
<view class="oil-view"> <view class="oil-view">
<view class="ov-view">{{ orderInfo.date || ' ' }}</view>
<view class="ov-view">{{ orderInfo.date || '-' }}</view>
</view> </view>
</view> </view>
<view class="om-info-line"> <view class="om-info-line">

8
src/js/api.js

@ -39,7 +39,11 @@ export const API = {
// hardwareOrderList: `${ORIGIN}/admin/stadium/hardware/order/list`, // 硬件管理-订单列表_copy // hardwareOrderList: `${ORIGIN}/admin/stadium/hardware/order/list`, // 硬件管理-订单列表_copy
hardwareOrderList: `${ORIGIN}/admin/assistant/hardware/order/list`, // 硬件管理-订单列表_copy hardwareOrderList: `${ORIGIN}/admin/assistant/hardware/order/list`, // 硬件管理-订单列表_copy
appointmentOrderList: `${ORIGIN}/admin/gameAppointment/orderList`, // 赛事订单列表_copy appointmentOrderList: `${ORIGIN}/admin/gameAppointment/orderList`, // 赛事订单列表_copy
shop2OrderList: `${ORIGIN}/admin/shop2/orderList`, // 商城订单 - 列表_copy
shop2OrderList: `${ORIGIN}/admin/shop2/orderList`, // 商城订单 - 列表_copy交易成功
retailOrderList: `${ORIGIN}/admin/erp/retailOrder/list`, // 订单管理-零售订单列表
// 20211112
userMonthlyCardLs: `${ORIGIN}/admin/userMonthlyCard/list`, // 列表用户年月卡-后台
// 营业额统计 // 营业额统计
turnoverBrand: `${ORIGIN}/admin/assistant/turnover/brand/calc`, // 营业额记录-品牌 turnoverBrand: `${ORIGIN}/admin/assistant/turnover/brand/calc`, // 营业额记录-品牌
@ -95,6 +99,8 @@ API['writeOff'] = {
listVerifyRecord: `${ORIGIN}/admin/stadium/order/listVerifyRecord`, // 核销记录 listVerifyRecord: `${ORIGIN}/admin/stadium/order/listVerifyRecord`, // 核销记录
enterVerifyOrder: `${ORIGIN}/admin/stadium/order/enterVerifyOrder`, // 商家助手-核销查询-输入验证码 enterVerifyOrder: `${ORIGIN}/admin/stadium/order/enterVerifyOrder`, // 商家助手-核销查询-输入验证码
assistantVerify: `${ORIGIN}/admin/stadium/order/assistantVerify`, // 商家助手-核销查询-核销 assistantVerify: `${ORIGIN}/admin/stadium/order/assistantVerify`, // 商家助手-核销查询-核销
userMonthlyCardVerify: `${ORIGIN}/admin/userMonthlyCard/verify`, // 年月卡核销-后台
userMonthlyCardOpenGate: `${ORIGIN}/admin/userMonthlyCard/openGate`, // 年月卡开门-后台
} }
export default { ORIGIN, API }; export default { ORIGIN, API };

2
src/js/once_name.js

@ -3,8 +3,10 @@
export const WRITE_OFF_STORE_INFO = 'stadium_list'; export const WRITE_OFF_STORE_INFO = 'stadium_list';
export const WRITE_OFF_ORDER_INFO = 'order_info'; export const WRITE_OFF_ORDER_INFO = 'order_info';
export const WRITE_OFF_YM_ORDER_INFO = 'ym_order_info'; // 年月卡订单核销
export default { export default {
WRITE_OFF_STORE_INFO, WRITE_OFF_STORE_INFO,
WRITE_OFF_ORDER_INFO, WRITE_OFF_ORDER_INFO,
WRITE_OFF_YM_ORDER_INFO
} }

1
src/js/server.js

@ -2,6 +2,7 @@ import util from '../utils/util';
// import { app as vm } from '../main'; // import { app as vm } from '../main';
const islog = true; const islog = true;
export class Server { export class Server {
request(url,data,method,header,isDefaultGet,failMsg){ request(url,data,method,header,isDefaultGet,failMsg){
return new Promise(async (rs,rj)=>{ return new Promise(async (rs,rj)=>{

36
src/pages.json

@ -134,6 +134,18 @@
} }
}, },
{ {
"path": "pages/write_off/ym_card_gated/ym_card_gated",
"style": {
"navigationBarTitleText": "核销订单"
}
},
{
"path": "pages/write_off/ym_confirm/ym_confirm",
"style": {
"navigationBarTitleText": "核销订单"
}
},
{
"path": "pages/write_off/confirm/confirm", "path": "pages/write_off/confirm/confirm",
"style": { "style": {
"navigationBarTitleText": "确认订单信息" "navigationBarTitleText": "确认订单信息"
@ -227,6 +239,12 @@
"root": "subpackage/device", "root": "subpackage/device",
"pages": [ "pages": [
{ {
"path": "pages/air_conditioner/detail/detail",
"style" : {
"navigationBarTitleText": "空调管理"
}
},
{
"path": "pages/index/index", "path": "pages/index/index",
"style" : { "style" : {
"navigationBarTitleText": "欧轩智能商家助手", "navigationBarTitleText": "欧轩智能商家助手",
@ -390,6 +408,24 @@
"root": "subpackage/order", "root": "subpackage/order",
"pages": [ "pages": [
{ {
"path": "pages/retail/detail/detail",
"style" : {
"navigationBarTitleText": "零售订单详情"
}
},
{
"path": "pages/ym_card/use_record/use_record",
"style" : {
"navigationBarTitleText": " 年月卡使用记录"
}
},
{
"path": "pages/ym_card/detail/detail",
"style" : {
"navigationBarTitleText": "年月卡详情"
}
},
{
"path": "pages/mall/refund_list/refund_list", "path": "pages/mall/refund_list/refund_list",
"style" : { "style" : {
"navigationBarTitleText": "退款" "navigationBarTitleText": "退款"

26
src/pages/order_list/order_list.vue

@ -62,13 +62,9 @@
<competition :order-info="e" v-if="orderType == 14"></competition> <competition :order-info="e" v-if="orderType == 14"></competition>
<mall v-if="orderType == 2" :order-info="e"></mall> <mall v-if="orderType == 2" :order-info="e"></mall>
<rent-and-sale v-if="orderType == 8" :order-info="e"></rent-and-sale> <rent-and-sale v-if="orderType == 8" :order-info="e"></rent-and-sale>
<retail v-if="orderType == 19" :order-info="e"></retail>
<ym-card v-if="orderType == 20" :order-info="e"></ym-card>
</view> </view>
<!-- <view class="ool-item">
<mall></mall>
</view>
<view class="ool-item">
<rent-and-sale></rent-and-sale>
</view> -->
</view> </view>
<view class="ol-order-null" v-else> <view class="ol-order-null" v-else>
@ -136,6 +132,8 @@
import mall from '../../components/order_list/mall/mall.vue'; import mall from '../../components/order_list/mall/mall.vue';
import device from '../../components/order_list/device/device.vue'; // // import device from '../../components/order_list/device/device.vue'; // //
import competition from '../../components/order_list/competition/competition.vue'; // import competition from '../../components/order_list/competition/competition.vue'; //
import retail from '../../components/order_list/retail/retail.vue'; //
import ym_card from '../../components/order_list/ym_card/ym_card.vue'; //
import util from '../../utils/util'; import util from '../../utils/util';
import { servers } from '../../js/server'; import { servers } from '../../js/server';
@ -160,9 +158,12 @@
'mall': mall, 'mall': mall,
'device': device, 'device': device,
'competition': competition, 'competition': competition,
'retail': retail,
'ym-card': ym_card,
}, },
computed:{ computed:{
isStoreInfo(){ isStoreInfo(){
let { orderType } = this; let { orderType } = this;
return ( return (
orderType == 3 || orderType == 4 || orderType == 3 || orderType == 4 ||
@ -172,7 +173,8 @@
orderType == 15 || orderType == 16 || orderType == 15 || orderType == 16 ||
orderType == 8 || orderType == 7 || orderType == 8 || orderType == 7 ||
orderType == 11 || orderType == 6 || orderType == 11 || orderType == 6 ||
orderType == 9
orderType == 9 || orderType == 19 ||
orderType == 20
) )
}, },
// //
@ -419,6 +421,8 @@
if(this.isDevice())return API.hardwareOrderList; // if(this.isDevice())return API.hardwareOrderList; //
if(type == 14)return API.appointmentOrderList; // if(type == 14)return API.appointmentOrderList; //
if(type == 2)return API.shop2OrderList; // if(type == 2)return API.shop2OrderList; //
if(type == 19)return API.retailOrderList; //
if(type == 20)return API.userMonthlyCardLs; // -
}, },
// //
isDevice(){ isDevice(){
@ -539,6 +543,10 @@
return '商城订单列表'; return '商城订单列表';
case 8: case 8:
return '租售柜订单列表'; return '租售柜订单列表';
case 19:
return '零售订单';
case 20:
return '年月卡订单';
default: default:
return '订单' return '订单'
} }
@ -578,6 +586,10 @@
return [ {id: 'assistant_all', name: '全部'}, {id: 1, name: '待发货'}, {id: 2, name: '已发货'}, {id: 3, name: '交易完成'}, {id: 'after_sale', name: '申请售后中'}, {id: 6, name: '退款完成'}]; return [ {id: 'assistant_all', name: '全部'}, {id: 1, name: '待发货'}, {id: 2, name: '已发货'}, {id: 3, name: '交易完成'}, {id: 'after_sale', name: '申请售后中'}, {id: 6, name: '退款完成'}];
case 8: // status 1,2,4 1 2 退4 5 case 8: // status 1,2,4 1 2 退4 5
return [ {id: '1,2,4', name: '全部'}, {id: 1, name: '租用中'}, {id: 2, name: '已完成'}, {id: 4, name: '已退款'},{id: 5, name: '已购买'}]; return [ {id: '1,2,4', name: '全部'}, {id: 1, name: '租用中'}, {id: 2, name: '已完成'}, {id: 4, name: '已退款'},{id: 5, name: '已购买'}];
case 19: // status status = 1
return [ {id: 1, name: '交易成功'} ];
case 20: // status 0,1,2,3 0 使 1 2 退 3
return [ {id: '', name: '全部'}, {id: 0, name: '待激活'}, {id: 1, name: '使用中'}, {id: 2, name: '已失效'},{id: 3, name: '已退卡'}];
default: default:
return [] return []
} }

10
src/pages/site/manage/manage.vue

@ -156,9 +156,15 @@ export default {
computed: { computed: {
// //
venueTimeList(){ venueTimeList(){
let { venueList } = this;
if(!venueList.length || !venueList[0] || !venueList[0].items || !venueList[0].items.length)return [];
// return [];
let _venueList = this.venueList || []
if(!_venueList.length || !_venueList[0] || !_venueList[0].items || !_venueList[0].items.length)return [];
let _obj = {}; let _obj = {};
let _items = _venueList[0].items, _tempArr;
_tempArr = _items.reduce((_arr, val)=>_arr.concat(val.durations.split('-')), []);
//
return [...new Set(_tempArr.splice(0, _tempArr.length-2)), _tempArr[_tempArr.length-1]];
return ([].concat(...venueList[0].items.map(e=>e.durations&&e.durations.split('-')))).filter(e=>{ return ([].concat(...venueList[0].items.map(e=>e.durations&&e.durations.split('-')))).filter(e=>{
let _bol = !!_obj[e]; let _bol = !!_obj[e];
!_bol?_obj[e] = true:''; !_bol?_obj[e] = true:'';

6
src/pages/write_off/operate/operate.vue

@ -101,7 +101,11 @@ export default {
util.hideLoad(); util.hideLoad();
if(res.data.code == 0){ if(res.data.code == 0){
let _data = res.data.data || {} let _data = res.data.data || {}
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data})
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data});
if(_data.extension&&_data.extension.verify_order_type === 'monthly_card'){
util.routeTo(`/pages/write_off/ym_confirm/ym_confirm?type=${type}`, 'nT');
return
}
util.routeTo(`/pages/write_off/confirm_order/confirm_order?type=${type}`, 'nT'); util.routeTo(`/pages/write_off/confirm_order/confirm_order?type=${type}`, 'nT');
}else{ }else{
util.routeTo(`/pages/write_off/null/null?type=${type}`, 'nT'); util.routeTo(`/pages/write_off/null/null?type=${type}`, 'nT');

127
src/pages/write_off/ym_card_gated/ym_card_gated.vue

@ -0,0 +1,127 @@
<template>
<view class="ym-card-gated">
<view class="ycg-stadium">{{ pageInfo.orderInfo.extension.stadium_name || '-' }}</view>
<view class="ycg-suc-tip">核销成功</view>
<view class="ycg-back-btn" @click="backBtn">返回继续核销</view>
<view class="ycg-open-tip" v-if="pageInfo.gates&&pageInfo.gates.length">如需开门请点击</view>
<view class="ycg-btn-ls">
<view class="ybl-item" v-for="(e, i) in pageInfo.gates" :key="i">
<view class="yi-name">{{ e.hardware_name || '-' }}</view>
<view class="yi-btn" @click="openBtn(e.id)">开门</view>
</view>
</view>
</view>
</template>
<script>
import { API } from '../../../js/api';
import { servers } from '../../../js/server';
import { WRITE_OFF_YM_ORDER_INFO } from '../../../js/once_name';
import util from '../../../utils/util';
export default {
data(){
return {
pageInfo: {
orderInfo: { extension: {} },
gates: [],
}
}
},
onLoad(options){
util.$_once(WRITE_OFF_YM_ORDER_INFO, data => {
console.warn(data)
this.pageInfo = data;
})
},
methods: {
backBtn(){
util.routeTo();
},
openBtn: util.debounce(function(id){
let { pageInfo } = this;
util.showLoad();
servers.get({
url: API.writeOff.userMonthlyCardOpenGate,
data: { gate_id: id, card_no: pageInfo.orderInfo.card_no },
isDefaultGet: false
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
}else{
util.showNone(res.data.message || '操作失败!');
}
})
.catch(util.hideLoad)
}, 300, true)
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
page{
background-color: #fff;
}
.ym-card-gated{
padding: 0 30upx;
.ycg-stadium{
padding: 30upx 0;
font-size: 32upx;
color: #1a1a1a;
border-bottom: 2upx solid #E5E5E5;
}
.ycg-suc-tip{
padding: 100upx 0 200upx;
text-align: center;
line-height: 60upx;
font-size: 50upx;
color: #333;
}
.ycg-back-btn{
margin: 0 auto 50upx;
width: 250upx;
height: 88upx;
line-height: 88upx;
text-align: center;
font-size: 32upx;
color: $themeColor;
border: 2upx solid $themeColor;
border-radius: 6upx;
}
.ycg-open-tip{
margin-bottom: 50upx;
font-size: 24upx;
line-height: 32upx;
color: #9a9a9d;
}
.ycg-btn-ls{
padding: 0 24upx;
.ybl-item{
border-bottom: 2upx solid #f2f2f7;
padding: 30upx 0;
@include centerFlex(space-between);
.yi-name{
flex-grow: 1;
font-size: 28upx;
line-height: 32upx;
color: #333;
@include textHide(1);
}
.yi-btn{
flex-shrink: 0;
margin-left: 20upx;
width: 128upx;
height: 66upx;
line-height: 66upx;
font-size: 32upx;
text-align: center;
border-radius: 10upx;
background-color: $themeColor;
color: #fff;
}
}
}
}
</style>

193
src/pages/write_off/ym_confirm/ym_confirm.vue

@ -0,0 +1,193 @@
<template>
<view class="ym-confirm">
<view class="yc-header">
<view class="yh-stadium">{{ orderInfo.extension.stadium_name || '-' }}</view>
<view class="yh-info">
<view>今天剩余可使用{{ orderInfo.extension.rest_number || '0' }}</view>
<view>进场状态<text>{{ orderInfo.enter_status == 0?'离场':orderInfo.enter_status == 1?'进场':'' }}</text></view>
<view v-if="orderInfo.enter_status == 1">进场时间{{ orderInfo.latest_enter_time || '-' }}</view>
</view>
</view>
<view class="yc-user-info">
<view class="yui-tit">持卡人信息</view>
<view class="yui-line">手机号码{{ orderInfo.mobile || '-' }}</view>
<view class="yui-line">用户昵称{{ orderInfo.nickname || '-' }}</view>
</view>
<view class="yc-photo" v-if="!!orderInfo.user_face">
<view>照片</view>
<image mode="aspectFit" @click="previewImg(orderInfo.user_face)" :src="orderInfo.user_face"></image>
</view>
<view class="yc-card-mes">
<view class="ycm-tit">年月卡信息</view>
<view class="ycm-line">年月卡名称{{ orderInfo.card_info.name || '-' }}</view>
<view class="ycm-line">年月卡卡号{{ orderInfo.card_no || '-' }}</view>
<view class="ycm-line">验证码{{ orderInfo.verify_code || '-' }}</view>
<view class="ycm-line">生成时间{{ orderInfo.created_at || '-' }}</view>
<view class="ycm-line">失效时间{{ orderInfo.expired_at || '-' }}</view>
</view>
<view class="yc-btns">
<view class="green" @click="confirmBtn">确认核销</view>
<!-- <view>仅核销</view> -->
</view>
</view>
</template>
<script>
import util from '../../../utils/util';
import { API } from '../../../js/api';
import { servers } from '../../../js/server';
import { WRITE_OFF_YM_ORDER_INFO, WRITE_OFF_ORDER_INFO } from '../../../js/once_name';
export default {
data(){
return {
type: '', // verify_code -> 5: () | decrypt_text -> 6: ()
orderInfo: {
extension: {},
card_info: {}
}
}
},
onLoad(options){
if(options.type)this.type = options.type || '';
util.$_once(WRITE_OFF_ORDER_INFO, data => {
console.warn(data)
this.orderInfo = data;
})
},
methods: {
previewImg(url){
if(!url)return
uni.previewImage({ urls: [ url ] });
},
confirmBtn: util.debounce(function(){
let { orderInfo, type } = this;
servers.post({
url: API.writeOff.userMonthlyCardVerify,
data: {
brand_id: orderInfo.brand_id,
card_no: orderInfo.card_no,
stadium_id: orderInfo.stadium_id,
type: type == 'verify_code'? 5 : 6,
},
isDefaultGet: false,
})
.then(res=>{
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
let { orderInfo } = this;
let _ls = res.data.data&&res.data.data.gates || [];
setTimeout(_=>{
util.$_emit(WRITE_OFF_YM_ORDER_INFO, {
orderInfo,
gates: _ls
});
util.routeTo(`/pages/write_off/ym_card_gated/ym_card_gated`, 'rT');
}, 1200);
}else{
util.showNone(res.data.message || '操作失败!');
}
})
}, 300, true)
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
page{
background-color: #fff;
}
.ym-confirm{
padding-bottom: 24upx;
padding-bottom: calc( 24upx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
padding-bottom: calc( 24upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
.yc-header{
padding: 0 30upx;
border-bottom: 2upx solid #f2f2f7;
.yh-stadium{
padding: 30upx 0;
font-size: 32upx;
color: #1a1a1a;
border-bottom: 2upx solid #E5E5E5;
}
.yh-info{
padding: 20upx 0;
>view{
margin-bottom: 10upx;
font-size: 28upx;
line-height: 52upx;
color: #333333;
@include textHide(1);
>text{
color: $themeColor;
}
}
}
}
.yc-user-info{
padding: 30upx;
border-bottom: 2upx solid #f2f2f7;
.yui-tit{
margin-bottom: 20upx;
font-size: 28upx;
line-height: 52upx;
color: #9C9C9F;
}
.yui-line{
font-size: 28upx;
line-height: 52upx;
color: #333;
@include textHide(1);
}
}
.yc-photo{
display: flex;
padding: 30upx;
border-bottom: 2upx solid #f2f2f7;
>view{
margin-right: 50upx;
font-size: 28upx;
line-height: 52upx;
color: #9c9c9f;
}
>image{
flex-shrink: 0;
width: 218upx;
height: 218upx;
border-radius: 10upx;
}
}
.yc-card-mes{
padding: 30upx 30upx 0;
.ycm-tit{
margin-bottom: 20upx;
line-height: 52upx;
color: #9c9c9f;
}
.ycm-line{
line-height: 52upx;
font-size: 28upx;
color: #333;
@include textHide(1);
}
}
.yc-btns{
padding: 152upx 64upx 24upx;
>view{
margin-bottom: 24upx;
line-height: 108upx;
text-align: center;
border-radius: 10upx;
border: 2upx solid $themeColor;
font-size: 32upx;
color: $themeColor;
&.green{
background-color: $themeColor;
color: #fff;
}
}
}
}
</style>

477
src/subpackage/device/pages/air_conditioner/detail/detail.vue

@ -0,0 +1,477 @@
<template>
<view class="air-conditioner-detail">
<view class="acd-tit">{{ airName || '-' }}</view>
<view class="acd-panel">
<view class="ap-top-info">
<view class="ati-box ati-temp">
<view class="ab-tit">温度</view>
<view class="at-info">
<view class="ai-btn">
<image mode="aspectFit" :src="getIconPath('temp_add')" @click="tempBtn('add')"></image>
</view>
<view class="ai-temp">
<view class="at-num">{{ pageInfo.temperature || 0 }}</view>
<view class="at-unit"></view>
</view>
<view class="ai-btn">
<image mode="aspectFit" :src="getIconPath('temp_reduce')" @click="tempBtn('reduce')"></image>
</view>
</view>
</view>
<view class="ati-box ati-wind">
<view class="ab-tit">风速</view>
<!-- 1: 低速 234自动 -->
<view class="aw-txt">{{ getSpeedName(pageInfo.speed || 0) }}</view>
</view>
</view>
<view class="ap-btns">
<view class="ab-item" @click="operateBtn({ op: 'on' })">
<image mode="aspectFit" :src="getIconPath('open')"></image>
<view></view>
</view>
<view class="ab-item" @click="operateBtn({ op: 'off' })">
<image mode="aspectFit" :src="getIconPath('close')"></image>
<view></view>
</view>
</view>
</view>
<view class="acd-btn-ls">
<view class="abl-tit">模式</view>
<view class="abl-ls">
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in modelLs" :key="i" @click="operateBtn({ op: 'mode', ext: e.mode })">
<view class="ai-icon" :class="[e.mode == pageInfo.mode? 'active': '']">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view>
<view class="ai-txt">{{ e.name || '-' }}</view>
</view>
</view>
</view>
<view class="acd-btn-ls">
<view class="abl-tit">风速</view>
<view class="abl-ls">
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in airSpeedLs" :key="i" @click="operateBtn({ op: 'speed', ext: e.speed })">
<view class="ai-icon" :class="[e.speed == pageInfo.speed? 'active': '']">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view>
<view class="ai-txt">{{ e.name || '-' }}</view>
</view>
</view>
</view>
<!-- 后台水阀的不管 隐藏掉 -->
<!-- <view class="acd-btn-ls">
<view class="abl-tit">水阀</view>
<view class="abl-ls">
<view class="al-item" v-for="(e, i) in hydrovalveLs" :key="i">
<view class="ai-icon">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view>
<view class="ai-txt">{{ e.name || '-' }}</view>
</view>
</view>
</view> -->
<view class="acd-btn-ls">
<view class="abl-tit">允许使用按钮</view>
<view class="abl-ls">
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in allowLs" :key="i" @click="operateBtn({ op: e.op })">
<view class="ai-icon">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view>
<view class="ai-txt">{{ e.name || '-' }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import deviceServer from '../../../js/device_server';
import deviceApi from '../../../js/device_api';
import util from '../../../../../utils/util';
/*
+ info 获取信息状态
+ st 设置温度(value:{op:"st",ext:"24"}) 10 - 50
+ mode 模式设置(value:{op:"mode",ext:"1"}) // 0 1() 239
+ speed 风速设置(value:{op:"speed",ext:"1"}) // 1: 234
+ lock
+ unlock 解锁
+ on
+ off
*/
export default {
computed: {
modelLs(){
return ([
{
id: 1,
name: '内机制热',
icon: 'heating',
mode: 0,
},
{
id: 2,
name: '内机地暖 制热',
icon: 'in_under_heating',
mode: 1,
},
{
id: 3,
name: '地暖制热',
icon: 'under_heating',
mode: 2,
},
{
id: 4,
name: '制冷',
icon: 'refrigeration',
mode: 3,
},
{
id: 5,
name: '通风',
icon: 'ventilate',
mode: 9,
},
])
},
airSpeedLs(){
return ([
{
id: 1,
name: '高',
icon: 'wind_3',
speed: 3,
},
{
id: 2,
name: '中',
icon: 'wind_2',
speed: 2,
},
{
id: 3,
name: '低',
icon: 'wind_1',
speed: 1,
},
{
id: 4,
name: '自动',
icon: 'wind_0',
speed: 4,
},
])
},
hydrovalveLs(){
return ([
{
id: 1,
name: '开',
icon: 'open'
},
{
id: 2,
name: '关',
icon: 'close'
},
])
},
allowLs(){
return ([
{
id: 2,
name: '开机',
icon: 'switch',
op: 'on',
},
{
id: 3,
name: '关机',
icon: 'close',
op: 'off',
},
{
id: 1,
name: '解锁',
icon: 'normal',
op: 'unlock',
},
{
id: 4,
name: '全锁',
icon: 'lock',
op: 'lock',
},
])
},
},
data(){
return {
subpackInfo: {},
pageInfo: {},
airName: ''
}
},
onLoad(options){
console.warn('qrstr', options.qrstr);
if(options.name)this.airName = options.name;
let _qyObj = null;
try{
_qyObj = util.jsonPar(options.qrstr);
}catch(err){
console.warn('json ERR', err);
}
if(!_qyObj)return;
console.warn('_qyObj', _qyObj);
_qyObj = this.setExt({ query: _qyObj, value: '', });
this.subpackInfo = _qyObj;
this.operateReq({ data: _qyObj, isTip: false });
},
methods: {
tempBtn: util.debounce(function(type){
let { pageInfo } = this;
let _num = pageInfo.temperature || 0;
_num = type == 'add' ? ++_num : type == 'reduce' ? --_num : _num;
this.operateReq({ data: this.getOperateData({ op: 'st', ext: _num }), isTip: false });
}, 300, true),
operateBtn: util.debounce(function({ op='', ext='' }){
let { subpackInfo } = this;
this.operateReq({
data: this.getOperateData({ op, ext })
})
.then(res=>{
if(res == 'success'){
setTimeout(_=>{
this.operateReq({ data: this.getOperateData({ op: 'st', }), isTip: false });
}, 1200)
}
})
}, 300, true),
getOperateData({ op='', ext='' }){
let { subpackInfo } = this;
let _obj = null;
_obj = this.setOp({ query: subpackInfo, value: op, });
_obj = this.setExt({ query: subpackInfo, value: ext, });
return _obj;
},
getSpeedName(speed){
switch(+speed){
case 1:
return '低速'
case 2:
return '中速'
case 3:
return '高速'
case 4:
return '自动'
default:
return '-'
}
},
setExt({query, value}){
if(query.data.toString() !== '[object Object]')query.data = {};
if(query.data.value.toString() !== '[object Object]')query.data.value = {};
query.data&&query.data.value&&(query.data.value.ext = value);
return query;
},
setOp({query, value}){
if(query.data.toString() !== '[object Object]')query.data = {};
if(query.data.value.toString() !== '[object Object]')query.data.value = {};
query.data&&query.data.value&&(query.data.value.op = value);
return query;
},
getIconPath(iconName){
if(!iconName)return '';
return `/subpackage/device/static/images/air_conditioner/${iconName}.png`
},
//
operateReq({data, isTip=true, isLoad=true}){
if(isLoad)util.showLoad();
return deviceServer.post({
url: deviceApi.ouxuanac,
data: data,
isDefaultGet: false,
})
.then(res=>{
if(isLoad)util.hideLoad();
if(res.data.code == 0){
if(isTip)util.showNone(res.data.message || '操作成功!');
if(data.data&&data.data.value&&data.data.value.op === 'info')this.pageInfo = res.data.data || {};
return 'success'
}else{
if(isTip)util.showNone(res.data.message || '操作失败!');
return 'fail';
}
})
.catch(err=>{if(isLoad)util.hideLoad()})
},
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.air-conditioner-detail{
padding: 40upx;
.acd-tit{
margin-bottom: 40upx;
font-size: 44upx;
font-weight: 500;
color: #333;
}
.acd-panel{
margin-bottom: 60upx;
padding: 24upx 14upx 50upx;
border-radius: 10upx;
background-color: #fff;
.ap-top-info{
margin-bottom: 64upx;
flex-wrap: nowrap;
@include centerFlex(center);
.ati-box{
flex-shrink: 0;
max-width: 50%;
margin: 0 10upx;
padding: 12upx 20upx;
flex-grow: 1;
height: 178upx;
border-radius: 4upx;
background-color: #f2f2f7;
.ab-tit{
font-size: 28upx;
line-height: 40upx;
color: #9c9c9f;
}
}
.ati-temp{
.at-info{
@include centerFlex(space-between);
.ai-btn{
flex-shrink: 0;
width: 24upx;
height: 24upx;
>image{
width: 100%;
height: 100%;
}
}
.ai-temp{
display: flex;
justify-content: center;
align-items: center;
.at-num{
line-height: 112upx;
font-weight: 500;
font-size: 80upx;
color: $themeColor;
@include textHide(1);
}
.at-unit{
flex-shrink: 0;
padding-top: 10upx;
align-self: flex-start;
font-size: 28upx;
line-height: 40upx;
color: $themeColor;
}
}
}
}
.ati-wind{
.aw-txt{
line-height: 90upx;
text-align: center;
font-weight: 500;
font-size: 64upx;
color: $themeColor;
}
}
}
.ap-btns{
@include centerFlex(center);
.ab-item{
margin: 0 60upx;
>image{
margin: 0 auto 20upx;
display: block;
width: 100upx;
height: 100upx;
}
>view{
margin: 0 auto;
text-align: center;
font-size: 24upx;
line-height: 34upx;
color: #9a9a9d;
}
}
}
}
.acd-btn-ls{
width: 100%;
margin-bottom: 50upx;
.abl-tit{
margin-bottom: 28upx;
line-height: 40upx;
font-size: 28upx;
color: #9c9c9f;
}
.abl-ls{
display: flex;
flex-wrap: wrap;
.al-item{
margin-bottom: 24upx;
width: 116upx;
flex-shrink: 0;
flex-grow: 0;
&:not(:nth-child(5n)){
margin-right: 20upx;
}
&.acd-hover-active{
.ai-icon{
&::after{
position: absolute;
content: '';
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba($color: #000000, $alpha: .3);
}
}
}
.ai-icon{
position: relative;
margin: 0 auto 14upx;
width: 116upx;
height: 116upx;
border-radius: 10upx;
background-color: #fff;
overflow: hidden;
@include centerFlex(center);
>image{
width: 60upx;
height: 60upx;
}
&.active{
border: 2upx solid $themeColor;
}
}
.ai-txt{
text-align: center;
text-align: center;
line-height: 40upx;
font-size: 28upx;
color: #1a1a1a;
@include textHide(2);
}
}
}
}
}
</style>

200
src/subpackage/device/pages/switch_manage/switch_manage.vue

@ -46,6 +46,10 @@
<view >{{pageInfo.detailName || '-'}}</view> <view >{{pageInfo.detailName || '-'}}</view>
</view> </view>
</view> </view>
<view class="si-detail-btn" v-if="isDetailBtn(e)" @click="toDeviceDetail(e)">
<text>详情</text>
<image mode="aspectFit" src="/subpackage/device/static/images/arrow_b2.png"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -58,84 +62,7 @@
import store_name from '../../components/store_name/store_name'; import store_name from '../../components/store_name/store_name';
import deviceServer from '../../js/device_server'; import deviceServer from '../../js/device_server';
import deviceApi from '../../js/device_api'; import deviceApi from '../../js/device_api';
const showArr = {
's1': {
id: 1, name: '照明管理', isOpen: true, isClose: true, isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', longOpenName: '长开', timingName: '定时', hardware_type: 'Light',iconNum:4
},
's2': {
id: 2, name: '空调管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'Air',iconNum:2
},
's3': {
id: 3, name: '风扇管理', isOpen: true, isClose: true, isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', hardware_type: 'Fan',longOpenName: '长开', timingName: '定时',iconNum:4,
},
's4': {
id: 4, name: '门禁管理', isOpen: true, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'AccessControl',iconNum:2
},
's5': {
id: 5, name: '门闸管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/in.png',
closeIcon: '/subpackage/device/static/images/out.png',
openName: '进', closeName: '出', hardware_type: 'GateControl',iconNum:2
},
's6': {//TODO
id: 6, name: '平板管理', isOpen: false, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'Router4G',iconNum:2
},
's11': {
id: 11, name: '水阀管理', isOpen: true, isClose: true,isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', hardware_type: 'WaterValve',longOpenName: '长开', timingName: '定时',iconNum:4,
},
's12': {
id: 12, name: '互动设备管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: '',iconNum:2
},
's13': {//TODO
id: 13, name: '监控管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
},
's17': {//TODO
id: 17, name: '窗帘管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
},
's18': {
id: 18, name: '路由器管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
},
's19': {
id: 19, name: '物联卡管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
},
}
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import util from '../../../../utils/util'; import util from '../../../../utils/util';
@ -180,7 +107,7 @@ export default {
} }
}, },
onLoad(options){ onLoad(options){
let _pageInfo = showArr[`s${options.sid}`] || {};
let _pageInfo = getShowArr(`s${options.sid}`) || {};
this.pageInfo = _pageInfo; this.pageInfo = _pageInfo;
uni.setNavigationBarTitle({ title: _pageInfo.name }); uni.setNavigationBarTitle({ title: _pageInfo.name });
@ -190,7 +117,21 @@ export default {
}) })
}, },
methods: { methods: {
isDetailBtn(e){
if(e&&e.toString() === "[object Object]"){
return e.hardware_model == 'XiaoHuiXiong'
}
return false;
},
toDeviceDetail(e){
console.warn(e);
console.warn(this.getSwitchStatusQuery(e));
let _queryObj = this.getSwitchStatusQuery(e) || {};
if(!_queryObj.data || !_queryObj.data.name || !_queryObj.data.value)return;
_queryObj.data.value&&_queryObj.data.value.op&&(_queryObj.data.value.op = 'info');
let _qrStr = util.jsonStr(_queryObj);
if(e.hardware_type == "Air")return util.routeTo(`/subpackage/device/pages/air_conditioner/detail/detail?qrstr=${_qrStr}&name=${e.hardware_name || '-'}`, 'nT');
},
getDeviceList({ getDeviceList({
stadium_id, stadium_id,
hardware_type, hardware_type,
@ -405,7 +346,7 @@ export default {
// status -> 0 -> 1 -> // status -> 0 -> 1 ->
// src\subpackage\device\js\ouxuanac.md // src\subpackage\device\js\ouxuanac.md
// hardware_type === 'Air' // hardware_type === 'Air'
getSwitchQuery({ switchInfo, status }){
getSwitchQuery({ switchInfo, status = '' }){
let { let {
hardware_connect_method, hardware_connect_method,
hardware_type, hardware_type,
@ -486,7 +427,8 @@ export default {
let _obj = { let _obj = {
'acmelec': 'acmelec', 'acmelec': 'acmelec',
'zhongnan': 'zhongnan', 'zhongnan': 'zhongnan',
'jianda': 'ray-air-rs'
'jianda': 'ray-air-rs',
"xiaohuixiong":"xhx-lora-air-tcp"
}; };
return _obj[this.changeLowerCase(hardware_model)] || ''; return _obj[this.changeLowerCase(hardware_model)] || '';
}, },
@ -497,6 +439,88 @@ export default {
} }
} }
} }
function getShowArr(key){
let _obj = {
's1': {
id: 1, name: '照明管理', isOpen: true, isClose: true, isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', longOpenName: '长开', timingName: '定时', hardware_type: 'Light',iconNum:4
},
's2': {
id: 2, name: '空调管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'Air',iconNum:2
},
's3': {
id: 3, name: '风扇管理', isOpen: true, isClose: true, isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', hardware_type: 'Fan',longOpenName: '长开', timingName: '定时',iconNum:4,
},
's4': {
id: 4, name: '门禁管理', isOpen: true, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'AccessControl',iconNum:2
},
's5': {
id: 5, name: '门闸管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/in.png',
closeIcon: '/subpackage/device/static/images/out.png',
openName: '进', closeName: '出', hardware_type: 'GateControl',iconNum:2
},
's6': {//TODO
id: 6, name: '平板管理', isOpen: false, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'Router4G',iconNum:2
},
's11': {
id: 11, name: '水阀管理', isOpen: true, isClose: true,isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', hardware_type: 'WaterValve',longOpenName: '长开', timingName: '定时',iconNum:4,
},
's12': {
id: 12, name: '互动设备管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: '',iconNum:2
},
's13': {//TODO
id: 13, name: '监控管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
},
's17': {//TODO
id: 17, name: '窗帘管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
},
's18': {
id: 18, name: '路由器管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
},
's19': {
id: 19, name: '物联卡管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
},
}
return _obj[key] || {}
}
</script> </script>
<style lang="scss"> <style lang="scss">
@ -630,6 +654,20 @@ export default {
} }
} }
.si-detail-btn{
height: 82upx;
line-height: 82upx;
text-align: center;
font-size: 28upx;
color: #333;
border-top: 2upx solid #F2F2F7;
>image{
margin-left: 10upx;
width: 24upx;
height: 24upx;
vertical-align: middle;
}
}
} }
} }
</style> </style>

BIN
src/subpackage/device/static/images/air_conditioner/close.png

After

Width: 200  |  Height: 200  |  Size: 4.2 KiB

BIN
src/subpackage/device/static/images/air_conditioner/heating.png

After

Width: 120  |  Height: 120  |  Size: 1.8 KiB

BIN
src/subpackage/device/static/images/air_conditioner/in_under_heating.png

After

Width: 120  |  Height: 120  |  Size: 2.1 KiB

BIN
src/subpackage/device/static/images/air_conditioner/lock.png

After

Width: 120  |  Height: 120  |  Size: 1.1 KiB

BIN
src/subpackage/device/static/images/air_conditioner/normal.png

After

Width: 120  |  Height: 120  |  Size: 2.4 KiB

BIN
src/subpackage/device/static/images/air_conditioner/open.png

After

Width: 200  |  Height: 200  |  Size: 3.1 KiB

BIN
src/subpackage/device/static/images/air_conditioner/refrigeration.png

After

Width: 120  |  Height: 120  |  Size: 1.4 KiB

BIN
src/subpackage/device/static/images/air_conditioner/switch.png

After

Width: 120  |  Height: 120  |  Size: 1.1 KiB

BIN
src/subpackage/device/static/images/air_conditioner/temp_add.png

After

Width: 56  |  Height: 56  |  Size: 291 B

BIN
src/subpackage/device/static/images/air_conditioner/temp_reduce.png

After

Width: 48  |  Height: 48  |  Size: 193 B

BIN
src/subpackage/device/static/images/air_conditioner/under_heating.png

After

Width: 120  |  Height: 120  |  Size: 920 B

BIN
src/subpackage/device/static/images/air_conditioner/ventilate.png

After

Width: 120  |  Height: 120  |  Size: 940 B

BIN
src/subpackage/device/static/images/air_conditioner/wind_0.png

After

Width: 120  |  Height: 120  |  Size: 719 B

BIN
src/subpackage/device/static/images/air_conditioner/wind_1.png

After

Width: 120  |  Height: 120  |  Size: 656 B

BIN
src/subpackage/device/static/images/air_conditioner/wind_2.png

After

Width: 120  |  Height: 120  |  Size: 795 B

BIN
src/subpackage/device/static/images/air_conditioner/wind_3.png

After

Width: 120  |  Height: 120  |  Size: 691 B

5
src/subpackage/order/js/api.js

@ -23,6 +23,11 @@ export const ORDER_API = {
orderGoodsRefund:`${ORIGIN}/admin/shop2/orderGoodsRefund`, // 商城-商品退款_copy orderGoodsRefund:`${ORIGIN}/admin/shop2/orderGoodsRefund`, // 商城-商品退款_copy
rentballOrderEnd:`${ORIGIN}/admin/assistant/rentball/order/end`, // 租球机-结束计费 rentballOrderEnd:`${ORIGIN}/admin/assistant/rentball/order/end`, // 租球机-结束计费
leaseOrderEnd:`${ORIGIN}/admin/stadium/leaseOrder/endBill`, // 租售柜-结束计费 leaseOrderEnd:`${ORIGIN}/admin/stadium/leaseOrder/endBill`, // 租售柜-结束计费
retailOrderInfo:`${ORIGIN}/admin/erp/retailOrder/info`, // 订单管理-零售订单详情
userMonthlyCardInfo:`${ORIGIN}/admin/userMonthlyCard/get`, // 详情用户年月卡-后台
ymCardInfoFace:`${ORIGIN}/upload/file/ym_card_face`, // 年月卡用户头像上传
ymCardInfoFaceSave:`${ORIGIN}/admin/userMonthlyCard/updateFace`, // 年月卡用户头像保存
ymCardUsage:`${ORIGIN}/admin/userMonthlyCard/usages`, // 用户年月卡使用记录-后台
} }

11
src/subpackage/order/pages/mall/check_logistic/check_logistic.vue

@ -13,7 +13,7 @@
<view>{{ k.product_name || '-' }}</view> <view>{{ k.product_name || '-' }}</view>
</view> </view>
</view> </view>
<view class="pi-total">{{ e.logistics_product_lite_list.length || 0 }}件商品</view>
<view class="pi-total">{{ totalGoodsNum || 0 }}件商品</view>
</view> </view>
</view> </view>
</view> </view>
@ -32,6 +32,15 @@ export default {
} }
return [] return []
}, },
totalGoodsNum(){
let { orderInfo } = this;
if(!orderInfo)return 0;
let _ls = orderInfo.product_order_goods || [];
return _ls.reduce((total, item)=>{
total += +item.product_nums || 0;
return total
}, 0)
}
}, },
onLoad(options){ onLoad(options){
this.getInfo(options.order_no); this.getInfo(options.order_no);

11
src/subpackage/order/pages/mall/refund_operate/refund_operate.vue

@ -17,7 +17,7 @@
</view> </view>
<view class="rgi-total"> <view class="rgi-total">
<text>{{ refundLs.length || 0 }}</text>
<text>{{ totalGoodsNum || 0 }}</text>
<!-- <image v-if="refundLs.length > 1" mode="aspectFit" src="/subpackage/order/static/images/arrow.png"></image> --> <!-- <image v-if="refundLs.length > 1" mode="aspectFit" src="/subpackage/order/static/images/arrow.png"></image> -->
</view> </view>
</view> </view>
@ -69,6 +69,15 @@ export default {
// return _selectedArr.includes((ele.product_id + '')); // return _selectedArr.includes((ele.product_id + ''));
// }) // })
}, },
totalGoodsNum(){
let { orderInfo } = this;
if(!orderInfo)return 0;
let _ls = orderInfo.product_order_goods || [];
return _ls.reduce((total, item)=>{
total += +item.product_nums || 0;
return total
}, 0)
}
}, },
data(){ data(){
return { return {

17
src/subpackage/order/pages/mall/send_out/send_out.vue

@ -47,11 +47,14 @@
<image mode="aspecfFill" :src="e.product_imgs"></image> <image mode="aspecfFill" :src="e.product_imgs"></image>
<view class="oi-info"> <view class="oi-info">
<view class="oi-tit">{{ e.product_name || '-' }}</view> <view class="oi-tit">{{ e.product_name || '-' }}</view>
<view class="oi-spec" v-if="e.product_spec_multi_info&&e.product_spec_multi_info.spec_info&&e.product_spec_multi_info.spec_info.length">
<view class="oi-spec">
<block v-if="e.product_spec_multi_info&&e.product_spec_multi_info.spec_info&&e.product_spec_multi_info.spec_info.length">
<block v-for="(k, j) in e.product_spec_multi_info.spec_info" :key="j"> <block v-for="(k, j) in e.product_spec_multi_info.spec_info" :key="j">
{{ k + ';' }} {{ k + ';' }}
</block> </block>
</block>
</view> </view>
<view class="oi-amount">×{{ e.product_nums || 0 }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -141,7 +144,7 @@
<view>{{ k.product_name || '-' }}</view> <view>{{ k.product_name || '-' }}</view>
</view> </view>
</view> </view>
<view class="pi-total">{{ e.logistics_product_lite_list.length || 0 }}件商品</view>
<view class="pi-total">{{ e.logistics_product_total || 0 }}件商品</view>
</view> </view>
</view> </view>
@ -495,6 +498,7 @@ export default {
} }
.oi-info{ .oi-info{
align-self: flex-start; align-self: flex-start;
flex-grow: 1;
.oi-tit{ .oi-tit{
margin-bottom: 12upx; margin-bottom: 12upx;
line-height: 40upx; line-height: 40upx;
@ -503,12 +507,21 @@ export default {
@include textHide(2); @include textHide(2);
} }
.oi-spec{ .oi-spec{
height: 34upx;
line-height: 34upx;
font-size: 24upx;
color: #1a1a1a;
@include textHide(1);
}
.oi-amount{
line-height: 34upx; line-height: 34upx;
font-size: 24upx; font-size: 24upx;
color: #9a9a9d; color: #9a9a9d;
text-align: right;
@include textHide(1); @include textHide(1);
} }
} }
} }
} }
} }

4
src/subpackage/order/pages/order_manage/order_manage.vue

@ -38,7 +38,7 @@ export default {
util.routeTo(getTabRoutePath() + `?order_type=${ele.orderType}`,'nT'); util.routeTo(getTabRoutePath() + `?order_type=${ele.orderType}`,'nT');
}, },
isFinish(key){ isFinish(key){
let _endKeyArr = [ 1, 2, 3, 4, 5, 7, 9, 10, 14, 16, 15, 13, 6, 8, 11, 12 ];
let _endKeyArr = [ 1, 2, 3, 4, 5, 7, 9, 10, 14, 16, 15, 13, 6, 8, 11, 12, 18, 19];
return _endKeyArr.includes(key); return _endKeyArr.includes(key);
} }
} }
@ -59,11 +59,13 @@ function getTabList(){
{ id: 2, name: '次卡订单', key: 2, iconName: 'order_2', orderType: 3 }, { id: 2, name: '次卡订单', key: 2, iconName: 'order_2', orderType: 3 },
{ id: 3, name: '计时订单', key: 3, iconName: 'order_6', orderType: 1 }, { id: 3, name: '计时订单', key: 3, iconName: 'order_6', orderType: 1 },
{ id: 4, name: '储值卡订单', key: 4, iconName: 'order_1', orderType: 18 }, { id: 4, name: '储值卡订单', key: 4, iconName: 'order_1', orderType: 18 },
{ id: 10, name: '年月卡订单', key: 19, iconName: 'order_19', orderType: 20 },
{ id: 5, name: '课程订单', key: 5, iconName: 'order_8', orderType: 12 }, { id: 5, name: '课程订单', key: 5, iconName: 'order_8', orderType: 12 },
{ id: 6, name: '赛事订单', key: 6, iconName: 'order_9', orderType: 14 }, { id: 6, name: '赛事订单', key: 6, iconName: 'order_9', orderType: 14 },
{ id: 7, name: '约玩订单', key: 7, iconName: 'order_15', orderType: 10 }, { id: 7, name: '约玩订单', key: 7, iconName: 'order_15', orderType: 10 },
{ id: 8, name: '商城订单', key: 8, iconName: 'order_4', orderType: 2 }, { id: 8, name: '商城订单', key: 8, iconName: 'order_4', orderType: 2 },
{ id: 9, name: '积分兑换订单', key: 9, iconName: 'order_5', orderType: 5 }, { id: 9, name: '积分兑换订单', key: 9, iconName: 'order_5', orderType: 5 },
{ id: 9, name: '零售订单', key: 18, iconName: 'order_18', orderType: 19 },
] ]
} }

140
src/subpackage/order/pages/retail/detail/detail.vue

@ -0,0 +1,140 @@
<template>
<view class="retail-container">
<view class="rc-header">
<a-header :source="orderInfo.source || '-'" :status="getStatus(orderInfo.pay_status)"></a-header>
<view class="rh-name">
<a-line :value="orderInfo.sys_optuname || '-'">
<block slot="name">操作人</block>
</a-line>
</view>
</view>
<view class="rc-goods-info" v-if="orderInfo.retail_order_goods&&orderInfo.retail_order_goods.length">
<view class="rgi-tit">商品详情</view>
<view class="rgi-goods-ls">
<view class="rgl-item" v-for="(e, i) in orderInfo.retail_order_goods" :key="i">
<!-- 商品名称 咖啡 数量1 价格3 -->
<a-line :value="e.name || '-'">
<block slot="name">商品名称</block>
</a-line>
<a-line :value="e.nums || '0'">
<block slot="name">数量</block>
</a-line>
<a-line :value="'¥' + (e.price || '0')">
<block slot="name">价格</block>
</a-line>
</view>
</view>
<view class="rgi-total"><text>合计支付</text>{{ orderInfo.pay_amount || 0 }}</view>
</view>
<view class="rc-pay-info">
<!-- 订单编号 -->
<view class="rpi-tit">支付详情</view>
<p-line :keyname="'订单编号'" :value="orderInfo.order_no || '-'" isbtn></p-line>
<p-line :keyname="'支付方式'" :value="payTypeTxt(orderInfo.pay_type)"></p-line>
<p-line :keyname="'支付时间'" :value="orderInfo.pay_time || '-'"></p-line>
</view>
</view>
</template>
<script>
import { ORDER_API } from '../../../js/api';
import server from '../../../js/server';
import util from '../../../../../utils/util';
import a_header from '../../../../../components/order_list/a_header/a_header.vue';
import a_line from '../../../../../components/order_list/a_line/a_line.vue';
import s_line from '../../../components/s_line/s_line.vue';
import p_line from '../../../components/p_line/p_line.vue';
export default {
components: {
'a-line': a_line,
'a-header': a_header,
's-line': s_line,
'p-line': p_line,
},
data(){
return {
orderInfo: {}
}
},
onLoad(options){
this.getOrderInfo(options.order_no);
},
methods: {
payTypeTxt: util.order_pay_type_txt,
getStatus(status){
let _obj = {
1: '交易成功'
}
return _obj[status] || '-'
},
getOrderInfo(order_no){
util.showLoad();
server.get({
url: ORDER_API.retailOrderInfo,
data: { order_no },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
this.orderInfo = res || {};
})
},
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.retail-container{
}
.rc-header{
margin-bottom: 26upx;
padding: 0 24upx;
background-color: #fff;
.rh-name{
padding: 30upx 0;
}
}
.rc-goods-info{
margin-bottom: 24upx;
padding: 0 24upx;
background-color: #fff;
.rgi-tit{
padding-top: 20upx;
font-size: 32upx;
color: #1a1a1a;
}
.rgi-goods-ls{
.rgl-item{
padding: 30upx 0;
border-bottom: 2upx solid #D8D8D8;
}
}
.rgi-total{
text-align: right;
line-height: 106upx;
font-weight: 500;
font-size: 28upx;
color: #1a1a1a;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
>text{
color: #9a9a9d;
font-weight: 400;
}
}
}
.rc-pay-info{
padding: 30upx;
background-color: #fff;
.rpi-tit{
margin-bottom: 16upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
}
}
</style>

295
src/subpackage/order/pages/ym_card/detail/detail.vue

@ -0,0 +1,295 @@
<template>
<view class="ym-card-info">
<view class="yci-main">
<view class="yci-box ym-card-info">
<view class="yci-stadium-name">{{ orderInfo.extension.name || '-' }}</view>
<view class="yci-line">
<view>年月卡名称{{ orderInfo.card_info.name || '-' }}</view>
<view>年月卡卡号{{ orderInfo.card_no || '-' }}</view>
<view>有效期{{ orderInfo.expired_at || '-' }}</view>
</view>
<view class="yci-btn">
<view @click="toRecord">使用记录</view>
</view>
<view class="yci-status-tag">
<image mode="aspectFit" :src="getTagImgPath(orderInfo.status)"></image>
</view>
</view>
<view class="yci-box ym-user">
<view class="yci-tit">持卡人信息</view>
<a-line :value="orderInfo.mobile || '-'">
<block slot="name">手机号码</block>
</a-line>
<a-line :value="orderInfo.nickname || '-'">
<block slot="name">用户昵称</block>
</a-line>
<view class="yu-line">照片<text @click="changeFaceImgBtn" v-if="orderInfo.status ==1">更改照片</text></view>
<image
class="yu-img"
mode="aspectFit"
v-if="orderInfo.user_face"
:src="orderInfo.user_face"
@click="previewImg(orderInfo.user_face)"
></image>
</view>
<view class="yci-box yci-buy-info" v-if="orderInfo.status == 1 || orderInfo.status == 2 || orderInfo.status == 3">
<view class="yci-tit">购卡信息</view>
<view class="ybi-name">年月卡名称{{ orderInfo.card_info.name || '-' }}</view>
<s-line :keyname="'金额小计'" :value="'¥' + (orderInfo.extension.amount || '0')"></s-line>
<s-line :keyname="'积分抵扣'" :value="'¥' + (orderInfo.extension.deduction_amount|| '0')"></s-line>
<s-line :keyname="'折扣金额'" :value="'¥' + (orderInfo.extension.discount_amount || '0')"></s-line>
<s-line :keyname="'优惠券优惠'" :value="'¥' + (orderInfo.extension.coupons_amount || '0')"></s-line>
<view class="ybi-total"><text>合计支付</text> {{ orderInfo.extension.pay_amount || '0' }}</view>
</view>
<view class="yci-box yci-pay-info" v-if="orderInfo.status == 1 || orderInfo.status == 2 || orderInfo.status == 3">
<view class="yci-tit">支付信息</view>
<p-line :keyname="'订单编号'" :value="orderInfo.order_no || '-'" ></p-line>
<p-line :keyname="'支付方式'" :value="orderInfo.extension.pay_type_text || '-'" ></p-line>
<p-line :keyname="'支付时间'" :value="orderInfo.extension.pay_time || '-'" ></p-line>
<p-line :keyname="'微信交易号'" :value="orderInfo.extension.trade_no || '-'" ></p-line>
<p-line :keyname="'创建途径'" :value="orderInfo.source || '-'" ></p-line>
</view>
</view>
</view>
</template>
<script>
/*
InactiveCardStatus CardStatusType = iota // 0
ActiveCardStatus // 使 1
InvalidCardStatus // 2
ReturnCardStatus // 退 3
*/
import a_line from '../../../../../components/order_list/a_line/a_line.vue';
import s_line from '../../../components/s_line/s_line.vue';
import p_line from '../../../components/p_line/p_line.vue';
import util from '../../../../../utils/util';
import { ORDER_API } from '../../../js/api';
import server from '../../../js/server';
export default {
components: {
'a-line': a_line,
's-line': s_line,
'p-line': p_line,
},
data(){
return {
orderInfo: {
card_info: {},
extension: {}
},
optionsQuery: {},
}
},
onLoad(options){
this.getCardInfo({
id: options.id,
card_no: options.card_no
});
this.optionsQuery = options || {};
},
methods: {
previewImg(url){
if(!url)return
uni.previewImage({ urls: [ url ] });
},
changeFaceImgBtn(){
uni.chooseImage({
count: 1,
success: imgRes =>{
this.upLoadImg(imgRes || {});
},
failMsg: imgErr => {
console.warn('chooseImage err --->' , imgErr);
util.showNone('选择图片失败!');
}
})
},
upLoadImg(imgRes){
util.showLoad();
server.uploadFile({
url: ORDER_API.ymCardInfoFace,
filePath: imgRes.tempFilePaths[0] || '',
})
.then(e=>{
util.hideLoad();
let _res = util.jsonPar(e.data);
if(_res.code == 0){
let _url = _res.data.url || '';
this.saveFaceImg(_url);
}else{
console.error('上传图片失败--->',_res);
util.showNone(_res.message || '上传图片失败,请重试!')
}
})
.catch(err=>{
util.hideLoad();
console.error('上传图片失败--->',err);
util.showNone('上传图片失败,稍后重试!')
})
},
saveFaceImg(faceUrl){
let { optionsQuery } = this;
util.showLoad();
server.post({
url: ORDER_API.ymCardInfoFaceSave,
data: {
card_no: optionsQuery.card_no,
face: faceUrl,
},
isDefaultGet: false,
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
let { optionsQuery } = this;
setTimeout(_=>{
this.getCardInfo({
id: optionsQuery.id,
card_no: optionsQuery.card_no
});
}, 1200);
}else{
util.showNone(res.data.message || '操作失败!');
}
})
},
getTagImgPath(status){
if(!status)return ''
return `/subpackage/order/static/images/ym_card/status_${status}.png`
},
getCardInfo({id, card_no}){
util.showLoad();
server.get({
url: ORDER_API.userMonthlyCardInfo,
data: { id, card_no },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
this.orderInfo = res || {};
})
},
toRecord(){
let { optionsQuery } = this;
util.routeTo(`/subpackage/order/pages/ym_card/use_record/use_record?card_no=${optionsQuery.card_no}`, 'nT');
},
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.ym-card-info{
}
.yci-box{
padding: 30upx;
margin-bottom: 24upx;
border-radius: 10upx;
background-color: #fff;
}
.yci-tit{
margin-bottom: 20upx;
line-height: 40upx;
font-size: 28upx;
color: #9C9C9F;
}
.yci-main{
padding: 24upx;
.ym-card-info{
position: relative;
.yci-stadium-name{
margin-bottom: 22upx;
padding-bottom: 26upx;
line-height: 40upx;
font-size: 28upx;
font-weight: 500;
border-bottom: 2upx solid #D8D8D8;
@include textHide(1);
}
.yci-line{
margin-bottom: 32upx;
>view{
line-height: 48upx;
font-size: 28upx;
color: #333;
@include textHide(1);
}
}
.yci-btn{
@include centerFlex(flex-end);
>view{
width: 176upx;
line-height: 80upx;
text-align: center;
border-radius: 10upx;
border: 2upx solid #9A9A9D;
font-size: 32upx;
color: #9A9A9D;
}
}
.yci-status-tag{
position: absolute;
right: 0;
top: 0;
width: 132upx;
height: 132upx;
overflow: hidden;
border-top-right-radius: 10upx;
>image{
width: 100%;
height: 100%;
}
}
}
.ym-user{
.yu-line{
margin-bottom: 16upx;
font-size: 28upx;
line-height: 52upx;
color: #9a9a9d;
>text{
color: $themeColor;
text-decoration: underline;
}
}
.yu-img{
display: block;
width: 218upx;
height: 218upx;
border-radius: 10upx;
}
}
.yci-buy-info{
.ybi-name{
margin-bottom: 22upx;
padding-bottom: 30upx;
font-size: 28upx;
line-height: 40upx;
color: #1a1a1a;
border-bottom: 2upx solid #D8D8D8;
}
.ybi-total{
text-align: right;
font-size: 28upx;
font-weight: 500;
line-height: 40upx;
color: #333;
@include textHide(1);
>text{
color: #9A9A9D;
}
}
}
}
</style>

112
src/subpackage/order/pages/ym_card/use_record/use_record.vue

@ -0,0 +1,112 @@
<template>
<view class="use-record">
<view class="ur-list">
<view class="ul-item" v-for="(e, i) in recordLs" :key="i">
<view class="ui-header">
<image class="uh-img" mode="aspectFit" :src="e.stadium_logo"></image>
<view>{{ e.stadium_name || '-' }}</view>
</view>
<view class="uh-lines">
<view><text>验证方式</text>{{ e.enter_desc || '-' }}</view>
<view><text>核销时间</text>{{ e.enter_time || '-' }}</view>
<view><text>离场时间</text>{{ e.leave_time || '-' }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import util from '../../../../../utils/util';
import { ORDER_API } from '../../../js/api';
import server from '../../../js/server';
export default {
data(){
return {
recordLs: [],
page: 1,
card_no: '',
}
},
onLoad(options){
this.card_no = options.card_no || '';
this.getRecordLs({
card_no: options.card_no,
});
},
onReachBottom(){
let { card_no, page } = this;
this.getRecordLs({
card_no: card_no,
page: ++page,
})
},
methods: {
getRecordLs({
card_no,
page = 1,
page_size = 15
}){
util.showLoad();
server.get({
url: ORDER_API.ymCardUsage,
data: { card_no, page_size, page },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
let _ls = res.list || [];
if(page == 1)return this.recordLs = _ls;
if(!_ls.length)return util.showNone('没有更多!');
this.page = page;
this.recordLs = [...this.recordLs, ..._ls];
})
},
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.use-record{
.ur-list{
.ul-item{
margin-bottom: 24upx;
padding: 30upx;
background-color: #fff;
.ui-header{
height: 100upx;
border-bottom: 2upx solid #f2f2f7;
@include centerFlex(space-between);
.uh-img{
flex-shrink: 0;
flex-grow: 0;
margin-right: 10upx;
width: 30upx;
height: 30upx;
}
>view{
flex-grow: 1;
line-height: 44upx;
font-size: 32upx;
color: #333;
@include textHide(1);
}
}
.uh-lines{
padding: 14upx 16upx 10upx;
>view{
font-size: 28upx;
line-height: 50upx;
color: #333;
@include textHide(1);
>text{
color: #9A9A9D;
}
}
}
}
}
}
</style>

BIN
src/subpackage/order/static/images/order_manage/order_18.png

After

Width: 60  |  Height: 60  |  Size: 537 B

BIN
src/subpackage/order/static/images/order_manage/order_19.png

After

Width: 120  |  Height: 120  |  Size: 811 B

BIN
src/subpackage/order/static/images/ym_card/status_1.png

After

Width: 132  |  Height: 132  |  Size: 13 KiB

BIN
src/subpackage/order/static/images/ym_card/status_2.png

After

Width: 132  |  Height: 132  |  Size: 2.0 KiB

BIN
src/subpackage/order/static/images/ym_card/status_3.png

After

Width: 132  |  Height: 132  |  Size: 2.1 KiB

Loading…
Cancel
Save