@cpzxrobot/sdk 1.3.69 → 1.3.71

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.
@@ -1,13 +1,22 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.MobilePlatform = void 0;
4
13
  class MobilePlatform {
14
+ // private port: MessagePort | null = null;
5
15
  constructor() {
6
16
  this.sseCallbacks = {};
7
17
  this.token = "";
8
18
  this.appCode = "";
9
19
  this.baseURL = "";
10
- this.port = null;
11
20
  // @ts-ignore
12
21
  this.platform = window.flutter_inappwebview;
13
22
  }
@@ -20,9 +29,9 @@ class MobilePlatform {
20
29
  getToken() {
21
30
  return "";
22
31
  }
23
- setToken(token) {
32
+ setToken(_token) {
24
33
  }
25
- setSelectedFarm(farm) {
34
+ setSelectedFarm(_farm) {
26
35
  throw new Error("Method not implemented.");
27
36
  }
28
37
  setSelectedUnit(unit) {
@@ -83,65 +92,83 @@ class MobilePlatform {
83
92
  upload: function (url, option) {
84
93
  return that.platform.callHandler("axios_upload", url, option);
85
94
  },
86
- getAsSse: async function (url, fn, config) {
87
- var randomId = Math.random().toString(36).substring(2);
88
- that.sseCallbacks[randomId] = fn;
89
- console.log("getAsSse", url, fn, randomId);
90
- await that.platform.callHandler("axios_getAsSse", url, config, randomId);
91
- delete that.sseCallbacks[randomId];
95
+ getAsSse: function (url, fn, config) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ var randomId = Math.random().toString(36).substring(2);
98
+ that.sseCallbacks[randomId] = fn;
99
+ console.log("getAsSse", url, fn, randomId);
100
+ yield that.platform.callHandler("axios_getAsSse", url, config, randomId);
101
+ delete that.sseCallbacks[randomId];
102
+ });
92
103
  },
93
104
  };
94
105
  }
95
- async getSelectedFarmFromMiniApp() {
96
- return this.platform.callHandler("getSelectedFarmFromMiniApp");
106
+ getSelectedFarmFromMiniApp() {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ return this.platform.callHandler("getSelectedFarmFromMiniApp");
109
+ });
97
110
  }
98
- async getSelectedUnitFromMiniApp() {
99
- return this.platform.callHandler("getSelectedUnitFromMiniApp");
111
+ getSelectedUnitFromMiniApp() {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ return this.platform.callHandler("getSelectedUnitFromMiniApp");
114
+ });
100
115
  }
101
- async jumpToMiniApp(url) {
102
- return this.platform.callHandler("app.openMiniapp", url);
116
+ jumpToMiniApp(url) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ return this.platform.callHandler("app.openMiniapp", url);
119
+ });
103
120
  }
104
- async scanQrcode() {
105
- return this.platform.callHandler("app.scanQrcode");
121
+ scanQrcode() {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ return this.platform.callHandler("app.scanQrcode");
124
+ });
106
125
  }
107
126
  setTitle(title) {
108
127
  this.platform.callHandler("app.setTitle", title);
109
128
  }
110
- async saveBase64(base64, filename) {
111
- return this.platform.callHandler("app.saveBase64", base64, filename);
112
- }
113
- async saveBlob(blob, filename) {
114
- const reader = new FileReader();
115
- return new Promise((resolve, reject) => {
116
- reader.readAsDataURL(blob);
117
- reader.onloadend = async () => {
118
- const base64 = reader.result;
119
- await this.saveBase64(base64, filename);
120
- resolve();
121
- };
122
- reader.onerror = (err) => {
123
- reject(err);
124
- };
129
+ saveBase64(base64, filename) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ return this.platform.callHandler("app.saveBase64", base64, filename);
132
+ });
133
+ }
134
+ saveBlob(blob, filename) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const reader = new FileReader();
137
+ return new Promise((resolve, reject) => {
138
+ reader.readAsDataURL(blob);
139
+ reader.onloadend = () => __awaiter(this, void 0, void 0, function* () {
140
+ const base64 = reader.result;
141
+ yield this.saveBase64(base64, filename);
142
+ resolve();
143
+ });
144
+ reader.onerror = (err) => {
145
+ reject(err);
146
+ };
147
+ });
125
148
  });
126
149
  }
127
150
  vibrate(time) {
128
151
  this.platform.callHandler("app.vibrate", time);
129
152
  }
130
- async showInDeviceManager(deviceId, type) {
131
- return this.platform.callHandler("app.showInDeviceManager", deviceId, type);
153
+ showInDeviceManager(deviceId, type) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ return this.platform.callHandler("app.showInDeviceManager", deviceId, type);
156
+ });
132
157
  }
133
158
  reloadGroup(group) {
134
159
  this.platform.callHandler("app.reloadGroup", group);
135
160
  }
136
- async getGeo() {
137
- const result = await this.platform.callHandler("app.getGeo");
138
- if (result.error) {
139
- throw result.error;
140
- }
141
- return {
142
- lat: result.lat,
143
- lng: result.lng
144
- };
161
+ getGeo() {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ const result = yield this.platform.callHandler("app.getGeo");
164
+ if (result.error) {
165
+ throw result.error;
166
+ }
167
+ return {
168
+ lat: result.lat,
169
+ lng: result.lng
170
+ };
171
+ });
145
172
  }
146
173
  setResult(name, value) {
147
174
  this.platform.callHandler("app.setResult", name, value);
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.PigfarmGateway = void 0;
4
13
  class PigfarmGateway extends Object {
@@ -194,16 +203,16 @@ class PigfarmGateway extends Object {
194
203
  return axios.post(`/api/v1/pigfarm/heatLamp/config/add`, Object.assign(Object.assign({}, data), { unitId: unit.id }));
195
204
  });
196
205
  },
197
- configList: async (unit) => {
198
- var axios = await this.context.ready;
206
+ configList: (unit) => __awaiter(this, void 0, void 0, function* () {
207
+ var axios = yield this.context.ready;
199
208
  return axios.post(`/api/v1/pigfarm/heatLamp/config/list?unitId=${unit.id}`);
200
- },
209
+ }),
201
210
  template: {
202
211
  //获取配置模版列表
203
- list: async (factory) => {
204
- var axios = await this.context.ready;
212
+ list: (factory) => __awaiter(this, void 0, void 0, function* () {
213
+ var axios = yield this.context.ready;
205
214
  return axios.get(`/api/v1/pigfarm/heatLamp/config/template/list/${factory.id}`);
206
- },
215
+ }),
207
216
  //增加模板
208
217
  add: (factory, name, data) => {
209
218
  return this.context.ready.then((axios) => {
@@ -217,27 +226,27 @@ class PigfarmGateway extends Object {
217
226
  });
218
227
  }
219
228
  },
220
- list: async (unit) => {
221
- var axios = await this.context.ready;
229
+ list: (unit) => __awaiter(this, void 0, void 0, function* () {
230
+ var axios = yield this.context.ready;
222
231
  return axios.post(`/api/v1/pigfarm/heatLamp/list/${unit.id}`);
223
- },
232
+ }),
224
233
  //返回物联网相关的字段
225
- iotFields: async (lamp) => {
226
- var axios = await this.context.ready;
234
+ iotFields: (lamp) => __awaiter(this, void 0, void 0, function* () {
235
+ var axios = yield this.context.ready;
227
236
  return axios.post(`/api/v1/pigfarm/heatLamp/iotFields/${lamp.id}`);
228
- },
237
+ }),
229
238
  //开关,传入id或对象,action为on或off
230
- switch: async (lamp, action) => {
231
- var axios = await this.context.ready;
239
+ switch: (lamp, action) => __awaiter(this, void 0, void 0, function* () {
240
+ var axios = yield this.context.ready;
232
241
  var id = typeof lamp === "number" ? lamp : lamp.id;
233
242
  return axios.post(`/api/v1/pigfarm/heatLamp/switch`, {
234
243
  id,
235
244
  action,
236
245
  });
237
- },
246
+ }),
238
247
  //设置,传入id或对象,action为dayage时需要传回设置的天数
239
- set: async (lamp, action, arg) => {
240
- var axios = await this.context.ready;
248
+ set: (lamp, action, arg) => __awaiter(this, void 0, void 0, function* () {
249
+ var axios = yield this.context.ready;
241
250
  var url = action === "dayage"
242
251
  ? "/api/v1/pigfarm/heatLamp/syncDayage"
243
252
  : `/api/v1/pigfarm/heatLamp/config/set`;
@@ -250,30 +259,30 @@ class PigfarmGateway extends Object {
250
259
  body["days"] = arg;
251
260
  }
252
261
  return axios.post(url, body);
253
- },
254
- get: async (id) => {
255
- var axios = await this.context.ready;
262
+ }),
263
+ get: (id) => __awaiter(this, void 0, void 0, function* () {
264
+ var axios = yield this.context.ready;
256
265
  return axios.get(`/api/v1/pigfarm/heatLamp/config/${id}`);
257
- },
258
- update: async (lamp) => {
259
- var axios = await this.context.ready;
266
+ }),
267
+ update: (lamp) => __awaiter(this, void 0, void 0, function* () {
268
+ var axios = yield this.context.ready;
260
269
  return axios.post(`/api/v1/pigfarm/heatLamp/config/update`, lamp);
261
- },
270
+ }),
262
271
  //用于设置保温灯分组,TODO : 应该有更直观的命名
263
- updateByUnit: async (unit, lamp, ids = null) => {
264
- var axios = await this.context.ready;
272
+ updateByUnit: (unit_1, lamp_1, ...args_1) => __awaiter(this, [unit_1, lamp_1, ...args_1], void 0, function* (unit, lamp, ids = null) {
273
+ var axios = yield this.context.ready;
265
274
  return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/update`, Object.assign(Object.assign({}, lamp), { ids }));
266
- },
267
- getGroup: async (unit) => {
268
- var axios = await this.context.ready;
275
+ }),
276
+ getGroup: (unit) => __awaiter(this, void 0, void 0, function* () {
277
+ var axios = yield this.context.ready;
269
278
  return axios.get(`/api/v1/pigfarm/heatLamp/group?unitId=${unit.id}`);
270
- },
271
- deleteGroup: async (id) => {
272
- var axios = await this.context.ready;
279
+ }),
280
+ deleteGroup: (id) => __awaiter(this, void 0, void 0, function* () {
281
+ var axios = yield this.context.ready;
273
282
  return axios.post(`/api/v1/pigfarm/heatLamp/deleteGroup?id=${id}`);
274
- },
275
- switchByUnit: async (unit, action, ids = null) => {
276
- var axios = await this.context.ready;
283
+ }),
284
+ switchByUnit: (unit_1, action_1, ...args_1) => __awaiter(this, [unit_1, action_1, ...args_1], void 0, function* (unit, action, ids = null) {
285
+ var axios = yield this.context.ready;
277
286
  var args = {
278
287
  action,
279
288
  };
@@ -281,19 +290,19 @@ class PigfarmGateway extends Object {
281
290
  args["ids"] = ids;
282
291
  }
283
292
  return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/switch`, args);
284
- },
285
- taskStatus: async (args) => {
286
- var axios = await this.context.ready;
293
+ }),
294
+ taskStatus: (args) => __awaiter(this, void 0, void 0, function* () {
295
+ var axios = yield this.context.ready;
287
296
  return axios.post(`/api/v1/pigfarm/heatLamp/task`, args);
288
- },
289
- control: async (lamp, action) => {
290
- var axios = await this.context.ready;
297
+ }),
298
+ control: (lamp, action) => __awaiter(this, void 0, void 0, function* () {
299
+ var axios = yield this.context.ready;
291
300
  var id = typeof lamp === "number" ? lamp : lamp.id;
292
301
  return axios.post(`/api/v1/pigfarm/heatLamp/control`, {
293
302
  id,
294
303
  action,
295
304
  });
296
- },
305
+ }),
297
306
  };
298
307
  }
299
308
  }
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductionGateway = void 0;
4
13
  // 产量统计网关,管理工厂产量数据
@@ -11,44 +20,48 @@ class ProductionGateway extends Object {
11
20
  * 添加产品类型
12
21
  * @param productName 产品名称
13
22
  */
14
- async add(productName) {
15
- const axios = await this.context.ready;
16
- const factory = await this.context.user.getSelectedFarm();
17
- return axios.post('/api/v3/production/add', {
18
- product_name: productName,
19
- factory_id: factory.id
23
+ add(productName) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const axios = yield this.context.ready;
26
+ const factory = yield this.context.user.getSelectedFarm();
27
+ return axios.post('/api/v3/production/add', {
28
+ product_name: productName,
29
+ factory_id: factory.id
30
+ });
20
31
  });
21
32
  }
22
33
  /**
23
34
  * 获取所有产品类型列表
24
35
  */
25
- async list() {
26
- const axios = await this.context.ready;
27
- const factory = await this.context.user.getSelectedFarm();
28
- return axios.get(`/api/v3/production/list/${factory.id}`);
36
+ list() {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const axios = yield this.context.ready;
39
+ const factory = yield this.context.user.getSelectedFarm();
40
+ return axios.get(`/api/v3/production/list/${factory.id}`);
41
+ });
29
42
  }
30
43
  get stat() {
31
44
  return {
32
- get: async (type, period, factoryId) => {
45
+ get: (type, period, factoryId) => __awaiter(this, void 0, void 0, function* () {
33
46
  if (!factoryId) {
34
- const factory = await this.context.user.getSelectedFarm();
47
+ const factory = yield this.context.user.getSelectedFarm();
35
48
  factoryId = factory.id;
36
49
  }
37
- const axios = await this.context.ready;
50
+ const axios = yield this.context.ready;
38
51
  return axios.get(`/api/v3/production/stat/${type}/${period}`, {
39
52
  params: {
40
53
  factory_id: factoryId
41
54
  }
42
55
  });
43
- },
44
- create: async (request) => {
56
+ }),
57
+ create: (request) => __awaiter(this, void 0, void 0, function* () {
45
58
  if (!request.factory_id) {
46
- const factory = await this.context.user.getSelectedFarm();
59
+ const factory = yield this.context.user.getSelectedFarm();
47
60
  request.factory_id = factory.id;
48
61
  }
49
- const axios = await this.context.ready;
62
+ const axios = yield this.context.ready;
50
63
  return axios.post('/api/v3/production/stat', request);
51
- }
64
+ })
52
65
  };
53
66
  }
54
67
  }
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProjectGateway = void 0;
4
13
  class ProjectGateway extends Object {
@@ -70,10 +79,10 @@ class ProjectGateway extends Object {
70
79
  get attendance() {
71
80
  return {
72
81
  // 获取考勤列表
73
- list: async (projectId) => {
74
- var axios = await this.context.ready;
82
+ list: (projectId) => __awaiter(this, void 0, void 0, function* () {
83
+ var axios = yield this.context.ready;
75
84
  return axios.get(`/api/v2/coremde-sale/project/attendance/get?id=${projectId}`);
76
- },
85
+ }),
77
86
  };
78
87
  }
79
88
  get constructionTeam() {
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.PurchaseGateway = void 0;
4
13
  class PurchaseGateway {
@@ -12,99 +21,125 @@ class PurchaseGateway {
12
21
  * 技术部创建采购单
13
22
  * @param params 采购单参数
14
23
  */
15
- async create(params) {
16
- return this.axios.post("/api/v2/coremde-sale/purchase/order/create", params);
24
+ create(params) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ return this.axios.post("/api/v2/coremde-sale/purchase/order/create", params);
27
+ });
17
28
  }
18
29
  /**
19
30
  * 商务部审核采购单
20
31
  * @param params 审核参数
21
32
  */
22
- async approve(params) {
23
- return this.axios.post("/api/v2/coremde-sale/purchase/order/approve", params);
33
+ approve(params) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ return this.axios.post("/api/v2/coremde-sale/purchase/order/approve", params);
36
+ });
24
37
  }
25
38
  /**
26
39
  * 技术部更新采购单
27
40
  * @param params 更新参数
28
41
  */
29
- async update(params) {
30
- return this.axios.post("/api/v2/coremde-sale/purchase/order/update", params);
42
+ update(params) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return this.axios.post("/api/v2/coremde-sale/purchase/order/update", params);
45
+ });
31
46
  }
32
47
  /**
33
48
  * 获取采购单列表
34
49
  * @param params 查询参数
35
50
  */
36
- async list(params) {
37
- return this.axios.post("/api/v2/coremde-sale/purchase/order/list", params);
51
+ list(params) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ return this.axios.post("/api/v2/coremde-sale/purchase/order/list", params);
54
+ });
38
55
  }
39
56
  /**
40
57
  * 获取采购单详情
41
58
  * @param id 采购单ID
42
59
  */
43
- async get(id) {
44
- return this.axios.get("/api/v2/coremde-sale/purchase/order/get", {
45
- params: { id }
60
+ get(id) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return this.axios.get("/api/v2/coremde-sale/purchase/order/get", {
63
+ params: { id }
64
+ });
46
65
  });
47
66
  }
