Handy_Cao 2 vuotta sitten
vanhempi
commit
279320e8ca

+ 20 - 6
src/packages/mobile/views/bank/capital/statement/history/index.vue

@@ -6,7 +6,7 @@
                     <template #footer>
                         <Field name="operateType" label="资金类型" is-link input-align="right">
                             <template #input>
-                                <app-select v-model="operatetype" placeholder="请选择资金类型" :options="getOperateTypeSearchList()" :optionProps="{ label: 'label', value: 'value' }" @confirm="onSelectConfirm"/>
+                                <app-select v-model="operatetype" placeholder="请选择资金类型" :options="operateTypeSearchList" :optionProps="{ label: 'label', value: 'value' }" @confirm="onSelectConfirm"/>
                             </template>
                         </Field>
                         <Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
@@ -47,7 +47,13 @@ const showCalendar = shallowRef(false) // 是否显示日期选择器
 const dateRange = ref<string[]>([]) // 日期范围
 const pullRefreshRef = shallowRef()
 /// 资金类型
-const operatetype = shallowRef(101)
+const operatetype = shallowRef(0)
+
+/// 查询数据
+const operateTypeSearchList = [{
+        label: '全部',
+        value: 0
+    }].concat(getOperateTypeSearchList())
 
 const columns: Model.TableColumn[] = [
     { prop: 'createtime', label: '时间' },
@@ -58,10 +64,16 @@ const columns: Model.TableColumn[] = [
 const { loading, pageIndex, pageCount, run } = useRequest(queryHisAmountLog, {
     manual: true,
     params: {
-        operateType: operatetype.value.toString()
+        pagesize: 20,
+        pageflag: 1,
+        operateType: operatetype.value === 0 ? undefined : operatetype.value.toString()
     },
     onSuccess: (res) => {
-        dataList.value = res.data
+        if (pageIndex.value === 1) {
+            dataList.value = res.data
+            return
+        } 
+        dataList.value.push(...res.data)
     },
     onError: () => {
         error.value = true
@@ -79,9 +91,11 @@ const onConfirm = ([start, end]: Date[]) => {
 // 选中资金类型
 const onSelectConfirm = (value: number) => {
     operatetype.value = value
+    pageIndex.value = 1
     run({
-        page: 1,
-        operateType: value.toString()
+        pagesize: 20,
+        pageflag: 1,
+        operateType: value === 0 ? undefined : value.toString()
     })
 }
 

+ 19 - 6
src/packages/mobile/views/bank/capital/statement/index.vue

@@ -4,7 +4,7 @@
         <CellGroup>
             <Field name="operateType" label="资金类型" is-link>
                 <template #input>
-                    <app-select v-model="operatetype" placeholder="请选择资金类型" :options="getOperateTypeSearchList()" :optionProps="{ label: 'label', value: 'value' }" @confirm="onConfirm"/>
+                    <app-select v-model="operatetype" placeholder="请选择资金类型" :options="operateTypeSearchList" :optionProps="{ label: 'label', value: 'value' }" @confirm="onConfirm"/>
                 </template>
             </Field>
         </CellGroup>
@@ -31,8 +31,13 @@ import AppSelect from '@mobile/components/base/select/index.vue'
 const dataList = shallowRef<Model.AmountLogRsp[]>([])
 const error = shallowRef(false)
 /// 资金类型
-const operatetype = shallowRef(101)
+const operatetype = shallowRef(0)
 const pullRefreshRef = shallowRef()
+/// 查询数据
+const operateTypeSearchList = [{
+        label: '全部',
+        value: 0
+    }].concat(getOperateTypeSearchList())
 
 const columns: Model.TableColumn[] = [
     { prop: 'createtime', label: '时间' },
@@ -42,10 +47,16 @@ const columns: Model.TableColumn[] = [
 
 const { loading, pageIndex, pageCount, run } = useRequest(queryAmountLog, {
     params: {
-        operateType: operatetype.value.toString()
+        pagesize: 20,
+        pageflag: 1,
+        operateType: operatetype.value === 0 ? undefined : operatetype.value.toString()
     },
     onSuccess: (res) => {
-        dataList.value = res.data
+        if (pageIndex.value === 1) {
+            dataList.value = res.data
+            return
+        } 
+        dataList.value.push(...res.data)
     },
     onError: () => {
         error.value = true
@@ -55,9 +66,11 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryAmountLog, {
 // 选中资金类型
 const onConfirm = (value: number) => {
     operatetype.value = value
+    pageIndex.value = 1
     run({
-        page: 1,
-        operateType: value.toString()
+        pagesize: 20,
+        pageflag: 1,
+        operateType: value === 0 ? undefined : value.toString()
     })
 }
 </script>

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

@@ -58,7 +58,7 @@ filterOptons.buttonList = [
 filterOptons.selectList = [
     {
         key: 'operateType',
-        selectedValue: 101,
+        selectedValue: undefined,
         options: getOperateTypeSearchList(),
         locked: true,
     }

+ 1 - 1
src/packages/pc/views/query/capital/list/index.vue

@@ -50,7 +50,7 @@ filterOptons.buttonList = [
 filterOptons.selectList = [
     {
         key: 'operateType',
-        selectedValue: 101,
+        selectedValue: undefined,
         options: getOperateTypeSearchList(),
         locked: true,
     }