浏览代码

年审提交

lining 5 年之前
父节点
当前提交
40d14a78f3

+ 6 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -942,6 +942,12 @@ func (this *AnnualAuditController) AnnualAudit() {
 			svc.UpdateEntityByIdCols(dataother.AnnualId, list, cols)
 		}
 	}
+	if list.Status == suppliercert.DRAFT_STATUS && this.User.IsCompanyUser == 1 {
+		userIds = utils.ToStr(list.SecondAudit)
+		status = suppliercert.SECOND_TRIAL_STATUS
+		step = 2
+		backstatus = suppliercert.NOPASS_STATUS
+	}
 	if list.Status == suppliercert.FIRST_TRIAL_STATUS {
 		userIds = utils.ToStr(list.SecondAudit)
 		status = suppliercert.SECOND_TRIAL_STATUS

+ 6 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -760,7 +760,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -828,7 +828,7 @@
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="addshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -1007,6 +1007,7 @@
         }
       }
       return {
+        loading: false,
         sizeProject: 10,
         currentPageProject: 1,
         currentItemCountProject: 0,
@@ -2120,9 +2121,11 @@
           ThirdAudit: this.majorDept[this.majorDept.length - 1]
         }
         // this.$axios.put('/annualaudit/auditfirst?ProfAudit=' + this.ProfAuditThen, params)
+        this.loading = true
         annualapi.Auditfirst(this.shenheForm, params, this.$axios)
           .then(res => {
             // response
+            this.loading = false
             if (res.data.code === 0) {
               this.$message({
                 type: 'success',
@@ -2142,6 +2145,7 @@
           })
           .catch(err => {
             // handle error
+            this.loading = false
             console.error(err)
           })
       },

+ 6 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/basicauditoperation.vue

@@ -681,7 +681,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -749,7 +749,7 @@
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="addshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -928,6 +928,7 @@
         }
       }
       return {
+        loading: false,
         sizeProject: 10,
         currentPageProject: 1,
         currentItemCountProject: 0,
@@ -2061,9 +2062,11 @@
           ThirdAudit: this.majorDept[this.majorDept.length - 1]
         }
         // this.$axios.put('/annualaudit/auditfirst?ProfAudit=' + this.ProfAuditThen, params)
+        this.loading = true
         annualapi.Auditfirst(this.shenheForm, params, this.$axios)
           .then(res => {
             // response
+            this.loading = false
             if (res.data.code === 0) {
               this.$message({
                 type: 'success',
@@ -2084,6 +2087,7 @@
           .catch(err => {
             // handle error
             console.error(err)
+            this.loading = false
           })
       },
 

+ 10 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/bassicoperation.vue

@@ -25,7 +25,7 @@
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
                      v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 1">提交分办
           </el-button>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status == 10 &&  authUser.Profile.IsCompanyUser == 0">
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status <= 10 &&  authUser.Profile.IsCompanyUser == 0">
             提交审核</el-button>
           <router-link :to="'/oilsupplier/annualaudit/basicindex'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
@@ -732,7 +732,7 @@
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="addshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
+        <el-button type="primary" size="small" @click="addAnnualAudit()" :loading="loading">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -771,7 +771,7 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="ComAuditdialogShow = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="SubpEntity">确定</el-button>
+        <el-button size="mini" type="primary" @click="SubpEntity" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
     <el-dialog :title="Title" :visible.sync="visible" top="5vh">
@@ -1070,6 +1070,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
         organizeOption: [], // 审批部门
         auditerOption: [],
         addshow: false,
+        loading: false,
         canUpdateSupplier: true,
         dictData: null,
         add_flat: true,
@@ -1761,7 +1762,9 @@ import apiCert from '@/api/oilsupplier/suppliercert'
         this.entityForm.SupplierTypeName = this.SupplierTypeCode
         this.auditform.FirstAuditName = this.UnitOrg
         this.auditform.AnnualId = this.annualId
+        this.loading = true
         annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
+          this.loading = true
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
             this.Status = res.data.item
@@ -1780,6 +1783,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
             })
           }
         }).catch(err => {
+          this.loading = false
           console.error(err)
         })
       },
@@ -2362,7 +2366,9 @@ import apiCert from '@/api/oilsupplier/suppliercert'
             this.auditform.SecondAudit = this.fushenauditer
             this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
             this.auditform.AnnualId = this.annualId
+            this.loading = true
             annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
+              this.loading = false
               if (res.data.code === 0) {
                 // 保存成功后,初始化数据,变成修改
                 this.entityForm.Id = res.data.item
@@ -2373,7 +2379,6 @@ import apiCert from '@/api/oilsupplier/suppliercert'
                   type: 'success',
                   message: res.data.message
                 })
-
             } else {
                 this.$message({
                   type: 'warning',
@@ -2381,6 +2386,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
                 })
             }
             }).catch(err => {
+              this.loading = false
               console.error(err)
             })
         }

+ 27 - 22
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/goodsoperation.vue

@@ -25,6 +25,9 @@
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
                      v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 1">提交分办
           </el-button>
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="addshow = true"
+                     v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 0">提交审核
+          </el-button>
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status == 10 &&  authUser.Profile.IsCompanyUser == 0">
             提交审核</el-button>
           <router-link :to="'/oilsupplier/annualaudit/goodsindex'">
@@ -783,11 +786,11 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="专业处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
-              </el-cascader>
-            </el-form-item>
+            <!--<el-form-item label="专业处室">-->
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">-->
+              <!--</el-cascader>-->
+            <!--</el-form-item>-->
           </el-col>
           <el-col :span="24">
             <el-form-item label="备注">
