kts-components-document-access-point 1.1.29 → 1.2.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/index.esm.js +78 -75
- package/dist/index.js +78 -75
- package/package.json +1 -1
- package/src/DocumentWhiteList/control/actions/didilist/index.ts +0 -1
- package/src/DocumentWhiteList/ui/clientmodal/index.tsx +1 -1
- package/src/DocumentWhiteList/ui/main/black.tsx +2 -2
- package/src/DocumentWhiteList/ui/main/white.tsx +2 -2
- package/src/DocumentWhiteList/ui/pageheader/BlackHeader.tsx +3 -3
- package/src/DocumentWhiteList/ui/pageheader/WhiteHeader.tsx +2 -2
- package/src/DocumentsCont/___demo___/base/index.tsx +1 -1
- package/src/DocumentsList/ui/sendlist/index.tsx +2 -2
- package/src/DocumentsRule/ui/main/index.tsx +48 -29
package/dist/index.esm.js
CHANGED
|
@@ -3830,11 +3830,11 @@ function validaterule$1(props) {
|
|
|
3830
3830
|
dataIndex: 'effectStatus',
|
|
3831
3831
|
render: function render(text) {
|
|
3832
3832
|
if (text === 0) {
|
|
3833
|
-
return /*#__PURE__*/React.createElement("span", null, "\
|
|
3833
|
+
return /*#__PURE__*/React.createElement("span", null, "\u5DF2\u5931\u6548");
|
|
3834
3834
|
}
|
|
3835
3835
|
|
|
3836
3836
|
if (text === 1) {
|
|
3837
|
-
return /*#__PURE__*/React.createElement("span", null, "\
|
|
3837
|
+
return /*#__PURE__*/React.createElement("span", null, "\u4F7F\u7528\u4E2D");
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
3840
|
}, {
|
|
@@ -4511,6 +4511,7 @@ var Controller = /*#__PURE__*/function (_GreyReactBox) {
|
|
|
4511
4511
|
return Controller;
|
|
4512
4512
|
}(GreyReactBox);
|
|
4513
4513
|
|
|
4514
|
+
var confirm = Modal.confirm;
|
|
4514
4515
|
function Rule(props) {
|
|
4515
4516
|
var controller = DocumentsRule.useController();
|
|
4516
4517
|
|
|
@@ -4551,17 +4552,14 @@ function Rule(props) {
|
|
|
4551
4552
|
var _useState13 = useState([]),
|
|
4552
4553
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
4553
4554
|
targetList = _useState14[0],
|
|
4554
|
-
setList = _useState14[1];
|
|
4555
|
+
setList = _useState14[1]; // const [status, setStatus] = useState(0);
|
|
4556
|
+
// const [first, setFirst] = useState(true);
|
|
4555
4557
|
|
|
4556
|
-
var _useState15 = useState(0),
|
|
4557
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
4558
|
-
status = _useState16[0],
|
|
4559
|
-
setStatus = _useState16[1];
|
|
4560
4558
|
|
|
4561
|
-
var
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4559
|
+
var _useState15 = useState(false),
|
|
4560
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
4561
|
+
hasChange = _useState16[0],
|
|
4562
|
+
setChange = _useState16[1];
|
|
4565
4563
|
|
|
4566
4564
|
var history = useHistory();
|
|
4567
4565
|
var search = history.location.search && qs.parse(history.location.search);
|
|
@@ -4737,73 +4735,85 @@ function Rule(props) {
|
|
|
4737
4735
|
var handleCancel = useCallback(function () {
|
|
4738
4736
|
setVisible(false);
|
|
4739
4737
|
}, []);
|
|
4740
|
-
var autoSave = useCallback(
|
|
4738
|
+
var autoSave = useCallback(function () {
|
|
4741
4739
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
4742
4740
|
var data, formValue, res;
|
|
4743
4741
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
4744
4742
|
while (1) {
|
|
4745
4743
|
switch (_context4.prev = _context4.next) {
|
|
4746
4744
|
case 0:
|
|
4745
|
+
// let url = '/schema/config/save';
|
|
4747
4746
|
data = _objectSpread2({}, schema);
|
|
4748
4747
|
formValue = form.getFieldsValue();
|
|
4749
4748
|
|
|
4750
4749
|
if (!(record && record.id)) {
|
|
4751
|
-
_context4.next =
|
|
4750
|
+
_context4.next = 9;
|
|
4752
4751
|
break;
|
|
4753
4752
|
}
|
|
4753
|
+
|
|
4754
|
+
// url = '/schema/config/update';
|
|
4754
4755
|
data = _objectSpread2(_objectSpread2({}, record), {}, {
|
|
4755
4756
|
schemaContent: JSON.stringify(data)
|
|
4756
4757
|
}, formValue);
|
|
4757
|
-
_context4.next =
|
|
4758
|
+
_context4.next = 6;
|
|
4758
4759
|
return controller.configupdate(data);
|
|
4759
4760
|
|
|
4760
|
-
case
|
|
4761
|
+
case 6:
|
|
4761
4762
|
res = _context4.sent;
|
|
4762
|
-
_context4.next =
|
|
4763
|
+
_context4.next = 13;
|
|
4763
4764
|
break;
|
|
4764
4765
|
|
|
4765
|
-
case
|
|
4766
|
+
case 9:
|
|
4766
4767
|
data = _objectSpread2({
|
|
4767
4768
|
schemaContent: JSON.stringify(data)
|
|
4768
4769
|
}, formValue);
|
|
4769
|
-
_context4.next =
|
|
4770
|
+
_context4.next = 12;
|
|
4770
4771
|
return controller.configsave(data);
|
|
4771
4772
|
|
|
4772
|
-
case
|
|
4773
|
+
case 12:
|
|
4773
4774
|
res = _context4.sent;
|
|
4774
4775
|
|
|
4775
|
-
case
|
|
4776
|
+
case 13:
|
|
4776
4777
|
if (!res.err) {
|
|
4777
|
-
_context4.next =
|
|
4778
|
+
_context4.next = 17;
|
|
4778
4779
|
break;
|
|
4779
4780
|
}
|
|
4780
4781
|
|
|
4781
4782
|
return _context4.abrupt("return", false);
|
|
4782
4783
|
|
|
4783
|
-
case
|
|
4784
|
+
case 17:
|
|
4784
4785
|
if (res.res) {
|
|
4786
|
+
message$1.success('保存成功');
|
|
4787
|
+
setChange(false);
|
|
4785
4788
|
setRecord(res.res);
|
|
4786
4789
|
}
|
|
4787
4790
|
|
|
4788
|
-
case
|
|
4791
|
+
case 18:
|
|
4789
4792
|
case "end":
|
|
4790
4793
|
return _context4.stop();
|
|
4791
4794
|
}
|
|
4792
4795
|
}
|
|
4793
4796
|
}, _callee4);
|
|
4794
4797
|
}))();
|
|
4795
|
-
}
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4798
|
+
}, [record, schema]); // useEffect(() => {
|
|
4799
|
+
// if (status !== 0 && !disabled && first === false) {
|
|
4800
|
+
// autoSave();
|
|
4801
|
+
// }
|
|
4802
|
+
// }, [schema, status, first])
|
|
4803
|
+
// const onFinish = useCallback(() => {
|
|
4804
|
+
// setStatus(new Date().getTime());
|
|
4805
|
+
// }, []);
|
|
4806
|
+
// const onFinishFailed = useCallback(() => {
|
|
4807
|
+
// setStatus(0);
|
|
4808
|
+
// }, []);
|
|
4809
|
+
|
|
4810
|
+
/**
|
|
4811
|
+
* 手动保存
|
|
4812
|
+
*/
|
|
4813
|
+
|
|
4814
|
+
var onSave = useCallback(function () {
|
|
4815
|
+
autoSave();
|
|
4816
|
+
}, [record, schema]);
|
|
4807
4817
|
var onSendCheck = useCallback(function () {
|
|
4808
4818
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
4809
4819
|
var res;
|
|
@@ -4874,12 +4884,22 @@ function Rule(props) {
|
|
|
4874
4884
|
};
|
|
4875
4885
|
}, []);
|
|
4876
4886
|
var updateSchema = useCallback(function (e) {
|
|
4877
|
-
setFirst(false);
|
|
4887
|
+
// setFirst(false);
|
|
4878
4888
|
setSchema(e);
|
|
4879
|
-
|
|
4880
|
-
form.submit();
|
|
4881
|
-
});
|
|
4889
|
+
setChange(true);
|
|
4882
4890
|
}, []);
|
|
4891
|
+
var onQuit = useCallback(function () {
|
|
4892
|
+
if (hasChange) {
|
|
4893
|
+
confirm({
|
|
4894
|
+
title: '您当前有内容未保存,是否退出?',
|
|
4895
|
+
onOk: function onOk() {
|
|
4896
|
+
history.goBack();
|
|
4897
|
+
}
|
|
4898
|
+
});
|
|
4899
|
+
} else {
|
|
4900
|
+
history.goBack();
|
|
4901
|
+
}
|
|
4902
|
+
}, [hasChange]);
|
|
4883
4903
|
return /*#__PURE__*/React.createElement("div", {
|
|
4884
4904
|
style: {
|
|
4885
4905
|
height: '100%',
|
|
@@ -4897,6 +4917,12 @@ function Rule(props) {
|
|
|
4897
4917
|
},
|
|
4898
4918
|
title: "\u914D\u7F6E",
|
|
4899
4919
|
extra: [/*#__PURE__*/React.createElement(Button$1, {
|
|
4920
|
+
key: "2",
|
|
4921
|
+
style: {
|
|
4922
|
+
display: type === 'record' ? 'none' : ''
|
|
4923
|
+
},
|
|
4924
|
+
onClick: onSave
|
|
4925
|
+
}, "\u4FDD\u5B58"), /*#__PURE__*/React.createElement(Button$1, {
|
|
4900
4926
|
key: "3",
|
|
4901
4927
|
style: {
|
|
4902
4928
|
display: type === 'record' ? 'none' : ''
|
|
@@ -4905,9 +4931,7 @@ function Rule(props) {
|
|
|
4905
4931
|
}, "\u53D1\u9001"), /*#__PURE__*/React.createElement(Button$1, {
|
|
4906
4932
|
key: "1",
|
|
4907
4933
|
type: "primary",
|
|
4908
|
-
onClick:
|
|
4909
|
-
history.goBack();
|
|
4910
|
-
}
|
|
4934
|
+
onClick: onQuit
|
|
4911
4935
|
}, "\u9000\u51FA")]
|
|
4912
4936
|
})), /*#__PURE__*/React.createElement(Card, {
|
|
4913
4937
|
style: {
|
|
@@ -4926,13 +4950,11 @@ function Rule(props) {
|
|
|
4926
4950
|
},
|
|
4927
4951
|
name: "basic",
|
|
4928
4952
|
form: form,
|
|
4929
|
-
|
|
4930
|
-
|
|
4953
|
+
// onFinish={onFinish}
|
|
4954
|
+
// onFinishFailed={onFinishFailed}
|
|
4931
4955
|
onValuesChange: function onValuesChange() {
|
|
4932
|
-
setFirst(false);
|
|
4933
|
-
|
|
4934
|
-
form.submit();
|
|
4935
|
-
});
|
|
4956
|
+
// setFirst(false);
|
|
4957
|
+
setChange(true);
|
|
4936
4958
|
},
|
|
4937
4959
|
labelCol: {
|
|
4938
4960
|
span: 8
|
|
@@ -4974,7 +4996,7 @@ function Rule(props) {
|
|
|
4974
4996
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
4975
4997
|
span: 8
|
|
4976
4998
|
}, /*#__PURE__*/React.createElement(Form$1.Item, {
|
|
4977
|
-
label: "\
|
|
4999
|
+
label: "\u6211\u7684\u6536\u53D1\u89D2\u8272",
|
|
4978
5000
|
name: "attribution",
|
|
4979
5001
|
rules: [{
|
|
4980
5002
|
required: true,
|
|
@@ -5035,24 +5057,6 @@ function Rule(props) {
|
|
|
5035
5057
|
}))));
|
|
5036
5058
|
}
|
|
5037
5059
|
|
|
5038
|
-
var throttle = function throttle(fn) {
|
|
5039
|
-
var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
5040
|
-
|
|
5041
|
-
var _timer;
|
|
5042
|
-
|
|
5043
|
-
return function () {
|
|
5044
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5045
|
-
args[_key] = arguments[_key];
|
|
5046
|
-
}
|
|
5047
|
-
|
|
5048
|
-
clearTimeout(_timer);
|
|
5049
|
-
_timer = setTimeout(function () {
|
|
5050
|
-
_timer = null;
|
|
5051
|
-
return fn.apply(null, args);
|
|
5052
|
-
}, interval);
|
|
5053
|
-
};
|
|
5054
|
-
};
|
|
5055
|
-
|
|
5056
5060
|
var DocumentsListContext$1 = /*#__PURE__*/createContext(null);
|
|
5057
5061
|
/**
|
|
5058
5062
|
* 单据校验规则
|
|
@@ -5700,7 +5704,6 @@ var didList = /*#__PURE__*/(function () {
|
|
|
5700
5704
|
case 5:
|
|
5701
5705
|
if (res.res) {
|
|
5702
5706
|
s.didlist = res.res;
|
|
5703
|
-
console.log(s.didlist);
|
|
5704
5707
|
}
|
|
5705
5708
|
|
|
5706
5709
|
case 6:
|
|
@@ -5812,7 +5815,7 @@ var Header = (function () {
|
|
|
5812
5815
|
useEffect(function () {
|
|
5813
5816
|
var didEnum = didlist.map(function (item) {
|
|
5814
5817
|
return {
|
|
5815
|
-
label: item.remarkName + item.participantId,
|
|
5818
|
+
label: item.remarkName + ':' + item.participantId,
|
|
5816
5819
|
value: item.participantId
|
|
5817
5820
|
};
|
|
5818
5821
|
});
|
|
@@ -6031,7 +6034,7 @@ function Rule$1(props) {
|
|
|
6031
6034
|
dataIndex: 'customerDid'
|
|
6032
6035
|
}, {
|
|
6033
6036
|
title: '所属公司',
|
|
6034
|
-
dataIndex: '
|
|
6037
|
+
dataIndex: 'customerName'
|
|
6035
6038
|
}, {
|
|
6036
6039
|
title: '本条数据状态',
|
|
6037
6040
|
dataIndex: 'dataStatus',
|
|
@@ -6043,7 +6046,7 @@ function Rule$1(props) {
|
|
|
6043
6046
|
dataIndex: 'companyDid',
|
|
6044
6047
|
render: function render(text, record) {
|
|
6045
6048
|
if (text) {
|
|
6046
|
-
return /*#__PURE__*/React.createElement("span", null, record.
|
|
6049
|
+
return /*#__PURE__*/React.createElement("span", null, record.customerDidNote, ":", text);
|
|
6047
6050
|
} else {
|
|
6048
6051
|
return '';
|
|
6049
6052
|
}
|
|
@@ -6247,7 +6250,7 @@ var Header$1 = (function () {
|
|
|
6247
6250
|
useEffect(function () {
|
|
6248
6251
|
var didEnum = didlist.map(function (item) {
|
|
6249
6252
|
return {
|
|
6250
|
-
label: item.remarkName + item.participantId,
|
|
6253
|
+
label: item.remarkName + ':' + item.participantId,
|
|
6251
6254
|
value: item.participantId
|
|
6252
6255
|
};
|
|
6253
6256
|
});
|
|
@@ -6463,7 +6466,7 @@ function Rule$2(props) {
|
|
|
6463
6466
|
dataIndex: 'customerDid'
|
|
6464
6467
|
}, {
|
|
6465
6468
|
title: '所属公司',
|
|
6466
|
-
dataIndex: '
|
|
6469
|
+
dataIndex: 'customerName'
|
|
6467
6470
|
}, {
|
|
6468
6471
|
title: '本条数据状态',
|
|
6469
6472
|
dataIndex: 'dataStatus',
|
|
@@ -6475,7 +6478,7 @@ function Rule$2(props) {
|
|
|
6475
6478
|
dataIndex: 'companyDid',
|
|
6476
6479
|
render: function render(text, record) {
|
|
6477
6480
|
if (text) {
|
|
6478
|
-
return /*#__PURE__*/React.createElement("span", null, record.
|
|
6481
|
+
return /*#__PURE__*/React.createElement("span", null, record.customerDidNote, ":", text);
|
|
6479
6482
|
} else {
|
|
6480
6483
|
return '';
|
|
6481
6484
|
}
|
|
@@ -7195,7 +7198,7 @@ function modalcomfirm$2(props) {
|
|
|
7195
7198
|
var schema = useMemo(function () {
|
|
7196
7199
|
var didEnum = didlist.map(function (item) {
|
|
7197
7200
|
return {
|
|
7198
|
-
label: item.remarkName + item.participantId,
|
|
7201
|
+
label: item.remarkName + ':' + item.participantId,
|
|
7199
7202
|
value: item.participantId
|
|
7200
7203
|
};
|
|
7201
7204
|
});
|
package/dist/index.js
CHANGED
|
@@ -3844,11 +3844,11 @@ function validaterule$1(props) {
|
|
|
3844
3844
|
dataIndex: 'effectStatus',
|
|
3845
3845
|
render: function render(text) {
|
|
3846
3846
|
if (text === 0) {
|
|
3847
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, "\
|
|
3847
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u5931\u6548");
|
|
3848
3848
|
}
|
|
3849
3849
|
|
|
3850
3850
|
if (text === 1) {
|
|
3851
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, "\
|
|
3851
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, "\u4F7F\u7528\u4E2D");
|
|
3852
3852
|
}
|
|
3853
3853
|
}
|
|
3854
3854
|
}, {
|
|
@@ -4525,6 +4525,7 @@ var Controller = /*#__PURE__*/function (_GreyReactBox) {
|
|
|
4525
4525
|
return Controller;
|
|
4526
4526
|
}(GreyReactBox__default['default']);
|
|
4527
4527
|
|
|
4528
|
+
var confirm = ktsXui.Modal.confirm;
|
|
4528
4529
|
function Rule(props) {
|
|
4529
4530
|
var controller = DocumentsRule.useController();
|
|
4530
4531
|
|
|
@@ -4565,17 +4566,14 @@ function Rule(props) {
|
|
|
4565
4566
|
var _useState13 = React.useState([]),
|
|
4566
4567
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
4567
4568
|
targetList = _useState14[0],
|
|
4568
|
-
setList = _useState14[1];
|
|
4569
|
+
setList = _useState14[1]; // const [status, setStatus] = useState(0);
|
|
4570
|
+
// const [first, setFirst] = useState(true);
|
|
4569
4571
|
|
|
4570
|
-
var _useState15 = React.useState(0),
|
|
4571
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
4572
|
-
status = _useState16[0],
|
|
4573
|
-
setStatus = _useState16[1];
|
|
4574
4572
|
|
|
4575
|
-
var
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4573
|
+
var _useState15 = React.useState(false),
|
|
4574
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
4575
|
+
hasChange = _useState16[0],
|
|
4576
|
+
setChange = _useState16[1];
|
|
4579
4577
|
|
|
4580
4578
|
var history = reactRouterDom.useHistory();
|
|
4581
4579
|
var search = history.location.search && qs__default['default'].parse(history.location.search);
|
|
@@ -4751,73 +4749,85 @@ function Rule(props) {
|
|
|
4751
4749
|
var handleCancel = React.useCallback(function () {
|
|
4752
4750
|
setVisible(false);
|
|
4753
4751
|
}, []);
|
|
4754
|
-
var autoSave = React.useCallback(
|
|
4752
|
+
var autoSave = React.useCallback(function () {
|
|
4755
4753
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
4756
4754
|
var data, formValue, res;
|
|
4757
4755
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
4758
4756
|
while (1) {
|
|
4759
4757
|
switch (_context4.prev = _context4.next) {
|
|
4760
4758
|
case 0:
|
|
4759
|
+
// let url = '/schema/config/save';
|
|
4761
4760
|
data = _objectSpread2({}, schema);
|
|
4762
4761
|
formValue = form.getFieldsValue();
|
|
4763
4762
|
|
|
4764
4763
|
if (!(record && record.id)) {
|
|
4765
|
-
_context4.next =
|
|
4764
|
+
_context4.next = 9;
|
|
4766
4765
|
break;
|
|
4767
4766
|
}
|
|
4767
|
+
|
|
4768
|
+
// url = '/schema/config/update';
|
|
4768
4769
|
data = _objectSpread2(_objectSpread2({}, record), {}, {
|
|
4769
4770
|
schemaContent: JSON.stringify(data)
|
|
4770
4771
|
}, formValue);
|
|
4771
|
-
_context4.next =
|
|
4772
|
+
_context4.next = 6;
|
|
4772
4773
|
return controller.configupdate(data);
|
|
4773
4774
|
|
|
4774
|
-
case
|
|
4775
|
+
case 6:
|
|
4775
4776
|
res = _context4.sent;
|
|
4776
|
-
_context4.next =
|
|
4777
|
+
_context4.next = 13;
|
|
4777
4778
|
break;
|
|
4778
4779
|
|
|
4779
|
-
case
|
|
4780
|
+
case 9:
|
|
4780
4781
|
data = _objectSpread2({
|
|
4781
4782
|
schemaContent: JSON.stringify(data)
|
|
4782
4783
|
}, formValue);
|
|
4783
|
-
_context4.next =
|
|
4784
|
+
_context4.next = 12;
|
|
4784
4785
|
return controller.configsave(data);
|
|
4785
4786
|
|
|
4786
|
-
case
|
|
4787
|
+
case 12:
|
|
4787
4788
|
res = _context4.sent;
|
|
4788
4789
|
|
|
4789
|
-
case
|
|
4790
|
+
case 13:
|
|
4790
4791
|
if (!res.err) {
|
|
4791
|
-
_context4.next =
|
|
4792
|
+
_context4.next = 17;
|
|
4792
4793
|
break;
|
|
4793
4794
|
}
|
|
4794
4795
|
|
|
4795
4796
|
return _context4.abrupt("return", false);
|
|
4796
4797
|
|
|
4797
|
-
case
|
|
4798
|
+
case 17:
|
|
4798
4799
|
if (res.res) {
|
|
4800
|
+
ktsXui.message.success('保存成功');
|
|
4801
|
+
setChange(false);
|
|
4799
4802
|
setRecord(res.res);
|
|
4800
4803
|
}
|
|
4801
4804
|
|
|
4802
|
-
case
|
|
4805
|
+
case 18:
|
|
4803
4806
|
case "end":
|
|
4804
4807
|
return _context4.stop();
|
|
4805
4808
|
}
|
|
4806
4809
|
}
|
|
4807
4810
|
}, _callee4);
|
|
4808
4811
|
}))();
|
|
4809
|
-
}
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4812
|
+
}, [record, schema]); // useEffect(() => {
|
|
4813
|
+
// if (status !== 0 && !disabled && first === false) {
|
|
4814
|
+
// autoSave();
|
|
4815
|
+
// }
|
|
4816
|
+
// }, [schema, status, first])
|
|
4817
|
+
// const onFinish = useCallback(() => {
|
|
4818
|
+
// setStatus(new Date().getTime());
|
|
4819
|
+
// }, []);
|
|
4820
|
+
// const onFinishFailed = useCallback(() => {
|
|
4821
|
+
// setStatus(0);
|
|
4822
|
+
// }, []);
|
|
4823
|
+
|
|
4824
|
+
/**
|
|
4825
|
+
* 手动保存
|
|
4826
|
+
*/
|
|
4827
|
+
|
|
4828
|
+
var onSave = React.useCallback(function () {
|
|
4829
|
+
autoSave();
|
|
4830
|
+
}, [record, schema]);
|
|
4821
4831
|
var onSendCheck = React.useCallback(function () {
|
|
4822
4832
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
4823
4833
|
var res;
|
|
@@ -4888,12 +4898,22 @@ function Rule(props) {
|
|
|
4888
4898
|
};
|
|
4889
4899
|
}, []);
|
|
4890
4900
|
var updateSchema = React.useCallback(function (e) {
|
|
4891
|
-
setFirst(false);
|
|
4901
|
+
// setFirst(false);
|
|
4892
4902
|
setSchema(e);
|
|
4893
|
-
|
|
4894
|
-
form.submit();
|
|
4895
|
-
});
|
|
4903
|
+
setChange(true);
|
|
4896
4904
|
}, []);
|
|
4905
|
+
var onQuit = React.useCallback(function () {
|
|
4906
|
+
if (hasChange) {
|
|
4907
|
+
confirm({
|
|
4908
|
+
title: '您当前有内容未保存,是否退出?',
|
|
4909
|
+
onOk: function onOk() {
|
|
4910
|
+
history.goBack();
|
|
4911
|
+
}
|
|
4912
|
+
});
|
|
4913
|
+
} else {
|
|
4914
|
+
history.goBack();
|
|
4915
|
+
}
|
|
4916
|
+
}, [hasChange]);
|
|
4897
4917
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4898
4918
|
style: {
|
|
4899
4919
|
height: '100%',
|
|
@@ -4911,6 +4931,12 @@ function Rule(props) {
|
|
|
4911
4931
|
},
|
|
4912
4932
|
title: "\u914D\u7F6E",
|
|
4913
4933
|
extra: [/*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
4934
|
+
key: "2",
|
|
4935
|
+
style: {
|
|
4936
|
+
display: type === 'record' ? 'none' : ''
|
|
4937
|
+
},
|
|
4938
|
+
onClick: onSave
|
|
4939
|
+
}, "\u4FDD\u5B58"), /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
4914
4940
|
key: "3",
|
|
4915
4941
|
style: {
|
|
4916
4942
|
display: type === 'record' ? 'none' : ''
|
|
@@ -4919,9 +4945,7 @@ function Rule(props) {
|
|
|
4919
4945
|
}, "\u53D1\u9001"), /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
4920
4946
|
key: "1",
|
|
4921
4947
|
type: "primary",
|
|
4922
|
-
onClick:
|
|
4923
|
-
history.goBack();
|
|
4924
|
-
}
|
|
4948
|
+
onClick: onQuit
|
|
4925
4949
|
}, "\u9000\u51FA")]
|
|
4926
4950
|
})), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Card, {
|
|
4927
4951
|
style: {
|
|
@@ -4940,13 +4964,11 @@ function Rule(props) {
|
|
|
4940
4964
|
},
|
|
4941
4965
|
name: "basic",
|
|
4942
4966
|
form: form,
|
|
4943
|
-
|
|
4944
|
-
|
|
4967
|
+
// onFinish={onFinish}
|
|
4968
|
+
// onFinishFailed={onFinishFailed}
|
|
4945
4969
|
onValuesChange: function onValuesChange() {
|
|
4946
|
-
setFirst(false);
|
|
4947
|
-
|
|
4948
|
-
form.submit();
|
|
4949
|
-
});
|
|
4970
|
+
// setFirst(false);
|
|
4971
|
+
setChange(true);
|
|
4950
4972
|
},
|
|
4951
4973
|
labelCol: {
|
|
4952
4974
|
span: 8
|
|
@@ -4988,7 +5010,7 @@ function Rule(props) {
|
|
|
4988
5010
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
4989
5011
|
span: 8
|
|
4990
5012
|
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.Form.Item, {
|
|
4991
|
-
label: "\
|
|
5013
|
+
label: "\u6211\u7684\u6536\u53D1\u89D2\u8272",
|
|
4992
5014
|
name: "attribution",
|
|
4993
5015
|
rules: [{
|
|
4994
5016
|
required: true,
|
|
@@ -5049,24 +5071,6 @@ function Rule(props) {
|
|
|
5049
5071
|
}))));
|
|
5050
5072
|
}
|
|
5051
5073
|
|
|
5052
|
-
var throttle = function throttle(fn) {
|
|
5053
|
-
var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
5054
|
-
|
|
5055
|
-
var _timer;
|
|
5056
|
-
|
|
5057
|
-
return function () {
|
|
5058
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5059
|
-
args[_key] = arguments[_key];
|
|
5060
|
-
}
|
|
5061
|
-
|
|
5062
|
-
clearTimeout(_timer);
|
|
5063
|
-
_timer = setTimeout(function () {
|
|
5064
|
-
_timer = null;
|
|
5065
|
-
return fn.apply(null, args);
|
|
5066
|
-
}, interval);
|
|
5067
|
-
};
|
|
5068
|
-
};
|
|
5069
|
-
|
|
5070
5074
|
var DocumentsListContext$1 = /*#__PURE__*/React.createContext(null);
|
|
5071
5075
|
/**
|
|
5072
5076
|
* 单据校验规则
|
|
@@ -5714,7 +5718,6 @@ var didList = /*#__PURE__*/(function () {
|
|
|
5714
5718
|
case 5:
|
|
5715
5719
|
if (res.res) {
|
|
5716
5720
|
s.didlist = res.res;
|
|
5717
|
-
console.log(s.didlist);
|
|
5718
5721
|
}
|
|
5719
5722
|
|
|
5720
5723
|
case 6:
|
|
@@ -5826,7 +5829,7 @@ var Header = (function () {
|
|
|
5826
5829
|
React.useEffect(function () {
|
|
5827
5830
|
var didEnum = didlist.map(function (item) {
|
|
5828
5831
|
return {
|
|
5829
|
-
label: item.remarkName + item.participantId,
|
|
5832
|
+
label: item.remarkName + ':' + item.participantId,
|
|
5830
5833
|
value: item.participantId
|
|
5831
5834
|
};
|
|
5832
5835
|
});
|
|
@@ -6045,7 +6048,7 @@ function Rule$1(props) {
|
|
|
6045
6048
|
dataIndex: 'customerDid'
|
|
6046
6049
|
}, {
|
|
6047
6050
|
title: '所属公司',
|
|
6048
|
-
dataIndex: '
|
|
6051
|
+
dataIndex: 'customerName'
|
|
6049
6052
|
}, {
|
|
6050
6053
|
title: '本条数据状态',
|
|
6051
6054
|
dataIndex: 'dataStatus',
|
|
@@ -6057,7 +6060,7 @@ function Rule$1(props) {
|
|
|
6057
6060
|
dataIndex: 'companyDid',
|
|
6058
6061
|
render: function render(text, record) {
|
|
6059
6062
|
if (text) {
|
|
6060
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, record.
|
|
6063
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, record.customerDidNote, ":", text);
|
|
6061
6064
|
} else {
|
|
6062
6065
|
return '';
|
|
6063
6066
|
}
|
|
@@ -6261,7 +6264,7 @@ var Header$1 = (function () {
|
|
|
6261
6264
|
React.useEffect(function () {
|
|
6262
6265
|
var didEnum = didlist.map(function (item) {
|
|
6263
6266
|
return {
|
|
6264
|
-
label: item.remarkName + item.participantId,
|
|
6267
|
+
label: item.remarkName + ':' + item.participantId,
|
|
6265
6268
|
value: item.participantId
|
|
6266
6269
|
};
|
|
6267
6270
|
});
|
|
@@ -6477,7 +6480,7 @@ function Rule$2(props) {
|
|
|
6477
6480
|
dataIndex: 'customerDid'
|
|
6478
6481
|
}, {
|
|
6479
6482
|
title: '所属公司',
|
|
6480
|
-
dataIndex: '
|
|
6483
|
+
dataIndex: 'customerName'
|
|
6481
6484
|
}, {
|
|
6482
6485
|
title: '本条数据状态',
|
|
6483
6486
|
dataIndex: 'dataStatus',
|
|
@@ -6489,7 +6492,7 @@ function Rule$2(props) {
|
|
|
6489
6492
|
dataIndex: 'companyDid',
|
|
6490
6493
|
render: function render(text, record) {
|
|
6491
6494
|
if (text) {
|
|
6492
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, record.
|
|
6495
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, record.customerDidNote, ":", text);
|
|
6493
6496
|
} else {
|
|
6494
6497
|
return '';
|
|
6495
6498
|
}
|
|
@@ -7209,7 +7212,7 @@ function modalcomfirm$2(props) {
|
|
|
7209
7212
|
var schema = React.useMemo(function () {
|
|
7210
7213
|
var didEnum = didlist.map(function (item) {
|
|
7211
7214
|
return {
|
|
7212
|
-
label: item.remarkName + item.participantId,
|
|
7215
|
+
label: item.remarkName + ':' + item.participantId,
|
|
7213
7216
|
value: item.participantId
|
|
7214
7217
|
};
|
|
7215
7218
|
});
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ export default function modalcomfirm(props: any) {
|
|
|
34
34
|
}, []);
|
|
35
35
|
const schema = useMemo(() => {
|
|
36
36
|
const didEnum = didlist.map(item => {
|
|
37
|
-
return { label: item.remarkName + item.participantId, value: item.participantId };
|
|
37
|
+
return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
|
|
38
38
|
})
|
|
39
39
|
return {
|
|
40
40
|
'type': "object",
|
|
@@ -21,7 +21,7 @@ export default function Rule(props: any) {
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
title: '所属公司',
|
|
24
|
-
dataIndex: '
|
|
24
|
+
dataIndex: 'customerName',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
title: '本条数据状态',
|
|
@@ -33,7 +33,7 @@ export default function Rule(props: any) {
|
|
|
33
33
|
dataIndex: 'companyDid',
|
|
34
34
|
render: (text: any, record: any) => {
|
|
35
35
|
if (text) {
|
|
36
|
-
return <span>{record.
|
|
36
|
+
return <span>{record.customerDidNote}:{text}</span>
|
|
37
37
|
} else {
|
|
38
38
|
return ''
|
|
39
39
|
}
|
|
@@ -20,7 +20,7 @@ export default function Rule(props: any) {
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
title: '所属公司',
|
|
23
|
-
dataIndex: '
|
|
23
|
+
dataIndex: 'customerName',
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
title: '本条数据状态',
|
|
@@ -32,7 +32,7 @@ export default function Rule(props: any) {
|
|
|
32
32
|
dataIndex: 'companyDid',
|
|
33
33
|
render: (text: any, record: any) => {
|
|
34
34
|
if (text) {
|
|
35
|
-
return <span>{record.
|
|
35
|
+
return <span>{record.customerDidNote}:{text}</span>
|
|
36
36
|
} else {
|
|
37
37
|
return ''
|
|
38
38
|
}
|
|
@@ -30,7 +30,7 @@ export default () => {
|
|
|
30
30
|
}, []);
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
const didEnum = didlist.map(item => {
|
|
33
|
-
return { label: item.remarkName + item.participantId, value: item.participantId };
|
|
33
|
+
return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
|
|
34
34
|
})
|
|
35
35
|
let obj: any = {
|
|
36
36
|
type: "object",
|
|
@@ -115,12 +115,12 @@ export default () => {
|
|
|
115
115
|
compact={true}
|
|
116
116
|
schema={schema}
|
|
117
117
|
defaultValue={params}
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
>
|
|
120
120
|
</KtsForm>
|
|
121
121
|
</AdvancedSearch>
|
|
122
122
|
);
|
|
123
|
-
}, [schema,params]);
|
|
123
|
+
}, [schema, params]);
|
|
124
124
|
return (
|
|
125
125
|
<div style={{ flex: 'none', position: 'relative', zIndex: 1 }} >
|
|
126
126
|
<PageHeaderFoot
|
|
@@ -29,7 +29,7 @@ export default () => {
|
|
|
29
29
|
}, []);
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
const didEnum = didlist.map(item => {
|
|
32
|
-
return { label: item.remarkName + item.participantId, value: item.participantId };
|
|
32
|
+
return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
|
|
33
33
|
})
|
|
34
34
|
let obj: any = {
|
|
35
35
|
type: "object",
|
|
@@ -118,7 +118,7 @@ export default () => {
|
|
|
118
118
|
</KtsForm>
|
|
119
119
|
</AdvancedSearch>
|
|
120
120
|
);
|
|
121
|
-
}, [schema,whiteParams]);
|
|
121
|
+
}, [schema, whiteParams]);
|
|
122
122
|
return (
|
|
123
123
|
<div style={{ flex: 'none', position: 'relative', zIndex: 1 }} >
|
|
124
124
|
<PageHeaderFoot
|
|
@@ -63,10 +63,10 @@ export default function validaterule(props: any) {
|
|
|
63
63
|
dataIndex: 'effectStatus',
|
|
64
64
|
render: (text: any) => {
|
|
65
65
|
if (text === 0) {
|
|
66
|
-
return <span
|
|
66
|
+
return <span>已失效</span>
|
|
67
67
|
}
|
|
68
68
|
if (text === 1) {
|
|
69
|
-
return <span
|
|
69
|
+
return <span>使用中</span>
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -5,6 +5,7 @@ import { Card, Row, Col, PageHeader } from 'kts-components-antd-x4';
|
|
|
5
5
|
import { useHistory } from 'react-router-dom';
|
|
6
6
|
import qs from 'query-string';
|
|
7
7
|
import Main from '../..';
|
|
8
|
+
const { confirm } = Modal;
|
|
8
9
|
export default function Rule(props: any) {
|
|
9
10
|
const controller = Main.useController();
|
|
10
11
|
const [billEnum, setBill] = useState([]);
|
|
@@ -15,8 +16,9 @@ export default function Rule(props: any) {
|
|
|
15
16
|
const [visible, setVisible] = useState(false);
|
|
16
17
|
const [targetId, setTarget] = useState();
|
|
17
18
|
const [targetList, setList] = useState([]);
|
|
18
|
-
const [status, setStatus] = useState(0);
|
|
19
|
-
const [first, setFirst] = useState(true);
|
|
19
|
+
// const [status, setStatus] = useState(0);
|
|
20
|
+
// const [first, setFirst] = useState(true);
|
|
21
|
+
const [hasChange, setChange] = useState(false);
|
|
20
22
|
const history = useHistory() as any;
|
|
21
23
|
const search = history.location.search && qs.parse(history.location.search);
|
|
22
24
|
const id = search && search.id;
|
|
@@ -92,14 +94,14 @@ export default function Rule(props: any) {
|
|
|
92
94
|
const handleCancel = useCallback(() => {
|
|
93
95
|
setVisible(false);
|
|
94
96
|
}, [])
|
|
95
|
-
const autoSave = useCallback(
|
|
97
|
+
const autoSave = useCallback(() => {
|
|
96
98
|
(async () => {
|
|
97
|
-
let url = '/schema/config/save';
|
|
99
|
+
// let url = '/schema/config/save';
|
|
98
100
|
let data: any = { ...schema };
|
|
99
101
|
const formValue = form.getFieldsValue();
|
|
100
102
|
let res;
|
|
101
103
|
if (record && record.id) {
|
|
102
|
-
url = '/schema/config/update';
|
|
104
|
+
// url = '/schema/config/update';
|
|
103
105
|
data = { ...record, schemaContent: JSON.stringify(data), ...formValue }
|
|
104
106
|
res = await controller.configupdate(data);
|
|
105
107
|
} else {
|
|
@@ -111,22 +113,30 @@ export default function Rule(props: any) {
|
|
|
111
113
|
return false;
|
|
112
114
|
} else {
|
|
113
115
|
if (res.res) {
|
|
116
|
+
message.success('保存成功');
|
|
117
|
+
setChange(false);
|
|
114
118
|
setRecord(res.res);
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
})()
|
|
118
|
-
}
|
|
119
|
-
useEffect(() => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}, [schema, status, first])
|
|
124
|
-
const onFinish = useCallback(() => {
|
|
125
|
-
|
|
126
|
-
}, []);
|
|
127
|
-
const onFinishFailed = useCallback(() => {
|
|
128
|
-
|
|
129
|
-
}, []);
|
|
122
|
+
}, [record,schema]);
|
|
123
|
+
// useEffect(() => {
|
|
124
|
+
// if (status !== 0 && !disabled && first === false) {
|
|
125
|
+
// autoSave();
|
|
126
|
+
// }
|
|
127
|
+
// }, [schema, status, first])
|
|
128
|
+
// const onFinish = useCallback(() => {
|
|
129
|
+
// setStatus(new Date().getTime());
|
|
130
|
+
// }, []);
|
|
131
|
+
// const onFinishFailed = useCallback(() => {
|
|
132
|
+
// setStatus(0);
|
|
133
|
+
// }, []);
|
|
134
|
+
/**
|
|
135
|
+
* 手动保存
|
|
136
|
+
*/
|
|
137
|
+
const onSave = useCallback(() => {
|
|
138
|
+
autoSave();
|
|
139
|
+
}, [record,schema]);
|
|
130
140
|
const onSendCheck = useCallback(() => {
|
|
131
141
|
(async () => {
|
|
132
142
|
const res = await controller.listbysubjectid({});
|
|
@@ -164,20 +174,31 @@ export default function Rule(props: any) {
|
|
|
164
174
|
};
|
|
165
175
|
}, [])
|
|
166
176
|
const updateSchema = useCallback((e) => {
|
|
167
|
-
setFirst(false);
|
|
177
|
+
// setFirst(false);
|
|
168
178
|
setSchema(e);
|
|
169
|
-
|
|
170
|
-
form.submit()
|
|
171
|
-
});
|
|
179
|
+
setChange(true);
|
|
172
180
|
}, [])
|
|
181
|
+
const onQuit = useCallback(() => {
|
|
182
|
+
if (hasChange) {
|
|
183
|
+
confirm({
|
|
184
|
+
title: '您当前有内容未保存,是否退出?',
|
|
185
|
+
onOk: () => {
|
|
186
|
+
history.goBack();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
} else {
|
|
190
|
+
history.goBack();
|
|
191
|
+
}
|
|
192
|
+
}, [hasChange]);
|
|
173
193
|
return <div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
|
|
174
194
|
<div style={{ display: 'flex', flex: 'none', }}>
|
|
175
195
|
<PageHeader
|
|
176
196
|
style={{ flex: 1 }}
|
|
177
197
|
title="配置"
|
|
178
198
|
extra={[
|
|
199
|
+
<Button key="2" style={{ display: type === 'record' ? 'none' : '' }} onClick={onSave}>保存</Button>,
|
|
179
200
|
<Button key="3" style={{ display: type === 'record' ? 'none' : '' }} onClick={onSendCheck}>发送</Button>,
|
|
180
|
-
<Button key="1" type="primary" onClick={
|
|
201
|
+
<Button key="1" type="primary" onClick={onQuit}>
|
|
181
202
|
退出
|
|
182
203
|
</Button>,
|
|
183
204
|
]}
|
|
@@ -188,13 +209,11 @@ export default function Rule(props: any) {
|
|
|
188
209
|
style={{ flex: 'none' }}
|
|
189
210
|
name="basic"
|
|
190
211
|
form={form}
|
|
191
|
-
onFinish={onFinish}
|
|
192
|
-
onFinishFailed={onFinishFailed}
|
|
212
|
+
// onFinish={onFinish}
|
|
213
|
+
// onFinishFailed={onFinishFailed}
|
|
193
214
|
onValuesChange={() => {
|
|
194
|
-
setFirst(false);
|
|
195
|
-
|
|
196
|
-
form.submit()
|
|
197
|
-
});
|
|
215
|
+
// setFirst(false);
|
|
216
|
+
setChange(true);
|
|
198
217
|
}}
|
|
199
218
|
labelCol={{ span: 8 }}
|
|
200
219
|
wrapperCol={{ span: 16 }}
|
|
@@ -226,7 +245,7 @@ export default function Rule(props: any) {
|
|
|
226
245
|
</Col>
|
|
227
246
|
<Col span={8}>
|
|
228
247
|
<Form.Item
|
|
229
|
-
label="
|
|
248
|
+
label="我的收发角色"
|
|
230
249
|
name="attribution"
|
|
231
250
|
rules={[{ required: true, message: '请输入必填项' }]}
|
|
232
251
|
>
|