release/2.16.1.2410.01
This commit is contained in:
parent
1f7fe615be
commit
df4971fd27
|
|
@ -52,8 +52,8 @@ class PersonalScopeModal extends Component {
|
|||
}
|
||||
if (!_.isEmpty(nextProps.record)) {
|
||||
this.setState({
|
||||
targetType: nextProps.record.targetTypeName,
|
||||
targetTypeIds: nextProps.record.target,
|
||||
targetType: nextProps.record.targetType,
|
||||
targetTypeIds: String(nextProps.record.targetId),
|
||||
targetTypeIdsNames: nextProps.record.targetName,
|
||||
status: nextProps.record.status,
|
||||
statusAll: ""
|
||||
|
|
@ -150,6 +150,7 @@ class PersonalScopeModal extends Component {
|
|||
}).catch(() => this.setState({ loading: true }));
|
||||
};
|
||||
renderBrowser = () => {
|
||||
const { record } = this.props;
|
||||
const { targetType, targetTypeIds, targetTypeIdsNames } = this.state;
|
||||
let browserType = {};
|
||||
switch (targetType) {
|
||||
|
|
@ -177,9 +178,9 @@ class PersonalScopeModal extends Component {
|
|||
return <WeaBrowser
|
||||
{...browserType}
|
||||
viewAttr={3}
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(record)}
|
||||
value={targetTypeIds}
|
||||
valueSpan={targetTypeIdsNames}
|
||||
replaceDatas={[{ id: targetTypeIds, name: targetTypeIdsNames }]}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(targetTypeIds, targetTypeIdsNames) => {
|
||||
this.setState({ targetTypeIds, targetTypeIdsNames });
|
||||
|
|
@ -188,7 +189,7 @@ class PersonalScopeModal extends Component {
|
|||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
targetType: "EMPLOYEE",
|
||||
targetType: !_.isEmpty(this.props.record) ? this.props.record.targetType : "EMPLOYEE",
|
||||
targetTypeIds: "",
|
||||
status: "",
|
||||
statusAll: ""
|
||||
|
|
@ -196,7 +197,7 @@ class PersonalScopeModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { onCancel, title, visible } = this.props;
|
||||
const { onCancel, title, visible, record } = this.props;
|
||||
const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.handleSubmit} loading={loading}>确定</Button>,
|
||||
|
|
@ -224,6 +225,7 @@ class PersonalScopeModal extends Component {
|
|||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<WeaSelect
|
||||
style={{ width: 60, marginRight: 12 }}
|
||||
disabled={!_.isEmpty(record)}
|
||||
value={targetType}
|
||||
options={targetTypeList}
|
||||
onChange={(targetType) => this.setState({ targetType })}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class PersonalScopeTable extends Component {
|
|||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
if (record.targetTypeName === "SQL" && item.dataIndex === "targetName") {
|
||||
if (item.dataIndex === "targetName") {
|
||||
return <a href="javascript:void(0);" onClick={() => this.props.onEditScope(record)}>{text}</a>;
|
||||
}
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@
|
|||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
font-size: 20px!important;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -340,9 +340,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
onCancel={() =>
|
||||
this.setState({
|
||||
personalAddModal: {
|
||||
...personalAddModal,
|
||||
visible: false,
|
||||
includeType: ""
|
||||
...personalAddModal, record: {}, includeType: "", visible: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
selectedKey: "EMPLOYEE",
|
||||
checkboxValue: "",
|
||||
checkAll: "0",
|
||||
ids: ""
|
||||
ids: "",
|
||||
idsName: ""
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +36,8 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
selectedKey: nextProps.scopeRecord.targetType,
|
||||
checkboxValue: nextProps.scopeRecord.status,
|
||||
checkAll: bool ? "1" : "0",
|
||||
ids: nextProps.scopeRecord.target
|
||||
ids: nextProps.scopeRecord.targetType === "SQL" ? nextProps.scopeRecord.target : String(nextProps.scopeRecord.targetId),
|
||||
idsName: nextProps.scopeRecord.targetName
|
||||
});
|
||||
} else {
|
||||
this.handleReset();
|
||||
|
|
@ -91,10 +93,11 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
// 重置
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
selectedKey: !_.isEmpty(this.props.scopeRecord) ? "SQL" : "EMPLOYEE",
|
||||
selectedKey: !_.isEmpty(this.props.scopeRecord) ? this.props.scopeRecord.targetType : "EMPLOYEE",
|
||||
checkboxValue: "",
|
||||
checkAll: "0",
|
||||
ids: ""
|
||||
ids: "",
|
||||
idsName: ""
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -148,11 +151,12 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
type={17}
|
||||
viewAttr={3}
|
||||
value={this.state.ids}
|
||||
replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
|
||||
title={"人员选择"}
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(scopeRecord)}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ ids });
|
||||
this.setState({ ids, idsName: names });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
@ -166,11 +170,12 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
type={57}
|
||||
viewAttr={3}
|
||||
title="部门选择"
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(scopeRecord)}
|
||||
inputStyle={{ width: 200 }}
|
||||
value={this.state.ids}
|
||||
replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ ids });
|
||||
this.setState({ ids, idsName: names });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
@ -184,11 +189,12 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
type={164}
|
||||
viewAttr={3}
|
||||
title={"分部选择"}
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(scopeRecord)}
|
||||
inputStyle={{ width: 200 }}
|
||||
value={this.state.ids}
|
||||
replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ ids });
|
||||
this.setState({ ids, idsName: names });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
@ -202,11 +208,12 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
type={278}
|
||||
viewAttr={3}
|
||||
title={"岗位选择"}
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(scopeRecord)}
|
||||
value={this.state.ids}
|
||||
replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ ids });
|
||||
this.setState({ ids, idsName: names });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
closeModal = () => {
|
||||
this.setState({
|
||||
addTaxagentModalVisible: false,
|
||||
externalPersonModalVisible: false
|
||||
externalPersonModalVisible: false,
|
||||
scopeRecord: {}
|
||||
}, () => {
|
||||
this.addTaxRef && this.addTaxRef.handleReset();
|
||||
});
|
||||
|
|
@ -233,7 +234,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
columns={_.map(taxAgentColumns, o => {
|
||||
return {
|
||||
...o, render: (text, record) => {
|
||||
if (record.targetType === "SQL" && o.dataIndex === "targetName") {
|
||||
if (o.dataIndex === "targetName") {
|
||||
return <a href="javascript:void(0);" onClick={() => {
|
||||
const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible";
|
||||
this.setState({ [key]: true, scopeRecord: record });
|
||||
|
|
|
|||
Loading…
Reference in New Issue