li.shaoyi 1 năm trước cách đây
mục cha
commit
31645b4472
23 tập tin đã thay đổi với 220 bổ sung167 xóa
  1. 1 1
      app/package.json
  2. BIN
      file/持仓转让协议.doc
  3. 2 2
      oem/zrwyt/config/appconfig.json
  4. 31 0
      src/packages/mobile/components/base/calendar/index.less
  5. 76 0
      src/packages/mobile/components/base/calendar/index.vue
  6. 1 1
      src/packages/mobile/components/base/uploader/index.vue
  7. 33 12
      src/packages/mobile/views/bank/capital/statement/history/index.less
  8. 22 45
      src/packages/mobile/views/bank/capital/statement/history/index.vue
  9. 7 11
      src/packages/mobile/views/order/delivery/components/online/history/Index.vue
  10. 1 1
      src/packages/mobile/views/order/inout/components/agreement/index.vue
  11. 4 8
      src/packages/mobile/views/order/list/components/goodsorder/history/Index.vue
  12. 3 7
      src/packages/mobile/views/order/list/components/goodstrade/history/Index.vue
  13. 3 7
      src/packages/mobile/views/order/list/components/listingorder/history/Index.vue
  14. 3 7
      src/packages/mobile/views/order/list/components/listingtrade/history/Index.vue
  15. 3 7
      src/packages/mobile/views/order/list/components/presale/history/index.vue
  16. 3 7
      src/packages/mobile/views/order/list/components/swaporder/history/Index.vue
  17. 4 8
      src/packages/mobile/views/order/list/components/swaptrade/history/Index.vue
  18. 3 7
      src/packages/mobile/views/order/list/components/transferorder/history/index.vue
  19. 3 7
      src/packages/mobile/views/order/list/components/transfertrade/history/index.vue
  20. 3 7
      src/packages/mobile/views/order/performance/components/history/Index.vue
  21. 1 1
      src/packages/pc/views/footer/inout/agreement/index.vue
  22. 8 13
      src/packages/pc/views/query/capital/history/index.vue
  23. 5 8
      src/services/http/index.ts

