1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- const _Http = getApp().globalData.http,
- currency = require("../../../../utils/currency");
- let CNY = num => currency(num, {
- symbol: "¥",
- precision: 2
- }).format();
- Component({
- data: {
- content: {
- nocache: true,
- pageNumber: 1,
- pageTotal: 1,
- total: null,
- "where": {
- "condition": ""
- }
- }
- },
- methods: {
- /* 获取产品列表 */
- getList(id, init) {
- let content = this.data.content;
- content.sa_dispatchid = id;
- if (init) content.pageNumber = 1;
- _Http.basic({
- "id": "20221115104703",
- content
- }).then(res => {
- console.log("发货清单列表", res)
- if (res.msg != '成功') return wx.showToast({
- title: res.msg,
- icon: "none"
- })
- res.data = res.data.map(v => {
- /* if (v.attinfos.length != 0) {
- v.attinfos = file.fileList(v.attinfos)
- let image = v.attinfos.find(v => v.fileType == "image");
- v.cover = image ? image.cover : "";
- }; */
- return v;
- })
- 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
- })
- })
- },
- }
- })
|