kmkf-work-order-service-component 0.5.1-alpha.1 → 0.5.1-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.
@@ -134,9 +134,16 @@ var FormRender = function FormRender(props, ref) {
134
134
  platIcon = _useState14[0],
135
135
  setPlatIcon = _useState14[1];
136
136
 
137
+ var _useState15 = useState({}),
138
+ _useState16 = _slicedToArray(_useState15, 2),
139
+ orderInfo = _useState16[0],
140
+ setOrderInfo = _useState16[1]; //订单返填商品信息
141
+
142
+
137
143
  useEffect(function () {
138
144
  express.initData();
139
145
  formatAddrData.initData();
146
+ setOrderInfo({});
140
147
  }, []);
141
148
  useEffect(function () {
142
149
  setShopId(currentShopId);
@@ -250,7 +257,7 @@ var FormRender = function FormRender(props, ref) {
250
257
  });
251
258
  }
252
259
 
253
- _context.next = 37;
260
+ _context.next = 38;
254
261
  break;
255
262
 
256
263
  case 24:
@@ -271,11 +278,14 @@ var FormRender = function FormRender(props, ref) {
271
278
  accessToken: get(find(shopList, function (s) {
272
279
  return s.shopId === shopId;
273
280
  }), 'accessToken', ''),
274
- buyerOpenUid: buyerId,
275
- buyerNick: buyerNick,
276
281
  source: get(platformMap, "".concat(platform), '工单通')
277
282
  };
278
- _params.workOrderComponentVos = submitDataTransOldFormat(data, templateDetail, !!workOrderId, workOrderDetail, _params);
283
+ _params.workOrderComponentVos = submitDataTransOldFormat(data, templateDetail, !!workOrderId, workOrderDetail, _params); //飞鸽端外部传递买家id
284
+
285
+ if (platform === 'fxg') {
286
+ _params.buyerOpenUid = buyerId;
287
+ }
288
+
279
289
  hasEnterPrisePayment = some(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, function (item) {
280
290
  return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
281
291
  });
@@ -301,10 +311,10 @@ var FormRender = function FormRender(props, ref) {
301
311
 
302
312
  console.debug('增加数据参数', _params); // return;
303
313
 
304
- _context.next = 33;
314
+ _context.next = 34;
305
315
  return addWorkOrder(_params);
306
316
 
307
- case 33:
317
+ case 34:
308
318
  _yield$addWorkOrder = _context.sent;
309
319
  _success = _yield$addWorkOrder.success;
310
320
  _result = _yield$addWorkOrder.data;
@@ -317,13 +327,13 @@ var FormRender = function FormRender(props, ref) {
317
327
  });
318
328
  }
319
329
 
320
- case 37:
330
+ case 38:
321
331
  console.groupEnd();
322
- _context.next = 43;
332
+ _context.next = 44;
323
333
  break;
324
334
 
325
- case 40:
326
- _context.prev = 40;
335
+ case 41:
336
+ _context.prev = 41;
327
337
  _context.t0 = _context["catch"](0);
328
338
 
329
339
  // 表单校验失败错误时,将错误第一项滚动到可视区域
@@ -339,12 +349,12 @@ var FormRender = function FormRender(props, ref) {
339
349
  }, 0);
340
350
  }
341
351
 
342
- case 43:
352
+ case 44:
343
353
  case "end":
344
354
  return _context.stop();
345
355
  }
346
356
  }
347
- }, _callee, null, [[0, 40]]);
357
+ }, _callee, null, [[0, 41]]);
348
358
  }));
349
359
 
