@kmkf-fe-packages/services-components 2.10.19 → 2.10.21

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.
@@ -1,6 +1,6 @@
1
1
  import LogisticsInterception from "../components/LogisticsInterception";
2
2
  import LogisticsMoreInterception from "../components/LogisticsMoreInterception";
3
- export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsExchange").default | import("../components/BS/BsGoods").default | import("../components/BS/BsLogistics").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/BS/BsSystemOrder").default | import("../components/BsE3/BsGoods").default | import("../components/BsE3/BsReissueE3").default | import("../components/Cascader").default | import("../components/CommonMultiStatus").default | import("../components/CommonSystemOrder").default | import("../components/DXD/DxdShopSelect").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Checkbox").default | import("../components/DataTime").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/PicturePro").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/CommonDataTime").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/BuyerNick").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/ReceiverAddress").default | import("../components/TradeDateTime").default | import("../components/Logistics").default | import("../components/ReturnLogistics").default | import("../components/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Payment").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSendGood").default | import("../components/JST/JstSupply").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/Calculation").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/BS/BsPosting").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/MsgStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/KM/KmVideo").default | import("../components/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default | import("../components/Public/ReturnWarehouse").default | import("../components/KM/KmExchange").default | import("../components/GY/GyGoods").default;
3
+ export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsExchange").default | import("../components/BS/BsGoods").default | import("../components/BS/BsLogistics").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/BS/BsSystemOrder").default | import("../components/BsE3/BsGoods").default | import("../components/BsE3/BsReissueE3").default | import("../components/CommonMultiStatus").default | import("../components/CommonSystemOrder").default | import("../components/DXD/DxdShopSelect").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Cascader").default | import("../components/Checkbox").default | import("../components/DataTime").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/PicturePro").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/CommonDataTime").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/BuyerNick").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/ReceiverAddress").default | import("../components/TradeDateTime").default | import("../components/Logistics").default | import("../components/ReturnLogistics").default | import("../components/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Payment").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSendGood").default | import("../components/JST/JstSupply").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/Calculation").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/BS/BsPosting").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/MsgStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/KM/KmVideo").default | import("../components/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default | import("../components/Public/ReturnWarehouse").default | import("../components/KM/KmExchange").default | import("../components/GY/GyGoods").default;
4
4
  export declare const useColumnsConfig: ({ queryWorkOrderDetail, flatTemplateList, shopList, sortState, onChangeSort, handleReset, handleSubmit, handleChangeSingleWorkOrderMark, userList, tbAppKey, isShare, openSingleColumnsFilter, openSingleColumnsSort, }: {
5
5
  queryWorkOrderDetail?: ((p: any) => void) | undefined;
6
6
  flatTemplateList?: any;
@@ -6,6 +6,11 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
6
6
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
7
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
8
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
+ 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; }
10
+ 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; }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ 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); }
9
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
15
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
16
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -24,7 +29,7 @@ import CopyText from "../../commonComponents/CopyText";
24
29
  import { KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, JY_SYSTEM_ORDER_CONFIG, JKY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, PLATFORM_AFTER_SALES_ORDER_CONFIG, DXD_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
25
30
  import { getColumnsMap } from "./constants/columnsBaseInfoMap";
26
31
  import { VideoCameraTwoTone } from "@ant-design/icons";
27
- import { ApaasImage } from "@kmkf-fe-packages/basic-components";
32
+ import { ApaasImage, resolveColumnWidth } from "@kmkf-fe-packages/basic-components";
28
33
  var Paragraph = Typography.Paragraph;
29
34
  export var getFormItem = function getFormItem(_ref) {
30
35
  var name = _ref.name,
@@ -505,7 +510,9 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
505
510
  });
506
511
  // 如果列应该显示(show不为false)或者有验证器,则返回对应的列配置
