Jelajahi Sumber

审批入库 基建类 服务类 审批按钮loading判断 刷新

baichengfei 5 tahun lalu
induk
melakukan
8ee3186b4e

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -1335,10 +1335,10 @@
           FirstAudit: this.auditer,
           FirstAudit: this.auditer,
           SecondAudit: this.fushenauditer,
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.selectDept,
           ThirdAudit: this.selectDept,
-          AuditRemark: this.auditform.AuditRemark
+          AuditRemark: this.shenheForm.AuditorRemark
         }
         }
         console.log('二级单位分办审批结果提交参数:', params)
         console.log('二级单位分办审批结果提交参数:', params)
-        api2.separateAuditEntity(this.certId, params, this.$axios).then(res => {
+        api2.separateAuditEntity(this.AppendId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             console.log('审批提交,成功返回')
             console.log('审批提交,成功返回')
             this.initDatas()
             this.initDatas()
@@ -1346,16 +1346,18 @@
               type: 'success',
               type: 'success',
               message: res.data.message
               message: res.data.message
             })
             })
+            this.dialogSecUnitSeparateVisible = false
+            this.btnloading = false
           } else {
           } else {
             this.$message({
             this.$message({
               type: 'warning',
               type: 'warning',
               message: res.data.message
               message: res.data.message
             })
             })
           }
           }
-          this.dialogSecUnitSeparateVisible = false
           this.btnloading = false
           this.btnloading = false
         }).catch(err => {
         }).catch(err => {
           console.error(err)
           console.error(err)
+          this.btnloading = false
         })
         })
       },
       },
       // 二级单位分办审批参数检查 ⬇
       // 二级单位分办审批参数检查 ⬇
@@ -1480,8 +1482,8 @@
         let params = {
         let params = {
           payStatus: this.payStatus
           payStatus: this.payStatus
         }
         }
-        console.log('交费结果确认提交参数:', this.certId)
-        api2.updatePayStatus(this.certId, params, this.$axios).then(res => {
+        console.log('交费结果确认提交参数:', this.AppendId)
+        api2.updatePayStatus(this.AppendId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             console.log('交费成功')
             console.log('交费成功')
             this.initDatas()
             this.initDatas()

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -1343,10 +1343,10 @@
           FirstAudit: this.auditer,
           FirstAudit: this.auditer,
           SecondAudit: this.fushenauditer,
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.selectDept,
           ThirdAudit: this.selectDept,
-          AuditRemark: this.auditform.AuditRemark
+          AuditRemark: this.shenheForm.AuditRemark
         }
         }
         console.log('二级单位分办审批结果提交参数:', params)
         console.log('二级单位分办审批结果提交参数:', params)
-        api2.separateAuditEntity(this.certId, params, this.$axios).then(res => {
+        api2.separateAuditEntity(this.AppendId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             console.log('审批提交,成功返回')
             console.log('审批提交,成功返回')
             this.initDatas()
             this.initDatas()
@@ -1354,16 +1354,18 @@
               type: 'success',
               type: 'success',
               message: res.data.message
               message: res.data.message
             })
             })
+            this.btnloading = false
+            this.dialogSecUnitSeparateVisible = false
           } else {
           } else {
             this.$message({
             this.$message({
               type: 'warning',
               type: 'warning',
               message: res.data.message
               message: res.data.message
             })
             })
           }
           }
-          this.dialogSecUnitSeparateVisible = false
           this.btnloading = false
           this.btnloading = false
         }).catch(err => {
         }).catch(err => {
           console.error(err)
           console.error(err)
+          this.btnloading = false
         })
         })
       },
       },
       // 二级单位分办审批参数检查 ⬇
       // 二级单位分办审批参数检查 ⬇
@@ -1659,8 +1661,8 @@
         let params = {
         let params = {
           payStatus: this.payStatus
           payStatus: this.payStatus
         }
         }
-        console.log('交费结果确认提交参数:', this.certId)
-        api2.updatePayStatus(this.certId, params, this.$axios).then(res => {
+        console.log('交费结果确认提交参数:', this.certId, this.AppendId)
+        api2.updatePayStatus(this.AppendId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             console.log('交费成功')
             console.log('交费成功')
             this.initDatas()
             this.initDatas()

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -1367,10 +1367,10 @@
           FirstAudit: this.auditer,
           FirstAudit: this.auditer,
           SecondAudit: this.fushenauditer,
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.selectDept,
           ThirdAudit: this.selectDept,
-          AuditRemark: this.auditform.AuditRemark
+          AuditRemark: this.shenheForm.AuditorRemark
         }
         }
         console.log('二级单位分办审批结果提交参数:', params)
         console.log('二级单位分办审批结果提交参数:', params)
-        api2.separateAuditEntity(this.certId, params, this.$axios).then(res => {
+        api2.separateAuditEntity(this.AppendId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             console.log('审批提交,成功返回')
             console.log('审批提交,成功返回')
             this.initDatas()
             this.initDatas()
@@ -1378,16 +1378,18 @@
               type: 'success',
               type: 'success',
               message: res.data.message
               message: res.data.message
             })
             })
