From 82b54b8bde783a2c3744b0e5740bac1082bd165c Mon Sep 17 00:00:00 2001
From: Chengliang <1546584672@qq.com>
Date: Fri, 24 Jun 2022 14:38:54 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/NewAndEditDialog.js | 17 ++-
.../components/company/company.js | 57 +++++++-
.../components/department/department.js | 14 +-
.../organization/components/group/Group.js | 1 -
pc4mobx/organization/components/job/Job.js | 23 ++-
.../components/postionrank/JobGrade.js | 2 +-
.../components/postionrank/JobLevel.js | 1 -
.../components/postionrank/RankScheme.js | 1 -
.../components/resource/resource.js | 1 -
.../components/sequence/Sequence.js | 1 -
.../organization/components/staff/Staff.js | 66 ++++++++-
.../components/staff/StaffScheme.js | 2 +-
pc4mobx/organization/stores/company.js | 136 ++++++++++++++++--
pc4mobx/organization/stores/companyextend.js | 4 +-
pc4mobx/organization/stores/department.js | 45 ++++--
.../organization/stores/departmentextend.js | 4 +-
pc4mobx/organization/stores/job.js | 47 ++++--
pc4mobx/organization/stores/jobextend.js | 4 +-
pc4mobx/organization/stores/staff.js | 34 ++++-
19 files changed, 390 insertions(+), 70 deletions(-)
diff --git a/pc4mobx/organization/components/NewAndEditDialog.js b/pc4mobx/organization/components/NewAndEditDialog.js
index 1340383..8f4ea36 100644
--- a/pc4mobx/organization/components/NewAndEditDialog.js
+++ b/pc4mobx/organization/components/NewAndEditDialog.js
@@ -24,8 +24,6 @@ export default class NewAndEditDialog extends React.Component {
super(props);
this.state = {
width: 700,
- enable: props.enable
-
}
}
@@ -56,15 +54,20 @@ export default class NewAndEditDialog extends React.Component {
onChange = data => {
const {
bindChangeEnvent,
+ moduleName
} = this.props;
- if(this.state.enable && data.schemeId) {
+ if(moduleName == 'jobGrade' && data.schemeId) {
bindChangeEnvent(data.schemeId.value);
}
- if(this.state.enable && data.planYear){
+ if(moduleName == 'staffScheme' && data.planYear){
bindChangeEnvent(data.planYear.value);
}
-
-
+ if(moduleName == 'department' && data.parent_comp ){
+ bindChangeEnvent(data);
+ }
+ if(moduleName == 'job' && (data.sequence_id)){
+ bindChangeEnvent(data);
+ }
};
onBlur = data => {
@@ -126,7 +129,7 @@ export default class NewAndEditDialog extends React.Component {
const buttons = [
(),
- (saveAndSetting && ),
+ (saveAndSetting && ),
()
];
diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js
index cd9c90b..2783ea4 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-23 11:49:05
+ * @LastEditTime: 2022-06-24 14:15:51
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
*/
@@ -142,6 +142,52 @@ export default class Company extends React.Component {
window.open(`/spa/organization/static/index.html#/main/organization/companyExtend/${id}`, "_blank")
}
+ transfer(id) {
+ const {
+ company
+ } = this.props;
+ confirm({
+ title: i18n.confirm.defaultTitle(),
+ content: this.getTransferForm(),
+ okText: i18n.button.ok(),
+ cancelText: i18n.button.cancel(),
+ onOk() {
+ company.transfer(id)
+ },
+ onCancel() {
+ return false;
+ },
+ });
+ }
+
+ getTransferForm() {
+ const {
+ company
+ } = this.props;
+ const {
+ transferCondition,
+ form2,
+ } = company;
+ let formParams = form2.getFormParams();
+ const {
+ isFormInit
+ } = form2;
+ let arr = [];
+ isFormInit && transferCondition.map(c => {
+ c.items.map((field, index) => {
+ arr.push(
+
+ {}
+
+ )
+ })
+ })
+ return arr;
+ }
+
batchDelete() {
const {
company
@@ -283,6 +329,9 @@ export default class Company extends React.Component {
{ _this.view(record.id) }}>查看
+
+ { _this.transfer(record.id) }}>转移
+
)
return
@@ -327,6 +376,7 @@ export default class Company extends React.Component {
const {
company
} = this.props;
+ company.setSaveAndSetting(false);
company.save();
}
@@ -334,7 +384,9 @@ export default class Company extends React.Component {
const {
company
} = this.props;
+ company.setSaveAndSetting(true);
company.save();
+
}
getTabBtn() {
@@ -428,6 +480,7 @@ export default class Company extends React.Component {
}
const rowSelection = {
+ selectedRowKeys:selectedRowKeys,
type: "checkbox",
onChange(selectedRowKeys, selectedRows) {
company.setSelectedRowKeys(selectedRowKeys);
@@ -497,6 +550,7 @@ export default class Company extends React.Component {
rowSelection={rowSelection}
pagination={pagination}
onChange={(pagination, filters, sorter) => {
+ company.setSortParams(sorter);
company.setCurrent(pagination.current);
company.setPageSize(pagination.pageSize);
company.getTableInfo();
@@ -528,7 +582,6 @@ export default class Company extends React.Component {
conditionLen={4}
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 31b0004..fe39a14 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-23 11:49:38
+ * @LastEditTime: 2022-06-24 13:46:13
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
*/
@@ -392,11 +392,16 @@
const {
department
} = this.props;
+ department.setSaveAndSetting(false);
department.save();
}
handleSaveAndSetting() {
-
+ const {
+ department
+ } = this.props;
+ department.setSaveAndSetting(true);
+ department.save();
}
PopconfirmSave() {
@@ -557,6 +562,7 @@
}
const rowSelection = {
+ selectedRowKeys:selectedRowKeys,
type:"checkbox",
onChange(selectedRowKeys, selectedRows) {
department.setSelectedRowKeys(selectedRowKeys);
@@ -627,6 +633,7 @@
rowSelection={rowSelection}
pagination={pagination}
onChange={(pagination, filters, sorter) => {
+ department.setSortParams(sorter);
department.setCurrent(pagination.current);
department.setPageSize(pagination.pageSize);
department.getTableInfo();
@@ -658,8 +665,9 @@
conditionLen={13}
save={() => this.handleSave()}
onCancel={() => department.setNewVisible(false)}
- enable={false} //是否开启字段联动
saveAndSetting = {() => this.handleSaveAndSetting()}
+ moduleName={"department"}
+ bindChangeEnvent={val => department.updateConditions(val)}
/>
this.handleSave()}
onCancel={() => group.setVisible(false)}
- enable={false} //是否开启字段联动
/>
)
diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js
index eadd5ef..002be5e 100644
--- a/pc4mobx/organization/components/job/Job.js
+++ b/pc4mobx/organization/components/job/Job.js
@@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-05-26 14:05:59
- * @LastEditTime: 2022-06-23 11:50:44
+ * @LastEditTime: 2022-06-24 14:36:50
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
*/
@@ -126,7 +126,7 @@ export default class Job extends React.Component {
job
} = this.props;
- job.setNeDialogTitle(i18n.label.newJob());
+ job.setNeDialogTitle(i18n.label.newPost());
job.setNewVisible(true);
job.getJobForm();
@@ -143,6 +143,10 @@ export default class Job extends React.Component {
job.getHrmTable(id);
}
+ merge(id) {
+ alert("后续更新")
+ }
+
copy() {
const {
@@ -330,6 +334,9 @@ export default class Job extends React.Component {
{ _this.select(record.id) }}>联查人员
+
+ { _this.merge(record.id) }}>合并
+
)
return
@@ -359,11 +366,16 @@ export default class Job extends React.Component {
const {
job
} = this.props;
+ job.setSaveAndSetting(false);
job.save();
}
handleSaveAndSetting() {
-
+ const {
+ job
+ } = this.props;
+ job.setSaveAndSetting(true);
+ job.save()
}
getTabBtn() {
@@ -516,6 +528,7 @@ export default class Job extends React.Component {
const rowSelection = {
+ selectedRowKeys:selectedRowKeys,
onChange(selectedRowKeys, selectedRows) {
job.setSelectedRowKeys(selectedRowKeys);
},
@@ -585,6 +598,7 @@ export default class Job extends React.Component {
rowSelection={rowSelection}
pagination={pagination}
onChange={(pagination, filters, sorter) => {
+ job.setSortParams(sorter);
job.setCurrent(pagination.current);
job.setPageSize(pagination.pageSize);
job.getTableInfo();
@@ -614,8 +628,9 @@ export default class Job extends React.Component {
conditionLen={13}
save={() => this.handleSave()}
onCancel={() => job.setNewVisible(false)}
- enable={false} //是否开启字段联动
saveAndSetting = {() => this.handleSaveAndSetting()}
+ moduleName={"job"}
+ bindChangeEnvent={val => job.updateConditions(val)}
/>
)
diff --git a/pc4mobx/organization/components/postionrank/JobGrade.js b/pc4mobx/organization/components/postionrank/JobGrade.js
index 7237106..f10c527 100644
--- a/pc4mobx/organization/components/postionrank/JobGrade.js
+++ b/pc4mobx/organization/components/postionrank/JobGrade.js
@@ -457,7 +457,7 @@ export default class JobGrade extends React.Component {
conditionLen={3}
save={() => this.handleSave()}
onCancel={() => jobGrade.setVisible(false)}
- enable={true} //是否开启字段联动
+ moduleName={"jobGrade"}
bindChangeEnvent={val => jobGrade.updateConditions(val)}
/>
diff --git a/pc4mobx/organization/components/postionrank/JobLevel.js b/pc4mobx/organization/components/postionrank/JobLevel.js
index 3df8592..a8959f0 100644
--- a/pc4mobx/organization/components/postionrank/JobLevel.js
+++ b/pc4mobx/organization/components/postionrank/JobLevel.js
@@ -454,7 +454,6 @@ export default class JobLevel extends React.Component {
conditionLen={3}
save={() => this.handleSave()}
onCancel={() => jobLevel.setVisible(false)}
- enable={false} //是否开启字段联动
/>
)
diff --git a/pc4mobx/organization/components/postionrank/RankScheme.js b/pc4mobx/organization/components/postionrank/RankScheme.js
index 2158d77..4008a37 100644
--- a/pc4mobx/organization/components/postionrank/RankScheme.js
+++ b/pc4mobx/organization/components/postionrank/RankScheme.js
@@ -422,7 +422,6 @@ export default class RankScheme extends React.Component {
conditionLen={3}
save={() => this.handleSave()}
onCancel={() => rankScheme.setVisible(false)}
- enable={false} //是否开启字段联动
/>
)
diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js
index 18b6fb3..5e035eb 100644
--- a/pc4mobx/organization/components/resource/resource.js
+++ b/pc4mobx/organization/components/resource/resource.js
@@ -451,7 +451,6 @@ export default class Resource extends React.Component {
conditionLen={3}
save={() => this.handleSave()}
onCancel={() => resource.setVisible(false)}
- enable={false} //是否开启字段联动
saveAndSetting = {() => this.handleSaveAndSetting()}
/>
diff --git a/pc4mobx/organization/components/sequence/Sequence.js b/pc4mobx/organization/components/sequence/Sequence.js
index 042000f..75ec848 100644
--- a/pc4mobx/organization/components/sequence/Sequence.js
+++ b/pc4mobx/organization/components/sequence/Sequence.js
@@ -433,7 +433,6 @@ export default class Sequence extends React.Component {
conditionLen={3}
save={() => this.handleSave()}
onCancel={() => sequence.setVisible(false)}
- enable={false} //是否开启字段联动
/>
)
diff --git a/pc4mobx/organization/components/staff/Staff.js b/pc4mobx/organization/components/staff/Staff.js
index 885aefe..8c5ab4f 100644
--- a/pc4mobx/organization/components/staff/Staff.js
+++ b/pc4mobx/organization/components/staff/Staff.js
@@ -212,7 +212,6 @@ export default class Staff extends React.Component {
const {
form2
} = staff;
-
staff.setStaffName(val);
//!this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val);
}
@@ -249,10 +248,69 @@ export default class Staff extends React.Component {
expandAllChildrenOnSearch={true}
/>
)
-
return tree;
}
+ treeNodeClick = (event, ids, nodeids, nodes) => {
+ const {
+ staff
+ } = this.props;
+ const {
+ form2,
+ companysId
+ } = staff;
+ const type = event.node.props.type || '0';
+ const id = event.node.props.id || '';
+ let params = {};
+ form2.resetConditionValue();
+ if (type == '0') {
+ params['virtualtype'] = companysId;
+ }
+ if (type == '1') {
+ params['compId'] = id;
+ }
+ if (type == '2') {
+ params['deptId'] = id;
+ }
+ staff.doSearch(params);
+ }
+
+ replaceLeft() {
+ const {
+ staff
+ } = this.props;
+ const {
+ leftCondition,
+ form1,
+ } = staff;
+ let formParams = form1.getFormParams();
+ const {
+ isFormInit
+ } = form1;
+ let arr = [];
+ isFormInit && leftCondition.map(c => {
+ c.items.map((field, index) => {
+ arr.push(
+
+
+ {}
+
+
+ )
+ })
+ })
+ return arr;
+ }
+
+ onChange = data => {
+ const {
+ staff
+ } = this.props;
+ staff.setPlanId(data.planId.value)
+ };
onOperatesClick(record, rowIndex, operate) {
@@ -415,7 +473,7 @@ export default class Staff extends React.Component {
>
- staff.getTableInfo()}
onSearchChange={val => this.onSearchChange(val)}
+ replaceLeft={this.replaceLeft()}
/>
this.handleSave()}
onCancel={() => staff.setVisible(false)}
- enable={false} //是否开启字段联动
/>
)
diff --git a/pc4mobx/organization/components/staff/StaffScheme.js b/pc4mobx/organization/components/staff/StaffScheme.js
index b7e92f1..0810c4d 100644
--- a/pc4mobx/organization/components/staff/StaffScheme.js
+++ b/pc4mobx/organization/components/staff/StaffScheme.js
@@ -435,7 +435,7 @@ export default class StaffScheme extends React.Component {
conditionLen={3}
save={() => this.handleSave()}
onCancel={() => staffScheme.setVisible(false)}
- enable={true} //是否开启字段联动
+ moduleName={"staffScheme"}
bindChangeEnvent={val => staffScheme.updateConditions(val)}
/>
diff --git a/pc4mobx/organization/stores/company.js b/pc4mobx/organization/stores/company.js
index 4a799a3..500af3e 100644
--- a/pc4mobx/organization/stores/company.js
+++ b/pc4mobx/organization/stores/company.js
@@ -49,27 +49,34 @@ export class CompanyStore {
@observable visible = false;
@observable newVisible = false; //新增弹窗
@observable companyId = '';
- @observable selectedRowKeys = '';
+ @observable selectedRowKeys = [];
@observable date = '';
@observable init = true; //是否首次加载
@observable total = '';
@observable current = 1;
@observable pageSize = 10;
+ @observable sortParams = [];
@observable hasRight = '';
+ saveAndSetting = false;
+
+ @observable form2 = new WeaForm(); //转移表单
+ @action transfer(id) {
+ debugger
+ }
@action
getTableInfo() {
this.setLoading(true);
let params = {
current: this.current,
- pageSize: this.pageSize
+ pageSize: this.pageSize,
+ sortParams: this.sortParams
}
if (this.isEmptyObject(this.form.getFormParams())) {
params = {
...params,
- ...this.form.getFormParams(),
compName: this.companyName
};
} else {
@@ -88,17 +95,15 @@ export class CompanyStore {
res.data.pageInfo.list && this.setDataSource(res.data.pageInfo.list);
this.setLoading(false);
this.setInit(false);
+
+ //form2
+ this.form2.initFormFields(this.transferCondition);
} else {
message.warning(res.msg);
}
}).catch(error => {
message.warning(error.msg);
})
-
-
-
-
-
}
@action("联查部门")
@@ -131,7 +136,7 @@ export class CompanyStore {
}).then(data => {
if (data.code === 200) {
message.success(i18n.message.deleteSuccess());
- this.setSelectedRowKeys('');
+ this.setSelectedRowKeys([]);
this.getTableInfo();
} else {
message.warning(data.msg);
@@ -206,6 +211,7 @@ export class CompanyStore {
message.success(data.msg);
this.getTableInfo();
this.setNewVisible(false);
+ this.saveAndSetting && window.open(`/spa/organization/static/index.html#/main/organization/companyExtend/${data.data}`, "_blank")
} else {
message.warning(data.msg);
}
@@ -219,7 +225,6 @@ export class CompanyStore {
});
}
-
@action
getHasRight() {
Api.getHasRight().then(res => {
@@ -368,9 +373,118 @@ export class CompanyStore {
setInit(bool) {
this.init = bool;
}
-
+
setHasRight(bool) {
this.hasRight = bool;
}
+ setSortParams(sorter) {
+ this.sortParams = [];
+ sorter.order && this.sortParams.push({
+ orderkey: sorter.field,
+ sortOrder: sorter.order
+ })
+ }
+
+ setSaveAndSetting(bool) {
+ this.saveAndSetting = bool;
+ }
+
+ /********************* form2 *********************/
+
+ transferCondition = [
+ {
+ "defaultshow": true,
+ "items": [
+ {
+ "belong": "PC",
+ "browserConditionParam": {
+ "asynLoadAll": false,
+ "checkStrictly": true,
+ "completeParams": {
+ "type": 161,
+ "fielddbtype": "browser.compBrowser"
+ },
+ "conditionDataParams": {
+ "type": "browser.compBrowser"
+ },
+ "dataParams": {
+ "currenttime": new Date(),
+ "type": "browser.compBrowser"
+ },
+ "defaultCheckStrictly": true,
+ "defaultExpandedLevel": 0,
+ "destDataParams": {
+ "type": "browser.compBrowser"
+ },
+ "expandfirstnode": false,
+ "handleTypes": "",
+ "hasAddBtn": false,
+ "hasAdvanceSerach": false,
+ "hasBorder": false,
+ "hasTabConditions": false,
+ "hideAdvanceSearch": false,
+ "hideVirtualOrg": false,
+ "icon": "icon-coms-integration",
+ "iconColor": "#1a57a0",
+ "idSeparator": ",",
+ "isAutoComplete": 1,
+ "isDetail": 0,
+ "isMultCheckbox": false,
+ "isSingle": true,
+ "linkUrl": "",
+ "noOperate": true,
+ "otherParams": {},
+ "pageSize": -1,
+ "quickSearchName": "",
+ "replaceDatas": [],
+ "replaceNotCtrl": false,
+ "scrollx": true,
+ "searchParams": {},
+ "searchPlaceholder": "",
+ "showCheckStrictly": true,
+ "title": "公司分部浏览按钮",
+ "type": "161",
+ "viewAttr": 2
+ },
+ "checkbox": false,
+ "checkboxValue": false,
+ "colSpan": 2,
+ "conditionType": "BROWSER",
+ "dateGroup": false,
+ "defaultDisplayInBar": false,
+ "detailtype": 1,
+ "domkey": [
+ "parent_company"
+ ],
+ "entSearch": false,
+ "fieldcol": 16,
+ "hasBorder": false,
+ "helpfulTipProps": {},
+ "hide": false,
+ "isBase64": false,
+ "isQuickSearch": false,
+ "label": "转移到",
+ "labelcol": 6,
+ "length": 0,
+ "maxFilesNumber": 0,
+ "maxUploadSize": 0,
+ "multiSelection": false,
+ "multiple": false,
+ "precision": 0,
+ "secretLimit": false,
+ "showOrder": 0,
+ "showTime": false,
+ "stringLength": 0,
+ "supportCancel": false,
+ "tipPosition": "bottom",
+ "valueList": [],
+ "viewAttr": 2
+ },
+ ],
+ "title": "基本信息"
+ }
+ ]
+
+
}
\ No newline at end of file
diff --git a/pc4mobx/organization/stores/companyextend.js b/pc4mobx/organization/stores/companyextend.js
index 2e70f03..6d15ee8 100644
--- a/pc4mobx/organization/stores/companyextend.js
+++ b/pc4mobx/organization/stores/companyextend.js
@@ -90,11 +90,11 @@ export class CompanyExtendStore {
this.getData();
this.selectedRowKeys = [];
} else {
- message.warning(data.message);
+ message.warning(data.msg);
}
this.loading = false;
}, error => {
- message.warning(error.message);
+ message.warning(error.msg);
this.loading = false;
})
}
diff --git a/pc4mobx/organization/stores/department.js b/pc4mobx/organization/stores/department.js
index 6c8497d..22bac93 100644
--- a/pc4mobx/organization/stores/department.js
+++ b/pc4mobx/organization/stores/department.js
@@ -49,12 +49,13 @@ export class DepartmentStore {
@observable visible = false;
@observable newVisible = false; //新增弹窗
@observable departmentId = '';
- @observable selectedRowKeys = '';
+ @observable selectedRowKeys = [];
@observable date = '';
@observable init = true; //是否首次加载
@observable total = '';
@observable current = 1;
@observable pageSize = 10;
+ @observable sortParams = [];
@observable defaultShowLeft = true;
@observable companysId = 1 //集团id
@observable postionDataSource = [];
@@ -66,6 +67,7 @@ export class DepartmentStore {
@observable hasRight = '';
@observable selectTreeNodeInfo;
+ saveAndSetting = false;
@action
@@ -74,12 +76,12 @@ export class DepartmentStore {
let params = {
...this.selectTreeNodeInfo,
current: this.current,
- pageSize: this.pageSize
+ pageSize: this.pageSize,
+ sortParams: this.sortParams
}
if (this.isEmptyObject(this.form.getFormParams())) {
params = {
...params,
- ...this.form.getFormParams(),
departmentName: this.departmentName
};
} else {
@@ -128,7 +130,7 @@ export class DepartmentStore {
} else {
message.warning(res.msg);
}
- },error => {
+ }, error => {
message.warning(error.msg);
})
}
@@ -143,7 +145,7 @@ export class DepartmentStore {
}).then(data => {
if (data.code === 200) {
message.success(i18n.message.deleteSuccess());
- this.setSelectedRowKeys('');
+ this.setSelectedRowKeys([]);
this.getTableInfo();
} else {
message.warning(data.msg);
@@ -207,7 +209,7 @@ export class DepartmentStore {
@action("合并部门")
getMergeForm(id) {
let params = {
- id:id
+ id: id
};
this.setConfirmLoading(true);
Api.getMergeForm(params).then(res => {
@@ -226,7 +228,7 @@ export class DepartmentStore {
@action("转移部门")
getTransferForm(id) {
let params = {
- id:id
+ id: id
};
this.setConfirmLoading(true);
Api.getTransferForm(params).then(res => {
@@ -271,6 +273,7 @@ export class DepartmentStore {
message.success(data.msg);
this.getTableInfo();
this.setNewVisible(false);
+ this.saveAndSetting && window.open(`/spa/organization/static/index.html#/main/organization/departmentExtend/${data.data}`, "_blank")
} else {
message.warning(data.msg);
}
@@ -286,7 +289,7 @@ export class DepartmentStore {
merge() {
let params = {
- id:this.ids,
+ id: this.ids,
...this.form1.getFormParams()
};
this.form1.validateForm().then(f => {
@@ -313,7 +316,7 @@ export class DepartmentStore {
transfer() {
let params = {
- id:this.ids,
+ id: this.ids,
...this.form1.getFormParams()
};
this.form1.validateForm().then(f => {
@@ -349,7 +352,7 @@ export class DepartmentStore {
if (data.code === 200) {
message.success(data.msg);
this.getTableInfo();
- this.setSelectedRowKeys('');
+ this.setSelectedRowKeys([]);
} else {
message.error(data.msg);
}
@@ -374,6 +377,14 @@ export class DepartmentStore {
})
}
+ updateConditions(data) {
+ this.form1.updateFields({
+ parent_dept: {
+ value: ''
+ }
+ });
+ }
+
updateFields(val) {
this.form.updateFields({
departmentName: {
@@ -528,5 +539,17 @@ export class DepartmentStore {
setHasRight(bool) {
this.hasRight = bool;
-}
+ }
+
+ setSortParams(sorter) {
+ this.sortParams = [];
+ sorter.order && this.sortParams.push({
+ orderkey: sorter.field,
+ sortOrder: sorter.order
+ })
+ }
+
+ setSaveAndSetting(bool) {
+ this.saveAndSetting = bool;
+ }
}
\ No newline at end of file
diff --git a/pc4mobx/organization/stores/departmentextend.js b/pc4mobx/organization/stores/departmentextend.js
index d95c3ec..3595bab 100644
--- a/pc4mobx/organization/stores/departmentextend.js
+++ b/pc4mobx/organization/stores/departmentextend.js
@@ -89,11 +89,11 @@ export class DepartmentExtendStore {
this.getData();
this.selectedRowKeys = [];
} else {
- message.warning(data.message);
+ message.warning(data.msg);
}
this.loading = false;
}, error => {
- message.warning(error.message);
+ message.warning(error.msg);
this.loading = false;
})
}
diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js
index 1eb56c4..7146422 100644
--- a/pc4mobx/organization/stores/job.js
+++ b/pc4mobx/organization/stores/job.js
@@ -17,6 +17,9 @@ import {
import {
i18n
} from '../public/i18n';
+import {
+ findIndex
+} from 'lodash';
const toJS = mobx.toJS;
const {
@@ -49,19 +52,19 @@ export class JobStore {
@observable visible = false;
@observable newVisible = false; //新增弹窗
@observable jobId = '';
- @observable selectedRowKeys = '';
+ @observable selectedRowKeys = [];
@observable date = '';
@observable init = true; //是否首次加载
@observable total = '';
@observable current = 1;
@observable pageSize = 10;
-
+ @observable sortParams = [];
@observable defaultShowLeft = true;
@observable companysId = 1
@observable hasRight = '';
@observable selectTreeNodeInfo;
-
+ saveAndSetting = false;
@action
getTableInfo() {
@@ -69,13 +72,13 @@ export class JobStore {
let params = {
...this.selectTreeNodeInfo,
current: this.current,
- pageSize: this.pageSize
+ pageSize: this.pageSize,
+ sortParams: this.sortParams
}
if (this.isEmptyObject(this.form.getFormParams())) {
params = {
...params,
- ...this.form.getFormParams(),
- jobName: this.jobName
+ jobName: this.jobName,
};
} else {
params = {
@@ -101,7 +104,7 @@ export class JobStore {
})
}
- @action("nodetree事件")
+ @action("leftTree事件")
doSearch(params) {
this.selectTreeNodeInfo = params;
this.setCurrent(1);
@@ -137,7 +140,7 @@ export class JobStore {
}).then(data => {
if (data.code === 200) {
message.success(i18n.message.deleteSuccess());
- this.setSelectedRowKeys('');
+ this.setSelectedRowKeys([]);
this.getTableInfo();
} else {
message.warning(data.msg);
@@ -227,6 +230,7 @@ export class JobStore {
message.success(data.msg);
this.getTableInfo();
this.setNewVisible(false);
+ this.saveAndSetting && window.open(`/spa/organization/static/index.html#/main/organization/jobExtend/${data.data}`, "_blank")
} else {
message.warning(data.msg);
}
@@ -251,8 +255,7 @@ export class JobStore {
if (data.code === 200) {
message.success(data.msg);
this.getTableInfo();
- this.form2 = new WeaForm();
- this.setSelectedRowKeys('');
+ this.setSelectedRowKeys([]);
} else {
message.error(data.msg);
}
@@ -262,6 +265,18 @@ export class JobStore {
}
+ updateConditions(data) {
+ this.form1.updateFields({
+ scheme_id: {
+ value: '',
+ },
+ });
+ const label = "等级方案"
+ let index = findIndex(this.condition[0].items,{label});
+ this.condition[0].items[index].browserConditionParam.replaceDatas = [];
+
+ }
+
@action
getHasRight() {
@@ -413,4 +428,16 @@ export class JobStore {
this.hasRight = bool;
}
+ setSortParams(sorter) {
+ this.sortParams = [];
+ sorter.order && this.sortParams.push({
+ orderkey: sorter.field,
+ sortOrder: sorter.order
+ })
+ }
+
+ setSaveAndSetting(bool) {
+ this.saveAndSetting = bool;
+ }
+
}
\ No newline at end of file
diff --git a/pc4mobx/organization/stores/jobextend.js b/pc4mobx/organization/stores/jobextend.js
index f16c8d7..1c6f8c3 100644
--- a/pc4mobx/organization/stores/jobextend.js
+++ b/pc4mobx/organization/stores/jobextend.js
@@ -92,11 +92,11 @@ export class JobExtendStore {
this.getData();
this.selectedRowKeys = [];
} else {
- message.warning(data.message);
+ message.warning(data.msg);
}
this.loading = false;
}, error => {
- message.warning(error.message);
+ message.warning(error.msg);
this.loading = false;
})
}
diff --git a/pc4mobx/organization/stores/staff.js b/pc4mobx/organization/stores/staff.js
index e4e10df..aeff9ba 100644
--- a/pc4mobx/organization/stores/staff.js
+++ b/pc4mobx/organization/stores/staff.js
@@ -10,7 +10,7 @@ import {
import {
WeaTableNew
} from 'comsMobx';
-import {
+import {
Modal,
message,
} from 'antd'
@@ -28,6 +28,7 @@ export class StaffStore {
@observable topMenu = []
@observable rightMenu = [];
@observable condition = [];
+ @observable leftCondition = [];
@observable searchCondition = [];
@observable isEdit = true;
@observable isNew = true;
@@ -48,19 +49,26 @@ export class StaffStore {
@observable operateType = ''; //1 编辑 2 变更
@observable companysId = 1;
+ @observable planId = '';
+ @observable selectTreeNodeInfo;
+
@action
getTableInfo() {
- let params;
+ let params = {
+ planId: this.planId,
+ ...this.selectTreeNodeInfo,
+ }
this.tableStore = new TableStore();
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
- ...this.form2.getFormParams(),
- staffName: this.staffName
+ ...params,
+ staffName: this.staffName,
};
} else {
params = {
- ...this.form2.getFormParams()
+ ...this.form2.getFormParams(),
+ ...params,
};
}
Api.getSearchList(params).then(res => {
@@ -146,6 +154,11 @@ export class StaffStore {
});
}
+ @action("leftTree事件")
+ doSearch(params) {
+ this.selectTreeNodeInfo = params;
+ this.getTableInfo();
+ }
getForm() {
let params = this.isNew ? {} : {
@@ -190,6 +203,8 @@ export class StaffStore {
if (res.code === 200) {
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
res.data.topMenu && this.setTopMenu(res.data.topMenu);
+ res.data.condition && this.setLeftCondition(res.data.condition);
+ res.data.condition && this.form1.initFormFields(res.data.condition);
} else {
message.warning(res.msg);
}
@@ -297,5 +312,14 @@ export class StaffStore {
this.operateType = operateType;
}
+ setLeftCondition(leftCondition) {
+ this.leftCondition = leftCondition;
+ }
+
+ setPlanId(planId) {
+ this.planId = planId;
+ this.getTableInfo();
+ }
+
}
\ No newline at end of file