版本修改
This commit is contained in:
parent
04403d5d26
commit
55b503dc88
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ export default class NewAndEditDialog extends React.Component {
|
|||
tipPosition="bottom"
|
||||
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} />}
|
||||
{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>)
|
||||
})
|
||||
})
|
||||
|
|
@ -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}
|
||||
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] == '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}/>}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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 <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.render = function (text, record) {
|
||||
return <a onClick={() => {
|
||||
|
|
@ -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()}
|
||||
|
|
|
|||
|
|
@ -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 = (
|
||||
<WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`}
|
||||
ref='WeaOrgTree'
|
||||
dataUrl={"/api/bs/hrmorganization/dept/getSearchTree"}
|
||||
// dataUrl={"/api/bs/hrmorganization/dept/getSearchTree"}
|
||||
dataUrl={"/api/hrm/base/getHrmSearchTree"}
|
||||
loading
|
||||
needSearch
|
||||
noCache={true}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-05-26 14:05:59
|
||||
* @LastEditTime: 2022-10-26 15:49:00
|
||||
* @LastEditTime: 2022-12-06 10:33:06
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
|
||||
*/
|
||||
|
|
@ -481,7 +481,8 @@ export default class Job extends React.Component {
|
|||
let tree = (
|
||||
<WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`}
|
||||
ref='WeaOrgTree'
|
||||
dataUrl={"/api/bs/hrmorganization/job/getSearchTree"}
|
||||
// dataUrl={"/api/bs/hrmorganization/job/getSearchTree"}
|
||||
dataUrl={"/api/hrm/base/getHrmSearchTree"}
|
||||
loading
|
||||
needSearch
|
||||
noCache={true}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ export class ColumnSetting {
|
|||
columns: [],
|
||||
loading: true,
|
||||
selectedData: {}, //selectedData受控
|
||||
authorized: false
|
||||
};
|
||||
@observable tabThreeRelatedData = {
|
||||
datas: [], //datas受控
|
||||
|
|
@ -109,11 +108,6 @@ export class ColumnSetting {
|
|||
} = rs;
|
||||
|
||||
if (api_status) {
|
||||
if (!columns || !datas) {
|
||||
this.tabTwoRelatedData.authorized = false;
|
||||
return;
|
||||
}
|
||||
this.tabTwoRelatedData.authorized = true;
|
||||
columns.map((c, index) => {
|
||||
if (c.key === "itemurl") {
|
||||
c.title = <span>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue