kmkf-work-order-service-component 0.3.5-alpha.1 → 0.3.5
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/WorkOrder/components/Widget/index.d.ts +1 -2
- package/dist/esm/WorkOrder/components/Widget/index.js +0 -4
- package/dist/esm/WorkOrder/index.js +12 -0
- package/dist/esm/common/utils/tools.js +6 -14
- package/dist/esm/model/customizeWorkOrder/index.js +8 -0
- package/dist/esm/model/paymentWorkOrder/index.js +8 -0
- package/package.json +2 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Rate/index.d.ts +0 -13
- package/dist/esm/WorkOrder/components/Widget/basic/Rate/index.js +0 -144
@@ -9,7 +9,6 @@ import BasicMultSelect from '../Widget/basic/MultSelect';
|
|
9
9
|
import BasicCascader from '../Widget/basic/Cascader';
|
10
10
|
import BasicAddress from '../Widget/basic/Address';
|
11
11
|
import BasicGrade from '../Widget/basic/Grade';
|
12
|
-
import BasicRate from '../Widget/basic/Rate';
|
13
12
|
import EBuyerNick from '../Widget/electricity/EBuyerNick';
|
14
13
|
import EReceiverAddress from '../Widget/electricity/EReceiverAddress';
|
15
14
|
import ELogistics from '../Widget/electricity/ELogistics';
|
@@ -23,4 +22,4 @@ import Status from '../Widget/third/Status';
|
|
23
22
|
import Ordinary from '../Widget/third/Ordinary';
|
24
23
|
import ItemSelectThird from '../Widget/third/ItemSelect';
|
25
24
|
import Payment from '../Widget/third/Payment';
|
26
|
-
export declare const factory: (type: string, options: any) =>
|
25
|
+
export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment;
|
@@ -9,7 +9,6 @@ import BasicMultSelect from "../Widget/basic/MultSelect";
|
|
9
9
|
import BasicCascader from "../Widget/basic/Cascader";
|
10
10
|
import BasicAddress from "../Widget/basic/Address";
|
11
11
|
import BasicGrade from "../Widget/basic/Grade";
|
12
|
-
import BasicRate from "../Widget/basic/Rate";
|
13
12
|
import EShopName from "../Widget/electricity/ShopName";
|
14
13
|
import ETradeId from "../Widget/electricity/ETradeId";
|
15
14
|
import EBuyerNick from "../Widget/electricity/EBuyerNick";
|
@@ -65,9 +64,6 @@ export var factory = function factory(type, options) {
|
|
65
64
|
case 'BASIC_GRADE':
|
66
65
|
return new BasicGrade(options);
|
67
66
|
|
68
|
-
case 'RATE':
|
69
|
-
return new BasicRate(options);
|
70
|
-
|
71
67
|
case 'SHOP_NAME_INPUT':
|
72
68
|
return new EShopName(options);
|
73
69
|
|
@@ -96,6 +96,18 @@ var WorkOrder = function WorkOrder(props) {
|
|
96
96
|
useEffect(function () {
|
97
97
|
initHandle();
|
98
98
|
}, []);
|
99
|
+
useEffect(function () {
|
100
|
+
console.log('工单模块加载');
|
101
|
+
return function () {
|
102
|
+
console.log('工单模块卸载');
|
103
|
+
dispatch({
|
104
|
+
type: 'customizeWorkOrder/closeAllModal'
|
105
|
+
});
|
106
|
+
dispatch({
|
107
|
+
type: 'paymentWorkOrder/closeAllModal'
|
108
|
+
});
|
109
|
+
};
|
110
|
+
}, []);
|
99
111
|
useLayoutEffect(function () {
|
100
112
|
var _document$getElementB;
|
101
113
|
|
@@ -149,12 +149,6 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
149
149
|
content: get(nowData, "".concat(item.uniqueKey), ''),
|
150
150
|
name: item.name
|
151
151
|
});
|
152
|
-
} else if (item.workOrderComponentType === 'RATE') {
|
153
|
-
contentVoList.push({
|
154
|
-
uniqueKey: "".concat(item.uniqueKey, "_rate"),
|
155
|
-
content: JSON.stringify(get(nowData, "".concat(item.uniqueKey), [])),
|
156
|
-
name: item.name
|
157
|
-
});
|
158
152
|
} else if (item.workOrderComponentType === 'BUYER_NICK_INPUT') {
|
159
153
|
contentVoList.push({
|
160
154
|
uniqueKey: "".concat(item.uniqueKey, "_buyerNick"),
|
@@ -497,8 +491,6 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
497
491
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_select")] || (config === null || config === void 0 ? void 0 : config.select)));
|
498
492
|
} else if (nex.workOrderComponentType === 'BASIC_GRADE') {
|
499
493
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_basicGrade")]));
|
500
|
-
} else if (nex.workOrderComponentType === 'RATE') {
|
501
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_rate")], [])));
|
502
494
|
} else if (nex.workOrderComponentType === 'TRADE_ID_INPUT') {
|
503
495
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_tradeId")]));
|
504
496
|
} else if (nex.workOrderComponentType === 'BUYER_NICK_INPUT') {
|
@@ -577,20 +569,20 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
577
569
|
remark: item.jsonMap["".concat(nex.uniqueKey, "_remark")] || (config === null || config === void 0 ? void 0 : config.remark) || ''
|
578
570
|
}));
|
579
571
|
} else if (nex.workOrderComponentType === 'STATUS') {
|
580
|
-
var
|
572
|
+
var _objectSpread28;
|
581
573
|
|
582
|
-
return _objectSpread(_objectSpread({}, cur), {}, (
|
574
|
+
return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread28 = {}, _defineProperty(_objectSpread28, "".concat(nex.uniqueKey), {
|
583
575
|
status: item.jsonMap["".concat(nex.uniqueKey, "_status")] || config.status,
|
584
576
|
customerService: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_customerService")], item.jsonMap["".concat(nex.uniqueKey, "_customerService")])
|
585
|
-
}), _defineProperty(
|
577
|
+
}), _defineProperty(_objectSpread28, "".concat(nex.uniqueKey, "_processTime"), item.jsonMap['processTime']), _defineProperty(_objectSpread28, "".concat(nex.uniqueKey, "_lastProcessingTime"), item.jsonMap['lastProcessingTime']), _objectSpread28));
|
586
578
|
} else if (nex.workOrderComponentType === 'ORDINARY_INVOICE') {
|
587
|
-
var
|
579
|
+
var _objectSpread29;
|
588
580
|
|
589
|
-
return _objectSpread(_objectSpread({}, cur), {}, (
|
581
|
+
return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread29 = {}, _defineProperty(_objectSpread29, "".concat(nex.uniqueKey), {
|
590
582
|
ordinaryMoney: item.jsonMap["".concat(nex.uniqueKey, "_ordinaryMoney")],
|
591
583
|
ordinarySerial: item.jsonMap["".concat(nex.uniqueKey, "_ordinarySerial")],
|
592
584
|
ordinaryTaitou: item.jsonMap["".concat(nex.uniqueKey, "_ordinaryTaitou")]
|
593
|
-
}), _defineProperty(
|
585
|
+
}), _defineProperty(_objectSpread29, "".concat(nex.uniqueKey, "_ordinaryMoney"), item.jsonMap["".concat(nex.uniqueKey, "_ordinaryMoney")] ? Number(item.jsonMap["".concat(nex.uniqueKey, "_ordinaryMoney")]).toFixed(2) : null), _objectSpread29));
|
594
586
|
} else if (nex.workOrderComponentType === 'ITEM_SELECT') {
|
595
587
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_itemList")], [])));
|
596
588
|
} else if (nex.workOrderComponentType === 'ITEM_ENCODE') {
|
@@ -123,6 +123,14 @@ var slice = createSlice({
|
|
123
123
|
setCurrentCustomizeRecord: function setCurrentCustomizeRecord(state, _ref11) {
|
124
124
|
var payload = _ref11.payload;
|
125
125
|
state.currentCustomizeRecord = payload;
|
126
|
+
},
|
127
|
+
closeAllModal: function closeAllModal(state, _ref12) {
|
128
|
+
var payload = _ref12.payload;
|
129
|
+
state.deleteCustomizeWorkOrderModalVisible = false;
|
130
|
+
state.selectDealerModalVisible = false;
|
131
|
+
state.statusSelectModalVisible = false;
|
132
|
+
state.logModalVisible = false;
|
133
|
+
state.formModalVisible = false;
|
126
134
|
}
|
127
135
|
}
|
128
136
|
});
|
@@ -46,6 +46,14 @@ var slice = createSlice({
|
|
46
46
|
setPaymentFormModalVisible: function setPaymentFormModalVisible(state, _ref7) {
|
47
47
|
var payload = _ref7.payload;
|
48
48
|
state.paymentFormModalVisible = payload;
|
49
|
+
},
|
50
|
+
closeAllModal: function closeAllModal(state) {
|
51
|
+
state.paymentWorkOrderExamineModalVisible = false;
|
52
|
+
state.paymentWorkOrderUnExamineModalVisible = false;
|
53
|
+
state.deletePaymentWorkOrderVisible = false;
|
54
|
+
state.flagPayModalVisible = false;
|
55
|
+
state.logModalVisible = false;
|
56
|
+
state.paymentFormModalVisible = false;
|
49
57
|
}
|
50
58
|
}
|
51
59
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "kmkf-work-order-service-component",
|
3
|
-
"version": "0.3.5
|
3
|
+
"version": "0.3.5",
|
4
4
|
"scripts": {
|
5
5
|
"start": "dumi dev",
|
6
6
|
"docs:build": "dumi build",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
41
|
"@ant-design/icons": "^4.7.0",
|
42
|
-
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.
|
42
|
+
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.29-alpha.2",
|
43
43
|
"@reduxjs/toolkit": "^1.8.5",
|
44
44
|
"copy-to-clipboard": "^3.3.3",
|
45
45
|
"js-md5": "^0.7.3",
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import BasicComponent from '../../BasicComponent';
|
3
|
-
declare class BasicRate extends BasicComponent {
|
4
|
-
constructor(options: any);
|
5
|
-
render: (value: any) => JSX.Element;
|
6
|
-
customRules: () => {
|
7
|
-
required: boolean;
|
8
|
-
validator: (_: any, value: any) => Promise<void>;
|
9
|
-
}[];
|
10
|
-
renderExport: (value: any, record: any) => any;
|
11
|
-
editRender: (value: any) => JSX.Element;
|
12
|
-
}
|
13
|
-
export default BasicRate;
|
@@ -1,144 +0,0 @@
|
|
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 _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
26
|
-
|
27
|
-
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; }
|
28
|
-
|
29
|
-
import React from 'react';
|
30
|
-
import BasicComponent from "../../BasicComponent";
|
31
|
-
import { ApaasRate } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
32
|
-
import { getFormItem } from "../../common/formItemWrap";
|
33
|
-
import { Rate } from 'antd'; //状态文字映射
|
34
|
-
|
35
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
36
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
37
|
-
var RATE_MAP = {
|
38
|
-
0: '',
|
39
|
-
0.5: '非常差',
|
40
|
-
1: '非常差',
|
41
|
-
1.5: '差',
|
42
|
-
2: '差',
|
43
|
-
2.5: '一般',
|
44
|
-
3: '一般',
|
45
|
-
3.5: '好',
|
46
|
-
4: '好',
|
47
|
-
4.5: '非常好',
|
48
|
-
5: '非常好'
|
49
|
-
};
|
50
|
-
|
51
|
-
var BasicRate = /*#__PURE__*/function (_BasicComponent) {
|
52
|
-
_inherits(BasicRate, _BasicComponent);
|
53
|
-
|
54
|
-
var _super = _createSuper(BasicRate);
|
55
|
-
|
56
|
-
function BasicRate(options) {
|
57
|
-
var _this;
|
58
|
-
|
59
|
-
_classCallCheck(this, BasicRate);
|
60
|
-
|
61
|
-
_this = _super.call(this, options);
|
62
|
-
|
63
|
-
_defineProperty(_assertThisInitialized(_this), "render", function (value) {
|
64
|
-
return /*#__PURE__*/_jsx("div", {
|
65
|
-
children: value.map(function (item) {
|
66
|
-
return /*#__PURE__*/_jsxs("div", {
|
67
|
-
children: [/*#__PURE__*/_jsx("span", {
|
68
|
-
style: {
|
69
|
-
marginRight: '8px'
|
70
|
-
},
|
71
|
-
children: item.name
|
72
|
-
}), /*#__PURE__*/_jsx(Rate, {
|
73
|
-
value: item.value,
|
74
|
-
style: {
|
75
|
-
color: 'red',
|
76
|
-
fontSize: '12px'
|
77
|
-
},
|
78
|
-
disabled: true
|
79
|
-
}), /*#__PURE__*/_jsx("span", {
|
80
|
-
style: {
|
81
|
-
color: 'red',
|
82
|
-
fontSize: '12px'
|
83
|
-
},
|
84
|
-
children: RATE_MAP[item.value]
|
85
|
-
})]
|
86
|
-
}, item.id);
|
87
|
-
})
|
88
|
-
});
|
89
|
-
});
|
90
|
-
|
91
|
-
_defineProperty(_assertThisInitialized(_this), "customRules", function () {
|
92
|
-
return [{
|
93
|
-
required: true,
|
94
|
-
validator: function validator(_, value) {
|
95
|
-
if (value && !value.length) {
|
96
|
-
return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat(_this.name)));
|
97
|
-
}
|
98
|
-
|
99
|
-
return Promise.resolve();
|
100
|
-
}
|
101
|
-
}];
|
102
|
-
});
|
103
|
-
|
104
|
-
_defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
|
105
|
-
var textArr = value.reduce(function (prv, next) {
|
106
|
-
if (next.value) {
|
107
|
-
prv.push("".concat(next.name, ":").concat(next.value, "\u661F"));
|
108
|
-
}
|
109
|
-
|
110
|
-
return prv;
|
111
|
-
}, []);
|
112
|
-
return textArr.join(';');
|
113
|
-
});
|
114
|
-
|
115
|
-
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
116
|
-
return getFormItem(_objectSpread({
|
117
|
-
title: _this.name,
|
118
|
-
name: _this.id,
|
119
|
-
rules: _this.componentConfig.required ? _this.customRules() : [],
|
120
|
-
required: false,
|
121
|
-
component: /*#__PURE__*/_jsx(ApaasRate, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
122
|
-
allowClear: false,
|
123
|
-
style: {
|
124
|
-
color: '#FD5105'
|
125
|
-
},
|
126
|
-
textStyle: {
|
127
|
-
color: '#FD5105'
|
128
|
-
}
|
129
|
-
}))
|
130
|
-
}, value));
|
131
|
-
});
|
132
|
-
|
133
|
-
_this.canFilter = false;
|
134
|
-
_this.canGroup = false;
|
135
|
-
_this.canHidden = true;
|
136
|
-
_this.editable = true;
|
137
|
-
_this.dataType = 'array';
|
138
|
-
return _this;
|
139
|
-
}
|
140
|
-
|
141
|
-
return _createClass(BasicRate);
|
142
|
-
}(BasicComponent);
|
143
|
-
|
144
|
-
export default BasicRate;
|