caojunjie %!s(int64=4) %!d(string=hai) anos
pai
achega
dfaeccb88b

+ 8 - 0
src/api/finance/charge.js

@@ -92,3 +92,11 @@ export function backCharge(queryParameter) {
     data: queryParameter
   })
 }
+// 撤销审批
+export function revocation(data) {
+  return request({
+    url: '/warehouse/paths/revoke',
+    method: 'post',
+    data: data
+  })
+}

+ 65 - 9
src/views/finance/charge/index.vue

@@ -269,7 +269,7 @@
         <el-button type="success" size="small" @click="revokeCharge" v-if="queryParams.fBillstatus === '6'">撤销收费</el-button>
         <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
 <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>-->
-        <el-button type="danger" size="small" :disabled="tablefilter" v-show="queryParams.fBillstatus === '4'">撤销审批</el-button>
+        <el-button type="danger" size="small" :disabled="tablefilter" @click="approvalRevocation" v-show="queryParams.fBillstatus === '4'">撤销审批</el-button>
       </div>
       <el-table v-loading="loading" :data="increase_s" @selection-change="handleSelectionChange_s">
         <!-- <el-table-column type="selection" width="55" align="center"/> -->
@@ -314,11 +314,13 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve === true">审批</el-button>
+        <el-button v-if="approve === true" @click="immediateApproval">审批</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
+        <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
-        <el-button @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>
       </div>
       <el-dialog :close-on-click-modal="false" width="70%" :visible.sync="innerVisible" title="导入数据" append-to-body>
         <el-form ref="form" :model="queryParameter" :rules="rules" label-width="80px"
@@ -517,13 +519,15 @@ import {
   search,
   listCorps,
   delCharge_s,
-  backCharge
+  backCharge,
+  revocation
 } from '@/api/finance/charge'
 import { listFees } from '@/api/basicdata/fees'
 import print from 'print-js'
 import AddOrUpdate from '@/views/viewApproval'
 import ApprovalComments from '@/views/startApproval'
 import { queryUserVal } from '@/api/warehouseBusiness/agreement'
+import Global from '@/layout/components/global'
 
 export default {
   name: 'Charge',
@@ -554,6 +558,7 @@ export default {
       chargeList_s: [],
       selection: '',
       increase_s: [],
+      cancelButton:true,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -608,6 +613,7 @@ export default {
         fAccbilldate: null,
         fDeptid: null
       },
+      addOrUpdateVisib: false,
       // 主表查询参数
       tableFilter: {
         pageNum: 1,
@@ -666,18 +672,38 @@ export default {
   created() {
     this.getList()
     this.register()
+
+  },
+  activated(){
     this.adoPt()
   },
   methods: {
+    approvalRevocation(){
+      let  data = {
+        id:this.queryParams.fId,
+        actId:this.contrastId,
+        billId:this.queryParams.fId
+      }
+      console.log(this.queryParams)
+      revocation(data).then(data =>{
+        console.log(data)
+        if (data.code === 200){
+          this.$message.success('撤销成功');
+          this.open = false
+        }
+      })
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+    },
     adoPt(){
       this.approval = this.$route.query.data
-      // this.approval = JSON.parse()
-      console.log(this.approval)
       if (this.approval){
-        console.log('张三')
+        this.approval = JSON.parse(this.approval)
         this.hide = false
         this.notChange = true
         this.approve = true
+        this.cancelButton = false
         this.reset()
         this.pass = {
           fAmtdr: '',    //应收合计
@@ -687,7 +713,7 @@ export default {
           fFeesName: '',   //结算单位
           fCorpid: ''     //结算单位ID
         }
-        getCharge(32).then(response => {
+        getCharge(this.approval.billId).then(response => {
           console.log(response)
           this.Operator = response.data.tFee.createBy
           this.increase_s = response.data.feeDoList
@@ -700,11 +726,39 @@ export default {
         })
       }
     },
+    homePage(){
+      this.open = false
+      let view = {
+        fullPath: "/finance/charge",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "Charge",
+        params: Object,
+        path: "/finance/charge",
+        query: Object,
+        title: "收费"
+      }
+      this.$router.push({ path: '/index'})
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
     register(){
       queryUserVal().then((response)=>{
         this.Lander = response.user.userName
       })
     },
+    immediateApproval(){
+      this.addOrUpdateVisib = true
+      console.log(this.approval)
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(this.approval.billId,this.approval.actId)
+      })
+    },
     getDataList(){
       this.addOrUpdateVisible = false
     },
@@ -750,10 +804,11 @@ export default {
         this.title = '收费列表'
         console.log(this.Lander)
         console.log(this.Operator)
+        this.tablefilter = true
         if (res == 1){
           this.notChange = true
-          this.tablefilter = false
           if (this.Operator == this.Lander){
+            this.tablefilter = false
             this.reset()
             this.pass = {
               fAmtdr: '',    //应收合计
@@ -1117,6 +1172,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       console.log(row)
+      this.approve = false
       this.hide = false
       this.notChange = false
       this.reset()

+ 4 - 4
src/views/index.vue

@@ -82,7 +82,8 @@
         <el-table-column prop="refno1" :show-overflow-tooltip="true" label="委托方"></el-table-column>
         <el-table-column prop="auditItem" :show-overflow-tooltip="true" label="日期">
           <template slot-scope="scope">
-            <span>{{ scope.row.auditItem.slice(0,10) }}</span>
+            <span v-if="!scope.row.auditItem">无时间</span>
+            <span v-else>{{ scope.row.auditItem.slice(0,10) }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="refno3" :show-overflow-tooltip="true" label="提单号"></el-table-column>
@@ -213,12 +214,11 @@ export default {
           break
         }
         case 'SF':{
-          this.$router.push({ path: '/finance/charge',query:{data:row}})
+          this.$router.push({ path: '/finance/charge',query:{data:JSON.stringify(row)}})
           break
         }
         case 'DZ':{
-          this.$router.push({ path: '/finance/charge',query:{data:row}})
-          // this.$router.push({ path: '/finance/contrast',query:{data:row}})
+          this.$router.push({ path: '/finance/contrast',query:{data:row}})
           break
         }
         case 'FF':{

+ 3 - 0
src/views/startApproval.vue

@@ -68,8 +68,11 @@ import { queryUserVal } from '@/api/warehouseBusiness/agreement'
         }
         this.dataForm.id = id
         this.dataForm.actId = actId
+        this.dataForm.billId = id
       },
       approved () {
+        console.log(this.dataForm)
+        this.dataForm.auditUserId = ''
         this.$confirm(`是否通过审批?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',