Răsfoiți Sursa

年审 下一步

lining 5 ani în urmă
părinte
comite
8ba49caf76

+ 178 - 27
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/bassicoperation.vue

@@ -479,10 +479,10 @@
               </span>
             </div>
 
-            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert">
+            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert"  :rules="rulesnum">
               <el-row>
                 <el-col :span="8">
-                  <el-form-item label="企业员工总数">
+                  <el-form-item label="企业员工总数" prop="WorkerTotal">
                     <el-input-number v-model="formDataCert.WorkerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -503,7 +503,7 @@
                 </el-col>
 
                 <el-col :span="8">
-                  <el-form-item label="技术、管理人员数量">
+                  <el-form-item label="技术、管理人员数量" prop="TechnicalNum">
                     <el-input-number v-model="formDataCert.TechnicalNum" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -545,7 +545,7 @@
                 </el-col>
 
                 <el-col :span="8">
-                  <el-form-item label="技术工人总数">
+                  <el-form-item label="技术工人总数" prop="SkillerTotal">
                     <el-input-number v-model="formDataCert.SkillerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -676,6 +676,29 @@
           </el-card>
         </el-tab-pane>
       </el-tabs>
+
+      <div style="float: right; margin: 20px;">
+        <el-button ref="floatNxtBtn"
+                   type="primary"
+                   plain
+                   size="mini"
+                   @click="backTab"
+                   v-if="parseInt(activeName) > 0">
+          上一步</el-button>
+        <el-button ref="floatBtn"
+                   type="primary"
+                   plain
+                   size="mini"
+                   @click="nextTab"
+                   v-if="parseInt(activeName) < totalTab">下一步</el-button>
+        <el-button type="primary"
+                   size="mini"
+                   @click="commitfenban()"
+                   v-if="IsCompanyUser == 1 && parseInt(activeName)==3">
+          提交
+        </el-button>
+      </div>
+
     </el-card>
     <el-dialog title="变更项查看" :visible.sync="myitemsshow" width="780px">
       <el-table :data="InfoData" border style="width: 100%">
@@ -992,7 +1015,32 @@ import apiCert from '@/api/oilsupplier/suppliercert'
           }
         }
       }
+
+      var checkWorkerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('企业员工总数必须大于0'))
+        } else {
+          callback()
+        }
+      }
+      var checkTechnicalNum = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('技术、管理人员数量必须大于0'))
+        } else {
+          callback()
+        }
+      }
+      var checkSkillerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('技术工人总数必须大于0'))
+        } else {
+          callback()
+        }
+      }
       return {
+        IsCompanyUser: 0,
+        totalTab: 4,
+        activeName: '0',
         sizeProject: 10,
         currentPageProject: 1,
         currentItemCountProject: 0,
@@ -1041,7 +1089,6 @@ import apiCert from '@/api/oilsupplier/suppliercert'
           value: '0',
           label: '否'
         }],
-        activeName: '0',
         orgtreelist: [],
         formannData: {},
         GradeOptions: [{
@@ -1383,6 +1430,23 @@ import apiCert from '@/api/oilsupplier/suppliercert'
             trigger: 'blur'
           }]
         },
