diff --git a/pc4mobx/organization/components/NewAndEditDialog.js b/pc4mobx/organization/components/NewAndEditDialog.js index 7513c42..1340383 100644 --- a/pc4mobx/organization/components/NewAndEditDialog.js +++ b/pc4mobx/organization/components/NewAndEditDialog.js @@ -54,14 +54,15 @@ export default class NewAndEditDialog extends React.Component { } onChange = data => { + const { + bindChangeEnvent, + } = this.props; if(this.state.enable && data.schemeId) { - const { - condition, - form, - bindChangeEnvent, - } = this.props; bindChangeEnvent(data.schemeId.value); } + if(this.state.enable && data.planYear){ + bindChangeEnvent(data.planYear.value); + } }; @@ -118,12 +119,14 @@ export default class NewAndEditDialog extends React.Component { isEdit, height, conditionLen, + saveAndSetting } = this.props, { width, } = this.state; const buttons = [ (), + (saveAndSetting && ), () ]; diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index e28f0fc..cd9c90b 100644 --- a/pc4mobx/organization/components/company/company.js +++ b/pc4mobx/organization/components/company/company.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-18 16:23:32 - * @LastEditTime: 2022-06-22 15:13:10 + * @LastEditTime: 2022-06-23 11:49:05 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js */ @@ -47,7 +47,6 @@ import { renderNoright } from '../../util'; const toJS = mobx.toJS; const confirm = Modal.confirm; -//const WeaTable = WeaTableNew.WeaTable @inject('company') @@ -132,13 +131,17 @@ export default class Company extends React.Component { const { company } = this.props; - company.setNeDialogTitle(i18n.label.companyName()); company.setVisible(true); company.setDialogLoadingStatus(true); company.getDeptTable(id); } + //查看 + view(id) { + window.open(`/spa/organization/static/index.html#/main/organization/companyExtend/${id}`, "_blank") + } + batchDelete() { const { company @@ -277,6 +280,9 @@ export default class Company extends React.Component { { _this.select(record.id) }}>联查部门 + + { _this.view(record.id) }}>查看 + ) return @@ -324,6 +330,13 @@ export default class Company extends React.Component { company.save(); } + handleSaveAndSetting() { + const { + company + } = this.props; + company.save(); + } + getTabBtn() { const { company @@ -516,6 +529,7 @@ export default class Company extends React.Component { save={() => this.handleSave()} onCancel={() => company.setNewVisible(false)} enable={false} //是否开启字段联动 + saveAndSetting = {() => this.handleSaveAndSetting()} /> ) diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index 4b6de65..31b0004 100644 --- a/pc4mobx/organization/components/department/department.js +++ b/pc4mobx/organization/components/department/department.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-06-02 09:19:37 - * @LastEditTime: 2022-06-22 16:42:37 + * @LastEditTime: 2022-06-23 11:49:38 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js */ @@ -162,7 +162,6 @@ const { department } = this.props; - department.setNeDialogTitle(i18n.label.transferDept()); department.setConfirmVisible(true); department.setIds(id); @@ -170,6 +169,11 @@ department.getTransferForm(id); } + + //查看 + view(id) { + window.open(`/spa/organization/static/index.html#/main/organization/departmentExtend/${id}`, "_blank") + } copy() { const { @@ -348,6 +352,9 @@ c.render = function (text, record) { const menu = ( + + { _this.view(record.id) }}>查看 + { _this.doDel(record.id) }}>删除 @@ -388,6 +395,10 @@ department.save(); } + handleSaveAndSetting() { + + } + PopconfirmSave() { const { department @@ -648,6 +659,7 @@ save={() => this.handleSave()} onCancel={() => department.setNewVisible(false)} enable={false} //是否开启字段联动 + saveAndSetting = {() => this.handleSaveAndSetting()} /> + + { _this.view(record.id) }}>查看 + { _this.doDel(record.id) }}>删除 - + { _this.select(record.id) }}>联查人员 @@ -347,6 +350,10 @@ export default class Job extends React.Component { this.showConfirm('del'); } + view(id) { + window.open(`/spa/organization/static/index.html#/main/organization/jobExtend/${id}`, "_blank") + } + handleSave() { const { @@ -355,6 +362,10 @@ export default class Job extends React.Component { job.save(); } + handleSaveAndSetting() { + + } + getTabBtn() { const { job @@ -604,6 +615,7 @@ export default class Job extends React.Component { save={() => this.handleSave()} onCancel={() => job.setNewVisible(false)} enable={false} //是否开启字段联动 + saveAndSetting = {() => this.handleSaveAndSetting()} /> ) diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index 014f296..18b6fb3 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -321,6 +321,10 @@ export default class Resource extends React.Component { !isNew && resource.edit(); } + handleSaveAndSetting() { + + } + getPanelComponents() { const { resource @@ -448,6 +452,7 @@ export default class Resource extends React.Component { save={() => this.handleSave()} onCancel={() => resource.setVisible(false)} enable={false} //是否开启字段联动 + saveAndSetting = {() => this.handleSaveAndSetting()} /> ) diff --git a/pc4mobx/organization/components/staff/Staff.js b/pc4mobx/organization/components/staff/Staff.js index 7b8222f..885aefe 100644 --- a/pc4mobx/organization/components/staff/Staff.js +++ b/pc4mobx/organization/components/staff/Staff.js @@ -9,6 +9,8 @@ import { WeaTab, WeaFormItem, WeaRightMenu, + WeaLeftRightLayout, + WeaOrgTree } from 'ecCom' import { Row, @@ -218,10 +220,40 @@ export default class Staff extends React.Component { reRenderColumns(columns) { let _this = this; // columns.forEach((c, index) => { - + // }) } + getTree = () => { + const { + staff + } = this.props; + const { + companysId, + } = staff + + let tree = ( + ${i18n.label.organization()}`} + treeNodeClick={this.treeNodeClick} + expandAllChildrenOnSearch={true} + /> + ) + + return tree; + } + + onOperatesClick(record, rowIndex, operate) { const { @@ -236,7 +268,7 @@ export default class Staff extends React.Component { const { staff } = this.props; - + staff.setNeDialogTitle(i18n.label.editStaff()); staff.setStaffId(id); staff.setOperateType("1"); @@ -249,7 +281,7 @@ export default class Staff extends React.Component { const { staff } = this.props; - + staff.setNeDialogTitle(i18n.label.changeStaff()); staff.setStaffId(id); staff.setOperateType("2"); @@ -310,29 +342,29 @@ export default class Staff extends React.Component { isFormInit && searchCondition.map(c => { c.items.map((field, index) => { - arr.push( -
- - {} - -
- ) + arr.push( +
+ + {} + +
+ ) }) }) if (searchConditionLoading) { return ( -
+
) } else { return { - if ( e.keyCode == 13 && e.target.tagName === "INPUT") { - staff.getTableInfo(); + if (e.keyCode == 13 && e.target.tagName === "INPUT") { + staff.getTableInfo(); staff.setPanelStatus(false) } }}>{arr} @@ -357,8 +389,8 @@ export default class Staff extends React.Component { staff } = this.props; const { - isPanelShow, form2, staffName, conditionNum, tableStore,nEdialogTitle,visible,condition, - form,dialogLoading,isEdit,date,hasRight + isPanelShow, form2, staffName, conditionNum, tableStore, nEdialogTitle, visible, condition, + form, dialogLoading, isEdit, date, hasRight } = staff; if (hasRight === false) { @@ -381,29 +413,32 @@ export default class Staff extends React.Component { dropMenuDatas={this.getDropMenuDatas()} onDropMenuClick={(e) => this.handleMenuClick(e)} > - staff.setPanelStatus(bool)} - hideSearchAd={() => staff.setPanelStatus(false)} - searchsAd= {isPanelShow ? this.getPanelComponents() :
} - advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20} - hasMask={false} - buttonsAd={this.getTabBtn()} - onSearch={() => staff.getTableInfo()} - onSearchChange={val => this.onSearchChange(val)} - /> - this.reRenderColumns(c)} - onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} - /> + + + staff.setPanelStatus(bool)} + hideSearchAd={() => staff.setPanelStatus(false)} + searchsAd={isPanelShow ? this.getPanelComponents() :
} + advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20} + hasMask={false} + buttonsAd={this.getTabBtn()} + onSearch={() => staff.getTableInfo()} + onSearchChange={val => this.onSearchChange(val)} + /> + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
- this.handleSave()} onCancel={() => staffScheme.setVisible(false)} - enable={false} //是否开启字段联动 + enable={true} //是否开启字段联动 + bindChangeEnvent={val => staffScheme.updateConditions(val)} />
) diff --git a/pc4mobx/organization/stores/department.js b/pc4mobx/organization/stores/department.js index 1f6f10b..6c8497d 100644 --- a/pc4mobx/organization/stores/department.js +++ b/pc4mobx/organization/stores/department.js @@ -65,12 +65,14 @@ export class DepartmentStore { @observable isMerge = true; @observable hasRight = ''; + @observable selectTreeNodeInfo; + @action - getTableInfo(params) { + getTableInfo() { this.setLoading(true); - params = { - ...params, + let params = { + ...this.selectTreeNodeInfo, current: this.current, pageSize: this.pageSize } @@ -106,8 +108,11 @@ export class DepartmentStore { @action("nodetree事件") doSearch(params) { + this.selectTreeNodeInfo = params; + this.setCurrent(1); + this.setPageSize(10); this.setInit(true); - this.getTableInfo(params); + this.getTableInfo(); } @action("联查岗位") @@ -371,7 +376,7 @@ export class DepartmentStore { updateFields(val) { this.form.updateFields({ - compName: { + departmentName: { value: val } }); diff --git a/pc4mobx/organization/stores/fieldDefined.js b/pc4mobx/organization/stores/fieldDefined.js index cc230f6..ae8839b 100644 --- a/pc4mobx/organization/stores/fieldDefined.js +++ b/pc4mobx/organization/stores/fieldDefined.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-06-09 10:16:00 - * @LastEditTime: 2022-06-20 11:07:43 + * @LastEditTime: 2022-06-23 09:58:27 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/stores/fieldDefined.js */ diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js index 853dd2a..1eb56c4 100644 --- a/pc4mobx/organization/stores/job.js +++ b/pc4mobx/organization/stores/job.js @@ -60,12 +60,14 @@ export class JobStore { @observable companysId = 1 @observable hasRight = ''; + @observable selectTreeNodeInfo; + @action - getTableInfo(params) { + getTableInfo() { this.setLoading(true); - params = { - ...params, + let params = { + ...this.selectTreeNodeInfo, current: this.current, pageSize: this.pageSize } @@ -101,8 +103,11 @@ export class JobStore { @action("nodetree事件") doSearch(params) { + this.selectTreeNodeInfo = params; + this.setCurrent(1); + this.setPageSize(10); this.setInit(true); - this.getTableInfo(params); + this.getTableInfo(); } @action("联查人员") diff --git a/pc4mobx/organization/stores/staff.js b/pc4mobx/organization/stores/staff.js index be15286..e4e10df 100644 --- a/pc4mobx/organization/stores/staff.js +++ b/pc4mobx/organization/stores/staff.js @@ -46,7 +46,7 @@ export class StaffStore { @observable date = ''; @observable hasRight = ''; @observable operateType = ''; //1 编辑 2 变更 - + @observable companysId = 1; @action diff --git a/pc4mobx/organization/stores/staffscheme.js b/pc4mobx/organization/stores/staffscheme.js index adf62a4..84bc659 100644 --- a/pc4mobx/organization/stores/staffscheme.js +++ b/pc4mobx/organization/stores/staffscheme.js @@ -17,6 +17,9 @@ import { import { i18n } from '../public/i18n'; +import { + findIndex +} from 'lodash'; const toJS = mobx.toJS; const { @@ -216,6 +219,26 @@ export class StaffSchemeStore { }) } + updateConditions(val) { + const timeStartValue = val+'-01-01'; + const timeEndValue = val+'-12-31' + // const label = "年度" + // let item = findIndex(this.condition[0].items,{label}); + this.form.updateFields({ + timeStart: { + value: timeStartValue + } + }); + this.form.updateFields({ + timeEnd: { + value: timeEndValue + } + }); + + + + } + updateFields(val) { this.form2.updateFields({ planName: {