kmkf-work-order-service-component 0.2.2-alpha.2 → 0.2.2-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.
@@ -109,7 +109,7 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
109
109
|
|
110
110
|
var asyncDoSave = /*#__PURE__*/function () {
|
111
111
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workOrderDetail, templateDetail) {
|
112
|
-
var data, res, params, submitData, _yield$updateWorkOrde, success, result, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addWorkOrder, _success, _result;
|
112
|
+
var data, res, params, submitData, _yield$updateWorkOrde, success, result, platformMap, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addWorkOrder, _success, _result;
|
113
113
|
|
114
114
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
115
115
|
while (1) {
|
@@ -175,10 +175,18 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
175
175
|
});
|
176
176
|
}
|
177
177
|
|
178
|
-
_context.next =
|
178
|
+
_context.next = 36;
|
179
179
|
break;
|
180
180
|
|
181
181
|
case 23:
|
182
|
+
platformMap = {
|
183
|
+
tb: '淘宝',
|
184
|
+
fxg: '抖音',
|
185
|
+
ks: '快手',
|
186
|
+
pdd: '拼多多',
|
187
|
+
jd: '京东',
|
188
|
+
xiaozhi: '小智'
|
189
|
+
};
|
182
190
|
_params = {
|
183
191
|
apiName: 'addWorkOrder',
|
184
192
|
shopId: currentShopId,
|
@@ -187,7 +195,7 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
187
195
|
accessToken: get(find(shopList, function (s) {
|
188
196
|
return s.shopId === currentShopId;
|
189
197
|
}), 'accessToken', ''),
|
190
|
-
source: platformInfo.platform
|
198
|
+
source: platformMap[platformInfo.platform] || '工单通'
|
191
199
|
};
|
192
200
|
_params.workOrderComponentVos = submitDataTransOldFormat(data, templateDetail, !!workOrderId, workOrderDetail, _params);
|
193
201
|
hasEnterPrisePayment = some(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, function (item) {
|
@@ -213,12 +221,11 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
213
221
|
};
|
214
222
|
}
|
215
223
|
|
216
|
-
console.debug('增加数据参数', _params);
|
217
|
-
|
218
|
-
_context.next = 31;
|
224
|
+
console.debug('增加数据参数', _params);
|
225
|
+
_context.next = 32;
|
219
226
|
return addWorkOrder(_params);
|
220
227
|
|
221
|
-
case
|
228
|
+
case 32:
|
222
229
|
_yield$addWorkOrder = _context.sent;
|
223
230
|
_success = _yield$addWorkOrder.success;
|
224
231
|
_result = _yield$addWorkOrder.data;
|
@@ -233,13 +240,13 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
233
240
|
});
|
234
241
|
}
|
235
242
|
|
236
|
-
case
|
243
|
+
case 36:
|
237
244
|
console.groupEnd();
|
238
|
-
_context.next =
|
245
|
+
_context.next = 42;
|
239
246
|
break;
|
240
247
|
|
241
|
-
case
|
242
|
-
_context.prev =
|
248
|
+
case 39:
|
249
|
+
_context.prev = 39;
|
243
250
|
_context.t0 = _context["catch"](0);
|
244
251
|
|
245
252
|
// 表单校验失败错误时,将错误第一项滚动到可视区域
|
@@ -255,12 +262,12 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
255
262
|
}, 0);
|
256
263
|
}
|
257
264
|
|
258
|
-
case
|
265
|
+
case 42:
|
259
266
|
case "end":
|
260
267
|
return _context.stop();
|
261
268
|
}
|
262
269
|
}
|
263
|
-
}, _callee, null, [[0,
|
270
|
+
}, _callee, null, [[0, 39]]);
|
264
271
|
}));
|
265
272
|
|
266
273
|
return function asyncDoSave(_x, _x2) {
|
@@ -99,6 +99,13 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
|
|
99
99
|
return Promise.reject(new Error('请输入支付宝账号'));
|
100
100
|
} 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)) {
|
101
101
|
return Promise.reject(new Error('请输入正确的支付宝账号格式'));
|
102
|
+
} //支付宝信息不能只填一个,否则不能打款
|
103
|
+
|
104
|
+
|
105
|
+
if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
|
106
|
+
if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
|
107
|
+
return Promise.reject(new Error('支付宝姓名/账号都要填写'));
|
108
|
+
}
|
102
109
|
}
|
103
110
|
|
104
111
|
return Promise.resolve();
|