@cpzxrobot/sdk 1.1.49 → 1.1.51
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/contract_gateway.ts +10 -0
- package/dist/contract_gateway.js +9 -0
- package/dist/user_gateway.js +5 -0
- package/package.json +1 -1
- package/readme.md +1 -0
- package/user_gateway.ts +7 -2
package/contract_gateway.ts
CHANGED
|
@@ -41,4 +41,14 @@ export class ContractGateway extends Object {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
approval(contractId: number, agree: 1 | 0, audit_info: string) {
|
|
45
|
+
return this.context.ready.then((axios) => {
|
|
46
|
+
return axios.post(`/api/v2/coremde-sale/contract/approve`, {
|
|
47
|
+
contractId,
|
|
48
|
+
agree,
|
|
49
|
+
audit_info,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
}
|
package/dist/contract_gateway.js
CHANGED
|
@@ -30,5 +30,14 @@ class ContractGateway extends Object {
|
|
|
30
30
|
}, filename);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
approval(contractId, agree, audit_info) {
|
|
34
|
+
return this.context.ready.then((axios) => {
|
|
35
|
+
return axios.post(`/api/v2/coremde-sale/contract/approve`, {
|
|
36
|
+
contractId,
|
|
37
|
+
agree,
|
|
38
|
+
audit_info,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
33
42
|
}
|
|
34
43
|
exports.ContractGateway = ContractGateway;
|
package/dist/user_gateway.js
CHANGED
|
@@ -146,6 +146,11 @@ class UserGateway extends Object {
|
|
|
146
146
|
userId: id
|
|
147
147
|
});
|
|
148
148
|
});
|
|
149
|
+
},
|
|
150
|
+
submits: (id) => {
|
|
151
|
+
return this.context.ready.then((axios) => {
|
|
152
|
+
return axios.get(`/api/v2/coremde-sale/approval/submit/list?userId=${id}`);
|
|
153
|
+
});
|
|
149
154
|
}
|
|
150
155
|
};
|
|
151
156
|
}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -180,6 +180,7 @@ baseURL: "/"
|
|
|
180
180
|
| cpzxrobot().contract.get | 获得合同信息,传入id参数 |
|
|
181
181
|
| cpzxrobot().contract.add | 添加合同 |
|
|
182
182
|
| cpzxrobot().contract.export | 导出合同信息,建议传入自定义文件名,否则默认文件名 |
|
|
183
|
+
| cpzxrobot().contract.approval | 审批合同,传入id参数和审批意见 |
|
|
183
184
|
| cpzxrobot().customer.list | 获得客户列表,传入factory_id和必要的分页参数 |
|
|
184
185
|
| cpzxrobot().customer.get | 获得客户信息,传入id参数 |
|
|
185
186
|
| cpzxrobot().customer.add | 添加客户 |
|
package/user_gateway.ts
CHANGED
|
@@ -116,7 +116,7 @@ export class UserGateway extends Object {
|
|
|
116
116
|
return axios.get("/api/v2/" + factory.id + "/users");
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
|
|
120
120
|
listByProvince(area_code: string) {
|
|
121
121
|
return this.context.ready.then((axios) => {
|
|
122
122
|
return axios.get(`/api/v2/coremde-sale/user/province/get?area_code=${area_code}`);
|
|
@@ -161,13 +161,18 @@ export class UserGateway extends Object {
|
|
|
161
161
|
userId: id
|
|
162
162
|
});
|
|
163
163
|
});
|
|
164
|
+
},
|
|
165
|
+
submits: (id: number) => {
|
|
166
|
+
return this.context.ready.then((axios) => {
|
|
167
|
+
return axios.get(`/api/v2/coremde-sale/approval/submit/list?userId=${id}`);
|
|
168
|
+
});
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
get checkin() {
|
|
169
174
|
return {
|
|
170
|
-
add: (args:{
|
|
175
|
+
add: (args: {
|
|
171
176
|
userId: number,
|
|
172
177
|
address: string,
|
|
173
178
|
areaCode: string,
|