|
@@ -85,9 +85,7 @@
|
|
|
<el-form-item label="指标参数名称" prop='fname'>
|
|
|
<el-input v-model="form.fname"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="指标参数" prop='fvalue'>
|
|
|
- <el-input v-model="form.fvalue"></el-input>
|
|
|
- </el-form-item>
|
|
|
+
|
|
|
|
|
|
<el-form-item label="采集公差上下公差占比" prop='dfRetio'>
|
|
|
<el-input v-model="form.dfRetio"></el-input>
|
|
@@ -97,13 +95,6 @@
|
|
|
<el-input v-model="form.msRetio"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- <el-form-item label="明细类型" prop='type'>
|
|
|
- <template>
|
|
|
- <el-radio v-model="form.type" label="2">采集分类</el-radio>
|
|
|
- <el-radio v-model="form.type" label="1">绩效分类</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item> -->
|
|
|
-
|
|
|
<el-form-item label='采集参考值' prop='collValue'>
|
|
|
<el-input v-model="form.collValue"></el-input>
|
|
|
</el-form-item>
|
|
@@ -112,9 +103,6 @@
|
|
|
<el-input v-model="form.meritsValue"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- <el-form-item v-if="form.type == 1" key="1" label="采集参考值">
|
|
|
- <el-input v-model="form.collValue"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
|
|
|
<el-form-item label="备注">
|
|
|
<el-input type="textarea" v-model="form.remark"></el-input>
|
|
@@ -222,17 +210,20 @@ export default {
|
|
|
funit: [
|
|
|
{ required: true, message: "计量单位不能为空", trigger: "blur" }
|
|
|
],
|
|
|
- fvalue: [
|
|
|
- { required: true, message: "指标参数不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
dfRetio: [
|
|
|
- { required: true, message: "公差占比", trigger: "blur" }
|
|
|
+ { required: true, message: "公差占比不能为空", trigger: "blur" }
|
|
|
],
|
|
|
type: [
|
|
|
- { required: true, message: "明细类型", trigger: "blur" }
|
|
|
+ { required: true, message: "明细类型不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ msRetio: [
|
|
|
+ { required: true, message: "绩效公差上下公差占比不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ collValue: [
|
|
|
+ { required: true, message: "采集参考值不能为空", trigger: "blur" }
|
|
|
],
|
|
|
- msRetio:[
|
|
|
- { required: true, message: "明细类型", trigger: "blur" }
|
|
|
+ meritsValue: [
|
|
|
+ { required: true, message: "绩效参考值不能为空", trigger: "blur" }
|
|
|
],
|
|
|
},
|
|
|
unitSel: null,
|
|
@@ -290,7 +281,6 @@ export default {
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- // console.log(this.queryParams.status);
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
@@ -308,9 +298,6 @@ export default {
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.open = true;
|
|
|
- // addNORMFEE().then(() => {
|
|
|
- // console.log("res");
|
|
|
- // })
|
|
|
this.reset();
|
|
|
this.title = "添加指标权重明细";
|
|
|
},
|
|
@@ -322,7 +309,6 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.form = row;
|
|
|
- console.log(response);
|
|
|
this.title = "修改指标权重明细";
|
|
|
});
|
|
|
},
|
|
@@ -330,12 +316,36 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
this.form.status = 1;
|
|
|
- if (this.form.type == 2) {
|
|
|
- this.form.collValue = null;
|
|
|
- } else {
|
|
|
- this.form.meritsValue = null;
|
|
|
- }
|
|
|
if (valid) {
|
|
|
+ if (!(parseInt(this.form.fnumber) == this.form.fnumber || parseFloat(this.form.fnumber) == this.form.fnumber)) {
|
|
|
+ this.$message.error('权数必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(parseInt(this.form.normRatio) == this.form.normRatio || parseFloat(this.form.normRatio) == this.form.normRatio)) {
|
|
|
+ this.$message.error('分类占比必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(parseInt(this.form.fname) == this.form.fname || parseFloat(this.form.fname) == this.form.fname)) {
|
|
|
+ this.$message.error('指标参数名称必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(parseInt(this.form.meritsValue) == this.form.meritsValue || parseFloat(this.form.meritsValue) == this.form.meritsValue)) {
|
|
|
+ this.$message.error('绩效参考值必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(parseInt(this.form.collValue) == this.form.collValue || parseFloat(this.form.collValue) == this.form.collValue)) {
|
|
|
+ this.$message.error('采集参考值必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(parseInt(this.form.dfRetio) == this.form.dfRetio || parseFloat(this.form.dfRetio) == this.form.dfRetio)) {
|
|
|
+ this.$message.error('采集公差上下公差占比必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(parseInt(this.form.msRetio) == this.form.msRetio || parseFloat(this.form.msRetio) == this.form.msRetio)) {
|
|
|
+ this.$message.error('绩效公差上下公差占比必须为整数或小数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
this.form.normId = this.normId;
|
|
|
this.form.status = 1;
|
|
|
// if (this.form.id != null) {
|
|
@@ -399,10 +409,5 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- // watch:{
|
|
|
- // normId:(newV)=>{
|
|
|
- // console.log(newV,"---");
|
|
|
- // }
|
|
|
- // }
|
|
|
};
|
|
|
</script>
|