Sfoglia il codice sorgente

客户财务信息

zhaoxiaohai 2 anni fa
parent
commit
fbe9197c68

+ 47 - 10
packageA/setclient/modules/financing/index.js

@@ -1,4 +1,5 @@
-// packageA/setclient/modules/financing/index.js
+const _Http = getApp().globalData.http;
+
 Component({
     options: {
         addGlobalClass: true
@@ -6,18 +7,54 @@ Component({
     properties: {
 
     },
-
-    /**
-     * 组件的初始数据
-     */
     data: {
-
+        content: {
+            "nacache": true,
+            "pageNumber": 1,
+            "pageSize": 10,
+            "pageTotal": 1,
+            "total": null,
+            "where": {
+                "condition": ""
+            }
+        },
+        list: []
     },
-
-    /**
-     * 组件的方法列表
-     */
     methods: {
+        changeTotal() {
+            this.setData({
+                "content.total": this.data.content.total - 1
+            })
+        },
+        getList(id, init) {
+            let content = this.data.content;
+            content.sys_enterpriseid = id;
+            if (init) {
+                content.pageNumber = 1
+                content.pageTotal = 1
+            }
+            _Http.basic({
+                "id": "20221013160602",
+                content
+            }).then(res => {
+                console.log("客户财务信息", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.data,
+                    icon: "none"
+                })
+                this.setData({
+                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+                    "content.pageNumber": res.pageNumber + 1,
+                    "content.pageSize": res.pageSize,
+                    "content.pageTotal": res.pageTotal,
+                    "content.total": res.total,
+                    sys_enterpriseid: id
+                })
 
+                setTimeout(() => {
+                    this.selectComponent("#List").queryDefault()
+                }, 300)
+            })
+        },
     }
 })

+ 1 - 2
packageA/setclient/modules/financing/index.json

@@ -1,7 +1,6 @@
 {
     "component": true,
     "usingComponents": {
-        "van-radio": "@vant/weapp/radio/index",
-        "van-radio-group": "@vant/weapp/radio-group/index"
+        "list": "./list/index"
     }
 }

+ 0 - 8
packageA/setclient/modules/financing/index.scss

@@ -1,9 +1 @@
 @import "../address/head.scss";
-@import "../address/index.scss";
-
-.exp {
-    margin-top: 8rpx;
-    font-size: 24rpx;
-    font-family: PingFang SC-Regular, PingFang SC;
-    color: #333333;
-}

+ 3 - 29
packageA/setclient/modules/financing/index.wxml

@@ -1,41 +1,15 @@
 <view class="head">
     <view class="count">
-        总共14
+        总共{{content.total}}
     </view>
     <view class="expand">
         <navigator url="#" class="but">
             <van-icon name="search" />
         </navigator>
-        <navigator url="/packageA/setclient/modules/address/add/index" class="but">
+        <navigator url="/packageA/setclient/modules/financing/add/index" class="but">
             <van-icon name="plus" />
         </navigator>
     </view>
 </view>
 
-
-<van-radio-group value="{{ radio }}" bind:change="onChange">
-    <view class="add-box">
-        <view class="detail">
-            <view class="label">
-                十大冯绍峰是否会适度放后适度放后萨达匥阿苏要放个刷牙法舒服士大夫沙发士大夫沙发阿萨德阿斯蒂芬
-            </view>
-            <view class="exp">
-                详情地址:啊是打算打算打算大的阿萨德仨
-            </view>
-            <view class="exp">
-                负责人:212564564
-            </view>
-            <view class="exp">
-                负责人:212564564
-            </view>
-        </view>
-        <view class="editor">
-            <van-radio icon-size='14' label-class='radio' name="1">默认收货地址</van-radio>
-            <view class="icon-but">
-                <navigator url="#" class="iconfont icon-a-yingxiaowuliaofuzhi" />
-                <navigator url="#" class="iconfont icon-bianji" />
-                <navigator url="#" class="iconfont icon-shanchu" />
-            </view>
-        </view>
-    </view>
-</van-radio-group>
+<list id='List' list="{{list}}" bindchangeTotal="changeTotal" />