版本修改

This commit is contained in:
Chengliang 2022-12-06 17:56:09 +08:00
parent 04403d5d26
commit 55b503dc88
11 changed files with 46 additions and 65 deletions

View File

@ -4,7 +4,6 @@ import {
} from 'ecCom' } from 'ecCom'
export const getSearchList = (params) => { export const getSearchList = (params) => {
//return WeaTools.callApi('/api/bs/hrmorganization/comp/listComp', 'POST', params);
return fetch('/api/bs/hrmorganization/comp/listComp', { return fetch('/api/bs/hrmorganization/comp/listComp', {
method: 'POST', method: 'POST',
mode: 'cors', mode: 'cors',
@ -43,25 +42,10 @@ export const getAdvanceSearchCondition = (params) => {
} }
export const add = (params) => { export const add = (params) => {
return fetch('/api/bs/hrmorganization/comp/saveBaseComp', { return WeaTools.callApi('/api/bs/hrmorganization/comp/saveBaseComp', 'POST', params);
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
})
} }
export const editResource = (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); return WeaTools.callApi('/api/bs/hrmorganization/comp/updateComp', 'POST', params);
} }

View File

@ -48,6 +48,10 @@ export default class NewAndEditDialog extends React.Component {
tipPosition="bottom" tipPosition="bottom"
wrapperCol={{ span: `${field.fieldcol}` }}> wrapperCol={{ span: `${field.fieldcol}` }}>
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={this.onChange} />} {<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={this.onChange} />}
{field.domkey[0] == 'subcompanycode' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
{field.domkey[0] == 'dept_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
{field.domkey[0] == 'job_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
{field.domkey[0] == 'work_code' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
</WeaFormItem>) </WeaFormItem>)
}) })
}) })
@ -105,7 +109,7 @@ export default class NewAndEditDialog extends React.Component {
> >
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@5r6c5a@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={this.onChange} <WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@5r6c5a@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={this.onChange}
onBlur={this.onBlur} /> onBlur={this.onBlur} />
{field.domkey[0] == 'comp_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>} {field.domkey[0] == 'subcompanycode' && field.viewAttr != 1 && <AttachToNumberField field={field} form={form} isEdit={true}/>}
{field.domkey[0] == 'dept_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>} {field.domkey[0] == 'dept_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
{field.domkey[0] == 'job_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>} {field.domkey[0] == 'job_no' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
{field.domkey[0] == 'work_code' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>} {field.domkey[0] == 'work_code' && field.viewAttr != '1' && <AttachToNumberField field={field} form={form} isEdit={true}/>}

View File

@ -29,7 +29,7 @@ export default class AttachToNumberField extends PureComponent {
canNew: false canNew: false
}; };
this.typeMap = { this.typeMap = {
comp_no: "SUBCOMPANY", subcompanycode: "SUBCOMPANY",
dept_no: "DEPARTMENT", dept_no: "DEPARTMENT",
job_no: "JOBTITLES", job_no: "JOBTITLES",
work_code: "USER" work_code: "USER"

View File

@ -58,7 +58,7 @@ class ColumnSetting extends Component {
render() { render() {
const { columnSetting } = this.props; const { columnSetting } = this.props;
const { selectedKey, authorized } = columnSetting; const { selectedKey, authorized } = columnSetting;
if (!authorized) { if (authorized === false) {
return renderNoright(); return renderNoright();
} }
return ( return (

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-05-18 16:23:32 * @Date: 2022-05-18 16:23:32
* @LastEditTime: 2022-11-08 18:39:26 * @LastEditTime: 2022-12-06 16:00:19
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
*/ */
@ -316,12 +316,12 @@ export default class Company extends React.Component {
// } // }
// }); // });
columns.forEach((c, index) => { columns.forEach((c, index) => {
if (c.dataIndex == 'forbiddenTag') { if (c.dataIndex == 'canceled') {
c.render = function (text, record) { c.render = function (text, record) {
return <Switch checked={record.forbiddenTag == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} /> return <Switch checked={record.canceled == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} />
} }
}; };
if (c.dataIndex == 'compName') { if (c.dataIndex == 'subCompanyDesc') {
c.className = "wea-table-indent" c.className = "wea-table-indent"
c.render = function (text, record) { c.render = function (text, record) {
return <a onClick={() => { return <a onClick={() => {
@ -594,8 +594,8 @@ export default class Company extends React.Component {
isFormInit={form1.isFormInit} isFormInit={form1.isFormInit}
loading={dialogLoading} loading={dialogLoading}
isEdit={isEdit} isEdit={isEdit}
height={400} height={320}
conditionLen={2} conditionLen={1}
save={() => this.handleSave()} save={() => this.handleSave()}
onCancel={() => company.setNewVisible(false)} onCancel={() => company.setNewVisible(false)}
saveAndSetting = {() => this.handleSaveAndSetting()} saveAndSetting = {() => this.handleSaveAndSetting()}

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-06-02 09:19:37 * @Date: 2022-06-02 09:19:37
* @LastEditTime: 2022-11-08 18:40:46 * @LastEditTime: 2022-12-06 10:31:42
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
*/ */
@ -513,7 +513,8 @@ export default class Department extends React.Component {
let tree = ( let tree = (
<WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`} <WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`}
ref='WeaOrgTree' ref='WeaOrgTree'
dataUrl={"/api/bs/hrmorganization/dept/getSearchTree"} // dataUrl={"/api/bs/hrmorganization/dept/getSearchTree"}
dataUrl={"/api/hrm/base/getHrmSearchTree"}
loading loading
needSearch needSearch
noCache={true} noCache={true}

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-05-26 14:05:59 * @Date: 2022-05-26 14:05:59
* @LastEditTime: 2022-10-26 15:49:00 * @LastEditTime: 2022-12-06 10:33:06
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
*/ */
@ -481,7 +481,8 @@ export default class Job extends React.Component {
let tree = ( let tree = (
<WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`} <WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`}
ref='WeaOrgTree' ref='WeaOrgTree'
dataUrl={"/api/bs/hrmorganization/job/getSearchTree"} // dataUrl={"/api/bs/hrmorganization/job/getSearchTree"}
dataUrl={"/api/hrm/base/getHrmSearchTree"}
loading loading
needSearch needSearch
noCache={true} noCache={true}

View File

@ -31,7 +31,6 @@ export class ColumnSetting {
columns: [], columns: [],
loading: true, loading: true,
selectedData: {}, //selectedData受控 selectedData: {}, //selectedData受控
authorized: false
}; };
@observable tabThreeRelatedData = { @observable tabThreeRelatedData = {
datas: [], //datas受控 datas: [], //datas受控
@ -109,11 +108,6 @@ export class ColumnSetting {
} = rs; } = rs;
if (api_status) { if (api_status) {
if (!columns || !datas) {
this.tabTwoRelatedData.authorized = false;
return;
}
this.tabTwoRelatedData.authorized = true;
columns.map((c, index) => { columns.map((c, index) => {
if (c.key === "itemurl") { if (c.key === "itemurl") {
c.title = <span> c.title = <span>

View File

@ -42,7 +42,7 @@ export class CompanyStore {
@observable form = new WeaForm(); @observable form = new WeaForm();
@observable form1 = new WeaForm(); //新增主表表单 @observable form1 = new WeaForm(); //新增主表表单
@observable companyName = ''; @observable companyName = '';
@observable conditionNum = 8; @observable conditionNum = 4;
@observable ids = ''; //选择行id @observable ids = ''; //选择行id
@observable id = ''; //页面跳转参数id @observable id = ''; //页面跳转参数id
@observable searchConditionLoading = true; @observable searchConditionLoading = true;
@ -63,10 +63,9 @@ export class CompanyStore {
@observable transferCondition = []; @observable transferCondition = [];
@action
getTableInfo() { @action("列表树") getTableInfo() {
this.setLoading(true); this.setLoading(true);
let params = { let params = {
current: this.current, current: this.current,
@ -76,7 +75,7 @@ export class CompanyStore {
if (this.isEmptyObject(this.form.getFormParams())) { if (this.isEmptyObject(this.form.getFormParams())) {
params = { params = {
...params, ...params,
compName: this.companyName subCompanyName: this.companyName
}; };
} else { } else {
params = { params = {
@ -102,8 +101,7 @@ export class CompanyStore {
}) })
} }
@action("联查部门") @action("联查部门") getDeptTable(id) {
getDeptTable(id) {
let params = { let params = {
parentComp: id parentComp: id
} }
@ -122,8 +120,8 @@ export class CompanyStore {
}) })
} }
//删除
@action delete() { @action("删除") delete() {
let params = { let params = {
ids: this.ids ids: this.ids
}; };
@ -144,7 +142,7 @@ export class CompanyStore {
updateForbiddenTag(checked, id) { updateForbiddenTag(checked, id) {
let params = { let params = {
forbiddenTag: checked, canceled: checked,
id: id id: id
} }
Api.updateForbiddenTag(params).then(response => { Api.updateForbiddenTag(params).then(response => {
@ -178,7 +176,10 @@ export class CompanyStore {
getCompanyForm() { getCompanyForm() {
let params = {}; let params = {
addType: 'normal',
viewattr: 2
};
this.setDialogLoadingStatus(true); this.setDialogLoadingStatus(true);
Api.getCompanyForm(params).then(res => { Api.getCompanyForm(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -232,9 +233,7 @@ export class CompanyStore {
}; };
this.form1.validateForm().then(f => { this.form1.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {
Api.add(params).then(response => { Api.add(params).then(data => {
return response.json()
}).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo();
@ -253,8 +252,7 @@ export class CompanyStore {
}); });
} }
@action @action getHasRight() {
getHasRight() {
Api.getHasRight().then(res => { Api.getHasRight().then(res => {
if (res.code === 200) { if (res.code === 200) {
res.data.rightMenu && this.setRightMenu(res.data.rightMenu); res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
@ -269,7 +267,7 @@ export class CompanyStore {
updateFields(val) { updateFields(val) {
this.form.updateFields({ this.form.updateFields({
compName: { subCompanyName: {
value: val value: val
} }
}); });
@ -422,6 +420,6 @@ export class CompanyStore {
this.transferCondition = transferCondition; this.transferCondition = transferCondition;
} }
} }

View File

@ -38,8 +38,7 @@ export class CompanyExtendStore {
} }
@action @action edit = () => {
edit = () => {
this.isEditor = true; this.isEditor = true;
this.getData(); this.getData();
this.getTabInfo(); this.getTabInfo();
@ -130,7 +129,7 @@ export class CompanyExtendStore {
if (res.code === 200) { if (res.code === 200) {
res.data.result.conditions && this.form.initFormFields(res.data.result.conditions); res.data.result.conditions && this.form.initFormFields(res.data.result.conditions);
res.data.result.conditions && this.setConditions(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(); this.getTabInfo();
res.data.result.buttons && this.setButtons(res.data.result.buttons); res.data.result.buttons && this.setButtons(res.data.result.buttons);
res.data.result.tabInfo && this.setTopTab(res.data.result.tabInfo); res.data.result.tabInfo && this.setTopTab(res.data.result.tabInfo);

View File

@ -71,14 +71,14 @@ export class NewImportStore {
"linkName": "部门导入", "linkName": "部门导入",
"url": "/spa/organization/static/index.html#/main/organization/department" "url": "/spa/organization/static/index.html#/main/organization/department"
}, },
{ // {
"subTitle": "岗位设置", // "subTitle": "岗位设置",
"bgColor": "#49B2FE", // "bgColor": "#49B2FE",
"icon": "icon-coms-hrm", // "icon": "icon-coms-hrm",
"title": "岗位", // "title": "岗位",
"linkName": "岗位体系导入", // "linkName": "岗位体系导入",
"url": "/spa/organization/static/index.html#/main/organization/job" // "url": "/spa/organization/static/index.html#/main/organization/job"
}, // },
{ {
"subTitle": "组织维护", "subTitle": "组织维护",
"bgColor": "#51A39A", "bgColor": "#51A39A",