| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="跟踪项目" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{user.username}}</text> |
| | | </view> |
| | | <uni-icons type="arrowdown" color="#333333" size="20" /> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <!-- 搜索框 --> |
| | | <view class="search-bg"> |
| | | <uni-search-bar placeholder="客户代号/名称" bgColor="#f4f4f4" @confirm="search" /> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <uni-load-more :status="status" :icon-size="16" :content-text="contentText" /> |
| | | <!-- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" /> --> |
| | | <u-empty v-if="true" icon="../../../static/image/emptyList.png" v-show="csmtrList.length <= 0" /> |
| | | |
| | | <view class="fxbtn"> |
| | | <uni-icons type="plusempty" color="#fff" @click="add()" ></uni-icons> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import user from '@/pages/api/user/user.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | user: { |
| | | username: '', |
| | | id: 0, |
| | | type: '' |
| | | }, |
| | | falg: true, |
| | | csmtrList: [], |
| | | last_id: '', |
| | | reload: false, |
| | |
| | | |
| | | } |
| | | }, |
| | | // 新建按钮事件 |
| | | onNavigationBarButtonTap(e) { |
| | | uni.navigateTo({ |
| | | url:'/pages/business/saleManage/addSaleManage', |
| | | }) |
| | | |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | onShow() { |
| | | let that = this |
| | | uni.$on('isRefresh',function(data){ |
| | | that.user.username = data.title |
| | | that.user.id = data.id |
| | | that.user.type = data.key |
| | | that.falg = false |
| | | }) |
| | | if (this.falg) { |
| | | this.getDetail() |
| | | } |
| | | setTimeout(()=> { |
| | | this.getCsmtr1() |
| | | },500) |
| | | },50) |
| | | }, |
| | | onReachBottom() { |
| | | this.status = 'more'; |
| | | this.getCsmtr() |
| | | }, |
| | | methods: { |
| | | async getDetail() { |
| | | let res = await user.getDetail() |
| | | if (res.code === 200) { |
| | | this.user.username = res.data.username |
| | | this.user.id = res.data.id |
| | | } else if (res.code === 403) { |
| | | this.backLogin(res) |
| | | } |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url:'/pages/business/saleManage/addSaleManage', |
| | | }) |
| | | }, |
| | | getCsmtr1(e) { |
| | | let that = this |
| | | that.csmtrList = [] |
| | |
| | | // --- |
| | | search() { |
| | | |
| | | } |
| | | }, |
| | | back() { |
| | | uni.navigateBack({ |
| | | }) |
| | | }, |
| | | scan() { |
| | | uni.navigateTo({ |
| | | url: '/pages/authority/authority' |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |