@cpzxrobot/sdk 1.3.36 → 1.3.38

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.
@@ -98,5 +98,44 @@ class PurchaseGateway {
98
98
  params: { id }
99
99
  });
100
100
  }
101
+ /**
102
+ * 获取项目采购汇总清单
103
+ * @param id 项目ID
104
+ */
105
+ async getBomConfigSummary(id) {
106
+ return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/summary", {
107
+ params: { id }
108
+ });
109
+ }
110
+ /**
111
+ * 采购变更相关接口
112
+ */
113
+ get adjust() {
114
+ return {
115
+ /**
116
+ * 获取采购变更单列表
117
+ * @param params 查询参数
118
+ */
119
+ list: async (params) => {
120
+ return this.axios.post("/api/v2/coremde-sale/purchase/adjust/list", params);
121
+ },
122
+ /**
123
+ * 获取采购变更单详情
124
+ * @param id 变更单ID
125
+ */
126
+ get: async (id) => {
127
+ return this.axios.get("/api/v2/coremde-sale/purchase/adjust/get", {
128
+ params: { id }
129
+ });
130
+ },
131
+ /**
132
+ * 提交采购变更申请
133
+ * @param params 变更申请参数
134
+ */
135
+ apply: async (params) => {
136
+ return this.axios.post("/api/v2/coremde-sale/purchase/adjust/apply", params);
137
+ }
138
+ };
139
+ }
101
140
  }
102
141
  exports.PurchaseGateway = PurchaseGateway;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.36",
3
+ "version": "1.3.38",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -187,4 +187,69 @@ export class PurchaseGateway {
187
187
  params: { id }
188
188
  });
189
189
  }
190
+
191
+ /**
192
+ * 获取项目采购汇总清单
193
+ * @param id 项目ID
194
+ */
195
+ async getBomConfigSummary(id: number) {
196
+ return this.axios.get("/api/v2/coremde-sale/purchase/bom-config/summary", {
197
+ params: { id }
198
+ });
199
+ }
200
+
201
+ /**
202
+ * 采购变更相关接口
203
+ */
204
+ get adjust() {
205
+ return {
206
+ /**
207
+ * 获取采购变更单列表
208
+ * @param params 查询参数
209
+ */
210
+ list: async (params: {
211
+ pageNo?: number;
212
+ pageSize?: number;
213
+ purchaseOrderProjectId?: number;
214
+ }) => {
215
+ return this.axios.post("/api/v2/coremde-sale/purchase/adjust/list", params);
216
+ },
217
+
218
+ /**
219
+ * 获取采购变更单详情
220
+ * @param id 变更单ID
221
+ */
222
+ get: async (id: number) => {
223
+ return this.axios.get("/api/v2/coremde-sale/purchase/adjust/get", {
224
+ params: { id }
225
+ });
226
+ },
227
+
228
+ /**
229
+ * 提交采购变更申请
230
+ * @param params 变更申请参数
231
+ */
232
+ apply: async (params: {
233
+ projectId: number;
234
+ contractId?: number;
235
+ purchaseOrderProjectId: number;
236
+ purchaseAdjustDetailList: Array<{
237
+ productId: number;
238
+ productName: string;
239
+ qtyBefore: number;
240
+ qtyAfter: number;
241
+ model: string;
242
+ materialCode: string;
243
+ unit: string;
244
+ price: string;
245
+ cost: string;
246
+ taxRate: string;
247
+ disinfection: string;
248
+ remark?: string;
249
+ }>;
250
+ }) => {
251
+ return this.axios.post("/api/v2/coremde-sale/purchase/adjust/apply", params);
252
+ }
253
+ };
254
+ }
190
255
  }