kmkf-work-order-service-component 0.1.13 → 0.2.0-alpha.1
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.
- package/dist/esm/WorkOrder/common/utils/tools.js +14 -9
- package/dist/esm/WorkOrder/components/PayListOrderItem/ModifyModal.js +63 -4
- package/dist/esm/WorkOrder/components/Widget/index.js +4 -0
- package/dist/esm/WorkOrder/components/Widget/third/SystemOrderNo/index.d.ts +7 -0
- package/dist/esm/WorkOrder/components/Widget/third/SystemOrderNo/index.js +80 -0
- package/package.json +1 -1
@@ -61,7 +61,8 @@ var workTypeKeys = {
|
|
61
61
|
INPUT: 'input',
|
62
62
|
DATETIME: 'dateTime',
|
63
63
|
TEXTAREA: 'textarea',
|
64
|
-
SELECT: 'select'
|
64
|
+
SELECT: 'select',
|
65
|
+
SYSTEM_ORDER_NO: 'systemOrderNo'
|
65
66
|
};
|
66
67
|
export var findLabelBySelectValue = function findLabelBySelectValue(vales, options) {
|
67
68
|
if (isEmpty(vales)) return [];
|
@@ -607,6 +608,8 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
607
608
|
enterprisePaymentStatus: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentStatus")],
|
608
609
|
enterprisePaymentTid: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTid")]
|
609
610
|
}));
|
611
|
+
} else if (nex.workOrderComponentType === 'SYSTEM_ORDER_NO') {
|
612
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_systemOrderNo")]));
|
610
613
|
}
|
611
614
|
|
612
615
|
return cur;
|
@@ -786,23 +789,23 @@ export var orderBack = /*#__PURE__*/function () {
|
|
786
789
|
enterprisePaymentTid: order_no
|
787
790
|
});
|
788
791
|
}
|
789
|
-
}
|
792
|
+
} // console.log('detailsValue++', formValue, detailsValue);
|
793
|
+
|
790
794
|
|
791
|
-
console.log('detailsValue++', formValue, detailsValue);
|
792
795
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), detailsValue));
|
793
|
-
_context.next =
|
796
|
+
_context.next = 30;
|
794
797
|
break;
|
795
798
|
|
796
|
-
case
|
797
|
-
_context.prev =
|
799
|
+
case 28:
|
800
|
+
_context.prev = 28;
|
798
801
|
_context.t0 = _context["catch"](2);
|
799
802
|
|
800
|
-
case
|
803
|
+
case 30:
|
801
804
|
case "end":
|
802
805
|
return _context.stop();
|
803
806
|
}
|
804
807
|
}
|
805
|
-
}, _callee, null, [[2,
|
808
|
+
}, _callee, null, [[2, 28]]);
|
806
809
|
}));
|
807
810
|
|
808
811
|
return function orderBack(_x) {
|
@@ -877,7 +880,9 @@ var getComponentsValue = function getComponentsValue() {
|
|
877
880
|
ITEM_SELECT: 'itemList',
|
878
881
|
REMARK_INPUT: 'remark',
|
879
882
|
ITEM_ID: 'goodId',
|
880
|
-
ITEM_ENCODE: 'goodSerial'
|
883
|
+
ITEM_ENCODE: 'goodSerial',
|
884
|
+
BUYER_NICK_INPUT: 'buyer',
|
885
|
+
ENTERPRISE_PAYMENT: 'payBuyer'
|
881
886
|
};
|
882
887
|
return list.reduce(function (prv, next) {
|
883
888
|
if (mapList[next.workOrderComponentType]) {
|
@@ -30,11 +30,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
30
30
|
|
31
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
32
32
|
|
33
|
-
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
33
|
+
import React, { useState, useImperativeHandle, forwardRef, useRef } from 'react';
|
34
34
|
import { Drawer, Form, Spin, Input, Space, Button, message } from 'antd';
|
35
35
|
import { LeftOutlined } from '@ant-design/icons';
|
36
36
|
import { get } from 'lodash';
|
37
|
-
import { decodeAlipayInfo, editRemitOrder, addPaymentOrder } from "../../model/servers/api";
|
37
|
+
import { decodeAlipayInfo, editRemitOrder, addPaymentOrder, getThirdOpenUidByOrderNo } from "../../model/servers/api";
|
38
|
+
import { useAppSelector } from "../../model/hooks";
|
38
39
|
import { jsx as _jsx } from "react/jsx-runtime";
|
39
40
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
40
41
|
|
@@ -57,6 +58,9 @@ function ModifyModal(props, ref) {
|
|
57
58
|
}
|
58
59
|
};
|
59
60
|
});
|
61
|
+
var platformInfo = useAppSelector(function (state) {
|
62
|
+
return state.global.platformInfo;
|
63
|
+
});
|
60
64
|
|
61
65
|
var _useState = useState(false),
|
62
66
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -92,6 +96,8 @@ function ModifyModal(props, ref) {
|
|
92
96
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
93
97
|
form = _Form$useForm2[0];
|
94
98
|
|
99
|
+
var time = useRef(null);
|
100
|
+
|
95
101
|
var handleOk = function handleOk() {
|
96
102
|
form.validateFields().then( /*#__PURE__*/function () {
|
97
103
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
|
@@ -218,8 +224,61 @@ function ModifyModal(props, ref) {
|
|
218
224
|
}();
|
219
225
|
|
220
226
|
var TidChangeHandle = function TidChangeHandle(e) {
|
221
|
-
|
222
|
-
|
227
|
+
var _shopList$find2;
|
228
|
+
|
229
|
+
var order_no = e.target.value;
|
230
|
+
var taobaoId = (_shopList$find2 = shopList.find(function (item) {
|
231
|
+
return item.shopSourceStr === 'TAOBAO' && item.shopId == platformInfo.shopId;
|
232
|
+
})) === null || _shopList$find2 === void 0 ? void 0 : _shopList$find2.taobaoId; //淘宝订单买家id返填
|
233
|
+
|
234
|
+
if (taobaoId) {
|
235
|
+
clearTimeout(time.current);
|
236
|
+
time.current = setTimeout(function () {
|
237
|
+
getThirdUid(order_no, taobaoId);
|
238
|
+
}, 1000);
|
239
|
+
}
|
240
|
+
}; //获取买家信息
|
241
|
+
|
242
|
+
|
243
|
+
var getThirdUid = /*#__PURE__*/function () {
|
244
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order_no, taobaoId) {
|
245
|
+
var buyer, buyerInfo;
|
246
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
247
|
+
while (1) {
|
248
|
+
switch (_context3.prev = _context3.next) {
|
249
|
+
case 0:
|
250
|
+
_context3.prev = 0;
|
251
|
+
_context3.next = 3;
|
252
|
+
return getThirdOpenUidByOrderNo({
|
253
|
+
orderNo: order_no,
|
254
|
+
toAppKey: '21819818',
|
255
|
+
platform: 'tb',
|
256
|
+
taobaoId: taobaoId
|
257
|
+
});
|
258
|
+
|
259
|
+
case 3:
|
260
|
+
buyer = _context3.sent;
|
261
|
+
buyerInfo = buyer === null || buyer === void 0 ? void 0 : buyer.data;
|
262
|
+
form.setFieldsValue(_objectSpread({}, buyerInfo || {}));
|
263
|
+
_context3.next = 10;
|
264
|
+
break;
|
265
|
+
|
266
|
+
case 8:
|
267
|
+
_context3.prev = 8;
|
268
|
+
_context3.t0 = _context3["catch"](0);
|
269
|
+
|
270
|
+
case 10:
|
271
|
+
case "end":
|
272
|
+
return _context3.stop();
|
273
|
+
}
|
274
|
+
}
|
275
|
+
}, _callee3, null, [[0, 8]]);
|
276
|
+
}));
|
277
|
+
|
278
|
+
return function getThirdUid(_x3, _x4) {
|
279
|
+
return _ref3.apply(this, arguments);
|
280
|
+
};
|
281
|
+
}();
|
223
282
|
|
224
283
|
return /*#__PURE__*/_jsx(Drawer, {
|
225
284
|
closeIcon: /*#__PURE__*/_jsx(LeftOutlined, {}),
|
@@ -28,6 +28,7 @@ import Status from "../Widget/third/Status";
|
|
28
28
|
import Ordinary from "../Widget/third/Ordinary";
|
29
29
|
import ItemSelectThird from "../Widget/third/ItemSelect";
|
30
30
|
import Payment from "../Widget/third/Payment";
|
31
|
+
import SystemOrderNo from "../Widget/third/SystemOrderNo";
|
31
32
|
export var factory = function factory(type, options) {
|
32
33
|
switch (type) {
|
33
34
|
case 'INPUT':
|
@@ -123,6 +124,9 @@ export var factory = function factory(type, options) {
|
|
123
124
|
case 'ENTERPRISE_PAYMENT':
|
124
125
|
return new Payment(options);
|
125
126
|
|
127
|
+
case 'SYSTEM_ORDER_NO':
|
128
|
+
return new SystemOrderNo(options);
|
129
|
+
|
126
130
|
default:
|
127
131
|
return new BasicInput(options);
|
128
132
|
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
+
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
+
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
+
|
7
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
8
|
+
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
10
|
+
|
11
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12
|
+
|
13
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
14
|
+
|
15
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
16
|
+
|
17
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
18
|
+
|
19
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
20
|
+
|
21
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
22
|
+
|
23
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
24
|
+
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
26
|
+
|
27
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
28
|
+
|
29
|
+
/*
|
30
|
+
* @Description:
|
31
|
+
* @Author: litian
|
32
|
+
* @Date: 2022-11-14 14:58:01
|
33
|
+
* @LastEditors: litian
|
34
|
+
* @LastEditTime: 2022-11-17 09:54:36
|
35
|
+
*/
|
36
|
+
import React from 'react';
|
37
|
+
import Input from "../../basic/Input";
|
38
|
+
import { ApaasInput } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
39
|
+
import { getFormItem } from "../../common/formItemWrap"; //系统订单号
|
40
|
+
|
41
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
42
|
+
|
43
|
+
var ESystemOrderNo = /*#__PURE__*/function (_Input) {
|
44
|
+
_inherits(ESystemOrderNo, _Input);
|
45
|
+
|
46
|
+
var _super = _createSuper(ESystemOrderNo);
|
47
|
+
|
48
|
+
function ESystemOrderNo(options) {
|
49
|
+
var _this;
|
50
|
+
|
51
|
+
_classCallCheck(this, ESystemOrderNo);
|
52
|
+
|
53
|
+
_this = _super.call(this, options);
|
54
|
+
|
55
|
+
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
56
|
+
var _this$componentConfig;
|
57
|
+
|
58
|
+
return getFormItem(_objectSpread({
|
59
|
+
title: _this.name,
|
60
|
+
name: _this.id,
|
61
|
+
rules: _this.rules,
|
62
|
+
required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
|
63
|
+
component: /*#__PURE__*/_jsx(ApaasInput, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
64
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
65
|
+
}))
|
66
|
+
}, value));
|
67
|
+
});
|
68
|
+
|
69
|
+
_this.dataType = 'string';
|
70
|
+
_this.rules = [];
|
71
|
+
_this.showContains = true;
|
72
|
+
_this.effects = options.effects;
|
73
|
+
_this.componentConfig = _objectSpread({}, options.componentConfig);
|
74
|
+
return _this;
|
75
|
+
}
|
76
|
+
|
77
|
+
return _createClass(ESystemOrderNo);
|
78
|
+
}(Input);
|
79
|
+
|
80
|
+
export default ESystemOrderNo;
|