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

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

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