kmkf-work-order-service-component 0.4.0-alpha.9 → 0.4.0
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/esm/FormRender/index.d.ts +1 -0
- package/dist/esm/FormRender/index.js +78 -28
- package/dist/esm/SingleShopWorkOrder/components/Card/index.less +1 -0
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.js +55 -22
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.less +3 -2
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.js +93 -41
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.less +17 -5
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js +4 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.less +1 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +164 -72
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.less +0 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Checkbox/index.js +15 -8
- package/dist/esm/WorkOrder/components/Widget/basic/CommonDataTime/index.d.ts +10 -0
- package/dist/esm/WorkOrder/components/Widget/basic/CommonDataTime/index.js +90 -0
- package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +3 -3
- package/dist/esm/WorkOrder/components/Widget/basic/Radio/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/ELogistics/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/ERemark/index.js +11 -5
- package/dist/esm/WorkOrder/components/Widget/electricity/Express/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/index.d.ts +2 -1
- package/dist/esm/WorkOrder/components/Widget/index.js +10 -0
- package/dist/esm/WorkOrder/index.d.ts +1 -0
- package/dist/esm/WorkOrder/index.js +16 -11
- package/dist/esm/WorkOrder/index.less +5 -3
- package/dist/esm/assets/flag/trade-icon-flag-0.png +0 -0
- package/dist/esm/assets/flag/trade-icon-flag-1.png +0 -0
- package/dist/esm/assets/flag/trade-icon-flag-2.png +0 -0
- package/dist/esm/assets/flag/trade-icon-flag-3.png +0 -0
- package/dist/esm/assets/flag/trade-icon-flag-4.png +0 -0
- package/dist/esm/assets/flag/trade-icon-flag-5.png +0 -0
- package/dist/esm/common/utils/tools.d.ts +2 -1
- package/dist/esm/common/utils/tools.js +58 -24
- package/dist/esm/model/customizeWorkOrder/index.js +1 -1
- package/dist/esm/model/workOrder.d.ts +1 -0
- package/dist/esm/model/workOrder.js +20 -29
- package/package.json +2 -2
@@ -1,5 +1,13 @@
|
|
1
1
|
.custom_box {
|
2
|
-
// height: calc(
|
2
|
+
// height: calc(100vh - 58px);
|
3
|
+
overflow-x: hidden;
|
4
|
+
:global(.ant-row) {
|
5
|
+
margin: 0 !important;
|
6
|
+
}
|
7
|
+
|
8
|
+
:global(.ant-col) {
|
9
|
+
padding: 0 !important;
|
10
|
+
}
|
3
11
|
.top-tip {
|
4
12
|
display: flex;
|
5
13
|
flex-direction: row;
|
@@ -119,7 +127,10 @@
|
|
119
127
|
}
|
120
128
|
|
121
129
|
.custom_box_main_fxg {
|
122
|
-
height: calc(100vh -
|
130
|
+
height: calc(100vh - 412px);
|
131
|
+
}
|
132
|
+
.custom_box_main_xiaozhi {
|
133
|
+
height: calc(100vh - 228px);
|
123
134
|
}
|
124
135
|
|
125
136
|
.custom_box_main_ks {
|
@@ -149,6 +160,7 @@
|
|
149
160
|
flex-direction: row;
|
150
161
|
align-items: center;
|
151
162
|
justify-content: space-between;
|
163
|
+
margin-bottom: 4px;
|
152
164
|
}
|
153
165
|
.action_collapse {
|
154
166
|
padding-left: 8px;
|
@@ -156,17 +168,17 @@
|
|
156
168
|
cursor: pointer;
|
157
169
|
}
|
158
170
|
.customizeSearch {
|
159
|
-
overflow: hidden;
|
160
171
|
transition: all 0.3s linear;
|
161
172
|
.ant-form-item {
|
162
173
|
margin-bottom: 8px;
|
163
174
|
}
|
164
175
|
}
|
165
176
|
.open {
|
166
|
-
max-height:
|
177
|
+
max-height: 200px;
|
167
178
|
}
|
168
179
|
.close {
|
169
|
-
max-height:
|
180
|
+
max-height: 40px;
|
181
|
+
overflow: hidden;
|
170
182
|
}
|
171
183
|
}
|
172
184
|
|
package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js
CHANGED
@@ -69,6 +69,7 @@ function PaymentWorkOrderCard(props) {
|
|
69
69
|
workPayStatus = record.workPayStatus,
|
70
70
|
operateTime = record.operateTime,
|
71
71
|
operateNick = record.operateNick,
|
72
|
+
paymentOrderKey = record.paymentOrderKey,
|
72
73
|
workPayFee = record.workPayFee,
|
73
74
|
shopName = record.shopName,
|
74
75
|
buyerNick = record.buyerNick,
|
@@ -200,6 +201,9 @@ function PaymentWorkOrderCard(props) {
|
|
200
201
|
}, {
|
201
202
|
label: '提交客服:',
|
202
203
|
value: operateNick
|
204
|
+
}, {
|
205
|
+
label: '工单编号:',
|
206
|
+
value: paymentOrderKey
|
203
207
|
}])
|
204
208
|
}), /*#__PURE__*/_jsx(Divider, {
|
205
209
|
dashed: true,
|
@@ -4,8 +4,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
4
4
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
8
|
+
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
10
|
+
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
12
|
+
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
14
|
+
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
16
|
+
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
|
+
|
19
|
+
import React, { useEffect, useState } from 'react';
|
20
|
+
import { Select, Pagination, DatePicker, Checkbox, message, Input, Form, Row, Col, Button, Tooltip } from 'antd';
|
9
21
|
import { useAppSelector, useAppDispatch } from "../../../model/hooks";
|
10
22
|
import { fetchQueryPaymentWorkOrderList } from "../../../model/workOrder";
|
11
23
|
import PaymentWorkOrderCard from "./components/PaymentWorkOrderCard";
|
@@ -15,7 +27,6 @@ import UnExamineModal from "./components/UnExamineModal";
|
|
15
27
|
import DeletePaymentWorkOrderModal from "./components/DeletePaymentWorkOrderModal";
|
16
28
|
import FlagPayModal from "./components/FlagPayModal";
|
17
29
|
import PaymentFormModal from "./components/PaymentFormModal";
|
18
|
-
import refreshImg from "../../../common/imgs/refresh.png";
|
19
30
|
import emptyImg from "../../../common/imgs/empty.png";
|
20
31
|
import { PAY_STATUS } from "../../../common/constant";
|
21
32
|
import { setPaymentFormModalVisible, setCurrentPaymentRecord } from "../../../model/paymentWorkOrder";
|
@@ -28,8 +39,6 @@ var RangePicker = DatePicker.RangePicker;
|
|
28
39
|
|
29
40
|
//打款工单列表
|
30
41
|
var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
31
|
-
var _paySearch$time;
|
32
|
-
|
33
42
|
var tabActive = _ref.tabActive;
|
34
43
|
var dispatch = useAppDispatch();
|
35
44
|
var payOrderList = useAppSelector(function (state) {
|
@@ -52,9 +61,19 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
52
61
|
var buyerNick = platformInfo.buyerNick,
|
53
62
|
buyerId = platformInfo.buyerId,
|
54
63
|
platform = platformInfo.platform;
|
64
|
+
|
65
|
+
var _useState = useState(true),
|
66
|
+
_useState2 = _slicedToArray(_useState, 2),
|
67
|
+
open = _useState2[0],
|
68
|
+
setOpen = _useState2[1];
|
69
|
+
|
70
|
+
var _Form$useForm = Form.useForm(),
|
71
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
72
|
+
form = _Form$useForm2[0];
|
73
|
+
|
55
74
|
useEffect(function () {
|
56
75
|
setTimeout(onSearch, 0); // TODO: 让请求在下一个任务中执行,前一个任务获取不到redux中的数据
|
57
|
-
}, [
|
76
|
+
}, [buyerNick, buyerId]);
|
58
77
|
|
59
78
|
var onSearch = function onSearch() {
|
60
79
|
dispatch(fetchQueryPaymentWorkOrderList());
|
@@ -101,55 +120,118 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
101
120
|
});
|
102
121
|
};
|
103
122
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
123
|
+
var resetHandle = function resetHandle() {
|
124
|
+
dispatch({
|
125
|
+
type: 'workOrder/setState',
|
126
|
+
payload: {
|
127
|
+
paySearch: {
|
128
|
+
pageNo: 1,
|
129
|
+
pageSize: 20,
|
130
|
+
time: [moment().subtract(31, 'day').startOf('day'), moment().endOf('day')],
|
131
|
+
workPayStatus: '',
|
132
|
+
tid: '',
|
133
|
+
paymentOrderKey: '',
|
134
|
+
isBuyer: false
|
135
|
+
}
|
136
|
+
}
|
137
|
+
});
|
138
|
+
form.setFieldsValue({
|
139
|
+
time: [moment().subtract(31, 'day').startOf('day'), moment().endOf('day')],
|
140
|
+
workPayStatus: '',
|
141
|
+
tid: '',
|
142
|
+
paymentOrderKey: ''
|
143
|
+
});
|
144
|
+
};
|
145
|
+
|
146
|
+
var onFieldsChange = function onFieldsChange(changedFields, allFields) {
|
147
|
+
var _changedFields$ = changedFields[0],
|
148
|
+
name = _changedFields$.name,
|
149
|
+
value = _changedFields$.value;
|
150
|
+
upDateState(name[0], value);
|
151
|
+
};
|
152
|
+
|
153
|
+
var searchForm = /*#__PURE__*/_jsxs("div", {
|
154
|
+
children: [/*#__PURE__*/_jsx(Form, {
|
155
|
+
form: form,
|
156
|
+
className: "customizeSearch ".concat(open ? 'open' : 'close'),
|
157
|
+
initialValues: paySearch,
|
158
|
+
onFieldsChange: onFieldsChange,
|
159
|
+
children: /*#__PURE__*/_jsxs(Row, {
|
160
|
+
gutter: 24,
|
161
|
+
children: [/*#__PURE__*/_jsx(Col, {
|
162
|
+
span: 24,
|
163
|
+
children: /*#__PURE__*/_jsxs("div", {
|
164
|
+
style: {
|
165
|
+
display: 'flex',
|
166
|
+
alignItems: 'center'
|
167
|
+
},
|
168
|
+
children: [/*#__PURE__*/_jsx("span", {
|
169
|
+
style: {
|
170
|
+
width: '64px'
|
171
|
+
},
|
172
|
+
children: "\u63D0\u4EA4\u65F6\u95F4"
|
173
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
174
|
+
name: "time",
|
175
|
+
children: /*#__PURE__*/_jsx(RangePicker, {
|
176
|
+
placeholder: ['开始提交时间', '结束提交时间']
|
177
|
+
})
|
178
|
+
})]
|
179
|
+
})
|
180
|
+
}), /*#__PURE__*/_jsx(Col, {
|
181
|
+
span: 8,
|
182
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
183
|
+
name: "workPayStatus",
|
184
|
+
children: /*#__PURE__*/_jsx(Select, {
|
185
|
+
children: PAY_STATUS.map(function (item) {
|
186
|
+
return /*#__PURE__*/_jsx(Select.Option, {
|
187
|
+
value: item.value,
|
188
|
+
children: item.label
|
189
|
+
}, item.value);
|
190
|
+
})
|
191
|
+
})
|
192
|
+
})
|
193
|
+
}), /*#__PURE__*/_jsx(Col, {
|
194
|
+
span: 8,
|
195
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
196
|
+
placement: "topLeft",
|
197
|
+
title: "\u8BF7\u8F93\u5165\u8BA2\u5355\u7F16\u53F7",
|
198
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
199
|
+
name: "tid",
|
200
|
+
children: /*#__PURE__*/_jsx(Input, {
|
201
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BA2\u5355\u7F16\u53F7"
|
202
|
+
})
|
203
|
+
})
|
204
|
+
})
|
205
|
+
}), /*#__PURE__*/_jsx(Col, {
|
206
|
+
span: 8,
|
207
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
208
|
+
placement: "topLeft",
|
209
|
+
title: "\u8BF7\u8F93\u5165\u5DE5\u5355\u7F16\u53F7",
|
210
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
211
|
+
name: "paymentOrderKey",
|
212
|
+
children: /*#__PURE__*/_jsx(Input, {
|
213
|
+
placeholder: "\u8BF7\u8F93\u5165\u5DE5\u5355\u7F16\u53F7"
|
214
|
+
})
|
215
|
+
})
|
216
|
+
})
|
217
|
+
})]
|
119
218
|
})
|
120
219
|
}), /*#__PURE__*/_jsxs("div", {
|
121
|
-
className: "
|
122
|
-
children: [/*#__PURE__*/_jsxs("
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
220
|
+
className: "bottom-actions",
|
221
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
222
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
223
|
+
type: "primary",
|
224
|
+
onClick: onSearch,
|
225
|
+
children: "\u67E5\u8BE2"
|
226
|
+
}), /*#__PURE__*/_jsx(Button, {
|
227
|
+
onClick: resetHandle,
|
228
|
+
style: {
|
229
|
+
marginLeft: 16
|
129
230
|
},
|
130
|
-
children:
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
value: "auditTime",
|
135
|
-
children: "\u5BA1\u6838\u65F6\u95F4"
|
136
|
-
}), /*#__PURE__*/_jsx(Select.Option, {
|
137
|
-
value: "playWithTime",
|
138
|
-
children: "\u6253\u6B3E\u65F6\u95F4"
|
139
|
-
})]
|
140
|
-
}), /*#__PURE__*/_jsx(Select, {
|
141
|
-
className: "custom_box_search_cascader",
|
142
|
-
value: paySearch.workPayStatus,
|
143
|
-
onChange: function onChange(val) {
|
144
|
-
return upDateState('workPayStatus', val);
|
145
|
-
},
|
146
|
-
children: PAY_STATUS.map(function (item) {
|
147
|
-
return /*#__PURE__*/_jsx(Select.Option, {
|
148
|
-
value: item.value,
|
149
|
-
children: item.label
|
150
|
-
}, item.value);
|
151
|
-
})
|
152
|
-
}), /*#__PURE__*/_jsx(Checkbox, {
|
231
|
+
children: "\u91CD\u7F6E"
|
232
|
+
})]
|
233
|
+
}), /*#__PURE__*/_jsxs("span", {
|
234
|
+
children: [/*#__PURE__*/_jsx(Checkbox, {
|
153
235
|
className: "custom_box_search_buyer",
|
154
236
|
checked: paySearch.isBuyer,
|
155
237
|
onChange: function onChange(e) {
|
@@ -160,29 +242,39 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
160
242
|
upDateState('isBuyer', e.target.checked);
|
161
243
|
},
|
162
244
|
children: "\u5F53\u524D\u4E70\u5BB6"
|
163
|
-
}), /*#__PURE__*/_jsx(
|
164
|
-
|
165
|
-
|
166
|
-
return
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
return item.format('YYYY-MM-DD HH:mm:ss');
|
172
|
-
}));
|
173
|
-
}
|
245
|
+
}), /*#__PURE__*/_jsx("span", {
|
246
|
+
className: "action_collapse",
|
247
|
+
onClick: function onClick() {
|
248
|
+
return setOpen(function (v) {
|
249
|
+
return !v;
|
250
|
+
});
|
251
|
+
},
|
252
|
+
children: open ? '收起' : '展开'
|
174
253
|
})]
|
175
|
-
})
|
176
|
-
|
177
|
-
|
178
|
-
|
254
|
+
})]
|
255
|
+
})]
|
256
|
+
});
|
257
|
+
|
258
|
+
return /*#__PURE__*/_jsxs("div", {
|
259
|
+
className: "custom_box",
|
260
|
+
style: {
|
261
|
+
display: tabActive === 'payment' ? 'block' : 'none'
|
262
|
+
},
|
263
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
264
|
+
className: "bottom-actions",
|
265
|
+
children: [/*#__PURE__*/_jsx("div", {
|
266
|
+
children: "\u9ED8\u8BA4\u6700\u8FD130\u5929\u7684\u5168\u90E8\u5DE5\u5355"
|
267
|
+
}), /*#__PURE__*/_jsx(Button, {
|
268
|
+
type: "primary",
|
269
|
+
size: "small",
|
270
|
+
ghost: true,
|
271
|
+
style: {
|
272
|
+
float: 'right'
|
179
273
|
},
|
180
|
-
|
181
|
-
|
182
|
-
alt: ""
|
183
|
-
})
|
274
|
+
onClick: handleAddPaymentWorkOrder,
|
275
|
+
children: "+\u65B0\u5EFA\u5DE5\u5355"
|
184
276
|
})]
|
185
|
-
}), /*#__PURE__*/_jsx("div", {
|
277
|
+
}), searchForm, /*#__PURE__*/_jsx("div", {
|
186
278
|
className: "payment_box_main payment_box_main_".concat(platform),
|
187
279
|
children: payOrderList.length ? payOrderList.map(function (item) {
|
188
280
|
return /*#__PURE__*/_jsx(PaymentWorkOrderCard, {
|
@@ -42,7 +42,6 @@ import BasicComponent from "../../BasicComponent";
|
|
42
42
|
import { ApaasCheckbox } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
43
43
|
import { getFormItem } from "../../common/formItemWrap";
|
44
44
|
import { jsx as _jsx } from "react/jsx-runtime";
|
45
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
46
45
|
|
47
46
|
var BasicCheckBox = /*#__PURE__*/function (_BasicComponent) {
|
48
47
|
_inherits(BasicCheckBox, _BasicComponent);
|
@@ -57,19 +56,27 @@ var BasicCheckBox = /*#__PURE__*/function (_BasicComponent) {
|
|
57
56
|
_this = _super.call(this, options);
|
58
57
|
|
59
58
|
_defineProperty(_assertThisInitialized(_this), "render", function (value) {
|
60
|
-
var _value$value;
|
59
|
+
var _value$value, _value$value2;
|
61
60
|
|
62
|
-
|
63
|
-
|
61
|
+
var findIndex = value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.findIndex(function (item) {
|
62
|
+
return item === '其他';
|
63
|
+
});
|
64
|
+
|
65
|
+
if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
|
66
|
+
value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
|
67
|
+
}
|
68
|
+
|
69
|
+
return /*#__PURE__*/_jsx("span", {
|
70
|
+
children: value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.join('/')
|
64
71
|
});
|
65
72
|
});
|
66
73
|
|
67
74
|
_defineProperty(_assertThisInitialized(_this), "customRules", function () {
|
68
75
|
return [{
|
69
76
|
validator: function validator(_, value) {
|
70
|
-
var _value$
|
77
|
+
var _value$value3;
|
71
78
|
|
72
|
-
if (!(value !== null && value !== void 0 && (_value$
|
79
|
+
if (!(value !== null && value !== void 0 && (_value$value3 = value.value) !== null && _value$value3 !== void 0 && _value$value3.length)) {
|
73
80
|
return Promise.reject(new Error('请选择'));
|
74
81
|
}
|
75
82
|
|
@@ -92,9 +99,9 @@ var BasicCheckBox = /*#__PURE__*/function (_BasicComponent) {
|
|
92
99
|
});
|
93
100
|
|
94
101
|
_defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
|
95
|
-
var _value$
|
102
|
+
var _value$value4;
|
96
103
|
|
97
|
-
return "".concat(value === null || value === void 0 ? void 0 : (_value$
|
104
|
+
return "".concat(value === null || value === void 0 ? void 0 : (_value$value4 = value.value) === null || _value$value4 === void 0 ? void 0 : _value$value4.join('/'), " ").concat((value === null || value === void 0 ? void 0 : value.other) || '');
|
98
105
|
});
|
99
106
|
|
100
107
|
_defineProperty(_assertThisInitialized(_this), "getColumns", function () {
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicComponent from '../../BasicComponent';
|
3
|
+
declare class CommonDataTime extends BasicComponent {
|
4
|
+
constructor(options: any);
|
5
|
+
render: (value: any, record: any) => JSX.Element;
|
6
|
+
editRender: () => null;
|
7
|
+
renderExport: (value: any, record: any) => string;
|
8
|
+
getColumns: () => any;
|
9
|
+
}
|
10
|
+
export default CommonDataTime;
|
@@ -0,0 +1,90 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
+
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
+
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
+
|
7
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
8
|
+
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
10
|
+
|
11
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12
|
+
|
13
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
14
|
+
|
15
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
16
|
+
|
17
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
18
|
+
|
19
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
20
|
+
|
21
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
22
|
+
|
23
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
24
|
+
|
25
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
26
|
+
|
27
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
28
|
+
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
30
|
+
|
31
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
32
|
+
|
33
|
+
import React from 'react';
|
34
|
+
import BasicComponent from "../../BasicComponent";
|
35
|
+
import moment from 'moment';
|
36
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
37
|
+
|
38
|
+
var CommonDataTime = /*#__PURE__*/function (_BasicComponent) {
|
39
|
+
_inherits(CommonDataTime, _BasicComponent);
|
40
|
+
|
41
|
+
var _super = _createSuper(CommonDataTime);
|
42
|
+
|
43
|
+
function CommonDataTime(options) {
|
44
|
+
var _thisSuper, _this;
|
45
|
+
|
46
|
+
_classCallCheck(this, CommonDataTime);
|
47
|
+
|
48
|
+
_this = _super.call(this, options);
|
49
|
+
|
50
|
+
_defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
|
51
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
52
|
+
return /*#__PURE__*/_jsx("span", {
|
53
|
+
children: "--"
|
54
|
+
});
|
55
|
+
}
|
56
|
+
|
57
|
+
return /*#__PURE__*/_jsx("span", {
|
58
|
+
children: moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss')
|
59
|
+
});
|
60
|
+
});
|
61
|
+
|
62
|
+
_defineProperty(_assertThisInitialized(_this), "editRender", function () {
|
63
|
+
return null;
|
64
|
+
});
|
65
|
+
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
|
67
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
68
|
+
return '--';
|
69
|
+
}
|
70
|
+
|
71
|
+
return moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss');
|
72
|
+
});
|
73
|
+
|
74
|
+
_defineProperty(_assertThisInitialized(_this), "getColumns", function () {
|
75
|
+
return _objectSpread(_objectSpread({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(CommonDataTime.prototype)), "getColumns", _thisSuper).call(_thisSuper)), {}, {
|
76
|
+
renderExport: _this.renderExport
|
77
|
+
});
|
78
|
+
});
|
79
|
+
|
80
|
+
_this.canFilter = true;
|
81
|
+
_this.canGroup = true;
|
82
|
+
_this.canHidden = true;
|
83
|
+
_this.editable = true;
|
84
|
+
return _this;
|
85
|
+
}
|
86
|
+
|
87
|
+
return _createClass(CommonDataTime);
|
88
|
+
}(BasicComponent);
|
89
|
+
|
90
|
+
export default CommonDataTime;
|
@@ -54,7 +54,7 @@ var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
|
|
54
54
|
_this = _super.call(this, options);
|
55
55
|
|
56
56
|
_defineProperty(_assertThisInitialized(_this), "render", function (value) {
|
57
|
-
return value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
57
|
+
return value.length ? value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
58
58
|
return /*#__PURE__*/_jsx("div", {
|
59
59
|
style: {
|
60
60
|
marginRight: '5px',
|
@@ -64,11 +64,11 @@ var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
|
|
64
64
|
width: 32,
|
65
65
|
src: imgResize(pic || ''),
|
66
66
|
preview: {
|
67
|
-
src: pic
|
67
|
+
src: imgResize(pic || '', 0, 0)
|
68
68
|
}
|
69
69
|
})
|
70
70
|
});
|
71
|
-
});
|
71
|
+
}) : /*#__PURE__*/_jsx("div", {});
|
72
72
|
});
|
73
73
|
|
74
74
|
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
@@ -69,7 +69,7 @@ var BasicRadio = /*#__PURE__*/function (_BasicComponent) {
|
|
69
69
|
var _value$value;
|
70
70
|
|
71
71
|
return /*#__PURE__*/_jsxs("span", {
|
72
|
-
children: [value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other)]
|
72
|
+
children: [value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")")]
|
73
73
|
});
|
74
74
|
});
|
75
75
|
|
@@ -75,7 +75,7 @@ export var showImage = function showImage(_ref2) {
|
|
75
75
|
}), /*#__PURE__*/_jsxs("div", {
|
76
76
|
className: styles.options,
|
77
77
|
children: [type === 'itemId' && /*#__PURE__*/_jsx(TextTool, {
|
78
|
-
title: '
|
78
|
+
title: '商品id',
|
79
79
|
text: item.numIid
|
80
80
|
}), type === 'itemCode' && /*#__PURE__*/_jsx(TextTool, {
|
81
81
|
title: '商品编码',
|
@@ -168,7 +168,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
168
168
|
})
|
169
169
|
}), /*#__PURE__*/_jsxs("div", {
|
170
170
|
children: [type === 'itemId' && /*#__PURE__*/_jsx(TextTool, {
|
171
|
-
title: '
|
171
|
+
title: '商品id',
|
172
172
|
text: i.numIid
|
173
173
|
}), type === 'itemCode' && /*#__PURE__*/_jsx(TextTool, {
|
174
174
|
title: '商品编码',
|
@@ -111,11 +111,11 @@ var ELogistics = /*#__PURE__*/function (_BasicComponent) {
|
|
111
111
|
});
|
112
112
|
|
113
113
|
_this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
114
|
-
name: '
|
114
|
+
name: '快递物流公司',
|
115
115
|
id: "".concat(options.id, "_expressLogisticsCompany")
|
116
116
|
}));
|
117
117
|
_this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
118
|
-
name: '
|
118
|
+
name: '快递物流单号',
|
119
119
|
id: "".concat(options.id, "_expressLogisticsCode")
|
120
120
|
}));
|
121
121
|
_this.canHidden = true;
|
@@ -40,12 +40,18 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
40
40
|
import React from 'react';
|
41
41
|
import BasicComponent from "../../BasicComponent";
|
42
42
|
import { getFormItem } from "../../common/formItemWrap";
|
43
|
-
import { Remark } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
43
|
+
import { Remark } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
44
|
+
import trade0 from "../../../../../assets/flag/trade-icon-flag-0.png";
|
45
|
+
import trade1 from "../../../../../assets/flag/trade-icon-flag-1.png";
|
46
|
+
import trade2 from "../../../../../assets/flag/trade-icon-flag-2.png";
|
47
|
+
import trade3 from "../../../../../assets/flag/trade-icon-flag-3.png";
|
48
|
+
import trade4 from "../../../../../assets/flag/trade-icon-flag-4.png";
|
49
|
+
import trade5 from "../../../../../assets/flag/trade-icon-flag-5.png";
|
50
|
+
import { get } from 'lodash'; // const flagColors = ['gray', 'red', 'yellow', 'green', 'blue', 'purple'];
|
44
51
|
|
45
|
-
import { get } from 'lodash';
|
46
52
|
import { jsx as _jsx } from "react/jsx-runtime";
|
47
53
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
48
|
-
var
|
54
|
+
var imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
|
49
55
|
|
50
56
|
var ERemark = /*#__PURE__*/function (_BasicComponent) {
|
51
57
|
_inherits(ERemark, _BasicComponent);
|
@@ -64,8 +70,8 @@ var ERemark = /*#__PURE__*/function (_BasicComponent) {
|
|
64
70
|
style: {
|
65
71
|
display: 'inline-block'
|
66
72
|
},
|
67
|
-
children: [get(value, 'flag')
|
68
|
-
|
73
|
+
children: [get(value, 'flag') ? /*#__PURE__*/_jsx("img", {
|
74
|
+
src: imgList[get(value, 'flag')]
|
69
75
|
}) : null, /*#__PURE__*/_jsx("span", {
|
70
76
|
children: get(value, 'remark')
|
71
77
|
})]
|
@@ -58,7 +58,7 @@ var Express = /*#__PURE__*/function (_BasicComponent) {
|
|
58
58
|
|
59
59
|
_defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
|
60
60
|
return /*#__PURE__*/_jsx("span", {
|
61
|
-
children: express.getExpressNameByCode(value)
|
61
|
+
children: express.getExpressNameByCode(value) || value
|
62
62
|
});
|
63
63
|
});
|
64
64
|
|