@kmkf-fe-packages/services-components 0.3.1-alpha.10
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/commonComponents/ItemView/index.d.ts +7 -0
- package/dist/esm/commonComponents/ItemView/index.js +15 -0
- package/dist/esm/commonComponents/ItemView/index.module.scss +20 -0
- package/dist/esm/commonComponents/PlatBuyer/index.d.ts +9 -0
- package/dist/esm/commonComponents/PlatBuyer/index.js +45 -0
- package/dist/esm/commonComponents/Wangwang/img/wang.gif +0 -0
- package/dist/esm/commonComponents/Wangwang/index.d.ts +7 -0
- package/dist/esm/commonComponents/Wangwang/index.js +31 -0
- package/dist/esm/components/ActualPayment/index.d.ts +27 -0
- package/dist/esm/components/ActualPayment/index.js +82 -0
- package/dist/esm/components/Address/index.d.ts +37 -0
- package/dist/esm/components/Address/index.js +112 -0
- package/dist/esm/components/Alipay/index.d.ts +36 -0
- package/dist/esm/components/Alipay/index.js +88 -0
- package/dist/esm/components/AlipayAccount/index.d.ts +31 -0
- package/dist/esm/components/AlipayAccount/index.js +90 -0
- package/dist/esm/components/AlipayName/index.d.ts +31 -0
- package/dist/esm/components/AlipayName/index.js +89 -0
- package/dist/esm/components/BuyerNick/index.d.ts +31 -0
- package/dist/esm/components/BuyerNick/index.js +103 -0
- package/dist/esm/components/Cascader/index.d.ts +45 -0
- package/dist/esm/components/Cascader/index.js +112 -0
- package/dist/esm/components/Checkbox/index.d.ts +31 -0
- package/dist/esm/components/Checkbox/index.js +102 -0
- package/dist/esm/components/Common/img/default-img.png +0 -0
- package/dist/esm/components/Common/index.d.ts +18 -0
- package/dist/esm/components/Common/index.js +223 -0
- package/dist/esm/components/Common/index.module.less +8 -0
- package/dist/esm/components/CommonDataTime/index.d.ts +30 -0
- package/dist/esm/components/CommonDataTime/index.js +79 -0
- package/dist/esm/components/DataTime/ApaasDate.d.ts +9 -0
- package/dist/esm/components/DataTime/ApaasDate.js +22 -0
- package/dist/esm/components/DataTime/index.d.ts +29 -0
- package/dist/esm/components/DataTime/index.js +103 -0
- package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +3 -0
- package/dist/esm/components/EItemEnCode/ItemEncode.js +26 -0
- package/dist/esm/components/EItemEnCode/index.d.ts +27 -0
- package/dist/esm/components/EItemEnCode/index.js +109 -0
- package/dist/esm/components/EItemId/ItemId.d.ts +4 -0
- package/dist/esm/components/EItemId/ItemId.js +26 -0
- package/dist/esm/components/EItemId/index.d.ts +27 -0
- package/dist/esm/components/EItemId/index.js +110 -0
- package/dist/esm/components/EItemSelect/ItemSelect.d.ts +4 -0
- package/dist/esm/components/EItemSelect/ItemSelect.js +27 -0
- package/dist/esm/components/EItemSelect/index.d.ts +27 -0
- package/dist/esm/components/EItemSelect/index.js +92 -0
- package/dist/esm/components/ErpTradeId/index.d.ts +27 -0
- package/dist/esm/components/ErpTradeId/index.js +76 -0
- package/dist/esm/components/Express/index.d.ts +33 -0
- package/dist/esm/components/Express/index.js +94 -0
- package/dist/esm/components/ExpressCode/index.d.ts +30 -0
- package/dist/esm/components/ExpressCode/index.js +87 -0
- package/dist/esm/components/ExpressCompany/index.d.ts +3 -0
- package/dist/esm/components/ExpressCompany/index.js +20 -0
- package/dist/esm/components/FlowStatusSelect/index.d.ts +51 -0
- package/dist/esm/components/FlowStatusSelect/index.js +124 -0
- package/dist/esm/components/GetFormItem/index.d.ts +10 -0
- package/dist/esm/components/GetFormItem/index.js +28 -0
- package/dist/esm/components/Grade/index.d.ts +26 -0
- package/dist/esm/components/Grade/index.js +75 -0
- package/dist/esm/components/Input/index.d.ts +27 -0
- package/dist/esm/components/Input/index.js +84 -0
- package/dist/esm/components/JstItemSelect/index.d.ts +29 -0
- package/dist/esm/components/JstItemSelect/index.js +115 -0
- package/dist/esm/components/JstLogistics/index.d.ts +29 -0
- package/dist/esm/components/JstLogistics/index.js +107 -0
- package/dist/esm/components/JstSendGood/index.d.ts +27 -0
- package/dist/esm/components/JstSendGood/index.js +112 -0
- package/dist/esm/components/JstSupply/index.d.ts +27 -0
- package/dist/esm/components/JstSupply/index.js +113 -0
- package/dist/esm/components/Logistics/index.d.ts +44 -0
- package/dist/esm/components/Logistics/index.js +107 -0
- package/dist/esm/components/MultSelect/index.d.ts +27 -0
- package/dist/esm/components/MultSelect/index.js +84 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +39 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +93 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +39 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +93 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +39 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.js +86 -0
- package/dist/esm/components/Ordinary/index.d.ts +46 -0
- package/dist/esm/components/Ordinary/index.js +90 -0
- package/dist/esm/components/OrdinaryHeader/index.d.ts +7 -0
- package/dist/esm/components/OrdinaryHeader/index.js +157 -0
- package/dist/esm/components/OrdinaryHeader/index.module.less +46 -0
- package/dist/esm/components/Payment/AlipayNick.d.ts +39 -0
- package/dist/esm/components/Payment/AlipayNick.js +94 -0
- package/dist/esm/components/Payment/AlipayNo.d.ts +38 -0
- package/dist/esm/components/Payment/AlipayNo.js +101 -0
- package/dist/esm/components/Payment/AlipayTime.d.ts +39 -0
- package/dist/esm/components/Payment/AlipayTime.js +93 -0
- package/dist/esm/components/Payment/BuyerNick.d.ts +39 -0
- package/dist/esm/components/Payment/BuyerNick.js +112 -0
- package/dist/esm/components/Payment/PaymentAmount.d.ts +38 -0
- package/dist/esm/components/Payment/PaymentAmount.js +91 -0
- package/dist/esm/components/Payment/PaymentStatus.d.ts +50 -0
- package/dist/esm/components/Payment/PaymentStatus.js +96 -0
- package/dist/esm/components/Payment/PaymentTid.d.ts +38 -0
- package/dist/esm/components/Payment/PaymentTid.js +84 -0
- package/dist/esm/components/Payment/index.d.ts +120 -0
- package/dist/esm/components/Payment/index.js +118 -0
- package/dist/esm/components/Picture/index.d.ts +31 -0
- package/dist/esm/components/Picture/index.js +118 -0
- package/dist/esm/components/Popover/index.d.ts +3 -0
- package/dist/esm/components/Popover/index.js +51 -0
- package/dist/esm/components/Popover/index.module.less +22 -0
- package/dist/esm/components/Radio/index.d.ts +30 -0
- package/dist/esm/components/Radio/index.js +93 -0
- package/dist/esm/components/Rate/index.d.ts +34 -0
- package/dist/esm/components/Rate/index.js +158 -0
- package/dist/esm/components/ReceiverAddress/index.d.ts +35 -0
- package/dist/esm/components/ReceiverAddress/index.js +133 -0
- package/dist/esm/components/ReceiverMobile/index.d.ts +28 -0
- package/dist/esm/components/ReceiverMobile/index.js +91 -0
- package/dist/esm/components/ReceiverName/index.d.ts +28 -0
- package/dist/esm/components/ReceiverName/index.js +88 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-0.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-1.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-2.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-3.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-4.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-5.png +0 -0
- package/dist/esm/components/Remark/index.d.ts +33 -0
- package/dist/esm/components/Remark/index.js +113 -0
- package/dist/esm/components/ReturnLogistics/index.d.ts +44 -0
- package/dist/esm/components/ReturnLogistics/index.js +107 -0
- package/dist/esm/components/Select/index.d.ts +26 -0
- package/dist/esm/components/Select/index.js +79 -0
- package/dist/esm/components/ShopName/index.d.ts +27 -0
- package/dist/esm/components/ShopName/index.js +78 -0
- package/dist/esm/components/SystemOrderNo/index.d.ts +28 -0
- package/dist/esm/components/SystemOrderNo/index.js +81 -0
- package/dist/esm/components/TemplateSelect/index.d.ts +28 -0
- package/dist/esm/components/TemplateSelect/index.js +79 -0
- package/dist/esm/components/TextArea/index.d.ts +26 -0
- package/dist/esm/components/TextArea/index.js +78 -0
- package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +4 -0
- package/dist/esm/components/ThirdItemSelect/ItemEncode.js +31 -0
- package/dist/esm/components/ThirdItemSelect/index.d.ts +27 -0
- package/dist/esm/components/ThirdItemSelect/index.js +120 -0
- package/dist/esm/components/TradeDateTime/index.d.ts +27 -0
- package/dist/esm/components/TradeDateTime/index.js +92 -0
- package/dist/esm/components/TradeId/index.d.ts +28 -0
- package/dist/esm/components/TradeId/index.js +89 -0
- package/dist/esm/components/WorkOrderId/img/repeat.png +0 -0
- package/dist/esm/components/WorkOrderId/index.d.ts +28 -0
- package/dist/esm/components/WorkOrderId/index.js +98 -0
- package/dist/esm/index.d.ts +40 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/type.d.ts +174 -0
- package/dist/esm/type.js +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class BasicInput implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
constructor(options: PickOption);
|
|
15
|
+
render: (value: string) => JSX.Element;
|
|
16
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
17
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
18
|
+
renderExport: (value: any, record: Record) => any;
|
|
19
|
+
editRender: (value: any) => JSX.Element;
|
|
20
|
+
getColumns: () => this & {
|
|
21
|
+
dataIndex: string;
|
|
22
|
+
title: string;
|
|
23
|
+
componentType: (value: any) => JSX.Element;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export default BasicInput;
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, BasicInput);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_defineProperty(this, "rules", void 0);
|
|
23
|
+
_defineProperty(this, "canFilter", void 0);
|
|
24
|
+
_defineProperty(this, "canGroup", void 0);
|
|
25
|
+
_defineProperty(this, "canHidden", void 0);
|
|
26
|
+
_defineProperty(this, "dataType", void 0);
|
|
27
|
+
_defineProperty(this, "showContains", void 0);
|
|
28
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "render", function (value) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("span", null, value);
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
33
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
|
+
id: _this.id,
|
|
35
|
+
label: _this.name,
|
|
36
|
+
value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
37
|
+
}) : null;
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
40
|
+
var _record;
|
|
41
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_shopName")]) !== null && _record !== void 0 ? _record : '--');
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
44
|
+
var _record2;
|
|
45
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_shopName")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "editRender", function (value) {
|
|
48
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
49
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
50
|
+
title: _this.name,
|
|
51
|
+
name: _this.id,
|
|
52
|
+
rules: _this.rules,
|
|
53
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
54
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
55
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
56
|
+
}))
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "getColumns", function () {
|
|
60
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
61
|
+
dataIndex: _this.id,
|
|
62
|
+
title: _this.name,
|
|
63
|
+
componentType: _this.editRender,
|
|
64
|
+
renderExport: _this.renderExport
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
this.name = options.name;
|
|
68
|
+
this.id = options.id;
|
|
69
|
+
this.type = options.type;
|
|
70
|
+
this.canFilter = true;
|
|
71
|
+
this.canGroup = true;
|
|
72
|
+
this.canHidden = true;
|
|
73
|
+
this.dataType = 'string';
|
|
74
|
+
this.showContains = true;
|
|
75
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.rules = [];
|
|
77
|
+
});
|
|
78
|
+
export default BasicInput;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class SystemOrderNo implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
effects: ComponentInterface["effects"];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
render: (value: string) => JSX.Element;
|
|
17
|
+
renderClient: (record: Record) => JSX.Element | null;
|
|
18
|
+
renderPc: (value: string, record: Record) => JSX.Element;
|
|
19
|
+
renderExport: (value: string, record: Record) => any;
|
|
20
|
+
editRender: (value: any) => JSX.Element;
|
|
21
|
+
getColumns: () => this & {
|
|
22
|
+
dataIndex: string;
|
|
23
|
+
title: string;
|
|
24
|
+
componentType: (value: any) => JSX.Element;
|
|
25
|
+
renderExport: (value: string, record: Record) => any;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export default SystemOrderNo;
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, SystemOrderNo);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_defineProperty(this, "rules", void 0);
|
|
23
|
+
_defineProperty(this, "canFilter", void 0);
|
|
24
|
+
_defineProperty(this, "canGroup", void 0);
|
|
25
|
+
_defineProperty(this, "canHidden", void 0);
|
|
26
|
+
_defineProperty(this, "dataType", void 0);
|
|
27
|
+
_defineProperty(this, "showContains", void 0);
|
|
28
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "effects", void 0);
|
|
30
|
+
_defineProperty(this, "render", function (value) {
|
|
31
|
+
return /*#__PURE__*/React.createElement("span", null, value);
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
|
+
id: _this.id,
|
|
36
|
+
label: _this.name,
|
|
37
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
+
var _record;
|
|
42
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_systemOrderNo")]) !== null && _record !== void 0 ? _record : '--');
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
45
|
+
var _record2;
|
|
46
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_systemOrderNo")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "editRender", function (value) {
|
|
49
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
50
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
51
|
+
title: _this.name,
|
|
52
|
+
name: _this.id,
|
|
53
|
+
rules: _this.rules,
|
|
54
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
55
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
56
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
57
|
+
}))
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "getColumns", function () {
|
|
61
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
62
|
+
dataIndex: _this.id,
|
|
63
|
+
title: _this.name,
|
|
64
|
+
componentType: _this.editRender,
|
|
65
|
+
renderExport: _this.renderExport
|
|
66
|
+
});
|
|
67
|
+
;
|
|
68
|
+
});
|
|
69
|
+
this.name = options.name;
|
|
70
|
+
this.id = options.id;
|
|
71
|
+
this.type = options.type;
|
|
72
|
+
this.canFilter = true;
|
|
73
|
+
this.canGroup = true;
|
|
74
|
+
this.canHidden = true;
|
|
75
|
+
this.dataType = 'string';
|
|
76
|
+
this.showContains = true;
|
|
77
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
78
|
+
this.componentConfig = options.componentConfig;
|
|
79
|
+
this.rules = [];
|
|
80
|
+
});
|
|
81
|
+
export default SystemOrderNo;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class TemplateSelect implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
effects: ComponentInterface["effects"];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
17
|
+
renderExport: (value: any, record: Record) => string;
|
|
18
|
+
render: () => null;
|
|
19
|
+
renderClient: () => null;
|
|
20
|
+
editRender: (value: any) => null;
|
|
21
|
+
getColumns: () => this & {
|
|
22
|
+
dataIndex: string;
|
|
23
|
+
title: string;
|
|
24
|
+
componentType: (value: any) => null;
|
|
25
|
+
renderExport: (value: any, record: Record) => string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export default TemplateSelect;
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import find from 'lodash/find';
|
|
12
|
+
import get from 'lodash/get';
|
|
13
|
+
var TemplateSelect = /*#__PURE__*/_createClass(function TemplateSelect(options) {
|
|
14
|
+
var _this = this;
|
|
15
|
+
_classCallCheck(this, TemplateSelect);
|
|
16
|
+
_defineProperty(this, "name", void 0);
|
|
17
|
+
_defineProperty(this, "id", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "canFilter", void 0);
|
|
21
|
+
_defineProperty(this, "canGroup", void 0);
|
|
22
|
+
_defineProperty(this, "canHidden", void 0);
|
|
23
|
+
_defineProperty(this, "dataType", void 0);
|
|
24
|
+
_defineProperty(this, "showContains", void 0);
|
|
25
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
26
|
+
_defineProperty(this, "effects", void 0);
|
|
27
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
28
|
+
var _this$effects;
|
|
29
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
31
|
+
}
|
|
32
|
+
var list = _this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.templateList;
|
|
33
|
+
var item = find(list, {
|
|
34
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/React.createElement("span", null, "".concat(get(item, 'fLabel'), "/").concat(get(item, 'label')));
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
39
|
+
var _this$effects2;
|
|
40
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
41
|
+
return '--';
|
|
42
|
+
}
|
|
43
|
+
var list = (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.templateList;
|
|
44
|
+
var item = find(list, {
|
|
45
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
46
|
+
});
|
|
47
|
+
return "".concat(get(item, 'fLabel'), "/").concat(get(item, 'label'));
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "render", function () {
|
|
50
|
+
return null;
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "renderClient", function () {
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "editRender", function (value) {
|
|
56
|
+
return null;
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "getColumns", function () {
|
|
59
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
60
|
+
dataIndex: _this.id,
|
|
61
|
+
title: _this.name,
|
|
62
|
+
componentType: _this.editRender,
|
|
63
|
+
renderExport: _this.renderExport
|
|
64
|
+
});
|
|
65
|
+
;
|
|
66
|
+
});
|
|
67
|
+
this.name = options.name;
|
|
68
|
+
this.id = options.id;
|
|
69
|
+
this.type = options.type;
|
|
70
|
+
this.canFilter = true;
|
|
71
|
+
this.canGroup = true;
|
|
72
|
+
this.canHidden = true;
|
|
73
|
+
this.dataType = 'string';
|
|
74
|
+
this.showContains = true;
|
|
75
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.rules = [];
|
|
77
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
78
|
+
});
|
|
79
|
+
export default TemplateSelect;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class BasicInput implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
constructor(options: PickOption);
|
|
15
|
+
render: (value: string) => JSX.Element;
|
|
16
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
17
|
+
renderExport: (value: any, record: Record) => any;
|
|
18
|
+
renderClient: (record: Record) => JSX.Element | null;
|
|
19
|
+
editRender: () => JSX.Element;
|
|
20
|
+
getColumns: () => this & {
|
|
21
|
+
dataIndex: string;
|
|
22
|
+
title: string;
|
|
23
|
+
renderExport: (value: any, record: Record) => any;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export default BasicInput;
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ApaasTextArea } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, BasicInput);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_defineProperty(this, "rules", void 0);
|
|
23
|
+
_defineProperty(this, "canFilter", void 0);
|
|
24
|
+
_defineProperty(this, "canGroup", void 0);
|
|
25
|
+
_defineProperty(this, "canHidden", void 0);
|
|
26
|
+
_defineProperty(this, "dataType", void 0);
|
|
27
|
+
_defineProperty(this, "showContains", void 0);
|
|
28
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "render", function (value) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("span", null, value);
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
33
|
+
var _record;
|
|
34
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record !== void 0 ? _record : '--');
|
|
35
|
+
});
|
|
36
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
37
|
+
var _record2;
|
|
38
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
41
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
42
|
+
id: _this.id,
|
|
43
|
+
label: _this.name,
|
|
44
|
+
value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
45
|
+
}) : null;
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "editRender", function () {
|
|
48
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
49
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
50
|
+
title: _this.name,
|
|
51
|
+
name: _this.id,
|
|
52
|
+
rules: _this.rules,
|
|
53
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
54
|
+
component: /*#__PURE__*/React.createElement(ApaasTextArea, _extends({}, _this.componentConfig, {
|
|
55
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
56
|
+
}))
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "getColumns", function () {
|
|
60
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
61
|
+
dataIndex: _this.id,
|
|
62
|
+
title: _this.name,
|
|
63
|
+
renderExport: _this.renderExport
|
|
64
|
+
});
|
|
65
|
+
;
|
|
66
|
+
});
|
|
67
|
+
this.name = options.name;
|
|
68
|
+
this.id = options.id;
|
|
69
|
+
this.type = options.type;
|
|
70
|
+
this.canFilter = true;
|
|
71
|
+
this.canGroup = true;
|
|
72
|
+
this.canHidden = true;
|
|
73
|
+
this.showContains = true;
|
|
74
|
+
this.dataType = 'string';
|
|
75
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.rules = [];
|
|
77
|
+
});
|
|
78
|
+
export default BasicInput;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
/*
|
|
3
|
+
* @Description:
|
|
4
|
+
* @Author: litian
|
|
5
|
+
* @Date: 2022-08-15 14:37:33
|
|
6
|
+
* @LastEditors: litian
|
|
7
|
+
* @LastEditTime: 2022-09-07 19:45:48
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { Supplier } from '@kmkf-fe-packages/basic-components';
|
|
11
|
+
var ItemEncode = function ItemEncode(props) {
|
|
12
|
+
var _props$value = props.value,
|
|
13
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
14
|
+
shopId = props.shopId,
|
|
15
|
+
shopList = props.shopList;
|
|
16
|
+
var currentShop = shopList.find(function (item) {
|
|
17
|
+
return item.value === shopId;
|
|
18
|
+
}) || {};
|
|
19
|
+
var handleChange = function handleChange(content) {
|
|
20
|
+
typeof props.onChange === 'function' && props.onChange(content === null || content === void 0 ? void 0 : content.imgList);
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/React.createElement(Supplier, _extends({}, props, {
|
|
23
|
+
userNick: currentShop === null || currentShop === void 0 ? void 0 : currentShop.taobaoNick,
|
|
24
|
+
value: {
|
|
25
|
+
shopId: shopId,
|
|
26
|
+
imgList: value || []
|
|
27
|
+
},
|
|
28
|
+
onChange: handleChange
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
export default ItemEncode;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class ThirdItemSelect implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
effects: ComponentInterface["effects"];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
render: (value: any) => JSX.Element;
|
|
17
|
+
renderClient: (record: Record) => JSX.Element | null;
|
|
18
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
19
|
+
renderExport: (value: any, record: Record) => any;
|
|
20
|
+
editRender: () => JSX.Element;
|
|
21
|
+
getColumns: () => this & {
|
|
22
|
+
dataIndex: string;
|
|
23
|
+
title: string;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export default ThirdItemSelect;
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import GetFormItem from "../GetFormItem";
|
|
13
|
+
import ItemEncode from "./ItemEncode";
|
|
14
|
+
import { GoodImage } from "../Common";
|
|
15
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
+
var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
|
|
18
|
+
var _this = this,
|
|
19
|
+
_this$componentConfig2;
|
|
20
|
+
_classCallCheck(this, ThirdItemSelect);
|
|
21
|
+
_defineProperty(this, "name", void 0);
|
|
22
|
+
_defineProperty(this, "id", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
24
|
+
_defineProperty(this, "rules", void 0);
|
|
25
|
+
_defineProperty(this, "canFilter", void 0);
|
|
26
|
+
_defineProperty(this, "canGroup", void 0);
|
|
27
|
+
_defineProperty(this, "canHidden", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "showContains", void 0);
|
|
30
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
31
|
+
_defineProperty(this, "effects", void 0);
|
|
32
|
+
_defineProperty(this, "render", function (value) {
|
|
33
|
+
//兼容多个商品
|
|
34
|
+
return /*#__PURE__*/React.createElement(GoodImage, {
|
|
35
|
+
list: value,
|
|
36
|
+
type: "itemThird"
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
40
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
41
|
+
id: _this.id,
|
|
42
|
+
label: _this.name,
|
|
43
|
+
value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
44
|
+
}) : null;
|
|
45
|
+
});
|
|
46
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
47
|
+
var itemList = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")];
|
|
48
|
+
if (itemList === undefined) {
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
50
|
+
}
|
|
51
|
+
//兼容多个商品
|
|
52
|
+
return /*#__PURE__*/React.createElement(GoodImage, {
|
|
53
|
+
list: itemList,
|
|
54
|
+
type: "itemThird"
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
58
|
+
var _ref;
|
|
59
|
+
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
|
|
60
|
+
return "\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || item.supplierItemOuterId || '', "\n\u4F9B\u5E94\u5546\u540D\u79F0:").concat(item.supplierName || '');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "editRender", function () {
|
|
64
|
+
var _this$componentConfig, _this$effects, _this$effects2;
|
|
65
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
66
|
+
title: _this.name,
|
|
67
|
+
name: _this.id,
|
|
68
|
+
rules: _this.rules,
|
|
69
|
+
required: false,
|
|
70
|
+
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
71
|
+
maxLength: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.maxLength) || 20,
|
|
72
|
+
type: 4,
|
|
73
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
74
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
75
|
+
width: "90%"
|
|
76
|
+
}))
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
_defineProperty(this, "getColumns", function () {
|
|
80
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
81
|
+
dataIndex: _this.id,
|
|
82
|
+
title: _this.name,
|
|
83
|
+
renderExport: _this.renderExport
|
|
84
|
+
});
|
|
85
|
+
;
|
|
86
|
+
});
|
|
87
|
+
this.name = options.name || '供应商编码/名称';
|
|
88
|
+
this.id = options.id;
|
|
89
|
+
this.type = options.type;
|
|
90
|
+
this.canFilter = false;
|
|
91
|
+
this.canGroup = false;
|
|
92
|
+
this.canHidden = true;
|
|
93
|
+
this.showContains = false;
|
|
94
|
+
this.dataType = 'string';
|
|
95
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
96
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
97
|
+
this.rules = (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
98
|
+
required: true,
|
|
99
|
+
validator: function validator(_, value) {
|
|
100
|
+
var _this$componentConfig3, _this$componentConfig4;
|
|
101
|
+
if (!value || !value.length) {
|
|
102
|
+
return Promise.reject(new Error('请选择宝贝'));
|
|
103
|
+
}
|
|
104
|
+
var hasNotId = (value || []).some(function (item) {
|
|
105
|
+
return !item.itemId && !item.supplierItemOuterId;
|
|
106
|
+
});
|
|
107
|
+
if ((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.enableItemId && hasNotId) {
|
|
108
|
+
return Promise.reject(new Error('请输入供应商编码'));
|
|
109
|
+
}
|
|
110
|
+
var hasNotName = (value || []).some(function (item) {
|
|
111
|
+
return !item.supplierName;
|
|
112
|
+
});
|
|
113
|
+
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.enableSupplierName && hasNotName) {
|
|
114
|
+
return Promise.reject(new Error('请输入供应商名称'));
|
|
115
|
+
}
|
|
116
|
+
return Promise.resolve();
|
|
117
|
+
}
|
|
118
|
+
}] : [];
|
|
119
|
+
});
|
|
120
|
+
export default ThirdItemSelect;
|