@cpzxrobot/sdk 1.1.48 → 1.1.50
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/index.js +2 -4
- package/dist/user_gateway.js +6 -0
- package/index.ts +4 -3
- package/package.json +1 -1
- package/readme.md +1 -0
- package/user_gateway.ts +13 -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/approval`, {
|
|
47
|
+
contractId,
|
|
48
|
+
agree,
|
|
49
|
+
audit_info,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
}
|
package/dist/index.js
CHANGED
|
@@ -82,10 +82,8 @@ class Cpzxrobot {
|
|
|
82
82
|
});
|
|
83
83
|
// @ts-ignore
|
|
84
84
|
instance.getAndSave = (url, data, fileName) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
params: data,
|
|
88
|
-
}).then((res) => {
|
|
85
|
+
var args = Object.assign({ responseType: "blob" }, data);
|
|
86
|
+
return instance.get(url, args).then((res) => {
|
|
89
87
|
this.saveBlob(res.data, fileName || "file");
|
|
90
88
|
});
|
|
91
89
|
};
|
package/dist/user_gateway.js
CHANGED
|
@@ -172,6 +172,12 @@ class UserGateway extends Object {
|
|
|
172
172
|
yearMonth
|
|
173
173
|
});
|
|
174
174
|
});
|
|
175
|
+
},
|
|
176
|
+
//获取打卡详情
|
|
177
|
+
get: (id) => {
|
|
178
|
+
return this.context.ready.then((axios) => {
|
|
179
|
+
return axios.get(`/api/v2/coremde-sale/checkin/get?id=${id}`);
|
|
180
|
+
});
|
|
175
181
|
}
|
|
176
182
|
};
|
|
177
183
|
}
|
package/index.ts
CHANGED
|
@@ -114,10 +114,11 @@ export class Cpzxrobot {
|
|
|
114
114
|
);
|
|
115
115
|
// @ts-ignore
|
|
116
116
|
instance.getAndSave = (url: string, data?: any, fileName?: string) => {
|
|
117
|
-
|
|
117
|
+
var args = {
|
|
118
118
|
responseType: "blob",
|
|
119
|
-
|
|
120
|
-
}
|
|
119
|
+
...data,
|
|
120
|
+
};
|
|
121
|
+
return instance.get(url, args).then((res) => {
|
|
121
122
|
this.saveBlob(res.data, fileName || "file");
|
|
122
123
|
});
|
|
123
124
|
}
|
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,
|
|
@@ -194,6 +199,12 @@ export class UserGateway extends Object {
|
|
|
194
199
|
yearMonth
|
|
195
200
|
});
|
|
196
201
|
});
|
|
202
|
+
},
|
|
203
|
+
//获取打卡详情
|
|
204
|
+
get: (id: number) => {
|
|
205
|
+
return this.context.ready.then((axios) => {
|
|
206
|
+
return axios.get(`/api/v2/coremde-sale/checkin/get?id=${id}`);
|
|
207
|
+
});
|
|
197
208
|
}
|
|
198
209
|
};
|
|
199
210
|
}
|