@cpzxrobot/sdk 1.3.37 → 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.
@@ -107,5 +107,35 @@ class PurchaseGateway {
107
107
  params: { id }
108
108
  });
109
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
+ }
110
140
  }
111
141
  exports.PurchaseGateway = PurchaseGateway;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.37",
3
+ "version": "1.3.38",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -197,4 +197,59 @@ export class PurchaseGateway {
197
197
  params: { id }
198
198
  });
199
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
+ }
200
255
  }