parent
25b7a2341e
commit
334a582d62
|
|
@ -128,7 +128,7 @@ export const conditions = [
|
|||
isQuickSearch: false,
|
||||
label: "类型",
|
||||
labelcol: 6,
|
||||
valueList:[],
|
||||
valueList: [],
|
||||
options: [
|
||||
{
|
||||
key: "NUMBER",
|
||||
|
|
@ -185,13 +185,14 @@ export const reFrenceConditions = [
|
|||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["salarySobId"],
|
||||
domkey: ["salarySobIds"],
|
||||
fieldcol: 18,
|
||||
isQuickSearch: false,
|
||||
label: "薪资账套",
|
||||
labelcol: 6,
|
||||
valueList:[],
|
||||
valueList: [],
|
||||
options: [],
|
||||
multiple: true,
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
...item,
|
||||
items: _.map(items, child => {
|
||||
const { domkey } = child;
|
||||
if (domkey[0] === "salarySobId") {
|
||||
if (domkey[0] === "salarySobIds") {
|
||||
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
||||
}
|
||||
return { ...child };
|
||||
|
|
@ -77,19 +77,23 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
refenceform.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = refenceform.getFormParams();
|
||||
const checkPayload = { salaryYearMonthStr: payload.salaryYearMonth, salarySobId: payload.salarySobId };
|
||||
const checkPayload = {
|
||||
salaryYearMonthStr: payload.salaryYearMonth,
|
||||
salarySobIds: payload.salarySobIds.split(",")
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => {
|
||||
if (status) {
|
||||
syncAttendanceRefer(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("同步成功");
|
||||
onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg || "同步失败");
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
syncAttendanceRefer({ ...payload, salarySobIds: payload.salarySobIds.split(",") })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("同步成功");
|
||||
onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg || "同步失败");
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
this.setState({ loading: false });
|
||||
message.error(errormessage);
|
||||
|
|
@ -212,9 +216,9 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
|
||||
<WeaDialog {...this.props} style={{ width: 535, height: 174 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout">
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
{getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
|
||||
</div>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...headerSetPayload}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,40 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.multiple_select {
|
||||
.wea-select-input .arrow {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 8px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
.wea-select-input {
|
||||
height: 30px;
|
||||
white-space: nowrap;
|
||||
min-width: 100px;
|
||||
max-width: 345px;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
padding: 4px 17px 4px 4px;
|
||||
position: relative;
|
||||
min-height: 30px;
|
||||
border: 1px solid #d9d9d9;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//公式编辑框样式
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const getConditionFields = (condition) => {
|
|||
};
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
|
||||
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title, classnames = "") => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
|
|
@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
|
|||
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""}
|
||||
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames}
|
||||
>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields}
|
||||
|
|
|
|||
Loading…
Reference in New Issue