li.shaoyi 2 năm trước cách đây
mục cha
commit
e913b5d1de

+ 1 - 28
oem/gcszt/config/router.json

@@ -103,34 +103,7 @@
                 "code": "market_trade",
                 "url": "trade",
                 "urlType": 1,
-                "component": "Main",
-                "children": [
-                    {
-                        "authType": 1,
-                        "sort": 1,
-                        "title": "订单交易",
-                        "code": "market_trade_goods",
-                        "url": "goods",
-                        "urlType": 1,
-                        "component": "views/market/trade/goods/index.vue",
-                        "children": [
-                            {
-                                "authType": 2,
-                                "sort": 1,
-                                "title": "周清挂牌",
-                                "code": "market_trade_goods_50103",
-                                "component": "views/market/trade/goods/list/index.vue"
-                            },
-                            {
-                                "authType": 2,
-                                "sort": 2,
-                                "title": "月清挂牌",
-                                "code": "market_trade_goods_50104",
-                                "component": "views/market/trade/goods/list/index.vue"
-                            }
-                        ]
-                    }
-                ]
+                "component": "views/market/trade/index.vue"
             }
         ]
     },

+ 1 - 1
public/config/appconfig.json

@@ -1,6 +1,6 @@
 {
   "appId": "com.muchinfo.app",
-  "appName": "多元世纪",
+  "appName": "多元世纪交易中心",
   "version": "1.0.5",
   "versionCode": "10005",
   "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",

+ 4 - 0
src/business/bank/index.ts

@@ -210,6 +210,7 @@ export function useDoBankSign() {
 export function useDoCancelBankSign() {
     /// 获取UserId
     const loading = shallowRef(false)
+    const isloaded = shallowRef(false)
     const bankInfo = shallowRef<Model.BankAccountSignRsp>()
 
     /// 表单信息
@@ -227,6 +228,8 @@ export function useDoCancelBankSign() {
                 cusbankid: formData.CusBankID,
                 accountcode: formData.AccountCode,
             } = bankInfo.value ?? {})
+        }).finally(() => {
+            isloaded.value = true
         })
     }
 
