@kmkf-fe-packages/kmkf-work-order-service-component 2.13.4 → 2.13.5

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.
Files changed (42) hide show
  1. package/dist/esm/FlowTemplateDetailV2/constant.js +1 -1
  2. package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
  3. package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
  4. package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
  5. package/dist/esm/common/utils/constant.js +16 -0
  6. package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +899 -0
  7. package/dist/esm/common/utils/dist/tools.js +1326 -0
  8. package/dist/esm/common/utils/dist/transformWorkOrderData.js +965 -0
  9. package/dist/esm/common/utils/submitDataTransOldFormat.js +3 -0
  10. package/dist/esm/common/utils/tools.js +4 -0
  11. package/dist/esm/common/utils/transformWorkOrderData.js +46 -19
  12. package/dist/esm/model/customizeWorkOrder/dist/api.js +48 -0
  13. package/dist/esm/model/customizeWorkOrder/dist/index.js +370 -0
  14. package/dist/esm/model/customizeWorkOrder/dist/selector.js +63 -0
  15. package/dist/esm/model/customizeWorkOrder/dist/types.js +3 -0
  16. package/dist/esm/model/dist/global.js +44 -0
  17. package/dist/esm/model/dist/hooks.js +15 -0
  18. package/dist/esm/model/dist/login.js +245 -0
  19. package/dist/esm/model/dist/store.js +30 -0
  20. package/dist/esm/model/dist/userData.js +41 -0
  21. package/dist/esm/model/dist/workOrder.js +329 -0
  22. package/dist/esm/model/flowTemplateDetail/dist/api.js +192 -0
  23. package/dist/esm/model/flowTemplateDetail/dist/types.js +48 -0
  24. package/dist/esm/model/logicFlow/dist/api.js +14 -0
  25. package/dist/esm/model/logicFlow/dist/index.js +235 -0
  26. package/dist/esm/model/logicFlow/dist/selector.js +18 -0
  27. package/dist/esm/model/logicFlow/dist/types.js +3 -0
  28. package/dist/esm/model/logicFlow/selector.d.ts +3 -3
  29. package/dist/esm/model/paymentWorkOrder/dist/index.js +77 -0
  30. package/dist/esm/model/paymentWorkOrder/dist/selector.js +36 -0
  31. package/dist/esm/model/paymentWorkOrder/dist/types.js +3 -0
  32. package/dist/esm/model/paymentWorkOrder/selector.d.ts +0 -9
  33. package/dist/esm/model/servers/dist/api.js +545 -0
  34. package/dist/esm/model/servers/dist/request.js +63 -0
  35. package/dist/esm/model/singleShopWorkOrder/dist/index.js +216 -0
  36. package/dist/esm/model/singleShopWorkOrder/dist/selector.js +24 -0
  37. package/dist/esm/model/singleShopWorkOrder/dist/types.js +3 -0
  38. package/dist/esm/model/singleShopWorkOrder/selector.d.ts +0 -5
  39. package/dist/esm/model/types/dist/login.js +3 -0
  40. package/dist/esm/model/types/dist/singleWorkOrder.js +3 -0
  41. package/dist/esm/model/types/dist/workOrder.js +3 -0
  42. package/package.json +5 -5
