|
|
@@ -1,56 +1,47 @@
|
|
|
const _Http = getApp().globalData.http;
|
|
|
Page({
|
|
|
data: {
|
|
|
- active: 0,
|
|
|
item: null,
|
|
|
radio: true,
|
|
|
content: {
|
|
|
- pageNumber: 1,
|
|
|
- pageTotal: 1,
|
|
|
- total: null,
|
|
|
- where: {
|
|
|
- condition: "",
|
|
|
- type: 5,
|
|
|
- sa_projectid: 1
|
|
|
+ "nocache": true,
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageTotal": 1,
|
|
|
+ "pageSize": 20,
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ this.data.content.sa_projectid = getCurrentPages().find(v => v.__route__ == 'packageA/project/detail').data.sa_projectid
|
|
|
/* 从表单组件进入进入 */
|
|
|
this.getList()
|
|
|
},
|
|
|
- onChange(e) {
|
|
|
- this.setData({
|
|
|
- active: e.detail.index
|
|
|
- });
|
|
|
- this.getList(true);
|
|
|
- },
|
|
|
getList(init = false) {
|
|
|
//init 用于初始化分页
|
|
|
if (init.detail != undefined) init = init.detail;
|
|
|
let content = this.data.content;
|
|
|
if (init) content.pageNumber = 1;
|
|
|
if (content.pageNumber > content.pageTotal) return;
|
|
|
- content.where.type = this.data.active == 0 ? 6 : 5
|
|
|
- if (this.data)
|
|
|
- _Http.basic({
|
|
|
- id: 20220920083901,
|
|
|
- content
|
|
|
- }).then(res => {
|
|
|
- console.log("选择客户列表", res)
|
|
|
- this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
- if (res.msg != '成功') return wx.showToast({
|
|
|
- title: res.data,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- 'content.pageNumber': res.pageNumber + 1,
|
|
|
- 'content.pageTotal': res.pageTotal,
|
|
|
- 'content.total': res.total,
|
|
|
- list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
|
|
|
- })
|
|
|
- this.getTags();
|
|
|
+ _Http.basic({
|
|
|
+ "id": "20221027143702",
|
|
|
+ content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("选择客户列表", res)
|
|
|
+ this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ 'content.pageNumber': res.pageNumber + 1,
|
|
|
+ 'content.pageTotal': res.pageTotal,
|
|
|
+ 'content.total': res.total,
|
|
|
+ list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
|
|
|
})
|
|
|
+ this.getTags();
|
|
|
+ })
|
|
|
},
|
|
|
/* 获取列表标签 */
|
|
|
getTags() {
|
|
|
@@ -72,7 +63,6 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
/* 选中 */
|
|
|
changeResult(e) {
|
|
|
let {
|