@kmkf-fe-packages/services-components 0.14.1 → 0.15.0-alpha.1

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.
@@ -107,36 +107,39 @@ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
107
107
  this.addressDateInstance = BsAddressData.getInstance();
108
108
  this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
109
109
  id: "".concat(options.id, "_bsPostingProvince"),
110
- name: '',
110
+ name: "",
111
111
  addressDateInstance: this.addressDateInstance
112
112
  }));
113
113
  this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
114
114
  id: "".concat(options.id, "_bsPostingCity"),
115
- name: '',
115
+ name: "",
116
116
  addressDateInstance: this.addressDateInstance
117
117
  }));
118
118
  this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
119
119
  id: "".concat(options.id, "_bsPostingDistrict"),
120
- name: '区/县',
120
+ name: "区/县",
121
121
  addressDateInstance: this.addressDateInstance
122
122
  }));
123
123
  this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
124
124
  id: "".concat(options.id, "_bsPostingDetail"),
125
- name: '详细地址'
125
+ name: "详细地址"
126
126
  }));
127
127
  this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
128
128
  id: "".concat(options.id, "_bsPostingReceiverName"),
129
- name: '收件人姓名'
129
+ name: "收件人姓名"
130
130
  }));
131
131
  this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
132
132
  id: "".concat(options.id, "_bsPostingReceiverMobile"),
133
- name: '收件人电话'
133
+ name: "收件人电话"
134
134
  }));
135
135
  this.children = [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile];
136
136
  this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
137
137
  validator: function validator(_, value) {
138
138
  var _value$postingAddress;
139
- if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
139
+ var addressLen = !(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || (value === null || value === void 0 ? void 0 : value.postingAddress.some(function (t) {
140
+ return !t;
141
+ }));
142
+ if (addressLen || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
140
143
  return Promise.reject(new Error("请填写地址"));
141
144
  }
142
145
  return Promise.resolve();
@@ -189,36 +189,39 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
189
189
  this.addressDateInstance = ((_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField) === "bs" ? BsAddressData.getInstance() : AddressData.getInstance();
190
190
  this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
191
191
  id: "".concat(options.id, "_postingProvince"),
192
- name: '',
192
+ name: "",
193
193
  addressDateInstance: this.addressDateInstance
194
194
  }));
195
195
  this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
196
196
  id: "".concat(options.id, "_postingCity"),
197
- name: '',
197
+ name: "",
198
198
  addressDateInstance: this.addressDateInstance
199
199
  }));
200
200
  this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
201
201
  id: "".concat(options.id, "_postingDistrict"),
202
- name: '区/县',
202
+ name: "区/县",
203
203
  addressDateInstance: this.addressDateInstance
204
204
  }));
205
205
  this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
206
206
  id: "".concat(options.id, "_postingDetail"),
207
- name: '详细地址'
207
+ name: "详细地址"
208
208
  }));
209
209
  this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
210
210
  id: "".concat(options.id, "_postingReceiverName"),
211
- name: '收件人姓名'
211
+ name: "收件人姓名"
212
212
  }));
213
213
  this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
214
214
  id: "".concat(options.id, "_postingReceiverMobile"),
215
- name: '收件人电话'
215
+ name: "收件人电话"
216
216
  }));
217
217
  this.children = this.isSplitColumns ? [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile] : [];
218
218
  this.rules = options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
219
219
  validator: function validator(_, value) {
220
- var _value$postingAddress;
221
- if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
220
+ var _options$componentCon4, _value$postingAddress, _value$postingAddress2;
221
+ var addressLen = (options === null || options === void 0 ? void 0 : (_options$componentCon4 = options.componentConfig) === null || _options$componentCon4 === void 0 ? void 0 : _options$componentCon4.showField) === "bs" ? !(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || (value === null || value === void 0 ? void 0 : value.postingAddress.some(function (t) {
222
+ return !t;
223
+ })) : !(value !== null && value !== void 0 && (_value$postingAddress2 = value.postingAddress) !== null && _value$postingAddress2 !== void 0 && _value$postingAddress2.length);
224
+ if (addressLen || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
222
225
  return Promise.reject(new Error("请填写地址"));
223
226
  }
224
227
  return Promise.resolve();
@@ -71,6 +71,20 @@ var selectTypeMap = {
71
71
  key: 'invoiceStatusValue',
72
72
  info: 'invoiceReason',
73
73
  failValue: '失败'
74
+ },
75
+ INVOICING_STATUS: {
76
+ options: [{
77
+ value: '开票成功',
78
+ label: '开票成功',
79
+ color: '#52c41a'
80
+ }, {
81
+ value: '开票失败',
82
+ label: '开票失败',
83
+ color: '#ff4d4f'
84
+ }],
85
+ key: 'invoicingStatusValue',
86
+ info: 'invoicingReason',
87
+ failValue: '开票失败'
74
88
  }
75
89
  };
76
90
  var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, 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, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsExchange | BsGoods | BsReissue | BsReturn | BsSystemOrder | CommonMultiStatus | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting;
3
+ export declare const factory: (type: string, options: PickOption) => StatusSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting;
@@ -154,6 +154,7 @@ export var factory = function factory(type, options) {
154
154
  case "ADJUST_WORK_ORDER_STATUS":
155
155
  case "CREATE_STATUS":
156
156
  case "INVOICE_STATUS":
157
+ case "INVOICING_STATUS":
157
158
  return new StatusSelect(options);
158
159
  case "RETURN_GOODS_STATUS":
159
160
  case "EXCHANGE_STATUS":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.14.1",
3
+ "version": "0.15.0-alpha.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.14.1",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.14.1"
29
+ "@kmkf-fe-packages/basic-components": "^0.15.0-alpha.1",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.15.0-alpha.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "6cdf51565e497213b786f988ba694684a046d697"
43
+ "gitHead": "2799ddc04c519d1cc57cd3f84aac302d18655ef7"
44
44
  }