|
@@ -238,12 +238,12 @@
|
|
|
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">审核中</span>
|
|
|
- <span v-if="scope.row.audit == 2">审核通过</span>
|
|
|
- <span v-if="scope.row.audit == 3">审核拒绝</span>
|
|
|
+ <span v-if="scope.row.approveStatus == 0">未提交审核</span>
|
|
|
+ <span v-if="scope.row.approveStatus == 1">审核中</span>
|
|
|
+ <span v-if="scope.row.approveStatus == 2">审核通过</span>
|
|
|
+ <span v-if="scope.row.approveStatus == 3">审核拒绝</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -351,12 +351,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"
|
|
@@ -452,32 +453,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, listIndex) 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
|
|
@@ -497,15 +495,13 @@
|
|
|
<el-form
|
|
|
v-for="(listItem, listIndex) in form.feeLists"
|
|
|
:model="listItem"
|
|
|
- :ref="'form' + listIndex"
|
|
|
+ :ref="'form' + listItem.normfeeId"
|
|
|
:rules="rules"
|
|
|
+ :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"
|
|
|
>
|
|
|
<!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
@@ -545,31 +541,30 @@
|
|
|
:label="item.normName"
|
|
|
:name="item.normName"
|
|
|
>
|
|
|
- <el-form
|
|
|
- v-for="(listItem, listIndex) in form.feeLists"
|
|
|
- :model="listItem"
|
|
|
- :ref="'form' + listIndex"
|
|
|
- :rules="rules"
|
|
|
- >
|
|
|
- <!-- :rules="rules" ref="form" -->
|
|
|
- <el-form-item
|
|
|
- prop="collCalue"
|
|
|
- :key="listItem.normfeeId"
|
|
|
- :label="
|
|
|
- listItem.normfeeName + '(' + listItem.funit_dictText + ')'
|
|
|
- "
|
|
|
+ <template v-for="(listItem, listIndex) 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">
|
|
@@ -587,16 +582,37 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
+ <template v-else-if="this.form.type == 1">
|
|
|
+ <el-form
|
|
|
+ v-for="(listItem, listIndex) 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="listItem.normfeeId"
|
|
|
:label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
|
|
|
>
|
|
|
- <!-- 这里科研失败!想动态绑定校验规则的 -->
|
|
|
- <!-- :prop="listItem.normfeeId" -->
|
|
|
- <!-- :rules="rules.listItem.normfeeId" -->
|
|
|
<el-input
|
|
|
:disabled="!edit"
|
|
|
v-model="listItem.collCalue"
|
|
@@ -604,6 +620,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
|
|
@@ -738,7 +755,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) {
|
|
@@ -752,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) {
|
|
@@ -1121,7 +1138,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 {
|
|
@@ -1148,6 +1166,7 @@ export default {
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
+ debugger;
|
|
|
this.$message.error("请检查是否有必填项未输入!");
|
|
|
});
|
|
|
},
|