Handy_Cao 3 tahun lalu
induk
melakukan
68def20be2

+ 38 - 2
src/business/bank/index.ts

@@ -1,11 +1,47 @@
 import { reactive, shallowRef, computed } from 'vue'
 import { useDataTable } from '@/hooks/datatable'
 import { useLoginStore, useUserStore } from '@/stores'
-import { queryHisAmountLog, t2bBankWithdraw, queryBankAccountSign, t2bBankDeposit, queryAccountInOutApply, queryCusBankSignBank, t2bBankSign, t2bBankCancelSign, accountFundInfoReq } from '@/services/api/bank'
+import { queryHisAmountLog, queryAmountLog, t2bBankWithdraw, queryBankAccountSign, t2bBankDeposit, queryAccountInOutApply, queryCusBankSignBank, t2bBankSign, t2bBankCancelSign, accountFundInfoReq } from '@/services/api/bank'
 import { decryptAES } from '@/utils/websocket/crypto'
 import moment from "moment";
 
+
 // 历史资金流水列表
+export function useAmountStatementList() {
+    const { getFirstAccountId } = useLoginStore()
+    const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.AmountLogRsp>()
+    const loading = shallowRef(false)
+
+    const getAmountStatementList = () => {
+        loading.value = true
+        return queryAmountLog({
+            data: {
+                page: pageIndex.value,
+                pagesize: pageSize.value,
+                accountID: getFirstAccountId().toString(),
+            },
+            success: (res) => {
+                total.value = res.total
+                dataList.value = res.data
+            },
+            complete: () => {
+                loading.value = false
+            }
+        })
+    }
+
+    return {
+        loading,
+        dataList,
+        total,
+        pageIndex,
+        pageSize,
+        pageCount,
+        getAmountStatementList,
+    }
+}
+
+// 历史出入金流水列表
 export function useHisAmountStatementList() {
     const { getFirstAccountId } = useLoginStore()
     const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.HisAmountLogRsp>()
@@ -41,7 +77,7 @@ export function useHisAmountStatementList() {
 }
 
 // 获取出入金流水列表
-export function useAmountStatementList() {
+export function useAccouuntInOutApplyListList() {
 
     const { getUserId } = useLoginStore()
     const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.AccountOutInApplyRsp>()

+ 38 - 0
src/business/news/index.ts

@@ -0,0 +1,38 @@
+import { shallowRef } from 'vue'
+import { useDataTable } from '@/hooks/datatable'
+import { querySiteColumnDetail } from '@/services/api/news'
+
+// 新闻资讯列表
+export function useSiteColumnDetail() {
+  
+    const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.SiteColumnDetailRsp>()
+    const loading = shallowRef(false)
+    
+    const getSiteColumnDetail = (columnid?: number) => {
+        loading.value = true
+        return querySiteColumnDetail({
+            data: {
+                columnid: columnid,
+                page: pageIndex.value,
+                pagesize: pageSize.value,
+            },
+            success: (res) => {
+                total.value = res.total
+                dataList.value = res.data
+            },
+            complete: () => {
+                loading.value = false
+            }
+        })
+    }
+
+    return {
+        loading,
+        dataList,
+        total,
+        pageIndex,
+        pageSize,
+        pageCount,
+        getSiteColumnDetail,
+    }
+}

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

@@ -45,12 +45,12 @@ import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { useNavigation } from '@/hooks/navigation'
 import { Button } from 'vant'
 
-const { dataList, pageIndex, pageCount, getAccouuntInOutApplyList } = useAmountStatementList()
+const { dataList, pageIndex, pageCount, getAmountStatementList } = useAmountStatementList()
 const showHeader = shallowRef(false)
 const { routerTo } = useNavigation()
 
 const onRefresh = (callback: () => void) => {
-    getAccouuntInOutApplyList().finally(() => callback())
+    getAmountStatementList().finally(() => callback())
 }
 
 const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {

+ 31 - 0
src/packages/mobile/views/news/list/components/article/index.vue

@@ -0,0 +1,31 @@
+<template>
+    <app-pull-refresh class="news-list__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+            :updateList="dataList" @refresh="onRefresh">
+            <template #default="{ item }">
+              <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>
+      </app-pull-refresh>
+</template>
+
+<script lang="ts" setup>
+
+import { Cell } from 'vant'
+import { formatDate } from '@/filters'
+import { useSiteColumnDetail } from '@/business/news'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const props=defineProps({
+    columnid: {
+        type:Number,
+        default:0
+    }
+})
+
+const { dataList, pageIndex, pageCount, getSiteColumnDetail } = useSiteColumnDetail()
+
+const onRefresh = (callback: () => void) => {
+  getSiteColumnDetail(props.columnid).finally(() => callback())
+}
+</script>

+ 25 - 34
src/packages/mobile/views/news/list/index.vue

@@ -3,57 +3,48 @@
       <template #header>
         <app-navbar title="市场资讯" />
       </template>
-      <PullRefresh class="news-list__container" v-model="refreshing" @refresh="onRefresh">
-        <Tabs class="mine-generalize__tabs">
+      <Tabs class="mine-generalize__tabs" v-model:active="active" @click-tab="onClickTab" sticky>
             <Tab title="宏观新闻">
-              <Empty v-if="newsList.length===0" />
+              <Empty v-if="dataList.length===0" />
             </Tab>
             <Tab title="行业动态">
-              <Empty v-if="newsList.length===0" />
+              <Empty v-if="dataList.length===0" />
             </Tab>
             <Tab title="厂家信息">
-              <Empty v-if="newsList.length===0" />
+              <Empty v-if="dataList.length===0" />
             </Tab>
         </Tabs>
-        <div class="news-list__news">
-          <CellGroup class="article">
-            <template v-for="(item, index) in newsList" :key="index">
+      <app-pull-refresh class="news-list__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+            :updateList="dataList" @refresh="onRefresh">
+            <template #default="{ item }">
               <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-pull-refresh>
     </app-view>
   </template>
   
   <script lang="ts" setup>
-  import { shallowRef } from 'vue'
-  import { Cell, CellGroup, PullRefresh, Tab, Tabs, Empty } from 'vant'
+
+  import {  ref } from 'vue'
+  import { Cell, 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
-      }
-    })
+  import { useSiteColumnDetail } from '@/business/news'
+  import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+  /// tab激活项
+  const active = ref(0);
+
+  const { dataList, pageIndex, pageCount, getSiteColumnDetail } = useSiteColumnDetail()
+  /// Tab触发
+  const onClickTab = (e => {
+    active.value = e.name
+  })
+
+  const onRefresh = (callback: () => void) => {
+    getSiteColumnDetail(active.value).finally(() => callback())
   }
-  
-  onRefresh()
   </script>
   
   <style lang="less">

+ 14 - 0
src/packages/mobile/views/rules/ptgz/index.vue

@@ -3,10 +3,24 @@
         <template #header>
             <app-navbar title="平台规则" />
         </template>
+        <Tabs class="mine-generalize__tabs" v-model:active="active" @click-tab="onClickTab" sticky>
+            <Tab title="平台规则" />
+            <Tab title="买家规则" />
+            <Tab title="卖家规则"/>
+            <Tab title="积分规则"/>
+        </Tabs>
         <app-html url="./html/ptgz.htm" />
     </app-view>
 </template>
 
 <script lang="ts" setup>
+
+import {  ref } from 'vue'
 import AppHtml from '@mobile/components/base/html-panel/index.vue'
+import { Tab, Tabs, Toast } from 'vant'
+
+  /// tab激活项
+const active = ref(0);
+const onClickTab = ( {name} ) => Toast(name);
+
 </script>

+ 9 - 1
src/services/api/bank/index.ts

@@ -71,4 +71,12 @@ export function queryAccountInOutApply(params: HttpParams<{ req: Model.AccountIn
  */
 export function queryHisAmountLog(params: HttpParams<{ req: Model.HisAmountLogReq, rsp: Model.HisAmountLogRsp[] }>) {
     return httpRequest('/TaAccount/QueryHisAmountLog', 'get', params);
-}
+}
+
+/**
+ * 资金流水查询(当前)
+ */
+ export function queryAmountLog(params: HttpParams<{ req: Model.AmountLogReq, rsp: Model.AmountLogRsp[] }>) {
+    return httpRequest('/TaAccount/QueryAmountLog', 'get', params);
+}
+

+ 62 - 0
src/types/model/bank.d.ts

@@ -214,4 +214,66 @@ declare namespace Model {
         // 用户id
         userid?: number
     }
+
+    /** 资金流水查询(当前) 请求 */
+    interface AmountLogReq {
+        // 页码
+        page?: number
+        // 每页条数
+        pagesize?: number
+        // 资金账户 - 格式:1,2,3
+        accountID: string
+        // 资金操作类型 - 格式:1,2,3
+        OperateType?: string
+    }
+
+    /** 资金流水查询(当前) 响应 */
+    interface AmountLogRsp {
+        // 资金账户ID
+        accountid: number
+        // 竞拍商品代码
+        agoodscode: string
+        // 竞拍商品名称
+        agoodsname: string
+        // 资金金额
+        amount: number
+        // 资金调整类型(默认值为0) - 0:系统 1:单边账调整 2:人工调整
+        amountadjusttype: number
+        // 流水ID(220+Unix秒时间戳(10位)+xxxxxx)
+        autoid: number
+        // 期初余额
+        balance: number
+        // 业务编号
+        businesscode: number
+        // 发生时间
+        createtime: string
+        // 币种ID
+        currencyid: number
+        // 期末余额(变动后金额)
+        currentbalance: number
+        // 交割商品代码
+        dgoodscode: string
+        // 交割商品名称
+        dgoodsname: string
+        // 商品代码
+        goodscode: string
+        // 商品ID
+        goodsid: number
+        // 商品名称
+        goodsname: string
+        // 市场ID
+        marketid: number
+        // 市场名称
+        marketname: string
+        // 资金流水号:银行端流水号
+        moneyticket: number
+        // 资金操作类型 (AccountFundCmdOp)- 101:入金 102:入金手续费 103:出金 104:出金冻结 105:出金解冻 106:出金手续费 107:出金手续费冻结 108:出金手续费解冻 201:交易冻结 202:交易解冻 203:交易占用 204:交易解占用 205:交易手续费冻结 206:交易手续费解冻 207:交易手续费 208:交易货款 209:交易盈亏 301:交割冻结 302:交割解冻 303:交割手续费 304:交割手续费冻结 305:交割手续费解冻 306:交割货款 307:交割税款 401:结算盈亏 402:结算递延费 403:分润收入 404:延期分润 501:授信增加 502:授信减少 503:转积分 504:转入 505:转出 506:转出冻结 507:转出解冻 601:履约金额冻结 602:履约最大冻结 603:履约金额解冻 604:履约扣款 605:履约收款 606:履约违约手续费 607:履约违约收入 608:履约最大扣款 701:供应链金融冻结 702:供应链金融解冻 703:供应链金融最大冻结 704:供应链金融利息 705:供应链金融货款 706:供应链金融押金 707:供应链金融最大扣款 801:仓单贸易冻结 802:仓单贸易解冻 803:仓单贸易首付款 804:仓单贸易最大扣款 901:商城扣款冻结 902:商城扣款解冻 903:商城扣款 904:商城收款 1001:期权冻结 1002:期权解冻 1003:期权权力金 1004:期权手续费冻结 1005:期权手续费解冻 1006:期权手续费 1007:期权盈亏 1101:营销扣款 1102:营销收款
+        operatetype: number
+        // 关联单号
+        relationorderid: string
+        // 备注
+        remark: string
+        // 交易模式
+        trademode: number
+    }
 }