【前端】云工厂的纸掌柜app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.4 KiB

<template>
<view class="warpper">
<qnHeader class="header">
<!-- <view class="header"> -->
<view class="header-title">客户详情</view>
<view class="right-title" @click="go2('client-credit')">客户授信</view>
<!-- </view> -->
</qnHeader>
<view>
<uni-segmented-control
:current="current"
:values="items"
@clickItem="onClickItem"
styleType="text"
activeColor="#007AFF"
class="segmented"
></uni-segmented-control>
<view class="content">
<view v-show="current === 0"><basicInformation ref="basicInformationRef" :customerId="customerId"></basicInformation></view>
<view v-show="current === 1"><equipmentInformation></equipmentInformation></view>
<view v-show="current === 2"><basePaperDeals></basePaperDeals></view>
<view v-show="current === 3"><wastePaperTrading></wastePaperTrading></view>
</view>
</view>
</view>
</template>
<script>
import qnHeader from '@/components/qn-header/qn-header.vue'
import basicInformation from './basic-information.vue'
import equipmentInformation from './equipment-information.vue'
import basePaperDeals from './base-paper-deals.vue'
import wastePaperTrading from './waste-paper-trading.vue'
import { go2 } from '@/utils/hook.js'
export default {
components: {
qnHeader,
basicInformation,
equipmentInformation,
basePaperDeals,
wastePaperTrading
},
data() {
return {
current: 0,
items: ['基础信息', '设备信息', '原纸交易', '废纸交易'],
customerId: null
}
},
onLoad(option) {
this.customerId = option.id || '800890'
this.$nextTick(() => {
this.$refs.basicInformationRef.getBaseInfo()
})
},
methods: {
go2,
onClickItem(e) {
console.log('e', e)
this.current = e.currentIndex
}
}
}
</script>
<style lang="scss" scoped>
.warpper {
.header {
justify-content: space-between;
}
.header-title {
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: center;
line-height: 40rpx;
font-weight: 500;
}
.segmented {
height: 88rpx;
border-bottom: 2rpx solid #ececec;
font-size: 28rpx;
color: #333333;
text-align: center;
font-weight: 400;
}
}
</style>