@@ -799,7 +802,7 @@
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="addshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
+        <el-button type="primary" size="small" @click="addAnnualAudit()" :loading="loading">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -838,7 +841,7 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="ComAuditdialogShow = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="SubpEntity">确定</el-button>
+        <el-button size="mini" type="primary" @click="SubpEntity" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
     <el-dialog title="变更项查看" :visible.sync="myitemsshow" width="780px">
@@ -1078,6 +1081,13 @@
         }
       }
       return {
+        loading: false,
+        ProfAuditThen: '',
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AnnualId: 0
+        },
         sizeProject: 10,
         currentPageProject: 1,
         currentItemCountProject: 0,
@@ -1526,6 +1536,10 @@
       this.getsubfile()
     },
     methods: {
+      fenbanBtn () {
+        this.shenheForm.AnnualId = parseInt(this.annualId)
+        this.addshow = true
+      },
       // 资质变更相关
       lineheight (list) {
         return list * 23 + ''
@@ -1821,7 +1835,9 @@
         this.entityForm.SupplierTypeName = this.SupplierTypeCode
         this.auditform.FirstAuditName = this.UnitOrg
         this.auditform.AnnualId = this.annualId
+        this.loading = true
         annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
+          this.loading = false
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
             this.Status = res.data.item
@@ -1840,6 +1856,7 @@
             })
           }
         }).catch(err => {
+          this.loading = false
           console.error(err)
         })
       },
@@ -2424,27 +2441,14 @@
               })
               return
             }
-            if (this.majorDept.length === 0) {
-              this.$message({
-                type: 'warning',
-                message: '请选择专业处室!'
-              })
-              return
-            }
-            if (this.userOptions.length === 0) {
-              this.$message({
-                type: 'warning',
-                message: '该专业科室未配置接收人!'
-              })
-              return
-            }
             this.entityForm.SupplierId = parseInt(this.certId)
             this.entityForm.SupplierTypeName = this.SupplierTypeCode
             this.auditform.FirstAuditName = this.auditer
             this.auditform.SecondAudit = this.fushenauditer
-            this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
             this.auditform.AnnualId = this.annualId
+            this.loading = true
             annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
+              this.loading = false
               if (res.data.code === 0) {
                 // 保存成功后,初始化数据,变成修改
                 this.Status = res.data.item
@@ -2463,6 +2467,7 @@
                 })
               }
             }).catch(err => {
+              this.loading = false
               console.error(err)
             })
           }

+ 10 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -25,7 +25,7 @@
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
                      v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 1">提交分办
           </el-button>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status == 10 &&  authUser.Profile.IsCompanyUser == 0">
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status <= 10 &&  authUser.Profile.IsCompanyUser == 0">
             提交审核</el-button>
           <router-link :to="'/oilsupplier/annualaudit/techindex'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
@@ -632,7 +632,7 @@
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="addshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
+        <el-button type="primary" size="small" @click="addAnnualAudit()" :loading="loading">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -671,7 +671,7 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="ComAuditdialogShow = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="SubpEntity">确定</el-button>
+        <el-button size="mini" type="primary" @click="SubpEntity" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
     <el-dialog title="变更项查看" :visible.sync="myitemsshow" width="780px">
@@ -898,6 +898,7 @@
       }
 
       return {
+        loading: false,
         sizeProject: 10,
         currentPageProject: 1,
         currentItemCountProject: 0,
@@ -1686,7 +1687,9 @@
         this.entityForm.SupplierTypeName = this.SupplierTypeCode
         this.auditform.FirstAuditName = this.UnitOrg
         this.auditform.AnnualId = this.annualId
+        this.loading = true
         annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
+          this.loading = false
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
             this.Status = res.data.item
@@ -1705,6 +1708,7 @@
             })
           }
         }).catch(err => {
+          this.loading = false
           console.error(err)
         })
       },
@@ -2440,7 +2444,9 @@
             this.auditform.SecondAudit = this.fushenauditer
             this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
             this.auditform.AnnualId = this.annualId
+            this.loading = true
             annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
+              this.loading = false
               if (res.data.code === 0) {
                 // 保存成功后,初始化数据,变成修改
                 this.entityForm.Id = res.data.item
@@ -2451,7 +2457,6 @@
                   type: 'success',
                   message: res.data.message
                 })
-
             } else {
                 this.$message({
                   type: 'warning',
@@ -2459,6 +2464,7 @@
                 })
             }
             }).catch(err => {
+              this.loading = false
               console.error(err)
             })
         }

+ 6 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/techoperation.vue

@@ -593,7 +593,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -661,7 +661,7 @@
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="addshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -1131,6 +1131,7 @@
         },
         AnnualStatus: '',
         dialogMakeSure: false,
+        loading: false,
         shenheForm: {
           SuccessStatus: 1,
           AuditorRemark: '',
@@ -2091,9 +2092,11 @@
           ThirdAudit: this.majorDept[this.majorDept.length - 1]
         }
         // this.$axios.put('/annualaudit/auditfirst?ProfAudit=' + this.ProfAuditThen, params)
+        this.loading = true
         annualapi.Auditfirst(this.shenheForm, params, this.$axios)
           .then(res => {
             // response
+            this.loading = true
             if (res.data.code === 0) {
               this.$message({
                 type: 'success',
@@ -2113,6 +2116,7 @@
           })
           .catch(err => {
             // handle error
+            this.loading = false
             console.error(err)
           })
       },