@cpzxrobot/sdk 1.2.43 → 1.2.44
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/product_gateway.js +15 -0
- package/package.json +1 -1
- package/product_gateway.ts +45 -0
package/dist/product_gateway.js
CHANGED
|
@@ -87,5 +87,20 @@ class ProductGateway extends Object {
|
|
|
87
87
|
},
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
+
add(args) {
|
|
91
|
+
return this.context.ready.then((axios) => {
|
|
92
|
+
return axios.post(`/api/v2/coremde-sale/product/add`, args);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
update(args) {
|
|
96
|
+
return this.context.ready.then((axios) => {
|
|
97
|
+
return axios.post(`/api/v2/coremde-sale/product/update`, args);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
deleteProduct(id) {
|
|
101
|
+
return this.context.ready.then((axios) => {
|
|
102
|
+
return axios.get(`/api/v2/coremde-sale/product/delete?id=${id}`);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
90
105
|
}
|
|
91
106
|
exports.ProductGateway = ProductGateway;
|
package/package.json
CHANGED
package/product_gateway.ts
CHANGED
|
@@ -137,4 +137,49 @@ export class ProductGateway extends Object {
|
|
|
137
137
|
},
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
add(args: {
|
|
142
|
+
name: string;
|
|
143
|
+
unit: string;
|
|
144
|
+
cost: number;
|
|
145
|
+
price: number;
|
|
146
|
+
factoryId: number;
|
|
147
|
+
productTypeId: number;
|
|
148
|
+
deliveryDate: number;
|
|
149
|
+
depotQty: number;
|
|
150
|
+
model: string;
|
|
151
|
+
materialCode: string;
|
|
152
|
+
remark: string;
|
|
153
|
+
groupId: number;
|
|
154
|
+
}) {
|
|
155
|
+
return this.context.ready.then((axios) => {
|
|
156
|
+
return axios.post(`/api/v2/coremde-sale/product/add`, args);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
update(args: {
|
|
161
|
+
id: number;
|
|
162
|
+
name: string;
|
|
163
|
+
unit: string;
|
|
164
|
+
cost: number;
|
|
165
|
+
price: number;
|
|
166
|
+
factoryId: number;
|
|
167
|
+
productTypeId: number;
|
|
168
|
+
deliveryDate: number;
|
|
169
|
+
depotQty: number;
|
|
170
|
+
model: string;
|
|
171
|
+
materialCode: string;
|
|
172
|
+
remark: string;
|
|
173
|
+
groupId: number;
|
|
174
|
+
}) {
|
|
175
|
+
return this.context.ready.then((axios) => {
|
|
176
|
+
return axios.post(`/api/v2/coremde-sale/product/update`, args);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
deleteProduct(id: number) {
|
|
181
|
+
return this.context.ready.then((axios) => {
|
|
182
|
+
return axios.get(`/api/v2/coremde-sale/product/delete?id=${id}`);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
140
185
|
}
|