48
67
  /**
49
68
  * 创建采购配置单
50
69
  * @param params 配置单参数
51
70
  */
52
- async createBomConfig(params) {
53
- return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/create", params);
71
+ createBomConfig(params) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/create", params);
74
+ });
54
75
  }
55
76
  /**
56
77
  * 获取采购配置单列表
57
78
  * @param params 查询参数
58
79
  */
59
- async listBomConfig(params) {
60
- return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/list", params);
80
+ listBomConfig(params) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/list", params);
83
+ });
61
84
  }
62
85
  /**
63
86
  * 获取采购配置单详情
64
87
  * @param id 配置单ID
65
88
  */
66
- async getBomConfig(id) {
67
- return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/get", {
68
- params: { id }
89
+ getBomConfig(id) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/get", {
92
+ params: { id }
93
+ });
69
94
  });
70
95
  }
71
96
  /**
72
97
  * 提交采购配置单变更申请
73
98
  * @param params 变更参数
74
99
  */
75
- async applyBomConfigAdjust(params) {
76
- return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/adjust/apply", params);
100
+ applyBomConfigAdjust(params) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/adjust/apply", params);
103
+ });
77
104
  }
78
105
  /**
79
106
  * 审核采购配置单变更申请
80
107
  * @param params 审核参数
81
108
  */
82
- async approveBomConfigAdjust(params) {
83
- return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/adjust/apply/approve", params);
109
+ approveBomConfigAdjust(params) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/adjust/apply/approve", params);
112
+ });
84
113
  }
85
114
  /**
86
115
  * 获取采购配置单变更记录列表
87
116
  * @param params 查询参数
88
117
  */
89
- async listBomConfigAdjust(params) {
90
- return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/adjust/apply/list", params);
118
+ listBomConfigAdjust(params) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ return this.axios.post("/api/v2/coremde-sale/purchase/bom-config/adjust/apply/list", params);
121
+ });
91
122
  }
92
123
  /**
93
124
  * 获取采购配置单变更记录详情
94
125
  * @param id 变更记录ID
95
126
  */
96
- async getBomConfigAdjust(id) {
97
- return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/adjust/apply/get", {
98
- params: { id }
127
+ getBomConfigAdjust(id) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/adjust/apply/get", {
130
+ params: { id }
131
+ });
99
132
  });
100
133
  }
101
134
  /**
102
135
  * 获取项目采购汇总清单
103
136
  * @param id 项目ID
104
137
  */
105
- async getBomConfigSummary(id) {
106
- return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/summary", {
107
- params: { id }
138
+ getBomConfigSummary(id) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/summary", {
141
+ params: { id }
142
+ });
108
143
  });
109
144
  }
110
145
  /**
@@ -116,32 +151,32 @@ class PurchaseGateway {
116
151
  * 获取采购变更单列表
117
152
  * @param params 查询参数
118
153
  */
119
- list: async (params) => {
154
+ list: (params) => __awaiter(this, void 0, void 0, function* () {
120
155
  return this.axios.post("/api/v2/coremde-sale/purchase/adjust/list", params);
121
- },
156
+ }),
122
157
  /**
123
158
  * 获取采购变更单详情
124
159
  * @param id 变更单ID
125
160
  */
126
- get: async (id) => {
161
+ get: (id) => __awaiter(this, void 0, void 0, function* () {
127
162
  return this.axios.get("/api/v2/coremde-sale/purchase/adjust/get", {
128
163
  params: { id }
129
164
  });
130
- },
165
+ }),
131
166
  /**
132
167
  * 提交采购变更申请
133
168
  * @param params 变更申请参数
134
169
  */
135
- apply: async (params) => {
170
+ apply: (params) => __awaiter(this, void 0, void 0, function* () {
136
171
  return this.axios.post("/api/v2/coremde-sale/purchase/adjust/apply", params);
137
- },
172
+ }),
138
173
  /**
139
174
  * 更新采购变更单
140
175
  * @param params 更新参数
141
176
  */
142
- update: async (params) => {
177
+ update: (params) => __awaiter(this, void 0, void 0, function* () {
143
178
  return this.axios.post("/api/v2/coremde-sale/purchase/adjust/update", params);
144
- }
179
+ })
145
180
  };
146
181
  }
147
182
  }