+        rulesnum: {
+          WorkerTotal: [{
+            required: true,
+            validator: checkWorkerTotal,
+            trigger: 'blur'
+          }],
+          TechnicalNum: [{
+            required: true,
+            validator: checkTechnicalNum,
+            trigger: 'blur'
+          }],
+          SkillerTotal: [{
+            required: true,
+            validator: checkSkillerTotal,
+            trigger: 'blur'
+          }]
+        },
         SubfileForm: {
           Id: '',
           SupplierId: '',
@@ -1422,6 +1486,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
       }
     },
     created () {
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       this.serviceId = this.$route.params.opera
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
@@ -1445,6 +1510,78 @@ import apiCert from '@/api/oilsupplier/suppliercert'
       this.getsubfile()
     },
     methods: {
+      // Tab
+      nextTab () {
+        let valid = true
+        if (this.Status <= 0 && this.activeName === '0') {
+          valid = this.saveEntity()
+        } else if (this.Status <= 0 && this.activeName === '1') {
+          // valid = this.updateNumberEntity()
+          // valid = true// 没办法中的办法
+          if (this.formDataCert.WorkerTotal <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '企业员工总数必须大于0'
+            })
+            return
+          }
+          if (this.formDataCert.TechnicalNum <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '技术、管理人员数量必须大于0'
+            })
+            return
+          }
+          if (this.formDataCert.SkillerTotal <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '技术工人总数必须大于0'
+            })
+            return
+          }
+          if (!this.CheckCompanyBase()) {
+            return
+          }
+          this.formDataCert.InStyle = this.formData.InStyle
+          api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(
+            res => {
+              if (res.data.code === 0) {
+                // 保存成功后,初始化数据,变成修改
+                this.initDatas()
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+            console.error(err)
+          })
+        }
+        if (!valid) {
+          return false
+        }
+        let activeIdx = parseInt(this.activeName)
+        if (activeIdx < this.totalTab) {
+          this.activeName = (activeIdx + 1) + ''
+        } else {
+          this.activeName = '0'
+        }
+        document.querySelector('.content').scrollTop = 0
+      },
+      backTab () {
+        let activeIdx = parseInt(this.activeName)
+        if (activeIdx > 0) {
+          this.activeName = (activeIdx - 1) + ''
+        } else {
+          this.activeName = this.totalTab + ''
+        }
+        document.querySelector('.content').scrollTop = 0
+      },
       // 资质变更相关
       lineheight (list) {
         return list * 23 + ''
@@ -2262,29 +2399,43 @@ import apiCert from '@/api/oilsupplier/suppliercert'
 
       // 保存信息
       saveEntity () {
-        let AllInfochangeItemList = {
-          SupplierId: this.formData.Id + '',
-          MInfoId: this.annualId,
-          InfochangeForm: this.infochangeItemList
-        }
-        console.log('----', AllInfochangeItemList)
-        annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            // 保存成功后,初始化数据,变成修改
-            this.initDatas()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
-          }
-        }).catch(err => {
-          console.error(err)
+        let valid1 = false
+        let valid2 = false
+        this.$refs['EntityForm'].validate((valid) => {
+          valid1 = valid
+        })
+
+        this.$refs['EntityFormCert'].validate((valid) => {
+          valid2 = valid
         })
+        if (valid1 && valid2) {
+          let AllInfochangeItemList = {
+            SupplierId: this.formData.Id + '',
+            MInfoId: this.annualId,
+            InfochangeForm: this.infochangeItemList
+          }
+          console.log('----', AllInfochangeItemList)
+          annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              // 保存成功后,初始化数据,变成修改
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+          return true
+        } else {
+          return false
+        }
       },
 
       CheckCompanyBase () {

+ 176 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/goodsoperation.vue

@@ -562,10 +562,10 @@
               </span>
             </div>
 
-            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert">
+            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert"  :rules="rulesnum">
               <el-row>
                 <el-col :span="8">
-                  <el-form-item label="企业员工总数">
+                  <el-form-item label="企业员工总数" prop="WorkerTotal">
                     <el-input-number v-model="formDataCert.WorkerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -586,7 +586,7 @@
                 </el-col>
 
                 <el-col :span="8">
-                  <el-form-item label="技术、管理人员数量">
+                  <el-form-item label="技术、管理人员数量" prop="TechnicalNum">
                     <el-input-number v-model="formDataCert.TechnicalNum" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -628,7 +628,7 @@
                 </el-col>
 
                 <el-col :span="8">
-                  <el-form-item label="技术工人总数">
+                  <el-form-item label="技术工人总数" prop="SkillerTotal">
                     <el-input-number v-model="formDataCert.SkillerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -762,6 +762,29 @@
           </el-card>
         </el-tab-pane>
       </el-tabs>
+
+      <div style="float: right; margin: 20px;">
+        <el-button ref="floatNxtBtn"
+                   type="primary"
+                   plain
+                   size="mini"
+                   @click="backTab"
+                   v-if="parseInt(activeName) > 0">
+          上一步</el-button>
+        <el-button ref="floatBtn"
+                   type="primary"
+                   plain
+                   size="mini"
+                   @click="nextTab"
+                   v-if="parseInt(activeName) < totalTab">下一步</el-button>
+        <el-button type="primary"
+                   size="mini"
+                   @click="commitfenban()"
+                   v-if="IsCompanyUser == 1 && parseInt(activeName)==3">
+          提交
+        </el-button>
+      </div>
+
     </el-card>
     <el-dialog title="提交申请" :visible.sync="addshow" width="520px">
       <el-form label-width="90px" :model="entityForm" :rules="rules" ref="EntityFormref">
@@ -1093,7 +1116,31 @@
           }
         }
       }