350
360
  return function asyncDoSave(_x, _x2) {
@@ -440,6 +450,7 @@ var FormRender = function FormRender(props, ref) {
440
450
  receiveMobile = value.receiveMobile,
441
451
  alipayAccount = value.alipayAccount,
442
452
  expressLogisticsCode = value.expressLogisticsCode;
453
+ setOrderInfo(value);
443
454
  queryReplaceCount({
444
455
  tradeId: orderNo,
445
456
  buyerNick: buyerNick,
@@ -58,25 +58,25 @@ var BasicCascader = /*#__PURE__*/function (_BasicComponent) {
58
58
  _this = _super.call(this, options);
59
59
 
60
60
  _defineProperty(_assertThisInitialized(_this), "render", function (value) {
61
- var _findLabelBySelectVal, _findLabelBySelectVal2;
61
+ var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
62
62
 
63
- return /*#__PURE__*/React.createElement("span", null, (_findLabelBySelectVal = findLabelBySelectValue(value, _this.componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
63
+ return /*#__PURE__*/React.createElement("span", null, (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
64
64
  return i.label;
65
65
  })) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(','));
66
66
  });
67
67
 
68
68
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
69
- var _this$componentConfig;
69
+ var _this$componentConfig2, _this$componentConfig3;
70
70
 
71
71
  return getFormItem(_objectSpread(_objectSpread({
72
72
  title: _this.name,
73
73
  name: _this.id,
74
74
  rules: [],
75
- required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required
75
+ required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required
76
76
  }, value), {}, {
77
77
  component: /*#__PURE__*/React.createElement(Cascader, _extends({}, _this.componentConfig, {
78
78
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
79
- options: transMultSelectOptions(_this.componentConfig.options),
79
+ options: transMultSelectOptions((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options),
80
80
  fieldNames: {
81
81
  label: 'label',
82
82
  value: 'actived',
@@ -88,21 +88,23 @@ var BasicCascader = /*#__PURE__*/function (_BasicComponent) {
88
88
  });
89
89
 
90
90
  _defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
91
- var _findLabelBySelectVal3, _findLabelBySelectVal4;
91
+ var _findLabelBySelectVal3, _findLabelBySelectVal4, _this$componentConfig4;
92
92
 
93
- return (_findLabelBySelectVal3 = findLabelBySelectValue(value, _this.componentConfig.options)) === null || _findLabelBySelectVal3 === void 0 ? void 0 : (_findLabelBySelectVal4 = _findLabelBySelectVal3.map(function (i) {
93
+ return (_findLabelBySelectVal3 = findLabelBySelectValue(value, (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.options)) === null || _findLabelBySelectVal3 === void 0 ? void 0 : (_findLabelBySelectVal4 = _findLabelBySelectVal3.map(function (i) {
94
94
  return i.label;
95
95
  })) === null || _findLabelBySelectVal4 === void 0 ? void 0 : _findLabelBySelectVal4.join(',');
96
96
  });
97
97
 
98
98
  _defineProperty(_assertThisInitialized(_this), "getColumns", function () {
99
+ var _this$componentConfig5;
100
+
99
101
  return _objectSpread(_objectSpread({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(BasicCascader.prototype)), "getColumns", _thisSuper).call(_thisSuper)), {}, {
100
102
  widget: /*#__PURE__*/React.createElement(Cascader, _extends({}, _this.componentConfig, {
101
103
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
102
104
  style: {
103
105
  width: '356px'
104
106
  },
105
- options: transMultSelectOptions(_this.componentConfig.options),
107
+ options: transMultSelectOptions((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options),
106
108
  fieldNames: {
107
109
  label: 'label',
108
110
  value: 'actived',
@@ -72,14 +72,14 @@ var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
72
72
  });
73
73
 
74
74
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
75
- var _this$componentConfig;
75
+ var _this$componentConfig, _this$componentConfig2;
76
76
 
77
77
  return getFormItem(_objectSpread({
78
78
  title: _this.name,
79
79
  name: _this.id,
80
80
  rules: [],
81
81
  required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
82
- component: _this.componentConfig.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
82
+ component: (_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
83
83
  uniqueKey: _this.id,
84
84
  hostUrl: "https://kefu.kuaimai.com"
85
85
  }))
@@ -109,10 +109,12 @@ var BasicRate = /*#__PURE__*/function (_BasicComponent) {
109
109
  });
110
110
 
111
111
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
112
+ var _this$componentConfig;
113
+
112
114
  return getFormItem(_objectSpread({
113
115
  title: _this.name,
114
116
  name: _this.id,
115
- rules: _this.componentConfig.required ? _this.customRules() : [],
117
+ rules: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? _this.customRules() : [],
116
118
  required: false,
117
119
  component: /*#__PURE__*/React.createElement(ApaasRate, _extends({}, _this.componentConfig, {
118
120
  allowClear: false,
@@ -76,9 +76,11 @@ var BasicSelect = /*#__PURE__*/function (_BasicComponent) {
76
76
  });
77
77
 
78
78
  _defineProperty(_assertThisInitialized(_this), "getColumns", function () {
79
+ var _this$componentConfig2;
80
+
79
81
  return _objectSpread(_objectSpread({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(BasicSelect.prototype)), "getColumns", _thisSuper).call(_thisSuper)), {}, {
80
82
  widget: 'select',
81
- 'x-options': _this.componentConfig.options,
83
+ 'x-options': (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.options,
82
84
  'x-style': {
83
85
  width: '356px'
84
86
  },
@@ -64,7 +64,7 @@ var EAlipay = /*#__PURE__*/function (_BasicComponent) {
64
64
  _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
65
65
  return [{
66
66
  validator: function validator(_, value) {
67
- if (!config.isSingle && !(value !== null && value !== void 0 && value.name)) {
67
+ if (!(config !== null && config !== void 0 && config.isSingle) && !(value !== null && value !== void 0 && value.name)) {
68
68
  return Promise.reject(new Error('请输入支付宝名称'));
69
69
  }
70
70
 
@@ -66,7 +66,7 @@ var ELogistics = /*#__PURE__*/function (_BasicComponent) {
66
66
  _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
67
67
  return [{
68
68
  validator: function validator(_, value) {
69
- if (config.isSingle) {
69
+ if (config !== null && config !== void 0 && config.isSingle) {
70
70
  if ((config === null || config === void 0 ? void 0 : config.showField) === 'EXPRESS_COMPANY' && !(value !== null && value !== void 0 && value.company)) {
71
71
  return Promise.reject(new Error('请选择物流公司'));
72
72
  } else if ((config === null || config === void 0 ? void 0 : config.showField) === 'EXPRESS_WAYBILL_CODE' && !(value !== null && value !== void 0 && value.order)) {
@@ -80,7 +80,7 @@ var ERemark = /*#__PURE__*/function (_BasicComponent) {
80
80
  return Promise.reject(new Error('请输入备注'));
81
81
  }
82
82
 
83
- if (config.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
83
+ if (config !== null && config !== void 0 && config.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
84
84
  return Promise.reject(new Error('请选择旗帜'));
85
85
  }
86
86
 
@@ -64,7 +64,7 @@ var ELogistics = /*#__PURE__*/function (_BasicComponent) {
64
64
  _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
65
65
  return [{
66
66
  validator: function validator(_, value) {
67
- if (config.isSingle) {
67
+ if (config !== null && config !== void 0 && config.isSingle) {
68
68
  if ((config === null || config === void 0 ? void 0 : config.showField) === 'EXPRESS_COMPANY' && !(value !== null && value !== void 0 && value.company)) {
69
69
  return Promise.reject(new Error('请选择物流公司'));
70
70
  } else if ((config === null || config === void 0 ? void 0 : config.showField) === 'EXPRESS_WAYBILL_CODE' && !(value !== null && value !== void 0 && value.order)) {
@@ -60,14 +60,14 @@ var Express = /*#__PURE__*/function (_BasicComponent) {
60
60
  });
61
61
 
62
62
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
63
- var _this$componentConfig;
63
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
64
64
 
65
65
  return getFormItem(_objectSpread({
66
66
  title: _this.name,
67
67
  name: _this.id,
68
68
  rules: [],
69
69
  required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
70
- component: !_this.componentConfig.isSingle || _this.componentConfig.showField === 'EXPRESS_COMPANY' ? /*#__PURE__*/React.createElement(ExpressCompany, {
70
+ component: !((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.isSingle) || ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) === 'EXPRESS_COMPANY' ? /*#__PURE__*/React.createElement(ExpressCompany, {
71
71
  options: express.getData()
72
72
  }) : null
73
73
  }, value));
@@ -62,14 +62,14 @@ var ExpressCode = /*#__PURE__*/function (_BasicComponent) {
62
62
  });
63
63
 
64
64
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
65
- var _this$componentConfig;
65
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
66
66
 
67
67
  return getFormItem(_objectSpread({
68
68
  title: _this.name,
69
69
  name: _this.id,
70
70
  rules: _this.rules,
71
71
  required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
72
- component: !_this.componentConfig.isSingle || _this.componentConfig.showField === 'EXPRESS_WAYBILL_CODE' ? /*#__PURE__*/React.createElement(Input, null) : null
72
+ component: !((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.isSingle) || ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) === 'EXPRESS_WAYBILL_CODE' ? /*#__PURE__*/React.createElement(Input, null) : null
73
73
  }, value));
74
74
  });
75
75
 
@@ -69,7 +69,7 @@ var JstItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
69
69
  return !item.itemId;
70
70
  });
71
71
 
72
- if (config.enableItemId && hasNotId) {
72
+ if (config !== null && config !== void 0 && config.enableItemId && hasNotId) {
73
73
  return Promise.reject(new Error('请输入供应商编码'));
74
74
  }
75
75
 
@@ -77,7 +77,7 @@ var JstItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
77
77
  return !item.supplierName;
78
78
  });
79
79
 
80
- if (config.enableSupplierName && hasNotName) {
80
+ if (config !== null && config !== void 0 && config.enableSupplierName && hasNotName) {
81
81
  return Promise.reject(new Error('请输入供应商名称'));
82
82
  }
83
83
 
@@ -76,7 +76,7 @@ var ItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
76
76
  return !item.itemId && !item.supplierItemOuterId;
77
77
  });
78
78
 
79
- if (config.enableItemId && hasNotId) {
79
+ if (config !== null && config !== void 0 && config.enableItemId && hasNotId) {
80
80
  return Promise.reject(new Error('请输入供应商编码'));
81
81
  }
82
82
 
@@ -84,7 +84,7 @@ var ItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
84
84
  return !item.supplierName;
85
85
  });
86
86
 
87
- if (config.enableSupplierName && hasNotName) {
87
+ if (config !== null && config !== void 0 && config.enableSupplierName && hasNotName) {
88
88
  return Promise.reject(new Error('请输入供应商名称'));
89
89
  }
90
90
 
@@ -80,23 +80,23 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
80
80
  _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
81
81
  return [{
82
82
  validator: function validator(_, value) {
83
- if (config.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
83
+ if (config !== null && config !== void 0 && config.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
84
84
  return Promise.reject(new Error('请输入打款金额'));
85
85
  } else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
86
86
  return Promise.reject(new Error('打款金额最多2位小数'));
87
87
  }
88
88
 
89
- if (config.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
89
+ if (config !== null && config !== void 0 && config.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
90
90
  return Promise.reject(new Error('请输入订单编号'));
91
91
  } else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
92
92
  return Promise.reject(new Error('请输入正确的订单编号'));
93
93
  }
94
94
 
95
- if (config.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
95
+ if (config !== null && config !== void 0 && config.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
96
96
  return Promise.reject(new Error('请输入支付宝名称'));
97
97
  }
98
98
 
99
- if (config.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
99
+ if (config !== null && config !== void 0 && config.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
100
100
  return Promise.reject(new Error('请输入支付宝账号'));
101
101
  } else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
102
102
  return Promise.reject(new Error('请输入正确的支付宝账号格式'));
@@ -34,7 +34,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
34
34
 
35
35
  import { get, isEmpty, find, keys, every } from 'lodash';
36
36
  import V from 'voca';
37
- import { orderDetail, jstOrderDetail } from "../../model/servers/api";
37
+ import { orderDetail, getThirdOpenUidByOrderNo, jstOrderDetail } from "../../model/servers/api";
38
38
  import moment from 'moment';
39
39
  import express from "./express";
40
40
  import cache from "../cache";
@@ -307,6 +307,8 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
307
307
  name: item.name
308
308
  });
309
309
  } else if (item.workOrderComponentType === 'RADIO') {
310
+ var _item$componentConfig2;
311
+
310
312
  var _value = nowData[item.uniqueKey]; // { value: '', other: '' }
311
313
 
312
314
  contentVoList.push({
@@ -315,7 +317,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
315
317
  uniqueKey: "".concat(item.uniqueKey, "_radio")
316
318
  });
317
319
 
318
- if (item.componentConfig.showOther) {
320
+ if ((_item$componentConfig2 = item.componentConfig) !== null && _item$componentConfig2 !== void 0 && _item$componentConfig2.showOther) {
319
321
  contentVoList.push({
320
322
  content: (_value === null || _value === void 0 ? void 0 : _value.value) === '其他' ? _value.other : '',
321
323
  name: item.name,
@@ -323,6 +325,8 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
323
325
  });
324
326
  }
325
327
  } else if (item.workOrderComponentType === 'CHECKBOX') {
328
+ var _item$componentConfig3;
329
+
326
330
  var _value2 = nowData[item.uniqueKey]; // { value: '', other: '' }
327
331
 
328
332
  contentVoList.push({
@@ -331,7 +335,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
331
335
  uniqueKey: "".concat(item.uniqueKey, "_checkbox")
332
336
  });
333
337
 
334
- if (item.componentConfig.showOther) {
338
+ if ((_item$componentConfig3 = item.componentConfig) !== null && _item$componentConfig3 !== void 0 && _item$componentConfig3.showOther) {
335
339
  var _value2$value;
336
340
 
337
341
  contentVoList.push({
@@ -341,11 +345,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
341
345
  });
342
346
  }
343
347
  } else if (item.workOrderComponentType === 'MULT_SELECT') {
344
- var _item$componentConfig2;
348
+ var _item$componentConfig4;
345
349
 
346
350
  contentVoList.push({
347
351
  uniqueKey: "".concat(item.uniqueKey, "_multSelect"),
348
- content: findLabelBySelectValue(get(nowData, "".concat(item.uniqueKey), []), item === null || item === void 0 ? void 0 : (_item$componentConfig2 = item.componentConfig) === null || _item$componentConfig2 === void 0 ? void 0 : _item$componentConfig2.options),
352
+ content: findLabelBySelectValue(get(nowData, "".concat(item.uniqueKey), []), item === null || item === void 0 ? void 0 : (_item$componentConfig4 = item.componentConfig) === null || _item$componentConfig4 === void 0 ? void 0 : _item$componentConfig4.options),
349
353
  name: item.name
350
354
  });
351
355
  } else if (item.workOrderComponentType === 'BASIC_MULT_SELECT') {
@@ -553,10 +557,10 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
553
557
 
554
558
 
555
559
  if (!updateFlag && item.workOrderComponentType === 'REMARK_INPUT') {
556
- var _item$componentConfig3 = item.componentConfig,
557
- _associatedType = _item$componentConfig3.associatedType,
558
- _isShowFlag = _item$componentConfig3.isShowFlag,
559
- _isAssociated = _item$componentConfig3.isAssociated;
560
+ var _item$componentConfig5 = item.componentConfig,
561
+ _associatedType = _item$componentConfig5.associatedType,
562
+ _isShowFlag = _item$componentConfig5.isShowFlag,
563
+ _isAssociated = _item$componentConfig5.isAssociated;
560
564
  return {
561
565
  uniqueKey: item.uniqueKey,
562
566
  workOrderComponentType: item.workOrderComponentType,
@@ -659,13 +663,13 @@ var transDataSource = function transDataSource(templateColumns) {
659
663
  other: item.jsonMap["".concat(nex.uniqueKey, "_checkboxOther")] || (config === null || config === void 0 ? void 0 : config.checkboxOther)
660
664
  }));
661
665
  } else if (nex.workOrderComponentType === 'DATETIME') {
662
- return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_dateTime")], item.jsonMap["".concat(nex.uniqueKey, "_dateTime")]) || config.dateTime));
666
+ return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_dateTime")], item.jsonMap["".concat(nex.uniqueKey, "_dateTime")]) || (config === null || config === void 0 ? void 0 : config.dateTime)));
663
667
  } else if (nex.workOrderComponentType === 'PICTURE') {
664
668
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_picture")] ? formatPictures(item.jsonMap["".concat(nex.uniqueKey, "_picture")]).map(function (item) {
665
669
  return "".concat(item);
666
670
  }) : []));
667
671
  } else if (nex.workOrderComponentType === 'BASIC_MULT_SELECT') {
668
- return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_basicMultSelect")], '') || config.basicMultSelect || []));
672
+ return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_basicMultSelect")], '') || (config === null || config === void 0 ? void 0 : config.basicMultSelect) || []));
669
673
  } else if (nex.workOrderComponentType === 'MULT_SELECT') {
670
674
  var parseValue = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_multSelect")], []) || [];
671
675
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), parseValue === null || parseValue === void 0 ? void 0 : parseValue.map(function (item) {
@@ -705,7 +709,7 @@ var transDataSource = function transDataSource(templateColumns) {
705
709
  var _objectSpread29;
706
710
 
707
711
  return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread29 = {}, _defineProperty(_objectSpread29, "".concat(nex.uniqueKey), {
708
- status: item.jsonMap["".concat(nex.uniqueKey, "_status")] || config.status,
712
+ status: item.jsonMap["".concat(nex.uniqueKey, "_status")] || (config === null || config === void 0 ? void 0 : config.status),
709
713
  customerService: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_customerService")], item.jsonMap["".concat(nex.uniqueKey, "_customerService")])
710
714
  }), _defineProperty(_objectSpread29, "".concat(nex.uniqueKey, "_processTime"), item.jsonMap['processTime']), _defineProperty(_objectSpread29, "".concat(nex.uniqueKey, "_lastProcessingTime"), item.jsonMap['lastProcessingTime']), _objectSpread29));
711
715
  } else if (nex.workOrderComponentType === 'ORDINARY_INVOICE') {
@@ -792,7 +796,7 @@ export var orderBack = /*#__PURE__*/function () {
792
796
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
793
797
  var _shopList$find;
794
798
 
795
- var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, JOIN_SHOP, shopSourceStr, _data$value, _jstOrder$value, _jstOrder$value$data, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, orderInfo, jstInfo, formValue, detail, values, _templateDetail$compo, paymentUniqueKey;
799
+ var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, JOIN_SHOP, shopSourceStr, _shopList$find2, _data$value, _buyer$value, _jstOrder$value, _jstOrder$value$data, taobaoId, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, jstOrder, orderInfo, buyerInfo, jstInfo, formValue, detail, values, _templateDetail$compo, paymentUniqueKey;
796
800
 
797
801
  return _regeneratorRuntime().wrap(function _callee$(_context) {
798
802
  while (1) {
@@ -816,13 +820,24 @@ export var orderBack = /*#__PURE__*/function () {
816
820
  return item.shopId == shopId;
817
821
  })) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopSourceStr;
818
822
  _context.prev = 5;
823
+ taobaoId = (_shopList$find2 = shopList.find(function (item) {
824
+ return item.shopSourceStr === 'TAOBAO' && item.shopId == shopId;
825
+ })) === null || _shopList$find2 === void 0 ? void 0 : _shopList$find2.taobaoId;
819
826
  promise = [orderDetail({
820
827
  shopId: shopId,
821
828
  //店铺id
822
829
  orderNo: order_no,
823
830
  //订单id
824
831
  templateId: templateDetail.uniqueKey
825
- })]; //判断是否有聚水潭组件 有就请求jst订单接口
832
+ })];
833
+ taobaoId ? promise.push(getThirdOpenUidByOrderNo({
834
+ orderNo: order_no,
835
+ toAppKey: '21819818',
836
+ platform: 'tb',
837
+ taobaoId: taobaoId
838
+ })) : promise.push(new Promise(function (resolve) {
839
+ resolve({});
840
+ })); //判断是否有聚水潭组件 有就请求jst订单接口
826
841
 
827
842
  hasJst = HasJstHandle(templateDetail);
828
843
 
@@ -832,19 +847,21 @@ export var orderBack = /*#__PURE__*/function () {
832
847
  }));
833
848
  }
834
849
 
835
- _context.next = 11;
850
+ _context.next = 13;
836
851
  return Promise.allSettled(promise);
837
852
 
838
- case 11:
853
+ case 13:
839
854
  _yield$Promise$allSet = _context.sent;
840
- _yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 2);
855
+ _yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 3);
841
856
  data = _yield$Promise$allSet2[0];
842
- jstOrder = _yield$Promise$allSet2[1];
857
+ buyer = _yield$Promise$allSet2[1];
858
+ jstOrder = _yield$Promise$allSet2[2];
843
859
  orderInfo = (data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data) || {};
860
+ buyerInfo = (buyer === null || buyer === void 0 ? void 0 : (_buyer$value = buyer.value) === null || _buyer$value === void 0 ? void 0 : _buyer$value.data) || {};
844
861
  jstInfo = (jstOrder === null || jstOrder === void 0 ? void 0 : (_jstOrder$value = jstOrder.value) === null || _jstOrder$value === void 0 ? void 0 : (_jstOrder$value$data = _jstOrder$value.data) === null || _jstOrder$value$data === void 0 ? void 0 : _jstOrder$value$data.orders) || []; //获取当前表单字段
845
862
 
846
863
  formValue = form.getFieldsValue();
847
- detail = _objectSpread(_objectSpread({}, orderInfo), {}, {
864
+ detail = _objectSpread(_objectSpread(_objectSpread({}, orderInfo), buyerInfo), {}, {
848
865
  jstItemList: jstInfo
849
866
  }); //抖音数据特殊处理
850
867
 
@@ -986,19 +1003,19 @@ export var orderBack = /*#__PURE__*/function () {
986
1003
 
987
1004
  form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
988
1005
  callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
989
- _context.next = 28;
1006
+ _context.next = 32;
990
1007
  break;
991
1008
 
992
- case 26:
993
- _context.prev = 26;
1009
+ case 30:
1010
+ _context.prev = 30;
994
1011
  _context.t0 = _context["catch"](5);
995
1012
 
996
- case 28:
1013
+ case 32:
997
1014
  case "end":
998
1015
  return _context.stop();
999
1016
  }
1000
1017
  }
1001
- }, _callee, null, [[5, 26]]);
1018
+ }, _callee, null, [[5, 30]]);
1002
1019
  }));
1003
1020
 
1004
1021
  return function orderBack(_x) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.5.1-alpha.1",
3
+ "version": "0.5.1-alpha.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",