kmkf-work-order-service-component 0.4.0-alpha.8 → 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 +84 -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
@@ -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
|
|
@@ -10,6 +10,7 @@ import BasicCascader from '../Widget/basic/Cascader';
|
|
10
10
|
import BasicAddress from '../Widget/basic/Address';
|
11
11
|
import BasicGrade from '../Widget/basic/Grade';
|
12
12
|
import BasicRate from '../Widget/basic/Rate';
|
13
|
+
import CommonDataTime from '../Widget/basic/CommonDataTime';
|
13
14
|
import EBuyerNick from '../Widget/electricity/EBuyerNick';
|
14
15
|
import EReceiverAddress from '../Widget/electricity/EReceiverAddress';
|
15
16
|
import ELogistics from '../Widget/electricity/ELogistics';
|
@@ -23,4 +24,4 @@ import Status from '../Widget/third/Status';
|
|
23
24
|
import Ordinary from '../Widget/third/Ordinary';
|
24
25
|
import ItemSelectThird from '../Widget/third/ItemSelect';
|
25
26
|
import Payment from '../Widget/third/Payment';
|
26
|
-
export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment;
|
27
|
+
export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | CommonDataTime | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment;
|
@@ -10,6 +10,7 @@ import BasicCascader from "../Widget/basic/Cascader";
|
|
10
10
|
import BasicAddress from "../Widget/basic/Address";
|
11
11
|
import BasicGrade from "../Widget/basic/Grade";
|
12
12
|
import BasicRate from "../Widget/basic/Rate";
|
13
|
+
import CommonDataTime from "../Widget/basic/CommonDataTime";
|
13
14
|
import EShopName from "../Widget/electricity/ShopName";
|
14
15
|
import ETradeId from "../Widget/electricity/ETradeId";
|
15
16
|
import EBuyerNick from "../Widget/electricity/EBuyerNick";
|
@@ -131,6 +132,15 @@ export var factory = function factory(type, options) {
|
|
131
132
|
case 'SYSTEM_ORDER_NO':
|
132
133
|
return new SystemOrderNo(options);
|
133
134
|
|
135
|
+
case 'COMPLETED_DATETIME':
|
136
|
+
return new CommonDataTime(options);
|
137
|
+
|
138
|
+
case 'CREATED_DATETIME':
|
139
|
+
return new CommonDataTime(options);
|
140
|
+
|
141
|
+
case 'UPDATE_DATETIME':
|
142
|
+
return new CommonDataTime(options);
|
143
|
+
|
134
144
|
default:
|
135
145
|
return new BasicInput(options);
|
136
146
|
}
|
@@ -27,7 +27,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
27
|
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
28
28
|
*/
|
29
29
|
import React, { useState, useEffect, useLayoutEffect, useMemo } from 'react';
|
30
|
-
import { Spin } from 'antd';
|
30
|
+
import { Spin, ConfigProvider } from 'antd';
|
31
31
|
import { Provider } from 'react-redux';
|
32
32
|
import { useAppSelector, useAppDispatch } from "../model/hooks";
|
33
33
|
import { fetchQueryGroupCustomTemplate, fetchQueryCurrentCompanyUser } from "../model/workOrder";
|
@@ -38,6 +38,8 @@ import store from "../model/store";
|
|
38
38
|
import OrderList from "./components/CustomizeWorkOrderList";
|
39
39
|
import Reminder from "./components/Reminder";
|
40
40
|
import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
|
41
|
+
import zhCN from 'antd/es/locale/zh_CN';
|
42
|
+
import 'moment/locale/zh-cn';
|
41
43
|
import { PlatForm } from "./types";
|
42
44
|
import "./index.less";
|
43
45
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -61,7 +63,7 @@ var WorkOrder = function WorkOrder(props) {
|
|
61
63
|
return state.workOrder.userInfo.shopList;
|
62
64
|
});
|
63
65
|
|
64
|
-
var _useState = useState('
|
66
|
+
var _useState = useState('payment'),
|
65
67
|
_useState2 = _slicedToArray(_useState, 2),
|
66
68
|
tabActive = _useState2[0],
|
67
69
|
setTabActive = _useState2[1];
|
@@ -72,13 +74,13 @@ var WorkOrder = function WorkOrder(props) {
|
|
72
74
|
type: 'workOrder/setIsBuyer',
|
73
75
|
payload: true
|
74
76
|
});
|
75
|
-
setCurrentBuyerChecked(true);
|
77
|
+
dispatch(setCurrentBuyerChecked(true));
|
76
78
|
} else {
|
77
79
|
dispatch({
|
78
80
|
type: 'workOrder/setIsBuyer',
|
79
81
|
payload: false
|
80
82
|
});
|
81
|
-
setCurrentBuyerChecked(false);
|
83
|
+
dispatch(setCurrentBuyerChecked(false));
|
82
84
|
}
|
83
85
|
}, [buyerId]);
|
84
86
|
useEffect(function () {
|
@@ -146,17 +148,17 @@ var WorkOrder = function WorkOrder(props) {
|
|
146
148
|
children: /*#__PURE__*/_jsxs("div", {
|
147
149
|
className: "order_header_tabs",
|
148
150
|
children: [/*#__PURE__*/_jsx("div", {
|
149
|
-
className: "order_header_tabs_button ".concat(tabActive === 'custom' ? 'active' : ''),
|
150
|
-
onClick: function onClick() {
|
151
|
-
return setTabActive('custom');
|
152
|
-
},
|
153
|
-
children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
|
154
|
-
}), /*#__PURE__*/_jsx("div", {
|
155
151
|
className: "order_header_tabs_button border_left ".concat(tabActive === 'payment' ? 'active' : ''),
|
156
152
|
onClick: function onClick() {
|
157
153
|
return setTabActive('payment');
|
158
154
|
},
|
159
155
|
children: "\u6253\u6B3E\u5DE5\u5355"
|
156
|
+
}), /*#__PURE__*/_jsx("div", {
|
157
|
+
className: "order_header_tabs_button ".concat(tabActive === 'custom' ? 'active' : ''),
|
158
|
+
onClick: function onClick() {
|
159
|
+
return setTabActive('custom');
|
160
|
+
},
|
161
|
+
children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
|
160
162
|
})]
|
161
163
|
})
|
162
164
|
}), /*#__PURE__*/_jsx(OrderList, {
|
@@ -174,7 +176,10 @@ var WorkOrder = function WorkOrder(props) {
|
|
174
176
|
var ProviderWrap = function ProviderWrap(props) {
|
175
177
|
return /*#__PURE__*/_jsx(Provider, {
|
176
178
|
store: store,
|
177
|
-
children: /*#__PURE__*/_jsx(
|
179
|
+
children: /*#__PURE__*/_jsx(ConfigProvider, {
|
180
|
+
locale: zhCN,
|
181
|
+
children: /*#__PURE__*/_jsx(WorkOrder, _objectSpread({}, props))
|
182
|
+
})
|
178
183
|
});
|
179
184
|
};
|
180
185
|
|
@@ -1,6 +1,7 @@
|
|
1
|
+
.order_container {
|
2
|
+
padding: 0 8px;
|
3
|
+
}
|
1
4
|
.order_header {
|
2
|
-
padding: 0 16px;
|
3
|
-
|
4
5
|
.order_header_tabs {
|
5
6
|
display: flex;
|
6
7
|
align-items: center;
|
@@ -25,7 +26,8 @@
|
|
25
26
|
}
|
26
27
|
|
27
28
|
&.active {
|
28
|
-
color: #
|
29
|
+
color: #fff;
|
30
|
+
background-color: #1966ff;
|
29
31
|
}
|
30
32
|
}
|
31
33
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* @param {*} value
|
4
4
|
* @returns
|
5
5
|
*/
|
6
|
-
export declare const isNull: (
|
6
|
+
export declare const isNull: (p: any) => boolean;
|
7
7
|
export declare const findLabelBySelectValue: (vales: any[], options: {
|
8
8
|
[x: string]: {
|
9
9
|
[x: string]: any;
|
@@ -28,6 +28,7 @@ export declare const submitDataTransOldFormat: (nowData: {
|
|
28
28
|
workOrderUpdateKeyVos: {
|
29
29
|
type: string;
|
30
30
|
isFlag: any;
|
31
|
+
tid: string;
|
31
32
|
};
|
32
33
|
buyerOpenUid: any;
|
33
34
|
}) => any;
|
@@ -38,21 +38,24 @@ var ONLY_SHOW_COMPONENT_TYPE = ['RADIO', 'INPUT', 'TEXTAREA', 'CHECKBOX', 'SELEC
|
|
38
38
|
*/
|
39
39
|
|
40
40
|
export var isNull = function isNull(value) {
|
41
|
-
if (value === 0) {
|
42
|
-
return false;
|
43
|
-
}
|
44
|
-
|
45
41
|
if (_typeof(value) === 'object' && value !== null) {
|
46
42
|
return every(Object.values(value), function (v) {
|
47
|
-
return
|
43
|
+
return isNull(v);
|
48
44
|
});
|
49
45
|
}
|
50
46
|
|
51
|
-
|
47
|
+
if (Array.isArray(value)) {
|
48
|
+
return value.length === 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
if (typeof value === 'number') {
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
|
55
|
+
return !value;
|
52
56
|
};
|
53
57
|
var workTypeKeys = {
|
54
|
-
TRADE_ID_INPUT: 'tradeId',
|
55
|
-
//订单号
|
58
|
+
// TRADE_ID_INPUT: 'tradeId', //订单号
|
56
59
|
// BUYER_NICK_INPUT: 'buyerNick', //买家旺旺
|
57
60
|
SHOP_NAME_INPUT: 'shopName',
|
58
61
|
//店铺名称
|
@@ -159,6 +162,16 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
159
162
|
content: get(nowData, "".concat(item.uniqueKey), ''),
|
160
163
|
name: item.name
|
161
164
|
});
|
165
|
+
} else if (item.workOrderComponentType === 'TRADE_ID_INPUT') {
|
166
|
+
contentVoList.push({
|
167
|
+
uniqueKey: "".concat(item.uniqueKey, "_tradeId"),
|
168
|
+
content: get(nowData, "".concat(item.uniqueKey), ''),
|
169
|
+
name: item.name
|
170
|
+
});
|
171
|
+
|
172
|
+
if (updateFlag) {
|
173
|
+
params.workOrderUpdateKeyVos.tid = get(nowData, "".concat(item.uniqueKey), '');
|
174
|
+
}
|
162
175
|
} else if (item.workOrderComponentType === 'RATE') {
|
163
176
|
contentVoList.push({
|
164
177
|
uniqueKey: "".concat(item.uniqueKey, "_rate"),
|
@@ -422,9 +435,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
422
435
|
name: item.name
|
423
436
|
});
|
424
437
|
} else {
|
438
|
+
var _nowData$item$uniqueK;
|
439
|
+
|
425
440
|
contentVoList.push({
|
426
441
|
uniqueKey: "".concat(item.uniqueKey, "_").concat(V.camelCase(item.workOrderComponentType)),
|
427
|
-
content:
|
442
|
+
content: (_nowData$item$uniqueK = nowData === null || nowData === void 0 ? void 0 : nowData[item.uniqueKey]) !== null && _nowData$item$uniqueK !== void 0 ? _nowData$item$uniqueK : '',
|
428
443
|
name: item.name
|
429
444
|
});
|
430
445
|
}
|
@@ -545,9 +560,8 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
545
560
|
} else if (nex.workOrderComponentType === 'DATETIME') {
|
546
561
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_dateTime")], item.jsonMap["".concat(nex.uniqueKey, "_dateTime")]) || config.dateTime));
|
547
562
|
} else if (nex.workOrderComponentType === 'PICTURE') {
|
548
|
-
var host = cache.getHost();
|
549
563
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_picture")] ? formatPictures(item.jsonMap["".concat(nex.uniqueKey, "_picture")]).map(function (item) {
|
550
|
-
return "".concat(
|
564
|
+
return "".concat(item);
|
551
565
|
}) : []));
|
552
566
|
} else if (nex.workOrderComponentType === 'BASIC_MULT_SELECT') {
|
553
567
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_basicMultSelect")], '') || config.basicMultSelect || []));
|
@@ -652,17 +666,30 @@ export var orderBack = /*#__PURE__*/function () {
|
|
652
666
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
653
667
|
var _shopList$find;
|
654
668
|
|
655
|
-
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, shopSourceStr, _shopList$find2, _data$value, _buyer$value, taobaoId, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, orderInfo, buyerInfo, _ref3, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, itemList, transField, finalResponse, formValue, detail, componentsParams, detailsValue, _templateDetail$compo, paymentUniqueKey;
|
669
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, JOIN_SHOP, shopSourceStr, _shopList$find2, _data$value, _buyer$value, taobaoId, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, orderInfo, buyerInfo, _ref3, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, itemList, transField, finalResponse, formValue, detail, componentsParams, detailsValue, _templateDetail$compo, paymentUniqueKey;
|
656
670
|
|
657
671
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
658
672
|
while (1) {
|
659
673
|
switch (_context.prev = _context.next) {
|
660
674
|
case 0:
|
661
675
|
order_no = _ref.order_no, form = _ref.form, shopId = _ref.shopId, shopList = _ref.shopList, templateDetail = _ref.templateDetail, _ref$type = _ref.type, type = _ref$type === void 0 ? 'add' : _ref$type, callback = _ref.callback;
|
676
|
+
//是否是对接平台,只有对接平台才能返填订单号
|
677
|
+
JOIN_SHOP = shopList.find(function (item) {
|
678
|
+
return !item.notJoin && item.shopId == shopId;
|
679
|
+
});
|
680
|
+
|
681
|
+
if (JOIN_SHOP) {
|
682
|
+
_context.next = 4;
|
683
|
+
break;
|
684
|
+
}
|
685
|
+
|
686
|
+
return _context.abrupt("return");
|
687
|
+
|
688
|
+
case 4:
|
662
689
|
shopSourceStr = (_shopList$find = shopList.find(function (item) {
|
663
690
|
return item.shopId == shopId;
|
664
691
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopSourceStr;
|
665
|
-
_context.prev =
|
692
|
+
_context.prev = 5;
|
666
693
|
taobaoId = (_shopList$find2 = shopList.find(function (item) {
|
667
694
|
return item.shopSourceStr === 'TAOBAO' && item.shopId == shopId;
|
668
695
|
})) === null || _shopList$find2 === void 0 ? void 0 : _shopList$find2.taobaoId;
|
@@ -681,10 +708,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
681
708
|
})) : promise.push(new Promise(function (resolve) {
|
682
709
|
resolve({});
|
683
710
|
}));
|
684
|
-
_context.next =
|
711
|
+
_context.next = 11;
|
685
712
|
return Promise.allSettled(promise);
|
686
713
|
|
687
|
-
case
|
714
|
+
case 11:
|
688
715
|
_yield$Promise$allSet = _context.sent;
|
689
716
|
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 2);
|
690
717
|
data = _yield$Promise$allSet2[0];
|
@@ -767,7 +794,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
767
794
|
case 'remark':
|
768
795
|
prv[uniqueKey] = {
|
769
796
|
remark: detail['remark'] || '',
|
770
|
-
flag: detail['flag']
|
797
|
+
flag: !!detail['flag'] ? Number(detail['flag']) : detail['flag']
|
771
798
|
};
|
772
799
|
break;
|
773
800
|
|
@@ -808,24 +835,25 @@ export var orderBack = /*#__PURE__*/function () {
|
|
808
835
|
enterprisePaymentTid: order_no
|
809
836
|
});
|
810
837
|
}
|
811
|
-
}
|
838
|
+
}
|
812
839
|
|
840
|
+
console.debug('detailsValue', detailsValue); // console.log('detailsValue++', formValue, detailsValue);
|
813
841
|
|
814
842
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), detailsValue));
|
815
843
|
callback === null || callback === void 0 ? void 0 : callback(finalResponse);
|
816
|
-
_context.next =
|
844
|
+
_context.next = 35;
|
817
845
|
break;
|
818
846
|
|
819
|
-
case
|
820
|
-
_context.prev =
|
821
|
-
_context.t0 = _context["catch"](
|
847
|
+
case 33:
|
848
|
+
_context.prev = 33;
|
849
|
+
_context.t0 = _context["catch"](5);
|
822
850
|
|
823
|
-
case
|
851
|
+
case 35:
|
824
852
|
case "end":
|
825
853
|
return _context.stop();
|
826
854
|
}
|
827
855
|
}
|
828
|
-
}, _callee, null, [[
|
856
|
+
}, _callee, null, [[5, 33]]);
|
829
857
|
}));
|
830
858
|
|
831
859
|
return function orderBack(_x) {
|
@@ -920,7 +948,13 @@ var getComponentsValue = function getComponentsValue() {
|
|
920
948
|
export var imgResize = function imgResize(url) {
|
921
949
|
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
922
950
|
var h = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
|
923
|
-
|
951
|
+
var modifyUrl = url.startsWith('/') ? url : "/".concat(url);
|
952
|
+
|
953
|
+
if (w === 0 || h === 0) {
|
954
|
+
return "https://kefu.kuaimai.com".concat(modifyUrl);
|
955
|
+
}
|
956
|
+
|
957
|
+
return "https://kefu.kuaimai.com".concat(modifyUrl, "?x-oss-process=image/resize,h_").concat(h, ",w_").concat(w);
|
924
958
|
}; //重复校验数据映射字段
|
925
959
|
|
926
960
|
export var COMPONENT_MAP = {
|
@@ -110,7 +110,7 @@ export var fetchAllComponentList = /*#__PURE__*/function () {
|
|
110
110
|
_context2.prev = 0;
|
111
111
|
_context2.next = 3;
|
112
112
|
return queryAllComponentList({
|
113
|
-
templateId: '
|
113
|
+
templateId: 'EHS2XLO7QXHYOR65I6OHQWNY' // 这个模板标识是全部工单
|
114
114
|
|
115
115
|
});
|
116
116
|
|