@@ -908,6 +908,7 @@ var processComponent = function processComponent(_ref63) {
908
908
  case 'BUSINESS_ORDER_NO':
909
909
  case 'PAYMENT_VOUCHER_CODE':
910
910
  case 'BASIC_MULT_SELECT':
911
+ case 'JY_ABNORMAL_FLAG':
911
912
  case 'ORDER_TYPE':
912
913
  case 'PLATFORM_TRANSIT_FLAG':
913
914
  case 'PLATFORM_TRANSIT_TYPE':
@@ -1078,6 +1079,7 @@ var processComponent = function processComponent(_ref63) {
1078
1079
  case 'GY_GOODS':
1079
1080
  case 'JST_GOODS':
1080
1081
  case 'KM_GOODS':
1082
+ case 'KM_AFTERSALE_GOODS':
1081
1083
  case 'JY_GOODS':
1082
1084
  case 'JKY_GOODS':
1083
1085
  case 'DXD_GOODS':
@@ -1137,6 +1139,7 @@ var processComponent = function processComponent(_ref63) {
1137
1139
  break;
1138
1140
  case 'BS_SYSTEM_ORDER':
1139
1141
  case 'KM_SYSTEM_ORDER':
1142
+ case 'KM_AFTER_SALES_ORDER':
1140
1143
  case 'WLN_SYSTEM_ORDER':
1141
1144
  case 'WDT_SYSTEM_ORDER':
1142
1145
  case 'BS_E3_SYSTEM_ORDER':
@@ -1295,6 +1295,10 @@ export var reversalFormValues = function reversalFormValues() {
1295
1295
  prv["".concat(next.uniqueKey, "_kmGoods")] = JSON.stringify(values[next.uniqueKey]['_kmGoods']);
1296
1296
  prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
1297
1297
  break;
1298
+ case 'KM_AFTERSALE_GOODS':
1299
+ prv["".concat(next.uniqueKey, "_kmAftersaleGoods")] = JSON.stringify(values[next.uniqueKey]['kmAftersaleGoods']);
1300
+ prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
1301
+ break;
1298
1302
  case 'SKX_GOODS':
1299
1303
  prv["".concat(next.uniqueKey, "_skxGoods")] = JSON.stringify(values[next.uniqueKey]['_skxGoods']);
1300
1304
  break;
@@ -178,6 +178,17 @@ var processBasicMultSelect = function processBasicMultSelect(getValue) {
178
178
  return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(v, '') || basicMultSelect);
179
179
  };
180
180
  };
181
+ var processJyAbnormalFlag = function processJyAbnormalFlag(getValue) {
182
+ return function (nex, config) {
183
+ var v = getValue("".concat(nex.uniqueKey, "_jyAbnormalFlag"));
184
+ var values = ((config === null || config === void 0 ? void 0 : config.options) || []).reduce(function (prv, next) {
185
+ var _config$basicMultSele2;
186
+ if (config !== null && config !== void 0 && (_config$basicMultSele2 = config.basicMultSelect) !== null && _config$basicMultSele2 !== void 0 && _config$basicMultSele2.includes(next.value)) prv.push(next.value);
187
+ return prv;
188
+ }, []);
189
+ return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(v, '') || values);
190
+ };
191
+ };
181
192
  var processMultSelect = function processMultSelect(getValue) {
182
193
  return function (nex, config) {
183
194
  var v = getValue("".concat(nex.uniqueKey, "_multSelect"));
@@ -233,20 +244,20 @@ var processOrderSubForm = function processOrderSubForm(templateColumns) {
233
244
  };
234
245
  var processExpressLogisticsSelect = function processExpressLogisticsSelect(getValue) {
235
246
  return function (nex, config) {
236
- var _ref24;
237
- return _ref24 = {}, _defineProperty(_ref24, nex.uniqueKey, {
247
+ var _ref25;
248
+ return _ref25 = {}, _defineProperty(_ref25, nex.uniqueKey, {
238
249
  company: getValue("".concat(nex.uniqueKey, "_expressLogisticsCompany")),
239
250
  order: getValue("".concat(nex.uniqueKey, "_expressLogisticsCode"))
240
- }), _defineProperty(_ref24, "".concat(nex.uniqueKey, "_expressLogisticsCompany"), getValue("".concat(nex.uniqueKey, "_expressLogisticsCompany"))), _defineProperty(_ref24, "".concat(nex.uniqueKey, "_expressLogisticsCode"), getValue("".concat(nex.uniqueKey, "_expressLogisticsCode"))), _ref24;
251
+ }), _defineProperty(_ref25, "".concat(nex.uniqueKey, "_expressLogisticsCompany"), getValue("".concat(nex.uniqueKey, "_expressLogisticsCompany"))), _defineProperty(_ref25, "".concat(nex.uniqueKey, "_expressLogisticsCode"), getValue("".concat(nex.uniqueKey, "_expressLogisticsCode"))), _ref25;
241
252
  };
242
253
  };
243
254
  var processReturnLogisticsSelect = function processReturnLogisticsSelect(getValue) {
244
255
  return function (nex, config) {
245
- var _ref25;
246
- return _ref25 = {}, _defineProperty(_ref25, nex.uniqueKey, {
256
+ var _ref26;
257
+ return _ref26 = {}, _defineProperty(_ref26, nex.uniqueKey, {
247
258
  company: getValue("".concat(nex.uniqueKey, "_returnLogisticsCompany")),
248
259
  order: getValue("".concat(nex.uniqueKey, "_returnLogisticsCode"))
249
- }), _defineProperty(_ref25, "".concat(nex.uniqueKey, "_returnLogisticsCompany"), getValue("".concat(nex.uniqueKey, "_returnLogisticsCompany"))), _defineProperty(_ref25, "".concat(nex.uniqueKey, "_returnLogisticsCode"), getValue("".concat(nex.uniqueKey, "_returnLogisticsCode"))), _ref25;
260
+ }), _defineProperty(_ref26, "".concat(nex.uniqueKey, "_returnLogisticsCompany"), getValue("".concat(nex.uniqueKey, "_returnLogisticsCompany"))), _defineProperty(_ref26, "".concat(nex.uniqueKey, "_returnLogisticsCode"), getValue("".concat(nex.uniqueKey, "_returnLogisticsCode"))), _ref26;
250
261
  };
251
262
  };
252
263
  var processRemarkInput = function processRemarkInput(getValue) {
@@ -261,25 +272,25 @@ var processRemarkInput = function processRemarkInput(getValue) {
261
272
  };
262
273
  var processStatus = function processStatus(getValue) {
263
274
  return function (nex, config) {
264
- var _ref27;
275
+ var _ref28;
265
276
  var customerService = getValue("".concat(nex.uniqueKey, "_customerService"));
266
- return _ref27 = {}, _defineProperty(_ref27, nex.uniqueKey, {
277
+ return _ref28 = {}, _defineProperty(_ref28, nex.uniqueKey, {
267
278
  status: getValue("".concat(nex.uniqueKey, "_status")) || (config === null || config === void 0 ? void 0 : config.status),
268
279
  customerService: jsonParseSecurity(customerService, customerService)
269
- }), _defineProperty(_ref27, "".concat(nex.uniqueKey, "_processTime"), getValue('processTime')), _defineProperty(_ref27, "".concat(nex.uniqueKey, "_lastProcessingTime"), getValue('lastProcessingTime')), _ref27;
280
+ }), _defineProperty(_ref28, "".concat(nex.uniqueKey, "_processTime"), getValue('processTime')), _defineProperty(_ref28, "".concat(nex.uniqueKey, "_lastProcessingTime"), getValue('lastProcessingTime')), _ref28;
270
281
  };
271
282
  };
272
283
  var processOrdinaryInvoice = function processOrdinaryInvoice(getValue) {
273
284
  return function (nex, config) {
274
- var _ref28;
285
+ var _ref29;
275
286
  var ordinaryMoney = getValue("".concat(nex.uniqueKey, "_ordinaryMoney"));
276
287
  var ordinarySerial = getValue("".concat(nex.uniqueKey, "_ordinarySerial"));
277
288
  var ordinaryTaitou = getValue("".concat(nex.uniqueKey, "_ordinaryTaitou"));
278
- return _ref28 = {}, _defineProperty(_ref28, nex.uniqueKey, {
289
+ return _ref29 = {}, _defineProperty(_ref29, nex.uniqueKey, {
279
290
  ordinaryMoney: ordinaryMoney,
280
291
  ordinarySerial: ordinarySerial,
281
292
  ordinaryTaitou: ordinaryTaitou
282
- }), _defineProperty(_ref28, "".concat(nex.uniqueKey, "_ordinaryMoney"), ordinaryMoney ? Number(ordinaryMoney).toFixed(2) : null), _defineProperty(_ref28, "".concat(nex.uniqueKey, "_ordinarySerial"), ordinarySerial), _defineProperty(_ref28, "".concat(nex.uniqueKey, "_ordinaryTaitou"), ordinaryTaitou), _ref28;
293
+ }), _defineProperty(_ref29, "".concat(nex.uniqueKey, "_ordinaryMoney"), ordinaryMoney ? Number(ordinaryMoney).toFixed(2) : null), _defineProperty(_ref29, "".concat(nex.uniqueKey, "_ordinarySerial"), ordinarySerial), _defineProperty(_ref29, "".concat(nex.uniqueKey, "_ordinaryTaitou"), ordinaryTaitou), _ref29;
283
294
  };
284
295
  };
285
296
  var processLogisticsInterception = function processLogisticsInterception(getValue) {
@@ -336,12 +347,12 @@ var processItemSelectThird = function processItemSelectThird(getValue) {
336
347
  };
337
348
  var processEnterPrisePayment = function processEnterPrisePayment(getValue) {
338
349
  return function (nex, config) {
339
- var _ref35;
350
+ var _ref36;
340
351
  var subFields = ['enterprisePaymentAlipayNick', 'enterprisePaymentAlipayNo', 'enterprisePaymentBuyerNick', 'enterprisePaymentBuyerOpenUid', 'enterprisePaymentRefundFee', 'enterprisePaymentStatus', 'enterprisePaymentTid'];
341
352
  var map = subFields.reduce(function (cur, nxt) {
342
353
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
343
354
  }, {});
344
- return _ref35 = {}, _defineProperty(_ref35, nex.uniqueKey, map), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"))), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"))), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"))), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"))), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentStatus"))), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTime"))), _defineProperty(_ref35, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTid"))), _ref35;
355
+ return _ref36 = {}, _defineProperty(_ref36, nex.uniqueKey, map), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"))), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"))), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"))), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"))), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentStatus"))), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTime"))), _defineProperty(_ref36, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTid"))), _ref36;
345
356
  };
