@cpzxrobot/sdk 1.1.72 → 1.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,9 +58,9 @@ class ProductGateway extends Object {
58
58
  return axios.post(`/api/v2/coremde-sale/product/price/add`, args);
59
59
  });
60
60
  },
61
- delete: (id) => {
61
+ delete: (ids) => {
62
62
  return this.context.ready.then((axios) => {
63
- return axios.post(`/api/v2/coremde-sale/product/price/delete`, { id });
63
+ return axios.post(`/api/v2/coremde-sale/product/price/delete`, { ids });
64
64
  });
65
65
  },
66
66
  history: {
@@ -74,6 +74,16 @@ class ProductGateway extends Object {
74
74
  return axios.get(`/api/v2/coremde-sale/product/price/history/get?id=${id}`);
75
75
  });
76
76
  },
77
+ export: (args) => {
78
+ if (!args.fileName) {
79
+ args.fileName = "报价单历史记录.xlsx";
80
+ }
81
+ return this.context.ready.then((axios) => {
82
+ return axios.getAndSave(`/api/v2/coremde-sale/product/price/history/export`, {
83
+ params: args,
84
+ }, args.fileName);
85
+ });
86
+ },
77
87
  },
78
88
  };
79
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.72",
3
+ "version": "1.1.74",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -28,18 +28,18 @@ export class ProductGateway extends Object {
28
28
  });
29
29
  }
30
30
 
31
- types(companyId: number,pageNo:number| undefined = undefined,pageSize:number| undefined = undefined) {
32
- var args :{
31
+ types(companyId: number, pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) {
32
+ var args: {
33
33
  companyId: number,
34
- pageNo?:number,
35
- pageSize?:number,
34
+ pageNo?: number,
35
+ pageSize?: number,
36
36
  } = {
37
37
  companyId: companyId,
38
38
  }
39
- if(pageNo){
39
+ if (pageNo) {
40
40
  args.pageNo = pageNo
41
41
  }
42
- if(pageSize){
42
+ if (pageSize) {
43
43
  args.pageSize = pageSize
44
44
  }
45
45
  return this.context.ready.then((axios) => {
@@ -95,9 +95,9 @@ export class ProductGateway extends Object {
95
95
  return axios.post(`/api/v2/coremde-sale/product/price/add`, args);
96
96
  });
97
97
  },
98
- delete: (id: number) => {
98
+ delete: (ids: number[]) => {
99
99
  return this.context.ready.then((axios) => {
100
- return axios.post(`/api/v2/coremde-sale/product/price/delete`, { id });
100
+ return axios.post(`/api/v2/coremde-sale/product/price/delete`, { ids });
101
101
  });
102
102
  },
103
103
  history: {
@@ -105,6 +105,7 @@ export class ProductGateway extends Object {
105
105
  pageNo: number;
106
106
  pageSize: number;
107
107
  product_id: number;
108
+ name: string;
108
109
  }) => {
109
110
  return this.context.ready.then((axios) => {
110
111
  return axios.post(
@@ -120,6 +121,19 @@ export class ProductGateway extends Object {
120
121
  );
121
122
  });
122
123
  },
124
+ export: (args: {
125
+ id: number;
126
+ fileName?: string;
127
+ }) => {
128
+ if (!args.fileName) {
129
+ args.fileName = "报价单历史记录.xlsx";
130
+ }
131
+ return this.context.ready.then((axios) => {
132
+ return axios.getAndSave(`/api/v2/coremde-sale/product/price/history/export`, {
133
+ params: args,
134
+ }, args.fileName);
135
+ });
136
+ },
123
137
  },
124
138
  };
125
139
  }