@cpzxrobot/sdk 1.3.19 → 1.3.20
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/dist/project_gateway.js +32 -7
- package/package.json +1 -1
- package/project_gateway.ts +52 -7
package/dist/project_gateway.js
CHANGED
|
@@ -132,14 +132,33 @@ class ProjectGateway extends Object {
|
|
|
132
132
|
get material() {
|
|
133
133
|
return {
|
|
134
134
|
// 获取材料列表
|
|
135
|
-
list: (
|
|
135
|
+
list: (args) => {
|
|
136
|
+
return this.context.ready.then((axios) => {
|
|
137
|
+
return axios.post(`/api/v2/coremde-sale/project/material/list`, args);
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
// 获取材料详情
|
|
141
|
+
get: (id) => {
|
|
142
|
+
return this.context.ready.then((axios) => {
|
|
143
|
+
return axios.get(`/api/v2/coremde-sale/project/material/${id}`);
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
// 新增材料
|
|
147
|
+
add: (args) => {
|
|
148
|
+
return this.context.ready.then((axios) => {
|
|
149
|
+
return axios.post(`/api/v2/coremde-sale/project/material/add`, args);
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
// 修改材料
|
|
153
|
+
update: (args) => {
|
|
154
|
+
return this.context.ready.then((axios) => {
|
|
155
|
+
return axios.post(`/api/v2/coremde-sale/project/material/update`, args);
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
// 删除材料
|
|
159
|
+
delete: (id) => {
|
|
136
160
|
return this.context.ready.then((axios) => {
|
|
137
|
-
|
|
138
|
-
pageNo,
|
|
139
|
-
pageSize,
|
|
140
|
-
projectId
|
|
141
|
-
};
|
|
142
|
-
return axios.post(`/api/v2/coremde-sale/project/material/list`, params);
|
|
161
|
+
return axios.get(`/api/v2/coremde-sale/project/material/delete/${id}`);
|
|
143
162
|
});
|
|
144
163
|
}
|
|
145
164
|
};
|
|
@@ -303,7 +322,13 @@ class ProjectGateway extends Object {
|
|
|
303
322
|
* @returns Promise
|
|
304
323
|
*/
|
|
305
324
|
add: (args) => {
|
|
325
|
+
// 等待context准备好
|
|
326
|
+
/**
|
|
327
|
+
* @param args BOM配置参数
|
|
328
|
+
* @returns Promise
|
|
329
|
+
*/
|
|
306
330
|
return this.context.ready.then((axios) => {
|
|
331
|
+
// 发送POST请求创建BOM配置
|
|
307
332
|
return axios.post(`/api/v2/coremde-sale/project/bom-config/create`, args);
|
|
308
333
|
});
|
|
309
334
|
}
|
package/package.json
CHANGED
package/project_gateway.ts
CHANGED
|
@@ -178,14 +178,52 @@ export class ProjectGateway extends Object {
|
|
|
178
178
|
get material() {
|
|
179
179
|
return {
|
|
180
180
|
// 获取材料列表
|
|
181
|
-
list: (
|
|
181
|
+
list: (args: {
|
|
182
|
+
pageNo: number;
|
|
183
|
+
pageSize: number;
|
|
184
|
+
companyId: number;
|
|
185
|
+
materialCode?: string;
|
|
186
|
+
materialName?: string;
|
|
187
|
+
}) => {
|
|
188
|
+
return this.context.ready.then((axios) => {
|
|
189
|
+
return axios.post(`/api/v2/coremde-sale/project/material/list`, args);
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
// 获取材料详情
|
|
193
|
+
get: (id: number) => {
|
|
182
194
|
return this.context.ready.then((axios) => {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
195
|
+
return axios.get(`/api/v2/coremde-sale/project/material/${id}`);
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
// 新增材料
|
|
199
|
+
add: (args: {
|
|
200
|
+
materialName: string;
|
|
201
|
+
materialCode: string;
|
|
202
|
+
depotQty: string;
|
|
203
|
+
companyId: number;
|
|
204
|
+
[key: string]: any;
|
|
205
|
+
}) => {
|
|
206
|
+
return this.context.ready.then((axios) => {
|
|
207
|
+
return axios.post(`/api/v2/coremde-sale/project/material/add`, args);
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
// 修改材料
|
|
211
|
+
update: (args: {
|
|
212
|
+
id: number;
|
|
213
|
+
materialName: string;
|
|
214
|
+
materialCode: string;
|
|
215
|
+
depotQty: string;
|
|
216
|
+
companyId: number;
|
|
217
|
+
[key: string]: any;
|
|
218
|
+
}) => {
|
|
219
|
+
return this.context.ready.then((axios) => {
|
|
220
|
+
return axios.post(`/api/v2/coremde-sale/project/material/update`, args);
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
// 删除材料
|
|
224
|
+
delete: (id: number) => {
|
|
225
|
+
return this.context.ready.then((axios) => {
|
|
226
|
+
return axios.get(`/api/v2/coremde-sale/project/material/delete/${id}`);
|
|
189
227
|
});
|
|
190
228
|
}
|
|
191
229
|
}
|
|
@@ -387,7 +425,14 @@ export class ProjectGateway extends Object {
|
|
|
387
425
|
materialInfo: string;
|
|
388
426
|
groupId: number;
|
|
389
427
|
}) => {
|
|
428
|
+
|
|
429
|
+
// 等待context准备好
|
|
430
|
+
/**
|
|
431
|
+
* @param args BOM配置参数
|
|
432
|
+
* @returns Promise
|
|
433
|
+
*/
|
|
390
434
|
return this.context.ready.then((axios) => {
|
|
435
|
+
// 发送POST请求创建BOM配置
|
|
391
436
|
return axios.post(`/api/v2/coremde-sale/project/bom-config/create`, args);
|
|
392
437
|
});
|
|
393
438
|
}
|