Commit 7dbcf89f authored by Facius's avatar Facius

完工页面

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