346
357
  };
347
358
  var processJstLogistics = function processJstLogistics(getValue) {
@@ -997,6 +1008,14 @@ var processKmExchangeGoods = function processKmExchangeGoods(getValue) {
997
1008
  });
998
1009
  };
999
1010
  };
1011
+ var processKmAftersaleGoods = function processKmAftersaleGoods(getValue) {
1012
+ return function (nex) {
1013
+ return _defineProperty({}, nex.uniqueKey, {
1014
+ kmAftersaleGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmAftersaleGoods")), []),
1015
+ shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
1016
+ });
1017
+ };
1018
+ };
1000
1019
  var processJstExchangeGoods = function processJstExchangeGoods(getValue) {
1001
1020
  return function (nex, config) {
1002
1021
  return _defineProperty({}, nex.uniqueKey, {
@@ -1038,6 +1057,11 @@ var processErpSystemOrder = function processErpSystemOrder(getValue) {
1038
1057
  ids: 'kmSystemSelectIds',
1039
1058
  order: 'kmSystemShowOrder'
1040
1059
  },
1060
+ KM_AFTER_SALES_ORDER: {
1061
+ no: 'kmAfterSalesOrderNo',
1062
+ ids: 'kmAfterSalesSelectIds',
1063
+ order: 'kmAfterSalesShowOrder'
1064
+ },
1041
1065
  WLN_SYSTEM_ORDER: {
1042
1066
  no: 'wlnSystemOrderNo',
1043
1067
  ids: 'wlnSystemSelectIds',
@@ -1091,7 +1115,7 @@ var processErpSystemOrder = function processErpSystemOrder(getValue) {
1091
1115
  };
1092
1116
  return _defineProperty({}, nex.uniqueKey, _objectSpread({
1093
1117
  orderNo: getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].no)),
1094
- orders: nex.workOrderComponentType === 'WDT_RETURN_BILL_NO' ? jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].order)), []) : [],
1118
+ orders: ['WDT_RETURN_BILL_NO', 'KM_AFTER_SALES_ORDER'].includes(nex.workOrderComponentType) ? jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].order)), []) : [],
1095
1119
  selectIds: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].ids)), []),
1096
1120
  showOrderInfo: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(systemOrderMap[nex.workOrderComponentType].order)), [])
1097
1121
  }, systemOrderMap[nex.workOrderComponentType].shopId ? {
@@ -1431,14 +1455,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
1431
1455
  };
1432
1456
  var processLabel = function processLabel(getValue) {
1433
1457
  return function (nex, config) {
1434
- var _ref89;
1435
- return _ref89 = {}, _defineProperty(_ref89, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref89, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref89;
1458
+ var _ref91;
1459
+ return _ref91 = {}, _defineProperty(_ref91, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref91, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref91;
1436
1460
  };
1437
1461
  };
1438
1462
  var processMemberLevel = function processMemberLevel(getValue) {
1439
1463
  return function (nex, config) {
1440
- var _ref90;
1441
- return _ref90 = {}, _defineProperty(_ref90, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref90, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref90;
1464
+ var _ref92;
1465
+ return _ref92 = {}, _defineProperty(_ref92, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref92, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref92;
1442
1466
  };
1443
1467
  };
1444
1468
  var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
@@ -1500,6 +1524,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1500
1524
  PICTURE: processPicture,
1501
1525
  PICTURE_PRO: processPicturePro,
1502
1526
  BASIC_MULT_SELECT: processBasicMultSelect,
1527
+ JY_ABNORMAL_FLAG: processJyAbnormalFlag,
1503
1528
  MULT_SELECT: processMultSelect,
1504
1529
  BASIC_ADDRESS: processBasicAddress,
1505
1530
  RECEIVER_ADDRESS_INPUT: processReceiverAddressInput,
@@ -1585,6 +1610,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1585
1610
  JY_GOODS: processJyGoods(templateColumns),
1586
1611
  JKY_GOODS: processJkyGoods(templateColumns),
1587
1612
  KM_GOODS: processKmGoods(templateColumns),
1613
+ KM_AFTERSALE_GOODS: processKmAftersaleGoods,
1588
1614
  KM_REISSUE_GOODS: processKmReissueGoods(templateColumns),
1589
1615
  KM_RETURN_GOODS: processKmReturnGoods(templateColumns),
1590
1616
  JY_REISSUE_GOODS: processJyReissueGoods(templateColumns),
@@ -1604,6 +1630,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1604
1630
  PLATFORM_AFTER_SALES_ORDER: processErpSystemOrder,
1605
1631
  BS_SYSTEM_ORDER: processErpSystemOrder,
1606
1632
  KM_SYSTEM_ORDER: processErpSystemOrder,
1633
+ KM_AFTER_SALES_ORDER: processErpSystemOrder,
1607
1634
  DXD_SYSTEM_ORDER: processErpSystemOrder,
1608
1635
  TTX_SYSTEM_ORDER: processErpSystemOrder,
1609
1636
  WLN_SYSTEM_ORDER: processErpSystemOrder,
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var __spreadArrays = this && this.__spreadArrays || function () {
4
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
5
+ for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
6
+ return r;
7
+ };
8
+ exports.__esModule = true;
9
+ exports.fetchShowPayment = exports.flatWorkOrder = exports.getPlatList = exports.queryAllComponentList = void 0;
10
+ var request_1 = require("../servers/request");
11
+ // 所有组件信息
12
+ exports.queryAllComponentList = function (data) {
13
+ return request_1['default']({
14
+ url: '/qy/column/header/queryConfig',
15
+ method: 'get',
16
+ data: data
17
+ });
18
+ };
19
+ // 平台信息
20
+ exports.getPlatList = function (data) {
21
+ return request_1['default']({
22
+ url: '/qy/platform/listPlatform',
23
+ method: 'get',
24
+ data: data
25
+ }).then(function (res) {
26
+ var platType = res.data || {};
27
+ platType.alreadyJoinedList = platType.alreadyJoinedList || [];
28
+ platType.notJoinList = platType.notJoinList || [];
29
+ var list = __spreadArrays(platType.alreadyJoinedList, platType.notJoinList);
30
+ return list;
31
+ });
32
+ };
33
+ //打标
34
+ exports.flatWorkOrder = function (data) {
35
+ return request_1['default']({
36
+ url: '/qy/flow/operate/flagWorkOrder',
37
+ method: 'post',
38
+ data: data
39
+ });
40
+ };
41
+ // 是否展示打款工单入口
42
+ exports.fetchShowPayment = function (data) {
43
+ return request_1['default']({
44
+ url: '/qy/userConfig/getConfig',
45
+ method: 'post',
46
+ data: data
47
+ });
48
+ };
@@ -0,0 +1,370 @@
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
+ var _a;
119
+ exports.__esModule = true;
120
+ exports.setShowPayment = exports.setRepeatWorkOrderConditions = exports.setRepeatModalVisible = exports.setAllTemplateList = exports.setCurrentBuyerChecked = exports.setCurrentCustomizeRecord = exports.setCustomizeFormShopId = exports.setFlowWorkOrderId = exports.setLogicFlowId = exports.setTemplateId = exports.setFormModalVisible = exports.setLogModalVisible = exports.setStatusSelectModalVisible = exports.setSelectedUserList = exports.setCompanyUserList = exports.setDealerModalVisible = exports.setDeleteCustomizeWorkOrderModalVisible = exports.showPayment = exports.fetchFlatWorkOrder = exports.fetchAllComponentList = exports.fetchCompanyUserList = exports.initialState = void 0;
121
+ /*
122
+ * @Description:
123
+ * @Author: litian
124
+ * @Date: 2022-06-27 09:28:22
125
+ * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
126
+ * @LastEditTime: 2022-11-16 20:21:37
127
+ */
128
+ var toolkit_1 = require('@reduxjs/toolkit');
129
+ var api_1 = require("../servers/api");
130
+ var api_2 = require("./api");
131
+ exports.initialState = {
132
+ deleteCustomizeWorkOrderModalVisible: false,
133
+ cancelInterceptionModalVisible: false,
134
+ selectDealerModalVisible: false,
135
+ companyUserList: [],
136
+ selectedUserList: [],
137
+ statusSelectModalVisible: false,
138
+ logModalVisible: false,
139
+ formModalVisible: false,
140
+ templateId: '',
141
+ logicFlowId: '',
142
+ flowWorkOrderId: '',
143
+ customizeFormShopId: '',
144
+ currentCustomizeRecord: {},
145
+ currentBuyerChecked: false,
146
+ allTemplateList: [],
147
+ repeatWorkOrderVisible: false,
148
+ repeatWorkOrderConditions: {},
149
+ showPayment: true
150
+ };
151
+ /**
152
+ * @description: 获取平台信息列表
153
+ * @param {*} dispatch
154
+ * @return {array}
155
+ */
156
+ exports.fetchCompanyUserList = function (dispatch) {
157
+ return __awaiter(void 0, void 0, void 0, function () {
158
+ var res, companyUserList, error_1;
159
+ var _a;
160
+ return __generator(this, function (_b) {
161
+ switch (_b.label) {
162
+ case 0:
163
+ _b.trys.push([0, 2,, 3]);
164
+ return [4 /*yield*/, api_1.queryCompanyUserList({})];
165
+ case 1:
166
+ res = _b.sent();
167
+ if (res.success) {
168
+ companyUserList = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.map(function (i) {
169
+ return {
170
+ label: i.account,
171
+ value: i.userKey
172
+ };
173
+ });
174
+ dispatch(exports.setCompanyUserList(companyUserList));
175
+ }
176
+ return [3 /*break*/, 3];
177
+ case 2:
178
+ error_1 = _b.sent();
179
+ console.error(error_1);
180
+ return [3 /*break*/, 3];
181
+ case 3:
182
+ return [2 /*return*/];
183
+ }
184
+ });
185
+ });
186
+ };
187
+
188
+ var transData = function transData(item) {
189
+ return {
190
+ componentConfig: item.config,
191
+ workOrderComponentType: item.type,
192
+ uniqueKey: item.id,
193
+ name: item.name
194
+ };
195
+ };
196
+ /**
197
+ * 查询所有工单下面的组件信息
198
+ */
199
+ exports.fetchAllComponentList = function (dispatch) {
200
+ return __awaiter(void 0, void 0, void 0, function () {
201
+ var res, allComponentList, error_2;
202
+ var _a, _b, _c, _d, _e;
203
+ return __generator(this, function (_f) {
204
+ switch (_f.label) {
205
+ case 0:
206
+ _f.trys.push([0, 2,, 3]);
207
+ return [4 /*yield*/, api_2.queryAllComponentList({
208
+ templateId: 'EHS2XLO7QXHYOR65I6OHQWNY'
209
+ })];
210
+ case 1:
211
+ res = _f.sent();
212
+ if (res.success) {
213
+ allComponentList = ((_c = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.fixedColumns) === null || _b === void 0 ? void 0 : _b.map(transData)) === null || _c === void 0 ? void 0 : _c.concat((_e = (_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.nonFixedColumns) === null || _e === void 0 ? void 0 : _e.map(transData))) || [];
214
+ console.debug('allComponentList', allComponentList);
215
+ dispatch(exports.setAllTemplateList(allComponentList));
216
+ }
217
+ return [3 /*break*/, 3];
218
+ case 2:
219
+ error_2 = _f.sent();
220
+ console.error(error_2);
221
+ return [3 /*break*/, 3];
222
+ case 3:
223
+ return [2 /*return*/];
224
+ }
225
+ });
226
+ });
227
+ };
228
+ /**
229
+ * 工单打标
230
+ */
231
+ exports.fetchFlatWorkOrder = function (params) {
232
+ return __awaiter(void 0, void 0, void 0, function () {
233
+ var error_3;
234
+ return __generator(this, function (_a) {
235
+ switch (_a.label) {
236
+ case 0:
237
+ _a.trys.push([0, 2,, 3]);
238
+ return [4 /*yield*/, api_2.flatWorkOrder(params)];
239
+ case 1:
240
+ return [2 /*return*/, _a.sent()];
241
+ case 2:
242
+ error_3 = _a.sent();
243
+ console.error(error_3);
244
+ return [3 /*break*/, 3];
245
+ case 3:
246
+ return [2 /*return*/];
247
+ }
248
+ });
249
+ });
250
+ };
251
+ /**
252
+ * 查询所有工单下面的组件信息
253
+ */
254
+ exports.showPayment = function (dispatch) {
255
+ return __awaiter(void 0, void 0, void 0, function () {
256
+ var res, error_4;
257
+ var _a;
258
+ return __generator(this, function (_b) {
259
+ switch (_b.label) {
260
+ case 0:
261
+ _b.trys.push([0, 2,, 3]);
262
+ return [4 /*yield*/, api_2.fetchShowPayment({
263
+ key: 'FE_PAYMENT_CLIENT'
264
+ })];
265
+ case 1:
266
+ res = _b.sent();
267
+ if (res.success) {
268
+ dispatch(exports.setShowPayment((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.value));
269
+ }
270
+ return [3 /*break*/, 3];
271
+ case 2:
272
+ error_4 = _b.sent();
273
+ console.error(error_4);
274
+ return [3 /*break*/, 3];
275
+ case 3:
276
+ return [2 /*return*/];
277
+ }
278
+ });
279
+ });
280
+ };
281
+
282
+ var slice = toolkit_1.createSlice({
283
+ name: 'customizeWorkOrder',
284
+ initialState: exports.initialState,
285
+ reducers: {
286
+ setDeleteCustomizeWorkOrderModalVisible: function setDeleteCustomizeWorkOrderModalVisible(state, _a) {
287
+ var payload = _a.payload;
288
+ state.deleteCustomizeWorkOrderModalVisible = payload;
289
+ },
290
+ setCancelInterceptionModalVisible: function setCancelInterceptionModalVisible(state, _a) {
291
+ var payload = _a.payload;
292
+ state.cancelInterceptionModalVisible = payload;
293
+ },
294
+ setDealerModalVisible: function setDealerModalVisible(state, _a) {
295
+ var payload = _a.payload;
296
+ state.selectDealerModalVisible = payload;
297
+ },
298
+ setCompanyUserList: function setCompanyUserList(state, _a) {
299
+ var payload = _a.payload;
300
+ state.companyUserList = payload;
301
+ },
302
+ setSelectedUserList: function setSelectedUserList(state, _a) {
303
+ var payload = _a.payload;
304
+ state.selectedUserList = payload;
305
+ },
306
+ setStatusSelectModalVisible: function setStatusSelectModalVisible(state, _a) {
307
+ var payload = _a.payload;
308
+ state.statusSelectModalVisible = payload;
309
+ },
310
+ setLogModalVisible: function setLogModalVisible(state, _a) {
311
+ var payload = _a.payload;
312
+ state.logModalVisible = payload;
313
+ },
314
+ setFormModalVisible: function setFormModalVisible(state, _a) {
315
+ var payload = _a.payload;
316
+ state.formModalVisible = payload;
317
+ },
318
+ setTemplateId: function setTemplateId(state, _a) {
319
+ var payload = _a.payload;
320
+ state.templateId = payload;
321
+ },
322
+ setLogicFlowId: function setLogicFlowId(state, _a) {
323
+ var payload = _a.payload;
324
+ state.logicFlowId = payload;
325
+ },
326
+ setFlowWorkOrderId: function setFlowWorkOrderId(state, _a) {
327
+ var payload = _a.payload;
328
+ state.flowWorkOrderId = payload;
329
+ },
330
+ setCustomizeFormShopId: function setCustomizeFormShopId(state, _a) {
331
+ var payload = _a.payload;
332
+ state.customizeFormShopId = payload;
333
+ },
334
+ setCurrentCustomizeRecord: function setCurrentCustomizeRecord(state, _a) {
335
+ var payload = _a.payload;
336
+ state.currentCustomizeRecord = payload;
337
+ },
338
+ setCurrentBuyerChecked: function setCurrentBuyerChecked(state, _a) {
339
+ var payload = _a.payload;
340
+ state.currentBuyerChecked = payload;
341
+ },
342
+ setAllTemplateList: function setAllTemplateList(state, _a) {
343
+ var payload = _a.payload;
344
+ state.allTemplateList = payload;
345
+ },
346
+ setRepeatModalVisible: function setRepeatModalVisible(state, _a) {
347
+ var payload = _a.payload;
348
+ state.repeatWorkOrderVisible = payload;
349
+ },
350
+ setRepeatWorkOrderConditions: function setRepeatWorkOrderConditions(state, _a) {
351
+ var payload = _a.payload;
352
+ state.repeatWorkOrderConditions = payload;
353
+ },
354
+ setShowPayment: function setShowPayment(state, _a) {
355
+ var payload = _a.payload;
356
+ state.showPayment = payload;
357
+ },
358
+ closeAllModal: function closeAllModal(state) {
359
+ state.deleteCustomizeWorkOrderModalVisible = false;
360
+ state.selectDealerModalVisible = false;
361
+ state.statusSelectModalVisible = false;
362
+ state.logModalVisible = false;
363
+ state.formModalVisible = false;
364
+ state.currentCustomizeRecord = {};
365
+ state.repeatWorkOrderVisible = false;
366
+ }
367
+ }
368
+ });
369
+ exports.setDeleteCustomizeWorkOrderModalVisible = (_a = slice.actions, _a.setDeleteCustomizeWorkOrderModalVisible), exports.setDealerModalVisible = _a.setDealerModalVisible, exports.setCompanyUserList = _a.setCompanyUserList, exports.setSelectedUserList = _a.setSelectedUserList, exports.setStatusSelectModalVisible = _a.setStatusSelectModalVisible, exports.setLogModalVisible = _a.setLogModalVisible, exports.setFormModalVisible = _a.setFormModalVisible, exports.setTemplateId = _a.setTemplateId, exports.setLogicFlowId = _a.setLogicFlowId, exports.setFlowWorkOrderId = _a.setFlowWorkOrderId, exports.setCustomizeFormShopId = _a.setCustomizeFormShopId, exports.setCurrentCustomizeRecord = _a.setCurrentCustomizeRecord, exports.setCurrentBuyerChecked = _a.setCurrentBuyerChecked, exports.setAllTemplateList = _a.setAllTemplateList, exports.setRepeatModalVisible = _a.setRepeatModalVisible, exports.setRepeatWorkOrderConditions = _a.setRepeatWorkOrderConditions, exports.setShowPayment = _a.setShowPayment;
370
+ exports['default'] = slice.reducer;