소스 검색

1、新闻资讯;
2、历史资金流水;
3、Bug修改;

Handy_Cao 3 년 전
부모
커밋
e776b46328

+ 6 - 22
src/business/bank/index.ts

@@ -6,12 +6,12 @@ import { decryptAES } from '@/utils/websocket/crypto'
 import moment from "moment";
 
 // 历史资金流水列表
-export function useBankStatementList() {
+export function useHisAmountStatementList() {
     const { getFirstAccountId } = useLoginStore()
     const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.HisAmountLogRsp>()
     const loading = shallowRef(false)
 
-    const getBankStatementList = () => {
+    const getHisAmountStatementList = () => {
         loading.value = true
         return queryHisAmountLog({
             data: {
@@ -36,12 +36,12 @@ export function useBankStatementList() {
         pageIndex,
         pageSize,
         pageCount,
-        getBankStatementList,
+        getHisAmountStatementList,
     }
 }
 
 // 获取出入金流水列表
-export function getAccountInOutApplyList() {
+export function useAmountStatementList() {
 
     const { getUserId } = useLoginStore()
     const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.AccountOutInApplyRsp>()
@@ -295,7 +295,7 @@ export function useDoBankSign() {
              branchbankname: formData.OpenBankName,
              bankaccountno: formData.BankAccountNo,
              bankid:formData.OpenBankAccId,
-            }=bankInfo.value)
+            }=bankInfo.value ?? {})
     })
 
     /// 数据
@@ -358,26 +358,10 @@ export function useDoCancelBankSign() {
             currency:formData.Currency,
              cusbankid:formData.CusBankID,
              accountcode:formData.AccountCode,
-            }=bankInfo.value)
+            }=bankInfo.value ?? {})
         
     })
 
