Compare commits

..

3 Commits

Author SHA1 Message Date
Chengliang ec18ccf007 年假余额页面支持负数 2023-07-27 13:50:44 +08:00
Chengliang f842befed0 初始化 2023-07-27 11:43:07 +08:00
Chengliang d98ec14cf9 第一次提交 2023-07-27 11:31:30 +08:00
18 changed files with 419 additions and 144 deletions

View File

@ -42,8 +42,8 @@ export default class GroupInfo4Coms extends Component{
let children = [ let children = [
( (
<div> <div style={{height: '100%'}}>
<div style={{height: 680, position: 'relative'}}> <div style={{height: 'calc(100% - 64px)', position: 'relative'}}>
<Info ecId={`${this && this.props && this.props.ecId || ''}_Info@p8cxnm`} store={store} /> <Info ecId={`${this && this.props && this.props.ecId || ''}_Info@p8cxnm`} store={store} />
</div> </div>
<WeaDialogFooter ecId={`${this && this.props && this.props.ecId || ''}_WeaDialogFooter@eacpnh`} buttons={buttons} moreBtn={{datas: menus}}/> <WeaDialogFooter ecId={`${this && this.props && this.props.ecId || ''}_WeaDialogFooter@eacpnh`} buttons={buttons} moreBtn={{datas: menus}}/>

View File

@ -6,7 +6,7 @@ import has from 'lodash/has';
const getLabel = WeaLocaleProvider.getLabel; const getLabel = WeaLocaleProvider.getLabel;
import {i18n} from '../../public/i18n'; import {i18n} from '../../public/i18n';
let map, geolocation, geocoder; let map, geolocation, geocoder,MapAddress;
@observer @observer
export default class Map extends Component { export default class Map extends Component {
@ -32,13 +32,16 @@ export default class Map extends Component {
} }
onSelectHandle = params => { onSelectHandle = params => {
const{cityname,adname,business_area}=params
MapAddress=cityname+adname+business_area+params.address
const {store: {onPositionSelected}} = this.props; const {store: {onPositionSelected}} = this.props;
let locationname = '', address = '', longitude = '', latitude = ''; let locationname = '', address = '', longitude = '', latitude = '';
locationname = params.name; locationname = params.name;
address = params.address; address = MapAddress
const latlng = params.location.split(','); const latlng = params.location.split(',');
longitude = latlng[0]; longitude = latlng[0];
latitude = latlng[1]; latitude = latlng[1];
const data = {locationname,address,longitude,latitude} const data = {locationname,address,longitude,latitude}
onPositionSelected && onPositionSelected(data); onPositionSelected && onPositionSelected(data);
// this.setState({selectedPosition: data}); // this.setState({selectedPosition: data});
@ -72,6 +75,7 @@ export default class Map extends Component {
const {store} = this.props; const {store} = this.props;
const {rangeParams} = store; const {rangeParams} = store;
const mapProps = {showGeolocation: true} const mapProps = {showGeolocation: true}
const {locationname:name} = rangeParams;
const {longitude, latitude} = rangeParams; const {longitude, latitude} = rangeParams;
if(/^(\-)?\d+(\.\d+)?$/.test(longitude) && /^(\-)?\d+(\.\d+)?$/.test(latitude)){ if(/^(\-)?\d+(\.\d+)?$/.test(longitude) && /^(\-)?\d+(\.\d+)?$/.test(latitude)){
@ -94,6 +98,7 @@ export default class Map extends Component {
gaodeRegeoCallback={this.gaodeRegeoCallback} gaodeRegeoCallback={this.gaodeRegeoCallback}
googleRegeoCallback={this.googleRegeoCallback} googleRegeoCallback={this.googleRegeoCallback}
{...mapProps} {...mapProps}
info={{name, address:MapAddress}}
/> />
</div> </div>
<div style={{height: 90, padding: 10}}> <div style={{height: 90, padding: 10}}>

View File

@ -32,7 +32,8 @@ export class HrmShiftManager extends HrmBaseStore {
across: 0, across: 0,
mins: 60, mins: 60,
mins_next:'', mins_next:'',
times: "" times: "",
clockinnot:'0'
}; };
searchParams = {}; searchParams = {};
orgTreeProps = { orgTreeProps = {
@ -291,6 +292,7 @@ export class HrmShiftManager extends HrmBaseStore {
/> />
</div>) </div>)
}, },
cardRemOfSignIn: (field, textAreaProps, form, formParams) => {//上班打卡提醒 cardRemOfSignIn: (field, textAreaProps, form, formParams) => {//上班打卡提醒
const { const {
cardRemind cardRemind
@ -958,7 +960,7 @@ export class HrmShiftManager extends HrmBaseStore {
childrenComponents = { childrenComponents = {
shiftonoffworkcount: () => { shiftonoffworkcount: () => {
const formParams = this.formTarget.baseForm.getFormParams(); const formParams = this.formTarget.baseForm.getFormParams();
/*if (formParams.shiftonoffworkcount != "1") { /*if (formParams.shiftonoffworkcount != "1") {
this.formTarget.baseForm.updateFields({ this.formTarget.baseForm.updateFields({
isresttimeopen: { isresttimeopen: {
value: "0" value: "0"
@ -1029,10 +1031,25 @@ export class HrmShiftManager extends HrmBaseStore {
tip={i18n.label["388787"]()} tip={i18n.label["388787"]()}
onChange={v => (this.worktimes[i - 1].start.mins_next = v)} onChange={v => (this.worktimes[i - 1].start.mins_next = v)}
/> />
</WeaError> </WeaError>
</div> </div>
)} )}
</div> </div>
<div style={{margin:'5px 0 0 50px'}}>
<WeaCheckbox
id="test"
value={timeConfig.start.clockinnot}
onChange={
v => (this.worktimes[i - 1].start.clockinnot = (v || 1))
}
/>
</div>
<div style={{margin:'10px 0 0 10px'}}>{getLabel('540846','无需打卡')}</div>
</div> </div>
<div className="cust"> <div className="cust">
<div className="child"> <div className="child">
@ -1090,6 +1107,20 @@ export class HrmShiftManager extends HrmBaseStore {
</div> </div>
)} )}
</div> </div>
<div style={{margin:'5px 0 0 50px'}}>
<WeaCheckbox
id="test"
value={timeConfig.end.clockinnot}
onChange={
v => (this.worktimes[i - 1].end.clockinnot = (v || 1))
}
/>
</div>
<div style={{margin:'10px 0 0 10px'}}>{getLabel('540846','无需打卡')}</div>
</div> </div>
</div> </div>
@ -1106,18 +1137,17 @@ export class HrmShiftManager extends HrmBaseStore {
} }
]; ];
}, },
isresttimeopen: () => { isresttimeopen: () => {
const formParams = this.formTarget.baseForm.getFormParams(); const formParams = this.formTarget.baseForm.getFormParams();
const { fieldMap } = this.formTarget.baseForm; const { fieldMap } = this.formTarget.baseForm;
if (formParams.isresttimeopen != "1") { if (formParams.isresttimeopen != "1") {
return []; return [];
} }
const coms = []; const coms = [];
this.toJS(this.restTimeCollection).forEach((d, index) => { this.restTimeCollection.forEach((d, index) => {
console.debug(d)
const {record, start, end} = d; const {record, start, end} = d;
const {time: sTime = '12:00', accross: sAccross} = start || {}; const {time: sTime = '12:00', accross: sAccross = '0'} = start || {};
const {time: eTime, accross: eAccross} = end || {}; const {time: eTime, accross: eAccross = '0'} = end || {};
coms.push( coms.push(
<WeaFormItem <WeaFormItem
label={`${fieldMap['isresttimeopen'].label}${index + 1}`} label={`${fieldMap['isresttimeopen'].label}${index + 1}`}
@ -1766,7 +1796,7 @@ export class HrmShiftManager extends HrmBaseStore {
this.processCondition(data); this.processCondition(data);
this.canAdd = data.canAdd; this.canAdd = data.canAdd;
this.shift_24 = data.shift_24 || 0; this.shift_24 = data.shift_24 || 0;
this.restTimeCollection = data.restTimeSections; this.restTimeCollection = data.restTimeSections;
this.setFormData("baseForm", data.condition); this.setFormData("baseForm", data.condition);
if (this.formTarget.baseForm.isFormInit) { if (this.formTarget.baseForm.isFormInit) {
callback && callback(); callback && callback();
@ -1867,14 +1897,16 @@ export class HrmShiftManager extends HrmBaseStore {
mins: i == 1 ? 60 : 30, mins: i == 1 ? 60 : 30,
mins_next:'', mins_next:'',
times: count === 1 ? "09:00" : this.sTime[i - 1], times: count === 1 ? "09:00" : this.sTime[i - 1],
key: `s${i - 1}` key: `s${i - 1}`,
clockinnot:'0'
}, },
end: { end: {
across: 0, across: 0,
mins: i == count ? 60 : 29, mins: i == count ? 60 : 29,
mins_next:'', mins_next:'',
times: count === 1 ? "18:00" : this.eTime[i - 1], times: count === 1 ? "18:00" : this.eTime[i - 1],
key: `e${i - 1}` key: `e${i - 1}`,
clockinnot:'0'
} }
}); });
} }
@ -1969,7 +2001,7 @@ export class HrmShiftManager extends HrmBaseStore {
return this.restTimeSections[1].across == '1'; return this.restTimeSections[1].across == '1';
} }
checkRestTimeCollection = (times) => { checkRestTimeCollection = (times) => {
this.resttimeRangeError = false; this.resttimeRangeError = false;
if(times.length <= 1) if(times.length <= 1)
return this.resttimeRangeError; return this.resttimeRangeError;
@ -1985,8 +2017,8 @@ checkRestTimeCollection = (times) => {
for(let i = 1; i < start.length; i++){ for(let i = 1; i < start.length; i++){
if (start[i] <= end[i - 1]){ if (start[i] <= end[i - 1]){
message.error(getLabel('523624','休息时间不能重叠')); console && console.debug("时间有重复!");
this.resttimeRangeError = true; this.resttimeRangeError = true;
} }
} }
@ -2001,96 +2033,137 @@ checkRestTimeCollection = (times) => {
minute = 0; minute = 0;
try { try {
const d = this.toJS(this.worktimes); const d = this.toJS(this.worktimes);
let firstS; if (d.length === 1) {
let lastE; let record = d[0];
d.map((record, i) => {
let s = this.convertTimeToMoment(record.start.times), let s = this.convertTimeToMoment(record.start.times),
e = this.convertTimeToMoment(record.end.times); e = this.convertTimeToMoment(record.end.times);
i == 0 && (firstS = s); if (record.start.across === '1' && record.end.across === '1') {
if (record.start.across === "1" && record.end.across === "1") { } else if (record.end.across === '1') {
} else if (record.end.across === "1") {
e.add(1, "d"); e.add(1, "d");
} }
i == d.length - 1 && (lastE = e); minute = Math.abs(s.diff(e, "m"));
minute += Math.abs(s.diff(e, "m")); if (formParams.isresttimeopen === "1") {
}); const times = [];
if (formParams.isresttimeopen === "1") { this.restTimeCollection = this.toJS(this.restTimeCollection).map(d => {
const times = []; const {record, start, end} = d;
const wst = this.convertTimeToMoment(this.worktimes[0].start.times), const {time: restbeigin = ''} = start || {};
wet = this.convertTimeToMoment(this.worktimes[this.worktimes.length - 1].end.times); const {time: restend = ''} = end || {};
if(this.worktimes[this.worktimes.length - 1].end.across == '1') let sAcross = '0', eAcross = '0';
wet.add(1, 'd'); if (restbeigin != "" && restend != "") {
const rst = this.convertTimeToMoment(restbeigin),
this.restTimeCollection = this.toJS(this.restTimeCollection).map((d, index) => { ret = this.convertTimeToMoment(restend),
const {start, end} = d; wst = this.convertTimeToMoment(this.worktimes[0].start.times),
const {time: restbeigin = ''} = start || {}; wet = this.convertTimeToMoment(this.worktimes[0].end.times);
const {time: restend = ''} = end || {}; this.worktimes[0].end.across === '1' && wet.add(1, "d");
let sAcross = '0', eAcross = '0'; if(rst.isBefore(wst)){
if (restbeigin != "" && restend != "") { sAcross = '1';
const rst = this.convertTimeToMoment(restbeigin), rst.add(1, 'd');
ret = this.convertTimeToMoment(restend); ret.add(1, 'd');
}
if(index != 0){ if(ret.isBefore(rst)){
let lastRecord = this.restTimeCollection[index - 1]; eAcross = '1';
let le = this.convertTimeToMoment(lastRecord.end.time); ret.add(1, 'd');
d.start.accross = rst.isBefore(le) ? '1' : lastRecord.end.across;
}else{
d.start.accross = rst.isBefore(wst) ? '1' : '0';
}
d.end.accross = ret.isBefore(rst) ? '1' : d.start.accross;
console.debug(d)
d.start.accross == '1' && rst.add(1, 'd');
d.end.accross == '1' && ret.add(1, 'd');
times.push({s: rst, e: ret});
if (
rst.isBefore(wst) ||
rst.isAfter(wet) ||
ret.isBefore(wst) ||
ret.isAfter(wet) ||
rst.isSame(ret)
){
this.resttimeError = true;
message.error('休息时间不在工作时段内');
if(!rst.isSame(ret)) {
this.toJS(this.worktimes).forEach((worktime) => {
const s = this.convertTimeToMoment(worktime.start.times);
worktime.start.across == '1' && s.add(1, 'd');
const e = this.convertTimeToMoment(worktime.end.times);
worktime.end.across == '1' && e.add(1, 'd');
let ts = rst, te = ret;
if(ts.isBefore(s))
ts = s;
else if(ts.isAfter(e)){
ts = e;
}
if(te.isAfter(e))
te = e;
minute -= Math.abs(ts.diff(te, "m"));
})
} }
}else{
minute -= Math.abs(rst.diff(ret, "m"));
}
}
return d;
});
this.checkRestTimeCollection(times);
}
times.push({s: rst, e: ret});
if (
rst.isBefore(wst) ||
rst.isAfter(wet) ||
ret.isBefore(wst) ||
ret.isAfter(wet) ||
rst.isSame(ret)
) {
this.resttimeError = true;
let ts = rst, te = ret;
sAcross == '1' && ts.add(-1, 'd') && te.add(-1, 'd');
if(ts.isAfter(wet)){
ts = wet;
}else if(ts.isBefore(wst))
ts = wst;
if(te.isAfter(wet)){
te = wet;
}
minute -= Math.abs(ts.diff(te, "m"));
} else {
if (ret.isBefore(rst)) ret.add(1, "d");
minute -= Math.abs(rst.diff(ret, "m"));
}
d.start.accross = sAcross;
d.end.accross = sAcross == '1' ? '1' : eAcross;
}
return d;
});
this.checkRestTimeCollection(times);
}
this.hour = Math.floor(minute / 60);
this.minute = minute % 60;
} else {
let firstS;
let lastE;
d.map((record, i) => {
let s = this.convertTimeToMoment(record.start.times),
e = this.convertTimeToMoment(record.end.times);
i == 0 && (firstS = s);
if (record.start.across === '1' && record.end.across === '1') {
} else if (record.end.across === '1') {
e.add(1, "d");
}
i == (d.length - 1) && (lastE = e);
minute += Math.abs(s.diff(e, "m"));
});
if (formParams.isresttimeopen === "1") {
for(let i=0; i<this.worktimes.length; i++) {
const times = [];
this.restTimeCollection = this.toJS(this.restTimeCollection).map(d => {
const {record, start, end} = d;
const {time: restbeigin = ''} = start || {};
const {time: restend = ''} = end || {};
let sAcross = '0', eAcross = '0';
if (restbeigin != "" && restend != "") {
const rst = this.convertTimeToMoment(restbeigin),
ret = this.convertTimeToMoment(restend),
wst = this.convertTimeToMoment(this.worktimes[i].start.times),
wet = this.convertTimeToMoment(this.worktimes[i].end.times);
this.worktimes[0].end.across === '1' && wet.add(1, "d");
if(!(ret.isBefore(wst) || rst.isAfter(wet))){
times.push({s: rst, e: ret});
if (
rst.isBefore(wst) ||
rst.isAfter(wet) ||
ret.isBefore(wst) ||
ret.isAfter(wet) ||
rst.isSame(ret)
) {
this.resttimeError = true;
let ts = rst, te = ret;
sAcross == '1' && ts.add(-1, 'd') && te.add(-1, 'd');
if(ts.isAfter(wet)){
ts = wet;
}else if(ts.isBefore(wst))
ts = wst;
if(te.isAfter(wet)){
te = wet;
}
minute -= Math.abs(ts.diff(te, "m"));
} else {
if (ret.isBefore(rst)) ret.add(1, "d");
minute -= Math.abs(rst.diff(ret, "m"));
}
}
}
return d;
});
this.checkRestTimeCollection(times);
}
}
this.hour = Math.floor(minute / 60);
this.minute = minute % 60;
this.timeRange = Math.abs(firstS.diff(lastE, "m"));
}
this.worktime = minute; this.worktime = minute;
this.hour = Math.floor(minute / 60); } catch (ex) {}
this.minute = minute % 60;
} catch (ex) {
console.error(ex)
}
let result = i18n.label["388788"]().replace("{hour}", hour); let result = i18n.label["388788"]().replace("{hour}", hour);
result = result.replace("{minute}", minute); result = result.replace("{minute}", minute);
return result; return result;
@ -2329,7 +2402,7 @@ checkRestTimeCollection = (times) => {
isresttimeopen && isresttimeopen &&
isresttimeopen != "1")) isresttimeopen != "1"))
) {*/ ) {*/
window.e9HideFormFieldKeys.push(...["restbeigin", "restend"]); window.e9HideFormFieldKeys.push(...["restbeigin", "restend"]);
//} //}
if(halfcalrule == '0'){ if(halfcalrule == '0'){
['halfcalpoint','halfcalpoint2cross'].forEach(key=>{ ['halfcalpoint','halfcalpoint2cross'].forEach(key=>{
@ -2381,12 +2454,6 @@ checkRestTimeCollection = (times) => {
return; return;
} }
if(/*shiftonoffworkcount == "1" &&*/ isresttimeopen == '1'){ if(/*shiftonoffworkcount == "1" &&*/ isresttimeopen == '1'){
if(this.resttimeError){
message.error('休息时间不在工作时段内');
this.spinning = false;
return;
}
if(this.resttimeRangeError){ if(this.resttimeRangeError){
message.error(getLabel('523624','休息时间不能重叠')); message.error(getLabel('523624','休息时间不能重叠'));
this.spinning = false; this.spinning = false;

View File

@ -208,9 +208,10 @@ class VacationRemainStore {
return; return;
} }
if (!this.isDatasNormal()) { //#2458933# 假期余额去除条件限制
return; // if (!this.isDatasNormal()) {
} // return;
// }
const params = { const params = {
datas: JSON.stringify(this.tableListStore.tableStore.datas), datas: JSON.stringify(this.tableListStore.tableStore.datas),
@ -259,18 +260,18 @@ class VacationRemainStore {
lastname, lastname,
} = data; } = data;
//const result1 = parseFloat(baseAmountspan) + parseFloat(extraAmountspan) >= parseFloat(usedAmountspan); const result1 = parseFloat(baseAmountspan) + parseFloat(extraAmountspan) >= parseFloat(usedAmountspan);
// let result2 = true; let result2 = true;
// if (baseAmount2span !== undefined) { if (baseAmount2span !== undefined) {
// result2 = parseFloat(baseAmount2span) + parseFloat(extraAmount2span) >= parseFloat(usedAmount2span); result2 = parseFloat(baseAmount2span) + parseFloat(extraAmount2span) >= parseFloat(usedAmount2span);
// } }
// if (!(result1 && result2)) { if (!(result1 && result2)) {
// message.warning(`${getLabel(15323, '第')}${index + 1}${getLabel(27592, '行')},${lastname}${getLabel(529327, '已休年假-初始化(天)不能大于本年年假-初始化(天)+额外年假-初始化(天)')}`); message.warning(`${getLabel(15323, '第')}${index + 1}${getLabel(27592, '行')},${lastname}${getLabel(529327, '已休年假-初始化(天)不能大于本年年假-初始化(天)+额外年假-初始化(天)')}`);
// } }
return true; return result1 && result2;
}) })
} }

View File

@ -64,17 +64,30 @@ export default class SecuritySet extends React.Component {
checkboxValue, checkboxValue,
} = this.props; } = this.props;
const {userUsbType} = form.getFormParams(); const {userUsbType,usbstate,needauto} = form.getFormParams();
let arr = []; let arr = [];
isFormInit && condition.map(c => { isFormInit && condition.map(c => {
c.items.map((field, index) => { c.items.map((field, index) => {
let key = field.domkey[0]; let key = field.domkey[0];
if (userUsbType == '6' && !['userUsbType','usbstate'].includes(key)) { if (userUsbType == '6' && !['userUsbType','usbstate'].includes(key)) {
return return
} }
if(userUsbType === '7' && ['needauto', 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial', 'selectdateselect'].includes(key)) return; if (userUsbType == '901' && usbstate=='0' &&['selectdateselect' ].includes(key)) return;
if (needauto=='0' &&['selectdateselect' ].includes(key)) return;
if (userUsbType == '901' && [ 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial'].includes(key)) return;
if(userUsbType === '7' && [ 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial'].includes(key)) return;
if(userUsbType === '7' && [ 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial'].includes(key)) return;
if (!verifyTypeSelectedValue && key !== 'userUsbType') { if (!verifyTypeSelectedValue && key !== 'userUsbType') {
return; return;
@ -106,6 +119,19 @@ export default class SecuritySet extends React.Component {
if (verifyTypeSelectedValue == '3' && useTypeSelectedValue == '1' && checkboxValue == '1' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'tokenKey' && key !== 'needauto' && key !== 'selectdate' && key !== 'enableUsbType')) { if (verifyTypeSelectedValue == '3' && useTypeSelectedValue == '1' && checkboxValue == '1' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'tokenKey' && key !== 'needauto' && key !== 'selectdate' && key !== 'enableUsbType')) {
return; return;
} }
if (verifyTypeSelectedValue == '901' && checkboxValue == '0' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'needauto' && key !== 'enableUsbType')) {
return;
}
if (verifyTypeSelectedValue == '901' && useTypeSelectedValue == '0' &&key == 'needauto' ) {
return;
}
if (verifyTypeSelectedValue == '901'&& useTypeSelectedValue == '0' && key=='selectdate' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'needauto' && key !== 'enableUsbType')) {
return;
}
if(key == 'usbstate'){
if(verifyTypeSelectedValue=='901'){
field.options.splice(2,1)
}}
arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@faj67m@${index}`} arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@faj67m@${index}`}
label={key !== 'usbstate' ? `${field.label}` : ''} label={key !== 'usbstate' ? `${field.label}` : ''}

View File

@ -363,7 +363,7 @@ class ArchiveLogViewStore {
trans = (id) => { trans = (id) => {
return new Promise( (resolve,reject) => { return new Promise( (resolve,reject) => {
const params = {id}; const params = {id,isArchiveLog:1};
api.trans(params).then(datas => { api.trans(params).then(datas => {
const {info, status} = datas; const {info, status} = datas;

View File

@ -454,11 +454,12 @@ export class HrmDecentralizationAdminSet {
} }
securitySave = () => { securitySave = () => {
window.e9HideFormFieldKeys = []; window.e9HideFormFieldKeys = [];
const {form,condition}= this.securitySet; const {form,condition}= this.securitySet;
const {userUsbType} = form.getFormParams(); const {userUsbType,needauto} = form.getFormParams();
const viewAttr3keys = this.collectViewAtrr3key(condition); const viewAttr3keys = this.collectViewAtrr3key(condition);
@ -474,6 +475,12 @@ export class HrmDecentralizationAdminSet {
if (userUsbType === '7'){ if (userUsbType === '7'){
window.e9HideFormFieldKeys = viewAttr3keys; window.e9HideFormFieldKeys = viewAttr3keys;
} }
if (userUsbType === '901'&&needauto=='0'){
window.e9HideFormFieldKeys = viewAttr3keys
}if (userUsbType === '901'&&needauto=='1'){
window.e9HideFormFieldKeys = viewAttr3keys.filter(key=>key!=='selectdate')
}
this.securitySet.form.validateForm().then(f => { this.securitySet.form.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {

View File

@ -85,8 +85,19 @@ export class HrmDismissSet {
condition[0].items.forEach(item => { condition[0].items.forEach(item => {
if (item) { if (item) {
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 $.ajax({
} type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') { if (item.domkey[0] == 'changereason') {
item.otherParams = { item.otherParams = {
maxRows: 4 maxRows: 4

View File

@ -77,7 +77,28 @@ export class HrmEntryMaintenanceSet {
if (api_status) { if (api_status) {
if (condition) { if (condition) {
condition[0].items.forEach(item => item.browserConditionParam.maxLength = 100); condition[0].items.forEach(item => {
if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}});
this.content.form.initFormFields(condition); this.content.form.initFormFields(condition);
extendObservable(this.content, { extendObservable(this.content, {
condition: condition, condition: condition,

View File

@ -85,7 +85,27 @@ export class HrmFormalSet {
condition[0].items.forEach(item => { condition[0].items.forEach(item => {
if (item) { if (item) {
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}
} }
if (item.domkey[0] == 'changereason') { if (item.domkey[0] == 'changereason') {
item.otherParams = { item.otherParams = {

View File

@ -522,6 +522,7 @@ class HrmMatrixAdjust extends HrmBaseStore {
@action transferTableEditData = (dataSource, cols) => { @action transferTableEditData = (dataSource, cols) => {
const datas = [], cells = []; const datas = [], cells = [];
const replaceData = this.selectedTargetInfo.valueSpan; const replaceData = this.selectedTargetInfo.valueSpan;
const checkTargetId = this.selectedTargetInfo.value;
dataSource.map((data, i) => { dataSource.map((data, i) => {
const d = { const d = {
...data, ...data,
@ -529,9 +530,12 @@ class HrmMatrixAdjust extends HrmBaseStore {
} }
const cell = {id: d.id}; const cell = {id: d.id};
cols.map(c => { cols.map(c => {
let ids = data[c];
ids = ids.substr(1, ids.length - 2);
const replaceIndex = ids.split(',').indexOf(checkTargetId);
let key = `${c}span`, txt = data[key], found = false; let key = `${c}span`, txt = data[key], found = false;
txt = txt.split(',').reduce((pre, cur) => { txt = txt.split(',').reduce((pre, cur, index) => {
if(cur == replaceData){ if(index == replaceIndex){
found = true; found = true;
pre.push(`<span style='color: ${this.color}'>${replaceData}</span>`); pre.push(`<span style='color: ${this.color}'>${replaceData}</span>`);
Object.assign(d, { Object.assign(d, {

View File

@ -85,7 +85,27 @@ export class HrmRehireSet {
condition[0].items.forEach(item => { condition[0].items.forEach(item => {
if (item) { if (item) {
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}
} }
if (item.domkey[0] == 'changereason') { if (item.domkey[0] == 'changereason') {
item.otherParams = { item.otherParams = {

View File

@ -85,7 +85,27 @@ export class HrmRenewSet {
condition[0].items.forEach(item => { condition[0].items.forEach(item => {
if (item) { if (item) {
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}
} }
if (item.domkey[0] == 'changereason') { if (item.domkey[0] == 'changereason') {
item.otherParams = { item.otherParams = {

View File

@ -85,7 +85,27 @@ export class HrmRetireSet {
condition[0].items.forEach(item => { condition[0].items.forEach(item => {
if (item) { if (item) {
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}
} }
if (item.domkey[0] == 'changereason') { if (item.domkey[0] == 'changereason') {
item.otherParams = { item.otherParams = {

View File

@ -120,13 +120,24 @@ class SanYuanStore {
}, { }, {
passiveKey: "needauto", //自动启用 passiveKey: "needauto", //自动启用
activeKey: ["usbstate","userUsbType"], activeKey: ["usbstate","userUsbType"],
showValue: ["1","3,4"] showValue: ["1","3,4,901"]
}, { }, {
passiveKey: "enableUsbType", //启用方式 passiveKey: "enableUsbType", //启用方式
activeKey: ["needauto","userUsbType"],
showValue:[ "1","2,3,4,5,6"]
},{
passiveKey: "selectdateselect", //启用时间
activeKey: "needauto",
showValue: "1"
},{
passiveKey: "selectdate", //启用日期
activeKey: "needauto", activeKey: "needauto",
showValue: "1" showValue: "1"
}], }],
customRenderKeyList: ["selectdateselect","usbstate"],
customRenderKeyList: ["usbstate"],
} }
} }
@ -150,7 +161,7 @@ class SanYuanStore {
const { const {
userUsbType userUsbType
} = form.getFormParams(); } = form.getFormParams();
if (["3", "4","6"].includes(userUsbType)) { if (["3", "4","6","901"].includes(userUsbType)) {
const customRenderItems = this.getCustomRenderItems(["usbstate"]); const customRenderItems = this.getCustomRenderItems(["usbstate"]);
if (isEmpty(customRenderItems)) { if (isEmpty(customRenderItems)) {
return null; return null;
@ -1038,6 +1049,7 @@ class SanYuanStore {
if(usbstate && usbstate !== "1"){ if(usbstate && usbstate !== "1"){
this.formStore.form.updateFields({ this.formStore.form.updateFields({
needauto: "0" needauto: "0"
}) })
} }
} }
@ -1237,7 +1249,7 @@ class SanYuanStore {
const {userUsbType} =form.getFormParams(); const {userUsbType} =form.getFormParams();
this.formStore.conditions.map(c => c.items.map(item => { this.formStore.conditions.map(c => c.items.map(item => {
if (item.domkey[0] == 'usbstate') { if (item.domkey[0] == 'usbstate') {
item.options = (userUsbType == '6') ? this.usestateOption.slice(0,2):this.usestateOption item.options = (userUsbType == '6'||userUsbType == '901') ? this.usestateOption.slice(0,2):this.usestateOption
} }
})) }))
} }

View File

@ -1587,6 +1587,7 @@ export class HrmSecuritySetting extends HrmBaseStore {
const { defaultPasswordEnable } = formParams; const { defaultPasswordEnable } = formParams;
const save = () => { const save = () => {
const params = transParams(formParams); const params = transParams(formParams);
Object.assign(params,{defaultPassword:window.__RSAEcrypt__.rsa_data_encrypt(params.defaultPassword)})
api.saveBasicSetting(params).then(data => { api.saveBasicSetting(params).then(data => {
if (data.status === '1') { if (data.status === '1') {
this.refreshVerificationCode(); this.refreshVerificationCode();

View File

@ -85,7 +85,27 @@ export class HrmTransferSet {
if (item) { if (item) {
let key = item.domkey[0]; let key = item.domkey[0];
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}
} }
if (key == 'changereason') { if (key == 'changereason') {
item.otherParams = { item.otherParams = {

View File

@ -84,7 +84,27 @@ export class HrmTrialSet {
condition[0].items.forEach(item => { condition[0].items.forEach(item => {
if (item) { if (item) {
if (item.browserConditionParam) { if (item.browserConditionParam) {
item.browserConditionParam.maxLength = 100 if (item) {
if (item.browserConditionParam) {
$.ajax({
type: "GET",
async: false,
url: "/hrPerson/hrmTb.jsp",
dataType: "json",
success: function(data){
if(data==1){
item.browserConditionParam.maxLength = 100
}else{
item.browserConditionParam.maxLength = 100000
}
}
}) }
if (item.domkey[0] == 'changereason') {
item.otherParams = {
maxRows: 4
}
}
}
} }
if (item.domkey[0] == 'changereason') { if (item.domkey[0] == 'changereason') {
item.otherParams = { item.otherParams = {