| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <gui-page :custom-header="true" :header-class="['gui-theme-background-color']">
- <template #gHeader>
- <view style="height:44px;" class="gui-flex gui-nowrap gui-rows gui-align-items-center">
- <!-- 使用组件实现返回按钮及返回首页按钮 -->
- <text
- style="font-size:44rpx;"
- class="gui-header-leader-btns gui-color-white font-icons"
- @tap="goHome"
- ></text>
- <!-- 导航文本此处也可以是其他自定义内容 -->
- <text
- class="gui-h4 gui-blod gui-flex1 gui-text-center gui-ellipsis gui-color-white gui-primary-text"
- >功能列表</text>
- <!-- 此处加一个右侧展位元素与左侧同宽,实现标题居中 -->
- <!-- 实际宽度请根据自己情况设置 -->
- <view style="width:40px;" />
- </view>
- </template>
- <template #gBody>
- <view class="card-list-flexbox">
- <view class="card">
- <div class="card-panel" style="background-color: #55aa7f;" @click="handleNavigateTo('物料拆分')">
- <text class="font-icons"></text>
- <text>物料拆分</text>
- </div>
- </view>
- <view class="card">
- <div class="card-panel" style="background-color: #00a0e9;" @click="handleNavigateTo('物料合并')">
- <text class="font-icons"></text>
- <text>物料合并</text>
- </div>
- </view>
- </view>
- </template>
- </gui-page>
- </template>
- <script>
- import {
- defineComponent
- } from 'vue'
- export default defineComponent({
- setup() {
- const goHome = function() {
- uni.$goHome()
- }
- const handleNavigateTo = function(state) {
- switch (state) {
- case '物料拆分':
- uni.navigateTo({
- url: '/pages/workbranch/warehouse/materialDisass/materialSplit'
- })
- break
- case '物料合并':
- uni.navigateTo({
- url: '/pages/workbranch/warehouse/materialDisass/materialMerge'
- })
- break
- }
- }
- return {
- goHome,
- handleNavigateTo
- }
- }
- })
- </script>
- <style lang="scss" scoped>
- .gui-header-leader-btns {
- color: black;
- font-size: 24px !important;
- margin-left: 24rpx;
- }
- .card-list-flexbox {
- margin-top: 100px;
- display: grid;
- grid-template-columns: 1fr 1fr 1fr;
- .card {
- display: flex;
- justify-content: center;
- align-items: center;
- .card-panel {
- width: 85px;
- height: 85px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- border-radius: 8px;
- box-shadow: 1px 1px 2px 3px #e9e9e9;
- text:nth-of-type(2) {
- margin-top: 4px;
- font-size: 12px;
- font-weight: bold;
- color: white;
- }
- }
- }
- }
- .font-icons {
- font-size: 36px;
- color: white;
- }
- </style>
|