diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js index 9eabe37a..4cb5a125 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js @@ -97,7 +97,6 @@ class CustomBrowserDialog extends Component { } } }; - onLeftListCheck = (keys, datas) => { const { leftListSelectedData } = this.state; let targets = leftListSelectedData.concat(datas); @@ -154,6 +153,31 @@ class CustomBrowserDialog extends Component { } return bool; }; + renderTitle = () => { + const { dialogType, searchParamsKey, isSingle } = this.props, { + query, pageInfo, selectedRowKeys, singleFilterVal + } = this.state; + return (
+ {getLabel(111, "数据选择")} + { + dialogType === "table" ? + this.setState({ query: { ...query, [searchParamsKey]: value } })} + onSearch={() => { + this.setState({ pageInfo: { ...pageInfo, current: 1 } }, () => { + this.getData(); + selectedRowKeys.forEach((v) => { + let item = this.getItemById(v); + if (item) this.selectedData[v] = item; + }); + }); + }}/> : isSingle ? + this.setState({ singleFilterVal })}/> : +
+ } +
); + }; render() { const { @@ -161,7 +185,7 @@ class CustomBrowserDialog extends Component { singleFilterVal } = this.state; const { dialogType, tableProps: { rowKey, columns }, isSingle, searchParamsKey } = this.props; - const sheight = this.dialog ? this.dialog.state.height - 55 : 260; + const sheight = this.dialog ? this.dialog.state.height - 116 : 260; const buttons = [ , @@ -172,7 +196,7 @@ class CustomBrowserDialog extends Component { if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true; if (rightDatas && rightDatas.length > 0) rightAllActive = true; let dom = -
+
{ !isSingle ?
@@ -184,7 +208,7 @@ class CustomBrowserDialog extends Component {
- +
this.setState({ rightCheckedKeys })} onDoubleClick={this.onRightDoubleClick} />
: - - this.setState({ singleFilterVal })}/> - this.handleRowClick(_.find(listDatas, item => item.id === id))} - data={listDatas.filter((item) => item.name.indexOf(_.trim(singleFilterVal)) > -1)}/> - + this.handleRowClick(_.find(listDatas, item => item.id === id))} + data={listDatas.filter((item) => item.name.indexOf(_.trim(singleFilterVal)) > -1)}/> }
; @@ -257,33 +278,20 @@ class CustomBrowserDialog extends Component { selectedRowKeys, onChange: selectedRowKeys => this.setState({ selectedRowKeys }) }; - dom = - this.setState({ query: { ...query, [searchParamsKey]: value } })} - onSearch={() => { - this.setState({ pageInfo: { ...pageInfo, current: 1 } }, () => { - this.getData(); - selectedRowKeys.forEach((v) => { - let item = this.getItemById(v); - if (item) this.selectedData[v] = item; - }); - }); - }}/> + dom =
- ; +
; } dialogType === "table" && isSingle && buttons.splice(0, 1); return ( this.dialog = dom} title={getLabel(111, "数据选择")} - className="custom_browser_dialog" style={{ + {...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()} + className="custom_browser_dialog" draggable={false} style={{ width: 784, height: 460, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" - }} buttons={buttons}> - {dom} - + }} buttons={buttons}>{dom} ); } } diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.less b/pc4mobx/hrmSalary/components/CustomBrowser/index.less index 8cf2ce40..d4d61a16 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/index.less +++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.less @@ -1,10 +1,18 @@ .custom_browser_dialog { - .tableSearch { - float: right; - margin: 16px; - position: relative; - z-index: 99; - min-width: 200px; + .wea-hr-muti-dialog-title { + display: flex; + justify-content: space-between; + align-items: center; + } + + .wea-hr-muti-input-table { + background: #f6f6f6; + padding: 8px 16px; + height: 100%; + + .wea-new-table { + background: #FFF; + } } .ant-spin-nested-loading, .ant-spin-container { @@ -12,6 +20,19 @@ } .wea-hr-muti-dialog { + height: 100%; + background: #f6f6f6; + padding: 8px 16px; + + .wea-hr-muti-input-left, .wea-hr-muti-input-right { + background: #FFF; + } + + .wea-transfer-list { + background: #FFF; + border: 1px solid #e9e9e9; + } + .wea-input-focus { height: 35px !important; width: 100% !important; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js index 57069d5b..5ce3fc1e 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js @@ -50,10 +50,12 @@ class Index extends Component { (col.column === "jfValue" || col.column === "dfValue") ? "INPUTNUMBER" : "custom", viewAttr: !pzlxEnum.includes(pzlx) ? 2 : 1, render: (text, record, index, onEdit) => { - const value = _.isArray(text) ? _.map(text, o => o.bh).join(",") : !_.isNil(text) ? text.bh : ""; + const value = _.isArray(text) ? _.map(text, o => o.bh).join(",") : (!_.isNil(text) && text.bh) ? text.bh : text; const replaceDatas = _.isArray(text) ? _.map(text, o => ({ ...o, id: o.bh, name: `${o.fzhslx}:${o.bh}/${o.mc}` - })) : !_.isNil(text) ? [{ ...text, id: text.bh, name: `${text.fzhslx}:${text.bh}/${text.mc}` }] : []; + })) : (!_.isNil(text) && text.bh) ? [{ + ...text, id: text.bh, name: `${text.fzhslx}:${text.bh}/${text.mc}` + }] : []; const fzhslxEnum = { "fzhsXmqs": 0, "fzhsFwlb": 1, "fzhsSllb": 2, "fzhsKs": 3 }; return onEdit({ - record: { ...record, [col["column"]]: value }, index - })} + onChange={(value) => { + onEdit({ + record: { ...record, [col["column"]]: value }, index, key: "custom", value + }); + }} />; } }