+      var checkWorkerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('企业员工总数必须大于0'))
+        } else {
+          callback()
+        }
+      }
+      var checkTechnicalNum = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('技术、管理人员数量必须大于0'))
+        } else {
+          callback()
+        }
+      }
+      var checkSkillerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('技术工人总数必须大于0'))
+        } else {
+          callback()
+        }
+      }
       return {
+        IsCompanyUser: 0,
+        totalTab: 4,
+        activeName: '0',
         loading: false,
         ProfAuditThen: '',
         shenheForm: {
@@ -1165,7 +1212,6 @@
         formannData: {},
         audithistoryshow: false,
         chooseAuditorVisible: false,
-        activeName: '0',
         orgtreelist: [],
         orgtreeprops: {
           value: 'id',
@@ -1486,6 +1532,23 @@
             trigger: 'blur'
           }]
         },
+        rulesnum: {
+          WorkerTotal: [{
+            required: true,
+            validator: checkWorkerTotal,
+            trigger: 'blur'
+          }],
+          TechnicalNum: [{
+            required: true,
+            validator: checkTechnicalNum,
+            trigger: 'blur'
+          }],
+          SkillerTotal: [{
+            required: true,
+            validator: checkSkillerTotal,
+            trigger: 'blur'
+          }]
+        },
         SubfileForm: {
           Id: '',
           SupplierId: '',
@@ -1534,6 +1597,7 @@
       this.annualId = this.$route.query.annualId
       this.getstatus(this.annualId)
       this.WorkflowId = this.$route.query.WorkflowId + ''
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       this.getDictOptions()
       this.formData.Id = this.serviceId
       this.initDatas()
@@ -1549,6 +1613,78 @@
       this.getsubfile()
     },
     methods: {
+      // Tab
+      nextTab () {
+        let valid = true
+        if (this.Status <= 0 && this.activeName === '0') {
+          valid = this.saveinfochange()
+        } else if (this.Status <= 0 && this.activeName === '1') {
+          // valid = this.updateNumberEntity()
+          // valid = true// 没办法中的办法
+          if (this.formDataCert.WorkerTotal <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '企业员工总数必须大于0'
+            })
+            return
+          }
+          if (this.formDataCert.TechnicalNum <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '技术、管理人员数量必须大于0'
+            })
+            return
+          }
+          if (this.formDataCert.SkillerTotal <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '技术工人总数必须大于0'
+            })
+            return
+          }
+          if (!this.CheckCompanyBase()) {
+            return
+          }
+          this.formDataCert.InStyle = this.formData.InStyle
+          api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(
+            res => {
+              if (res.data.code === 0) {
+                // 保存成功后,初始化数据,变成修改
+                this.initDatas()
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+            console.error(err)
+          })
+        }
+        if (!valid) {
+          return false
+        }
+        let activeIdx = parseInt(this.activeName)
+        if (activeIdx < this.totalTab) {
+          this.activeName = (activeIdx + 1) + ''
+        } else {
+          this.activeName = '0'
+        }
+        document.querySelector('.content').scrollTop = 0
+      },
+      backTab () {
+        let activeIdx = parseInt(this.activeName)
+        if (activeIdx > 0) {
+          this.activeName = (activeIdx - 1) + ''
+        } else {
+          this.activeName = this.totalTab + ''
+        }
+        document.querySelector('.content').scrollTop = 0
+      },
       fenbanBtn () {
         this.shenheForm.AnnualId = parseInt(this.annualId)
         this.addshow = true
@@ -2374,29 +2510,43 @@
 
       // 保存信息
       saveinfochange () {
-        let AllInfochangeItemList = {
-          SupplierId: this.formData.Id + '',
-          MInfoId: this.annualId,
-          InfochangeForm: this.infochangeItemList
-        }
+        let valid1 = false
+        let valid2 = false
+        this.$refs['EntityForm'].validate((valid) => {
+          valid1 = valid
+        })
 
-        annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            // 保存成功后,初始化数据,变成修改
-            this.initDatas()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
-          }
-        }).catch(err => {
-          console.error(err)
+        this.$refs['EntityFormCert'].validate((valid) => {
+          valid2 = valid
         })
+        if (valid1 && valid2) {
+          let AllInfochangeItemList = {
+            SupplierId: this.formData.Id + '',
+            MInfoId: this.annualId,
+            InfochangeForm: this.infochangeItemList
+          }
+
+          annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              // 保存成功后,初始化数据,变成修改
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+          return true
+        } else {
+          return false
+        }
       },
 
       updateEntity () {

+ 202 - 25
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -392,10 +392,10 @@
               </span>
             </div>
 
-            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert">
+            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert" :rules="rulesnum">
               <el-row>
                 <el-col :span="8">
-                  <el-form-item label="企业员工总数">
+                  <el-form-item label="企业员工总数" prop="WorkerTotal">
                     <el-input-number v-model="formDataCert.WorkerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -458,7 +458,7 @@
                 </el-col>
 
                 <el-col :span="8">
-                  <el-form-item label="技术工人总数">
+                  <el-form-item label="技术工人总数" prop="SkillerTotal">
                     <el-input-number v-model="formDataCert.SkillerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -594,6 +594,29 @@
           </el-card>
         </el-tab-pane>
       </el-tabs>
+
+      <div style="float: right; margin: 20px;">
+        <el-button ref="floatNxtBtn"
+                   type="primary"
+                   plain
+                   size="mini"
+                   @click="backTab"
+                   v-if="parseInt(activeName) > 0">
+          上一步</el-button>
+        <el-button ref="floatBtn"
+                   type="primary"
+                   plain
+                   size="mini"
+                   @click="nextTab"
+                   v-if="parseInt(activeName) < totalTab">下一步</el-button>
+        <el-button type="primary"
+                   size="mini"
+                   @click="commitfenban()"
+                   v-if="IsCompanyUser == 1 && parseInt(activeName)==3">
+          提交
+        </el-button>
+      </div>
+
     </el-card>
     <el-dialog title="提交审批" :visible.sync="addshow" width="520px">
       <el-form label-width="90px" :model="entityForm" :rules="rules" ref="EntityFormref">
@@ -911,7 +934,31 @@
         }
       }
 
