kmkf-work-order-service-component 0.5.1-alpha.1 → 0.5.1-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm/FormRender/index.js +10 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Cascader/index.js +10 -8
- package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Rate/index.js +3 -1
- package/dist/esm/WorkOrder/components/Widget/basic/Select/index.js +3 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/EAlipay/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/ELogistics/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/ERemark/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/EReturnLogistics/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/Express/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/ExpressCode/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/third/ItemSelect/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/third/Payment/index.js +4 -4
- package/dist/esm/common/utils/tools.js +15 -11
- package/package.json +1 -1
@@ -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);
|
@@ -271,8 +278,8 @@ 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,
|
281
|
+
buyerOpenUid: (orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.buyerOpenUid) || buyerId,
|
282
|
+
buyerNick: (orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.buyerNick) || buyerNick,
|
276
283
|
source: get(platformMap, "".concat(platform), '工单通')
|
277
284
|
};
|
278
285
|
_params.workOrderComponentVos = submitDataTransOldFormat(data, templateDetail, !!workOrderId, workOrderDetail, _params);
|
@@ -440,6 +447,7 @@ var FormRender = function FormRender(props, ref) {
|
|
440
447
|
receiveMobile = value.receiveMobile,
|
441
448
|
alipayAccount = value.alipayAccount,
|
442
449
|
expressLogisticsCode = value.expressLogisticsCode;
|
450
|
+
setOrderInfo(value);
|
443
451
|
queryReplaceCount({
|
444
452
|
tradeId: orderNo,
|
445
453
|
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$
|
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$
|
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('请输入正确的支付宝账号格式'));
|
@@ -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$
|
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$
|
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$
|
557
|
-
_associatedType = _item$
|
558
|
-
_isShowFlag = _item$
|
559
|
-
_isAssociated = _item$
|
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') {
|