@@ -245,6 +248,7 @@ export function useDoCancelBankSign() {
 
     return {
         loading,
+        isloaded,
         cancelSubmit,
         formData,
         sign,

+ 3 - 1
src/hooks/datatable/index.ts

@@ -35,7 +35,9 @@ export function useDataTable<T>(options: DataTableOptions = {}) {
             // 本地分页
             if (options.localPagination) {
                 total.value = result.length
-                return result.slice((pageIndex.value - 1) * pageSize.value, pageIndex.value * pageSize.value)
+                const startIndex = (pageIndex.value - 1) * pageSize.value
+                const endIndex = pageIndex.value * pageSize.value
+                return result.slice(startIndex, endIndex)
             }
             return result
         },

+ 4 - 2
src/hooks/pagination/index.ts

@@ -15,8 +15,10 @@ export function useLocalPagination<T>(pageSize = 20) {
 
     // 加载更多
     const loadMore = () => {
-        pageIndex.value += 1
-        tableList.value.push(...dataList.value)
+        if (showLoadMore.value) {
+            pageIndex.value += 1
+            tableList.value.push(...dataList.value)
+        }
     }
 
     // 初始化数据

+ 4 - 4
src/packages/mobile/views/bank/sign/Index.vue

@@ -16,7 +16,7 @@
                 <Cell title="状态" :value="getSignStatusName(bankInfo.signstatus)" />
             </CellGroup>
         </div>
-        <div class="bank-sign__empty" v-else>
+        <div class="bank-sign__empty" v-else-if="isloaded">
             <Empty description="您还未添加签约账户" />
             <Button type="danger" @click="showComponent(false)" round>添加签约账户</Button>
         </div>
@@ -28,8 +28,8 @@
                     v-if="bankInfo.signstatus === SignStatus.Signed && cusBank?.canrelease === 1">解约</Button>
                 <Button type="danger" round block @click="beforeShowComponent"
                     v-if="bankInfo.signstatus === SignStatus.Signed && cusBank?.canmodifysigninfo === 1">修改</Button>
-                <Button type="danger" round  block @click="showComponent(false)" 
-                    v-if="bankInfo.signstatus === SignStatus.Unsigned && cusBank?.cansign === 1" >添加签约账户</Button>
+                <Button type="danger" round block @click="showComponent(false)"
+                    v-if="bankInfo.signstatus === SignStatus.Unsigned && cusBank?.cansign === 1">添加签约账户</Button>
             </div>
         </template>
         <component ref="componentRef" v-bind="{ isedit }" :is="componentMap.get(componentId)" @closed="closeComponent"
@@ -55,7 +55,7 @@ const componentMap = new Map<string, unknown>([
 
 const cusBank = shallowRef<Model.CusBankSignBankRsp>()
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => formRefresh())
-const { cancelSubmit, formRefresh, bankInfo } = useDoCancelBankSign()
+const { cancelSubmit, formRefresh, bankInfo, isloaded } = useDoCancelBankSign()
 const { router } = useNavigation()
 /// 是否修改
 const isedit = ref(false)

+ 17 - 53
src/packages/mobile/views/bank/wallet/components/deposit/Index.vue

@@ -1,7 +1,12 @@
 <template>
     <app-view class="g-form bank-wallet-deposit">
-        <Form ref="formRef" v-if="cusBank.caninamount === 1" class="g-form__container" @submit="doDepositWarning">
-            <CellGroup inset>
+        <Form ref="formRef" class="g-form__container" @submit="doDepositWarning">
+            <CellGroup inset v-if="cusBank.caninamount === 1">
+                <Field label="入金时间">
+                    <template #input>
+                        <span style="color: #999;">{{ start }} - {{ end }}</span>
+                    </template>
+                </Field>
                 <Field type="number" v-model="formData.Amount" label="入金金额" placeholder="请填写入金金额"
                     :rules="formRules.Amount" />
                 <Field label="凭证" :rules="formRules.filePath">
@@ -15,57 +20,16 @@
                         :placeholder="`请输入${item.fieldname}`" />
                 </template>
             </CellGroup>
-            <div class="g-form__time">
-                <label>入金时间:{{ start }} - {{ end }}</label>
-            </div>
+            <CellGroup inset>
+                <Cell title="提示" icon="info-o">
+                    <template #label>
+                        <p v-html="msg"></p>
+                    </template>
+                </Cell>
+            </CellGroup>
         </Form>
-        <div class="g-form__bank" v-if="cusBank.caninamount === 0">
-            <span style="color: #666; font-size: 0.25rem;" v-html="msg" />
-        </div>
-        <div class="g-form__time" style="padding: 0rem 0.1rem 0.1rem 0.3rem;" v-if="cusBank.caninamount === 1">
-            <span style="color: #666; font-size: 0.25rem;" v-html="msg" />
-        </div>
-        <div class="g-form__bank" v-if="false">
-            <table cellspacing="10" cellpadding="0">
-                <tr>
-                    <td>
-                        <span>企业名称:</span>
-                        <span>上海徽行供应链有限公司</span>
-                    </td>
-                    <td>
-                        <button type="button" data-clipboard-text="上海徽行供应链有限公司" v-copy="onCopy">复制</button>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="2">
-                        <span>开户银行:</span>
-                        <span>中信银行上海虹口支行</span>
-                    </td>
-                </tr>
-                <tr>
-                    <td>
-                        <span>银行账户:</span>
-                        <span>8110201012101533442</span>
-                    </td>
-                    <td>
-                        <button ref="copy2" type="button" data-clipboard-text="8110201012101533442"
-                            v-copy="onCopy">复制</button>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="2">
-                        <span>(汇款备注:预付货款或合同转让款)</span>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="2">
-                        <span>电话: 021-63138889, 13681901188</span>
-                    </td>
-                </tr>
-            </table>
-        </div>
-        <template #footer>
-            <div class="g-form__footer inset" v-if="cusBank.caninamount === 1">
+        <template #footer v-if="cusBank.caninamount === 1">
+            <div class="g-form__footer inset">
                 <Button round block type="danger" @click="formRef?.submit()">确定</Button>
             </div>
         </template>
@@ -74,7 +38,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, ref } from 'vue'
-import { Form, Field, CellGroup, Button, FieldRule, FormInstance, showFailToast, showSuccessToast } from 'vant'
+import { Form, Field, Cell, CellGroup, Button, FieldRule, FormInstance, showFailToast, showSuccessToast } from 'vant'
 import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
 import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@mobile/router/navigation'

+ 0 - 6
src/packages/mobile/views/bank/wallet/components/deposit/index.less

@@ -1,10 +1,4 @@
 .bank-wallet-deposit {
-    .g-form__time {
-        color: #999;
-        padding-left: 15px;
-        padding-top: 0.2rem;
-    }
-
     .g-form__bank {
         padding: 16px;
 

+ 17 - 11
src/packages/mobile/views/bank/wallet/components/withdraw/Index.vue

@@ -1,7 +1,12 @@
 <template>
     <app-view class="g-form bank-wallet-withdraw">
-        <Form ref="formRef" v-if="cusBank.canoutamount === 1" class="g-form__container" @submit="doWithDrawWarning">
-            <CellGroup inset>
+        <Form ref="formRef" class="g-form__container" @submit="doWithDrawWarning">
+            <CellGroup inset v-if="cusBank.canoutamount === 1">
+                <Field label="出金时间">
+                    <template #input>
+                        <span style="color: #999;">{{ start }} - {{ end }}</span>
+                    </template>
+                </Field>
                 <Field class="form-field" type="number" label="出金金额" v-model="formData.Amount" :rules="formRules.Amount">
                     <template #input>
                         <input v-model="formData.Amount" placeholder="请填写出金金额" />
@@ -29,15 +34,16 @@
                         :placeholder="`请输入${item.fieldname}`" />
                 </template>
             </CellGroup>
-            <div class="g-form__time">
-                <label>出金时间:{{ start }} - {{ end }}</label>
-            </div>
+            <CellGroup inset v-if="cusBank.canoutamount === 0">
+                <Cell>
+                    <template #label>
+                        <p v-html="msg"></p>
+                    </template>
+                </Cell>
+            </CellGroup>
         </Form>
-        <div class="g-form__bank" v-if="cusBank.canoutamount === 0">
-            <span style="color: #666; font-size: 0.25rem;" v-html="msg" />
-        </div>
-        <template #footer>
-            <div class="g-form__footer inset" v-if="cusBank.canoutamount === 1">
+        <template #footer v-if="cusBank.canoutamount === 1">
+            <div class="g-form__footer inset">
                 <Button round block type="danger" @click="formRef?.submit()">确定</Button>
             </div>
         </template>
@@ -46,7 +52,7 @@
 
 <script lang="ts" setup>
 import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank';
-import { Form, Field, CellGroup, FormInstance, Button, FieldRule } from 'vant'
+import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
 import { shallowRef } from 'vue'
 import { fullloading, dialog, } from '@/utils/vant'
 import { useNavigation } from '@mobile/router/navigation'

+ 0 - 6
src/packages/mobile/views/bank/wallet/components/withdraw/index.less

@@ -14,10 +14,4 @@
     .g-form__bank {
         padding: 16px;
     }
-
-    .g-form__time {
-        color: #999;
-        padding-left: 15px;
-        padding-top: 10px;
-    }
 }

+ 2 - 2
src/packages/mobile/views/news/detail/Index.vue

@@ -21,8 +21,8 @@
                 <span>{{ formatDate(data.publishdate, 'YYYY-MM-DD') }}</span>
                 <span style="margin-left: auto;">阅览数: {{ data.hits }}</span>
             </h4>
-            <HtmlContainer :context="formatHtmlString(data.context)" v-if="data.context" />
-            <p style="color: #999;margin-top: .24rem;font-size: .24rem;" v-if="data.author">作者: {{ data.author }}</p>
+            <HtmlContainer class="content" :context="formatHtmlString(data.context)" v-if="data.context" />
+            <p class="footer" v-if="data.author">作者: {{ data.author }}</p>
         </section>
         <template v-if="dataList.length">
             <Divider>热门资讯</Divider>

+ 8 - 3
src/packages/mobile/views/news/detail/index.less

@@ -31,9 +31,14 @@
             }
         }
 
-        >p {
-            font-size: .28rem;
-            line-height: .48rem;
+        >div.content p {
+            font-size: .32rem;
+            line-height: .64rem;
+        }
+
+        >p.footer {
+            color: #999;
+            margin-top: .24rem;
 
             img {
                 max-width: 100%;

+ 35 - 5
src/packages/pc/components/layouts/header/components/notice/index.less

@@ -5,15 +5,45 @@
         padding-top: 16px;
     }
 
-    &__tabs {
+    &-tabs {
         --el-color-primary: #3a87f7;
         --el-text-color-primary: #7a8a94;
         --el-border-color-light: #263749;
+
+        width: 100%;
     }
 
-    &__pane {
-        --el-color-primary: #3a87f7;
-        --el-text-color-primary: #7a8a94;
-        --el-border-color-light: #263749;
+    &-pane {
+        display: flex;
+
+        &__item {
+            border-right: 1px solid #263749;
+
+            ul {
+                color: #7a8a94;
+                padding-right: 24px;
+
+                li {
+                    display: flex;
+                    justify-content: flex-end;
+                    align-items: center;
+                    height: 36px;
+                    cursor: pointer;
+
+                    &.is-active {
+                        color: #3a87f7;
+                    }
+
+                    .el-badge {
+                        font-size: 0;
+                        margin-right: 8px;
+                    }
+                }
+            }
+        }
+
+        &__content {
+            flex: 1;
+        }
     }
 }

+ 44 - 29
src/packages/pc/components/layouts/header/components/notice/index.vue

@@ -1,46 +1,59 @@
 <!-- 系统公告 -->
 <template>
     <app-drawer class="app-notice" title="系统公告" :width="800" v-model:show="show">
-        <el-tabs class="app-notice__tabs" v-model="selectedTab" @tab-change="tabChange">
-            <el-tab-pane label="公告" name="notice" />
-            <el-tab-pane label="消息" name="message" />
-        </el-tabs>
-        <el-tabs class="app-notice__pane" tab-position="left" v-model="activeId" @tab-change="collapseChange"
-            v-if="dataList.length">
-            <template v-for="(item, index) in dataList" :key="index">
-                <el-tab-pane :name="item.autoid">
-                    <template #label>
-                        <el-badge :is-dot="!item.readed" style="margin-right: 8px;" />
-                        <span>{{ formatDate(item.createtime, 'MM/DD HH:mm') }}</span>
-                    </template>
-                    <div style="padding:0 28px;">
+        <app-view>
+            <template #header>
+                <el-tabs class="app-notice-tabs" v-model="selectedTab" @tab-change="tabChange">
+                    <el-tab-pane label="公告" name="notice" />
+                    <el-tab-pane label="消息" name="message" />
+                </el-tabs>
+            </template>
+            <div class="app-notice-pane" v-if="tableList.length">
+                <el-scrollbar class="app-notice-pane__item" :max-height="400">
+                    <ul v-infinite-scroll="loadMore">
+                        <template v-for="(item, index) in tableList" :key="index">
+                            <li :class="index === active ? 'is-active' : ''" @click="collapseChange(index)">
+                                <el-badge :hidden="item.readed" is-dot />
+                                <span>{{ formatDate(item.createtime, 'MM/DD HH:mm') }}</span>
+                            </li>
+                        </template>
+                    </ul>
+                </el-scrollbar>
+                <el-scrollbar class="app-notice-pane__content" :height="400">
+                    <section style="padding:0 28px;" v-if="selectedItem">
                         <h4 style="display: flex; flex-direction: column;">
-                            <span style="font-weight: bold;">{{ item.title }}</span>
+                            <span style="font-weight: bold;">{{ selectedItem.title }}</span>
                             <span style="font-size: 12px; color: #999;margin: 8px 0;">
-                                {{ formatDate(item.createtime) }}
+                                {{ formatDate(selectedItem.createtime) }}
                             </span>
                         </h4>
-                        <div style="line-height: 24px;color: #7a8a94;" v-html="formatHtmlString(item.content)"></div>
-                    </div>
-                </el-tab-pane>
-            </template>
-        </el-tabs>
-        <el-empty v-else />
+                        <div style="line-height: 24px;color: #7a8a94;" v-html="formatHtmlString(selectedItem.content)">
+                        </div>
+                    </section>
+                </el-scrollbar>
+            </div>
+            <el-empty v-else />
+        </app-view>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, onMounted } from 'vue'
+import { shallowRef, onMounted, computed } from 'vue'
 import { formatDate, formatHtmlString } from '@/filters'
+import { useLocalPagination } from '@/hooks/pagination'
 import { useNoticeStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const noticeStore = useNoticeStore()
 const show = shallowRef(true)
 const selectedTab = shallowRef('notice')
-const activeId = shallowRef(0)
+const active = shallowRef(-1)
 const dataList = shallowRef<Model.NoticeRsp[]>([])
 
+const { tableList, initTableData, loadMore } = useLocalPagination<Model.NoticeRsp>()
+
+const selectedItem = computed(() => dataList.value[active.value])
+
 const tabChange = (tab: string) => {
     switch (tab) {
         case 'notice': {
@@ -52,15 +65,17 @@ const tabChange = (tab: string) => {
             break
         }
     }
-    const [firstItem] = dataList.value
-    if (firstItem) {
-        activeId.value = firstItem.autoid
-        collapseChange(activeId.value)
+    initTableData(dataList.value)
+    if (tableList.value.length) {
+        active.value = 0
+        collapseChange(0)
     }
 }
 
-const collapseChange = (id: number) => {
-    noticeStore.updateNoticeReaded(id)
+const collapseChange = (index: number) => {
+    const item = tableList.value[index]
+    active.value = index
+    noticeStore.updateNoticeReaded(item.autoid)
 }
 
 onMounted(() => tabChange(selectedTab.value))