507
512
  if (currentCol && (col.show !== false || currentCol !== null && currentCol !== void 0 && currentCol.validator)) {
508
- return currentCol;
513
+ return _objectSpread(_objectSpread({}, currentCol), {}, {
514
+ width: resolveColumnWidth(col.width, currentCol.width)
515
+ });
509
516
  }
510
517
  return undefined;
511
518
  }).filter(Boolean);
@@ -522,6 +529,11 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
522
529
  }].concat(_toConsumableArray(baseInfoColumns));
523
530
  return columnList;
524
531
  }, [showHeader, list]);
532
+ var tableScrollX = useMemo(function () {
533
+ return newColumns.reduce(function (total, column) {
534
+ return total + (Number(column.width) || 0);
535
+ }, 0);
536
+ }, [newColumns]);
525
537
  return /*#__PURE__*/React.createElement(Table, {
526
538
  columns: newColumns,
527
539
  dataSource: list,
@@ -529,7 +541,7 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
529
541
  size: "small",
530
542
  pagination: false,
531
543
  scroll: {
532
- x: "100%"
544
+ x: tableScrollX
533
545
  },
534
546
  locale: {
535
547
  emptyText: "暂无数据"
@@ -18,7 +18,7 @@ import ItemView from "../../commonComponents/ItemView";
18
18
  import { isNull, BS_E3_BOOLEAN_STATUS_MAP } from "@kmkf-fe-packages/kmkf-utils";
19
19
  import { BsHeaderPic, BsHeaderChild } from "../BS/common";
20
20
  import ReissueGift from "../BsE3/ReissueGift";
21
- import { erpColumnsMap } from "@kmkf-fe-packages/basic-components";
21
+ import { erpColumnsMap, resolveColumnWidth } from "@kmkf-fe-packages/basic-components";
22
22
  import { getJstColumns, getKmColumns, getDxdColumns } from "@kmkf-fe-packages/basic-components";
23
23
  var isNullNotFalse = function isNullNotFalse(val) {
24
24
  if (val === false) return false;
@@ -2841,11 +2841,15 @@ var CommonHeaderGoods = /*#__PURE__*/function () {
2841
2841
  var _this2$itemKey;
2842
2842
  var headerConfig = GoodHeaderMap[_this2.type].headerMap[key];
2843
2843
  var isStringConfig = typeof headerConfig === "string";
2844
+ var configuredColumn = isObjectArray ? showHeader.find(function (item) {
2845
+ return item.dataIndex === key;
2846
+ }) : undefined;
2847
+ var defaultWidth = isStringConfig ? 80 : headerConfig.width || 80;
2844
2848
  return {
2845
2849
  component: isStringConfig ? BsHeaderChild : headerConfig.component || BsHeaderChild,
2846
2850
  name: isStringConfig ? headerConfig : ((_this2$itemKey = _this2.itemKey) === null || _this2$itemKey === void 0 ? void 0 : _this2$itemKey[key]) || headerConfig.name,
2847
2851
  key: isStringConfig ? key : headerConfig.key || key,
2848
- width: isStringConfig ? 80 : headerConfig.width || 80,
2852
+ width: resolveColumnWidth(configuredColumn === null || configuredColumn === void 0 ? void 0 : configuredColumn.width, defaultWidth),
2849
2853
  transformValue: isStringConfig ? undefined : headerConfig.transformValue,
2850
2854
  renderExport: isStringConfig ? undefined : headerConfig.renderExport
2851
2855
  };
@@ -31,7 +31,7 @@ declare class BasicPosting implements ComponentInterface {
31
31
  sortColumns: SortColumnsField;
32
32
  headerProvince: boolean;
33
33
  constructor(options: PickOption);
34
- getChildren: () => (Province | City | District | Detail | ReceiverName | ReceiverMobile | undefined)[];
34
+ getChildren: () => (City | Detail | District | Province | ReceiverMobile | ReceiverName | undefined)[];
35
35
  getSortColumns: (sortColumns: string | undefined) => SortColumnsField;
36
36
  renderPc: (value: any, record: Record) => React.JSX.Element | null;
37
37
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -17,9 +17,12 @@ declare class ERemark implements ComponentInterface {
17
17
  formField: string;
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
+ effects: ComponentInterface['effects'];
20
21
  dataType: ComponentInterface['dataType'];
21
22
  constructor(options: PickOption);
22
- render: (value: Value) => React.JSX.Element;
23
+ getShop: (record?: Record) => any;
24
+ isYouzan: (record?: Record) => boolean;
25
+ render: (value: Value, isYouzan?: boolean) => React.JSX.Element;
23
26
  renderClient: (record: Record) => React.JSX.Element | null;
24
27
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
25
28
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,4 +1,11 @@
1
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
+ 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
9
  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); } }
3
10
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -6,7 +13,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
13
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
14
  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); }
8
15
  import React from 'react';
9
- import { Remark } from '@kmkf-fe-packages/basic-components';
16
+ import { Remark, YouzanStar } from '@kmkf-fe-packages/basic-components';
10
17
  import GetFormItem from "../GetFormItem";
11
18
  import trade0 from "./flag/trade-icon-flag-0.png";
12
19
  import trade1 from "./flag/trade-icon-flag-1.png";
@@ -16,7 +23,7 @@ import trade4 from "./flag/trade-icon-flag-4.png";
16
23
  import trade5 from "./flag/trade-icon-flag-5.png";
17
24
  import get from 'lodash/get';
18
25
  import ItemView from "../../commonComponents/ItemView";
19
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
26
+ import { isNull, filterFn as _filterFn, isYouzanShop, normalizeYouzanStar } from '@kmkf-fe-packages/kmkf-utils';
20
27
  import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
21
28
  var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
22
29
  var _this = this,
@@ -34,14 +41,30 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
34
41
  _defineProperty(this, "formField", void 0);
35
42
  _defineProperty(this, "canSort", void 0);
36
43
  _defineProperty(this, "children", void 0);
44
+ _defineProperty(this, "effects", void 0);
37
45
  _defineProperty(this, "dataType", void 0);
46
+ _defineProperty(this, "getShop", function (record) {
47
+ var _this$effects, _this$effects2, _this$effects2$form, _this$effects3, _this$effects3$shopLi;
48
+ var shopId = (record === null || record === void 0 ? void 0 : record.shopId) || ((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId) || ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : (_this$effects2$form = _this$effects2.form) === null || _this$effects2$form === void 0 ? void 0 : _this$effects2$form.getFieldValue('shopId'));
49
+ return (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : (_this$effects3$shopLi = _this$effects3.shopList) === null || _this$effects3$shopLi === void 0 ? void 0 : _this$effects3$shopLi.find(function (shop) {
50
+ return shop.shopId === shopId;
51
+ });
52
+ });
53
+ _defineProperty(this, "isYouzan", function (record) {
54
+ return isYouzanShop(_this.getShop(record));
55
+ });
38
56
  _defineProperty(this, "render", function (value) {
57
+ var isYouzan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
39
58
  var index = get(value, 'flag');
40
59
  return /*#__PURE__*/React.createElement("div", {
41
60
  style: {
42
61
  display: 'inline-block'
43
62
  }
44
- }, index !== undefined && /*#__PURE__*/React.createElement("img", {
63
+ }, isYouzan ? normalizeYouzanStar(index) ? /*#__PURE__*/React.createElement(YouzanStar, {
64
+ compact: true,
65
+ disabled: true,
66
+ value: index
67
+ }) : null : index !== undefined && /*#__PURE__*/React.createElement("img", {
45
68
  src: _this.imgList[Number(index)]
46
69
  }), /*#__PURE__*/React.createElement("span", null, get(value, 'remark')));
47
70
  });
@@ -49,7 +72,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
49
72
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
50
73
  id: _this.id,
51
74
  label: _this.name,
52
- value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
75
+ value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id], _this.isYouzan(record))
53
76
  }) : null;
