Commit 8632bcd7 authored by 刘用法's avatar 刘用法

详情布局

parent 68e2db69
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="card base-item"> <view class="card base-item">
<view class="top-item"> <view class="top-item">
<view class="left"> <view class="left">
<view class="tag">{{ order.orderServiceType }}</view> <view :class="['tag', {'active': order.orderServiceType == '安装'}]">{{ order.orderServiceType }}</view>
<text class="title">{{ order.categoryName }}</text> <text class="title">{{ order.categoryName }}</text>
</view> </view>
<view class="right">{{ order.orderBusinessTypeText }}</view> <view class="right">{{ order.orderBusinessTypeText }}</view>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<text>客户信息:</text> <text>客户信息:</text>
<text>{{ order.contactName }}</text> <text>{{ order.contactName }}</text>
</view> </view>
<u-image width="60rpx" height="60rpx" :src="phoneIcon" @click="phoneToCustomer(order.contactPhone)" ></u-image> <u-image width="48rpx" height="48rpx" :src="phoneIcon" @click="phoneToCustomer(order.contactPhone)" ></u-image>
</view> </view>
<view class="order-cell"> <view class="order-cell">
<text>联系方式:</text> <text>联系方式:</text>
...@@ -34,45 +34,67 @@ ...@@ -34,45 +34,67 @@
<u-icon name="map" size="28"></u-icon> <u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.contactAddress }}</text> <text class="address-txt">{{ order.contactAddress }}</text>
</view> </view>
<u-image width="60rpx" height="60rpx" :src="navigationIcon" @click="openLocation"></u-image> <u-image width="48rpx" height="48rpx" :src="navigationIcon" @click="openLocation"></u-image>
</view> </view>
<!-- <u-read-more ref="uReadMore" :show-height="40" :shadowStyle="{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view v-if="readMore" @click="readMore = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text>
</view>
<view v-else class="order-item-more">
<view class="line-view"></view>
<view class="order-cell between-cell">
<text>品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text>数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text>信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="order-cell between-cell">
<text>备注:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="read-more-toggle">
<u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMore = true">点击收起</text>
</view>
</view>
<!-- </u-read-more> -->
</view> </view>
<view class="card order-item"> <view class="card appoint-item" v-show="showTimeSelect">
<view class="top-item"> <appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
<text class="title">订单内容</text>
</view>
<view class="order-cell between-cell">
<text>品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text>数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text>信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="order-cell between-cell">
<text>备注:</text>
<text>{{ order.serviceContent }}</text>
</view>
</view> </view>
<view class="card order-item record-item"> <view class="card order-item record-item">
<view class="top-item"> <view class="top-item">
<text class="title">履约记录</text> <text class="title">履约记录</text>
</view> </view>
<view class="order" v-for="(record,index) in orderRecords" :key="record.operationContent"> <view v-if="orderRecords.length == 0" class="no-record-view">当前暂无履约记录</view>
<view class="order-cell between-cell"> <view v-else>
<text>{{record.operationType}}</text> <view class="order" v-for="(record,index) in shwoOrderRecords" :key="record.operationContent">
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy-mm-dd hh:MM:ss')}} </text> <view class="order-cell between-cell">
<text style="color: red;">{{record.overTime?'':'超时 '}}{{record.exception?'':' 异常'}}</text> <text>{{record.operationType}}</text>
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy-mm-dd hh:MM:ss')}} </text>
<text style="color: red;">{{record.overTime?'':'超时 '}}{{record.exception?'':' 异常'}}</text>
</view>
</view>
<view v-if="orderRecords.length > showLenght">
<view v-if="readMoreRecord" @click="readMoreRecord = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text>
</view>
<view v-else class="read-more-toggle">
<u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMoreRecord = true">点击收起</text>
</view> </view>
</view>
<view v-else style="height: 10rpx;"></view>
</view> </view>
</view> </view>
<view class="card appoint-item" v-show="showTimeSelect">
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view> </view>
<view class="toolbar"> <view class="toolbar">
<!-- 背景,内容,请求接口 根据状态不同改变 {{operationDoing[order.orderStatus].background}} --> <!-- 背景,内容,请求接口 根据状态不同改变 {{operationDoing[order.orderStatus].background}} -->
...@@ -87,27 +109,29 @@ ...@@ -87,27 +109,29 @@
<view> <view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="btnClass"> <view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
{{ centerButtonText }} <text>{{ centerButtonText }}抢单</text>
<view v-if="order.currentOverTime > 0" class="time-view">
<text>{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</text>
<u-count-down
:timestamp="timestampDiff(order.currentOverTime)"
font-size="20"
color="#FFFFFF"
bg-color="transparent"
separator-color="#FFFFFF"
separator-size="20"
:ref="'uCountDown'"
@change="timeOutChange(order.currentOverTime)" >
</u-count-down>
</view>
</view> </view>
<view v-show="order.currentOverTime > 0" >
<view class="tag">{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down
:timestamp="timestampDiff(order.currentOverTime)"
font-size="30"
:ref="'uCountDown'"
@change="timeOutChange(order.currentOverTime)" >
</u-count-down>
</view>
</view> </view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right"> <view class="right">
<view v-if="errorSignIn" @click="take" class="button"> <view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>异常签到</text> <text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text>
</view>
<view v-if="scenePhoto" @click="scenePhotoClick" class="button">
<text>现场拍照</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -128,6 +152,9 @@ ...@@ -128,6 +152,9 @@
}, },
data() { data() {
return { return {
readMore: true,
readMoreRecord: true,
showLenght: 5,
background: { background: {
backgroundColor: 'none', backgroundColor: 'none',
// 导航栏背景图 // 导航栏背景图
...@@ -146,7 +173,7 @@ ...@@ -146,7 +173,7 @@
centerButtonText: '', centerButtonText: '',
orderRecords: [], orderRecords: [],
method: null, method: null,
showCenterBtn: false, showCenterBtn: true,
showTimeSelect: false, showTimeSelect: false,
submitType: '', submitType: '',
nextUrl:'', nextUrl:'',
...@@ -167,6 +194,7 @@ ...@@ -167,6 +194,7 @@
} else { } else {
// 异常处理 // 异常处理
} }
this.orderId = '8371315'
this.loadOrderDetail() this.loadOrderDetail()
this.loadOrderRecord() this.loadOrderRecord()
this.getLocation() this.getLocation()
...@@ -175,24 +203,31 @@ ...@@ -175,24 +203,31 @@
phoneIcon() { phoneIcon() {
//self-support/icon/dianhua-0@2x.png //self-support/icon/dianhua-0@2x.png
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
return process.uniEnv.qn_base_url + 'icon/dianhua-1@2x.png' return process.uniEnv.qn_base_url + 'dianhua-1.png'
}else{ }else{
return process.uniEnv.qn_base_url + 'icon/dianhua-0@2x.png' return process.uniEnv.qn_base_url + 'dianhua-0.png'
} }
}, },
navigationIcon() { navigationIcon() {
//self-support/icon/daohang-0@2x.png //self-support/icon/daohang-0@2x.png
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
return process.uniEnv.qn_base_url + 'icon/daohang-1@2x.png' return process.uniEnv.qn_base_url + 'daohang-1.png'
}else{ }else{
return process.uniEnv.qn_base_url + 'icon/daohang-0@2x.png' return process.uniEnv.qn_base_url + 'daohang-0.png'
} }
}, },
centerButtonClass() { centerButtonClass() {
let btnClass = "appoint-btn" let btnClass = "appoint-btn"
return btnClass return btnClass
},
shwoOrderRecords() {
if (this.readMoreRecord) {
return this.orderRecords.slice(0, 5)
} else {
return this.orderRecords
}
} }
}, },
methods: { methods: {
...@@ -235,6 +270,9 @@ ...@@ -235,6 +270,9 @@
} }
}) })
}, },
handleClickRight(active) {
this.scenePhoto ? this.scenePhotoClick() : this.take()
},
scenePhotoClick() { // 跳转拍照小程序 scenePhotoClick() { // 跳转拍照小程序
uni.navigateTo({ uni.navigateTo({
url: 'pages/photo/list?orderId='+this.order.orderId+'&brandId='+this.order.lianbaoBrandId+'&brand='+this.order.brandName url: 'pages/photo/list?orderId='+this.order.orderId+'&brandId='+this.order.lianbaoBrandId+'&brand='+this.order.brandName
...@@ -525,52 +563,57 @@ ...@@ -525,52 +563,57 @@
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
background-color: #F4F5F7; background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7, #2272FF); background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx; background-size: 750rpx 600rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex;
flex-direction: column;
.header { .header {
padding: 12rpx 30rpx 40rpx 30rpx; padding: 30rpx 30rpx 46rpx 30rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.title { .title {
font-size: 40rpx; line-height: 40rpx;
font-weight: bold; font-size:40rpx;
color: #FFFFFF; color:#fff;
} }
.button { .button {
text-align: center; text-align: center;
width: 106rpx; width: 106rpx;
height: 52rpx; height: 52rpx;
background: #FFFFFF;
border-radius: 40rpx; border-radius: 40rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #2272FF;
line-height: 52rpx; line-height: 52rpx;
color: #DEDEDE;
} }
} }
.content { .content {
height: 2000rpx; height: 100%;
border-radius: 12rpx;
overflow: auto;
margin-right: 30rpx;
margin-left: 30rpx;
.card { .card {
background-color: #FFFFFF; background-color: #FFFFFF;
margin: 0 30rpx 20rpx 30rpx; margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx; padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px; border-radius: 6px;
} }
.base-item { .base-item {
padding-bottom: 36rpx; padding-bottom: 6rpx;
.top-item { .top-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20rpx; margin-bottom: 30rpx;
.left { .left {
display: flex; display: flex;
...@@ -580,16 +623,20 @@ ...@@ -580,16 +623,20 @@
text-align: center; text-align: center;
width: 84rpx; width: 84rpx;
height: 40rpx; height: 40rpx;
background-image: linear-gradient(270deg, #47ABFF 0%, #2272FF 100%);
border-radius: 8rpx; border-radius: 8rpx;
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
line-height: 40rpx; line-height: 40rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
&.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF);
}
} }
.title { .title {
margin-left: 30rpx; margin-left: 20rpx;
height: 36rpx; height: 36rpx;
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
...@@ -617,7 +664,8 @@ ...@@ -617,7 +664,8 @@
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 24rpx; line-height: 24rpx;
margin-top: 20rpx;
margin-bottom: 40rpx;
.left { .left {
.address-txt { .address-txt {
margin-left: 8rpx; margin-left: 8rpx;
...@@ -625,9 +673,33 @@ ...@@ -625,9 +673,33 @@
} }
} }
} }
.read-more-toggle {
text-align: center;
color: #2272FF;
font-size: 26rpx;
margin-top: 30rpx;
padding-bottom: 30rpx;
}
.read-more-text {
padding-left: 8rpx;
}
.order-item-more {
font-size: 26rpx;
color: #333333;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin-bottom: 20rpx;
}
}
.order-item { .order-item {
padding-bottom: 34rpx; padding-bottom: 6rpx;
.top-item { .top-item {
display: flex; display: flex;
...@@ -635,12 +707,19 @@ ...@@ -635,12 +707,19 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
.title { .title {
height: 36rpx; height: 32rpx;
font-size: 36rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 36rpx; line-height: 36rpx;
} }
}
.no-record-view {
font-size: 26rpx;
color: #333333;
margin-top: 30rpx;
} }
.address-cell { .address-cell {
...@@ -658,7 +737,9 @@ ...@@ -658,7 +737,9 @@
} }
} }
.record-item {} .record-item {
margin-bottom: 0rpx;
}
.appoint-item { .appoint-item {
padding: 0; padding: 0;
...@@ -666,7 +747,8 @@ ...@@ -666,7 +747,8 @@
} }
.toolbar { .toolbar {
margin-bottom: 104rpx; margin-top: 30rpx;
margin-bottom: 44rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -680,10 +762,13 @@ ...@@ -680,10 +762,13 @@
height: 100rpx; height: 100rpx;
background: #929CB8; background: #929CB8;
border-radius: 100rpx; border-radius: 100rpx;
font-size: 25rpx;
font-weight: bold; font-weight: bold;
align-items: center;
display: flex; display: flex;
text-align: center;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #FFFFFF;
} }
} }
...@@ -693,16 +778,23 @@ ...@@ -693,16 +778,23 @@
margin-left: 74rpx; margin-left: 74rpx;
margin-right: 74rpx; margin-right: 74rpx;
.button { .center-button-view {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
border-radius: 100rpx; border-radius: 100rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column;
color: #FFFFFF; color: #FFFFFF;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
.time-view {
display: flex;
font-size: 20rpx;
color: #FFFFFF;
}
} }
.appoint-btn { .appoint-btn {
...@@ -711,13 +803,13 @@ ...@@ -711,13 +803,13 @@
} }
.isGan-btn { .isGan-btn {
background: #93a7a6; background: #D1D4D4;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3); box-shadow: 2px 2px 20px 0px rgba(181, 181, 181, 0.3);
} }
.timeOut-btn { .timeOut-btn {
background: #ff0000; background: #e86552;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3); box-shadow: 2px 2px 20px 0px rgba(232, 101, 82, 0.3);
} }
} }
...@@ -728,12 +820,17 @@ ...@@ -728,12 +820,17 @@
.button { .button {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background: #d99100; background: #FF930D;
border-radius: 100rpx; border-radius: 100rpx;
font-size: 25rpx; font-size: 20rpx;
font-weight: bold; font-weight: bold;
align-items: center; align-items: center;
display: flex; display: flex;
color: #FFFFFF;
justify-content: center;
&.active {
background-color: #D1D4D4;
}
} }
} }
} }
...@@ -746,7 +843,8 @@ ...@@ -746,7 +843,8 @@
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 30rpx; margin-bottom: 10rpx;
text-align: left;
} }
.between-cell { .between-cell {
......
...@@ -83,10 +83,13 @@ ...@@ -83,10 +83,13 @@
loaded: false loaded: false
}; };
}, },
onLoad() { onLoad() {
this.getLocation(); this.getLocation();
this.getOrderCount(); // this.getOrderCount();
this.getOrderList(0); this.getOrderList(0);
},
onShow() {
this.getOrderCount()
}, },
computed: { computed: {
subList() { subList() {
...@@ -255,7 +258,9 @@ ...@@ -255,7 +258,9 @@
item.count = res.data.exceptionCount item.count = res.data.exceptionCount
} }
}) })
} }
// 修改tab总数
// ...
} else { } else {
console.log(res.message, "获取订单数量失败!"); console.log(res.message, "获取订单数量失败!");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment