Commit 654c1b4c authored by 高铭波's avatar 高铭波

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into dev

parents 356ebf8d cf7ce8b4
<template>
<view class="bottom-button">
<view v-for="(item, index) in buttons" :class="['button-view', item.type]">
<u-button :class="['list-button', item.type]" @click="handleClick(index)"
:hover-class="item.type == 'image' ? 'none' : ''" :custom-style="buttonStyle[item.type]" type="primary"
shape="circle">
<view class="image-view" v-if="item.type == 'image'">
<image :src="baseImageUrl + item.image" class="image-content"></image>
<view v-for="(item, index) in list" :class="['button-view', item.type]">
<u-button :class="['list-button', item.type, {'one': list.length == 1}]" @click="handleClick(item)"
:hover-class="item.type == 'image' || item.disabled ? 'none' : ''"
:custom-style="{...buttonStyle[item.disabled ? 'disabled' : item.type], ...item.customStyle}" type="primary" shape="circle">
<view class="image-view" v-if="item.type == 'image'">
<image :src="baseImageUrl + item.image" class="image-content"></image>
</view>
<view :class="['text-content', item.type]">{{item.label}}</view>
</u-button>
</u-button>
</view>
</view>
</template>
<script>
export default {
props: {
props: {
// label: 按钮文字,
// type: 'text'普通按钮;'image'图文按钮
// image: type='image'的时候,按钮图片
// show: 是否显示,
// disabled: 是否禁用,true禁用;false 可以点击
// customStyle: 自定义button样式
buttons: {
type: Array,
default () {
return [{
label: '过程反馈',
type: 'image',
image: 'dianhua.png'
image: 'guochengfankui.png',
show: true,
disabled: false,
},
{
label: '异常签到',
type: 'image',
image: 'daohang.png'
image: 'yichangqiandao.png',
show: false,
disabled: false
},
{
label: '现场拍照',
type: 'image',
image: 'xiancahngpaizhao.png',
show: true,
disabled: false,
},
{
label: '接单',
type: 'text',
image: ''
show: true,
disabled: true,
customStyle: {
'background-color': '#2272FF'
}
}
]
}
......@@ -42,6 +63,11 @@
baseImageUrl() {
return process.uniEnv.qn_base_url
},
list() {
return this.buttons.filter((item) => {
return item.show == true
})
},
buttonStyle() {
return {
'image': {
......@@ -51,7 +77,6 @@
'flex-direction': 'column',
'height': '104rpx',
'width': '82rpx',
'margin-right': '40rpx'
},
'text': {
......@@ -60,15 +85,26 @@
'display': 'flex',
'flex-direction': 'column',
'height': '104rpx',
'width': '100%',
},
'disabled': {
'background-color': '#D1D4D4',
'border-color': 'transparent',
'display': 'flex',
'flex-direction': 'column',
'height': '104rpx',
'width': '100%'
},
}
},
},
methods: {
handleClick(index) {
this.$emit('submit', index)
methods: {
// 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照
handleClick(item) {
if (item.disabled) return
this.$emit('submit', item.id)
}
}
}
......@@ -82,32 +118,45 @@
padding: 0 30rpx 44rpx 30rpx;
.button-view {
max-width: 600rpx;
display: flex;
&.image {}
&.text {
width: 100%;
width: 100%;
display: flex;
justify-content: flex-end;
}
.list-button {
display: flex;
flex-direction: column;
max-width: 600rpx;
&.image {}
width: 100%;
&.image {
margin-right: 40rpx;
}
&.text {}
.image-view {
flex-shrink: 0;
background-color: #FFFFFF;
border-radius: 38rpx;
width: 76rpx;
height: 76rpx;
.image-content {
width: 76rpx;
height: 76rpx;
&.text {
width: 400rpx;
margin-left: 40rpx;
&.one {
width: 600rpx;
margin-left: 0rpx;
}
}
.image-view {
flex-shrink: 0;
background-color: #FFFFFF;
border-radius: 38rpx;
width: 76rpx;
height: 76rpx;
.image-content {
width: 76rpx;
height: 76rpx;
}
}
.text-content {
&.text {
color: #FFFFFF;
......@@ -125,7 +174,5 @@
}
}
}
}
</style>
......@@ -14,6 +14,10 @@
<view class="order-cell">
<text>合作厂商:</text>
<text>{{ order.partnerCompanyName }}</text>
</view>
<view class="order-cell">
<text>厂商编号:</text>
<text>{{ order.partnerSerialNumber }}</text>
</view>
<view class="order-cell between-cell">
<view class="left">
......@@ -164,7 +168,7 @@
padding-bottom: 6rpx;
background-color: #FFFFFF;
margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx;
// padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
.top-item {
......
......@@ -40,7 +40,7 @@
<view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view>
<u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh"
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange"separator-color="#666666" ref="order-count-down"></u-count-down>
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" separator-color="#666666" ref="order-count-down"></u-count-down>
</view>
<view v-else-if="showTime">
<text>{{timeTitle}}</text>
......@@ -257,7 +257,7 @@
return 3
} else if (this.orderData.orderStatus == 85 || this.orderData.orderStatus == 87) {
return 4
} else if (this.orderData.orderStatus == 86 ||this.orderData.orderStatus == 88) {
} else if (this.orderData.orderStatus == 86 || this.orderData.orderStatus == 88) {
return 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
return 6
......
......@@ -4,11 +4,11 @@
<text>履约记录</text>
</view>
<view v-if="orderRecords.length == 0" class="no-record-view">当前暂无履约记录</view>
<view v-else class="record-list-view">
<view v-else :class="['record-list-view', {'short': orderRecords.length <= showLenght}]">
<view class="record-right-view">
<view class="dashed-line-view"></view>
<view class="order-list">
<view v-for="(record,index) in shwoOrderRecords" :key="record.operationContent" :class="['order-cell', {'first': index == 0}]">
<view v-for="(record,index) in showOrderRecords" :key="record.operationContent" :class="['order-cell', {'first': index == 0}]">
<view class="node-view">
<view class="node-border-view">
<view class="node-middle-view"></view>
......@@ -71,7 +71,7 @@
}
},
computed: {
shwoOrderRecords() {
showOrderRecords() {
if (this.readMoreRecord && this.orderRecords && this.orderRecords.length > 0) {
return this.orderRecords.slice(0, this.showLenght)
} else {
......@@ -99,8 +99,10 @@
.record-list-view {
position: relative;
&.short {
padding-bottom: 30rpx;
}
.record-right-view {
position: relative;
display: flex;
......@@ -189,7 +191,7 @@
text-align: center;
color: #2272FF;
font-size: 26rpx;
margin-top: 30rpx;
padding-top: 30rpx;
padding-bottom: 30rpx;
}
......
......@@ -163,7 +163,7 @@ export default {
login.signup(params).then(res => {
uni.hideLoading()
if (res) {
app.setUserData(res.data, that)
login.setUserData(res.data, that)
app.track('signup_login', {mobile: res.data.mobile});
app.profileSet(that)
app.profileAppend(that)
......@@ -174,11 +174,11 @@ export default {
title: '授权失败,请重新授权',
icon: 'none'
});
this.setLoginStatus(false)
that.setLoginStatus(false)
}
}).catch(res => {
uni.hideLoading()
this.setLoginStatus(false)
that.setLoginStatus(false)
})
},
fail () {
......@@ -187,7 +187,7 @@ export default {
}
})
} else {
this.toLogin(params)
that.toLogin(params)
}
} else {
uni.showModal({
......
This diff is collapsed.
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