Merge branch 'master' of gitee.com:beiwu/cmanager

This commit is contained in:
18500206848
2024-02-17 14:18:56 +08:00
2 changed files with 78 additions and 76 deletions

View File

@@ -309,32 +309,32 @@ export default {
// callback();
// }
// };
const wage = (rule, value, callback) => {
if(value == ""){
callback(
new Error(
"请填写参考工资"
)
);
}else if (
!/^([1-9]\d*|0)(\.\d{0,2})?$/.test(value) ||
value <= 0 ||
value > 99999
) {
callback(
new Error(
"请输入大于0且小于99999 之间的数字小数点后最多保留两位"
)
);
} else if (
this.obj.wageUnitCategory === null ||
this.obj.wageUnitCategory === undefined
) {
callback(new Error("请选择单位"));
} else {
callback();
}
};
// const wage = (rule, value, callback) => {
// if(value == ""){
// callback(
// new Error(
// "请填写参考工资"
// )
// );
// }else if (
// !/^([1-9]\d*|0)(\.\d{0,2})?$/.test(value) ||
// value <= 0 ||
// value > 99999
// ) {
// callback(
// new Error(
//
// )
// );
// } else if (
// this.obj.wageUnitCategory === null ||
// this.obj.wageUnitCategory === undefined
// ) {
// callback(new Error("请选择单位"));
// } else {
// callback();
// }
// };
const tradeId = (rule, value, callback) => {
if(this.tradeState == null || this.tradeState == undefined || this.tradeState == ""){
callback(
@@ -355,25 +355,25 @@ export default {
}
};
const workType = (rule, value, callback) => {
if(this.workTypeState == null || this.workTypeState == undefined || this.workTypeState == ""){
callback(
new Error(
"请选择工种"
)
)
}else{
if(!this.workTypeBtnState){
callback(
new Error(
"新增工种要添加后才能使用"
)
)
}else{
callback();
}
}
}
// const workType = (rule, value, callback) => {
// if(this.workTypeState == null || this.workTypeState == undefined || this.workTypeState == ""){
// callback(
// new Error(
// "请选择工种"
// )
// )
// }else{
// if(!this.workTypeBtnState){
// callback(
// new Error(
// "新增工种要添加后才能使用"
// )
// )
// }else{
// callback();
// }
// }
// }
const validatePass = (rule, value, callback)=>{
let specialKey = "[`~#$^&*()=|{}\\[\\]<>/~#¥……&*()——|{}【】《》%@‘”“']'";
let flagValue = true;
@@ -670,13 +670,15 @@ export default {
label: "工种",
// type: "tree",
prop: "worktypeIds",
formslot: true,
labelslot: false,
// formslot: true,
// labelslot: false,
rules: [
{
required: true,
validator: workType,
trigger: ["change", "blur"],
// validator: workType,
message: "请输入工种",
// trigger: ["change", "blur"],
trigger: "blur",
},
],
// dicData: self.workData,

View File

@@ -309,32 +309,32 @@ export default {
// callback();
// }
// };
const wage = (rule, value, callback) => {
if(value == ""){
callback(
new Error(
"请填写参考工资"
)
);
}else if (
!/^([1-9]\d*|0)(\.\d{0,2})?$/.test(value) ||
value <= 0 ||
value > 99999
) {
callback(
new Error(
"请输入大于0且小于99999 之间的数字小数点后最多保留两位"
)
);
} else if (
this.obj.wageUnitCategory === null ||
this.obj.wageUnitCategory === undefined
) {
callback(new Error("请选择单位"));
} else {
callback();
}
};
// const wage = (rule, value, callback) => {
// if(value == ""){
// callback(
// new Error(
// "请填写参考工资"
// )
// );
// }else if (
// !/^([1-9]\d*|0)(\.\d{0,2})?$/.test(value) ||
// value <= 0 ||
// value > 99999
// ) {
// callback(
// new Error(
//
// )
// );
// } else if (
// this.obj.wageUnitCategory === null ||
// this.obj.wageUnitCategory === undefined
// ) {
// callback(new Error("请选择单位"));
// } else {
// callback();
// }
// };
const tradeId = (rule, value, callback) => {
if(this.tradeState == null || this.tradeState == undefined || this.tradeState == ""){
callback(
@@ -1282,7 +1282,7 @@ export default {
if (type === "copy") {
this.title = "复制岗位";
detail(row.missionNo).then((res) => {
detail(row.id).then((res) => {
if (![1, 2].includes(res.wageUnitCategory)) {
res.wageUnitCategory = null;
}