From 55b503dc88c51c5e7d344d8e95d9e4bd0d75c27f Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 6 Dec 2022 17:56:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/apis/company.js | 18 +--------- .../components/NewAndEditDialog.js | 6 +++- .../organization/components/NewNumberField.js | 2 +- .../components/columnSetting/index.js | 2 +- .../components/company/company.js | 12 +++---- .../components/department/department.js | 5 +-- pc4mobx/organization/components/job/Job.js | 5 +-- pc4mobx/organization/stores/columnSetting.js | 6 ---- pc4mobx/organization/stores/company.js | 34 +++++++++---------- pc4mobx/organization/stores/companyextend.js | 5 ++- pc4mobx/organization/stores/newImport.js | 16 ++++----- 11 files changed, 46 insertions(+), 65 deletions(-) diff --git a/pc4mobx/organization/apis/company.js b/pc4mobx/organization/apis/company.js index d90adc4..8c55b59 100644 --- a/pc4mobx/organization/apis/company.js +++ b/pc4mobx/organization/apis/company.js @@ -4,7 +4,6 @@ import { } from 'ecCom' export const getSearchList = (params) => { - //return WeaTools.callApi('/api/bs/hrmorganization/comp/listComp', 'POST', params); return fetch('/api/bs/hrmorganization/comp/listComp', { method: 'POST', mode: 'cors', @@ -43,25 +42,10 @@ export const getAdvanceSearchCondition = (params) => { } export const add = (params) => { - return fetch('/api/bs/hrmorganization/comp/saveBaseComp', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }) + return WeaTools.callApi('/api/bs/hrmorganization/comp/saveBaseComp', 'POST', params); } export const editResource = (params) => { - // return fetch('/api/bs/hrmorganization/comp/updateComp', { - // method: 'POST', - // mode: 'cors', - // headers: { - // 'Content-Type': 'application/json' - // }, - // body: JSON.stringify(params) - // }) return WeaTools.callApi('/api/bs/hrmorganization/comp/updateComp', 'POST', params); } diff --git a/pc4mobx/organization/components/NewAndEditDialog.js b/pc4mobx/organization/components/NewAndEditDialog.js index 2308825..cd7c077 100644 --- a/pc4mobx/organization/components/NewAndEditDialog.js +++ b/pc4mobx/organization/components/NewAndEditDialog.js @@ -48,6 +48,10 @@ export default class NewAndEditDialog extends React.Component { tipPosition="bottom" wrapperCol={{ span: `${field.fieldcol}` }}> {} + {field.domkey[0] == 'subcompanycode' && field.viewAttr != '1' && } + {field.domkey[0] == 'dept_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'job_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'work_code' && field.viewAttr != '1' && } ) }) }) @@ -105,7 +109,7 @@ export default class NewAndEditDialog extends React.Component { > - {field.domkey[0] == 'comp_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'subcompanycode' && field.viewAttr != 1 && } {field.domkey[0] == 'dept_no' && field.viewAttr != '1' && } {field.domkey[0] == 'job_no' && field.viewAttr != '1' && } {field.domkey[0] == 'work_code' && field.viewAttr != '1' && } diff --git a/pc4mobx/organization/components/NewNumberField.js b/pc4mobx/organization/components/NewNumberField.js index 2d2cb08..38b2ed8 100644 --- a/pc4mobx/organization/components/NewNumberField.js +++ b/pc4mobx/organization/components/NewNumberField.js @@ -29,7 +29,7 @@ export default class AttachToNumberField extends PureComponent { canNew: false }; this.typeMap = { - comp_no: "SUBCOMPANY", + subcompanycode: "SUBCOMPANY", dept_no: "DEPARTMENT", job_no: "JOBTITLES", work_code: "USER" diff --git a/pc4mobx/organization/components/columnSetting/index.js b/pc4mobx/organization/components/columnSetting/index.js index e60639e..632b8c3 100644 --- a/pc4mobx/organization/components/columnSetting/index.js +++ b/pc4mobx/organization/components/columnSetting/index.js @@ -58,7 +58,7 @@ class ColumnSetting extends Component { render() { const { columnSetting } = this.props; const { selectedKey, authorized } = columnSetting; - if (!authorized) { + if (authorized === false) { return renderNoright(); } return ( diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index fc73210..98a6587 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-11-08 18:39:26 + * @LastEditTime: 2022-12-06 16:00:19 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js */ @@ -316,12 +316,12 @@ export default class Company extends React.Component { // } // }); columns.forEach((c, index) => { - if (c.dataIndex == 'forbiddenTag') { + if (c.dataIndex == 'canceled') { c.render = function (text, record) { - return _this.updateForbiddenTag(checked, record.id)} /> + return _this.updateForbiddenTag(checked, record.id)} /> } }; - if (c.dataIndex == 'compName') { + if (c.dataIndex == 'subCompanyDesc') { c.className = "wea-table-indent" c.render = function (text, record) { return { @@ -594,8 +594,8 @@ export default class Company extends React.Component { isFormInit={form1.isFormInit} loading={dialogLoading} isEdit={isEdit} - height={400} - conditionLen={2} + height={320} + conditionLen={1} save={() => this.handleSave()} onCancel={() => company.setNewVisible(false)} saveAndSetting = {() => this.handleSaveAndSetting()} diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index 20dc3d1..7ca9b19 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-11-08 18:40:46 + * @LastEditTime: 2022-12-06 10:31:42 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js */ @@ -513,7 +513,8 @@ export default class Department extends React.Component { let tree = ( { if (c.key === "itemurl") { c.title = diff --git a/pc4mobx/organization/stores/company.js b/pc4mobx/organization/stores/company.js index 40f0e1e..2c18f8b 100644 --- a/pc4mobx/organization/stores/company.js +++ b/pc4mobx/organization/stores/company.js @@ -42,7 +42,7 @@ export class CompanyStore { @observable form = new WeaForm(); @observable form1 = new WeaForm(); //新增主表表单 @observable companyName = ''; - @observable conditionNum = 8; + @observable conditionNum = 4; @observable ids = ''; //选择行id @observable id = ''; //页面跳转参数id @observable searchConditionLoading = true; @@ -63,10 +63,9 @@ export class CompanyStore { @observable transferCondition = []; - - @action - getTableInfo() { + + @action("列表树") getTableInfo() { this.setLoading(true); let params = { current: this.current, @@ -76,7 +75,7 @@ export class CompanyStore { if (this.isEmptyObject(this.form.getFormParams())) { params = { ...params, - compName: this.companyName + subCompanyName: this.companyName }; } else { params = { @@ -102,8 +101,7 @@ export class CompanyStore { }) } - @action("联查部门") - getDeptTable(id) { + @action("联查部门") getDeptTable(id) { let params = { parentComp: id } @@ -122,8 +120,8 @@ export class CompanyStore { }) } - //删除 - @action delete() { + + @action("删除") delete() { let params = { ids: this.ids }; @@ -144,7 +142,7 @@ export class CompanyStore { updateForbiddenTag(checked, id) { let params = { - forbiddenTag: checked, + canceled: checked, id: id } Api.updateForbiddenTag(params).then(response => { @@ -178,7 +176,10 @@ export class CompanyStore { getCompanyForm() { - let params = {}; + let params = { + addType: 'normal', + viewattr: 2 + }; this.setDialogLoadingStatus(true); Api.getCompanyForm(params).then(res => { if (res.code === 200) { @@ -232,9 +233,7 @@ export class CompanyStore { }; this.form1.validateForm().then(f => { if (f.isValid) { - Api.add(params).then(response => { - return response.json() - }).then(data => { + Api.add(params).then(data => { if (data.code === 200) { message.success(data.msg); this.getTableInfo(); @@ -253,8 +252,7 @@ export class CompanyStore { }); } - @action - getHasRight() { + @action getHasRight() { Api.getHasRight().then(res => { if (res.code === 200) { res.data.rightMenu && this.setRightMenu(res.data.rightMenu); @@ -269,7 +267,7 @@ export class CompanyStore { updateFields(val) { this.form.updateFields({ - compName: { + subCompanyName: { value: val } }); @@ -422,6 +420,6 @@ export class CompanyStore { this.transferCondition = transferCondition; } - + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/companyextend.js b/pc4mobx/organization/stores/companyextend.js index c9685d3..e68f188 100644 --- a/pc4mobx/organization/stores/companyextend.js +++ b/pc4mobx/organization/stores/companyextend.js @@ -38,8 +38,7 @@ export class CompanyExtendStore { } - @action - edit = () => { + @action edit = () => { this.isEditor = true; this.getData(); this.getTabInfo(); @@ -130,7 +129,7 @@ export class CompanyExtendStore { if (res.code === 200) { res.data.result.conditions && this.form.initFormFields(res.data.result.conditions); res.data.result.conditions && this.setConditions(res.data.result.conditions); - this.tableInfo = this.handleTable(res.data.result.tables); + //this.tableInfo = this.handleTable(res.data.result.tables); this.getTabInfo(); res.data.result.buttons && this.setButtons(res.data.result.buttons); res.data.result.tabInfo && this.setTopTab(res.data.result.tabInfo); diff --git a/pc4mobx/organization/stores/newImport.js b/pc4mobx/organization/stores/newImport.js index 20a3cde..8f72d3d 100644 --- a/pc4mobx/organization/stores/newImport.js +++ b/pc4mobx/organization/stores/newImport.js @@ -71,14 +71,14 @@ export class NewImportStore { "linkName": "部门导入", "url": "/spa/organization/static/index.html#/main/organization/department" }, - { - "subTitle": "岗位设置", - "bgColor": "#49B2FE", - "icon": "icon-coms-hrm", - "title": "岗位", - "linkName": "岗位体系导入", - "url": "/spa/organization/static/index.html#/main/organization/job" - }, + // { + // "subTitle": "岗位设置", + // "bgColor": "#49B2FE", + // "icon": "icon-coms-hrm", + // "title": "岗位", + // "linkName": "岗位体系导入", + // "url": "/spa/organization/static/index.html#/main/organization/job" + // }, { "subTitle": "组织维护", "bgColor": "#51A39A",