+ 1 - 1
app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "trading",
-  "version": "1.0.2",
+  "version": "1.0.33",
   "main": "main.js",
   "dependencies": {
     "electron-updater": "^6.1.4",

BIN
file/持仓转让协议.doc


+ 2 - 2
oem/zrwyt/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.zrwyt",
   "appName": "中融文遗通",
-  "version": "1.0.32",
-  "versionCode": "100032",
+  "version": "1.0.33",
+  "versionCode": "100033",
   "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
   "tradeChannel": "ws",
   "modules": [

+ 31 - 0
src/packages/mobile/components/base/calendar/index.less

@@ -0,0 +1,31 @@
+.app-calendar {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 10px 15px;
+
+    &__label {
+        display: flex;
+        flex-direction: column;
+
+        span:first-child {
+            font-size: 12px;
+        }
+
+        span:last-child {
+            display: flex;
+            align-items: center;
+
+            &::after {
+                content: '';
+                display: inline-block;
+                width: 0;
+                height: 0;
+                border-right: 5px solid transparent;
+                border-left: 5px solid transparent;
+                border-top: 6px solid #fff;
+                margin-left: 5px;
+            }
+        }
+    }
+}

+ 76 - 0
src/packages/mobile/components/base/calendar/index.vue

@@ -0,0 +1,76 @@
+<template>
+    <div class="app-calendar">
+        <div class="app-calendar__label" @click="showCalendar = true">
+            <span>{{ title }}</span>
+            <span v-if="selectedDate.length">{{ selectedDate.join(type === 'multiple' ? ', ' : ' - ') }}</span>
+            <span v-else>全部</span>
+        </div>
+        <slot></slot>
+        <Calendar teleport="body" :type="type" :default-date="defaultValue" :min-date="minDate" :max-date="maxDate"
+            :max-range="7" v-model:show="showCalendar" color="#ee0a24" @confirm="onConfirm" allow-same-day />
+    </div>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType, onMounted, computed } from 'vue'
+import { Calendar, CalendarType } from 'vant'
+import moment from 'moment'
+
+const props = defineProps({
+    title: {
+        type: String,
+        default: '查询日期'
+    },
+    type: {
+        type: String as PropType<CalendarType>,
+        default: 'range'
+    },
+    defaultDate: {
+        type: Array as PropType<Date[]>,
+        default: () => ([])
+    },
+    minDate: {
+        type: Date,
+        default: () => {
+            const currentDate = new Date()
+            currentDate.setFullYear(currentDate.getFullYear() - 1)
+            return currentDate
+        }
+    },
+    maxDate: {
+        type: Date,
+        default: new Date()
+    }
+})
+
+const emit = defineEmits(['confirm'])
+const dateFormat = 'YYYY.MM.DD'
+const showCalendar = shallowRef(false)
+const selectedDate = shallowRef<string[]>([])
+
+const defaultValue = computed(() => {
+    if (props.type === 'single') {
+        return props.defaultDate[0]
+    }
+    return props.defaultDate
+})
+
+const onCancel = () => {
+    showCalendar.value = false
+}
+
+const onConfirm = (value: Date | Date[]) => {
+    const dateArray = Array.isArray(value) ? value : [value]
+    selectedDate.value = dateArray.map((e) => moment(e).format(dateFormat))
+    emit('confirm', value)
+    onCancel()
+}
+
+onMounted(() => {
+    selectedDate.value = props.defaultDate.map((e) => moment(e).format(dateFormat))
+})
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 1 - 1
src/packages/mobile/components/base/uploader/index.vue

@@ -3,7 +3,7 @@
         <span class="app-uploader__button" @click="onClickUpload"></span>
         <Uploader ref="uploaderRef" v-model="fileList" :max-count="maxCount" :max-size="5 * 1024 * 1024"
             @oversize="onOversize" :after-read="onAfterRead" @delete="onDelete" />
-        <Notify v-model:show="showNotify" :duration="0" title="相册权限使用说明" content="用于更换头像、上传凭证等场景" />
+        <Notify v-model:show="showNotify" :duration="0" title="存储空间/照片权限说明" content="用于在添加、制作、上传、发布、分享、下载、搜索、识别图片和视频等场景中读取和写入相册和文件内容" />
     </div>
 </template>
 

+ 33 - 12
src/packages/mobile/views/bank/capital/statement/history/index.less

@@ -1,15 +1,36 @@
-.dropdown-bar {
-    color: #666;
-    background-color: #fff;
-
-    button {
-        &::after {
-            content: '';
-            width: 0;
-            height: 0;
-            border-right: 6px solid transparent;
-            border-left: 6px solid transparent;
-            border-top: 6px solid red;
+.bank-hisstatement {
+    &__table {
+        td.app-list__column {
+            &:first-child {
+                span:last-child {
+                    color: #999;
+                    font-size: 12px;
+                }
+            }
+
+            &:not(:first-child) {
+                font-size: 16px;
+            }
         }
     }
+
+    .app-calendar {
+        align-items: end;
+
+        .app-select {
+            flex: none;
+
+            &::after {
+                content: '';
+                display: inline-block;
+                width: 0;
+                height: 0;
+                border-right: 5px solid transparent;
+                border-left: 5px solid transparent;
+                border-top: 6px solid #fff;
+                margin-left: 5px;
+            }
+        }
+    }
+
 }

+ 22 - 45
src/packages/mobile/views/bank/capital/statement/history/index.vue

@@ -4,14 +4,14 @@
             <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="operateTypeSearchList"
-                                    :optionProps="{ label: 'label', value: 'value' }" @confirm="onSelectConfirm" />
-                            </template>
-                        </Field>
-                        <Cell title="查询日期" :value="`${hisAmountLogReq.startDate}-${hisAmountLogReq.endDate}`"
-                            @click="showCalendar = true" is-link />
+                        <app-calendar type="single" :default-date="[currentDate]" @confirm="onConfirm">
+                            <app-select v-model="operatetype" :options="operateTypeSearchList"
+                                :optionProps="{ label: 'label', value: 'value' }" @confirm="onSelectConfirm">
+                                <template #default="{ label }">
+                                    {{ label }}
+                                </template>
+                            </app-select>
+                        </app-calendar>
                     </template>
                 </app-navbar>
             </template>
@@ -24,42 +24,37 @@
                     </template>
                 </app-list>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-range="7" :default-date="dateValue"
-                :max-date="new Date()" :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
         </app-view>
     </app-modal>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, ref, computed } from 'vue'
+import { shallowRef, computed } from 'vue'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryHisAmountLog } from '@/services/api/bank'
 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, Field } from 'vant'
 import { getOperateTypeSearchList } from '@/constants/order'
 import AppSelect from '@mobile/components/base/select/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const showModal = shallowRef(true)
 const dataList = shallowRef<Model.HisAmountLogRsp[]>([])
 const error = shallowRef(false)
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const pullRefreshRef = shallowRef()
 /// 资金类型
 const operatetype = shallowRef(0)
+const currentDate = shallowRef(new Date())
 
-const endDate = moment(new Date())
-const startDate = endDate.clone().subtract(6, 'days')
-const dateValue = ref([startDate.toDate(), endDate.toDate()])
-
-const hisAmountLogReq = computed(() => {
-    const [begindate, enddate] = dateValue.value
+const hisAmountLogReq = computed<Model.HisAmountLogReq>(() => {
+    const dateString = currentDate.value.toISOString()
+    const dateValue = formatDate(dateString, 'YYYY-MM-DD')
     return {
-        startDate: formatDate(begindate.toISOString(), 'YYYY-MM-DD'),
-        endDate: formatDate(enddate.toISOString(), 'YYYY-MM-DD'),
+        operateType: operatetype.value === 0 ? undefined : operatetype.value.toString(),
+        startDate: dateValue,
+        endDate: dateValue,
     }
 })
 
@@ -94,19 +89,16 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryHisAmountLog, {
 })
 
 // 选择日期
-const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
-    dateValue.value = [start, end]
+const onConfirm = (value: Date) => {
+    currentDate.value = value
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()
 }
 
 // 选中资金类型
-const onSelectConfirm = (value: number) => {
+const onSelectConfirm = () => {
     pageIndex.value = 1
-    run({
-        operateType: value === 0 ? undefined : value.toString()
-    })
+    pullRefreshRef.value?.refresh()
 }
 
 const onRefresh = () => {
@@ -125,20 +117,5 @@ defineExpose({
 </script>
 
 <style lang="less">
-.bank-hisstatement {
-    &__table {
-        td.app-list__column {
-            &:first-child {
-                span:last-child {
-                    color: #999;
-                    font-size: 12px;
-                }
-            }
-
-            &:not(:first-child) {
-                font-size: 16px;
-            }
-        }
-    }
-}
+@import './index.less';
 </style>

+ 7 - 11
src/packages/mobile/views/order/delivery/components/online/history/Index.vue

@@ -5,12 +5,12 @@
             <template #header>
                 <app-navbar title="历史点选交收单" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
-            <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
-        :page-count="pageCount" @refresh="onRefresh">
+            <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error"
+                v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
                 <div class="g-order-list">
                     <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                         <div class="g-order-list__titlebar">
@@ -50,10 +50,8 @@
                         </div>
                     </div>
                 </div>
-                <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
-                    v-if="componentId" />
-                <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                    :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
+                <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                    @closed="closeComponent" v-if="componentId" />
             </app-pull-refresh>
         </app-view>
     </app-modal>
@@ -65,10 +63,10 @@ import { useRequest } from '@/hooks/request'
 import { queryWrDeliveryDetail } from '@/services/api/transfer'
 import { formatDate } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.WrDeliveryDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -76,7 +74,6 @@ const selectedRow = shallowRef<Model.WrDeliveryDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -107,7 +104,6 @@ const showComponent = (componentName: string, row: Model.WrDeliveryDetailRsp) =>
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 1 - 1
src/packages/mobile/views/order/inout/components/agreement/index.vue

@@ -4,7 +4,7 @@
             <template #header>
                 <app-navbar title="转让协议" />
             </template>
-            <component :is="asyncComponent" url="/html/cczr.htm" />
+            <component :is="asyncComponent" :url="'./html/cczr.htm'" />
         </app-view>
     </app-modal>
 </template>

+ 4 - 8
src/packages/mobile/views/order/list/components/goodsorder/history/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史订单委托" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -26,7 +26,7 @@
                                 <li>
                                     <span>方向类型</span>
                                     <span>{{ getBuyOrSellName(item.buyorsell) }}{{ getBuildTypeName(item.buildtype)
-                                    }}</span>
+                                        }}</span>
                                 </li>
                                 <li>
                                     <span>委托量</span>
@@ -52,8 +52,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -67,10 +65,10 @@ import { queryHisTradeOrderDetail } from '@/services/api/order'
 import { getBuyOrSellName, getWRTradeOrderStatusName, getBuildTypeName } from '@/constants/order'
 import { formatDate } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.HisTradeOrderDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -78,7 +76,6 @@ const selectedRow = shallowRef<Model.HisTradeOrderDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -114,7 +111,6 @@ const showComponent = (componentName: string, row: Model.HisTradeOrderDetailRsp)
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/goodstrade/history/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史订单成交" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -56,8 +56,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -71,10 +69,10 @@ import { queryHisTradeDetail } from '@/services/api/order'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { formatDate } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.HisTradeDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -82,7 +80,6 @@ const selectedRow = shallowRef<Model.HisTradeDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -118,7 +115,6 @@ const showComponent = (componentName: string, row: Model.HisTradeDetailRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/listingorder/history/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史挂牌委托" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -52,8 +52,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -67,10 +65,10 @@ import { queryWrOrderDetail } from '@/services/api/order'
 import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
 import { formatDate, formatDecimal } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.WrOrderDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -78,7 +76,6 @@ const selectedRow = shallowRef<Model.WrOrderDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -114,7 +111,6 @@ const showComponent = (componentName: string, row: Model.WrOrderDetailRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/listingtrade/history/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史挂牌成交" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -49,8 +49,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -64,10 +62,10 @@ import { queryWrTradeDetail } from '@/services/api/order'
 import { getBuyOrSellName } from '@/constants/order'
 import { formatDate, formatDecimal } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.WrTradeDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -75,7 +73,6 @@ const selectedRow = shallowRef<Model.WrTradeDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -111,7 +108,6 @@ const showComponent = (componentName: string, row: Model.WrTradeDetailRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/presale/history/index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史预售认购" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -67,8 +67,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -82,10 +80,10 @@ import { useRequest } from '@/hooks/request'
 import { queryMineTradeOrderDetails } from '@/services/api/presale'
 import { getOrderStatusName } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
@@ -96,7 +94,6 @@ const selectedRow = shallowRef<Model.MineTradeOrderDetailsRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const showModal = shallowRef(true)
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
@@ -125,7 +122,6 @@ const showComponent = (row: Model.MineTradeOrderDetailsRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/swaporder/history/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史委托" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -51,8 +51,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -66,10 +64,10 @@ import { queryHisTradeOrderDetail } from '@/services/api/order'
 import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
 import { formatDate } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.HisTradeOrderDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -77,7 +75,6 @@ const selectedRow = shallowRef<Model.HisTradeOrderDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -111,7 +108,6 @@ const showComponent = (componentName: string, row: Model.HisTradeOrderDetailRsp)
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 4 - 8
src/packages/mobile/views/order/list/components/swaptrade/history/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史成交" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -23,7 +23,7 @@
                                 <li>
                                     <span>类型</span>
                                     <span>{{ getBuildTypeName(item.buildtype) }}{{ getBuyOrSellName(item.buyorsell)
-                                    }}</span>
+                                        }}</span>
                                 </li>
                                 <li>
                                     <span>成交价格</span>
@@ -53,8 +53,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -68,10 +66,10 @@ import { queryHisTradeDetail } from '@/services/api/order'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { formatDate } from '@/filters'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const dataList = shallowRef<Model.HisTradeDetailRsp[]>([])
 const showModal = shallowRef(true)
@@ -79,7 +77,6 @@ const selectedRow = shallowRef<Model.HisTradeDetailRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -114,7 +111,6 @@ const showComponent = (componentName: string, row: Model.HisTradeDetailRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/transferorder/history/index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史转让委托" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -47,8 +47,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -61,10 +59,10 @@ import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradeOrders } from '@/services/api/transfer'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
@@ -75,7 +73,6 @@ const selectedRow = shallowRef<Model.MineTradeOrdersRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const showModal = shallowRef(true)
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
@@ -104,7 +101,6 @@ const showComponent = (row: Model.MineTradeOrdersRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/list/components/transfertrade/history/index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="历史转让成交" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -51,8 +51,6 @@
                     </div>
                 </div>
             </app-pull-refresh>
-            <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </app-view>
@@ -66,10 +64,10 @@ import { useRequest } from '@/hooks/request'
 import { queryMineTradeTradeDetails } from '@/services/api/transfer'
 import { getBuyOrSellName } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
-import moment from 'moment'
+import { Button } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
@@ -80,7 +78,6 @@ const selectedRow = shallowRef<Model.MineTradeTradeDetailsRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const showModal = shallowRef(true)
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
@@ -109,7 +106,6 @@ const showComponent = (row: Model.MineTradeTradeDetailsRsp) => {
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 3 - 7
src/packages/mobile/views/order/performance/components/history/Index.vue

@@ -4,7 +4,7 @@
             <template #header>
                 <app-navbar :title="buyorsell === 0 ? '买历史履约信息' : '卖历史履约信息'" @back="closed">
                     <template #footer>
-                        <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
+                        <app-calendar @confirm="onConfirm" />
                     </template>
                 </app-navbar>
             </template>
@@ -59,8 +59,6 @@
                 </div>
                 <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                     @closed="closeComponent" v-if="componentId" />
-                <Calendar v-model:show="showCalendar" type="range" :max-date="new Date()"
-                    :min-date="moment().subtract(1, 'years').toDate()" @confirm="onConfirm" />
             </app-pull-refresh>
         </app-view>
     </app-modal>
@@ -69,14 +67,14 @@
 <script lang="ts" setup>
 import { shallowRef, defineAsyncComponent, ref } from 'vue'
 import { useComponent } from '@/hooks/component'
-import { Button, Calendar, Cell } from 'vant'
+import { Button } from 'vant'
 import { useRequest } from '@/hooks/request'
 import { queryPerformancePlan } from '@/services/api/performance'
 import { formatDate, handleNoneValue } from '@/filters'
 import { getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
-import moment from 'moment'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppCalendar from '@mobile/components/base/calendar/index.vue'
 
 const props = defineProps({
     buyorsell: {
@@ -95,7 +93,6 @@ const selectedRow = shallowRef<Model.PerformancePlanRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const refresh = shallowRef(false) // 是否刷新父组件数据
-const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
@@ -124,7 +121,6 @@ const showComponent = (componentName: string, row: Model.PerformancePlanRsp) =>
 
 // 选择日期
 const onConfirm = ([start, end]: Date[]) => {
-    showCalendar.value = false
     dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
     pageIndex.value = 1
     pullRefreshRef.value?.refresh()

+ 1 - 1
src/packages/pc/views/footer/inout/agreement/index.vue

@@ -1,6 +1,6 @@
 <template>
     <app-drawer title="持仓转让协议" :width="640" v-model:show="show">
-        <iframe class="iframe" src="/html/cczr.htm" />
+        <iframe class="iframe" :src="'./html/cczr.htm'" />
         <template #footer>
             <el-button type="info" @click="onCancel">关闭</el-button>
         </template>

+ 8 - 13
src/packages/pc/views/query/capital/history/index.vue

@@ -4,9 +4,8 @@
         <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
-                    <el-date-picker type="daterange" effect="dark" :editable="false" :clearable="false"
-                        start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueformat" v-model="dateValue"
-                        @visible-change="visibleChange" @calendar-change="calendarChange" :disabled-date="disabledDate" />
+                    <el-date-picker effect="dark" :editable="false" :clearable="false" placeholder="请选择"
+                        value-format="YYYY-MM-DD" v-model="dateValue" />
                 </template>
             </app-filter>
         </template>
@@ -36,27 +35,23 @@
 import { ref, computed } from 'vue'
 import { formatDate } from '@/filters'
 import { useDataFilter } from '@/hooks/datatable'
-import { useDateRange } from '@/hooks/date-picker'
 import { useRequest } from '@/hooks/request'
 import { queryHisAmountLog } from '@/services/api/bank'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 import { getOperateTypeSearchList } from '@/constants/order'
 
-
 const { filterOptons, getQueryParams } = useDataFilter<Model.HisAmountLogReq>()
-const { dateValue, valueformat, visibleChange, calendarChange, disabledDate } = useDateRange()
+const currentDate = new Date()
 const dataList = ref<Model.HisAmountLogRsp[]>([])
-
-const startDate = computed(() => dateValue.value[0])
-const endDate = computed(() => dateValue.value[1])
+const dateValue = ref(formatDate(currentDate.toISOString(), 'YYYY-MM-DD'))
 
 const { loading, run, pageIndex, pageCount } = useRequest(queryHisAmountLog, {
     params: {
         pagesize: 30,
         pageflag: 1,
-        startDate: startDate.value,
-        endDate: endDate.value
+        startDate: dateValue.value,
+        endDate: dateValue.value
     },
     onSuccess: (res) => {
         if (pageIndex.value === 1) {
@@ -122,8 +117,8 @@ const loadMore = () => {
 
 const onSearch = (clear = false) => {
     getQueryParams((qs) => {
-        qs.startDate = startDate.value
-        qs.endDate = endDate.value
+        qs.startDate = dateValue.value
+        qs.endDate = dateValue.value
         run(qs)
     }, clear)
 }

+ 5 - 8
src/services/http/index.ts

@@ -62,19 +62,16 @@ export default new (class {
                     return Promise.reject('网络或服务器错误')
                 }
                 if (err.response) {
-                    const { msg, message } = err.response.data ?? {}
+                    const { code, msg, message } = err.response.data ?? {}
                     switch (err.response.status) {
-                        case 401: {
-                            const loginStore = useLoginStore()
-                            if (loginStore.token) {
-                                eventBus.$emit('LogoutNotify', '登录失效,请重新登录')
-                            }
-                            return Promise.reject(msg || message)
-                        }
                         case 408: {
                             return Promise.reject('请求超时,请稍后再试')
                         }
                         default: {
+                            const loginStore = useLoginStore()
+                            if (loginStore.token && code === ResultCode.InvalidToken) {
+                                eventBus.$emit('LogoutNotify', '登录失效,请重新登录')
+                            }
                             return Promise.reject(msg || message)
                         }
                     }