@cpzxrobot/sdk 1.2.47 → 1.2.49
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/company_gateway.ts +9 -0
- package/dist/company_gateway.js +8 -0
- package/dist/index.js +1 -1
- package/dist/quotation_gateway.js +9 -28
- package/index.ts +1 -1
- package/package.json +1 -1
- package/quotation_gateway.ts +30 -38
package/company_gateway.ts
CHANGED
|
@@ -145,4 +145,13 @@ export class CompanyGateway extends Object {
|
|
|
145
145
|
return axios.post(`/api/v2/company/query`, args);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
//用于获得父节点的子节点列表,用于树形结构展示
|
|
149
|
+
async treenode(pid: number|undefined) {
|
|
150
|
+
var axios = await this.context.ready;
|
|
151
|
+
if (pid == undefined) {
|
|
152
|
+
return axios.get(`/api/tenant/groups`);
|
|
153
|
+
}
|
|
154
|
+
return axios.post(`/api/tenant/groups/${pid}/children`);
|
|
155
|
+
}
|
|
156
|
+
|
|
148
157
|
}
|
package/dist/company_gateway.js
CHANGED
|
@@ -133,5 +133,13 @@ class CompanyGateway extends Object {
|
|
|
133
133
|
var axios = await this.context.ready;
|
|
134
134
|
return axios.post(`/api/v2/company/query`, args);
|
|
135
135
|
}
|
|
136
|
+
//用于获得父节点的子节点列表,用于树形结构展示
|
|
137
|
+
async treenode(pid) {
|
|
138
|
+
var axios = await this.context.ready;
|
|
139
|
+
if (pid == undefined) {
|
|
140
|
+
return axios.get(`/api/tenant/groups`);
|
|
141
|
+
}
|
|
142
|
+
return axios.post(`/api/tenant/groups/${pid}/children`);
|
|
143
|
+
}
|
|
136
144
|
}
|
|
137
145
|
exports.CompanyGateway = CompanyGateway;
|
package/dist/index.js
CHANGED
|
@@ -397,7 +397,7 @@ class Cpzxrobot {
|
|
|
397
397
|
script.src = "https://www.cpzxrobot.com/webc/factory_selector.js";
|
|
398
398
|
document.body.appendChild(script);
|
|
399
399
|
//insert cpzxrobot_factory_selector into body
|
|
400
|
-
const div = document.createElement("
|
|
400
|
+
const div = document.createElement("cpzxrobot-factory-selector");
|
|
401
401
|
div.setAttribute("selector-style", "float-button");
|
|
402
402
|
document.body.appendChild(div);
|
|
403
403
|
//register onUnitChanged and onFactoryChanged on div
|
|
@@ -36,34 +36,15 @@ class QuotationGateway extends Object {
|
|
|
36
36
|
return axios.get(`/api/v2/coremde-sale/quotation/transform?id=${id}`);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return axios.post(`/api/v2/coremde-sale/quotation/apply/list`, args);
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
get: (id) => {
|
|
52
|
-
return this.context.ready.then((axios) => {
|
|
53
|
-
return axios.get(`/api/v2/coremde-sale/quotation/apply/get?id=${id}`);
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
update: (args) => {
|
|
57
|
-
return this.context.ready.then((axios) => {
|
|
58
|
-
return axios.post(`/api/v2/coremde-sale/quotation/apply/update`, args);
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
delete: (id) => {
|
|
62
|
-
return this.context.ready.then((axios) => {
|
|
63
|
-
return axios.get(`/api/v2/coremde-sale/quotation/apply/delete?id=${id}`);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
};
|
|
39
|
+
create(args) {
|
|
40
|
+
return this.context.ready.then((axios) => {
|
|
41
|
+
return axios.post(`/api/v2/coremde-sale/quotation/create`, args);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
updateInfo(args) {
|
|
45
|
+
return this.context.ready.then((axios) => {
|
|
46
|
+
return axios.post(`/api/v2/coremde-sale/quotation/update-info`, args);
|
|
47
|
+
});
|
|
67
48
|
}
|
|
68
49
|
}
|
|
69
50
|
exports.QuotationGateway = QuotationGateway;
|
package/index.ts
CHANGED
|
@@ -448,7 +448,7 @@ export class Cpzxrobot {
|
|
|
448
448
|
script.src = "https://www.cpzxrobot.com/webc/factory_selector.js";
|
|
449
449
|
document.body.appendChild(script);
|
|
450
450
|
//insert cpzxrobot_factory_selector into body
|
|
451
|
-
const div = document.createElement("
|
|
451
|
+
const div = document.createElement("cpzxrobot-factory-selector");
|
|
452
452
|
div.setAttribute("selector-style","float-button")
|
|
453
453
|
document.body.appendChild(div);
|
|
454
454
|
//register onUnitChanged and onFactoryChanged on div
|
package/package.json
CHANGED
package/quotation_gateway.ts
CHANGED
|
@@ -50,44 +50,36 @@ export class QuotationGateway extends Object {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}) => {
|
|
69
|
-
return this.context.ready.then((axios) => {
|
|
70
|
-
return axios.post(`/api/v2/coremde-sale/quotation/apply/list`, args);
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
get: (id: number) => {
|
|
75
|
-
return this.context.ready.then((axios) => {
|
|
76
|
-
return axios.get(`/api/v2/coremde-sale/quotation/apply/get?id=${id}`);
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
update: (args: { projectId: number; quotationApplyDescription: string; id: number }) => {
|
|
81
|
-
return this.context.ready.then((axios) => {
|
|
82
|
-
return axios.post(`/api/v2/coremde-sale/quotation/apply/update`, args);
|
|
83
|
-
});
|
|
84
|
-
},
|
|
53
|
+
create(args: {
|
|
54
|
+
quotationContent: string;
|
|
55
|
+
amount: number;
|
|
56
|
+
quotationCost: number;
|
|
57
|
+
quotationGrossProfit: number;
|
|
58
|
+
tax: number;
|
|
59
|
+
taxRatio: number;
|
|
60
|
+
validDay: number;
|
|
61
|
+
documentId: number;
|
|
62
|
+
id: number;
|
|
63
|
+
}) {
|
|
64
|
+
return this.context.ready.then((axios) => {
|
|
65
|
+
return axios.post(`/api/v2/coremde-sale/quotation/create`, args);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
85
68
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
69
|
+
updateInfo(args: {
|
|
70
|
+
quotationContent: string;
|
|
71
|
+
amount: number;
|
|
72
|
+
quotationCost: number;
|
|
73
|
+
quotationGrossProfit: number;
|
|
74
|
+
tax: number;
|
|
75
|
+
taxRatio: number;
|
|
76
|
+
validDay: number;
|
|
77
|
+
documentId: number;
|
|
78
|
+
id: number;
|
|
79
|
+
}) {
|
|
80
|
+
return this.context.ready.then((axios) => {
|
|
81
|
+
return axios.post(`/api/v2/coremde-sale/quotation/update-info`, args);
|
|
82
|
+
});
|
|
92
83
|
}
|
|
84
|
+
|
|
93
85
|
}
|