Browse Source

年审审批完之后刷新当前页面,不再跳转到列表

baichengfei 5 years ago
parent
commit
8c54d91200

+ 31 - 22
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -839,24 +839,24 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="分配" :visible.sync="dialogProfAudit" width="420px">
-      <el-form ref="searchForm" label-width="110px">
-        <el-form-item label="审批人">
-          <el-select ref="selectAuditer" v-model="ProfAuditThen" placeholder="请选择" style="width: 100%" filterable
-            allow-create default-first-option>
-            <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="意见">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核意见"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button size="mini" @click="dialogProfAudit = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="checkstatus()">确定</el-button>
-      </span>
-    </el-dialog>
+    <!--<el-dialog title="分配" :visible.sync="dialogProfAudit" width="420px">-->
+    <!--  <el-form ref="searchForm" label-width="110px">-->
+    <!--    <el-form-item label="审批人">-->
+    <!--      <el-select ref="selectAuditer" v-model="ProfAuditThen" placeholder="请选择" style="width: 100%" filterable-->
+    <!--        allow-create default-first-option>-->
+    <!--        <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">-->
+    <!--        </el-option>-->
+    <!--      </el-select>-->
+    <!--    </el-form-item>-->
+    <!--    <el-form-item label="意见">-->
+    <!--      <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核意见"></el-input>-->
+    <!--    </el-form-item>-->
+    <!--  </el-form>-->
+    <!--  <span slot="footer" class="dialog-footer">-->
+    <!--    <el-button size="mini" @click="dialogProfAudit = false">取 消</el-button>-->
+    <!--    <el-button size="mini" type="primary" @click="checkstatus()">确定</el-button>-->
+    <!--  </span>-->
+    <!--</el-dialog>-->
     <el-dialog title="提交申请" :visible.sync="addshow" width="520px">
       <el-form label-width="90px" :model="shenheForm" ref="EntityFormref">
         <el-row>
@@ -1774,22 +1774,27 @@ export default {
           AuditRemark: this.shenheForm.AuditorRemark
         }
         console.log('二级单位分办审批结果提交参数:', params)
+        let _this = this
         annualapi.separateAuditEntity(this.shenheForm.AnnualId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             console.log('审批提交,成功返回')
-            this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
             })
-            this.dialogSecUnitSeparateVisible = false
+            _this.dialogSecUnitSeparateVisible = false
+            if (_this.$refs['WfHistory']) {
+              _this.$refs['WfHistory'].getHistoryTask()
+            }
+            _this.getstatus(this.annualId)
+            _this.initDatas()
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
           }
-          this.loading = false
+          _this.loading = false
         }).catch(err => {
           console.error(err)
         })
@@ -2482,7 +2487,11 @@ export default {
               type: 'success',
               message: res.data.message
             })
-            this.$router.push('/')
+            if (this.$refs['WfHistory']) {
+              this.$refs['WfHistory'].getHistoryTask()
+            }
+            this.getstatus(this.annualId)
+            this.initDatas()
           } else {
             this.$message({
               type: 'warning',

+ 13 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/basicauditoperation.vue

@@ -2171,6 +2171,7 @@
           AuditRemark: this.shenheForm.AuditorRemark
         }
         console.log('审批结果提交参数:', params)
+        let _this = this
         annualapi.commonAuditEntity(this.shenheForm.AnnualId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             console.log('审批提交,成功返回')
@@ -2178,15 +2179,19 @@
               type: 'success',
               message: res.data.message
             })
-            this.$router.push('/')
+            if (_this.$refs['WfHistory']) {
+              _this.$refs['WfHistory'].getHistoryTask()
+            }
+            _this.getstatus(this.annualId)
+            _this.initDatas()
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
           }
-          this.dialogCommonAuditMakeSureVisible = false
-          this.loading = false
+          _this.dialogCommonAuditMakeSureVisible = false
+          _this.loading = false
         }).catch(err => {
           console.error(err)
         })
@@ -2329,11 +2334,15 @@
         annualapi.separateAuditEntity(this.shenheForm.AnnualId, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             console.log('审批提交,成功返回')
-            this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
             })
+            this.initDatas()
+            this.getstatus(this.annualId)
+            if (this.$refs['WfHistory']) {
+              this.$refs['WfHistory'].getHistoryTask()
+            }
             this.dialogSecUnitSeparateVisible = false
           } else {
             this.$message({

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

@@ -2368,6 +2368,10 @@ import apiCert from '@/api/oilsupplier/suppliercert'
             })
             _this.dialogComSubmitToSeparateUnitVisible = false
             // this.getEntityById()
+            if (_this.$refs['WfHistory']) {
+              _this.$refs['WfHistory'].getHistoryTask()
+            }
+            _this.initDatas()
             _this.getstatus(this.annualId)
           } else {
             this.$message({

+ 5 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -2303,8 +2303,12 @@ import Viewer from 'v-viewer'
               message: res.data.message
             })
             _this.dialogComSubmitToSeparateUnitVisible = false
-            _this.getEntityById()
+            // _this.getEntityById()
+            _this.initDatas()
             _this.getstatus(this.annualId)
+            if (_this.$refs['WfHistory']) {
+              _this.$refs['WfHistory'].getHistoryTask()
+            }
           } else {
             this.$message({
               type: 'warning',