@kmkf-fe-packages/basic-components 1.0.10-beta.15 → 1.0.10-beta.16
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/index.esm.js +391 -41
- package/dist/index.js +389 -38
- package/dist/src/apaas/ApaasInput/index.d.ts +1 -0
- package/dist/src/apaas/SubForm/index.d.ts +27 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
2
|
-
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form,
|
|
1
|
+
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
|
|
2
|
+
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination } from 'antd';
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
6
|
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, cloneDeep, difference, differenceWith } from 'lodash';
|
|
7
8
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
|
-
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
11
11
|
import BigNumber from 'bignumber.js';
|
|
@@ -511,11 +511,12 @@ var ApaasDate = function ApaasDate(props) {
|
|
|
511
511
|
}, otherProps));
|
|
512
512
|
};
|
|
513
513
|
|
|
514
|
-
var _excluded$1 = ["isNumber", "replaceWarn"];
|
|
514
|
+
var _excluded$1 = ["isNumber", "replaceWarn", "precision"];
|
|
515
515
|
function ApaasInput(props) {
|
|
516
516
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
517
517
|
var isNumber = props.isNumber,
|
|
518
518
|
replaceWarn = props.replaceWarn,
|
|
519
|
+
precision = props.precision,
|
|
519
520
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
520
521
|
var handleBlur = function handleBlur(e) {
|
|
521
522
|
// 去除头尾空格
|
|
@@ -525,8 +526,12 @@ function ApaasInput(props) {
|
|
|
525
526
|
typeof onChange === 'function' && onChange(e);
|
|
526
527
|
typeof onBlur === 'function' && onBlur(e);
|
|
527
528
|
};
|
|
529
|
+
return isNumber ?
|
|
530
|
+
/*#__PURE__*/
|
|
528
531
|
// @ts-ignore
|
|
529
|
-
|
|
532
|
+
React.createElement(InputNumber, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
533
|
+
precision: precision === 'limit' ? undefined : precision
|
|
534
|
+
})) : /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
530
535
|
onBlur: handleBlur
|
|
531
536
|
}));
|
|
532
537
|
}
|
|
@@ -7627,6 +7632,352 @@ function withFormItem(WrappedComponent) {
|
|
|
7627
7632
|
};
|
|
7628
7633
|
}
|
|
7629
7634
|
|
|
7635
|
+
/*
|
|
7636
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7637
|
+
* @Date: 2022-09-13 11:06:09
|
|
7638
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7639
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
7640
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7641
|
+
* @Description:
|
|
7642
|
+
*
|
|
7643
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7644
|
+
*/
|
|
7645
|
+
var extendRequest = extend$1({});
|
|
7646
|
+
|
|
7647
|
+
var WidgetMap = {
|
|
7648
|
+
INPUT: 'input',
|
|
7649
|
+
TEXTAREA: 'textarea'
|
|
7650
|
+
};
|
|
7651
|
+
var pageSize = 10;
|
|
7652
|
+
var SubForm = function SubForm(props) {
|
|
7653
|
+
var _selectOptions$;
|
|
7654
|
+
var value = props.value,
|
|
7655
|
+
onChange = props.onChange,
|
|
7656
|
+
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7657
|
+
_props$subConfig = props.subConfig,
|
|
7658
|
+
config = _props$subConfig.config,
|
|
7659
|
+
flowStatus = _props$subConfig.flowStatus,
|
|
7660
|
+
flowTemplateKey = _props$subConfig.flowTemplateKey,
|
|
7661
|
+
nodeId = _props$subConfig.nodeId,
|
|
7662
|
+
workOrderTemplateId = _props$subConfig.workOrderTemplateId,
|
|
7663
|
+
_props$look = props.look,
|
|
7664
|
+
look = _props$look === void 0 ? false : _props$look;
|
|
7665
|
+
var ref = useRef(null);
|
|
7666
|
+
var _useState = useState(false),
|
|
7667
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7668
|
+
open = _useState2[0],
|
|
7669
|
+
setOpen = _useState2[1];
|
|
7670
|
+
var _useState3 = useState(''),
|
|
7671
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7672
|
+
selectKey = _useState4[0],
|
|
7673
|
+
setSelectKey = _useState4[1];
|
|
7674
|
+
var _useState5 = useState(''),
|
|
7675
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7676
|
+
inputValue = _useState6[0],
|
|
7677
|
+
setInputValue = _useState6[1];
|
|
7678
|
+
var _useState7 = useState([]),
|
|
7679
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7680
|
+
list = _useState8[0],
|
|
7681
|
+
setList = _useState8[1];
|
|
7682
|
+
var _useState9 = useState(1),
|
|
7683
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7684
|
+
pageNo = _useState10[0],
|
|
7685
|
+
setPageNo = _useState10[1];
|
|
7686
|
+
var _useState11 = useState(true),
|
|
7687
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
7688
|
+
hasMore = _useState12[0],
|
|
7689
|
+
setHasMore = _useState12[1];
|
|
7690
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
7691
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
7692
|
+
var valueItem = config.find(function (t) {
|
|
7693
|
+
return t.key === type && t.isNumber && t.precision !== 'nolimit';
|
|
7694
|
+
});
|
|
7695
|
+
var newValue = JSON.parse(JSON.stringify(value));
|
|
7696
|
+
newValue[index][type] = valueItem ? Number(val).toFixed(+valueItem.precision) : val;
|
|
7697
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newValue));
|
|
7698
|
+
}
|
|
7699
|
+
};
|
|
7700
|
+
var column = [{
|
|
7701
|
+
dataIndex: 'index',
|
|
7702
|
+
title: '序号',
|
|
7703
|
+
width: 70,
|
|
7704
|
+
render: function render(val, record, index) {
|
|
7705
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7706
|
+
style: {
|
|
7707
|
+
width: 25
|
|
7708
|
+
}
|
|
7709
|
+
}, index + 1);
|
|
7710
|
+
}
|
|
7711
|
+
}].concat(_toConsumableArray(config.filter(function (t) {
|
|
7712
|
+
return t.isShow;
|
|
7713
|
+
}).map(function (t) {
|
|
7714
|
+
return {
|
|
7715
|
+
dataIndex: t.key,
|
|
7716
|
+
title: /*#__PURE__*/React.createElement("div", null, t.isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
7717
|
+
style: {
|
|
7718
|
+
color: 'red'
|
|
7719
|
+
}
|
|
7720
|
+
}, "*") : null, t.name),
|
|
7721
|
+
ellipsis: true,
|
|
7722
|
+
width: 120,
|
|
7723
|
+
render: function render(val, record, index) {
|
|
7724
|
+
// @ts-ignore
|
|
7725
|
+
var precisionValue = t.precision === 'nolimit' ? undefined : t.precision;
|
|
7726
|
+
return !t.isEdit ? t.isNumber ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
7727
|
+
style: {
|
|
7728
|
+
width: '100%'
|
|
7729
|
+
},
|
|
7730
|
+
value: val,
|
|
7731
|
+
precision: precisionValue,
|
|
7732
|
+
onChange: function onChange(e) {
|
|
7733
|
+
return updateHandle(e, index, t.key);
|
|
7734
|
+
},
|
|
7735
|
+
stringMode: true
|
|
7736
|
+
}) : /*#__PURE__*/React.createElement(Input, {
|
|
7737
|
+
style: {
|
|
7738
|
+
width: '100%'
|
|
7739
|
+
},
|
|
7740
|
+
value: val,
|
|
7741
|
+
onChange: function onChange(e) {
|
|
7742
|
+
var _e$target;
|
|
7743
|
+
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
|
|
7744
|
+
}
|
|
7745
|
+
}) : /*#__PURE__*/React.createElement("div", null, val);
|
|
7746
|
+
}
|
|
7747
|
+
};
|
|
7748
|
+
})), [{
|
|
7749
|
+
dataIndex: 'operation',
|
|
7750
|
+
title: '操作',
|
|
7751
|
+
width: 70,
|
|
7752
|
+
render: function render(val, record, index) {
|
|
7753
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
7754
|
+
type: "link",
|
|
7755
|
+
onClick: function onClick() {
|
|
7756
|
+
return deleteHandle(record.uuid);
|
|
7757
|
+
}
|
|
7758
|
+
}, "\u5220\u9664");
|
|
7759
|
+
}
|
|
7760
|
+
}]);
|
|
7761
|
+
var columsSearch = useMemo(function () {
|
|
7762
|
+
return [{
|
|
7763
|
+
dataIndex: 'index',
|
|
7764
|
+
title: '序号',
|
|
7765
|
+
render: function render(val, record, index) {
|
|
7766
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7767
|
+
style: {
|
|
7768
|
+
width: 25
|
|
7769
|
+
}
|
|
7770
|
+
}, index + 1);
|
|
7771
|
+
}
|
|
7772
|
+
}].concat(_toConsumableArray(config.map(function (t) {
|
|
7773
|
+
return {
|
|
7774
|
+
dataIndex: t.key,
|
|
7775
|
+
title: t.name
|
|
7776
|
+
};
|
|
7777
|
+
})));
|
|
7778
|
+
}, [config]);
|
|
7779
|
+
var valueMap = useMemo(function () {
|
|
7780
|
+
return config.reduce(function (prv, next) {
|
|
7781
|
+
prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = next.key;
|
|
7782
|
+
return prv;
|
|
7783
|
+
}, {});
|
|
7784
|
+
}, [config]);
|
|
7785
|
+
var selectOptions = useMemo(function () {
|
|
7786
|
+
var _options$;
|
|
7787
|
+
var options = config.filter(function (t) {
|
|
7788
|
+
return t.isShow;
|
|
7789
|
+
}).map(function (item) {
|
|
7790
|
+
return {
|
|
7791
|
+
label: item.name,
|
|
7792
|
+
value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
|
|
7793
|
+
};
|
|
7794
|
+
});
|
|
7795
|
+
setSelectKey(options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value);
|
|
7796
|
+
return options;
|
|
7797
|
+
}, [config]);
|
|
7798
|
+
var deleteHandle = function deleteHandle(uuid) {
|
|
7799
|
+
var newList = value.filter(function (item) {
|
|
7800
|
+
return item.uuid !== uuid;
|
|
7801
|
+
});
|
|
7802
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
7803
|
+
};
|
|
7804
|
+
var onScrollCapture = function onScrollCapture(e) {
|
|
7805
|
+
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight) {
|
|
7806
|
+
if (hasMore) {
|
|
7807
|
+
getWorkOrderList({
|
|
7808
|
+
pageNo: pageNo + 1
|
|
7809
|
+
});
|
|
7810
|
+
setPageNo(pageNo + 1);
|
|
7811
|
+
}
|
|
7812
|
+
}
|
|
7813
|
+
};
|
|
7814
|
+
var getWorkOrderList = /*#__PURE__*/function () {
|
|
7815
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7816
|
+
var _ref2,
|
|
7817
|
+
_ref2$pageNo,
|
|
7818
|
+
pageNo,
|
|
7819
|
+
params,
|
|
7820
|
+
res,
|
|
7821
|
+
data,
|
|
7822
|
+
success,
|
|
7823
|
+
newList,
|
|
7824
|
+
_args = arguments;
|
|
7825
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7826
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7827
|
+
case 0:
|
|
7828
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
|
|
7829
|
+
if (!look) {
|
|
7830
|
+
_context.next = 3;
|
|
7831
|
+
break;
|
|
7832
|
+
}
|
|
7833
|
+
return _context.abrupt("return");
|
|
7834
|
+
case 3:
|
|
7835
|
+
params = {
|
|
7836
|
+
flowNodeId: nodeId,
|
|
7837
|
+
flowTemplateKey: flowTemplateKey === null || flowTemplateKey === void 0 ? void 0 : flowTemplateKey[1],
|
|
7838
|
+
pageNo: pageNo,
|
|
7839
|
+
pageSize: pageSize,
|
|
7840
|
+
templateKey: workOrderTemplateId,
|
|
7841
|
+
needReturnRepeatValue: true,
|
|
7842
|
+
needFilterShopByPermission: needFilterShopByPermission,
|
|
7843
|
+
queryComponents: [{
|
|
7844
|
+
key: 'flowStatus',
|
|
7845
|
+
symbol: 'in',
|
|
7846
|
+
value: flowStatus
|
|
7847
|
+
}]
|
|
7848
|
+
};
|
|
7849
|
+
if (selectKey && inputValue) {
|
|
7850
|
+
params.queryComponents = [{
|
|
7851
|
+
key: 'flowStatus',
|
|
7852
|
+
symbol: 'in',
|
|
7853
|
+
value: flowStatus
|
|
7854
|
+
}, {
|
|
7855
|
+
key: selectKey,
|
|
7856
|
+
symbol: 'in',
|
|
7857
|
+
value: [inputValue]
|
|
7858
|
+
}];
|
|
7859
|
+
}
|
|
7860
|
+
_context.next = 7;
|
|
7861
|
+
return extendRequest('/qy/view/workOrderList', {
|
|
7862
|
+
method: 'post',
|
|
7863
|
+
data: params
|
|
7864
|
+
});
|
|
7865
|
+
case 7:
|
|
7866
|
+
res = _context.sent;
|
|
7867
|
+
data = res.data, success = res.success;
|
|
7868
|
+
if (success) {
|
|
7869
|
+
newList = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
7870
|
+
var params = {};
|
|
7871
|
+
Object.keys(item.jsonMap).forEach(function (key) {
|
|
7872
|
+
if (valueMap[key]) {
|
|
7873
|
+
params[valueMap[key]] = item.jsonMap[key];
|
|
7874
|
+
}
|
|
7875
|
+
});
|
|
7876
|
+
return params;
|
|
7877
|
+
});
|
|
7878
|
+
if (pageNo === 1) {
|
|
7879
|
+
setList(newList);
|
|
7880
|
+
} else {
|
|
7881
|
+
setList([].concat(_toConsumableArray(list), _toConsumableArray(newList)));
|
|
7882
|
+
setHasMore((data === null || data === void 0 ? void 0 : data.list.length) === pageSize);
|
|
7883
|
+
}
|
|
7884
|
+
}
|
|
7885
|
+
case 10:
|
|
7886
|
+
case "end":
|
|
7887
|
+
return _context.stop();
|
|
7888
|
+
}
|
|
7889
|
+
}, _callee);
|
|
7890
|
+
}));
|
|
7891
|
+
return function getWorkOrderList() {
|
|
7892
|
+
return _ref.apply(this, arguments);
|
|
7893
|
+
};
|
|
7894
|
+
}();
|
|
7895
|
+
useEffect(function () {
|
|
7896
|
+
setPageNo(1);
|
|
7897
|
+
getWorkOrderList({
|
|
7898
|
+
pageNo: 1
|
|
7899
|
+
});
|
|
7900
|
+
}, []);
|
|
7901
|
+
useEffect(function () {
|
|
7902
|
+
getWorkOrderList({
|
|
7903
|
+
pageNo: 1
|
|
7904
|
+
});
|
|
7905
|
+
}, [inputValue]);
|
|
7906
|
+
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
7907
|
+
setOpen(newOpen);
|
|
7908
|
+
};
|
|
7909
|
+
var onChangeInput = useCallback(debounce(function (val) {
|
|
7910
|
+
setInputValue(val);
|
|
7911
|
+
setOpen(true);
|
|
7912
|
+
}, 1000), []);
|
|
7913
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !look && /*#__PURE__*/React.createElement(Space, {
|
|
7914
|
+
style: {
|
|
7915
|
+
marginBottom: '10px'
|
|
7916
|
+
}
|
|
7917
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
7918
|
+
style: {
|
|
7919
|
+
width: '100px'
|
|
7920
|
+
},
|
|
7921
|
+
options: selectOptions,
|
|
7922
|
+
defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
|
|
7923
|
+
value: selectKey,
|
|
7924
|
+
onChange: setSelectKey
|
|
7925
|
+
}), /*#__PURE__*/React.createElement(Popover, {
|
|
7926
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
7927
|
+
ref: ref,
|
|
7928
|
+
onScrollCapture: onScrollCapture,
|
|
7929
|
+
style: {
|
|
7930
|
+
height: 320,
|
|
7931
|
+
overflowY: 'scroll',
|
|
7932
|
+
overflowX: 'auto'
|
|
7933
|
+
}
|
|
7934
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
7935
|
+
columns: columsSearch,
|
|
7936
|
+
dataSource: list,
|
|
7937
|
+
rowKey: 'index',
|
|
7938
|
+
size: "small",
|
|
7939
|
+
pagination: false,
|
|
7940
|
+
scroll: {
|
|
7941
|
+
x: '100%'
|
|
7942
|
+
},
|
|
7943
|
+
locale: {
|
|
7944
|
+
emptyText: '暂无数据'
|
|
7945
|
+
},
|
|
7946
|
+
onRow: function onRow(record) {
|
|
7947
|
+
return {
|
|
7948
|
+
onClick: function onClick() {
|
|
7949
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, record), {}, {
|
|
7950
|
+
uuid: uuid()
|
|
7951
|
+
})]));
|
|
7952
|
+
setOpen(false);
|
|
7953
|
+
}
|
|
7954
|
+
};
|
|
7955
|
+
}
|
|
7956
|
+
})),
|
|
7957
|
+
trigger: "click",
|
|
7958
|
+
placement: "bottom",
|
|
7959
|
+
open: open,
|
|
7960
|
+
onOpenChange: handleOpenChange
|
|
7961
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
7962
|
+
allowClear: true,
|
|
7963
|
+
onChange: function onChange(e) {
|
|
7964
|
+
onChangeInput(e.target.value);
|
|
7965
|
+
}
|
|
7966
|
+
}))), /*#__PURE__*/React.createElement(Table, {
|
|
7967
|
+
columns: column,
|
|
7968
|
+
dataSource: value,
|
|
7969
|
+
rowKey: 'uuid',
|
|
7970
|
+
size: "small",
|
|
7971
|
+
pagination: false,
|
|
7972
|
+
scroll: {
|
|
7973
|
+
x: '100%'
|
|
7974
|
+
},
|
|
7975
|
+
locale: {
|
|
7976
|
+
emptyText: '暂无数据'
|
|
7977
|
+
}
|
|
7978
|
+
}));
|
|
7979
|
+
};
|
|
7980
|
+
|
|
7630
7981
|
var BuyerNick = function BuyerNick(props) {
|
|
7631
7982
|
var _props$value = props.value,
|
|
7632
7983
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -7638,19 +7989,21 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
7638
7989
|
var changeValue = function changeValue(e, type) {
|
|
7639
7990
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
|
|
7640
7991
|
};
|
|
7641
|
-
useEffect(
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
}
|
|
7992
|
+
// useEffect(() => {
|
|
7993
|
+
// //淘宝平台和抖音平台需要展示买家id
|
|
7994
|
+
// const platformList = ['TAOBAO', 'FXG'];
|
|
7995
|
+
// const showBuyerId = (shopList || []).some(
|
|
7996
|
+
// (item) =>
|
|
7997
|
+
// item.shopId == shopId && platformList.includes(item.shopSourceStr),
|
|
7998
|
+
// );
|
|
7999
|
+
// //如果不是淘宝店铺 旺旺id为空
|
|
8000
|
+
// if (!showBuyerId) {
|
|
8001
|
+
// onChange?.({
|
|
8002
|
+
// ...value,
|
|
8003
|
+
// buyerOpenUid: '',
|
|
8004
|
+
// });
|
|
8005
|
+
// }
|
|
8006
|
+
// }, [shopId, shopList]);
|
|
7654
8007
|
return /*#__PURE__*/React.createElement(Input, {
|
|
7655
8008
|
disabled: disabled,
|
|
7656
8009
|
placeholder: "\u8BF7\u8F93\u5165\u4E70\u5BB6\u6635\u79F0",
|
|
@@ -7911,18 +8264,6 @@ var AliPay = function AliPay(props) {
|
|
|
7911
8264
|
})));
|
|
7912
8265
|
};
|
|
7913
8266
|
|
|
7914
|
-
/*
|
|
7915
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7916
|
-
* @Date: 2022-09-13 11:06:09
|
|
7917
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7918
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
7919
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7920
|
-
* @Description:
|
|
7921
|
-
*
|
|
7922
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7923
|
-
*/
|
|
7924
|
-
var extendRequest = extend$1({});
|
|
7925
|
-
|
|
7926
8267
|
var css_248z$5 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
7927
8268
|
styleInject(css_248z$5);
|
|
7928
8269
|
|
|
@@ -10471,6 +10812,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
10471
10812
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10472
10813
|
changeOrderInfo[type] = val;
|
|
10473
10814
|
changeOrderInfo['sendId'] = option.value;
|
|
10815
|
+
if (platformType === 'wdt' && type === 'sendName') {
|
|
10816
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10817
|
+
}
|
|
10474
10818
|
var newList = _toConsumableArray(value);
|
|
10475
10819
|
newList[changeIndex] = changeOrderInfo;
|
|
10476
10820
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -11755,7 +12099,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11755
12099
|
width: 70
|
|
11756
12100
|
},
|
|
11757
12101
|
value: val,
|
|
11758
|
-
min:
|
|
12102
|
+
min: 1,
|
|
11759
12103
|
precision: 0,
|
|
11760
12104
|
onChange: function onChange(num) {
|
|
11761
12105
|
return updateHandle(num, index, 'num');
|
|
@@ -12127,7 +12471,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12127
12471
|
width: 70
|
|
12128
12472
|
},
|
|
12129
12473
|
value: val,
|
|
12130
|
-
min:
|
|
12474
|
+
min: 1,
|
|
12131
12475
|
precision: 0,
|
|
12132
12476
|
onChange: function onChange(num) {
|
|
12133
12477
|
return updateHandle(num, index, 'number');
|
|
@@ -12919,9 +13263,11 @@ var index$1 = (function (props) {
|
|
|
12919
13263
|
_onChange = props.onChange,
|
|
12920
13264
|
disabled = props.disabled,
|
|
12921
13265
|
type = props.type;
|
|
13266
|
+
var onceRef = useRef(false);
|
|
12922
13267
|
useEffect(function () {
|
|
12923
13268
|
var _value$orders, _value$showOrderInfo;
|
|
12924
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
13269
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
|
|
13270
|
+
onceRef.current = true;
|
|
12925
13271
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12926
13272
|
getOrderList(value.orderNo);
|
|
12927
13273
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12930,7 +13276,7 @@ var index$1 = (function (props) {
|
|
|
12930
13276
|
getWdtOrderList(value.orderNo);
|
|
12931
13277
|
}
|
|
12932
13278
|
}
|
|
12933
|
-
}, [value
|
|
13279
|
+
}, [value, type]);
|
|
12934
13280
|
var columns = useMemo(function () {
|
|
12935
13281
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12936
13282
|
return [{
|
|
@@ -12973,7 +13319,8 @@ var index$1 = (function (props) {
|
|
|
12973
13319
|
})
|
|
12974
13320
|
}));
|
|
12975
13321
|
}
|
|
12976
|
-
|
|
13322
|
+
onceRef.current = false;
|
|
13323
|
+
case 7:
|
|
12977
13324
|
case "end":
|
|
12978
13325
|
return _context.stop();
|
|
12979
13326
|
}
|
|
@@ -13018,7 +13365,8 @@ var index$1 = (function (props) {
|
|
|
13018
13365
|
})
|
|
13019
13366
|
}));
|
|
13020
13367
|
}
|
|
13021
|
-
|
|
13368
|
+
onceRef.current = false;
|
|
13369
|
+
case 7:
|
|
13022
13370
|
case "end":
|
|
13023
13371
|
return _context2.stop();
|
|
13024
13372
|
}
|
|
@@ -13073,7 +13421,8 @@ var index$1 = (function (props) {
|
|
|
13073
13421
|
})
|
|
13074
13422
|
}));
|
|
13075
13423
|
}
|
|
13076
|
-
|
|
13424
|
+
onceRef.current = false;
|
|
13425
|
+
case 7:
|
|
13077
13426
|
case "end":
|
|
13078
13427
|
return _context3.stop();
|
|
13079
13428
|
}
|
|
@@ -13740,9 +14089,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13740
14089
|
var _typeMap$type25;
|
|
13741
14090
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13742
14091
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13743
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
13744
|
-
gutter: 8
|
|
13745
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
14092
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
13746
14093
|
className: "gutter-row",
|
|
13747
14094
|
xs: {
|
|
13748
14095
|
span: 11
|
|
@@ -13774,6 +14121,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13774
14121
|
},
|
|
13775
14122
|
md: {
|
|
13776
14123
|
span: 6
|
|
14124
|
+
},
|
|
14125
|
+
style: {
|
|
14126
|
+
marginLeft: '8px'
|
|
13777
14127
|
}
|
|
13778
14128
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
13779
14129
|
style: {
|
|
@@ -14568,4 +14918,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
14568
14918
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
14569
14919
|
};
|
|
14570
14920
|
|
|
14571
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|
|
14921
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|
package/dist/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var icons = require('@ant-design/icons');
|
|
|
8
8
|
var request = require('umi-request');
|
|
9
9
|
var reactCopyToClipboard = require('react-copy-to-clipboard');
|
|
10
10
|
var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
|
|
11
|
-
var zhCN = require('antd/lib/locale/zh_CN');
|
|
12
11
|
var lodash = require('lodash');
|
|
12
|
+
var zhCN = require('antd/lib/locale/zh_CN');
|
|
13
13
|
var ahooks = require('ahooks');
|
|
14
14
|
var pubsub = require('pubsub-js');
|
|
15
15
|
var BigNumber = require('bignumber.js');
|
|
@@ -523,11 +523,12 @@ var ApaasDate = function ApaasDate(props) {
|
|
|
523
523
|
}, otherProps));
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
var _excluded$1 = ["isNumber", "replaceWarn"];
|
|
526
|
+
var _excluded$1 = ["isNumber", "replaceWarn", "precision"];
|
|
527
527
|
function ApaasInput(props) {
|
|
528
528
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
529
529
|
var isNumber = props.isNumber,
|
|
530
530
|
replaceWarn = props.replaceWarn,
|
|
531
|
+
precision = props.precision,
|
|
531
532
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
532
533
|
var handleBlur = function handleBlur(e) {
|
|
533
534
|
// 去除头尾空格
|
|
@@ -537,8 +538,12 @@ function ApaasInput(props) {
|
|
|
537
538
|
typeof onChange === 'function' && onChange(e);
|
|
538
539
|
typeof onBlur === 'function' && onBlur(e);
|
|
539
540
|
};
|
|
541
|
+
return isNumber ?
|
|
542
|
+
/*#__PURE__*/
|
|
540
543
|
// @ts-ignore
|
|
541
|
-
|
|
544
|
+
React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
545
|
+
precision: precision === 'limit' ? undefined : precision
|
|
546
|
+
})) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
542
547
|
onBlur: handleBlur
|
|
543
548
|
}));
|
|
544
549
|
}
|
|
@@ -7639,6 +7644,352 @@ function withFormItem(WrappedComponent) {
|
|
|
7639
7644
|
};
|
|
7640
7645
|
}
|
|
7641
7646
|
|
|
7647
|
+
/*
|
|
7648
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7649
|
+
* @Date: 2022-09-13 11:06:09
|
|
7650
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7651
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
7652
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7653
|
+
* @Description:
|
|
7654
|
+
*
|
|
7655
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7656
|
+
*/
|
|
7657
|
+
var extendRequest = request.extend({});
|
|
7658
|
+
|
|
7659
|
+
var WidgetMap = {
|
|
7660
|
+
INPUT: 'input',
|
|
7661
|
+
TEXTAREA: 'textarea'
|
|
7662
|
+
};
|
|
7663
|
+
var pageSize = 10;
|
|
7664
|
+
var SubForm = function SubForm(props) {
|
|
7665
|
+
var _selectOptions$;
|
|
7666
|
+
var value = props.value,
|
|
7667
|
+
onChange = props.onChange,
|
|
7668
|
+
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7669
|
+
_props$subConfig = props.subConfig,
|
|
7670
|
+
config = _props$subConfig.config,
|
|
7671
|
+
flowStatus = _props$subConfig.flowStatus,
|
|
7672
|
+
flowTemplateKey = _props$subConfig.flowTemplateKey,
|
|
7673
|
+
nodeId = _props$subConfig.nodeId,
|
|
7674
|
+
workOrderTemplateId = _props$subConfig.workOrderTemplateId,
|
|
7675
|
+
_props$look = props.look,
|
|
7676
|
+
look = _props$look === void 0 ? false : _props$look;
|
|
7677
|
+
var ref = React.useRef(null);
|
|
7678
|
+
var _useState = React.useState(false),
|
|
7679
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7680
|
+
open = _useState2[0],
|
|
7681
|
+
setOpen = _useState2[1];
|
|
7682
|
+
var _useState3 = React.useState(''),
|
|
7683
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7684
|
+
selectKey = _useState4[0],
|
|
7685
|
+
setSelectKey = _useState4[1];
|
|
7686
|
+
var _useState5 = React.useState(''),
|
|
7687
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7688
|
+
inputValue = _useState6[0],
|
|
7689
|
+
setInputValue = _useState6[1];
|
|
7690
|
+
var _useState7 = React.useState([]),
|
|
7691
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7692
|
+
list = _useState8[0],
|
|
7693
|
+
setList = _useState8[1];
|
|
7694
|
+
var _useState9 = React.useState(1),
|
|
7695
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7696
|
+
pageNo = _useState10[0],
|
|
7697
|
+
setPageNo = _useState10[1];
|
|
7698
|
+
var _useState11 = React.useState(true),
|
|
7699
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
7700
|
+
hasMore = _useState12[0],
|
|
7701
|
+
setHasMore = _useState12[1];
|
|
7702
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
7703
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
7704
|
+
var valueItem = config.find(function (t) {
|
|
7705
|
+
return t.key === type && t.isNumber && t.precision !== 'nolimit';
|
|
7706
|
+
});
|
|
7707
|
+
var newValue = JSON.parse(JSON.stringify(value));
|
|
7708
|
+
newValue[index][type] = valueItem ? Number(val).toFixed(+valueItem.precision) : val;
|
|
7709
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newValue));
|
|
7710
|
+
}
|
|
7711
|
+
};
|
|
7712
|
+
var column = [{
|
|
7713
|
+
dataIndex: 'index',
|
|
7714
|
+
title: '序号',
|
|
7715
|
+
width: 70,
|
|
7716
|
+
render: function render(val, record, index) {
|
|
7717
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7718
|
+
style: {
|
|
7719
|
+
width: 25
|
|
7720
|
+
}
|
|
7721
|
+
}, index + 1);
|
|
7722
|
+
}
|
|
7723
|
+
}].concat(_toConsumableArray(config.filter(function (t) {
|
|
7724
|
+
return t.isShow;
|
|
7725
|
+
}).map(function (t) {
|
|
7726
|
+
return {
|
|
7727
|
+
dataIndex: t.key,
|
|
7728
|
+
title: /*#__PURE__*/React__default['default'].createElement("div", null, t.isRequired ? /*#__PURE__*/React__default['default'].createElement("span", {
|
|
7729
|
+
style: {
|
|
7730
|
+
color: 'red'
|
|
7731
|
+
}
|
|
7732
|
+
}, "*") : null, t.name),
|
|
7733
|
+
ellipsis: true,
|
|
7734
|
+
width: 120,
|
|
7735
|
+
render: function render(val, record, index) {
|
|
7736
|
+
// @ts-ignore
|
|
7737
|
+
var precisionValue = t.precision === 'nolimit' ? undefined : t.precision;
|
|
7738
|
+
return !t.isEdit ? t.isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
7739
|
+
style: {
|
|
7740
|
+
width: '100%'
|
|
7741
|
+
},
|
|
7742
|
+
value: val,
|
|
7743
|
+
precision: precisionValue,
|
|
7744
|
+
onChange: function onChange(e) {
|
|
7745
|
+
return updateHandle(e, index, t.key);
|
|
7746
|
+
},
|
|
7747
|
+
stringMode: true
|
|
7748
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7749
|
+
style: {
|
|
7750
|
+
width: '100%'
|
|
7751
|
+
},
|
|
7752
|
+
value: val,
|
|
7753
|
+
onChange: function onChange(e) {
|
|
7754
|
+
var _e$target;
|
|
7755
|
+
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
|
|
7756
|
+
}
|
|
7757
|
+
}) : /*#__PURE__*/React__default['default'].createElement("div", null, val);
|
|
7758
|
+
}
|
|
7759
|
+
};
|
|
7760
|
+
})), [{
|
|
7761
|
+
dataIndex: 'operation',
|
|
7762
|
+
title: '操作',
|
|
7763
|
+
width: 70,
|
|
7764
|
+
render: function render(val, record, index) {
|
|
7765
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7766
|
+
type: "link",
|
|
7767
|
+
onClick: function onClick() {
|
|
7768
|
+
return deleteHandle(record.uuid);
|
|
7769
|
+
}
|
|
7770
|
+
}, "\u5220\u9664");
|
|
7771
|
+
}
|
|
7772
|
+
}]);
|
|
7773
|
+
var columsSearch = React.useMemo(function () {
|
|
7774
|
+
return [{
|
|
7775
|
+
dataIndex: 'index',
|
|
7776
|
+
title: '序号',
|
|
7777
|
+
render: function render(val, record, index) {
|
|
7778
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7779
|
+
style: {
|
|
7780
|
+
width: 25
|
|
7781
|
+
}
|
|
7782
|
+
}, index + 1);
|
|
7783
|
+
}
|
|
7784
|
+
}].concat(_toConsumableArray(config.map(function (t) {
|
|
7785
|
+
return {
|
|
7786
|
+
dataIndex: t.key,
|
|
7787
|
+
title: t.name
|
|
7788
|
+
};
|
|
7789
|
+
})));
|
|
7790
|
+
}, [config]);
|
|
7791
|
+
var valueMap = React.useMemo(function () {
|
|
7792
|
+
return config.reduce(function (prv, next) {
|
|
7793
|
+
prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = next.key;
|
|
7794
|
+
return prv;
|
|
7795
|
+
}, {});
|
|
7796
|
+
}, [config]);
|
|
7797
|
+
var selectOptions = React.useMemo(function () {
|
|
7798
|
+
var _options$;
|
|
7799
|
+
var options = config.filter(function (t) {
|
|
7800
|
+
return t.isShow;
|
|
7801
|
+
}).map(function (item) {
|
|
7802
|
+
return {
|
|
7803
|
+
label: item.name,
|
|
7804
|
+
value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
|
|
7805
|
+
};
|
|
7806
|
+
});
|
|
7807
|
+
setSelectKey(options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value);
|
|
7808
|
+
return options;
|
|
7809
|
+
}, [config]);
|
|
7810
|
+
var deleteHandle = function deleteHandle(uuid) {
|
|
7811
|
+
var newList = value.filter(function (item) {
|
|
7812
|
+
return item.uuid !== uuid;
|
|
7813
|
+
});
|
|
7814
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
7815
|
+
};
|
|
7816
|
+
var onScrollCapture = function onScrollCapture(e) {
|
|
7817
|
+
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight) {
|
|
7818
|
+
if (hasMore) {
|
|
7819
|
+
getWorkOrderList({
|
|
7820
|
+
pageNo: pageNo + 1
|
|
7821
|
+
});
|
|
7822
|
+
setPageNo(pageNo + 1);
|
|
7823
|
+
}
|
|
7824
|
+
}
|
|
7825
|
+
};
|
|
7826
|
+
var getWorkOrderList = /*#__PURE__*/function () {
|
|
7827
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7828
|
+
var _ref2,
|
|
7829
|
+
_ref2$pageNo,
|
|
7830
|
+
pageNo,
|
|
7831
|
+
params,
|
|
7832
|
+
res,
|
|
7833
|
+
data,
|
|
7834
|
+
success,
|
|
7835
|
+
newList,
|
|
7836
|
+
_args = arguments;
|
|
7837
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7838
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7839
|
+
case 0:
|
|
7840
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
|
|
7841
|
+
if (!look) {
|
|
7842
|
+
_context.next = 3;
|
|
7843
|
+
break;
|
|
7844
|
+
}
|
|
7845
|
+
return _context.abrupt("return");
|
|
7846
|
+
case 3:
|
|
7847
|
+
params = {
|
|
7848
|
+
flowNodeId: nodeId,
|
|
7849
|
+
flowTemplateKey: flowTemplateKey === null || flowTemplateKey === void 0 ? void 0 : flowTemplateKey[1],
|
|
7850
|
+
pageNo: pageNo,
|
|
7851
|
+
pageSize: pageSize,
|
|
7852
|
+
templateKey: workOrderTemplateId,
|
|
7853
|
+
needReturnRepeatValue: true,
|
|
7854
|
+
needFilterShopByPermission: needFilterShopByPermission,
|
|
7855
|
+
queryComponents: [{
|
|
7856
|
+
key: 'flowStatus',
|
|
7857
|
+
symbol: 'in',
|
|
7858
|
+
value: flowStatus
|
|
7859
|
+
}]
|
|
7860
|
+
};
|
|
7861
|
+
if (selectKey && inputValue) {
|
|
7862
|
+
params.queryComponents = [{
|
|
7863
|
+
key: 'flowStatus',
|
|
7864
|
+
symbol: 'in',
|
|
7865
|
+
value: flowStatus
|
|
7866
|
+
}, {
|
|
7867
|
+
key: selectKey,
|
|
7868
|
+
symbol: 'in',
|
|
7869
|
+
value: [inputValue]
|
|
7870
|
+
}];
|
|
7871
|
+
}
|
|
7872
|
+
_context.next = 7;
|
|
7873
|
+
return extendRequest('/qy/view/workOrderList', {
|
|
7874
|
+
method: 'post',
|
|
7875
|
+
data: params
|
|
7876
|
+
});
|
|
7877
|
+
case 7:
|
|
7878
|
+
res = _context.sent;
|
|
7879
|
+
data = res.data, success = res.success;
|
|
7880
|
+
if (success) {
|
|
7881
|
+
newList = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
7882
|
+
var params = {};
|
|
7883
|
+
Object.keys(item.jsonMap).forEach(function (key) {
|
|
7884
|
+
if (valueMap[key]) {
|
|
7885
|
+
params[valueMap[key]] = item.jsonMap[key];
|
|
7886
|
+
}
|
|
7887
|
+
});
|
|
7888
|
+
return params;
|
|
7889
|
+
});
|
|
7890
|
+
if (pageNo === 1) {
|
|
7891
|
+
setList(newList);
|
|
7892
|
+
} else {
|
|
7893
|
+
setList([].concat(_toConsumableArray(list), _toConsumableArray(newList)));
|
|
7894
|
+
setHasMore((data === null || data === void 0 ? void 0 : data.list.length) === pageSize);
|
|
7895
|
+
}
|
|
7896
|
+
}
|
|
7897
|
+
case 10:
|
|
7898
|
+
case "end":
|
|
7899
|
+
return _context.stop();
|
|
7900
|
+
}
|
|
7901
|
+
}, _callee);
|
|
7902
|
+
}));
|
|
7903
|
+
return function getWorkOrderList() {
|
|
7904
|
+
return _ref.apply(this, arguments);
|
|
7905
|
+
};
|
|
7906
|
+
}();
|
|
7907
|
+
React.useEffect(function () {
|
|
7908
|
+
setPageNo(1);
|
|
7909
|
+
getWorkOrderList({
|
|
7910
|
+
pageNo: 1
|
|
7911
|
+
});
|
|
7912
|
+
}, []);
|
|
7913
|
+
React.useEffect(function () {
|
|
7914
|
+
getWorkOrderList({
|
|
7915
|
+
pageNo: 1
|
|
7916
|
+
});
|
|
7917
|
+
}, [inputValue]);
|
|
7918
|
+
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
7919
|
+
setOpen(newOpen);
|
|
7920
|
+
};
|
|
7921
|
+
var onChangeInput = React.useCallback(lodash.debounce(function (val) {
|
|
7922
|
+
setInputValue(val);
|
|
7923
|
+
setOpen(true);
|
|
7924
|
+
}, 1000), []);
|
|
7925
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !look && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
7926
|
+
style: {
|
|
7927
|
+
marginBottom: '10px'
|
|
7928
|
+
}
|
|
7929
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
7930
|
+
style: {
|
|
7931
|
+
width: '100px'
|
|
7932
|
+
},
|
|
7933
|
+
options: selectOptions,
|
|
7934
|
+
defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
|
|
7935
|
+
value: selectKey,
|
|
7936
|
+
onChange: setSelectKey
|
|
7937
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
7938
|
+
content: /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7939
|
+
ref: ref,
|
|
7940
|
+
onScrollCapture: onScrollCapture,
|
|
7941
|
+
style: {
|
|
7942
|
+
height: 320,
|
|
7943
|
+
overflowY: 'scroll',
|
|
7944
|
+
overflowX: 'auto'
|
|
7945
|
+
}
|
|
7946
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
7947
|
+
columns: columsSearch,
|
|
7948
|
+
dataSource: list,
|
|
7949
|
+
rowKey: 'index',
|
|
7950
|
+
size: "small",
|
|
7951
|
+
pagination: false,
|
|
7952
|
+
scroll: {
|
|
7953
|
+
x: '100%'
|
|
7954
|
+
},
|
|
7955
|
+
locale: {
|
|
7956
|
+
emptyText: '暂无数据'
|
|
7957
|
+
},
|
|
7958
|
+
onRow: function onRow(record) {
|
|
7959
|
+
return {
|
|
7960
|
+
onClick: function onClick() {
|
|
7961
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, record), {}, {
|
|
7962
|
+
uuid: kmkfUtils.uuid()
|
|
7963
|
+
})]));
|
|
7964
|
+
setOpen(false);
|
|
7965
|
+
}
|
|
7966
|
+
};
|
|
7967
|
+
}
|
|
7968
|
+
})),
|
|
7969
|
+
trigger: "click",
|
|
7970
|
+
placement: "bottom",
|
|
7971
|
+
open: open,
|
|
7972
|
+
onOpenChange: handleOpenChange
|
|
7973
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7974
|
+
allowClear: true,
|
|
7975
|
+
onChange: function onChange(e) {
|
|
7976
|
+
onChangeInput(e.target.value);
|
|
7977
|
+
}
|
|
7978
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
7979
|
+
columns: column,
|
|
7980
|
+
dataSource: value,
|
|
7981
|
+
rowKey: 'uuid',
|
|
7982
|
+
size: "small",
|
|
7983
|
+
pagination: false,
|
|
7984
|
+
scroll: {
|
|
7985
|
+
x: '100%'
|
|
7986
|
+
},
|
|
7987
|
+
locale: {
|
|
7988
|
+
emptyText: '暂无数据'
|
|
7989
|
+
}
|
|
7990
|
+
}));
|
|
7991
|
+
};
|
|
7992
|
+
|
|
7642
7993
|
var BuyerNick = function BuyerNick(props) {
|
|
7643
7994
|
var _props$value = props.value,
|
|
7644
7995
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -7650,19 +8001,21 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
7650
8001
|
var changeValue = function changeValue(e, type) {
|
|
7651
8002
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
|
|
7652
8003
|
};
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
}
|
|
8004
|
+
// useEffect(() => {
|
|
8005
|
+
// //淘宝平台和抖音平台需要展示买家id
|
|
8006
|
+
// const platformList = ['TAOBAO', 'FXG'];
|
|
8007
|
+
// const showBuyerId = (shopList || []).some(
|
|
8008
|
+
// (item) =>
|
|
8009
|
+
// item.shopId == shopId && platformList.includes(item.shopSourceStr),
|
|
8010
|
+
// );
|
|
8011
|
+
// //如果不是淘宝店铺 旺旺id为空
|
|
8012
|
+
// if (!showBuyerId) {
|
|
8013
|
+
// onChange?.({
|
|
8014
|
+
// ...value,
|
|
8015
|
+
// buyerOpenUid: '',
|
|
8016
|
+
// });
|
|
8017
|
+
// }
|
|
8018
|
+
// }, [shopId, shopList]);
|
|
7666
8019
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7667
8020
|
disabled: disabled,
|
|
7668
8021
|
placeholder: "\u8BF7\u8F93\u5165\u4E70\u5BB6\u6635\u79F0",
|
|
@@ -7923,18 +8276,6 @@ var AliPay = function AliPay(props) {
|
|
|
7923
8276
|
})));
|
|
7924
8277
|
};
|
|
7925
8278
|
|
|
7926
|
-
/*
|
|
7927
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7928
|
-
* @Date: 2022-09-13 11:06:09
|
|
7929
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7930
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
7931
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7932
|
-
* @Description:
|
|
7933
|
-
*
|
|
7934
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7935
|
-
*/
|
|
7936
|
-
var extendRequest = request.extend({});
|
|
7937
|
-
|
|
7938
8279
|
var css_248z$5 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
7939
8280
|
styleInject(css_248z$5);
|
|
7940
8281
|
|
|
@@ -10483,6 +10824,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
10483
10824
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10484
10825
|
changeOrderInfo[type] = val;
|
|
10485
10826
|
changeOrderInfo['sendId'] = option.value;
|
|
10827
|
+
if (platformType === 'wdt' && type === 'sendName') {
|
|
10828
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10829
|
+
}
|
|
10486
10830
|
var newList = _toConsumableArray(value);
|
|
10487
10831
|
newList[changeIndex] = changeOrderInfo;
|
|
10488
10832
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -11767,7 +12111,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11767
12111
|
width: 70
|
|
11768
12112
|
},
|
|
11769
12113
|
value: val,
|
|
11770
|
-
min:
|
|
12114
|
+
min: 1,
|
|
11771
12115
|
precision: 0,
|
|
11772
12116
|
onChange: function onChange(num) {
|
|
11773
12117
|
return updateHandle(num, index, 'num');
|
|
@@ -12139,7 +12483,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12139
12483
|
width: 70
|
|
12140
12484
|
},
|
|
12141
12485
|
value: val,
|
|
12142
|
-
min:
|
|
12486
|
+
min: 1,
|
|
12143
12487
|
precision: 0,
|
|
12144
12488
|
onChange: function onChange(num) {
|
|
12145
12489
|
return updateHandle(num, index, 'number');
|
|
@@ -12931,9 +13275,11 @@ var index$1 = (function (props) {
|
|
|
12931
13275
|
_onChange = props.onChange,
|
|
12932
13276
|
disabled = props.disabled,
|
|
12933
13277
|
type = props.type;
|
|
13278
|
+
var onceRef = React.useRef(false);
|
|
12934
13279
|
React.useEffect(function () {
|
|
12935
13280
|
var _value$orders, _value$showOrderInfo;
|
|
12936
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
13281
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
|
|
13282
|
+
onceRef.current = true;
|
|
12937
13283
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12938
13284
|
getOrderList(value.orderNo);
|
|
12939
13285
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12942,7 +13288,7 @@ var index$1 = (function (props) {
|
|
|
12942
13288
|
getWdtOrderList(value.orderNo);
|
|
12943
13289
|
}
|
|
12944
13290
|
}
|
|
12945
|
-
}, [value
|
|
13291
|
+
}, [value, type]);
|
|
12946
13292
|
var columns = React.useMemo(function () {
|
|
12947
13293
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12948
13294
|
return [{
|
|
@@ -12985,7 +13331,8 @@ var index$1 = (function (props) {
|
|
|
12985
13331
|
})
|
|
12986
13332
|
}));
|
|
12987
13333
|
}
|
|
12988
|
-
|
|
13334
|
+
onceRef.current = false;
|
|
13335
|
+
case 7:
|
|
12989
13336
|
case "end":
|
|
12990
13337
|
return _context.stop();
|
|
12991
13338
|
}
|
|
@@ -13030,7 +13377,8 @@ var index$1 = (function (props) {
|
|
|
13030
13377
|
})
|
|
13031
13378
|
}));
|
|
13032
13379
|
}
|
|
13033
|
-
|
|
13380
|
+
onceRef.current = false;
|
|
13381
|
+
case 7:
|
|
13034
13382
|
case "end":
|
|
13035
13383
|
return _context2.stop();
|
|
13036
13384
|
}
|
|
@@ -13085,7 +13433,8 @@ var index$1 = (function (props) {
|
|
|
13085
13433
|
})
|
|
13086
13434
|
}));
|
|
13087
13435
|
}
|
|
13088
|
-
|
|
13436
|
+
onceRef.current = false;
|
|
13437
|
+
case 7:
|
|
13089
13438
|
case "end":
|
|
13090
13439
|
return _context3.stop();
|
|
13091
13440
|
}
|
|
@@ -13752,9 +14101,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13752
14101
|
var _typeMap$type25;
|
|
13753
14102
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13754
14103
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13755
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13756
|
-
gutter: 8
|
|
13757
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
14104
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, null, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13758
14105
|
className: "gutter-row",
|
|
13759
14106
|
xs: {
|
|
13760
14107
|
span: 11
|
|
@@ -13786,6 +14133,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13786
14133
|
},
|
|
13787
14134
|
md: {
|
|
13788
14135
|
span: 6
|
|
14136
|
+
},
|
|
14137
|
+
style: {
|
|
14138
|
+
marginLeft: '8px'
|
|
13789
14139
|
}
|
|
13790
14140
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13791
14141
|
style: {
|
|
@@ -14632,6 +14982,7 @@ exports.Remark = RemarkInput;
|
|
|
14632
14982
|
exports.ReturnLogistics = ExpressLogistics;
|
|
14633
14983
|
exports.ShopName = ShopNameSelect;
|
|
14634
14984
|
exports.Status = Status;
|
|
14985
|
+
exports.SubForm = SubForm;
|
|
14635
14986
|
exports.Supplier = Supplier;
|
|
14636
14987
|
exports.TBGoodId = TBGoodId;
|
|
14637
14988
|
exports.TBGoodSerial = TBGoodSerial;
|
|
@@ -3,6 +3,7 @@ import { InputProps } from 'antd';
|
|
|
3
3
|
export interface ApaasInputProps extends InputProps {
|
|
4
4
|
isNumber?: boolean;
|
|
5
5
|
replaceWarn?: boolean;
|
|
6
|
+
precision?: 'limit' | number | undefined;
|
|
6
7
|
}
|
|
7
8
|
declare function ApaasInput(props: ApaasInputProps): React.JSX.Element;
|
|
8
9
|
export default ApaasInput;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type subConfigType = {
|
|
3
|
+
name: string;
|
|
4
|
+
key: string;
|
|
5
|
+
workOrderComponentType: string;
|
|
6
|
+
isShow: boolean;
|
|
7
|
+
isEdit: boolean;
|
|
8
|
+
isRequired: boolean;
|
|
9
|
+
isNumber: boolean;
|
|
10
|
+
precision: string | number;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
type SubFormProps = {
|
|
14
|
+
value: any;
|
|
15
|
+
onChange: (val: any) => void;
|
|
16
|
+
needFilterShopByPermission: boolean;
|
|
17
|
+
subConfig: {
|
|
18
|
+
config: subConfigType[];
|
|
19
|
+
flowStatus: Array<string>;
|
|
20
|
+
flowTemplateKey: Array<any>;
|
|
21
|
+
nodeId: string;
|
|
22
|
+
workOrderTemplateId: string;
|
|
23
|
+
};
|
|
24
|
+
look: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare const SubForm: (props: SubFormProps) => React.JSX.Element;
|
|
27
|
+
export default SubForm;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as ApaasAddress } from './apaas/ApaasAddress';
|
|
|
16
16
|
export { default as ApaasPosting } from './apaas/ApaasPosting';
|
|
17
17
|
export { default as ApaasLogistics } from './apaas/ApaasLogistics';
|
|
18
18
|
export { default as ApaasHoc } from './apaas/hoc/withFormItem';
|
|
19
|
+
export { default as SubForm } from './apaas/SubForm';
|
|
19
20
|
export { default as BuyerNick } from './business/BuyerNick';
|
|
20
21
|
export { default as TradeId } from './business/TradeId';
|
|
21
22
|
export { default as ShopName } from './business/ShopName';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "1.0.10-beta.
|
|
3
|
+
"version": "1.0.10-beta.16",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "8ae15fe2d1ec963b5da2602cf4ffd08d902bda6a"
|
|
69
69
|
}
|