9.20/3
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
<text class="section-text">常用功能</text>
|
||||
</view>
|
||||
|
||||
<!-- 功能九宫格(玻璃容器 + 圆角方形图标) -->
|
||||
<!-- 功能九宫格(玻璃容器 + 圆角方形图标) -->
|
||||
<view class="grid-wrap">
|
||||
<view class="grid">
|
||||
<view class="grid-item" v-for="item in features" :key="item.key" @click="onFeatureTap(item)">
|
||||
@@ -64,32 +64,13 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作条 -->
|
||||
<view class="bottom-bar">
|
||||
<view class="tab" :class="{ active: activeTab==='home' }" @click="activeTab='home'">
|
||||
<text>首页</text>
|
||||
</view>
|
||||
<view class="tab" :class="{ active: activeTab==='product' }" @click="goProduct">
|
||||
<text>货品</text>
|
||||
</view>
|
||||
<view class="tab primary" @click="onCreateOrder">
|
||||
<text>开单</text>
|
||||
</view>
|
||||
<view class="tab" :class="{ active: activeTab==='detail' }" @click="goDetail">
|
||||
<text>明细</text>
|
||||
</view>
|
||||
<view class="tab" :class="{ active: activeTab==='report' }" @click="goReport">
|
||||
<text>报表</text>
|
||||
</view>
|
||||
<view class="tab" :class="{ active: activeTab==='me' }" @click="goMe">
|
||||
<text>我的</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部操作条改为原生 tabBar,移除自定义栏 -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { get } from '../../common/http.js'
|
||||
import { ROUTES } from '../../common/constants.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -147,14 +128,15 @@
|
||||
this.loadingNotices = false
|
||||
}
|
||||
},
|
||||
onFeatureTap(item) {
|
||||
onFeatureTap(item) {
|
||||
if (item.key === 'product') {
|
||||
uni.navigateTo({ url: '/pages/product/list' })
|
||||
uni.switchTab({ url: '/pages/product/list' })
|
||||
return
|
||||
}
|
||||
if (item.key === 'sale') {
|
||||
// 进入开单页并预选“销售-出货”
|
||||
uni.navigateTo({ url: '/pages/order/create?biz=sale&type=out' })
|
||||
// 进入开单页并预选“销售-出货”
|
||||
try { uni.setStorageSync('ORDER_DEFAULT_PARAMS', { biz: 'sale', type: 'out' }) } catch(e) {}
|
||||
uni.switchTab({ url: '/pages/order/create' })
|
||||
return
|
||||
}
|
||||
if (item.key === 'customer') {
|
||||
@@ -171,42 +153,31 @@
|
||||
return
|
||||
}
|
||||
if (item.key === 'purchase') {
|
||||
// 进入开单页并预选“进货-进货”
|
||||
uni.navigateTo({ url: '/pages/order/create?biz=purchase&type=in' })
|
||||
return
|
||||
}
|
||||
if (item.key === 'report') {
|
||||
// 直接进入报表页
|
||||
uni.navigateTo({ url: '/pages/report/index' })
|
||||
// 进入开单页并预选“进货-进货”
|
||||
try { uni.setStorageSync('ORDER_DEFAULT_PARAMS', { biz: 'purchase', type: 'in' }) } catch(e) {}
|
||||
uni.switchTab({ url: '/pages/order/create' })
|
||||
return
|
||||
}
|
||||
if (item.key === 'report') {
|
||||
// 报表非 tab 页,使用 navigateTo 进入
|
||||
uni.navigateTo({ url: ROUTES.report })
|
||||
return
|
||||
}
|
||||
if (item.key === 'otherPay') {
|
||||
// 进入开单页并预选“其他支出”
|
||||
uni.navigateTo({ url: '/pages/order/create?biz=expense' })
|
||||
// 进入开单页并预选“其他支出”
|
||||
try { uni.setStorageSync('ORDER_DEFAULT_PARAMS', { biz: 'expense' }) } catch(e) {}
|
||||
uni.switchTab({ url: '/pages/order/create' })
|
||||
return
|
||||
}
|
||||
uni.showToast({ title: item.title + '(开发中)', icon: 'none' })
|
||||
},
|
||||
goProduct() {
|
||||
this.activeTab = 'product'
|
||||
uni.navigateTo({ url: '/pages/product/list' })
|
||||
},
|
||||
onCreateOrder() {
|
||||
uni.navigateTo({ url: '/pages/order/create' })
|
||||
},
|
||||
goDetail() {
|
||||
this.activeTab = 'detail'
|
||||
try { console.log('[index] goDetail → /pages/detail/index') } catch(e){}
|
||||
uni.navigateTo({ url: '/pages/detail/index' })
|
||||
},
|
||||
goReport() {
|
||||
this.activeTab = 'report'
|
||||
uni.navigateTo({ url: '/pages/report/index' })
|
||||
},
|
||||
goMe() {
|
||||
this.activeTab = 'me'
|
||||
uni.navigateTo({ url: '/pages/my/index' })
|
||||
},
|
||||
goProduct() { uni.switchTab({ url: '/pages/product/list' }) },
|
||||
onCreateOrder() { uni.switchTab({ url: '/pages/order/create' }) },
|
||||
goDetail() {
|
||||
try { console.log('[index] goDetail → /pages/detail/index') } catch(e){}
|
||||
uni.switchTab({ url: '/pages/detail/index' })
|
||||
},
|
||||
goMe() { uni.switchTab({ url: '/pages/my/index' }) },
|
||||
onNoticeTap(n) {
|
||||
uni.showModal({
|
||||
title: '广告',
|
||||
|
||||
Reference in New Issue
Block a user