@cpzxrobot/sdk 1.2.69 → 1.2.71
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/device_filter.ts +2 -3
- package/dist/quotation_gateway.js +24 -0
- package/package.json +1 -1
- package/quotation_gateway.ts +45 -0
package/device_filter.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Cpzxrobot, type DataQueryArgs } from ".";
|
|
2
|
-
import type { AxiosResponse } from "axios";
|
|
3
2
|
import { FieldDatas, SensorDatas } from "./sensor_datas";
|
|
4
3
|
|
|
5
4
|
export abstract class DeviceFilter<T extends { id: number }> {
|
|
@@ -153,7 +152,7 @@ export abstract class DeviceFilter<T extends { id: number }> {
|
|
|
153
152
|
}
|
|
154
153
|
);
|
|
155
154
|
if (args.type == "raw") {
|
|
156
|
-
return p1.then((res:
|
|
155
|
+
return p1.then((res: any) => {
|
|
157
156
|
var string = res.data.data as string;
|
|
158
157
|
string = string.replace(/\r/g, "");
|
|
159
158
|
var arr = string.split("\n");
|
|
@@ -205,7 +204,7 @@ export abstract class DeviceFilter<T extends { id: number }> {
|
|
|
205
204
|
return this.wrapData(id, args, p1);
|
|
206
205
|
}
|
|
207
206
|
})
|
|
208
|
-
.then((res:
|
|
207
|
+
.then((res: any) => {
|
|
209
208
|
if (args.type == "raw") {
|
|
210
209
|
return res;
|
|
211
210
|
} else {
|
|
@@ -46,5 +46,29 @@ class QuotationGateway extends Object {
|
|
|
46
46
|
return axios.post(`/api/v2/coremde-sale/quotation/update-info`, args);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
// 销售申请报价调整
|
|
50
|
+
applyPriceAdjust(args) {
|
|
51
|
+
return this.context.ready.then((axios) => {
|
|
52
|
+
return axios.post(`/api/v2/coremde-sale/quotation/price-adjust/apply`, args);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// 获取调价申请列表
|
|
56
|
+
listPriceAdjust(args) {
|
|
57
|
+
return this.context.ready.then((axios) => {
|
|
58
|
+
return axios.post(`/api/v2/coremde-sale/quotation/price-adjust/list`, args);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// 审批调价申请
|
|
62
|
+
approvePriceAdjust(args) {
|
|
63
|
+
return this.context.ready.then((axios) => {
|
|
64
|
+
return axios.post(`/api/v2/coremde-sale/quotation/price-adjust/approve`, args);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// 获取报价单调价信息
|
|
68
|
+
getPriceAdjustInfo(quotationId) {
|
|
69
|
+
return this.context.ready.then((axios) => {
|
|
70
|
+
return axios.get(`/api/v2/coremde-sale/quotation/price-adjust/info?quotationId=${quotationId}`);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
49
73
|
}
|
|
50
74
|
exports.QuotationGateway = QuotationGateway;
|
package/package.json
CHANGED
package/quotation_gateway.ts
CHANGED
|
@@ -82,4 +82,49 @@ export class QuotationGateway extends Object {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// 销售申请报价调整
|
|
86
|
+
applyPriceAdjust(args: {
|
|
87
|
+
quotationId: number;
|
|
88
|
+
validDay: number;
|
|
89
|
+
amountAdjust: number;
|
|
90
|
+
quotationGrossProfitAdjust: number;
|
|
91
|
+
applyReason: string;
|
|
92
|
+
}) {
|
|
93
|
+
return this.context.ready.then((axios) => {
|
|
94
|
+
return axios.post(`/api/v2/coremde-sale/quotation/price-adjust/apply`, args);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// 获取调价申请列表
|
|
99
|
+
listPriceAdjust(args: {
|
|
100
|
+
pageNo: number;
|
|
101
|
+
pageSize: number;
|
|
102
|
+
userId: string;
|
|
103
|
+
quotationStatusId: number;
|
|
104
|
+
}) {
|
|
105
|
+
return this.context.ready.then((axios) => {
|
|
106
|
+
return axios.post(`/api/v2/coremde-sale/quotation/price-adjust/list`, args);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// 审批调价申请
|
|
111
|
+
approvePriceAdjust(args: {
|
|
112
|
+
id: number;
|
|
113
|
+
quotationId: number;
|
|
114
|
+
amountAdjustAdvice: number;
|
|
115
|
+
quotationGrossProfitAdjustAdvice: number;
|
|
116
|
+
notes: string;
|
|
117
|
+
approveResult: number;
|
|
118
|
+
}) {
|
|
119
|
+
return this.context.ready.then((axios) => {
|
|
120
|
+
return axios.post(`/api/v2/coremde-sale/quotation/price-adjust/approve`, args);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// 获取报价单调价信息
|
|
125
|
+
getPriceAdjustInfo(quotationId: number) {
|
|
126
|
+
return this.context.ready.then((axios) => {
|
|
127
|
+
return axios.get(`/api/v2/coremde-sale/quotation/price-adjust/info?quotationId=${quotationId}`);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
85
130
|
}
|