瀏覽代碼

Merge branch 'v20' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL into v20

li.shaoyi 2 年之前
父節點
當前提交
3852257bff

+ 9 - 0
src/packages/mobile/components/modules/quote/price/index.vue

@@ -118,6 +118,15 @@
                         <span>振幅</span>
                         <span>{{ parsePercent(quote.amplitude) }}</span>
                     </li>
+                    <li>
+                        <span>成交量</span>
+                        <span :class="quote.averagepriceColor">{{
+                            handleNumberValue(quote.totalvolume) }}</span>
+                    </li>
+                    <li>
+                        <span>成交额</span>
+                        <span>{{ handleNumberValue(quote.totalturnover) }}</span>
+                    </li>
                 </ul>
             </div>
         </template>

+ 23 - 5
src/packages/mobile/views/bank/capital/statement/history/index.vue

@@ -4,6 +4,11 @@
             <template #header>
                 <app-navbar title="历史资金流水" @back="closed">
                     <template #footer>
+                        <Field name="operateType" label="资金类型" is-link input-align="right">
+                            <template #input>
+                                <app-select v-model="operatetype" placeholder="请选择资金类型" :options="getOperateTypeList()" :optionProps="{ label: 'label', value: 'value' }" @confirm="onSelectConfirm"/>
+                            </template>
+                        </Field>
                         <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
                     </template>
                 </app-navbar>
@@ -31,7 +36,9 @@ import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import AppList from '@mobile/components/base/list/index.vue'
 import moment from 'moment'
-import { Calendar, Cell } from 'vant'
+import { Calendar, Cell, Field } from 'vant'
+import { getOperateTypeList } from '@/constants/order'
+import AppSelect from '@mobile/components/base/select/index.vue'
 
 const showModal = shallowRef(true)
 const dataList = shallowRef<Model.HisAmountLogRsp[]>([])
@@ -39,6 +46,8 @@ const error = shallowRef(false)
 const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 const pullRefreshRef = shallowRef()
+/// 资金类型
+const operatetype = shallowRef(101)
 
 const columns: Model.TableColumn[] = [
     { prop: 'createtime', label: '时间' },
@@ -48,11 +57,11 @@ const columns: Model.TableColumn[] = [
 
 const { loading, pageIndex, pageCount, run } = useRequest(queryHisAmountLog, {
     manual: true,
+    params: {
+        operateType: operatetype.value.toString()
+    },
     onSuccess: (res) => {
-        if (pageIndex.value === 1) {
-            dataList.value = []
-        }
-        dataList.value.push(...res.data)
+        dataList.value = res.data
     },
     onError: () => {
         error.value = true
@@ -67,6 +76,15 @@ const onConfirm = ([start, end]: Date[]) => {
     pullRefreshRef.value?.refresh()
 }
 
+// 选中资金类型
+const onSelectConfirm = (value: number) => {
+    operatetype.value = value
+    run({
+        page: 1,
+        operateType: value.toString()
+    })
+}
+
 const onRefresh = () => {
     const [begindate, enddate] = dateRange.value
     run({

+ 25 - 8
src/packages/mobile/views/bank/capital/statement/index.vue

@@ -1,6 +1,13 @@
 <template>
-    <app-pull-refresh class="bank-statement" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+    <app-pull-refresh ref="pullRefreshRef" class="bank-statement" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
         :page-count="pageCount" @refresh="run">
+        <CellGroup>
+            <Field name="operateType" label="资金类型" is-link>
+                <template #input>
+                    <app-select v-model="operatetype" placeholder="请选择资金类型" :options="getOperateTypeList()" :optionProps="{ label: 'label', value: 'value' }" @confirm="onConfirm"/>
+                </template>
+            </Field>
+        </CellGroup>
         <app-list class="bank-statement__table" :columns="columns" :data-list="dataList">
             <template #createtime="{ value }">
                 <span>{{ formatDate(value, 'YYYY-MM-DD') }}</span>
@@ -12,14 +19,20 @@
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { CellGroup, Field } from 'vant'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryAmountLog } from '@/services/api/bank'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import AppList from '@mobile/components/base/list/index.vue'
+import { getOperateTypeList } from '@/constants/order'
+import AppSelect from '@mobile/components/base/select/index.vue'
 
 const dataList = shallowRef<Model.AmountLogRsp[]>([])
 const error = shallowRef(false)
+/// 资金类型
+const operatetype = shallowRef(101)
+const pullRefreshRef = shallowRef()
 
 const columns: Model.TableColumn[] = [
     { prop: 'createtime', label: '时间' },
@@ -28,21 +41,25 @@ const columns: Model.TableColumn[] = [
 ]
 
 const { loading, pageIndex, pageCount, run } = useRequest(queryAmountLog, {
-    manual: true,
     params: {
-        pagesize: 20,
-        pageflag: 1,
+        operateType: operatetype.value.toString()
     },
     onSuccess: (res) => {
-        if (pageIndex.value === 1) {
-            dataList.value = []
-        }
-        dataList.value.push(...res.data)
+        dataList.value = res.data
     },
     onError: () => {
         error.value = true
     }
 })
+
+// 选中资金类型
+const onConfirm = (value: number) => {
+    operatetype.value = value
+    run({
+        page: 1,
+        operateType: value.toString()
+    })
+}
 </script>
 
 <style lang="less">

+ 1 - 0
src/services/http/index.ts

@@ -132,6 +132,7 @@ export default new (class {
      * @returns 
      */
     async commonRequest<T>(config: AxiosRequestConfig, errMsg?: string) {
+        console.log(config)
         const baseUrl = service.getConfig('goCommonSearchUrl')
         config.url = baseUrl + config.url
         const res = await this.request<CommonResult<T>>(config, errMsg)