+      var checkWorkerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('企业员工总数必须大于0'))
+        } else {
+          callback()
+        }
+      }
+      var checkTechnicalNum = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('技术、管理人员数量必须大于0'))
+        } else {
+          callback()
+        }
+      }
+      var checkSkillerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          callback(new Error('技术工人总数必须大于0'))
+        } else {
+          callback()
+        }
+      }
       return {
+        IsCompanyUser: 0,
+        totalTab: 4,
+        activeName: '0',
         loading: false,
         sizeProject: 10,
         currentPageProject: 1,
@@ -1142,7 +1189,6 @@
         secauditerOptions: [],
         audithistoryshow: false,
         chooseAuditorVisible: false,
-        activeName: '0',
         orgtreelist: [],
         auditform: {
           FirstAuditName: '',
@@ -1300,6 +1346,23 @@
             trigger: 'blur'
           }]
         },
+        rulesnum: {
+          WorkerTotal: [{
+            required: true,
+            validator: checkWorkerTotal,
+            trigger: 'blur'
+          }],
+          TechnicalNum: [{
+            required: true,
+            validator: checkTechnicalNum,
+            trigger: 'blur'
+          }],
+          SkillerTotal: [{
+            required: true,
+            validator: checkSkillerTotal,
+            trigger: 'blur'
+          }]
+        },
         SubfileForm: {
           Id: '',
           SupplierId: '',
@@ -1348,6 +1411,7 @@
       this.Status = this.$route.query.Status + ''
       this.Step = parseInt(this.$route.query.Step)
       this.WorkflowId = this.$route.query.WorkflowId + ''
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       this.getDictOptions()
       this.formData.Id = this.serviceId
       this.initDatas()
@@ -1362,6 +1426,105 @@
       this.getsubfile()
     },
     methods: {
+      // Tab
+      nextTab () {
+        // if (this.formData.AuditIndex > 0) {
+        //   this.totalTab = 4
+        // }
+        // if (this.formDataCert.Status > 0) {
+        //   this.totalTab = 4
+        // }
+        // if (this.formDataCert.Status < 0) {
+        //   this.totalTab = 4
+        // }
+        // if (this.formDataCert.Status >= 5) {
+        //   this.totalTab = 5
+        // }
+
+        let valid = true
+        if (this.Status <= 0 && this.activeName === '0') {
+          valid = this.saveinfochange()
+        } else if (this.Status <= 0 && this.activeName === '1') {
+          // valid = this.updateNumberEntity()
+          // valid = true// 没办法中的办法
+          if (this.formDataCert.WorkerTotal <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '企业员工总数必须大于0'
+            })
+            return
+          }
+          if (this.formDataCert.TechnicalNum <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '技术、管理人员数量必须大于0'
+            })
+            return
+          }
+          if (this.formDataCert.SkillerTotal <= 0) {
+            this.$message({
+              type: 'warning',
+              message: '技术工人总数必须大于0'
+            })
+            return
+          }
+          if (!this.CheckCompanyBase()) {
+            return
+          }
+          this.formDataCert.InStyle = this.formData.InStyle
+          api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(
+            res => {
+              if (res.data.code === 0) {
+                // 保存成功后,初始化数据,变成修改
+                this.initDatas()
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+            console.error(err)
+          })
+        }
+        if (!valid) {
+          return false
+        }
+        let activeIdx = parseInt(this.activeName)
+        if (activeIdx < this.totalTab) {
+          this.activeName = (activeIdx + 1) + ''
+        } else {
+          this.activeName = '0'
+        }
+        document.querySelector('.content').scrollTop = 0
+      },
+      backTab () {
+        // if (this.formData.AuditIndex > 0) {
+        //   this.totalTab = 4
+        // }
+        // if (this.formDataCert.Status > 0) {
+        //   this.totalTab = 4
+        // }
+        // if (this.formDataCert.Status < 0) {
+        //   this.totalTab = 4
+        // }
+        // if (this.formDataCert.Status >= 5) {
+        //   this.totalTab = 5
+        // }
+
+        let activeIdx = parseInt(this.activeName)
+        if (activeIdx > 0) {
+          this.activeName = (activeIdx - 1) + ''
+        } else {
+          this.activeName = this.totalTab + ''
+        }
+        document.querySelector('.content').scrollTop = 0
+      },
+
       // 资质变更相关
       lineheight (list) {
         return list * 23 + ''
@@ -2201,28 +2364,42 @@
 
       // 保存信息
       saveinfochange () {
-        let AllInfochangeItemList = {
-          SupplierId: this.formData.Id + '',
-          MInfoId: this.annualId,
-          InfochangeForm: this.infochangeItemList
-        }
-        annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            // 保存成功后,初始化数据,变成修改
-            this.initDatas()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
-          }
-        }).catch(err => {
-          console.error(err)
+        let valid1 = false
+        let valid2 = false
+        this.$refs['EntityForm'].validate((valid) => {
+          valid1 = valid
         })
+
+        this.$refs['EntityFormCert'].validate((valid) => {
+          valid2 = valid
+        })
+        if (valid1 && valid2) {
+          let AllInfochangeItemList = {
+            SupplierId: this.formData.Id + '',
+            MInfoId: this.annualId,
+            InfochangeForm: this.infochangeItemList
+          }
+          annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              // 保存成功后,初始化数据,变成修改
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+          return true
+        } else {
+          return false
+        }
       },
 
       GradeChange (val) {