|
@@ -238,7 +238,7 @@
|
|
|
prop="approveTime"
|
|
|
width="100"
|
|
|
/>
|
|
|
- <el-table-column label="审核状态" align="center" prop="audit">
|
|
|
+ <el-table-column label="审核状态" align="center" prop="approveStatus">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.audit == 0">未提交审核</span>
|
|
|
<span v-if="scope.row.audit == 1 && scope.row.approveStatus == 0"
|
|
@@ -359,12 +359,13 @@
|
|
|
@click="handleDetail(scope.row, 0)"
|
|
|
>查看</el-button
|
|
|
>
|
|
|
+ <!-- {{scope.row.collStatus}}--{{scope.row.approveStatus}} -->
|
|
|
<el-button
|
|
|
style="margin: 0 2px"
|
|
|
v-if="
|
|
|
- scope.row.collStatus == 1 &&
|
|
|
- scope.row.audit == 0 &&
|
|
|
- checkPermi(['gather:GATHER:edit'])
|
|
|
+ scope.row.collStatus == 1 && // 已采集
|
|
|
+ scope.row.approveStatus == 0 && // 未审核
|
|
|
+ checkPermi(['gather:GATHER:edit']) // 编辑权限
|
|
|
"
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -460,32 +461,29 @@
|
|
|
:label="item.normName"
|
|
|
:name="item.normName"
|
|
|
>
|
|
|
- <el-form
|
|
|
- v-for="(listItem, listIndex) in form.feeLists"
|
|
|
- :key="index + listIndex + listItem.normId"
|
|
|
- :rules="validatorList(listItem.normfeeName)"
|
|
|
- :model="listItem"
|
|
|
- :ref="'form' + listIndex"
|
|
|
- >
|
|
|
- <!-- :rules="rules" ref="form" -->
|
|
|
- <el-form-item
|
|
|
- :key="listItem.normfeeId"
|
|
|
- :label="
|
|
|
- listItem.normfeeName + '(' + listItem.funit_dictText + ')'
|
|
|
- "
|
|
|
+ <template v-for="(listItem) in form.feeLists">
|
|
|
+ <el-form
|
|
|
v-if="listItem.normId == item.normId"
|
|
|
- prop="collCalue"
|
|
|
- >
|
|
|
- <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
- <!-- :prop="listItem.normfeeId" -->
|
|
|
- <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
- <el-input
|
|
|
- v-model="listItem.collCalue"
|
|
|
- :placeholder="'请输入' + listItem.normfeeName"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
+ :rules="validatorList(listItem.normfeeName)"
|
|
|
+ :model="listItem"
|
|
|
+ :ref="'form' + listItem.normfeeId"
|
|
|
+ :key="listItem.normfeeId"
|
|
|
+ > <!-- :key="index + listIndex + listItem.normId" -->
|
|
|
+ <!-- :rules="rules" ref="form" -->
|
|
|
+ <el-form-item
|
|
|
+ :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
|
|
|
+ prop="collCalue"
|
|
|
+ >
|
|
|
+ <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
+ <!-- :prop="listItem.normfeeId" -->
|
|
|
+ <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
+ <el-input
|
|
|
+ v-model="listItem.collCalue"
|
|
|
+ :placeholder="'请输入' + listItem.normfeeName"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
<!-- 这里是第二种写法 -->
|
|
|
<!-- <el-form :model="form" label-width="300px">
|
|
|
<el-form-item
|
|
@@ -503,18 +501,15 @@
|
|
|
</el-tabs>
|
|
|
<template v-else-if="this.form.type == 1">
|
|
|
<el-form
|
|
|
- v-for="(listItem, listIndex) in form.feeLists"
|
|
|
+ v-for="(listItem) in form.feeLists"
|
|
|
:model="listItem"
|
|
|
- :ref="'form' + listIndex"
|
|
|
+ :ref="'form' + listItem.normfeeId"
|
|
|
:rules="rules"
|
|
|
- :key="listIndex"
|
|
|
+ :key="listItem.normfeeId"
|
|
|
>
|
|
|
<!-- :rules="rules" ref="form" -->
|
|
|
<el-form-item
|
|
|
- :key="listItem.normfeeId"
|
|
|
- :label="
|
|
|
- listItem.normfeeName + '(' + listItem.funit_dictText + ')'
|
|
|
- "
|
|
|
+ :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
|
|
|
prop="collCalue"
|
|
|
>
|
|
|
<!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
@@ -554,32 +549,30 @@
|
|
|
:label="item.normName"
|
|
|
:name="item.normName"
|
|
|
>
|
|
|
- <el-form
|
|
|
- v-for="(listItem, listIndex) in form.feeLists"
|
|
|
- :model="listItem"
|
|
|
- :ref="'form' + listIndex"
|
|
|
- :rules="rules"
|
|
|
- :key="listIndex"
|
|
|
- >
|
|
|
- <!-- :rules="rules" ref="form" -->
|
|
|
- <el-form-item
|
|
|
- prop="collCalue"
|
|
|
- :key="listItem.normfeeId"
|
|
|
- :label="
|
|
|
- listItem.normfeeName + '(' + listItem.funit_dictText + ')'
|
|
|
- "
|
|
|
+ <template v-for="(listItem) in form.feeLists">
|
|
|
+ <el-form
|
|
|
v-if="listItem.normId == item.normId"
|
|
|
+ :model="listItem"
|
|
|
+ :ref="'form' + listItem.normfeeId"
|
|
|
+ :rules="rules"
|
|
|
+ :key="listItem.normfeeId"
|
|
|
>
|
|
|
- <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
- <!-- :prop="listItem.normfeeId" -->
|
|
|
- <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
- <el-input
|
|
|
- :disabled="!edit"
|
|
|
- v-model="listItem.collCalue"
|
|
|
- :placeholder="'请输入' + listItem.normfeeName"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <!-- :rules="rules" ref="form" -->
|
|
|
+ <el-form-item
|
|
|
+ prop="collCalue"
|
|
|
+ :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
|
|
|
+ >
|
|
|
+ <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
+ <!-- :prop="listItem.normfeeId" -->
|
|
|
+ <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
+ <el-input
|
|
|
+ :disabled="!edit"
|
|
|
+ v-model="listItem.collCalue"
|
|
|
+ :placeholder="'请输入' + listItem.normfeeName"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
|
|
|
<!-- 这里是第二种写法 -->
|
|
|
<!-- <el-form :model="form" label-width="150px">
|
|
@@ -597,16 +590,37 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
+ <template v-else-if="this.form.type == 1">
|
|
|
+ <el-form
|
|
|
+ v-for="(listItem) in form.feeLists"
|
|
|
+ :model="listItem"
|
|
|
+ :ref="'form' + listItem.normfeeId"
|
|
|
+ :rules="rules"
|
|
|
+ :key="listItem.normfeeId"
|
|
|
+ >
|
|
|
+ <!-- :rules="rules" ref="form" -->
|
|
|
+ <el-form-item
|
|
|
+ :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
|
|
|
+ prop="collCalue"
|
|
|
+ >
|
|
|
+ <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
+ <!-- :prop="listItem.normfeeId" -->
|
|
|
+ <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
+ <el-input
|
|
|
+ v-model="listItem.collCalue"
|
|
|
+ :placeholder="'请输入' + listItem.normfeeName"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!--
|
|
|
<el-form :model="form" v-else-if="this.form.type == 1">
|
|
|
- <!-- :rules="rules" ref="form" -->
|
|
|
<el-form-item
|
|
|
v-for="(listItem, listIndex) in form.feeLists"
|
|
|
:key="listIndex"
|
|
|
:label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
|
|
|
>
|
|
|
- <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
- <!-- :prop="listItem.normfeeId" -->
|
|
|
- <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
<el-input
|
|
|
:disabled="!edit"
|
|
|
v-model="listItem.collCalue"
|
|
@@ -614,6 +628,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ -->
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm('edit')" v-if="edit"
|
|
|
>确 定</el-button
|
|
@@ -754,7 +769,7 @@ export default {
|
|
|
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
|
|
|
if (!reg.test(value)) {
|
|
|
callback(new Error("请输入数字和正确格式的数字"));
|
|
|
- } else if (value.split(".").length > 2) {
|
|
|
+ } else if (typeof value == 'string' && value.split(".").length > 2) {
|
|
|
callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
|
|
|
}
|
|
|
// else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
|
|
@@ -768,7 +783,7 @@ export default {
|
|
|
let reg = /^[+]?(0|([1-9]\d*))(\.\d+)?$/g;
|
|
|
if (!reg.test(value)) {
|
|
|
callback(new Error("请输入正数和正确格式的数字"));
|
|
|
- } else if (value.split(".").length > 2) {
|
|
|
+ } else if (typeof value == 'string' && value.split(".").length > 2) {
|
|
|
callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
|
|
|
}
|
|
|
// else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
|
|
@@ -1137,7 +1152,8 @@ export default {
|
|
|
let p = [];
|
|
|
p = this.form.feeLists.map((item, index) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$refs["form" + index][0].validate((valid) => {
|
|
|
+ this.$refs["form" + item.normfeeId][0].validate((valid) => {
|
|
|
+ // this.$refs["form" + index].validate((valid) => {
|
|
|
if (valid) {
|
|
|
resolve(); //完成态
|
|
|
} else {
|
|
@@ -1164,6 +1180,7 @@ export default {
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
+ debugger;
|
|
|
this.$message.error("请检查是否有必填项未输入!");
|
|
|
});
|
|
|
},
|