对接部门合并转移 复制
This commit is contained in:
parent
aefcb9772b
commit
2b34890e6d
|
|
@ -29,12 +29,20 @@ export const getAdvanceSearchCondition = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/dept/getSearchCondition', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getSearchCondition', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getHrmListByJobId = (params) => {
|
export const getPostionTable = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/job/getHrmListByJobId', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getJobListByPid', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getCopyForm = (params) => {
|
export const getCopyForm = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/job/getCopyForm', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getCopyForm', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getMergeForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getMergeForm', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getTransferForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getMoveForm', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const add = (params) => {
|
export const add = (params) => {
|
||||||
|
|
@ -49,7 +57,29 @@ export const add = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const copy = (params) => {
|
export const copy = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/job/copyJobItem', {
|
return fetch('/api/bs/hrmorganization/dept/copyDepartment', {
|
||||||
|
method: 'POST',
|
||||||
|
mode: 'cors',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const merge = (params) => {
|
||||||
|
return fetch('/api/bs/hrmorganization/dept/mergeDepartment', {
|
||||||
|
method: 'POST',
|
||||||
|
mode: 'cors',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const transfer = (params) => {
|
||||||
|
return fetch('/api/bs/hrmorganization/dept/moveDepartment', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-05-18 16:23:32
|
* @Date: 2022-05-18 16:23:32
|
||||||
* @LastEditTime: 2022-06-01 17:15:50
|
* @LastEditTime: 2022-06-06 14:21:43
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -271,12 +271,10 @@ export default class Company extends React.Component {
|
||||||
c.render = function (text, record) {
|
c.render = function (text, record) {
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu>
|
<Menu>
|
||||||
{
|
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ?{display:'block'} :{display:'none'}}>
|
||||||
record.isUsed === 0 ? <Menu.Item>
|
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
||||||
</Menu.Item> : ''
|
</Menu.Item>
|
||||||
}
|
<Menu.Item key="2">
|
||||||
<Menu.Item>
|
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
|
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
@ -402,6 +400,7 @@ export default class Company extends React.Component {
|
||||||
} = company;
|
} = company;
|
||||||
|
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
|
type: "checkbox",
|
||||||
onChange(selectedRowKeys, selectedRows) {
|
onChange(selectedRowKeys, selectedRows) {
|
||||||
company.setSelectedRowKeys(selectedRowKeys);
|
company.setSelectedRowKeys(selectedRowKeys);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export default class NewPopconfirm extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
width: 700,
|
padding: "20px"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,19 +38,25 @@ export default class NewPopconfirm extends React.Component {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
isFormInit && condition.map(c => {
|
isFormInit && condition.map(c => {
|
||||||
c.items.map((field, index) => {
|
c.items.map((field, index) => {
|
||||||
arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
|
arr.push(<WeaFormItem style={{ margin: "10px" }} ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
|
||||||
label={`${field.label}`}
|
label={`${field.label}`}
|
||||||
labelCol={{ span: `${field.labelcol}` }}
|
labelCol={{ span: `${field.labelcol}` }}
|
||||||
error={form.getError(field)}
|
error={form.getError(field)}
|
||||||
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()} />}
|
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()}
|
||||||
|
onChange={this.onChange} />}
|
||||||
</WeaFormItem>)
|
</WeaFormItem>)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return <div className="wea-form-item-group">{arr}</div>
|
return <div className="wea-form-item-group">{arr}</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChange = data => {
|
||||||
|
debugger
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
|
|
@ -59,8 +65,9 @@ export default class NewPopconfirm extends React.Component {
|
||||||
onCancel,
|
onCancel,
|
||||||
loading,
|
loading,
|
||||||
height,
|
height,
|
||||||
|
width
|
||||||
} = this.props, {
|
} = this.props, {
|
||||||
width,
|
padding
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-06-02 09:19:37
|
* @Date: 2022-06-02 09:19:37
|
||||||
* @LastEditTime: 2022-06-02 16:41:55
|
* @LastEditTime: 2022-06-06 16:40:18
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
import '../../style/common.less';
|
import '../../style/common.less';
|
||||||
|
|
||||||
import NewAndEditDialog from '../NewAndEditDialog';
|
import NewAndEditDialog from '../NewAndEditDialog';
|
||||||
import NewWeaTableDialog from '../NewWeaTableDialog';
|
import NewTableDialog from '../NewTableDialog';
|
||||||
import NewPopconfirm from './NewPopconfirm'
|
import NewPopconfirm from './NewPopconfirm'
|
||||||
|
|
||||||
const toJS = mobx.toJS;
|
const toJS = mobx.toJS;
|
||||||
const confirm = Modal.confirm;
|
const confirm = Modal.confirm;
|
||||||
|
|
@ -132,13 +132,14 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
|
|
||||||
//联查岗位
|
//联查岗位
|
||||||
select(id) {
|
select(id) {
|
||||||
// const {
|
const {
|
||||||
// department
|
department
|
||||||
// } = this.props;
|
} = this.props;
|
||||||
|
|
||||||
// department.setNeDialogTitle("联查人员");
|
department.setNeDialogTitle("联查岗位");
|
||||||
// department.setVisible(true);
|
department.setVisible(true);
|
||||||
// department.getHrmTable(id);
|
department.setDialogLoadingStatus(true);
|
||||||
|
department.getPostionTable(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -149,8 +150,10 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
department.setNeDialogTitle(i18n.label.mergeDept());
|
department.setNeDialogTitle(i18n.label.mergeDept());
|
||||||
department.confirmVisible(true);
|
department.setConfirmVisible(true);
|
||||||
department.getMergeForm();
|
department.setIds(id);
|
||||||
|
department.setIsMerge(true);
|
||||||
|
department.getMergeForm(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
//转移
|
//转移
|
||||||
|
|
@ -159,9 +162,11 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
department
|
department
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
department.setNeDialogTitle(i18n.label.mergeDept());
|
department.setNeDialogTitle(i18n.label.transferDept());
|
||||||
department.confirmVisible(true);
|
department.setConfirmVisible(true);
|
||||||
department.getTransferForm();
|
department.setIds(id);
|
||||||
|
department.setIsMerge(false);
|
||||||
|
department.getTransferForm(id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -331,18 +336,16 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
c.render = function (text, record) {
|
c.render = function (text, record) {
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu>
|
<Menu>
|
||||||
{
|
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ? {display:'block'} : {display:'none'}}>
|
||||||
record.isUsed === 0 ? <Menu.Item>
|
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
||||||
</Menu.Item> : ''
|
</Menu.Item>
|
||||||
}
|
<Menu.Item key="2">
|
||||||
<Menu.Item>
|
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.merge(record.id) }}>合并</a>
|
<a href='javascript:void(0);' onClick={() => { _this.merge(record.id) }}>合并</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item>
|
<Menu.Item key="3">
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.transfer(record.id) }}>转移</a>
|
<a href='javascript:void(0);' onClick={() => { _this.transfer(record.id) }}>转移</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item>
|
<Menu.Item key="4">
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查岗位</a>
|
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查岗位</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
@ -373,6 +376,15 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
department.save();
|
department.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PopconfirmSave() {
|
||||||
|
const {
|
||||||
|
department
|
||||||
|
} = this.props;
|
||||||
|
const {isMerge} = department;
|
||||||
|
isMerge && department.merge();
|
||||||
|
!isMerge && department.transfer();
|
||||||
|
}
|
||||||
|
|
||||||
getTabBtn() {
|
getTabBtn() {
|
||||||
const {
|
const {
|
||||||
department
|
department
|
||||||
|
|
@ -514,10 +526,11 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
||||||
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
||||||
form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init,
|
form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init,
|
||||||
defaultShowLeft,confirmVisible,confirmLoading
|
defaultShowLeft,confirmVisible,confirmLoading,postionDataSource,postionColumns,isMerge
|
||||||
} = department;
|
} = department;
|
||||||
|
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
|
type:"checkbox",
|
||||||
onChange(selectedRowKeys, selectedRows) {
|
onChange(selectedRowKeys, selectedRows) {
|
||||||
department.setSelectedRowKeys(selectedRowKeys);
|
department.setSelectedRowKeys(selectedRowKeys);
|
||||||
},
|
},
|
||||||
|
|
@ -597,11 +610,13 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
</WeaLeftRightLayout>
|
</WeaLeftRightLayout>
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
<NewWeaTableDialog ecId={`${this && this.props && this.props.ecId || ''}_NewTableDialog@q4rrwm`}
|
<NewTableDialog ecId={`${this && this.props && this.props.ecId || ''}_NewTableDialog@q4rrwm`}
|
||||||
title={nEdialogTitle}
|
title={nEdialogTitle}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
|
loading={dialogLoading}
|
||||||
height={400}
|
height={400}
|
||||||
tableStore={tableStore}
|
dataSource={postionDataSource} //联查岗位数据
|
||||||
|
columns={postionColumns}
|
||||||
onCancel={() => department.setVisible(false)}
|
onCancel={() => department.setVisible(false)}
|
||||||
/>
|
/>
|
||||||
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
||||||
|
|
@ -625,9 +640,11 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
form={form1}
|
form={form1}
|
||||||
isFormInit={form1.isFormInit}
|
isFormInit={form1.isFormInit}
|
||||||
loading={confirmLoading}
|
loading={confirmLoading}
|
||||||
height={300}
|
height={isMerge ? 100 : 140}
|
||||||
save={() => this.handleSave()}
|
width={400}
|
||||||
onCancel={() => department.setNewVisible(false)}
|
isMerge={isMerge}
|
||||||
|
save={() => this.PopconfirmSave()}
|
||||||
|
onCancel={() => department.setConfirmVisible(false)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import OfficeManage from "./components/office/officeManage";
|
||||||
import CompanyExtend from "./components/company/CompanyExtend";
|
import CompanyExtend from "./components/company/CompanyExtend";
|
||||||
import BranchNumSetting from "./components/branchNumSetting";
|
import BranchNumSetting from "./components/branchNumSetting";
|
||||||
import Company from "./components/company/company";
|
import Company from "./components/company/company";
|
||||||
import DepartmentManage from "./components/deptment";
|
|
||||||
import StaffScheme from "./components/staff/StaffScheme";
|
import StaffScheme from "./components/staff/StaffScheme";
|
||||||
import Staff from "./components/staff/Staff";
|
import Staff from "./components/staff/Staff";
|
||||||
import Job from "./components/job/Job";
|
import Job from "./components/job/Job";
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ export const i18n = {
|
||||||
deptManage: () => getLabel(385936, '部门管理'),
|
deptManage: () => getLabel(385936, '部门管理'),
|
||||||
newDept: () => getLabel(386246, '新建部门'),
|
newDept: () => getLabel(386246, '新建部门'),
|
||||||
mergeDept:()=> getLabel(386246, '合并部门'),
|
mergeDept:()=> getLabel(386246, '合并部门'),
|
||||||
|
transferDept:()=> getLabel(386246, '转移部门'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,35 @@
|
||||||
import {
|
import {
|
||||||
observable,
|
observable,
|
||||||
action
|
action
|
||||||
} from 'mobx';
|
} from 'mobx';
|
||||||
import * as mobx from 'mobx';
|
import * as mobx from 'mobx';
|
||||||
import * as Api from '../apis/department'; // 引入API接口文件
|
import * as Api from '../apis/department'; // 引入API接口文件
|
||||||
import {
|
import {
|
||||||
WeaForm
|
WeaForm
|
||||||
} from 'comsMobx';
|
} from 'comsMobx';
|
||||||
import {
|
import {
|
||||||
WeaTableNew
|
WeaTableNew
|
||||||
} from 'comsMobx';
|
} from 'comsMobx';
|
||||||
import {
|
import {
|
||||||
Modal,
|
Modal,
|
||||||
message,
|
message,
|
||||||
} from 'antd'
|
} from 'antd'
|
||||||
import {
|
import {
|
||||||
i18n
|
i18n
|
||||||
} from '../public/i18n';
|
} from '../public/i18n';
|
||||||
|
|
||||||
const toJS = mobx.toJS;
|
const toJS = mobx.toJS;
|
||||||
const {
|
const {
|
||||||
TableStore
|
TableStore
|
||||||
} = WeaTableNew;
|
} = WeaTableNew;
|
||||||
|
|
||||||
|
|
||||||
export class DepartmentStore {
|
export class DepartmentStore {
|
||||||
@observable tableStore = new TableStore();
|
@observable tableStore = new TableStore();
|
||||||
@observable topMenu = []
|
@observable topMenu = []
|
||||||
@observable rightMenu = [];
|
@observable rightMenu = [];
|
||||||
@observable dataSource = [];
|
@observable dataSource = [];
|
||||||
@observable columns = [];
|
@observable columns = [];
|
||||||
@observable jobDataSource = [];
|
|
||||||
@observable jobColumns = [];
|
|
||||||
@observable loading = true;
|
@observable loading = true;
|
||||||
@observable dialogLoading = true;
|
@observable dialogLoading = true;
|
||||||
@observable isEdit = true;
|
@observable isEdit = true;
|
||||||
|
|
@ -57,12 +55,14 @@ import {
|
||||||
@observable total = '';
|
@observable total = '';
|
||||||
@observable current = 1;
|
@observable current = 1;
|
||||||
@observable pageSize = 10;
|
@observable pageSize = 10;
|
||||||
|
|
||||||
@observable defaultShowLeft = true;
|
@observable defaultShowLeft = true;
|
||||||
@observable companysId = 1 //集团id
|
@observable companysId = 1 //集团id
|
||||||
|
@observable postionDataSource = [];
|
||||||
|
@observable postionColumns = [];
|
||||||
|
|
||||||
@observable confirmVisible = false;
|
@observable confirmVisible = false;
|
||||||
@observable confirmLoading = true;
|
@observable confirmLoading = true;
|
||||||
|
@observable isMerge = true;
|
||||||
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
@ -108,21 +108,24 @@ import {
|
||||||
this.getTableInfo(params);
|
this.getTableInfo(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("联查人员")
|
@action("联查岗位")
|
||||||
getHrmTable(id) {
|
getPostionTable(id) {
|
||||||
// let params = {
|
let params = {
|
||||||
// departmentId: id
|
parentDept: id
|
||||||
// }
|
}
|
||||||
// this.tableStore = new TableStore();
|
Api.getPostionTable(params).then(response => {
|
||||||
// Api.getHrmListBydepartmentId(params).then(res => {
|
return response.json()
|
||||||
// if (res.code === 200) {
|
}).then(res => {
|
||||||
// res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
if (res.code === 200) {
|
||||||
// } else {
|
res.data.list && this.setPostionDataSource(res.data.list);
|
||||||
// message.warning(res.msg);
|
res.data.columns && this.setPostionColumns(res.data.columns);
|
||||||
// }
|
this.setDialogLoadingStatus(false);
|
||||||
// }, error => {
|
} else {
|
||||||
// message.warning(error.msg);
|
message.warning(res.msg);
|
||||||
// })
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
|
|
@ -196,37 +199,41 @@ import {
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("合并部门")
|
@action("合并部门")
|
||||||
getMergeForm() {
|
getMergeForm(id) {
|
||||||
// let params = {};
|
let params = {
|
||||||
// this.setConfirmLoading(true);
|
id:id
|
||||||
// Api.getDeptForm(params).then(res => {
|
};
|
||||||
// if (res.code === 200) {
|
this.setConfirmLoading(true);
|
||||||
// this.setConfirmLoading(false);
|
Api.getMergeForm(params).then(res => {
|
||||||
// res.data.condition && this.setCondition(res.data.condition);
|
if (res.code === 200) {
|
||||||
// res.data.condition && this.form1.initFormFields(res.data.condition);
|
this.setConfirmLoading(false);
|
||||||
// } else {
|
res.data && this.setCondition(res.data);
|
||||||
// message.warning(res.msg);
|
res.data && this.form1.initFormFields(res.data);
|
||||||
// }
|
} else {
|
||||||
// }, error => {
|
message.warning(res.msg);
|
||||||
// message.warning(error.msg);
|
}
|
||||||
// })
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("转移部门")
|
@action("转移部门")
|
||||||
getTransferForm() {
|
getTransferForm(id) {
|
||||||
// let params = {};
|
let params = {
|
||||||
// this.setConfirmLoading(true);
|
id:id
|
||||||
// Api.getDeptForm(params).then(res => {
|
};
|
||||||
// if (res.code === 200) {
|
this.setConfirmLoading(true);
|
||||||
// this.setConfirmLoading(false);
|
Api.getTransferForm(params).then(res => {
|
||||||
// res.data.condition && this.setCondition(res.data.condition);
|
if (res.code === 200) {
|
||||||
// res.data.condition && this.form1.initFormFields(res.data.condition);
|
this.setConfirmLoading(false);
|
||||||
// } else {
|
res.data && this.setCondition(res.data);
|
||||||
// message.warning(res.msg);
|
res.data && this.form1.initFormFields(res.data);
|
||||||
// }
|
} else {
|
||||||
// }, error => {
|
message.warning(res.msg);
|
||||||
// message.warning(error.msg);
|
}
|
||||||
// })
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("复制表单")
|
@action("复制表单")
|
||||||
|
|
@ -271,6 +278,60 @@ import {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
merge() {
|
||||||
|
let params = {
|
||||||
|
id:this.ids,
|
||||||
|
...this.form1.getFormParams()
|
||||||
|
};
|
||||||
|
this.form1.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
Api.merge(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.setConfirmVisible(false);
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
this.setDate(new Date());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
transfer() {
|
||||||
|
let params = {
|
||||||
|
id:this.ids,
|
||||||
|
...this.form1.getFormParams()
|
||||||
|
};
|
||||||
|
this.form1.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
Api.transfer(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.setConfirmVisible(false);
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
this.setDate(new Date());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
copy() {
|
copy() {
|
||||||
let params = {
|
let params = {
|
||||||
ids: this.ids,
|
ids: this.ids,
|
||||||
|
|
@ -394,18 +455,10 @@ import {
|
||||||
this.dataSource = dataSource;
|
this.dataSource = dataSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
setJobDataSource(jobDataSource) {
|
|
||||||
this.jobDataSource = jobDataSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
setColumns(columns) {
|
setColumns(columns) {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
}
|
}
|
||||||
|
|
||||||
setJobColumns(jobColumns) {
|
|
||||||
this.jobColumns = jobColumns
|
|
||||||
}
|
|
||||||
|
|
||||||
setSelectedRowKeys(selectedRowKeys) {
|
setSelectedRowKeys(selectedRowKeys) {
|
||||||
this.selectedRowKeys = selectedRowKeys;
|
this.selectedRowKeys = selectedRowKeys;
|
||||||
}
|
}
|
||||||
|
|
@ -448,10 +501,23 @@ import {
|
||||||
}
|
}
|
||||||
|
|
||||||
setConfirmVisible(confirmVisible) {
|
setConfirmVisible(confirmVisible) {
|
||||||
|
this.formReset();
|
||||||
this.confirmVisible = confirmVisible;
|
this.confirmVisible = confirmVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
setConfirmLoading(confirmLoading) {
|
setConfirmLoading(confirmLoading) {
|
||||||
this.confirmLoading = confirmLoading;
|
this.confirmLoading = confirmLoading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setPostionDataSource(postionDataSource) {
|
||||||
|
this.postionDataSource = postionDataSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setPostionColumns(postionColumns) {
|
||||||
|
this.postionColumns = postionColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIsMerge(bool) {
|
||||||
|
this.isMerge = bool;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue