@cpzxrobot/sdk 1.1.70 → 1.1.72

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.
@@ -69,6 +69,28 @@ export class CustomerGateway extends Object {
69
69
  );
70
70
  });
71
71
  },
72
+ update: (args: any) => {
73
+ return this.context.ready.then((axios) => {
74
+ return axios.post(
75
+ `/api/v2/coremde-sale/customer/visit/update`,
76
+ args,
77
+ );
78
+ });
79
+ },
80
+ delete: (id: number) => {
81
+ return this.context.ready.then((axios) => {
82
+ return axios.get(
83
+ `/api/v2/coremde-sale/customer/visit/delete?id=${id}`,
84
+ );
85
+ });
86
+ },
87
+ get: (id: number) => {
88
+ return this.context.ready.then((axios) => {
89
+ return axios.get(
90
+ `/api/v2/coremde-sale/customer/visit/get?id=${id}`,
91
+ );
92
+ });
93
+ },
72
94
  }
73
95
  }
74
96
 
@@ -50,6 +50,21 @@ class CustomerGateway extends Object {
50
50
  return axios.post(`/api/v2/coremde-sale/customer/visit/add`, args);
51
51
  });
52
52
  },
53
+ update: (args) => {
54
+ return this.context.ready.then((axios) => {
55
+ return axios.post(`/api/v2/coremde-sale/customer/visit/update`, args);
56
+ });
57
+ },
58
+ delete: (id) => {
59
+ return this.context.ready.then((axios) => {
60
+ return axios.get(`/api/v2/coremde-sale/customer/visit/delete?id=${id}`);
61
+ });
62
+ },
63
+ get: (id) => {
64
+ return this.context.ready.then((axios) => {
65
+ return axios.get(`/api/v2/coremde-sale/customer/visit/get?id=${id}`);
66
+ });
67
+ },
53
68
  };
54
69
  }
55
70
  get stat() {
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ class Cpzxrobot {
96
96
  button.type = "file";
97
97
  button.style.display = "none";
98
98
  document.body.appendChild(button);
99
- button.onchange = (e) => {
99
+ button.onclick = (e) => {
100
100
  var _a;
101
101
  var file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
102
102
  if (file) {
@@ -154,13 +154,9 @@ class ProjectGateway extends Object {
154
154
  }, fileName);
155
155
  });
156
156
  },
157
- approval: (id, agree, auditInfo) => {
157
+ approval: (args) => {
158
158
  return this.context.ready.then((axios) => {
159
- return axios.post(`/api/v2/coremde-sale/project/inquiry/approve`, {
160
- id,
161
- agree,
162
- auditInfo,
163
- });
159
+ return axios.post(`/api/v2/coremde-sale/project/inquiry/approve`, args);
164
160
  });
165
161
  }
166
162
  };
package/index.ts CHANGED
@@ -132,7 +132,7 @@ export class Cpzxrobot {
132
132
  button.type = "file";
133
133
  button.style.display = "none";
134
134
  document.body.appendChild(button);
135
- button.onchange = (e: Event) => {
135
+ button.onclick = (e: Event) => {
136
136
  var file = (e.target as HTMLInputElement).files?.[0];
137
137
  if (file) {
138
138
  const formData = new FormData();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.70",
3
+ "version": "1.1.72",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -195,13 +195,9 @@ export class ProjectGateway extends Object {
195
195
  },fileName);
196
196
  });
197
197
  },
198
- approval:(id: number, agree: 1 | 0, auditInfo: string) =>{
198
+ approval:(args:any) =>{
199
199
  return this.context.ready.then((axios) => {
200
- return axios.post(`/api/v2/coremde-sale/project/inquiry/approve`, {
201
- id,
202
- agree,
203
- auditInfo,
204
- });
200
+ return axios.post(`/api/v2/coremde-sale/project/inquiry/approve`, args);
205
201
  });
206
202
  }
207
203
  };
package/readme.md CHANGED
@@ -99,7 +99,7 @@ baseURL: "/"
99
99
  | cpzxrobot().factory.workshop.get | 获得工厂的某个车间信息 |
100
100
  | cpzxrobot().factory.workshop.post | 添加车间信息 |
101
101
  | cpzxrobot().factory.workshop.types | 获得车间的类型列表 |
102
- | cpzxrobot().factory.batch.list | 获得批次列表,传入factoryId参数 |
102
+ | cpzxrobot().factory.batch.list | 获得批次列表,传入factoryId参数 |ldiba
103
103
  | cpzxrobot().transport.fodder.getDeviceByFodderld | 获得料单对应的设备 |
104
104
  | cpzxrobot().pigfarm.heatlamp.xxx | 操作保温灯 |
105
105
  | cpzxrobot().pigfarm.weightMeter.config.list | 获取称重计的配置信息 |
package/types.d.ts CHANGED
@@ -305,9 +305,10 @@ interface DataQueryArgs {
305
305
  | "max"
306
306
  | "raw"
307
307
  | "difference";
308
- period?: "1mo" | "1d" | null;
308
+ period?: "1mo" | "1d" | "1h" |null; // 统计周期,默认为1d
309
309
  offset?: string; // 可以设置统计偏移量,比如设置18h, 则统计从当天晚上6点开始
310
310
  [key: string]: any;
311
+ aggerate?: string;
311
312
  }
312
313
 
313
314
  class Cpzxrobot {