浏览代码

年审所有类别添加交费按钮

baichengfei 5 年之前
父节点
当前提交
fd84b28853

+ 42 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -34,6 +34,7 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && AnnualStatus == '5'">审批</el-button><!-- 企业法规处 -->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && AnnualStatus == '7'">入库审批</el-button><!-- 企业法规处 -->
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="secUnitSeparateAuditClick" v-if="auditBtn && AnnualStatus == '10'">提交</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && parseInt(this.formData.Status) === 6">交费</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px;" onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -1806,6 +1807,47 @@ export default {
           console.error(err)
         })
       },
+      paySureClick () {
+        console.log('交费按钮')
+        this.$confirm('是否确认交费', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.payMakeSure()
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+      },
+      payMakeSure () {
+        console.log('交费结果确认')
+        this.loading = true
+        let params = {
+          payStatus: this.payStatus
+        }
+        console.log('交费结果确认提交参数:', params)
+        annualapi.updatePayStatus(this.annualId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('交费成功')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       orgtreeChange (val) {
         this.userOptions = []
         if (val) {

+ 77 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/bassicoperation.vue

@@ -25,6 +25,7 @@
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick" v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 1">提交分办</el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick()" v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 0">提交审核</el-button>
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="separateUnitSubmitClick()" v-if="Status == 10 &&  authUser.Profile.IsCompanyUser == 0"> 提交审核</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && parseInt(this.formData.Status) === 6">交费</el-button>
           <router-link :to="'/oilsupplier/annualaudit/basicindex'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
           </router-link>
@@ -1147,6 +1148,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
         }
       }
       return {
+        auditBtn: false,
         firOptions: [],
         newVisible: false,
         newSubfileForm: {
@@ -1655,8 +1657,42 @@ import apiCert from '@/api/oilsupplier/suppliercert'
       this.getsubfile()
       this.initTableHeader()
       this.getFileDictOptions()
+      this.isAccess()
     },
     methods: {
+      isAccess () {
+        this.getAuditStepCodeByStatus()
+        let params = {
+          id: this.formData.Id,
+          auditstepcode: this.auditstepcode,
+          processkey: 'oil_audit_apply'
+        }
+        apiCert.isAccess(params, this.$axios).then(res => {
+          this.auditBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      getAuditStepCodeByStatus () {
+        if (this.Status === '1') {
+          this.auditstepcode = 'FIRST_TRIAL'
+        } else if (this.Status === '2') {
+          this.auditstepcode = 'SECOND_TRIAL'
+        } else if (this.Status === '3') {
+          this.auditstepcode = 'PROF_RECE'
+        } else if (this.Status === '4') {
+          this.auditstepcode = 'PROF_AUDIT'
+        } else if (this.Status === '5') {
+          this.auditstepcode = 'PROF_REGULATION'
+          this.shenheForm.AuditorRemark = '集中评审通过。'
+        } else if (this.Status === '6') {
+          this.auditstepcode = 'PAYING_FEE'
+        } else if (this.Status === '7') {
+          this.auditstepcode = 'PROF_REGULATION_STORAGE'
+        } else if (this.Status === '10') {
+          this.auditstepcode = 'SUB_OFFICE_JS'
+        }
+      },
       getFirAuditerByDept () {
         let deptid = this.authUser.Profile.DepartmentId
         this.userOptions = []
@@ -2417,6 +2453,47 @@ import apiCert from '@/api/oilsupplier/suppliercert'
         }
         return true
       },
+      paySureClick () {
+        console.log('交费按钮')
+        this.$confirm('是否确认交费', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.payMakeSure()
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+      },
+      payMakeSure () {
+        console.log('交费结果确认')
+        this.loading = true
+        let params = {
+          payStatus: this.payStatus
+        }
+        console.log('交费结果确认提交参数:', params)
+        annualapi.updatePayStatus(this.annualId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('交费成功')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       getstatus (annid) {
         annualapi.getEntity(annid, this.$axios)
           .then(res => {

+ 41 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/goodsoperation.vue

@@ -3082,6 +3082,47 @@
         }
         return true
       },
+      paySureClick () {
+        console.log('交费按钮')
+        this.$confirm('是否确认交费', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.payMakeSure()
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+      },
+      payMakeSure () {
+        console.log('交费结果确认')
+        this.loading = true
+        let params = {
+          payStatus: this.payStatus
+        }
+        console.log('交费结果确认提交参数:', params)
+        annualapi.updatePayStatus(this.annualId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('交费成功')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       addAnnualAudit () {
         this.$refs['EntityFormref'].validate((valid) => {
           if (valid) {

+ 77 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -25,6 +25,7 @@
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick" v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 1">提交分办</el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick()" v-if="Status <= 0 && authUser.Profile.IsCompanyUser == 0">提交审核</el-button>
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="separateUnitSubmitClick()" v-if="Status == 10 &&  authUser.Profile.IsCompanyUser == 0"> 提交审核</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && parseInt(this.formData.Status) === 6">交费</el-button>
           <router-link :to="'/oilsupplier/annualaudit/techindex'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
           </router-link>
@@ -1063,6 +1064,7 @@ import Viewer from 'v-viewer'
         }
       }
       return {
+        auditBtn: false,
         firOptions: [],
         newVisible: false,
         newSubfileForm: {
@@ -1568,8 +1570,42 @@ import Viewer from 'v-viewer'
       // this.orgtreeChange(this.majorDept)
       this.getsubfile()
       this.initTableHeader()
+      this.isAccess()
     },
     methods: {
+      isAccess () {
+        this.getAuditStepCodeByStatus()
+        let params = {
+          id: this.formData.Id,
+          auditstepcode: this.auditstepcode,
+          processkey: 'oil_audit_apply'
+        }
+        apiCert.isAccess(params, this.$axios).then(res => {
+          this.auditBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      getAuditStepCodeByStatus () {
+        if (this.Status === '1') {
+          this.auditstepcode = 'FIRST_TRIAL'
+        } else if (this.Status === '2') {
+          this.auditstepcode = 'SECOND_TRIAL'
+        } else if (this.Status === '3') {
+          this.auditstepcode = 'PROF_RECE'
+        } else if (this.Status === '4') {
+          this.auditstepcode = 'PROF_AUDIT'
+        } else if (this.Status === '5') {
+          this.auditstepcode = 'PROF_REGULATION'
+          this.shenheForm.AuditorRemark = '集中评审通过。'
+        } else if (this.Status === '6') {
+          this.auditstepcode = 'PAYING_FEE'
+        } else if (this.Status === '7') {
+          this.auditstepcode = 'PROF_REGULATION_STORAGE'
+        } else if (this.Status === '10') {
+          this.auditstepcode = 'SUB_OFFICE_JS'
+        }
+      },
       getFirAuditerByDept () {
         let deptid = this.authUser.Profile.DepartmentId
         this.userOptions = []
@@ -2353,6 +2389,47 @@ import Viewer from 'v-viewer'
         }
         return true
       },
+      paySureClick () {
+        console.log('交费按钮')
+        this.$confirm('是否确认交费', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.payMakeSure()
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+      },
+      payMakeSure () {
+        console.log('交费结果确认')
+        this.loading = true
+        let params = {
+          payStatus: this.payStatus
+        }
+        console.log('交费结果确认提交参数:', params)
+        annualapi.updatePayStatus(this.annualId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('交费成功')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       getstatus (annid) {
         annualapi.getEntity(annid, this.$axios)
           .then(res => {