zhangyuewww 2 年之前
父节点
当前提交
7c6e4c1a49
共有 2 个文件被更改,包括 34 次插入6 次删除
  1. 10 5
      src/views/profitable/cashoutedit.vue
  2. 24 1
      src/views/profitable/expensemanagementdetails.vue

+ 10 - 5
src/views/profitable/cashoutedit.vue

@@ -3,7 +3,8 @@
   <div class="container">
     <el-row class="row_top">
       <el-col :span="12">
-        <h2 class="bg-left title">请款</h2>
+        <h2 class="bg-left title" v-if='deptBudgetList.expensesType=="1"'>收款</h2>
+        <h2 class="bg-left title" v-if='deptBudgetList.expensesType=="2"'>请款</h2>
       </el-col>
       <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
             style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
@@ -50,7 +51,7 @@
           <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
             <el-input class='input50 input_css' placeholder="输入费用名称,1-15个字" v-model="deptBudgetList.expenseName"></el-input>
           </el-form-item>
-          <el-form-item label-width='100px' label="付款方名头" span="1" prop="payerHeader" class="readonly">
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesType=="2"' label="付款方名头" span="1" prop="payerHeader" class="readonly">
             <el-input class='input50 input_css' placeholder="输入付款方名头" v-model="deptBudgetList.payerHeader"></el-input>
           </el-form-item>
           <el-form-item label-width='100px' label="金额(元)" span="1" prop="contractNo" class="readonly">
@@ -71,6 +72,7 @@
         @onChange="onChange" 
        />
         </el-form-item>
+        <div v-if='deptBudgetList.expensesType=="2"'>
         <div style='margin:20px -30px;font-weight:bold'>收款账户信息</div>
         <el-form-item label-width='100px' label="收款方" span="1" prop="payee">
             <el-input class='input50 input_css' placeholder="输入收款方" v-model="deptBudgetList.payee"></el-input>
@@ -84,8 +86,9 @@
           <el-form-item label-width='100px' label="开户支行" span="1" prop="bankBranch">
             <el-input class='input50 input_css' placeholder="输入开户支行" v-model="deptBudgetList.bankBranch"></el-input>
           </el-form-item>
-        </el-form>
-        <div v-if='deptBudgetList.expensesPurpose==2'>
+      </div>
+       </el-form>
+        <div v-if='deptBudgetList.expensesType==1'>
           <div v-for="item in deptBudgetList.tranTaskInfoList">
             <el-form label-position="left">
               <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
@@ -378,7 +381,9 @@
             this.deptBudgetList.noPaymentFlag = 1
           }
         }
-        this.deptBudgetList.expensesType=2
+        if(!this.deptBudgetList.expensesType){
+            this.deptBudgetList.expensesType=2
+        }
         if(!this.deptBudgetList.contractNo&&this.deptBudgetList.expensesPurpose==1){
           this.$message({
                 message: '合同编号不能为空!',

+ 24 - 1
src/views/profitable/expensemanagementdetails.vue

@@ -191,6 +191,10 @@
           <el-table-column prop="address" label="操作" width="300">
             <template slot-scope="scope">
               <el-button v-if="scope.row.expenseName != '保证金抵粮款'" @click="look(scope.row)" type="primary">查看</el-button>
+              <el-button v-if="
+                (scope.row.expensesPurpose == 1 &&
+                  scope.row.status == '待确认')
+              " @click="chehui(scope.row)" type="primary">撤回</el-button>
               <div v-hasPermission="`lirunhesuan.feiyongguanli.queshou`" style="display: inline-block">
                 <el-button v-if="
                   scope.row.status == '待确认' && scope.row.expenseName != '保证金抵粮款'
@@ -213,7 +217,7 @@
               " @click="accomplish(scope.row)" type="primary">完成</el-button>
               <el-button v-if="scope.row.approveStatus && scope.row.approveStatus != '发起人撤回'"
                 v-show="scope.row.showFlag" @click="withdraw(scope.row)" type="primary">撤回</el-button>
-              <el-button v-if="(scope.row.status == '已驳回' && scope.row.expensesType != 1) || (scope.row.approveStatus == '发起人撤回' && scope.row.expensesType != 1)" @click="edit(scope.row)"
+              <el-button v-if="(scope.row.status == '已驳回' ) || (scope.row.approveStatus == '发起人撤回' && scope.row.expensesType != 1)|| (scope.row.status == '已撤回' && scope.row.expensesType== 1)" @click="edit(scope.row)"
                 type="primary">编辑</el-button>
               <el-button v-if="
                 (!scope.row.distributionStatus &&
@@ -493,6 +497,25 @@ export default {
           })
       })
     },
+    chehui(row){
+      var title = '确定撤回该条费用收款?'
+      this.$confirm(title, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        row.flag = 8
+        editexenseinfo(row)
+          .toPromise()
+          .then((response) => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.getList()
+          })
+      })
+    },
     unallocatedAmountChange(e){
       this.getList()
     },