合规项填写校验(+)
This commit is contained in:
@@ -235,7 +235,6 @@
|
||||
v-else
|
||||
:disabled="acceptShow"
|
||||
clearable
|
||||
@click.native="handlePrice(scope.row)"
|
||||
v-model="dataList[scope.$index].complianceReasons"
|
||||
placeholder="请输入合规原因"
|
||||
>
|
||||
@@ -263,7 +262,6 @@
|
||||
<el-input
|
||||
v-else
|
||||
:disabled="acceptShow"
|
||||
@click.native="handlePrice(scope.row)"
|
||||
v-model="dataList[scope.$index].noCompliance"
|
||||
placeholder="请输入不合规项目"
|
||||
>
|
||||
@@ -285,7 +283,6 @@
|
||||
</el-input>
|
||||
<el-input
|
||||
v-else
|
||||
@click.native="handlePrice(scope.row)"
|
||||
:disabled="acceptShow"
|
||||
v-model="dataList[scope.$index].countermeasures"
|
||||
placeholder="请输入应对措施"
|
||||
@@ -312,7 +309,6 @@
|
||||
class="datePickLen"
|
||||
clearable
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@click.native="handlePrice(scope.row)"
|
||||
v-model="dataList[scope.$index].completionTime"
|
||||
type="date"
|
||||
placeholder="请选择日期">
|
||||
@@ -811,18 +807,31 @@ export default {
|
||||
this.isSubmit = false
|
||||
})
|
||||
},
|
||||
handlePrice(row){
|
||||
if(row.complianceReasons !== '' || (row.noCompliance !== '' && row.countermeasures !== '' && row.completionTime !== '') || (row.complianceReasons === '' && row.noCompliance === '' && row.countermeasures === '' && row.completionTime === '')){
|
||||
this.comFlag = 0
|
||||
}else{
|
||||
this.comFlag = this.comFlag + 1
|
||||
handlePrice(){
|
||||
for (let i = 0; i < this.dataList.length; i++) {
|
||||
console.log('815',this.dataList[i])
|
||||
if (this.dataList[i].complianceReasons !== '' || (this.dataList[i].noCompliance !== '' && this.dataList[i].countermeasures !== '' && this.dataList[i].completionTime !== '') || (this.dataList[i].complianceReasons === '' && this.dataList[i].noCompliance === '' && this.dataList[i].countermeasures === '' && this.dataList[i].completionTime === '')){
|
||||
console.log('目前可以通过')
|
||||
}else {
|
||||
this.comFlag ++
|
||||
console.log('有没有输全的,不能通过',this.comFlag)
|
||||
}
|
||||
}
|
||||
|
||||
// if(row.complianceReasons !== '' || (row.noCompliance !== '' && row.countermeasures !== '' && row.completionTime !== '') || (row.complianceReasons === '' && row.noCompliance === '' && row.countermeasures === '' && row.completionTime === '')){
|
||||
// this.comFlag = 0
|
||||
// }else{
|
||||
// this.comFlag = this.comFlag + 1
|
||||
// }
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
this.handlePrice()
|
||||
if(this.comFlag > 0) {
|
||||
this.$message.warning('请填写完整的不符合项信息')
|
||||
this.comFlag = 0
|
||||
}else{
|
||||
this.$message.success('通过')
|
||||
// this.listForm.prcCreateUser = this.$store.getters.userInfo.userId;
|
||||
// this.listForm.commentText = this.commentText;
|
||||
// this.listForm.approvalOpinion = "";
|
||||
|
||||
Reference in New Issue
Block a user