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

View File

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