54
77
  });
55
78
  _defineProperty(this, "renderPc", function (value, record) {
@@ -57,11 +80,16 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
57
80
  return /*#__PURE__*/React.createElement("span", null, "--");
58
81
  }
59
82
  var index = get(record, "".concat(_this.id, "_flag"));
83
+ var isYouzan = _this.isYouzan(record);
60
84
  return /*#__PURE__*/React.createElement("div", {
61
85
  style: {
62
86
  display: 'inline-block'
63
87
  }
64
- }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? index !== undefined && /*#__PURE__*/React.createElement("img", {
88
+ }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? isYouzan ? normalizeYouzanStar(index) && /*#__PURE__*/React.createElement(YouzanStar, {
89
+ compact: true,
90
+ disabled: true,
91
+ value: index
92
+ }) : index !== undefined && /*#__PURE__*/React.createElement("img", {
65
93
  src: _this.imgList[Number(index)]
66
94
  }) :
67
95
  // <i
@@ -94,7 +122,9 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
94
122
  display: p === null || p === void 0 ? void 0 : p.display,
95
123
  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,
96
124
  tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
97
- component: /*#__PURE__*/React.createElement(Remark, _this.componentConfig)
125
+ component: /*#__PURE__*/React.createElement(Remark, _extends({}, _this.componentConfig, {
126
+ isYouzan: _this.isYouzan()
127
+ }))
98
128
  });
99
129
  });