-    // /// 请求签约信息
-    // const request = queryBankAccountSign({
-    //     data: {
-    //         userid: getUserId()
-    //     },
-    //     success: (res) => {
-    //         if (res.data.length) {
-    //             sign.value = res.data
-    //             const data = res.data[0]  
-    //             formData.Currency = data.currency,
-    //             formData.CusBankID = data. cusbankid,
-    //             formData.AccountCode = data. accountcode        
-    //         }
-    //     }
-    // })
-
     const cancelSubmit = async () => {
         // await request
         loading.value = true

+ 2 - 1
src/business/user/account.ts

@@ -47,7 +47,8 @@ export function addAuthReq() {
     const loading = shallowRef(false)
    
     const formData = reactive<Partial<Model.AddAuthReq>>({
-        userid: getUserId()
+        userid: getUserId(),
+        cardtype: 0
     })
 
     const formSubmit = () => {

+ 2 - 0
src/packages/mobile/components/base/select/index.vue

@@ -94,6 +94,8 @@ const onConfirm = (currentValue: PickerOption, currentIndex: number) => {
 
 watch(() => [props.modelValue, props.options], ([value, items]) => {
     selectedIndex.value = items.findIndex((e) => e[props.optionProps.value]?.toString() === value?.toString())
+},{
+    immediate:true
 })
 </script>
 

+ 13 - 0
src/packages/mobile/router/index.ts

@@ -112,6 +112,14 @@ const routes: Array<RouteRecordRaw> = [
         meta: {
           ignoreAuth: true,
         },
+      },
+      {
+        path: 'list',
+        name: 'news-list',
+        component: () => import('../views/news/list/index.vue'),
+        meta: {
+          ignoreAuth: true,
+        },
       }
     ]
   },
@@ -169,6 +177,11 @@ const routes: Array<RouteRecordRaw> = [
         name: 'bank-statement',
         component: () => import('../views/bank/statement/index.vue'),
       },
+      {
+        path: 'hisstatement',
+        name: 'bank-hisstatement',
+        component: () => import('../views/bank/hisstatement/index.vue'),
+      },
     ]
   },
   {

+ 7 - 13
src/packages/mobile/views/account/certification/index.vue

@@ -11,12 +11,12 @@
                     :rules="formRules.cardtype" :options="enums" />
                 <Field v-model="formData.cardnum" name="cardnum" label="证件号码" placeholder="请输入证件号码"
                     :rules="formRules.cardnum" />
-                <Field name="cardbackphotourl" label="证件正面照片" :rules="formRules.cardbackphotourl">
+                <Field name="cardfrontphotourl" label="证件正面照片" :rules="formRules.cardfrontphotourl">
                     <template #input>
                         <Uploader v-model="frontList" max-count="1" :after-read="b_afterRead" />
                     </template>
                 </Field>
-                <Field name="cardfrontphotourl" label="证件反面照片" :rules="formRules.cardfrontphotourl">
+                <Field name="cardbackphotourl" label="证件反面照片" :rules="formRules.cardbackphotourl">
                     <template #input>
                         <Uploader v-model="backList" max-count="1" :after-read="f_afterRead" />
                     </template>
@@ -53,7 +53,6 @@ const frontList = ref([]);
 /// 获取对应的证件枚举类型
 const enums = computed(() => { return getCertificateTypeList().map(obj => { return { label: obj.label, value: obj.value } }) })
 
-
 const b_afterRead = (file: any) => {
     file.status = 'uploading';
     file.message = '上传中...';
@@ -67,7 +66,7 @@ const b_afterRead = (file: any) => {
         if (res.status == 200) {
             file.status = 'success';
             file.message = '上传成功';
-            formData.cardbackphotourl = res.data[0].filePath
+            formData.cardfrontphotourl = res.data[0].filePath
         } else {
             file.status = 'failed';
             file.message = '上传失败';
@@ -88,7 +87,7 @@ const f_afterRead = (file: any) => {
         if (res.status == 200) {
             file.status = 'success';
             file.message = '上传成功';
-            formData.cardfrontphotourl = res.data[0].filePath
+            formData.cardbackphotourl = res.data[0].filePath
         } else {
             file.status = 'failed';
             file.message = '上传失败';
@@ -102,23 +101,18 @@ const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
         required: true,
         message: '请输入用户姓名',
     }],
-    cardtype: [{
-        message: '请选择证件类型',
-        validator: () => {
-            return !!formData.cardtype
-        }
-    }],
     cardnum: [{
         required: true,
         message: '请输入证件号码',
+        
     }],
     cardbackphotourl: [{
         required: true,
-        message: '请上传证件面照片',
+        message: '请上传证件面照片',
     }],
     cardfrontphotourl: [{
         required: true,
-        message: '请上传证件面照片',
+        message: '请上传证件面照片',
     }],
 }
 

+ 93 - 0
src/packages/mobile/views/bank/hisstatement/index.vue

@@ -0,0 +1,93 @@
+<template>
+    <app-view class="credit-hisstatement">
+        <template #header>
+            <app-navbar title="历史资金流水" />
+        </template>
+        <app-pull-refresh class="credit-hisstatement__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+            :updateList="dataList" @refresh="onRefresh" @updated="onRefreshUpdated">
+            <template #header>
+                <ul class="list list-row" v-if="showHeader">
+                    <li class="list-column">
+                        <span>时间</span>
+                    </li>
+                    <li class="list-column">
+                        <span>操作类型</span>
+                    </li>
+                    <li class="list-column">
+                        <span>金额</span>
+                    </li>
+                </ul>
+            </template>
+            <template #default="{ item }">
+                <ul class="list list-row">
+                    <li class="list-column">
+                        <span>{{ formatDate(item.createtime, 'YYYY-MM-DD') }}</span>
+                        <span>{{ formatDate(item.createtime, 'HH:mm:ss') }}</span>
+                    </li>
+                    <li class="list-column">{{ getAccountBusinessCodeName(item.businesscode) }}</li>
+                    <li class="list-column">{{ item.amount }}</li>
+                </ul>
+            </template>
+        </app-pull-refresh>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { getAccountBusinessCodeName } from '@/constants/bank'
+import { useHisAmountStatementList } from '@/business/bank'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const { dataList, pageIndex, pageCount, getHisAmountStatementList } = useHisAmountStatementList()
+const showHeader = shallowRef(false)
+
+const onRefresh = (callback: () => void) => {
+    getHisAmountStatementList().finally(() => callback())
+}
+
+const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {
+    showHeader.value = data.length > 0
+}
+</script>
+
+<style lang="less">
+.credit-hisstatement {
+    &__container {
+        height: 100%;
+        overflow-y: auto;
+
+        .list {
+            display: flex;
+            align-items: center;
+            background-color: #fff;
+
+            &-row {
+                font-size: .32rem;
+                border-bottom: 1px solid #eee;
+                padding: .12rem .32rem;
+            }
+
+            &-column {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+                text-align: center;
+
+                &:first-child {
+                    text-align: left;
+                }
+
+                &:last-child {
+                    text-align: right;
+                }
+
+                span:last-child {
+                    color: #999;
+                    font-size: .24rem;
+                }
+            }
+        }
+    }
+}
+</style>

+ 6 - 6
src/packages/mobile/views/bank/sign/components/edit/index.vue

@@ -50,12 +50,12 @@ const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
     BankAccountNo: [{
         required: true,
         message: '请输入银行卡账号',
-        // validator: (val) => {
-        //     if (validateRules.bankcardno.validate(val)) {
-        //         return true
-        //     }
-        //     return validateRules.bankcardno.message
-        // }
+        validator: (val) => {
+            if (validateRules.bankcardno.validate(val)) {
+                return true
+            }
+            return validateRules.bankcardno.message
+        }
     }],
     BankAccountName: [{
         required: true,

+ 9 - 3
src/packages/mobile/views/bank/statement/index.vue

@@ -2,6 +2,9 @@
     <app-view class="credit-statement">
         <template #header>
             <app-navbar title="资金流水">
+                <template #right>
+                    <Button round @click="routerTo('bank-hisstatement')">更多</Button>
+                </template>
             </app-navbar>
         </template>
         <app-pull-refresh class="credit-statement__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
@@ -37,14 +40,17 @@
 import { shallowRef } from 'vue'
 import { formatDate } from '@/filters'
 import { getAccountBusinessCodeName } from '@/constants/bank'
-import { useBankStatementList } from '@/business/bank'
+import { useAmountStatementList } from '@/business/bank'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { useNavigation } from '@/hooks/navigation'
+import { Button } from 'vant'
 
-const { dataList, pageIndex, pageCount, getBankStatementList } = useBankStatementList()
+const { dataList, pageIndex, pageCount, getAccouuntInOutApplyList } = useAmountStatementList()
 const showHeader = shallowRef(false)
+const { routerTo } = useNavigation()
 
 const onRefresh = (callback: () => void) => {
-    getBankStatementList().finally(() => callback())
+    getAccouuntInOutApplyList().finally(() => callback())
 }
 
 const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {

+ 3 - 0
src/packages/mobile/views/home/components/main/index.vue

@@ -62,6 +62,9 @@
       </div> -->
       <div class="home-main__news">
         <Cell class="titlebar" title-class="titlebar-title" value-class="titlebar-more" title="市场资讯" />
+        <span>
+          <a @click="routerTo('news-list')">更多资讯</a>
+        </span>
         <CellGroup class="article">
           <template v-for="(item, index) in newsList" :key="index">
             <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"

+ 2 - 2
src/packages/mobile/views/home/components/mine/index.vue

@@ -154,7 +154,7 @@ const doInOutMoney = (tab: string) => {
         if (signstatus && signstatus === 4) {
           router.push({ name: 'bank-wallet', query: { tab } })
         } else {
-          dialog('请先添加签约账户信息', {
+          dialog('请先添加签约账户信息', {
             showCancelButton: true,
             confirmButtonText: '去签约'
           }).then(() => {
@@ -166,7 +166,7 @@ const doInOutMoney = (tab: string) => {
       })
     }, '正在加载...')
   } else {
-    dialog('请先实名认证,再进行出入金操作业务。', {
+    dialog('请先实名认证,再进行该操作!', {
       showCancelButton: true,
       confirmButtonText: '去实名'
     }).then(() => {

+ 38 - 0
src/packages/mobile/views/news/list/index.less

@@ -0,0 +1,38 @@
+@import '@mobile/assets/themes/base/mixin.less';
+
+.news-list-main {
+    &__container {
+        flex      : 1;
+        overflow-y: auto;
+    }
+
+    &__news {
+        .titlebar {
+            &-title {
+                font-size  : .36rem;
+                font-weight: bold;
+            }
+
+            &-more {
+                font-size: .28rem;
+                color    : #00577C;
+            }
+        }
+
+        .article {
+            &-item {
+                &__title {
+                    span {
+                        .mixin-text-overflow()
+                    }
+
+                }
+
+                &__time {
+                    flex       : initial;
+                    margin-left: .48rem;
+                }
+            }
+        }
+    }
+}

+ 61 - 0
src/packages/mobile/views/news/list/index.vue

@@ -0,0 +1,61 @@
+<template>
+    <app-view class="news-list-main">
+      <template #header>
+        <app-navbar title="市场资讯" />
+      </template>
+      <PullRefresh class="news-list__container" v-model="refreshing" @refresh="onRefresh">
+        <Tabs class="mine-generalize__tabs">
+            <Tab title="宏观新闻">
+              <Empty v-if="newsList.length===0" />
+            </Tab>
+            <Tab title="行业动态">
+              <Empty v-if="newsList.length===0" />
+            </Tab>
+            <Tab title="厂家信息">
+              <Empty v-if="newsList.length===0" />
+            </Tab>
+        </Tabs>
+        <div class="news-list__news">
+          <CellGroup class="article">
+            <template v-for="(item, index) in newsList" :key="index">
+              <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
+                :title="item.title" :value="formatDate(item.creaedate, 'MM/DD')"
+                :to="{ name: 'news-details', params: { details: JSON.stringify(item) } }" />
+            </template>
+          </CellGroup>
+        </div>
+      </PullRefresh>
+    </app-view>
+  </template>
+  
+  <script lang="ts" setup>
+  import { shallowRef } from 'vue'
+  import { Cell, CellGroup, PullRefresh, Tab, Tabs, Empty } from 'vant'
+  import { formatDate } from '@/filters'
+  import { querySiteColumnDetail } from '@/services/api/news'
+  
+  const refreshing = shallowRef(false) // 是否处于加载中状态
+  const newsList = shallowRef<Model.SiteColumnDetailRsp[]>([]) // 资讯列表
+  
+  // 下拉刷新
+  const onRefresh = () => {
+    querySiteColumnDetail({
+      data: {
+        page: 1,
+        pagesize: 100,
+      },
+      success: (res) => {
+        newsList.value = res.data
+      },
+      complete: () => {
+        refreshing.value = false
+      }
+    })
+  }
+  
+  onRefresh()
+  </script>
+  
+  <style lang="less">
+  @import './index.less';
+  </style>