| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const _Http = getApp().globalData.http;
- Component({
- properties: {
- isproject: String
- },
- data: {
- sa_quotedpriceid: 0,
- content: {
- nocache: true,
- isExport: 0,
- pageNumber: 1,
- pageTotal: 1,
- total: null,
- where: {},
- type: "0",
- },
- },
- methods: {
- /* 获取产品列表 */
- getList(id, init) {
- let content = this.data.content;
- content.sa_quotedpriceid = id;
- if (init) content.pageNumber = 1;
- content.where.isproject = this.data.isproject;
- _Http.basic({
- "id": "20221209093003",
- 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,
- sa_quotedpriceid: id
- })
- })
- },
- }
- })
|