100
130
  _defineProperty(this, "filterConfig", function (item) {
@@ -111,7 +141,10 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
111
141
  // 过滤组件名称
112
142
  filterComponentType: 'SelectInput',
113
143
  props: {
114
- filterOptions: SEARCH_OPTIONS
144
+ filterOptions: [].concat(_toConsumableArray(SEARCH_OPTIONS), [{
145
+ label: "关键词不包含",
146
+ value: "nincludeLike"
147
+ }])
115
148
  },
116
149
  filterFn: function filterFn(value) {
117
150
  return function (i) {
@@ -170,6 +203,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
170
203
  this.formField = "".concat(options.id, "_remark");
171
204
  this.type = options.type;
172
205
  this.componentConfig = options.componentConfig;
206
+ this.effects = options.effects;
173
207
  this.dataType = 'object';
174
208
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
175
209
  validator: function validator(_, value) {
@@ -177,8 +211,11 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
177
211
  if (!(value !== null && value !== void 0 && value.remark)) {
178
212
  return Promise.reject(new Error('请输入备注'));
179
213
  }
180
- if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
181
- return Promise.reject(new Error('请选择旗帜'));
214
+ if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isShowFlag) {
215
+ var flag = _this.isYouzan() ? normalizeYouzanStar(value === null || value === void 0 ? void 0 : value.flag) : value === null || value === void 0 ? void 0 : value.flag;
216
+ if (!flag && flag !== 0) {
217
+ return Promise.reject(new Error(_this.isYouzan() ? '请选择星标' : '请选择旗帜'));
218
+ }
182
219
  }
183
220
  return Promise.resolve();
184
221
  }
@@ -28,9 +28,6 @@ export var SEARCH_OPTIONS = [{
28
28
  }, {
29
29
  label: "关键词模糊匹配",
30
30
  value: "anylike"
31
- }, {
32
- label: "关键词不包含",
33
- value: "nincludeLike"
34
31
  }, {
35
32
  label: "为空查询",
36
33
  value: "isNull"
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, DxdShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect, ReturnWarehouse, KmExchange } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsExchange | BsGoods | BsLogistics | BsReissue | BsReturn | BsSystemOrder | BsE3Goods | BsE3Reissue | BasicCascader | CommonMultiStatus | CommonSystemOrder | DxdShopSelect | BasicInput | BasicTypeInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | PublicGoods | PublicReissueGoods | PublicExchange | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect | ReturnWarehouse | KmExchange | GyGoods;
3
+ export declare const factory: (type: string, options: PickOption) => BsExchange | BsGoods | BsLogistics | BsReissue | BsReturn | BsSystemOrder | BsE3Goods | BsE3Reissue | CommonMultiStatus | CommonSystemOrder | DxdShopSelect | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | PublicGoods | PublicReissueGoods | PublicExchange | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect | ReturnWarehouse | KmExchange | GyGoods;
@@ -5,6 +5,7 @@ export declare type ShowHeaderObjType = {
5
5
  title: string;
6
6
  dataIndex: string;
7
7
  show?: boolean;
8
+ width?: number;
8
9
  };
9
10
  export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
10
11
  export declare type ALignType = "left" | "right" | "center";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.10.19",
3
+ "version": "2.10.21",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.10.19",
25
- "@kmkf-fe-packages/kmkf-utils": "2.10.19",
24
+ "@kmkf-fe-packages/basic-components": "2.10.20",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.10.20",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "9dcce65e1ba7ff4b9e15312bc219357360a01c93",
44
+ "gitHead": "fcecb439104eb28d1069606dc82197dc876128ab",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- var react_1 = require("react");
5
- var react_redux_1 = require("react-redux");
6
- var toolkit_1 = require("@reduxjs/toolkit");
7
- var getTemplate = function getTemplate(companyUserConfig) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
9
- return JSON.stringify({
10
- hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
11
- hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
12
- hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
13
- hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
14
- hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
15
- hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
16
- });
17
- };
18
- function useGetHasErpData() {
19
- var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
20
- var _a, _b, _c, _d;
21
- /**
22
- * pc main
23
- * 端 workOrder
24
- * **/
25
- return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
26
- }], function (state) {
27
- var _a;
28
- var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
29
- if (typeof companyUserConfig === "string") {
30
- try {
31
- companyUserConfig = JSON.parse(companyUserConfig);
32
- } catch (e) {
33
- companyUserConfig = {};
34
- }
35
- }
36
- return companyUserConfig;
37
- }));
38
- var _a = react_1.useState(getTemplate({})),
39
- hasErpDataJson = _a[0],
40
- setHasErpDataJson = _a[1];
41
- react_1.useEffect(function () {
42
- setHasErpDataJson(getTemplate(companyUserConfig));
43
- }, [companyUserConfig]);
44
- var hasErpData = react_1.useMemo(function () {
45
- return JSON.parse(hasErpDataJson);
46
- }, [hasErpDataJson]);
47
- return hasErpData;
48
- }
49
- exports["default"] = useGetHasErpData;
@@ -1,180 +0,0 @@
1
- "use strict";
2
-
3
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
4
- function adopt(value) {
5
- return value instanceof P ? value : new P(function (resolve) {
6
- resolve(value);
7
- });
8
- }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) {
11
- try {
12
- step(generator.next(value));
13
- } catch (e) {
14
- reject(e);
15
- }
16
- }
17
- function rejected(value) {
18
- try {
19
- step(generator["throw"](value));
20
- } catch (e) {
21
- reject(e);
22
- }
23
- }
24
- function step(result) {
25
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
26
- }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- var __generator = this && this.__generator || function (thisArg, body) {
31
- var _ = {
32
- label: 0,
33
- sent: function sent() {
34
- if (t[0] & 1) throw t[1];
35
- return t[1];
36
- },
37
- trys: [],
38
- ops: []
39
- },
40
- f,
41
- y,
42
- t,
43
- g;
44
- return g = {
45
- next: verb(0),
46
- "throw": verb(1),
47
- "return": verb(2)
48
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
49
- return this;
50
- }), g;
51
- function verb(n) {
52
- return function (v) {
53
- return step([n, v]);
54
- };
55
- }
56
- function step(op) {
57
- if (f) throw new TypeError("Generator is already executing.");
58
- while (_) try {
59
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
60
- if (y = 0, t) op = [op[0] & 2, t.value];
61
- switch (op[0]) {
62
- case 0:
63
- case 1:
64
- t = op;
65
- break;
66
- case 4:
67
- _.label++;
68
- return {
69
- value: op[1],
70
- done: false
71
- };
72
- case 5:
73
- _.label++;
74
- y = op[1];
75
- op = [0];
76
- continue;
77
- case 7:
78
- op = _.ops.pop();
79
- _.trys.pop();
80
- continue;
81
- default:
82
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
83
- _ = 0;
84
- continue;
85
- }
86
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
87
- _.label = op[1];
88
- break;
89
- }
90
- if (op[0] === 6 && _.label < t[1]) {
91
- _.label = t[1];
92
- t = op;
93
- break;
94
- }
95
- if (t && _.label < t[2]) {
96
- _.label = t[2];
97
- _.ops.push(op);
98
- break;
99
- }
100
- if (t[2]) _.ops.pop();
101
- _.trys.pop();
102
- continue;
103
- }
104
- op = body.call(thisArg, _);
105
- } catch (e) {
106
- op = [6, e];
107
- y = 0;
108
- } finally {
109
- f = t = 0;
110
- }
111
- if (op[0] & 5) throw op[1];
112
- return {
113
- value: op[0] ? op[1] : void 0,
114
- done: true
115
- };
116
- }
117
- };
118
- exports.__esModule = true;
119
- var react_1 = require("react");
120
- var useGetHasErpData_1 = require("../hook/useGetHasErpData");
121
- var ahooks_1 = require("ahooks");
122
- var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
123
- function useGetErpAddressData(notJudgedErp) {
124
- var _this = this;
125
- var _a = react_1.useState("loading"),
126
- globalState = _a[0],
127
- setGlobalState = _a[1];
128
- var hasErpData = useGetHasErpData_1["default"]();
129
- ahooks_1.useUpdateEffect(function () {
130
- asyncQueryData(hasErpData, notJudgedErp);
131
- }, [hasErpData, notJudgedErp]);
132
- var asyncQueryData = function asyncQueryData(hasErpData, notJudgedErp) {
133
- return __awaiter(_this, void 0, void 0, function () {
134
- var hasBs, hasWdt, hasGy, promises, e_1;
135
- return __generator(this, function (_a) {
136
- switch (_a.label) {
137
- case 0:
138
- hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
139
- promises = [];
140
- if (hasBs || notJudgedErp) promises.push(kmkf_utils_1.servers.queryBsAddressData);
141
- if (hasWdt || notJudgedErp) promises.push(kmkf_utils_1.servers.queryWdtAddressData);
142
- if (hasGy || notJudgedErp) promises.push(kmkf_utils_1.servers.queryGyAddressData);
143
- _a.label = 1;
144
- case 1:
145
- _a.trys.push([1, 3,, 4]);
146
- return [4 /*yield*/, Promise.all(promises.map(function (promise) {
147
- return promise();
148
- }))];
149
- case 2:
150
- _a.sent();
151
- setGlobalState("success");
152
- return [3 /*break*/, 4];
153
- case 3:
154
- e_1 = _a.sent();
155
- setGlobalState("failed");
156
- return [3 /*break*/, 4];
157
- case 4:
158
- return [2 /*return*/];
159
- }
160
- });
161
- });
162
- };
163
-
164
- var onReload = function onReload() {
165
- return __awaiter(_this, void 0, void 0, function () {
166
- return __generator(this, function (_a) {
167
- switch (_a.label) {
168
- case 0:
169
- return [4 /*yield*/, asyncQueryData(hasErpData, notJudgedErp)];
170
- case 1:
171
- _a.sent();
172
- return [2 /*return*/];
173
- }
174
- });
175
- });
176
- };
177
-
178
- return [globalState, onReload];
179
- }
180
- exports["default"] = useGetErpAddressData;