@cpzxrobot/sdk 1.2.22 → 1.2.24

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.
@@ -73,12 +73,12 @@ export class CustomerGateway extends Object {
73
73
  });
74
74
  }
75
75
 
76
- ///contact/list
77
- contact(id: number) {
78
- return this.context.ready.then((axios) => {
79
- return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
80
- });
81
- }
76
+ // ///contact/list
77
+ // contact(id: number) {
78
+ // return this.context.ready.then((axios) => {
79
+ // return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
80
+ // });
81
+ // }
82
82
 
83
83
  get visit() {
84
84
  return {
@@ -200,4 +200,39 @@ export class CustomerGateway extends Object {
200
200
  });
201
201
  }
202
202
 
203
+ // 联系人管理
204
+ get contact() {
205
+ return {
206
+ // 新增联系人
207
+ add: (args: {
208
+ contactName: string;
209
+ contactPhone: string;
210
+ position: string;
211
+ customerId: number;
212
+ }) => {
213
+ return this.context.ready.then((axios) => {
214
+ return axios.post(`/api/v2/coremde-sale/customer/contact/add`, args);
215
+ });
216
+ },
217
+ // 修改联系人
218
+ update: (args: {
219
+ contactName: string;
220
+ contactPhone: string;
221
+ position: string;
222
+ id: number;
223
+ }) => {
224
+ return this.context.ready.then((axios) => {
225
+ return axios.post(`/api/v2/coremde-sale/customer/contact/update`, args);
226
+ });
227
+ },
228
+ // 删除联系人
229
+ delete: (args: {
230
+ id: number;
231
+ }) => {
232
+ return this.context.ready.then((axios) => {
233
+ return axios.post(`/api/v2/coremde-sale/customer/contact/delete`, args);
234
+ });
235
+ }
236
+ }
237
+ }
203
238
  }
@@ -54,12 +54,12 @@ class CustomerGateway extends Object {
54
54
  });
55
55
  });
56
56
  }
57
- ///contact/list
58
- contact(id) {
59
- return this.context.ready.then((axios) => {
60
- return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
61
- });
62
- }
57
+ // ///contact/list
58
+ // contact(id: number) {
59
+ // return this.context.ready.then((axios) => {
60
+ // return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
61
+ // });
62
+ // }
63
63
  get visit() {
64
64
  return {
65
65
  add: (args) => {
@@ -146,5 +146,28 @@ class CustomerGateway extends Object {
146
146
  return axios.get(`/api/v2/coremde-sale/customer/category/list`);
147
147
  });
148
148
  }
149
+ // 联系人管理
150
+ get contact() {
151
+ return {
152
+ // 新增联系人
153
+ add: (args) => {
154
+ return this.context.ready.then((axios) => {
155
+ return axios.post(`/api/v2/coremde-sale/customer/contact/add`, args);
156
+ });
157
+ },
158
+ // 修改联系人
159
+ update: (args) => {
160
+ return this.context.ready.then((axios) => {
161
+ return axios.post(`/api/v2/coremde-sale/customer/contact/update`, args);
162
+ });
163
+ },
164
+ // 删除联系人
165
+ delete: (args) => {
166
+ return this.context.ready.then((axios) => {
167
+ return axios.post(`/api/v2/coremde-sale/customer/contact/delete`, args);
168
+ });
169
+ }
170
+ };
171
+ }
149
172
  }
150
173
  exports.CustomerGateway = CustomerGateway;
@@ -126,6 +126,24 @@ class ProjectGateway extends Object {
126
126
  return axios.get(`/api/v2/coremde-sale/project/province/get?area_code=${area_code}`);
127
127
  });
128
128
  }
129
+ // 新增项目
130
+ add(projectData) {
131
+ return this.context.ready.then((axios) => {
132
+ return axios.post(`/api/v2/coremde-sale/project/add`, projectData);
133
+ });
134
+ }
135
+ // 更新项目
136
+ update(projectData) {
137
+ return this.context.ready.then((axios) => {
138
+ return axios.post(`/api/v2/coremde-sale/project/update`, projectData);
139
+ });
140
+ }
141
+ // 删除项目
142
+ delete(id) {
143
+ return this.context.ready.then((axios) => {
144
+ return axios.get(`/api/v2/coremde-sale/project/delete?id=${id}`);
145
+ });
146
+ }
129
147
  get inquiry() {
130
148
  return {
131
149
  // 获取询价列表
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.22",
3
+ "version": "1.2.24",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -162,6 +162,27 @@ export class ProjectGateway extends Object {
162
162
  });
163
163
  }
