Pārlūkot izejas kodu

增项资质必须提交判断

huahaiyan 6 gadi atpakaļ
vecāks
revīzija
dc371b161b

+ 33 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -23,11 +23,11 @@
             <!-- <el-button slot="reference" plain size="mini" style="margin-right: 8px">查看进度</el-button> -->
           </el-popover>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="AuditdialogShow = true"
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitaudit"
             v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审批
           </el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="ComAuditdialogShow = true"
-            v-if="formData.Id !='' && formData.Status == 0 && IsCompanyUser == 1">分办
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
+            v-if="formData.Id !='' && formData.Status == 0 && IsCompanyUser == 1">提交分办
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -811,6 +811,36 @@ import fileapi from '@/api/oilsupplier/supplierfile'
         let fileurl = fileurlall.split('|')
         return fileurl[0]
       },
+      commitaudit () {
+        if (this.subfileList && this.subfileList.length > 0) {
+          for (var i = 0; i < this.subfileList.length; i++) {
+            if (this.subfileList[i].FileType === 1 && this.subfileList[i].FileUrl === '') {
+              this.$message({
+                type: 'warning',
+                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+              })
+              return
+            }
+          }
+        } else {
+          this.AuditdialogShow = true
+        }
+      },
+      commitfenban () {
+        if (this.subfileList && this.subfileList.length > 0) {
+          for (var i = 0; i < this.subfileList.length; i++) {
+            if (this.subfileList[i].FileType === 1 && this.subfileList[i].FileUrl === '') {
+              this.$message({
+                type: 'warning',
+                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+              })
+              return
+            }
+          }
+        } else {
+          this.ComAuditdialogShow = true
+        }
+      },
       openDialog (val) {
         this.SubfileForm.Id = val.Id
         this.SubfileForm.SupplierId = val.SupplierId

+ 33 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -23,10 +23,10 @@
             <!-- <el-button slot="reference" plain size="mini" style="margin-right: 8px">查看进度</el-button> -->
           </el-popover>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="AuditdialogShow = true"
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitaudit"
             v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审批
           </el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="ComAuditdialogShow = true"
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
             v-if="formData.Id !='' && formData.Status == 0 && IsCompanyUser == 1">提交分办
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/goodslist'">
@@ -785,6 +785,37 @@ import uploadajax from '@/assets/js//uploadajax.js'
         this.getCodeById(item[item.length - 1]) // 根据分类Id获取Code
       },
 
+      commitaudit () {
+        if (this.subfileList && this.subfileList.length > 0) {
+          for (var i = 0; i < this.subfileList.length; i++) {
+            if (this.subfileList[i].FileType === 1 && this.subfileList[i].FileUrl === '') {
+              this.$message({
+                type: 'warning',
+                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+              })
+              return
+            }
+          }
+        } else {
+          this.AuditdialogShow = true
+        }
+      },
+      commitfenban () {
+        if (this.subfileList && this.subfileList.length > 0) {
+          for (var i = 0; i < this.subfileList.length; i++) {
+            if (this.subfileList[i].FileType === 1 && this.subfileList[i].FileUrl === '') {
+              this.$message({
+                type: 'warning',
+                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+              })
+              return
+            }
+          }
+        } else {
+          this.ComAuditdialogShow = true
+        }
+      },
+
       // 根据分类Id获取Code
       getCodeById (Id) {
         let _this = this

+ 33 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -23,10 +23,10 @@
             <!-- <el-button slot="reference" plain size="mini" style="margin-right: 8px">查看进度</el-button> -->
           </el-popover>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="AuditdialogShow = true"
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitaudit"
             v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审批
           </el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="ComAuditdialogShow = true"
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
             v-if="formData.Id !='' && formData.Status == 0 && IsCompanyUser == 1">提交分办
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/techlist'">
@@ -824,6 +824,37 @@ import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
             console.error(err)
           })
       },
+
+      commitaudit () {
+        if (this.subfileList && this.subfileList.length > 0) {
+          for (var i = 0; i < this.subfileList.length; i++) {
+            if (this.subfileList[i].FileType === 1 && this.subfileList[i].FileUrl === '') {
+              this.$message({
+                type: 'warning',
+                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+              })
+              return
+            }
+          }
+        } else {
+          this.AuditdialogShow = true
+        }
+      },
+      commitfenban () {
+        if (this.subfileList && this.subfileList.length > 0) {
+          for (var i = 0; i < this.subfileList.length; i++) {
+            if (this.subfileList[i].FileType === 1 && this.subfileList[i].FileUrl === '') {
+              this.$message({
+                type: 'warning',
+                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+              })
+              return
+            }
+          }
+        } else {
+          this.ComAuditdialogShow = true
+        }
+      },
       makesure () {
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           // 上传附件是否完成判断