+            this.dialogSecUnitSeparateVisible = false
+            this.btnloading = false
           } else {
           } else {
             this.$message({
             this.$message({
               type: 'warning',
               type: 'warning',
               message: res.data.message
               message: res.data.message
             })
             })
           }
           }
-          this.dialogSecUnitSeparateVisible = false
           this.btnloading = false
           this.btnloading = false
         }).catch(err => {
         }).catch(err => {
           console.error(err)
           console.error(err)
+          this.btnloading = false
         })
         })
       },
       },
       // 二级单位分办审批参数检查 ⬇
       // 二级单位分办审批参数检查 ⬇
@@ -1512,8 +1514,8 @@
         let params = {
         let params = {
           payStatus: this.payStatus
           payStatus: this.payStatus
         }
         }
-        console.log('交费结果确认提交参数:', this.certId)
-        api2.updatePayStatus(this.certId, params, this.$axios).then(res => {
+        console.log('交费结果确认提交参数:', this.AppendId)
+        api2.updatePayStatus(this.AppendId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             console.log('交费成功')
             console.log('交费成功')
             this.initDatas()
             this.initDatas()

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

@@ -24,8 +24,7 @@
           </el-popover>
           </el-popover>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="itemsshow">查看变更项</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="itemsshow">查看变更项</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px"
-                     v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5" @click="saveinfochange">保存
+          <el-button type="primary" size="mini" style="margin-left: 8px" v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5" @click="saveinfochange">保存
           </el-button>
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
             v-if="formData.Id !='' && formData.Status <= 0 && IsCompanyUser == 0">提交审核
             v-if="formData.Id !='' && formData.Status <= 0 && IsCompanyUser == 0">提交审核
@@ -3407,6 +3406,7 @@
           UnitId: this.UnitOrg,
           UnitId: this.UnitOrg,
           AuditRemark: this.auditform.AuditRemark
           AuditRemark: this.auditform.AuditRemark
         }
         }
+        console.log('提交增项申请的参数', params)
         console.log('实际的增项申请id', this.dialogFormData.SupplierCertAppendId, this.formData.id)
         console.log('实际的增项申请id', this.dialogFormData.SupplierCertAppendId, this.formData.id)
         api2.companyAuditEntity(this.formData.Id, params, this.$axios).then(res => {
         api2.companyAuditEntity(this.formData.Id, params, this.$axios).then(res => {
           if (res.data.code === 0) {
           if (res.data.code === 0) {

+ 22 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/basisedit.vue

@@ -26,8 +26,8 @@
           <!--</el-popover>-->
           <!--</el-popover>-->
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="createWZAccessCardNo">生成准入编码</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="createWZAccessCardNo">生成准入编码</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this.formData.Status == '7'" @click="confirm">确认入库</el-button>
-          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="backStatus">退回</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this.formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
           <router-link :to="'/oilsupplier/supplierstorage/basislist'">
           <router-link :to="'/oilsupplier/supplierstorage/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
             </el-button>
@@ -320,6 +320,7 @@
 
 
     data () {
     data () {
       return {
       return {
+        btnLoading: false,
         backRemark: '',
         backRemark: '',
         dialogVisibleBack: false,
         dialogVisibleBack: false,
         activeName: '0',
         activeName: '0',
@@ -507,22 +508,28 @@
           Status: '-7',
           Status: '-7',
           BackRemark: this.backRemark
           BackRemark: this.backRemark
         }
         }
+        this.btnLoading = true
         apiCert.backStatus(this.formData.CertId, params, this.$axios).then(res => {
         apiCert.backStatus(this.formData.CertId, params, this.$axios).then(res => {
           this.dialogVisibleBack = false
           this.dialogVisibleBack = false
+          this.initDatas()
+          this.$refs['WfHistory'].$forceUpdate()
+          console.log('已强制刷新历史审批流程')
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             this.$message({
             this.$message({
               type: 'success',
               type: 'success',
               message: res.data.message
               message: res.data.message
             })
             })
-            this.$router.push('/')
+            // this.$router.push('/') // TODO
           } else {
           } else {
             this.$message({
             this.$message({
               type: 'warning',
               type: 'warning',
               message: res.data.message
               message: res.data.message
             })
             })
           }
           }
+          this.btnLoading = false
         }).catch(err => {
         }).catch(err => {
           this.dialogVisibleBack = false
           this.dialogVisibleBack = false
+          this.btnLoading = false
           console.log(err)
           console.log(err)
         })
         })
       },
       },
@@ -579,6 +586,7 @@
           })
           })
           return
           return
         }
         }
