@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.
- package/customer_gateway.ts +22 -0
- package/dist/customer_gateway.js +15 -0
- package/dist/index.js +1 -1
- package/dist/project_gateway.js +2 -6
- package/index.ts +1 -1
- package/package.json +1 -1
- package/project_gateway.ts +2 -6
- package/readme.md +1 -1
- package/types.d.ts +2 -1
package/customer_gateway.ts
CHANGED
|
@@ -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
|
|
package/dist/customer_gateway.js
CHANGED
|
@@ -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.
|
|
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) {
|
package/dist/project_gateway.js
CHANGED
|
@@ -154,13 +154,9 @@ class ProjectGateway extends Object {
|
|
|
154
154
|
}, fileName);
|
|
155
155
|
});
|
|
156
156
|
},
|
|
157
|
-
approval: (
|
|
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.
|
|
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
package/project_gateway.ts
CHANGED
|
@@ -195,13 +195,9 @@ export class ProjectGateway extends Object {
|
|
|
195
195
|
},fileName);
|
|
196
196
|
});
|
|
197
197
|
},
|
|
198
|
-
approval:(
|
|
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 {
|