Ver código fonte

前端汽运结算报表添加请款

gjy 2 anos atrás
pai
commit
7063c456af

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

@@ -102,4 +102,6 @@ export const API_GET_YUNSHUXIALA = '/tranTaskInfo/selectTranTask'
 // 火运,船运运输编号下拉
 export const API_GET_YUNSHUNUMBER = '/tranTaskInfo/selectTask'
 // 火运,船运实际价格
-export const API_POST_YUNSHUSETPRICE = '/tranProcessInfo/api/setUpTranPrice'
+export const API_POST_YUNSHUSETPRICE = '/tranProcessInfo/api/setUpTranPrice'
+//汽运请款
+export const API_POST_SUBMITLOGISTICS = '/tranSettlementReport/api/submitLogistics'

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

@@ -48,7 +48,8 @@ import {
     API_GET_YUNSHUNUMBER,
     API_POST_YUNSHUSETPRICE,
     API_POST_EDIT_SETTLEMENTWEIGHT,
-    API_POST_INVOICELIST
+    API_POST_INVOICELIST,
+    API_POST_SUBMITLOGISTICS
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -156,4 +157,6 @@ export const getYunShuXiaLa = appRx.get(API_GET_YUNSHUXIALA, errorCatcher, error
 // 火运,船运运输编号下拉
 export const getYunShuNumber= appRx.get(API_GET_YUNSHUNUMBER, errorCatcher, errorHandle, filter)
 // 火运,船运实际价格
-export const SetYunShuPrice = appRx.post(API_POST_YUNSHUSETPRICE, errorCatcher, errorHandle, filter)
+export const SetYunShuPrice = appRx.post(API_POST_YUNSHUSETPRICE, errorCatcher, errorHandle, filter)
+// 汽运请款
+export const submitlogistics = appRx.post(API_POST_SUBMITLOGISTICS, errorCatcher, errorHandle, filter)

+ 2 - 2
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -278,7 +278,7 @@
                     v-if="options2.length == 0 && serviceManagementType == 1 || serviceManagementType == 3 && carNumberList.length == 0"
                     v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7" size="small" />
                   <el-select :disabled="disabled2" v-if="carstatus && options2.length > 0 && serviceManagementType != 3"
-                    filterable clearable v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect"
+                    filterable clearable v-model="deptBudgetList.carNo1" placeholder="请选择车牌号" class="typeselect"
                     @change="carChange($event, 0)">
                     <el-option v-for="(item, index) in options2" :key="index"
                       :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index" />
@@ -2726,7 +2726,7 @@ export default {
                 }
                 // console.log(delete this.deptBudgetList.status)
               if (this.statusTypetext == '初检') {
-                if(this.zjJurisdiction){
+                if(this.zjJurisdiction&&this.serviceManagementType==3){
                   this.deptBudgetList.outType=this.outType
                 }
                 

+ 26 - 14
src/views/statisticalReport/autoSettlementList.vue

@@ -8,10 +8,10 @@
           <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 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">开发票
@@ -44,8 +44,7 @@
       <el-row>
         <div style="color:red">注:审核时,同一运输阶段勾选任意复选框,当前运输阶段下所有条目都通过审核!</div>
       </el-row>
-      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList"
-        border :summary-method="getSummaries" show-summary @row-click="handleRowClick"
+      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList" :summary-method="getSummaries" show-summary @row-click="handleRowClick"
         @selection-change="handleSelectionChange">
         <el-table-column :selectable="selectInit" type="selection" width="55"></el-table-column>
         <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -326,6 +325,7 @@ import {
   autocontract,
   autopaymoney,
   openinvoicelist,
+  submitlogistics
   // postaudit,
   //   getselectctcontractno,
 } from '@/model/statisticalReport/index'
@@ -404,7 +404,7 @@ export default {
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
-      searchType: '1',
+      searchType: '',
       manualFlag: '',
       searchKeyWord: '',
       startAddress:'',
@@ -1002,19 +1002,31 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
-        this.$confirm(`是否确定通过?`, {
+        for (let i = 0; i < this.modification.length; i++) {
+          if(this.modification[i].status=='待请款'&&this.modification[i].approveStatus||this.modification[i].status!='待请款'){
+            this.$message.warning('请选择待请款的条目')
+            return
+          }
+        }
+        
+        this.$confirm(`是否确定请款?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
           type: 'warning',
         }).then(() => {
+          submitlogistics({tranSettlementReportList:this.modification}).toPromise()
+        .then((response) => {
+          this.$message.success('请款成功')
+          this.getList()
+        })
           //批次通过  选中列表中 数据一个batchId, 选中列表去重
-          var obj = {};
-          that.modification = that.modification.reduce(function (item, next) {
-            obj[next.batchId] ? '' : obj[next.batchId] = true && item.push(next);
-            return item;
-          }, []);
-          console.log('去重后提交数据', that.modification);
-          that.audit(this.modification[0], 0, true, 2)
+          // var obj = {};
+          // that.modification = that.modification.reduce(function (item, next) {
+          //   obj[next.batchId] ? '' : obj[next.batchId] = true && item.push(next);
+          //   return item;
+          // }, []);
+          // console.log('去重后提交数据', that.modification);
+          // that.audit(this.modification[0], 0, true, 2)
         })
       }
     },