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

详情布局

parent 68e2db69
......@@ -9,7 +9,7 @@
<view class="card base-item">
<view class="top-item">
<view class="left">
<view class="tag">{{ order.orderServiceType }}</view>
<view :class="['tag', {'active': order.orderServiceType == '安装'}]">{{ order.orderServiceType }}</view>
<text class="title">{{ order.categoryName }}</text>
</view>
<view class="right">{{ order.orderBusinessTypeText }}</view>
......@@ -23,7 +23,7 @@
<text>客户信息:</text>
<text>{{ order.contactName }}</text>
</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 class="order-cell">
<text>联系方式:</text>
......@@ -34,45 +34,67 @@
<u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.contactAddress }}</text>
</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>
<!-- <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 class="card order-item">
<view class="top-item">
<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 class="card appoint-item" v-show="showTimeSelect">
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
<view class="card order-item record-item">
<view class="top-item">
<text class="title">履约记录</text>
</view>
<view class="order" v-for="(record,index) in orderRecords" :key="record.operationContent">
<view class="order-cell between-cell">
<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 v-if="orderRecords.length == 0" class="no-record-view">当前暂无履约记录</view>
<view v-else>
<view class="order" v-for="(record,index) in shwoOrderRecords" :key="record.operationContent">
<view class="order-cell between-cell">
<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 v-else style="height: 10rpx;"></view>
</view>
</view>
<view class="card appoint-item" v-show="showTimeSelect">
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view>
<view class="toolbar">
<!-- 背景,内容,请求接口 根据状态不同改变 {{operationDoing[order.orderStatus].background}} -->
......@@ -87,27 +109,29 @@
<view>
<u-toast ref="uToast" />
</view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="btnClass">
{{ centerButtonText }}
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
<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 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 class="right">
<view v-if="errorSignIn" @click="take" class="button">
<text>异常签到</text>
</view>
<view v-if="scenePhoto" @click="scenePhotoClick" class="button">
<text>现场拍照</text>
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text>
</view>
</view>
</view>
......@@ -128,6 +152,9 @@
},
data() {
return {
readMore: true,
readMoreRecord: true,
showLenght: 5,
background: {
backgroundColor: 'none',
// 导航栏背景图
......@@ -146,7 +173,7 @@
centerButtonText: '',
orderRecords: [],
method: null,
showCenterBtn: false,
showCenterBtn: true,
showTimeSelect: false,
submitType: '',
nextUrl:'',
......@@ -167,6 +194,7 @@
} else {
// 异常处理
}
this.orderId = '8371315'
this.loadOrderDetail()
this.loadOrderRecord()
this.getLocation()
......@@ -175,24 +203,31 @@
phoneIcon() {
//self-support/icon/dianhua-0@2x.png
if(this.isAllowDianhuaAndDaohang){
return process.uniEnv.qn_base_url + 'icon/dianhua-1@2x.png'
return process.uniEnv.qn_base_url + 'dianhua-1.png'
}else{
return process.uniEnv.qn_base_url + 'icon/dianhua-0@2x.png'
return process.uniEnv.qn_base_url + 'dianhua-0.png'
}
},
navigationIcon() {
//self-support/icon/daohang-0@2x.png
if(this.isAllowDianhuaAndDaohang){
return process.uniEnv.qn_base_url + 'icon/daohang-1@2x.png'
return process.uniEnv.qn_base_url + 'daohang-1.png'
}else{
return process.uniEnv.qn_base_url + 'icon/daohang-0@2x.png'
return process.uniEnv.qn_base_url + 'daohang-0.png'
}
},
centerButtonClass() {
let btnClass = "appoint-btn"
return btnClass
},
shwoOrderRecords() {
if (this.readMoreRecord) {
return this.orderRecords.slice(0, 5)
} else {
return this.orderRecords
}
}
},
methods: {
......@@ -235,6 +270,9 @@
}
})
},
handleClickRight(active) {
this.scenePhoto ? this.scenePhotoClick() : this.take()
},
scenePhotoClick() { // 跳转拍照小程序
uni.navigateTo({
url: 'pages/photo/list?orderId='+this.order.orderId+'&brandId='+this.order.lianbaoBrandId+'&brand='+this.order.brandName
......@@ -525,52 +563,57 @@
height: 100vh;
overflow: auto;
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-repeat: no-repeat;
display: flex;
flex-direction: column;
.header {
padding: 12rpx 30rpx 40rpx 30rpx;
padding: 30rpx 30rpx 46rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 40rpx;
font-weight: bold;
color: #FFFFFF;
line-height: 40rpx;
font-size:40rpx;
color:#fff;
}
.button {
text-align: center;
width: 106rpx;
height: 52rpx;
background: #FFFFFF;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #2272FF;
line-height: 52rpx;
color: #DEDEDE;
}
}
.content {
height: 2000rpx;
height: 100%;
border-radius: 12rpx;
overflow: auto;
margin-right: 30rpx;
margin-left: 30rpx;
.card {
background-color: #FFFFFF;
margin: 0 30rpx 20rpx 30rpx;
margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
}
.base-item {
padding-bottom: 36rpx;
padding-bottom: 6rpx;
.top-item {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
margin-bottom: 30rpx;
.left {
display: flex;
......@@ -580,16 +623,20 @@
text-align: center;
width: 84rpx;
height: 40rpx;
background-image: linear-gradient(270deg, #47ABFF 0%, #2272FF 100%);
border-radius: 8rpx;
font-size: 22rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
&.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF);
}
}
.title {
margin-left: 30rpx;
margin-left: 20rpx;
height: 36rpx;
font-size: 36rpx;
font-weight: bold;
......@@ -617,7 +664,8 @@
font-weight: 400;
color: #333333;
line-height: 24rpx;
margin-top: 20rpx;
margin-bottom: 40rpx;
.left {
.address-txt {
margin-left: 8rpx;
......@@ -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 {
padding-bottom: 34rpx;
padding-bottom: 6rpx;
.top-item {
display: flex;
......@@ -635,12 +707,19 @@
margin-bottom: 20rpx;
.title {
height: 36rpx;
font-size: 36rpx;
height: 32rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
}
}
.no-record-view {
font-size: 26rpx;
color: #333333;
margin-top: 30rpx;
}
.address-cell {
......@@ -658,7 +737,9 @@
}
}
.record-item {}
.record-item {
margin-bottom: 0rpx;
}
.appoint-item {
padding: 0;
......@@ -666,7 +747,8 @@
}
.toolbar {
margin-bottom: 104rpx;
margin-top: 30rpx;
margin-bottom: 44rpx;
display: flex;
justify-content: center;
align-items: center;
......@@ -680,10 +762,13 @@
height: 100rpx;
background: #929CB8;
border-radius: 100rpx;
font-size: 25rpx;
font-weight: bold;
align-items: center;
display: flex;
text-align: center;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #FFFFFF;
}
}
......@@ -693,16 +778,23 @@
margin-left: 74rpx;
margin-right: 74rpx;
.button {
.center-button-view {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
.time-view {
display: flex;
font-size: 20rpx;
color: #FFFFFF;
}
}
.appoint-btn {
......@@ -711,13 +803,13 @@
}
.isGan-btn {
background: #93a7a6;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
background: #D1D4D4;
box-shadow: 2px 2px 20px 0px rgba(181, 181, 181, 0.3);
}
.timeOut-btn {
background: #ff0000;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
background: #e86552;
box-shadow: 2px 2px 20px 0px rgba(232, 101, 82, 0.3);
}
}
......@@ -728,12 +820,17 @@
.button {
width: 100rpx;
height: 100rpx;
background: #d99100;
background: #FF930D;
border-radius: 100rpx;
font-size: 25rpx;
font-size: 20rpx;
font-weight: bold;
align-items: center;
display: flex;
color: #FFFFFF;
justify-content: center;
&.active {
background-color: #D1D4D4;
}
}
}
}
......@@ -746,7 +843,8 @@
font-weight: 400;
color: #333333;
line-height: 48rpx;
margin-bottom: 30rpx;
margin-bottom: 10rpx;
text-align: left;
}
.between-cell {
......
......@@ -83,10 +83,13 @@
loaded: false
};
},
onLoad() {
onLoad() {
this.getLocation();
this.getOrderCount();
// this.getOrderCount();
this.getOrderList(0);
},
onShow() {
this.getOrderCount()
},
computed: {
subList() {
......@@ -255,7 +258,9 @@
item.count = res.data.exceptionCount
}
})
}
}
// 修改tab总数
// ...
} else {
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