@cpzxrobot/sdk 1.2.3 → 1.2.5
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/customer_gateway.ts +34 -2
- package/dist/customer_gateway.js +26 -1
- package/dist/transport_gateway.js +14 -0
- package/package.json +1 -1
- package/readme.md +5 -0
- package/transport_gateway.ts +14 -0
package/customer_gateway.ts
CHANGED
|
@@ -22,7 +22,6 @@ export class CustomerGateway extends Object {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
listV2(args: any) {
|
|
25
|
-
|
|
26
25
|
return this.context.ready.then((axios) => {
|
|
27
26
|
return axios.post(`/api/v2/coremde-sale/customer/list/v2`, args);
|
|
28
27
|
});
|
|
@@ -53,6 +52,12 @@ export class CustomerGateway extends Object {
|
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
|
|
55
|
+
delete(id: number) {
|
|
56
|
+
return this.context.ready.then((axios) => {
|
|
57
|
+
return axios.get(`/api/v2/coremde-sale/customer/delete?id=${id}`);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
56
61
|
accountManager(customerId: number, pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) {
|
|
57
62
|
return this.context.ready.then((axios) => {
|
|
58
63
|
var params = {
|
|
@@ -100,6 +105,14 @@ export class CustomerGateway extends Object {
|
|
|
100
105
|
);
|
|
101
106
|
});
|
|
102
107
|
},
|
|
108
|
+
list: (args: any) => {
|
|
109
|
+
return this.context.ready.then((axios) => {
|
|
110
|
+
return axios.post(
|
|
111
|
+
`/api/v2/coremde-sale/customer/visit/list`,
|
|
112
|
+
args,
|
|
113
|
+
);
|
|
114
|
+
});
|
|
115
|
+
},
|
|
103
116
|
}
|
|
104
117
|
}
|
|
105
118
|
|
|
@@ -113,6 +126,16 @@ export class CustomerGateway extends Object {
|
|
|
113
126
|
}
|
|
114
127
|
}
|
|
115
128
|
|
|
129
|
+
get count() {
|
|
130
|
+
return {
|
|
131
|
+
byStatus: (companyId: Number) => {
|
|
132
|
+
return this.context.ready.then((axios) => {
|
|
133
|
+
return axios.get(`/api/v2/coremde-sale/customer/status/list-count?companyId=${companyId}`);
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
116
139
|
//获得客户状态列表
|
|
117
140
|
status() {
|
|
118
141
|
return this.context.ready.then((axios) => {
|
|
@@ -120,10 +143,19 @@ export class CustomerGateway extends Object {
|
|
|
120
143
|
});
|
|
121
144
|
}
|
|
122
145
|
|
|
146
|
+
|
|
147
|
+
|
|
123
148
|
//获得客户类型列表
|
|
124
149
|
types() {
|
|
125
150
|
return this.context.ready.then((axios) => {
|
|
126
|
-
return axios.get(`/api/v2/coremde-sale/customer/
|
|
151
|
+
return axios.get(`/api/v2/coremde-sale/customer/type/list`);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//获取客户类别列表
|
|
156
|
+
categories() {
|
|
157
|
+
return this.context.ready.then((axios) => {
|
|
158
|
+
return axios.get(`/api/v2/coremde-sale/customer/category/list`);
|
|
127
159
|
});
|
|
128
160
|
}
|
|
129
161
|
|
package/dist/customer_gateway.js
CHANGED
|
@@ -37,6 +37,11 @@ class CustomerGateway extends Object {
|
|
|
37
37
|
return axios.post(`/api/v2/coremde-sale/customer/update`, args);
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
+
delete(id) {
|
|
41
|
+
return this.context.ready.then((axios) => {
|
|
42
|
+
return axios.get(`/api/v2/coremde-sale/customer/delete?id=${id}`);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
40
45
|
accountManager(customerId, pageNo = undefined, pageSize = undefined) {
|
|
41
46
|
return this.context.ready.then((axios) => {
|
|
42
47
|
var params = {
|
|
@@ -71,6 +76,11 @@ class CustomerGateway extends Object {
|
|
|
71
76
|
return axios.get(`/api/v2/coremde-sale/customer/visit/get?id=${id}`);
|
|
72
77
|
});
|
|
73
78
|
},
|
|
79
|
+
list: (args) => {
|
|
80
|
+
return this.context.ready.then((axios) => {
|
|
81
|
+
return axios.post(`/api/v2/coremde-sale/customer/visit/list`, args);
|
|
82
|
+
});
|
|
83
|
+
},
|
|
74
84
|
};
|
|
75
85
|
}
|
|
76
86
|
get stat() {
|
|
@@ -82,6 +92,15 @@ class CustomerGateway extends Object {
|
|
|
82
92
|
},
|
|
83
93
|
};
|
|
84
94
|
}
|
|
95
|
+
get count() {
|
|
96
|
+
return {
|
|
97
|
+
byStatus: (companyId) => {
|
|
98
|
+
return this.context.ready.then((axios) => {
|
|
99
|
+
return axios.get(`/api/v2/coremde-sale/customer/status/list-count?companyId=${companyId}`);
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
85
104
|
//获得客户状态列表
|
|
86
105
|
status() {
|
|
87
106
|
return this.context.ready.then((axios) => {
|
|
@@ -91,7 +110,13 @@ class CustomerGateway extends Object {
|
|
|
91
110
|
//获得客户类型列表
|
|
92
111
|
types() {
|
|
93
112
|
return this.context.ready.then((axios) => {
|
|
94
|
-
return axios.get(`/api/v2/coremde-sale/customer/
|
|
113
|
+
return axios.get(`/api/v2/coremde-sale/customer/type/list`);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//获取客户类别列表
|
|
117
|
+
categories() {
|
|
118
|
+
return this.context.ready.then((axios) => {
|
|
119
|
+
return axios.get(`/api/v2/coremde-sale/customer/category/list`);
|
|
95
120
|
});
|
|
96
121
|
}
|
|
97
122
|
}
|
|
@@ -100,6 +100,20 @@ class TransportGateway extends Object {
|
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
102
|
},
|
|
103
|
+
delete: (id) => {
|
|
104
|
+
return this.context.ready.then(() => {
|
|
105
|
+
return this.context.axios
|
|
106
|
+
.get("/api/v2/pigfarm/feedTower/fodder/delete", {
|
|
107
|
+
params: { id }
|
|
108
|
+
})
|
|
109
|
+
.then((res) => {
|
|
110
|
+
if (res.data.code != 200) {
|
|
111
|
+
throw res.data.message;
|
|
112
|
+
}
|
|
113
|
+
return res.data;
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
},
|
|
103
117
|
};
|
|
104
118
|
}
|
|
105
119
|
}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -103,6 +103,7 @@ baseURL: "/"
|
|
|
103
103
|
| cpzxrobot().factory.workshop.delete | 删除车间信息,需要传入id参数 |
|
|
104
104
|
| cpzxrobot().factory.batch.list | 获得批次列表,传入factoryId参数 |ldiba
|
|
105
105
|
| cpzxrobot().transport.fodder.getDeviceByFodderld | 获得料单对应的设备 |
|
|
106
|
+
| cpzxrobot().transport.fodder.delete | 删除饲料信息,需要传入id参数 |
|
|
106
107
|
| cpzxrobot().pigfarm.heatlamp.xxx | 操作保温灯 |
|
|
107
108
|
| cpzxrobot().pigfarm.weightMeter.config.list | 获取称重计的配置信息 |
|
|
108
109
|
| cpzxrobot().pigfarm.weightMeter.config.bind | 添加称重计的配置信息,绑定到料塔 |
|
|
@@ -219,8 +220,12 @@ baseURL: "/"
|
|
|
219
220
|
| cpzxrobot().customer.stat.china | 获得客户在全国的统计信息 |
|
|
220
221
|
| cpzxrobot().customer.listByProvince | 获得客户在某个省的统计信息,传入province参数 |
|
|
221
222
|
| cpzxrobot().customer.accountManager | 获得客户对应的销售员 |
|
|
223
|
+
| cpzxrobot().customer.delete | 删除客户,传入id参数 |
|
|
222
224
|
| cpzxrobot().customer.types | 获得客户类型列表 |
|
|
223
225
|
| cpzxrobot().customer.status | 获得客户状态列表 |
|
|
226
|
+
| cpzxrobot().customer.categories | 获得客户类别列表 |
|
|
227
|
+
| cpzxrobot().customer.count.byStatus | 获取客户状态列表及各状态下的客户数量 |
|
|
228
|
+
| cpzxrobot().customer.visit.list | 获取客户拜访列表 |
|
|
224
229
|
| cpzxrobot().company.list | 获得公司列表,传入必要的分页参数 |
|
|
225
230
|
| cpzxrobot().company.rank.byRevenue | 按公司营收获取排名,传入必要的分页参数 |
|
|
226
231
|
| cpzxrobot().company.rank.byProfit | 按公司利润获取排名,传入必要的分页参数 |
|
package/transport_gateway.ts
CHANGED
|
@@ -116,6 +116,20 @@ export class TransportGateway extends Object {
|
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
118
|
},
|
|
119
|
+
delete: (id: number): Promise<any> => {
|
|
120
|
+
return this.context.ready.then(() => {
|
|
121
|
+
return this.context.axios
|
|
122
|
+
.get("/api/v2/pigfarm/feedTower/fodder/delete", {
|
|
123
|
+
params: { id }
|
|
124
|
+
})
|
|
125
|
+
.then((res) => {
|
|
126
|
+
if (res.data.code != 200) {
|
|
127
|
+
throw res.data.message;
|
|
128
|
+
}
|
|
129
|
+
return res.data;
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
},
|
|
119
133
|
};
|
|
120
134
|
}
|
|
121
135
|
}
|