@kmkf-fe-packages/services-components 2.10.9-beta.63 → 2.10.9-beta.65

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.
@@ -192,7 +192,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
192
192
  var _typeMap$_this$type6;
193
193
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
194
194
  if (!Array.isArray(list)) {
195
- return '';
195
+ return "";
196
196
  }
197
197
  return (list || []).map(function (item) {
198
198
  return [item === null || item === void 0 ? void 0 : item.sendId, SendDataCenter.getInstance(_this.type).getSendNameByCode(item === null || item === void 0 ? void 0 : item.sendName)].join("/");
@@ -31,7 +31,7 @@ declare class BasicPosting implements ComponentInterface {
31
31
  sortColumns: SortColumnsField;
32
32
  headerProvince: boolean;
33
33
  constructor(options: PickOption);
34
- getChildren: () => (City | Detail | District | Province | ReceiverMobile | ReceiverName | undefined)[];
34
+ getChildren: () => (Province | City | District | Detail | ReceiverName | ReceiverMobile | 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;
@@ -14,7 +14,7 @@ import { BsGoodsTable } from "../../Common";
14
14
  import CommonHeaderGoods from "../../CommonHeaderGood";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
- import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
17
+ import { CommonGoods as Goods, erpFormValidator } from "@kmkf-fe-packages/basic-components";
18
18
  import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
19
19
  import { SYMBOL } from "../../../constant";
20
20
  var CONFIG_MAP = {
@@ -41,7 +41,15 @@ var CONFIG_MAP = {
41
41
  },
42
42
  DXD_SUPPLIERS: {
43
43
  name: "大希地供应商",
44
- key: "dxdSuppliers"
44
+ key: "dxdSuppliers",
45
+ validator: function validator(_rule, value, type, componentConfig) {
46
+ if (!_rule.required) return Promise.resolve();
47
+ var validatorResult = erpFormValidator(_rule, value, type, componentConfig);
48
+ if (validatorResult) {
49
+ return validatorResult;
50
+ }
51
+ return Promise.resolve();
52
+ }
45
53
  },
46
54
  TTX_GOODS: {
47
55
  name: "通天晓",
@@ -163,17 +171,26 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
163
171
  }));
164
172
  this.children = [this.headers];
165
173
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
166
- this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
167
- required: true,
174
+ var isRequired = !!(this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required);
175
+ this.rules = [{
176
+ required: isRequired,
168
177
  validator: function validator(_, value) {
169
178
  var _value$key;
170
- if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
179
+ if (isRequired && (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length))) {
171
180
  var _CONFIG_MAP$_this$typ6;
172
181
  return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat((_CONFIG_MAP$_this$typ6 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ6 === void 0 ? void 0 : _CONFIG_MAP$_this$typ6.name, "\u5546\u54C1")));
173
182
  }
174
183
  return Promise.resolve();
175
184
  }
176
- }] : [];
185
+ }, {
186
+ required: isRequired,
187
+ validator: function validator(_rule, value) {
188
+ var _CONFIG_MAP$_this$typ7, _CONFIG_MAP$_this$typ8;
189
+ return ((_CONFIG_MAP$_this$typ7 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ7 === void 0 ? void 0 : (_CONFIG_MAP$_this$typ8 = _CONFIG_MAP$_this$typ7.validator) === null || _CONFIG_MAP$_this$typ8 === void 0 ? void 0 : _CONFIG_MAP$_this$typ8.call(_CONFIG_MAP$_this$typ7, _rule, value, _this.type, _this.componentConfig)) || function () {
190
+ return Promise.resolve();
191
+ };
192
+ }
193
+ }];
177
194
  this.dataType = "object";
178
195
  this.sortChildField = this.getSortChildFields();
179
196
  this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
@@ -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) => BsLogistics | BsSystemOrder | CommonMultiStatus | JstSendGood | LogisticsInterception | LogisticsMoreInterception | AsyncSelect | PublicGoods | ERemark | 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 | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
3
+ export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | JstSendGood | 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 | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.10.9-beta.63",
3
+ "version": "2.10.9-beta.65",
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.9-beta.63",
25
- "@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.63",
24
+ "@kmkf-fe-packages/basic-components": "2.10.9-beta.65",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.64",
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": "8c6f4bdcfe8b4c41781395651bdcd9c269d47d45",
44
+ "gitHead": "080418ea5274d082849ec8193827824e2536968c",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }