Commit 7dbcf89f authored by Facius's avatar Facius

完工页面

parent 5a7073c6
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
"path": "complete", "path": "complete",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom", // "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
}, },
......
<template> <template>
<view class="com-content"> <view class="pg-complete">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check> <complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check>
<view class="u-wrap"> <view class="com-content">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" title-bold></u-navbar> <!-- <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" title-bold></u-navbar> -->
<Detail :order="order" :readMore.sync="readMore" :showOperate="false"></Detail> <view class="com-cont-top">
<u-tabs v-show="showTab" class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs> <view class="detail-view">
<view :class="['u-menu-wrap', {'one': !showTab}]"> <Detail :order="order" :readMore.sync="readMore" :showOperate="false"></Detail>
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" v-if="list[tabIndex].items.length > 1 && showTab"> </view>
<u-sticky>
<!-- <view style="background-color: #FF9900;height: 40rpx;width: 100%;">
aaaa
</view> -->
<u-tabs class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="tabList" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs>
</u-sticky>
<view class="u-menu-wrap">
<!-- <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" v-if="list[tabIndex].items.length > 1 && showTab">
<view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item" <view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)"> :class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text> <text class="u-line-1">{{item.name}}</text>
</view> </view>
</scroll-view> </scroll-view> -->
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll" :scroll-into-view="itemId"> <!-- <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll" :scroll-into-view="itemId"> -->
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])"> <template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])">
<view class="class-item" :key="groupIndex"> <view class="class-item" :key="groupIndex">
...@@ -91,8 +99,8 @@ ...@@ -91,8 +99,8 @@
</view> </view>
</template> </template>
</u-form> </u-form>
</scroll-view> <!-- </scroll-view> -->
</view>
</view> </view>
<view :class="['btn-wrap', 'flex-xc', {'btn-bottom': tabIndex > 0}]"> <view :class="['btn-wrap', 'flex-xc', {'btn-bottom': tabIndex > 0}]">
<u-button class="btn-submit" @click="saveComplete" <u-button class="btn-submit" @click="saveComplete"
...@@ -126,15 +134,16 @@ ...@@ -126,15 +134,16 @@
import XhPicker from '@/components/createCom/XhPicker.vue' import XhPicker from '@/components/createCom/XhPicker.vue'
import XhTime from '@/components/createCom/XhTime.vue' import XhTime from '@/components/createCom/XhTime.vue'
import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue' import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue'
import XhServiceMore from "../../components/createCom/XhServiceMore"; import XhServiceMore from "../../components/createCom/XhServiceMore"
import XhLabel from "../../components/createCom/XhLabel"; import XhLabel from "../../components/createCom/XhLabel"
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import baseFile from '@/components/upload/index'; import baseFile from '@/components/upload/index'
import Detail from "@/components/order/detail.vue" import Detail from "@/components/order/detail.vue"
// import XhRadio from '@/components/createCom/XhRadio.vue' // import XhRadio from '@/components/createCom/XhRadio.vue'
export default { export default {
data() { data() {
return { return {
pageIndex: 0, // 勘察、完工、基本信息
orderId:0, orderId:0,
categoryId:0, categoryId:0,
orderServiceType:'', orderServiceType:'',
...@@ -142,7 +151,7 @@ ...@@ -142,7 +151,7 @@
partnerCompanyId:'', partnerCompanyId:'',
auditResultsId: '', auditResultsId: '',
list: [], list: [],
tabIndex: 0, tabIndex: 1,
scrollTop: 0, //tab标题的滚动条位置 scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0, oldScrollTop: 0,
current: 0, // 预设当前项的值 current: 0, // 预设当前项的值
...@@ -176,7 +185,7 @@ ...@@ -176,7 +185,7 @@
takeStatus: false, takeStatus: false,
currentItemDate:{}, currentItemDate:{},
photoItem: {}, photoItem: {},
showTab: true, // showTab: true,
order: {}, order: {},
readMore: true readMore: true
} }
...@@ -205,17 +214,26 @@ ...@@ -205,17 +214,26 @@
onLoad(option) { onLoad(option) {
getApp().trackPage('订单完工信息页') getApp().trackPage('订单完工信息页')
if (option) { if (option) {
let string = decodeURIComponent(option.item) if (option.pageIndex) {
const item = JSON.parse(decodeURIComponent(string)) this.pageIndex = option.pageIndex
this.order = item uni.setNavigationBarTitle({
title: this.title
});
}
if (option.item) {
let string = decodeURIComponent(option.item)
const item = JSON.parse(decodeURIComponent(string))
this.order = item
this.orderId = item.orderId
this.categoryId = item.categoryId
this.orderServiceType = decodeURIComponent(item.orderServiceType)
this.inGuaranteePeriod = item.inGuaranteePeriod
this.partnerCompanyId = item.partnerCompanyId
this.auditResultsId = item.auditResultsId
}
this.orderId = item.orderId // this.showTab =item.partnerCompanyName == '挚达充电桩'
this.categoryId = item.categoryId
this.orderServiceType = decodeURIComponent(item.orderServiceType)
this.inGuaranteePeriod = item.inGuaranteePeriod
this.partnerCompanyId = item.partnerCompanyId
this.auditResultsId = item.auditResultsId
this.showTab =item.partnerCompanyName == '挚达充电桩'
} else { } else {
this.orderId = 11880091 this.orderId = 11880091
this.categoryId = 1100000214 this.categoryId = 1100000214
...@@ -232,6 +250,15 @@ ...@@ -232,6 +250,15 @@
//console.log(this.form.name, 'form.name') //console.log(this.form.name, 'form.name')
}, },
computed: { computed: {
pageTitles() {
return ['勘察信息', '完工信息', '基本信息']
},
title() {
return this.pageTitles[this.pageIndex]
},
tabList() { // 没有数据的时候tab要有占位数据,不然会因为没有初始高度而会划上去下不来
return this.list.length > 0 ? this.list[this.tabIndex].items : [{name:''}]
},
mixingImage() { mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png' return process.uniEnv.qn_base_url + 'mixing.png'
}, },
...@@ -372,7 +399,7 @@ ...@@ -372,7 +399,7 @@
} }
} }
this.list = res.data.config this.list = res.data.config
this.showTab = this.list.length > 1 // this.showTab = this.list.length > 1
this.form = res.data.value || {} this.form = res.data.value || {}
// 异常单处理 // 异常单处理
if (this.auditResultsId) this.checkCompleteError() if (this.auditResultsId) this.checkCompleteError()
...@@ -842,7 +869,7 @@ ...@@ -842,7 +869,7 @@
// ---------------------------- 表单样式end ---------------------------- // ---------------------------- 表单样式end ----------------------------
.u-wrap { .com-content{
height: calc(100vh); height: calc(100vh);
/* #ifdef H5 */ /* #ifdef H5 */
height: calc(100vh - var(--window-top)); height: calc(100vh - var(--window-top));
...@@ -854,6 +881,11 @@ ...@@ -854,6 +881,11 @@
background-size: 750rpx 600rpx; background-size: 750rpx 600rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.com-cont-top {
height: 100%;
overflow: auto;
}
.u-search-box { .u-search-box {
padding: 18rpx 30rpx; padding: 18rpx 30rpx;
...@@ -865,16 +897,17 @@ ...@@ -865,16 +897,17 @@
} }
.u-menu-wrap { .u-menu-wrap {
flex: 1; // flex: 1;
height: 100%; // height: 100%;
display: flex; // display: flex;
overflow: hidden; // overflow: hidden;
border-radius: 12rpx 12rpx 0 0; // border-radius: 12rpx 12rpx 0 0;
&.one {
border-radius: 0;
}
} }
.detail-view {
border-radius: 12rpx;
margin: 30rpx;
}
.u-search-inner { .u-search-inner {
background-color: rgb(234, 234, 234); background-color: rgb(234, 234, 234);
......
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