164
164
 
165
+ // 新增项目
166
+ add(projectData: any) {
167
+ return this.context.ready.then((axios) => {
168
+ return axios.post(`/api/v2/coremde-sale/project/add`, projectData);
169
+ });
170
+ }
171
+
172
+ // 更新项目
173
+ update(projectData: any) {
174
+ return this.context.ready.then((axios) => {
175
+ return axios.post(`/api/v2/coremde-sale/project/update`, projectData);
176
+ });
177
+ }
178
+
179
+ // 删除项目
180
+ delete(id: number) {
181
+ return this.context.ready.then((axios) => {
182
+ return axios.get(`/api/v2/coremde-sale/project/delete?id=${id}`);
183
+ });
184
+ }
185
+
165
186
  get inquiry() {
166
187
  return {
167
188
  // 获取询价列表
package/readme.md CHANGED
@@ -485,6 +485,76 @@ cpzxrobot().project.list({
485
485
  // 获取项目详情
486
486
  cpzxrobot().project.get(projectId)
487
487
 
488
+ // 新增项目
489
+ cpzxrobot().project.add({
490
+ projectCode: string, // 项目代码
491
+ projectName: string, // 项目名称
492
+ description: string, // 项目描述
493
+ image: string, // 项目图片
494
+ type: number, // 项目类型
495
+ scale: string, // 项目规模
496
+ amount: number, // 项目金额
497
+ principalId: number, // 负责人ID
498
+ startDate: string, // 开始日期(YYYY-MM-DD)
499
+ workDate: string, // 工作日期(YYYY-MM-DD)
500
+ endDate: string, // 结束日期(YYYY-MM-DD)
501
+ customerId: number, // 客户ID
502
+ progressPercentage: string, // 进度百分比
503
+ projectProgress: number, // 项目进度
504
+ projectPayment: number, // 项目付款
505
+ activeFlag: number, // 激活标志
506
+ fileId: number, // 文件ID
507
+ icpRecordNumber: string, // ICP备案号
508
+ supervise: string, // 监督人
509
+ supervisePhone: string, // 监督电话
510
+ areaCode: number, // 区域代码
511
+ address: string, // 地址
512
+ lat: string, // 纬度
513
+ lng: string, // 经度
514
+ budget: number, // 预算
515
+ expectedTransactionTime: string, // 预计交易时间
516
+ currentStage: string, // 当前阶段
517
+ customerContactId: number, // 客户联系人ID
518
+ projectStageId: number // 项目阶段ID
519
+ })
520
+
521
+ // 更新项目
522
+ cpzxrobot().project.update({
523
+ id: number, // 项目ID
524
+ projectCode: string, // 项目代码
525
+ projectName: string, // 项目名称
526
+ description: string, // 项目描述
527
+ image: string, // 项目图片
528
+ type: number, // 项目类型
529
+ scale: string, // 项目规模
530
+ amount: number, // 项目金额
531
+ principalId: number, // 负责人ID
532
+ startDate: string, // 开始日期(YYYY-MM-DD)
533
+ workDate: string, // 工作日期(YYYY-MM-DD)
534
+ endDate: string, // 结束日期(YYYY-MM-DD)
535
+ customerId: number, // 客户ID
536
+ progressPercentage: string, // 进度百分比
537
+ projectProgress: number, // 项目进度
538
+ projectPayment: number, // 项目付款
539
+ activeFlag: number, // 激活标志
540
+ fileId: number, // 文件ID
541
+ icpRecordNumber: string, // ICP备案号
542
+ supervise: string, // 监督人
543
+ supervisePhone: string, // 监督电话
544
+ areaCode: number, // 区域代码
545
+ address: string, // 地址
546
+ lat: string, // 纬度
547
+ lng: string, // 经度
548
+ budget: number, // 预算
549
+ expectedTransactionTime: string, // 预计交易时间
550
+ currentStage: string, // 当前阶段
551
+ customerContactId: number, // 客户联系人ID
552
+ projectStageId: number // 项目阶段ID
553
+ })
554
+
555
+ // 删除项目
556
+ cpzxrobot().project.delete(projectId: number) // 项目ID
557
+
488
558
  // 全国项目统计
489
559
  cpzxrobot().project.stat.china()
490
560