@cpzxrobot/sdk 1.2.19 → 1.2.20
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 +62 -12
- package/dist/contract_gateway.js +38 -10
- package/dist/index.js +1 -1
- package/dist/quotation_gateway.js +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/quotation_gateway.ts +24 -0
package/contract_gateway.ts
CHANGED
|
@@ -26,18 +26,6 @@ export class ContractGateway extends Object {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
addForProject(args: any) {
|
|
30
|
-
return this.context.ready.then((axios) => {
|
|
31
|
-
return axios.post(`/api/v2/coremde-sale/contract/project/add`, args);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
addForProduct(args: any) {
|
|
36
|
-
return this.context.ready.then((axios) => {
|
|
37
|
-
return axios.post(`/api/v2/coremde-sale/contract/product/add`, args);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
29
|
add(args: any) {
|
|
42
30
|
return this.context.ready.then((axios) => {
|
|
43
31
|
return axios.post(`/api/v2/coremde-sale/contract/add`, args);
|
|
@@ -72,4 +60,66 @@ export class ContractGateway extends Object {
|
|
|
72
60
|
});
|
|
73
61
|
}
|
|
74
62
|
|
|
63
|
+
get project() {
|
|
64
|
+
return {
|
|
65
|
+
addContract: (args: any) => {
|
|
66
|
+
return this.context.ready.then((axios) => {
|
|
67
|
+
return axios.post(`/api/v2/coremde-sale/contract/project/add`, args);
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
addPayment: (args: {
|
|
71
|
+
createTime: string;
|
|
72
|
+
createUserId: number;
|
|
73
|
+
updateTime: string;
|
|
74
|
+
updateUserId: number;
|
|
75
|
+
companyId: number;
|
|
76
|
+
contractId: number;
|
|
77
|
+
receivedPayments: number;
|
|
78
|
+
receivedPerson: string;
|
|
79
|
+
receiveDate: string;
|
|
80
|
+
remark: string;
|
|
81
|
+
}) => {
|
|
82
|
+
return this.context.ready.then((axios) => {
|
|
83
|
+
return axios.post(`/api/v2/coremde-sale/contract/project/payment/add`, args);
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
listPayments: (id: number) => {
|
|
87
|
+
return this.context.ready.then((axios) => {
|
|
88
|
+
return axios.get(`/api/v2/coremde-sale/contract/project/payment/list?id=${id}`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
get product() {
|
|
95
|
+
return {
|
|
96
|
+
addContract: (args: any) => {
|
|
97
|
+
return this.context.ready.then((axios) => {
|
|
98
|
+
return axios.post(`/api/v2/coremde-sale/contract/product/add`, args);
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
addPayment: (args: {
|
|
102
|
+
createTime: string;
|
|
103
|
+
createUserId: number;
|
|
104
|
+
updateTime: string;
|
|
105
|
+
updateUserId: number;
|
|
106
|
+
companyId: number;
|
|
107
|
+
contractId: number;
|
|
108
|
+
receivedPayments: number;
|
|
109
|
+
receivedPerson: string;
|
|
110
|
+
receiveDate: string;
|
|
111
|
+
remark: string;
|
|
112
|
+
}) => {
|
|
113
|
+
return this.context.ready.then((axios) => {
|
|
114
|
+
return axios.post(`/api/v2/coremde-sale/contract/product/payment/add`, args);
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
listPayments: (id: number) => {
|
|
118
|
+
return this.context.ready.then((axios) => {
|
|
119
|
+
return axios.get(`/api/v2/coremde-sale/contract/product/payment/list?id=${id}`);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
75
125
|
}
|
package/dist/contract_gateway.js
CHANGED
|
@@ -16,16 +16,6 @@ class ContractGateway extends Object {
|
|
|
16
16
|
return axios.get(`/api/v2/coremde-sale/contract/get?id=${id}`);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
addForProject(args) {
|
|
20
|
-
return this.context.ready.then((axios) => {
|
|
21
|
-
return axios.post(`/api/v2/coremde-sale/contract/project/add`, args);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
addForProduct(args) {
|
|
25
|
-
return this.context.ready.then((axios) => {
|
|
26
|
-
return axios.post(`/api/v2/coremde-sale/contract/product/add`, args);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
19
|
add(args) {
|
|
30
20
|
return this.context.ready.then((axios) => {
|
|
31
21
|
return axios.post(`/api/v2/coremde-sale/contract/add`, args);
|
|
@@ -55,5 +45,43 @@ class ContractGateway extends Object {
|
|
|
55
45
|
return axios.get(`/api/v2/coremde-sale/contract/types`);
|
|
56
46
|
});
|
|
57
47
|
}
|
|
48
|
+
get project() {
|
|
49
|
+
return {
|
|
50
|
+
addContract: (args) => {
|
|
51
|
+
return this.context.ready.then((axios) => {
|
|
52
|
+
return axios.post(`/api/v2/coremde-sale/contract/project/add`, args);
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
addPayment: (args) => {
|
|
56
|
+
return this.context.ready.then((axios) => {
|
|
57
|
+
return axios.post(`/api/v2/coremde-sale/contract/project/payment/add`, args);
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
listPayments: (id) => {
|
|
61
|
+
return this.context.ready.then((axios) => {
|
|
62
|
+
return axios.get(`/api/v2/coremde-sale/contract/project/payment/list?id=${id}`);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
get product() {
|
|
68
|
+
return {
|
|
69
|
+
addContract: (args) => {
|
|
70
|
+
return this.context.ready.then((axios) => {
|
|
71
|
+
return axios.post(`/api/v2/coremde-sale/contract/product/add`, args);
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
addPayment: (args) => {
|
|
75
|
+
return this.context.ready.then((axios) => {
|
|
76
|
+
return axios.post(`/api/v2/coremde-sale/contract/product/payment/add`, args);
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
listPayments: (id) => {
|
|
80
|
+
return this.context.ready.then((axios) => {
|
|
81
|
+
return axios.get(`/api/v2/coremde-sale/contract/product/payment/list?id=${id}`);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
58
86
|
}
|
|
59
87
|
exports.ContractGateway = ContractGateway;
|
package/dist/index.js
CHANGED
|
@@ -364,7 +364,7 @@ class Cpzxrobot {
|
|
|
364
364
|
const token = localStorage.getItem("token");
|
|
365
365
|
if (token) {
|
|
366
366
|
this.token = token;
|
|
367
|
-
this.initAxios(
|
|
367
|
+
this.initAxios("https://www.cpzxrobot.com");
|
|
368
368
|
this.axios.get("/api/v1/user/auth").then((res) => {
|
|
369
369
|
if (res.data.Error) {
|
|
370
370
|
window.location.href = "/login.html?error=" + res.data.Error;
|
|
@@ -16,5 +16,25 @@ class QuotationGateway extends Object {
|
|
|
16
16
|
return axios.post(`/api/v2/coremde-sale/quotation/add`, args);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
+
get(id) {
|
|
20
|
+
return this.context.ready.then((axios) => {
|
|
21
|
+
return axios.get(`/api/v2/coremde-sale/quotation/get?id=${id}`);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
update(args) {
|
|
25
|
+
return this.context.ready.then((axios) => {
|
|
26
|
+
return axios.post(`/api/v2/coremde-sale/quotation/update`, args);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
delete(id) {
|
|
30
|
+
return this.context.ready.then((axios) => {
|
|
31
|
+
return axios.get(`/api/v2/coremde-sale/quotation/delete?id=${id}`);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
transform(id) {
|
|
35
|
+
return this.context.ready.then((axios) => {
|
|
36
|
+
return axios.get(`/api/v2/coremde-sale/quotation/transform?id=${id}`);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
19
39
|
}
|
|
20
40
|
exports.QuotationGateway = QuotationGateway;
|
package/index.ts
CHANGED
|
@@ -416,7 +416,7 @@ export class Cpzxrobot {
|
|
|
416
416
|
const token = localStorage.getItem("token");
|
|
417
417
|
if (token) {
|
|
418
418
|
this.token = token;
|
|
419
|
-
this.initAxios(
|
|
419
|
+
this.initAxios("https://www.cpzxrobot.com");
|
|
420
420
|
this.axios.get("/api/v1/user/auth").then((res) => {
|
|
421
421
|
if (res.data.Error) {
|
|
422
422
|
window.location.href = "/login.html?error=" + res.data.Error;
|
package/package.json
CHANGED
package/quotation_gateway.ts
CHANGED
|
@@ -25,4 +25,28 @@ export class QuotationGateway extends Object {
|
|
|
25
25
|
return axios.post(`/api/v2/coremde-sale/quotation/add`, args);
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
get(id: number) {
|
|
30
|
+
return this.context.ready.then((axios) => {
|
|
31
|
+
return axios.get(`/api/v2/coremde-sale/quotation/get?id=${id}`);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
update(args: any) {
|
|
36
|
+
return this.context.ready.then((axios) => {
|
|
37
|
+
return axios.post(`/api/v2/coremde-sale/quotation/update`, args);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
delete(id: number) {
|
|
42
|
+
return this.context.ready.then((axios) => {
|
|
43
|
+
return axios.get(`/api/v2/coremde-sale/quotation/delete?id=${id}`);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
transform(id: number) {
|
|
48
|
+
return this.context.ready.then((axios) => {
|
|
49
|
+
return axios.get(`/api/v2/coremde-sale/quotation/transform?id=${id}`);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
28
52
|
}
|