fantasy-ngzorro 1.5.24 → 1.5.25

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.
@@ -1326,13 +1326,12 @@
1326
1326
  // 灰色
1327
1327
  '#9FA4A2': ['initial', 'uncommitted', 'OFF_LINE', 'UN_PRINTED', 'unpublish', 'pastpublish', 'TO_COMMIT', 'unpublished', '未审核', 'returned'],
1328
1328
  // 红色
1329
- '#F5222D': ['delete', 'deleted', 'aborted', 'rejected', '停用', '禁用', 'unpicked', 'DELETED', 'AUDIT_REJECT', 'rejected'],
1329
+ '#F5222D': ['delete', 'deleted', 'aborted', 'rejected', '停用', '禁用', 'unpicked', 'DELETED', 'AUDIT_REJECT', 'rejected', 'invalid', 'disabled', ''],
1330
1330
  // 蓝色
1331
- '#3B77E3': ['audited', 'adjusted', 'invoiced', 'audit', 'submitted', 'TO_AUDIT', '已审核', '处理中', 'processing', 'firstReviewed'],
1331
+ '#3B77E3': ['audited', 'adjusted', 'invoiced', 'audit', 'submitted', 'TO_AUDIT', '已审核', '处理中', 'processing', 'firstReviewed', 'awaiting_effective'],
1332
1332
  // 绿色
1333
1333
  '#12A34F': ['shipped', 'received', 'checked', 'using', 'reverse', 'valid', 'approved', 'ON_LINE', 'finished', 'opened', 'PRINTED', '启用', 'picked', 'published', 'AUDITED', '已收票', '付款完成', '收款完成', '已收款', 'accepted',
1334
- 'offered', 'confirmed'
1335
- ],
1334
+ 'offered', 'confirmed', 'effective'],
1336
1335
  // 橙色
1337
1336
  '#F05B24': ['partialReceived', 'partDelete', 'tender', 'MODIFIED_AFTER_PRINTED', '部分付款', '部分收款', 'partPublished']
1338
1337
  };
@@ -2195,19 +2194,49 @@
2195
2194
  for (var i = 0; i < pageLinesLength; i++) {
2196
2195
  this.collectDomList.push(pageDomList.splice(0, interval));
2197
2196
  }
2198
- // TODO: 这里不能直接关掉,先注释
2199
- // 关闭所有NzInputNumberComponent的键盘上下箭头触发+-的功能
2200
- // for (let i = 0; i < this.collectDomList.length; i++) {
2201
- // for (let j = 0; j < this.collectDomList[i].length; j++) {
2202
- // const dom = this.collectDomList[i][j];
2203
- // if (dom instanceof NzInputNumberComponent) {
2204
- // dom.down = () => {
2205
- // };
2206
- // dom.up = () => {
2207
- // };
2208
- // }
2209
- // }
2210
- // }
2197
+ this.disableInputNumberKeyboardStep();
2198
+ };
2199
+ /**
2200
+ * ng-zorro 8 input onKeyDown 里用上下键调 up()/down() 改 step。
2201
+ * 只覆盖 onKeyDown(不动 up/down),键盘方向键交给表单跳转,+/- 按钮仍可用。
2202
+ */
2203
+ /**
2204
+ * ng-zorro 8 在 input 的 onKeyDown 里用上下键调 up()/down() 改 step。
2205
+ * 只覆盖 onKeyDown(不动 up/down),键盘方向键交给表单跳转,+/- 按钮仍可用。
2206
+ * @private
2207
+ * @return {?}
2208
+ */
2209
+ HdFormLinesComponent.prototype.disableInputNumberKeyboardStep = /**
2210
+ * ng-zorro 8 在 input 的 onKeyDown 里用上下键调 up()/down() 改 step。
2211
+ * 只覆盖 onKeyDown(不动 up/down),键盘方向键交给表单跳转,+/- 按钮仍可用。
2212
+ * @private
2213
+ * @return {?}
2214
+ */
2215
+ function () {
2216
+ for (var i = 0; i < this.collectDomList.length; i++) {
2217
+ var _loop_1 = function (j) {
2218
+ /** @type {?} */
2219
+ var dom = this_1.collectDomList[i][j];
2220
+ if (dom instanceof ngZorroAntd.NzInputNumberComponent) {
2221
+ dom.onKeyDown = (/**
2222
+ * @param {?} e
2223
+ * @return {?}
2224
+ */
2225
+ function (e) {
2226
+ if (e.keyCode === 38 || e.keyCode === 40) {
2227
+ return;
2228
+ }
2229
+ if (e.keyCode === 13) {
2230
+ dom.setValidateValue();
2231
+ }
2232
+ });
2233
+ }
2234
+ };
2235
+ var this_1 = this;
2236
+ for (var j = 0; j < this.collectDomList[i].length; j++) {
2237
+ _loop_1(j);
2238
+ }
2239
+ }
2211
2240
  };
2212
2241
  // 聚焦下一个dom
2213
2242
  // 聚焦下一个dom
@@ -4921,21 +4950,20 @@
4921
4950
  */
4922
4951
  function () {
4923
4952
  /** @type {?} */
4924
- var findKey = '';
4953
+ var findKey = "";
4954
+ /** @type {?} */
4955
+ var statusLower = this.status && this.status.toLowerCase();
4925
4956
  for (var key in statusToColor) {
4926
- if (this.status &&
4927
- (statusToColor[key].indexOf(this.status) !== -1 ||
4928
- statusToColor[key].indexOf(this.status.toUpperCase()) !== -1 ||
4929
- statusToColor[key].indexOf(this.status.toLowerCase()) !== -1)) {
4957
+ if (statusLower &&
4958
+ statusToColor[key].some((/**
4959
+ * @param {?} item
4960
+ * @return {?}
4961
+ */
4962
+ function (item) { return item && item.toLowerCase() === statusLower; }))) {
4930
4963
  findKey = key;
4931
4964
  }
4932
4965
  }
4933
- if (findKey) {
4934
- this.statusColor = findKey;
4935
- }
4936
- else {
4937
- this.statusColor = '#9FA4A2';
4938
- }
4966
+ this.statusColor = findKey || "#9FA4A2";
4939
4967
  };
4940
4968
  HdStatusComponent.decorators = [
4941
4969
  { type: core.Component, args: [{