非系统人员功能开发
This commit is contained in:
parent
e14ebaacad
commit
49fb957550
|
|
@ -497,6 +497,31 @@ export default class UserSure extends React.Component {
|
|||
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下增加的人员"
|
||||
placement="topLeft"
|
||||
/>
|
||||
<span style={{ margin: "0 8px" }}>|</span>
|
||||
<span
|
||||
className={
|
||||
this.state.selectedKey == "3"
|
||||
? "crumbItem crumbItemSelected"
|
||||
: "crumbItem"
|
||||
}
|
||||
onClick={() => {
|
||||
this.setState({ selectedKey: "3" }, () => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "MA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
});
|
||||
}}>
|
||||
非系统人员
|
||||
</span>
|
||||
</div>
|
||||
<div className="crumbsOperateWrapper">
|
||||
<WeaTab
|
||||
|
|
|
|||
|
|
@ -29,28 +29,28 @@ class ExternalPersonManageEditSlide extends Component {
|
|||
detail({ id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const {
|
||||
departmentName, departmentId, subcompanyName, subcompanyId,
|
||||
jobtitleName, jobtitleId, ...extraFormfields
|
||||
departmentOrgName, departmentId, subcompanyOrgName, subcompanyId,
|
||||
jobtitleOrgName, jobtitleId, ...extraFormfields
|
||||
} = data;
|
||||
form.updateFields({
|
||||
"departmentId": {
|
||||
value: departmentId,
|
||||
valueSpan: departmentName,
|
||||
valueObj: [{ id: departmentId, name: departmentName }]
|
||||
valueSpan: departmentOrgName,
|
||||
valueObj: [{ id: departmentId, name: departmentOrgName }]
|
||||
}
|
||||
});
|
||||
form.updateFields({
|
||||
"subcompanyId": {
|
||||
value: subcompanyId,
|
||||
valueSpan: departmentName,
|
||||
valueObj: [{ id: subcompanyId, name: subcompanyName }]
|
||||
valueSpan: subcompanyOrgName,
|
||||
valueObj: [{ id: subcompanyId, name: subcompanyOrgName }]
|
||||
}
|
||||
});
|
||||
form.updateFields({
|
||||
"jobtitleId": {
|
||||
value: jobtitleId,
|
||||
valueSpan: jobtitleName,
|
||||
valueObj: [{ id: jobtitleId, name: jobtitleName }]
|
||||
valueSpan: jobtitleOrgName,
|
||||
valueObj: [{ id: jobtitleId, name: jobtitleOrgName }]
|
||||
}
|
||||
});
|
||||
_.map(_.keys(extraFormfields), item => {
|
||||
|
|
@ -64,6 +64,20 @@ class ExternalPersonManageEditSlide extends Component {
|
|||
const { form, id, onCancel, title } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const tmpV = _.reduce(_.keys(form.getFormDatas()), (pre, cur) => {
|
||||
if (cur === "departmentId") {
|
||||
return _.assign(pre, {
|
||||
[cur]: form.getFormDatas()[cur].value,
|
||||
departmentName: form.getFormDatas()["departmentId"].valueSpan
|
||||
});
|
||||
} else if (cur === "subcompanyId") {
|
||||
return _.assign(pre, {
|
||||
[cur]: form.getFormDatas()[cur].value,
|
||||
subcompanyName: form.getFormDatas()["subcompanyId"].valueSpan
|
||||
});
|
||||
}
|
||||
return _.assign(pre, { [cur]: form.getFormDatas()[cur].value });
|
||||
}, {});
|
||||
const payload = _.omitBy(form.getFormParams(), _.isEmpty);
|
||||
this.setState({ loading: true });
|
||||
const APIFOX = !id ? save : update;
|
||||
|
|
@ -82,6 +96,13 @@ class ExternalPersonManageEditSlide extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleFormChange = (res) => {
|
||||
const { form, id } = this.props;
|
||||
if (!id && (_.keys(res)[0] === "departmentId" || _.keys(res)[0] === "subcompanyId")) {
|
||||
const key = _.replace(_.keys(res)[0], "Id", "Name");
|
||||
form.updateFields({ [key]: res[_.keys(res)[0]].valueSpan || "" });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
|
|
@ -106,7 +127,7 @@ class ExternalPersonManageEditSlide extends Component {
|
|||
onSave={this.handleSubmit}
|
||||
/>
|
||||
}
|
||||
content={getSearchs(form, condition, 1)}
|
||||
content={getSearchs(form, condition, 1, false, this.handleFormChange)}
|
||||
onClose={onCancel}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ export const searchCondition = [
|
|||
label: "姓名",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
},
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const condition = [
|
||||
{
|
||||
|
|
@ -27,68 +27,88 @@ export const condition = [
|
|||
label: "姓名",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 3,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "部门",
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["departmentId"],
|
||||
fieldcol: 18,
|
||||
label: "部门",
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["departmentName"],
|
||||
fieldcol: 18,
|
||||
label: "部门名称",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "分部",
|
||||
type: "164",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["subcompanyId"],
|
||||
fieldcol: 18,
|
||||
label: "分部",
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["subcompanyName"],
|
||||
fieldcol: 18,
|
||||
label: "分部名称",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
// {
|
||||
// browserConditionParam: {
|
||||
// completeParams: {},
|
||||
// conditionDataParams: {},
|
||||
// dataParams: {},
|
||||
// destDataParams: {},
|
||||
// hasAddBtn: false,
|
||||
// hasAdvanceSerach: false,
|
||||
// idSeparator: ",",
|
||||
// isAutoComplete: 1,
|
||||
// isDetail: 0,
|
||||
// isMultCheckbox: false,
|
||||
// isSingle: true,
|
||||
// icon: "icon-coms-hrm",
|
||||
// linkUrl: "",
|
||||
// pageSize: 10,
|
||||
// quickSearchName: "",
|
||||
// replaceDatas: [],
|
||||
// title: "部门",
|
||||
// type: "57",
|
||||
// viewAttr: 2,
|
||||
// },
|
||||
// colSpan: 1,
|
||||
// conditionType: "BROWSER",
|
||||
// domkey: ["departmentId"],
|
||||
// fieldcol: 18,
|
||||
// label: "部门",
|
||||
// labelcol: 6,
|
||||
// viewAttr: 2,
|
||||
// },
|
||||
// {
|
||||
// browserConditionParam: {
|
||||
// completeParams: {},
|
||||
// conditionDataParams: {},
|
||||
// dataParams: {},
|
||||
// destDataParams: {},
|
||||
// hasAddBtn: false,
|
||||
// hasAdvanceSerach: false,
|
||||
// idSeparator: ",",
|
||||
// isAutoComplete: 1,
|
||||
// isDetail: 0,
|
||||
// isMultCheckbox: false,
|
||||
// isSingle: true,
|
||||
// icon: "icon-coms-hrm",
|
||||
// linkUrl: "",
|
||||
// pageSize: 10,
|
||||
// quickSearchName: "",
|
||||
// replaceDatas: [],
|
||||
// title: "分部",
|
||||
// type: "164",
|
||||
// viewAttr: 2,
|
||||
// },
|
||||
// colSpan: 1,
|
||||
// conditionType: "BROWSER",
|
||||
// domkey: ["subcompanyId"],
|
||||
// fieldcol: 18,
|
||||
// label: "分部",
|
||||
// labelcol: 6,
|
||||
// viewAttr: 2,
|
||||
// },
|
||||
// {
|
||||
// browserConditionParam: {
|
||||
// completeParams: {},
|
||||
|
|
@ -127,7 +147,7 @@ export const condition = [
|
|||
label: "入职日期",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -137,7 +157,7 @@ export const condition = [
|
|||
label: "手机",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -147,7 +167,7 @@ export const condition = [
|
|||
label: "工号",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -157,7 +177,7 @@ export const condition = [
|
|||
label: "身份证号码",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -167,7 +187,7 @@ export const condition = [
|
|||
label: "本人开户的银行卡卡号",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -177,10 +197,10 @@ export const condition = [
|
|||
label: "本人开户的银行卡开户支行全称",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
},
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: "基本信息"
|
||||
},
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
* Date: 2023/3/14
|
||||
*/
|
||||
handleSaveExternalPerson = (val) => {
|
||||
const { editId: salarySobId } = this.props;
|
||||
saveLedgerPersonExtRange({ ...val, salarySobId }).then(({ status, errormsg }) => {
|
||||
const { editId: salarySobId, saveSalarySobId } = this.props;
|
||||
saveLedgerPersonExtRange({ ...val, salarySobId: salarySobId || saveSalarySobId }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("保存成功");
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ class Index extends Component {
|
|||
this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList");
|
||||
break;
|
||||
case "stop":
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList");
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/stopList");
|
||||
break;
|
||||
default:
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/extList");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Spin } from 'antd';
|
||||
import { WeaSwitch } from 'comsMobx';
|
||||
import { WeaLocaleProvider, WeaAlertPage, WeaSearchGroup, WeaFormItem } from 'ecCom';
|
||||
import { Spin } from "antd";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { WeaAlertPage, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
|
|
@ -10,14 +11,14 @@ export const getCustomSearchs = (form, condition, col, isCenter) => {
|
|||
let items = [];
|
||||
let group = [];
|
||||
isFormInit && condition &&
|
||||
condition.map(c =>{
|
||||
condition.map(c => {
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com:(
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} // label 标签的文本
|
||||
labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例
|
||||
wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例
|
||||
labelCol={{ span: `${fields.labelcol}` }} // label标签占一行比例
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
>
|
||||
|
|
@ -27,39 +28,39 @@ export const getCustomSearchs = (form, condition, col, isCenter) => {
|
|||
formParams={formParams}
|
||||
/>
|
||||
</WeaFormItem>),
|
||||
colSpan:1,
|
||||
})
|
||||
colSpan: 1
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if(items.length > 0) {
|
||||
if (items.length > 0) {
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={col || 1} // 高级搜索列布局列数
|
||||
needTigger={true} // 是否开启收缩
|
||||
title={''} // 高级搜索标题
|
||||
title={""} // 高级搜索标题
|
||||
showGroup={true} // 是否开启面板
|
||||
items={items} // 条目数组数据
|
||||
center={isCenter || false} // 内容是否居中:一般弹框需要
|
||||
/>)
|
||||
/>);
|
||||
return group;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
export const getSearchs = (form, condition, col, isCenter) => {
|
||||
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0)) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c =>{
|
||||
isFormInit && condition && condition.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com:(
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} // label 标签的文本
|
||||
labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例
|
||||
wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例
|
||||
labelCol={{ span: `${fields.labelcol}` }} // label标签占一行比例
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
>
|
||||
|
|
@ -67,39 +68,40 @@ export const getSearchs = (form, condition, col, isCenter) => {
|
|||
fieldConfig={fields}
|
||||
form={form}
|
||||
formParams={formParams}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</WeaFormItem>),
|
||||
colSpan:1,
|
||||
})
|
||||
colSpan: 1
|
||||
});
|
||||
});
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={col || 1} // 高级搜索列布局列数
|
||||
needTigger={true} // 是否开启收缩
|
||||
title={c.title || ''} // 高级搜索标题
|
||||
title={c.title || ""} // 高级搜索标题
|
||||
showGroup={c.defaultshow} // 是否开启面板
|
||||
items={items} // 条目数组数据
|
||||
center={isCenter || false} // 内容是否居中:一般弹框需要
|
||||
/>)
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
}
|
||||
};
|
||||
|
||||
// 页面加载中效果处理
|
||||
export const renderLoading = (loading) => (
|
||||
<div className="wea-demo-loading">
|
||||
<Spin spinning={loading} />
|
||||
<Spin spinning={loading}/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
|
||||
// 无权限处理
|
||||
export const renderNoright = () => (
|
||||
<WeaAlertPage>
|
||||
<div>
|
||||
{getLabel(2012,'对不起,您暂时没有权限!')}
|
||||
{getLabel(2012, "对不起,您暂时没有权限!")}
|
||||
</div>
|
||||
</WeaAlertPage>
|
||||
)
|
||||
);
|
||||
|
||||
// 暂无数据处理
|
||||
export const renderNoData = () => (
|
||||
|
|
@ -108,13 +110,13 @@ export const renderNoData = () => (
|
|||
暂无数据
|
||||
</div>
|
||||
</WeaAlertPage>
|
||||
)
|
||||
);
|
||||
|
||||
//分页计算
|
||||
export function calcPageNo (total, pageNo = 1, pageSize = 10, selectDelDataLen = 1) {
|
||||
const totalPage = Math.ceil((total - selectDelDataLen) / pageSize) // 总页数
|
||||
pageNo = pageNo > totalPage ? totalPage : pageNo
|
||||
pageNo = pageNo < 1 ? 1 : pageNo
|
||||
return pageNo
|
||||
export function calcPageNo(total, pageNo = 1, pageSize = 10, selectDelDataLen = 1) {
|
||||
const totalPage = Math.ceil((total - selectDelDataLen) / pageSize); // 总页数
|
||||
pageNo = pageNo > totalPage ? totalPage : pageNo;
|
||||
pageNo = pageNo < 1 ? 1 : pageNo;
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue