component-sanzhizhou 1.1.0 → 1.1.2
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/dist/collect-price/index.d.ts +9 -0
- package/dist/collect-price/index.js +48 -0
- package/dist/collect-price/index.less +23 -0
- package/dist/collect-price/list.d.ts +10 -0
- package/dist/collect-price/list.js +165 -0
- package/dist/collect-price/list.less +11 -0
- package/dist/component/price-add/index.d.ts +12 -0
- package/dist/component/price-add/index.js +192 -0
- package/dist/component/price-add/index.less +27 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/pay/recharge-moneyAmount-alt.js +3 -1
- package/dist/pay/recharge.js +4 -1
- package/dist/types/CollectConfigPrice.d.ts +9 -0
- package/dist/types/CollectConfigPrice.js +1 -0
- package/dist/types/PriceAdd.d.ts +15 -0
- package/dist/types/PriceAdd.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { CollectConfigPrice } from "../types/CollectConfigPrice";
|
|
4
|
+
interface Props {
|
|
5
|
+
collectConfigPrice: CollectConfigPrice.ConfigPrice;
|
|
6
|
+
onCollectConfigPrice: (collectConfig: CollectConfigPrice.ConfigPrice) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const CollectConfigPricePage: React.FC<Props>;
|
|
9
|
+
export default CollectConfigPricePage;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import "./index.less";
|
|
5
|
+
import CollectConfigPriceList from "./list";
|
|
6
|
+
import PageContentWarp from "../UI/PageContentWarp";
|
|
7
|
+
import PriceAdd from "../component/price-add";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
var CollectConfigPricePage = function CollectConfigPricePage(_ref) {
|
|
11
|
+
var collectConfigPrice = _ref.collectConfigPrice,
|
|
12
|
+
onCollectConfigPrice = _ref.onCollectConfigPrice;
|
|
13
|
+
var FormItemSpan = 4;
|
|
14
|
+
|
|
15
|
+
// 局部操作,更快
|
|
16
|
+
var _useState = useState(_objectSpread({}, collectConfigPrice || {})),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
autoConfigPrice = _useState2[0],
|
|
19
|
+
setAutoConfigPrice = _useState2[1];
|
|
20
|
+
var onAutoConfig = function onAutoConfig(autoConfigPrice) {
|
|
21
|
+
setAutoConfigPrice(_objectSpread({}, autoConfigPrice));
|
|
22
|
+
onCollectConfigPrice(autoConfigPrice);
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/_jsxs(PageContentWarp, {
|
|
25
|
+
className: "ssz-auto-config-price",
|
|
26
|
+
children: [/*#__PURE__*/_jsx(CollectConfigPriceList, {
|
|
27
|
+
FormItemSpan: FormItemSpan,
|
|
28
|
+
collectConfigPrice: autoConfigPrice,
|
|
29
|
+
onCollectConfigPrice: onAutoConfig
|
|
30
|
+
}), /*#__PURE__*/_jsx(PriceAdd, {
|
|
31
|
+
label: "\u515C\u5E95\u89C4\u5219",
|
|
32
|
+
FormItemSpan: FormItemSpan,
|
|
33
|
+
disabledReferenceList: ['average', 'lowest'],
|
|
34
|
+
priceAddData: {
|
|
35
|
+
reference: autoConfigPrice.reference,
|
|
36
|
+
workType: autoConfigPrice.workType,
|
|
37
|
+
ratioValue: autoConfigPrice.ratioValue
|
|
38
|
+
},
|
|
39
|
+
onPriceAddData: function onPriceAddData(e) {
|
|
40
|
+
autoConfigPrice.reference = e.reference;
|
|
41
|
+
autoConfigPrice.workType = e.workType;
|
|
42
|
+
autoConfigPrice.ratioValue = e.ratioValue;
|
|
43
|
+
onAutoConfig(autoConfigPrice);
|
|
44
|
+
}
|
|
45
|
+
})]
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export default CollectConfigPricePage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.sailfish-collect-config-price-point{
|
|
2
|
+
display: inline-block;
|
|
3
|
+
margin: 0 16px;
|
|
4
|
+
line-height: 32px;
|
|
5
|
+
font-size: 20px;
|
|
6
|
+
opacity: 0.35;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sailfish-collect-config-price-unit{
|
|
10
|
+
opacity: 0.35;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sailfish-collect-config-price-equal{
|
|
14
|
+
transform: rotate(90deg);
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
line-height: 30px;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.sailfish-collect-config-price-label{
|
|
21
|
+
display: inline-block;
|
|
22
|
+
line-height: 32px;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './list.less';
|
|
3
|
+
import { CollectConfigPrice } from "../types/CollectConfigPrice";
|
|
4
|
+
interface Props {
|
|
5
|
+
FormItemSpan: number;
|
|
6
|
+
collectConfigPrice: CollectConfigPrice.ConfigPrice;
|
|
7
|
+
onCollectConfigPrice: (collectConfig: CollectConfigPrice.ConfigPrice) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const CollectConfigPriceList: React.FC<Props>;
|
|
10
|
+
export default CollectConfigPriceList;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { Button, Divider, Form, InputNumber, Space, Tag } from "antd";
|
|
5
|
+
import { ForwardOutlined, MinusCircleOutlined, PauseOutlined, PlusCircleOutlined } from "@ant-design/icons";
|
|
6
|
+
import "./list.less";
|
|
7
|
+
import math from "../lib/math";
|
|
8
|
+
import PageContentWarp from "../UI/PageContentWarp";
|
|
9
|
+
import formatMessage from "../lib/formatMessage";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
var CollectConfigPriceList = function CollectConfigPriceList(_ref) {
|
|
13
|
+
var _autoConfigPrice$pric, _autoConfigPrice$pric2;
|
|
14
|
+
var FormItemSpan = _ref.FormItemSpan,
|
|
15
|
+
collectConfigPrice = _ref.collectConfigPrice,
|
|
16
|
+
onCollectConfigPrice = _ref.onCollectConfigPrice;
|
|
17
|
+
// 局部操作,更快
|
|
18
|
+
var _useState = useState(_objectSpread({}, collectConfigPrice || {})),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
autoConfigPrice = _useState2[0],
|
|
21
|
+
setAutoConfigPrice = _useState2[1];
|
|
22
|
+
var onAutoConfig = function onAutoConfig(autoConfigPrice) {
|
|
23
|
+
setAutoConfigPrice(_objectSpread({}, autoConfigPrice));
|
|
24
|
+
onCollectConfigPrice(autoConfigPrice);
|
|
25
|
+
};
|
|
26
|
+
var onAdd = function onAdd(index) {
|
|
27
|
+
autoConfigPrice.priceList.splice(index + 1, 0, {
|
|
28
|
+
_id: math.randWord(10),
|
|
29
|
+
min: null,
|
|
30
|
+
max: null,
|
|
31
|
+
finishPrice: null
|
|
32
|
+
});
|
|
33
|
+
onAutoConfig(autoConfigPrice);
|
|
34
|
+
};
|
|
35
|
+
var onRemove = function onRemove(index) {
|
|
36
|
+
autoConfigPrice.priceList.splice(index, 1);
|
|
37
|
+
onAutoConfig(autoConfigPrice);
|
|
38
|
+
};
|
|
39
|
+
var priceInputWidth = 96;
|
|
40
|
+
return /*#__PURE__*/_jsxs(PageContentWarp, {
|
|
41
|
+
className: "ssz-auto-config-price-list",
|
|
42
|
+
children: [(_autoConfigPrice$pric = autoConfigPrice.priceList) === null || _autoConfigPrice$pric === void 0 ? void 0 : _autoConfigPrice$pric.map(function (items, index) {
|
|
43
|
+
return /*#__PURE__*/_jsx(Form.Item, {
|
|
44
|
+
label: index === 0 ? '售价规则' : '',
|
|
45
|
+
labelCol: {
|
|
46
|
+
span: FormItemSpan
|
|
47
|
+
},
|
|
48
|
+
wrapperCol: {
|
|
49
|
+
offset: index === 0 ? 0 : FormItemSpan
|
|
50
|
+
},
|
|
51
|
+
extra: items.max && items.finishPrice ? /*#__PURE__*/_jsxs("small", {
|
|
52
|
+
children: ["\u539F\u9500\u552E >= ", items.min || 0, "\u5143\uFF0C\u5E76\u4E14 < ", items.max, "\u5143\uFF0C\u6700\u7EC8\u552E\u4EF7 = ", items.finishPrice, "\u5143 "]
|
|
53
|
+
}) : null,
|
|
54
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
55
|
+
children: [/*#__PURE__*/_jsxs(Space.Compact, {
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
57
|
+
children: "\u5F53"
|
|
58
|
+
}), /*#__PURE__*/_jsx(InputNumber
|
|
59
|
+
// prefix="当价格小于"
|
|
60
|
+
, {
|
|
61
|
+
suffix: "\u5143",
|
|
62
|
+
value: items.min,
|
|
63
|
+
min: 0,
|
|
64
|
+
precision: 0,
|
|
65
|
+
controls: false,
|
|
66
|
+
style: {
|
|
67
|
+
width: priceInputWidth
|
|
68
|
+
},
|
|
69
|
+
placeholder: formatMessage('请输入'),
|
|
70
|
+
onChange: function onChange(e) {
|
|
71
|
+
autoConfigPrice.priceList[index].min = e;
|
|
72
|
+
onAutoConfig(autoConfigPrice);
|
|
73
|
+
}
|
|
74
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
75
|
+
className: "sailfish-collect-config-price-point",
|
|
76
|
+
children: "<="
|
|
77
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
78
|
+
className: "sailfish-collect-config-price-label",
|
|
79
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
|
80
|
+
color: "blue",
|
|
81
|
+
variant: "solid",
|
|
82
|
+
children: "\u539F\u552E\u4EF7"
|
|
83
|
+
})
|
|
84
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
85
|
+
className: "sailfish-collect-config-price-point",
|
|
86
|
+
children: "<"
|
|
87
|
+
}), /*#__PURE__*/_jsx(InputNumber
|
|
88
|
+
// prefix="当价格小于"
|
|
89
|
+
, {
|
|
90
|
+
suffix: "\u5143",
|
|
91
|
+
precision: 0,
|
|
92
|
+
value: items.max,
|
|
93
|
+
min: 0,
|
|
94
|
+
controls: false,
|
|
95
|
+
style: {
|
|
96
|
+
width: priceInputWidth
|
|
97
|
+
},
|
|
98
|
+
placeholder: formatMessage('请输入'),
|
|
99
|
+
onChange: function onChange(e) {
|
|
100
|
+
autoConfigPrice.priceList[index].max = e;
|
|
101
|
+
onAutoConfig(autoConfigPrice);
|
|
102
|
+
}
|
|
103
|
+
}), /*#__PURE__*/_jsx(ForwardOutlined, {
|
|
104
|
+
className: "sailfish-collect-config-price-point"
|
|
105
|
+
}), /*#__PURE__*/_jsxs(Button, {
|
|
106
|
+
children: ["\u552E\u4EF7 ", /*#__PURE__*/_jsx(PauseOutlined, {
|
|
107
|
+
className: "sailfish-collect-config-price-unit sailfish-collect-config-price-equal"
|
|
108
|
+
})]
|
|
109
|
+
}), /*#__PURE__*/_jsx(InputNumber, {
|
|
110
|
+
suffix: "\u5143",
|
|
111
|
+
controls: false,
|
|
112
|
+
value: items.finishPrice,
|
|
113
|
+
placeholder: formatMessage('请输入'),
|
|
114
|
+
precision: 0,
|
|
115
|
+
style: {
|
|
116
|
+
width: priceInputWidth
|
|
117
|
+
},
|
|
118
|
+
onChange: function onChange(e) {
|
|
119
|
+
autoConfigPrice.priceList[index].finishPrice = e;
|
|
120
|
+
onAutoConfig(autoConfigPrice);
|
|
121
|
+
}
|
|
122
|
+
})]
|
|
123
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
|
124
|
+
orientation: "vertical",
|
|
125
|
+
style: {
|
|
126
|
+
height: 20,
|
|
127
|
+
margin: '6px 12px 0 20px'
|
|
128
|
+
}
|
|
129
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
130
|
+
className: "sailfish-collect-config-price-operate",
|
|
131
|
+
children: [/*#__PURE__*/_jsx("a", {
|
|
132
|
+
className: "sailfish-collect-config-price-operate-add",
|
|
133
|
+
onClick: function onClick() {
|
|
134
|
+
return onAdd(index);
|
|
135
|
+
},
|
|
136
|
+
children: /*#__PURE__*/_jsx(PlusCircleOutlined, {})
|
|
137
|
+
}), /*#__PURE__*/_jsx("a", {
|
|
138
|
+
className: " sailfish-collect-config-price-operate-remove",
|
|
139
|
+
onClick: function onClick() {
|
|
140
|
+
return onRemove(index);
|
|
141
|
+
},
|
|
142
|
+
children: /*#__PURE__*/_jsx(MinusCircleOutlined, {})
|
|
143
|
+
})]
|
|
144
|
+
})]
|
|
145
|
+
})
|
|
146
|
+
}, items._id);
|
|
147
|
+
}), (_autoConfigPrice$pric2 = autoConfigPrice.priceList) !== null && _autoConfigPrice$pric2 !== void 0 && _autoConfigPrice$pric2.length ? null : /*#__PURE__*/_jsx(Form.Item, {
|
|
148
|
+
label: "\u6700\u7EC8\u552E\u4EF7",
|
|
149
|
+
labelCol: {
|
|
150
|
+
span: FormItemSpan
|
|
151
|
+
},
|
|
152
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
153
|
+
className: "sailfish-collect-config-price-operate",
|
|
154
|
+
children: /*#__PURE__*/_jsx("a", {
|
|
155
|
+
className: "sailfish-collect-config-price-operate-add",
|
|
156
|
+
onClick: function onClick() {
|
|
157
|
+
return onAdd(0);
|
|
158
|
+
},
|
|
159
|
+
children: /*#__PURE__*/_jsx(PlusCircleOutlined, {})
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
})]
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
export default CollectConfigPriceList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PriceAddNs } from "../../types/PriceAdd";
|
|
4
|
+
interface Props {
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
FormItemSpan: number;
|
|
7
|
+
disabledReferenceList?: PriceAddNs.Reference[];
|
|
8
|
+
priceAddData: PriceAddNs.FormData;
|
|
9
|
+
onPriceAddData: (priceAddData: PriceAddNs.FormData) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const PriceAdd: React.FC<Props>;
|
|
12
|
+
export default PriceAdd;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import { Form, InputNumber, Select, Space } from "antd";
|
|
6
|
+
import { CloseOutlined, MinusOutlined, PlusOutlined } from "@ant-design/icons";
|
|
7
|
+
import formatMessage from "../../lib/formatMessage";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
var RatioDict = {
|
|
11
|
+
'+': {
|
|
12
|
+
before: null,
|
|
13
|
+
after: formatMessage('元')
|
|
14
|
+
},
|
|
15
|
+
'-': {
|
|
16
|
+
before: null,
|
|
17
|
+
after: formatMessage('元')
|
|
18
|
+
},
|
|
19
|
+
'x': {
|
|
20
|
+
before: '',
|
|
21
|
+
after: formatMessage('倍')
|
|
22
|
+
},
|
|
23
|
+
'/': {
|
|
24
|
+
before: '',
|
|
25
|
+
after: formatMessage('倍')
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var BasePrice = 1000;
|
|
29
|
+
var PriceAdd = function PriceAdd(_ref) {
|
|
30
|
+
var _RatioDict$formData$w, _RatioDict$formData$w2, _RatioDict$formData$w3;
|
|
31
|
+
var _ref$label = _ref.label,
|
|
32
|
+
label = _ref$label === void 0 ? formatMessage('发布价格') : _ref$label,
|
|
33
|
+
FormItemSpan = _ref.FormItemSpan,
|
|
34
|
+
_ref$disabledReferenc = _ref.disabledReferenceList,
|
|
35
|
+
disabledReferenceList = _ref$disabledReferenc === void 0 ? [] : _ref$disabledReferenc,
|
|
36
|
+
priceAddData = _ref.priceAddData,
|
|
37
|
+
onPriceAddData = _ref.onPriceAddData;
|
|
38
|
+
var ReferenceList = [{
|
|
39
|
+
name: '',
|
|
40
|
+
label: formatMessage('当前售价')
|
|
41
|
+
}, {
|
|
42
|
+
name: 'average',
|
|
43
|
+
label: formatMessage('平均价格')
|
|
44
|
+
}, {
|
|
45
|
+
name: 'lowest',
|
|
46
|
+
label: formatMessage('最低价')
|
|
47
|
+
}];
|
|
48
|
+
var _useState = useState({
|
|
49
|
+
reference: (priceAddData === null || priceAddData === void 0 ? void 0 : priceAddData.reference) || '',
|
|
50
|
+
workType: (priceAddData === null || priceAddData === void 0 ? void 0 : priceAddData.workType) || 'x',
|
|
51
|
+
ratioValue: (priceAddData === null || priceAddData === void 0 ? void 0 : priceAddData.ratioValue) || 1
|
|
52
|
+
}),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
formData = _useState2[0],
|
|
55
|
+
setFormData = _useState2[1];
|
|
56
|
+
var onFormData = function onFormData(formData) {
|
|
57
|
+
setFormData(_objectSpread({}, formData));
|
|
58
|
+
onPriceAddData(_objectSpread({}, formData));
|
|
59
|
+
};
|
|
60
|
+
var mathDemoResult = function mathDemoResult() {
|
|
61
|
+
var result = 0;
|
|
62
|
+
switch (formData.workType) {
|
|
63
|
+
case "+":
|
|
64
|
+
result = BasePrice + formData.ratioValue;
|
|
65
|
+
break;
|
|
66
|
+
case "-":
|
|
67
|
+
result = BasePrice - formData.ratioValue;
|
|
68
|
+
break;
|
|
69
|
+
case "x":
|
|
70
|
+
result = parseFloat((BasePrice * formData.ratioValue).toFixed(2));
|
|
71
|
+
break;
|
|
72
|
+
case "/":
|
|
73
|
+
result = parseFloat((BasePrice / formData.ratioValue).toFixed(2));
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
return isNaN(result) ? 0 : result;
|
|
77
|
+
};
|
|
78
|
+
return /*#__PURE__*/_jsx("div", {
|
|
79
|
+
className: "ssz-price-add",
|
|
80
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
81
|
+
labelCol: {
|
|
82
|
+
span: FormItemSpan
|
|
83
|
+
},
|
|
84
|
+
label: label,
|
|
85
|
+
extra: /*#__PURE__*/_jsxs("div", {
|
|
86
|
+
className: "ssz-price-add-mathDemo",
|
|
87
|
+
children: [formatMessage('示例'), "\uFF1A", /*#__PURE__*/_jsxs(Space, {
|
|
88
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
89
|
+
style: {
|
|
90
|
+
color: '#0958d9'
|
|
91
|
+
},
|
|
92
|
+
children: [BasePrice, formatMessage('元')]
|
|
93
|
+
}), /*#__PURE__*/_jsx("strong", {
|
|
94
|
+
children: formData.workType
|
|
95
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
96
|
+
children: [formData.ratioValue, /*#__PURE__*/_jsxs("small", {
|
|
97
|
+
children: [" ", (_RatioDict$formData$w = RatioDict[formData.workType]) === null || _RatioDict$formData$w === void 0 ? void 0 : _RatioDict$formData$w.after]
|
|
98
|
+
})]
|
|
99
|
+
}), "=", /*#__PURE__*/_jsxs("div", {
|
|
100
|
+
children: [/*#__PURE__*/_jsx("strong", {
|
|
101
|
+
style: {
|
|
102
|
+
color: '#389e0d'
|
|
103
|
+
},
|
|
104
|
+
children: mathDemoResult()
|
|
105
|
+
}), " ", /*#__PURE__*/_jsx("small", {
|
|
106
|
+
children: formatMessage('元')
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
})]
|
|
110
|
+
}),
|
|
111
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
112
|
+
children: [/*#__PURE__*/_jsx(Select, {
|
|
113
|
+
style: {
|
|
114
|
+
width: 210
|
|
115
|
+
},
|
|
116
|
+
classNames: {
|
|
117
|
+
popup: {
|
|
118
|
+
root: 'ssz-price-add'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
value: formData.reference,
|
|
122
|
+
onChange: function onChange(e) {
|
|
123
|
+
console.log('price add e:', e);
|
|
124
|
+
formData.reference = e;
|
|
125
|
+
onFormData(formData);
|
|
126
|
+
},
|
|
127
|
+
children: ReferenceList.map(function (reference) {
|
|
128
|
+
return disabledReferenceList !== null && disabledReferenceList !== void 0 && disabledReferenceList.includes(reference.name) ? null : /*#__PURE__*/_jsx(Select.Option, {
|
|
129
|
+
value: reference.name,
|
|
130
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
131
|
+
className: "ssz-price-add-reference-".concat(reference.name),
|
|
132
|
+
children: reference.label
|
|
133
|
+
})
|
|
134
|
+
}, reference.name);
|
|
135
|
+
})
|
|
136
|
+
}), /*#__PURE__*/_jsxs(Select, {
|
|
137
|
+
style: {
|
|
138
|
+
width: 120
|
|
139
|
+
},
|
|
140
|
+
classNames: {
|
|
141
|
+
popup: {
|
|
142
|
+
root: 'ssz-price-add'
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
value: formData.workType,
|
|
146
|
+
onChange: function onChange(e) {
|
|
147
|
+
formData.workType = e;
|
|
148
|
+
onFormData(formData);
|
|
149
|
+
},
|
|
150
|
+
children: [/*#__PURE__*/_jsxs(Select.Option, {
|
|
151
|
+
value: "+",
|
|
152
|
+
children: [/*#__PURE__*/_jsx(PlusOutlined, {}), " ", /*#__PURE__*/_jsx("small", {
|
|
153
|
+
children: formatMessage('加')
|
|
154
|
+
})]
|
|
155
|
+
}), /*#__PURE__*/_jsxs(Select.Option, {
|
|
156
|
+
value: "-",
|
|
157
|
+
children: [/*#__PURE__*/_jsx(MinusOutlined, {}), " ", /*#__PURE__*/_jsx("small", {
|
|
158
|
+
children: formatMessage('减')
|
|
159
|
+
})]
|
|
160
|
+
}), /*#__PURE__*/_jsxs(Select.Option, {
|
|
161
|
+
value: "x",
|
|
162
|
+
children: [/*#__PURE__*/_jsx(CloseOutlined, {}), " ", /*#__PURE__*/_jsx("small", {
|
|
163
|
+
children: formatMessage('乘')
|
|
164
|
+
})]
|
|
165
|
+
}), /*#__PURE__*/_jsxs(Select.Option, {
|
|
166
|
+
value: "/",
|
|
167
|
+
children: [/*#__PURE__*/_jsx(MinusOutlined, {
|
|
168
|
+
className: "ssz-price-add-divide"
|
|
169
|
+
}), " ", /*#__PURE__*/_jsx("small", {
|
|
170
|
+
children: formatMessage('除')
|
|
171
|
+
})]
|
|
172
|
+
})]
|
|
173
|
+
}), /*#__PURE__*/_jsx(InputNumber, {
|
|
174
|
+
controls: false,
|
|
175
|
+
prefix: (_RatioDict$formData$w2 = RatioDict[formData.workType]) === null || _RatioDict$formData$w2 === void 0 ? void 0 : _RatioDict$formData$w2.before,
|
|
176
|
+
suffix: (_RatioDict$formData$w3 = RatioDict[formData.workType]) === null || _RatioDict$formData$w3 === void 0 ? void 0 : _RatioDict$formData$w3.after,
|
|
177
|
+
style: {
|
|
178
|
+
width: 150
|
|
179
|
+
},
|
|
180
|
+
precision: 2,
|
|
181
|
+
min: 0,
|
|
182
|
+
value: formData.ratioValue,
|
|
183
|
+
onChange: function onChange(e) {
|
|
184
|
+
formData.ratioValue = parseFloat("".concat(e)) || 0;
|
|
185
|
+
onFormData(formData);
|
|
186
|
+
}
|
|
187
|
+
})]
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
export default PriceAdd;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.ssz-price-add{
|
|
2
|
+
small{
|
|
3
|
+
color: #999;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ssz-price-add-divide{
|
|
7
|
+
transform: rotate(-65deg);
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
.ssz-price-add-mathDemo{
|
|
11
|
+
padding: 3px 0 0;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ssz-price-add-reference-current{
|
|
17
|
+
color: green;
|
|
18
|
+
}
|
|
19
|
+
.ssz-price-add-reference-average{
|
|
20
|
+
color: blue;
|
|
21
|
+
}
|
|
22
|
+
.ssz-price-add-reference-lowest{
|
|
23
|
+
color: orange;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -17,3 +17,4 @@ export { default as PayRecharge } from './pay/recharge';
|
|
|
17
17
|
export { default as PayVip } from './pay/vip';
|
|
18
18
|
export { default as PayQr } from './pay/qr';
|
|
19
19
|
export { default as PayChannel } from './pay/pay-channel';
|
|
20
|
+
export { default as CollectConfigPrice } from './collect-price';
|
package/dist/index.js
CHANGED
|
@@ -16,4 +16,5 @@ export { default as Ad } from "./Ad";
|
|
|
16
16
|
export { default as PayRecharge } from "./pay/recharge";
|
|
17
17
|
export { default as PayVip } from "./pay/vip";
|
|
18
18
|
export { default as PayQr } from "./pay/qr";
|
|
19
|
-
export { default as PayChannel } from "./pay/pay-channel";
|
|
19
|
+
export { default as PayChannel } from "./pay/pay-channel";
|
|
20
|
+
export { default as CollectConfigPrice } from "./collect-price";
|
package/dist/lib/Tool.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ declare const Tool: {
|
|
|
162
162
|
getTitleByPath(path: string): string;
|
|
163
163
|
getDirByPath(path: string): string;
|
|
164
164
|
h5Pay(query: Pay.H5PayQuery): void;
|
|
165
|
-
notification(type: "
|
|
165
|
+
notification(type: "info" | "error" | "warning" | "success", message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
166
166
|
notificationSuccess(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
167
167
|
notificationError(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
168
168
|
notificationWarning(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
@@ -40,7 +40,9 @@ var PayRechargeMoneyAmountAlt = function PayRechargeMoneyAmountAlt(_ref) {
|
|
|
40
40
|
}, [moneyAmount, rechargeRuleList]);
|
|
41
41
|
return /*#__PURE__*/_jsxs("div", {
|
|
42
42
|
className: "ssz-recharge-form-moneyAmount-input",
|
|
43
|
-
children: [
|
|
43
|
+
children: [/*#__PURE__*/_jsx("small", {
|
|
44
|
+
children: formatMessage('元')
|
|
45
|
+
}), giveMoney > 0 && /*#__PURE__*/_jsxs("div", {
|
|
44
46
|
className: "ssz-recharge-form-moneyAmount-input-bonus",
|
|
45
47
|
children: [/*#__PURE__*/_jsxs("span", {
|
|
46
48
|
className: "ssz-recharge-form-moneyAmount-input-bonus-payRechargeRule",
|
package/dist/pay/recharge.js
CHANGED
|
@@ -132,7 +132,7 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
132
132
|
required: true,
|
|
133
133
|
message: formatMessage('请输入')
|
|
134
134
|
}],
|
|
135
|
-
extra: /*#__PURE__*/_jsxs("
|
|
135
|
+
extra: /*#__PURE__*/_jsxs("small", {
|
|
136
136
|
children: [formatMessage('充值'), "\uFF1A", formatMessage('最低'), " ", /*#__PURE__*/_jsxs("strong", {
|
|
137
137
|
children: [" ", minPrice]
|
|
138
138
|
}), /*#__PURE__*/_jsxs("small", {
|
|
@@ -151,6 +151,9 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
151
151
|
moneyAmount: formData.moneyAmount,
|
|
152
152
|
rechargeRuleList: rechargeRuleList
|
|
153
153
|
}),
|
|
154
|
+
style: {
|
|
155
|
+
// minWidth: 300,
|
|
156
|
+
},
|
|
154
157
|
className: "ssz-recharge-form-moneyAmount-input",
|
|
155
158
|
precision: precision,
|
|
156
159
|
min: minPrice,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare namespace PriceAddNs {
|
|
2
|
+
type WorkType = '+' | '-' | 'x' | '/';
|
|
3
|
+
type Reference = '' | 'average' | 'lowest';
|
|
4
|
+
interface FormData {
|
|
5
|
+
workType: WorkType;
|
|
6
|
+
ratioValue: number;
|
|
7
|
+
reference: Reference;
|
|
8
|
+
}
|
|
9
|
+
interface List {
|
|
10
|
+
min: number | null;
|
|
11
|
+
max: number | null;
|
|
12
|
+
finishPrice: number | null;
|
|
13
|
+
_id: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|