kmkf-work-order-service-component 0.4.13-alpha.1 → 0.4.13-alpha.3

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.
@@ -675,7 +675,8 @@ var FormRender = function FormRender(props, ref) {
675
675
 
676
676
  case 'JST_SUPPLY':
677
677
  prv[next.uniqueKey] = [{
678
- supplyId: null
678
+ supplyId: null,
679
+ supplyName: null
679
680
  }];
680
681
  break;
681
682
 
@@ -231,6 +231,6 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
231
231
  color: '#1890ff',
232
232
  cursor: 'pointer'
233
233
  }
234
- }, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyId) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendName, item.sendId].join('/') : item.sendId ? item.sendId : item.sendName) : null));
234
+ }, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyName, item.supplyId].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendName, item.sendId].join('/') : item.sendId ? item.sendId : item.sendName) : null));
235
235
  }) : null;
236
236
  };
@@ -61,12 +61,24 @@ var JstSupply = /*#__PURE__*/function (_BasicComponent) {
61
61
  return [{
62
62
  required: true,
63
63
  validator: function validator(_, value) {
64
+ var showField = config.showField;
65
+
66
+ if (!value || !value.length) {
67
+ return Promise.reject(new Error('请选择宝贝'));
68
+ }
69
+
64
70
  var hasNo = (value || []).some(function (item) {
65
- return item.supplyId;
71
+ if (['supplyName'].includes(showField)) {
72
+ return item.supplyName;
73
+ } else if (['supplyId'].includes(showField)) {
74
+ return item.supplyId;
75
+ } else {
76
+ return item.supplyId && item.supplyName;
77
+ }
66
78
  });
67
79
 
68
80
  if (!hasNo) {
69
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u4F9B\u9500\u5546\u7F16\u7801"));
81
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684\u4F9B\u9500\u5546\u4FE1\u606F"));
70
82
  }
71
83
 
72
84
  return Promise.resolve();
@@ -90,7 +102,7 @@ var JstSupply = /*#__PURE__*/function (_BasicComponent) {
90
102
 
91
103
  _defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
92
104
  return value.map(function (item) {
93
- return "".concat(item.supplyId || '', "\n");
105
+ return "".concat(item.supplyName || '', "/").concat(item.supplyId || '');
94
106
  });
95
107
  });
96
108
 
@@ -474,16 +474,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
474
474
  name: item.name
475
475
  });
476
476
  } else if (item.workOrderComponentType === 'JST_SUPPLY') {
477
- var supplyList = get(nowData, "".concat(item.uniqueKey), []); // if (
478
- // supplyList.length === 1 &&
479
- // !supplyList[0]?.items?.length &&
480
- // supplyList.some((t) => {
481
- // return !t.supplyId;
482
- // })
483
- // ) {
484
- // supplyList = [];
485
- // }
486
-
477
+ var supplyList = get(nowData, "".concat(item.uniqueKey), []);
487
478
  contentVoList.push({
488
479
  uniqueKey: "".concat(item.uniqueKey, "_jstItemList"),
489
480
  content: JSON.stringify(supplyList),
@@ -496,17 +487,15 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
496
487
  }).join(),
497
488
  name: item.name
498
489
  });
490
+ contentVoList.push({
491
+ uniqueKey: "".concat(item.uniqueKey, "_supplyName"),
492
+ content: supplyList.map(function (item) {
493
+ return item.supplyName;
494
+ }).join(),
495
+ name: item.name
496
+ });
499
497
  } else if (item.workOrderComponentType === 'JST_SEND_GOOD') {
500
- var sendList = get(nowData, "".concat(item.uniqueKey), []); // if (
501
- // sendList.length === 1 &&
502
- // !sendList[0]?.items?.length &&
503
- // sendList.some((t) => {
504
- // return !t.sendId && !t.sendName;
505
- // })
506
- // ) {
507
- // sendList = [];
508
- // }
509
-
498
+ var sendList = get(nowData, "".concat(item.uniqueKey), []);
510
499
  contentVoList.push({
511
500
  uniqueKey: "".concat(item.uniqueKey, "_jstItemList"),
512
501
  content: JSON.stringify(sendList),
@@ -1177,7 +1166,15 @@ export var updateJSTItemListHandle = function updateJSTItemListHandle() {
1177
1166
  params.logisticsCompany = express.getExpressNameByName(item.logisticsCompany);
1178
1167
  params.logisticsCode = item.lId;
1179
1168
  } else if (type === 'supply') {
1180
- params.supplyId = item.drpCoIdTo;
1169
+ console.log(showField, item);
1170
+
1171
+ if (['supplyId', 'all'].includes(showField)) {
1172
+ params.supplyId = item.drpCoIdTo;
1173
+ }
1174
+
1175
+ if (['supplyName', 'all'].includes(showField)) {
1176
+ params.supplyName = item.drpCoName;
1177
+ }
1181
1178
  } else if (type === 'send') {
1182
1179
  if (['sendId', 'all'].includes(showField)) {
1183
1180
  params.sendId = item.wmsCoId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.4.13-alpha.1",
3
+ "version": "0.4.13-alpha.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@ant-design/icons": "^4.7.0",
42
- "@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.2.0-alpha.8",
42
+ "@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.2.0-alpha.9",
43
43
  "@reduxjs/toolkit": "^1.8.5",
44
44
  "ahooks": "^3.7.4",
45
45
  "copy-to-clipboard": "^3.3.3",