+
@@ -102,16 +161,26 @@ class CustomBrowserDialog extends Component {
-
+ this.moveTo("right")}
+ />
-
+
;
diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiLeft.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiLeft.js
index a6b962af..94343950 100644
--- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiLeft.js
+++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiLeft.js
@@ -12,11 +12,51 @@ import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
+let timeout = null;
+
class CustomBrowserMutiLeft extends Component {
+ constructor(props) {
+ super(props);
+ this.dataObj = {};
+ }
+
+ onClick = (data) => {
+ clearTimeout(timeout);
+ timeout = setTimeout(() => {
+ let { selectedKeys } = this.props;
+ let keys = selectedKeys ? [...selectedKeys] : [];
+ let datas = [];
+ if (keys.indexOf(data.id) > -1) {
+ keys = keys.filter((k) => k !== data.id);
+ } else {
+ keys.push(data.id);
+ }
+ keys.forEach((k) => this.dataObj[k] && datas.push(this.dataObj[k]));
+ this.props.onClick && this.props.onClick(keys, datas);
+ }, 200);
+ };
+ onDoubleClick = (data) => {
+ clearTimeout(timeout);
+ this.props.onDoubleClick && this.props.onDoubleClick([data]);
+ };
+ cls = (item) => {
+ const { selectedKeys, filterData } = this.props;
+ let cls = [];
+ if (selectedKeys && selectedKeys.indexOf(item.id) > -1) {
+ cls.push("selected");
+ }
+ if (filterData && filterData.filter((d) => d.id === item.id).length > 0) {
+ cls.push("hide");
+ }
+ return cls.join(" ");
+ };
+
render() {
- const { datas } = this.props;
+ const { datas, selectedKeys } = this.props;
const list = datas.map(item => {
- return
+ this.dataObj[item.id] = item;
+ return this.onClick(item)}
+ onDoubleClick={() => this.onDoubleClick(item)}>
{item.name}
diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js
index 5b4376d9..c51d1c42 100644
--- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js
+++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js
@@ -15,24 +15,55 @@ const getLabel = WeaLocaleProvider.getLabel;
const TreeNode = Tree.TreeNode;
class CustomBrowserMutiRight extends Component {
- generateTreeNodes = () => {
+ constructor(props) {
+ super(props);
+ this.state = {
+ key: ""
+ };
+ this.nodeIds = [];
+ this.nodeObj = {};
+ }
+ generateTreeNodes = () => {
+ const { data } = this.props, { key } = this.state;
+ const treeNodes = [];
+ let showData = [...data];
+ if (_.trim(key)) {
+ showData = showData.filter((item) => {
+ return item.name.indexOf(_.trim(key)) > -1;
+ });
+ }
+ showData = _.uniqBy(showData, "id");
+ this.nodeIds = [];
+ this.nodeObj = {};
+ showData.map((item) => {
+ let title = (
+
+ );
+ treeNodes.push();
+ this.nodeIds.push(item["id"]);
+ this.nodeObj[item["id"]] = item;
+ });
+ return treeNodes;
};
render() {
const { height } = this.props;
return (
-
+
- {/**/}
- {/* {this.generateTreeNodes()}*/}
- {/**/}
+
+ {this.generateTreeNodes()}
+
diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.js b/pc4mobx/hrmSalary/components/CustomBrowser/index.js
index 3b9fb3ed..92d2944f 100644
--- a/pc4mobx/hrmSalary/components/CustomBrowser/index.js
+++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.js
@@ -75,6 +75,7 @@ class Index extends Component {
selectedData: ((isSingle || browserConditionParam.isSingle) && !_.isEmpty(values)) ? { [_.last(values)]: datas[_.last(values)] } : datas
}, () => {
this.props.onChange && this.props.onChange(values.join(","));
+ this.props.onCustomChange && this.props.onCustomChange(this.state.selectedData);
if (form) {
form.updateFields({
[getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") }
diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.less b/pc4mobx/hrmSalary/components/CustomBrowser/index.less
index e2d30e6e..ff1844c7 100644
--- a/pc4mobx/hrmSalary/components/CustomBrowser/index.less
+++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.less
@@ -11,12 +11,14 @@
height: 100%;
}
- .wea-input-focus {
- height: 35px !important;
- //width: 100% !important;
+ .wea-hr-muti-dialog {
+ .wea-input-focus {
+ height: 35px !important;
+ width: 100% !important;
- input {
- height: 100% !important;
+ input {
+ height: 100% !important;
+ }
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/roleManagement/components/addRoleDialog/index.js b/pc4mobx/hrmSalary/pages/roleManagement/components/addRoleDialog/index.js
index e196b343..51e4f4a3 100644
--- a/pc4mobx/hrmSalary/pages/roleManagement/components/addRoleDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/roleManagement/components/addRoleDialog/index.js
@@ -44,6 +44,9 @@ class Index extends Component {
roleForm.validateForm().then(f => {
if (f.isValid) {
const payload = roleForm.getFormParams();
+
+ console.log(payload,roleForm.getFormDatas())
+ return
this.setState({ loading: true });
API.saveAuthRole({ ...payload, taxAgentId }).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
@@ -60,20 +63,23 @@ class Index extends Component {
}
});
};
+ handleFormChange=(val)=>{
+ console.log(val)
+ }
render() {
const { conditions, loading, roleSetDialog } = this.state;
const { taxAgentStore: { roleForm } } = this.props;
return (
this.save()}>{getLabel(111, "保存")},
]}
>
- {getSearchs(roleForm, conditions, 1, false)}
+ {getSearchs(roleForm, conditions, 1, false, this.handleFormChange)}
);
}
diff --git a/pc4mobx/hrmSalary/pages/roleManagement/components/conditions.js b/pc4mobx/hrmSalary/pages/roleManagement/components/conditions.js
index 2e232630..bc9b50a1 100644
--- a/pc4mobx/hrmSalary/pages/roleManagement/components/conditions.js
+++ b/pc4mobx/hrmSalary/pages/roleManagement/components/conditions.js
@@ -4,7 +4,7 @@ export const roleConditions = [
{
conditionType: "INPUT",
domkey: ["name"],
- fieldcol: 14,
+ fieldcol: 16,
label: "名称",
lanId: 111,
labelcol: 6,
@@ -13,29 +13,39 @@ export const roleConditions = [
viewAttr: 3
},
{
- browserConditionParam: {},
+ browserConditionParam: {
+ completeURL: "/api/bs/hrmsalary/salarysob/listAll",
+ filterByName: true,
+ tableProps: {},
+ isSingle: false
+ },
conditionType: "CUSTOMBROWSER",
domkey: ["taxAgentIds"],
- fieldcol: 14,
+ fieldcol: 16,
label: "个税扣缴义务人",
lanId: 111,
labelcol: 6,
- viewAttr: 2
+ rules: "required|string",
+ viewAttr: 3
},
{
- browserConditionParam: {},
+ browserConditionParam: {
+ tableProps: {},
+ isSingle: false
+ },
conditionType: "CUSTOMBROWSER",
domkey: ["sobIds"],
- fieldcol: 14,
+ fieldcol: 16,
label: "薪资账套",
lanId: 111,
labelcol: 6,
- viewAttr: 2
+ rules: "required|string",
+ viewAttr: 3
},
{
conditionType: "TEXTAREA",
domkey: ["description"],
- fieldcol: 14,
+ fieldcol: 16,
label: "描述",
lanId: 111,
labelcol: 6,
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 4ce6ef7a..a7e56969 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -43,6 +43,11 @@
padding: 16px;
}
+ .wea-content:not(.wea-associative-search) {
+
+
+ }
+
.wea-select, .ant-select-selection, .ant-select {
width: 100%;
}
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index f9e0150a..2f79dbe7 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -46,7 +46,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
>
{
fields.conditionType === "CUSTOMBROWSER" ?
- :
+ :
}
{