+        this.btnLoading = true
         this.$confirm('确认提交入库', '提示', {
         this.$confirm('确认提交入库', '提示', {
           confirmButtonText: '确认',
           confirmButtonText: '确认',
           cancelButtonText: '取消',
           cancelButtonText: '取消',
@@ -589,18 +597,28 @@
           }
           }
           tepApi.updateIsStorage(this.certId, params, this.$axios).then(res => {
           tepApi.updateIsStorage(this.certId, params, this.$axios).then(res => {
             this.initDatas()
             this.initDatas()
+            this.$refs['WfHistory'].$forceUpdate()
+            console.log('已强制刷新历史审批流程')
             if (res.data.code === 0) {
             if (res.data.code === 0) {
               this.$message({
               this.$message({
                 type: 'success',
                 type: 'success',
                 message: res.data.message
                 message: res.data.message
               })
               })
-              this.$router.push('/')
+              this.btnLoading = false
+              // this.$router.push('/') // TODO 是否跳回首页
             } else {
             } else {
               this.$message({
               this.$message({
                 type: 'warning',
                 type: 'warning',
                 message: res.data.message
                 message: res.data.message
               })
               })
             }
             }
+            this.btnLoading = false
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消'
+            })
+            this.btnLoading = false
           })
           })
         })
         })
       },
       },

+ 22 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/techedit.vue

@@ -26,8 +26,8 @@
           <!--</el-popover>-->
           <!--</el-popover>-->
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="createJFAccessCardNo">生成准入编码</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="createJFAccessCardNo">生成准入编码</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="confirm">确认入库</el-button>
-          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="backStatus">退回</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
           <router-link :to="'/oilsupplier/supplierstorage/techlist'">
           <router-link :to="'/oilsupplier/supplierstorage/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
             </el-button>
@@ -328,6 +328,7 @@
 
 
     data () {
     data () {
       return {
       return {
+        btnLoading: false,
         backRemark: '',
         backRemark: '',
         dialogVisibleBack: false,
         dialogVisibleBack: false,
         activeName: '1',
         activeName: '1',
@@ -515,13 +516,18 @@
           Status: '-7',
           Status: '-7',
           BackRemark: this.backRemark
           BackRemark: this.backRemark
         }
         }
+        this.btnLoading = true
         apiCert.backStatus(this.formData.CertId, params, this.$axios).then(res => {
         apiCert.backStatus(this.formData.CertId, params, this.$axios).then(res => {
           this.dialogVisibleBack = false
           this.dialogVisibleBack = false
+          this.initDatas()
+          this.$refs['WfHistory'].$forceUpdate()
+          console.log('已强制刷新历史审批流程')
           if (res.data.code === 0) {
           if (res.data.code === 0) {
             this.$message({
             this.$message({
               type: 'success',
               type: 'success',
               message: res.data.message
               message: res.data.message
             })
             })
+            this.btnLoading = false
             this.$router.push('/')
             this.$router.push('/')
           } else {
           } else {
             this.$message({
             this.$message({
@@ -529,8 +535,10 @@
               message: res.data.message
               message: res.data.message
             })
             })
           }
           }
+          this.btnLoading = false
         }).catch(err => {
         }).catch(err => {
           this.dialogVisibleBack = false
           this.dialogVisibleBack = false
+          this.btnLoading = false
           console.log(err)
           console.log(err)
         })
         })
       },
       },
@@ -587,6 +595,7 @@
           })
           })
           return
           return
         }
         }
+        this.btnLoading = true
         this.$confirm('确认提交入库', '提示', {
         this.$confirm('确认提交入库', '提示', {
           confirmButtonText: '确认',
           confirmButtonText: '确认',
           cancelButtonText: '取消',
           cancelButtonText: '取消',
@@ -598,17 +607,27 @@
           tepApi.updateIsStorage(this.certId, params, this.$axios).then(res => {
           tepApi.updateIsStorage(this.certId, params, this.$axios).then(res => {
             if (res.data.code === 0) {
             if (res.data.code === 0) {
               this.initDatas()
               this.initDatas()
+              this.$refs['WfHistory'].$forceUpdate()
+              console.log('已强制刷新历史审批流程')
               this.$message({
               this.$message({
                 type: 'success',
                 type: 'success',
                 message: res.data.message
                 message: res.data.message
               })
               })
-              this.$router.push('/')
+              this.btnLoading = false
+              // this.$router.push('/') //TODO
             } else {
             } else {
               this.$message({
               this.$message({
                 type: 'warning',
                 type: 'warning',
                 message: res.data.message
                 message: res.data.message
               })
               })
             }
             }
+            this.btnLoading = false
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消'
+            })
+            this.btnLoading = false
           })
           })
         })
         })
       },
       },