gjy 2 سال پیش
والد
کامیت
937a2d9c58

+ 3 - 1
src/api/V2/statisticalReport/index.js

@@ -110,4 +110,6 @@ export const API_POST_EDITTRANTASK = '/tranTaskInfo/api/editTranTask'
 //粮食单价编辑
 export const API_POST_EDIT_TRANSETTLEMENT ='/tranSettlementReport/api/editTranSettlementReport'
 // 汽运导出
-export const API_GET_EXPORT = `/tranSettlementReport/export`
+export const API_GET_EXPORT = `/tranSettlementReport/export`
+// 批量清空
+export const API_POST_EMPTY = `/tranSettlementReport/api/batchEmptying`

+ 5 - 2
src/model/statisticalReport/index.js

@@ -52,7 +52,8 @@ import {
     API_POST_SUBMITLOGISTICS,
     API_POST_EDITTRANTASK,
     API_POST_EDIT_TRANSETTLEMENT,
-    API_GET_EXPORT
+    API_GET_EXPORT,
+    API_POST_EMPTY
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -168,4 +169,6 @@ export const edittrantask = appRx.post(API_POST_EDITTRANTASK, errorCatcher, erro
 // 船运反馈
 export const editgrainprice = appRx.post(API_POST_EDIT_TRANSETTLEMENT, errorCatcher, errorHandle, filter)
 // 船运反馈
-export const getexport = appRx.post(API_GET_EXPORT)
+export const getexport = appRx.post(API_GET_EXPORT)
+// 批量清空flag1清空服务费 flag2清空税点
+export const batchempty = appRx.post(API_POST_EMPTY, errorCatcher, errorHandle, filter)

+ 85 - 49
src/views/statisticalReport/autoSettlementList.vue

@@ -1,26 +1,9 @@
 //汽运结算报表
 <template>
   <div class="container">
-    <el-scrollbar style="height: 100%">
+    <el-scrollbar style="height: 100%;">
       <el-row>
-        <el-col style="padding-left: 15px" :span="12">
-          <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button>
-          <ws-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待结算</ws-button>
-          <ws-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">已结算</ws-button>
-          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
-          <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlepass()">请款
-          </ws-button>
-          <!-- <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlereject()">驳回
-          </ws-button> -->
-          <ws-button type="primary" v-hasPermission="`report.transportationReport.payment`" @click="handlepayment">付款
-          </ws-button>
-          <ws-button type="primary" v-hasPermission="`report.transportationReport.draw`" @click="handleninvoice">开发票
-          </ws-button>
-          <ws-button type="primary" @click="exportlist">导出</ws-button>
-          <ws-button type="primary" @click="editRecord">记录</ws-button>
-          <!-- v-hasPermission="`report.transportationReport.payment`" -->
-        </el-col>
-        <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="12">
+        <el-col style="padding:15px 18px;" :span="14">
           <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
             maxlength="500" type="input">
             <el-option v-for="item in options" :key="item.id"
@@ -37,14 +20,8 @@
             <el-option key="未卸车" label="未卸车" value="1" style="color: #8890b1" />
             <el-option key="已卸车" label="已卸车" value="2" style="color: #8890b1" />
           </el-select>
-          <!--  -->
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col  :span="12">
-          &nbsp;
           <!-- <div v-hasPermission="`report.transportationReport.wuliu`" style="display:flex;align-items:center;justify-content: flex-start;" v-if="contractNo!='全部合同'&&warehouseList.records.length>0"><div style="width:100px;">货值:</div> {{grainPrice}}</div>--></el-col> 
-        <el-col style="padding-left: 15px;text-align:right;" :span="12">
+        <el-col style="padding-left: 15px;text-align:right;" :span="10">
           <el-date-picker @change="datechange" format="yyyy-MM-dd" v-model="value2" type="daterange" unlink-panels range-separator="至"
           start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
         </el-date-picker>
@@ -58,6 +35,32 @@
             " src="../../../public/img/sousuo.png" alt="" /></ws-button>
         </el-col>
       </el-row>
+      <el-row style="margin-bottom:15px;">
+        <el-col style="padding-left: 15px;" :span="18">
+          <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button>
+          <ws-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待结算</ws-button>
+          <ws-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">已结算</ws-button>
+          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
+          <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlepass()">请款
+          </ws-button>
+          <!-- <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlereject()">驳回
+          </ws-button> -->
+          <ws-button type="primary" v-hasPermission="`report.transportationReport.payment`" @click="handlepayment">付款
+          </ws-button>
+          <ws-button type="primary" v-hasPermission="`report.transportationReport.draw`" @click="handleninvoice">开发票
+          </ws-button>
+          <ws-button type="primary" @click="exportlist">导出</ws-button>
+          <ws-button type="primary" @click="editRecord">记录</ws-button>
+          <ws-button type="primary" @click="batchEmpty(1)">清空服务费</ws-button>
+          <ws-button type="primary" @click="batchEmpty(2)">清空税点</ws-button>
+          <!-- v-hasPermission="`report.transportationReport.payment`" -->
+        </el-col>
+        <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="4">
+          
+          <!--  -->
+        </el-col>
+      </el-row>
+      
       <el-row>
         <div style="color:red">注:审核时,同一运输阶段勾选任意复选框,当前运输阶段下所有条目都通过审核!</div>
       </el-row>
@@ -95,8 +98,8 @@
         </el-table-column>
         <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)"><template
             slot-scope="scope">
-            <span v-if="scope.row.unloadingWeight == null">未卸车</span>
-            <div style="
+            <span v-if="!scope.row.unloadingWeight">未卸车</span>
+            <div v-else style="
                 display: inline-block;
                 color: #5878e8;
                 padding: 0 4px !important;
@@ -128,14 +131,14 @@
             <div style="display:inline-block;" v-hasPermission="`report.transportationReport.wuliu`">
             <i @click="changeactualLoss(scope.row)" v-if="
               (scope.row.actualLosschange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (scope.row.actualLosschange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " class="iconfont icon-dui"></i>
             <img v-if="(!scope.row.actualLosschange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (!scope.row.actualLosschange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editactualLoss(scope.row)" alt="" /></div>
           </template>
@@ -154,17 +157,17 @@
             <div style="display:inline-block;" v-hasPermission="`report.transportationReport.wuliu`">
             <i @click="changesettlementPrice(scope.row)" v-if="
               (scope.row.settlementPricechange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (scope.row.settlementPricechange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " class="iconfont icon-dui"></i>
             <img v-if="
               (!scope.row.settlementPricechange &&
                 scope.row.settlementWeight &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (!scope.row.settlementPricechange &&
                 scope.row.settlementWeight &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editsettlementPrice(scope.row)" alt="" /></div>
           </template>
@@ -180,17 +183,17 @@
             <div style="display:inline-block;" v-hasPermission="`report.transportationReport.wuliu`">
             <i @click="changesettlementWeight(scope.row)" v-if="
               (scope.row.settlementWeightchange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (scope.row.settlementWeightchange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " class="iconfont icon-dui"></i>
             <img v-if="
               (!scope.row.settlementWeightchange &&
                 scope.row.settlementWeight &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (!scope.row.settlementWeightchange &&
                 scope.row.settlementWeight &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editsettlementWeight(scope.row)" alt="" /></div>
           </template></el-table-column>
@@ -205,15 +208,15 @@
             <div style="display:inline-block;" v-hasPermission="`report.transportationReport.wuliu`">
             <i @click="changedeductionAmount(scope.row)" v-if="
               (scope.row.deductionAmountchange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (scope.row.deductionAmountchange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " class="iconfont icon-dui"></i>
             <img v-if="
               (!scope.row.deductionAmountchange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (!scope.row.deductionAmountchange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editdeductionAmount(scope.row)" alt="" /></div>
           </template></el-table-column>
@@ -227,15 +230,15 @@
             <div style="display:inline-block;" v-hasPermission="`report.transportationReport.wuliu`">
             <i @click="changeserviceCharge(scope.row)" v-if="
               (scope.row.serviceChargechange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (scope.row.serviceChargechange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " class="iconfont icon-dui"></i>
             <img v-if="
               (!scope.row.serviceChargechange &&
-                scope.row.status == '待请款') ||
+                scope.row.status == '待请款'&&scope.row.unloadingWeight) ||
               (!scope.row.serviceChargechange &&
-                scope.row.status == '已驳回')
+                scope.row.status == '已驳回'&&scope.row.unloadingWeight)
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editserviceCharge(scope.row)" alt="" />
             </div>
@@ -481,7 +484,8 @@ import {
   openinvoicelist,
   submitlogistics,
   editgrainprice,
-  getexport
+  getexport,
+  batchempty
   // postaudit,
   //   getselectctcontractno,
 } from '@/model/statisticalReport/index'
@@ -713,6 +717,38 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    batchEmpty(status){
+      for (var i = 0; i < this.modification.length; i++) {
+          if (!this.modification[i].unloadingWeight&&status==1||this.modification[i].status != '待请款'&&status==1 ) {
+            this.$message.warning('只有已卸车并且未请款的条目才可清空服务费!')
+            return
+          }else if (!this.modification[i].unloadingWeight&&status==2||this.modification[i].status != '待请款'&&status==2 ) {
+            this.$message.warning('只有已卸车并且未请款的条目才可清空税点!')
+            return
+          }
+        }
+      var title=''
+      if(status==1){
+        title='确定清空勾选条目的服务费?'
+      }else{
+        title='确定清空勾选条目的税点?'
+      }
+      this.$confirm(title, {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          type: 'warning',
+        }).then(() => {
+          batchempty({
+           flag:status,
+           tranSettlementReportList:this.modification
+          })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('清空成功')
+              this.getList()
+            })
+        })
+    },
     // 上传附件
     uploadSuccess(data, files, url) {
       console.log(data, files, url)