|
@@ -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)
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
})
|