Преглед на файлове

前端汽运报表导出,费用申请审核弹窗代码

gjy преди 2 години
родител
ревизия
75c3f439f7

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

@@ -108,4 +108,6 @@ export const API_POST_SUBMITLOGISTICS = '/tranSettlementReport/api/submitLogisti
 //船运反馈接口
 export const API_POST_EDITTRANTASK = '/tranTaskInfo/api/editTranTask'
 //粮食单价编辑
-export const API_POST_EDIT_TRANSETTLEMENT ='/tranSettlementReport/api/editTranSettlementReport'
+export const API_POST_EDIT_TRANSETTLEMENT ='/tranSettlementReport/api/editTranSettlementReport'
+// 汽运导出
+export const API_GET_EXPORT = `/tranSettlementReport/export`

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

@@ -51,7 +51,8 @@ import {
     API_POST_INVOICELIST,
     API_POST_SUBMITLOGISTICS,
     API_POST_EDITTRANTASK,
-    API_POST_EDIT_TRANSETTLEMENT
+    API_POST_EDIT_TRANSETTLEMENT,
+    API_GET_EXPORT
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -165,4 +166,6 @@ export const submitlogistics = appRx.post(API_POST_SUBMITLOGISTICS, errorCatcher
 // 船运反馈
 export const edittrantask = appRx.post(API_POST_EDITTRANTASK, errorCatcher, errorHandle, filter)
 // 船运反馈
-export const editgrainprice = appRx.post(API_POST_EDIT_TRANSETTLEMENT, errorCatcher, errorHandle, filter)
+export const editgrainprice = appRx.post(API_POST_EDIT_TRANSETTLEMENT, errorCatcher, errorHandle, filter)
+// 船运反馈
+export const getexport = appRx.post(API_GET_EXPORT)

+ 42 - 33
src/views/profitable/cashoutaduit.vue

@@ -136,15 +136,15 @@
       
     </div>
     <el-dialog
-      title="驳回"
+      :title="title"
       :visible.sync="rejectshow"
       width="30%"
       :before-close="handleClose">
-      <span>驳回原因</span>
+      <span>{{title=='驳回'?'驳回审核':'通过审核'}}</span>
       <div><el-input
   type="textarea"
   :rows="2"
-  placeholder="请输入驳回原因"
+  placeholder="请输入审核意见"
   v-model="textarea">
 </el-input>
 </div>
@@ -184,6 +184,7 @@ import WsUpload from '@/components/WsUpload'
         warecontractList:[],
         textarea:'',
         size:100,
+        title:'驳回',
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
         makeWordData: {},
@@ -219,10 +220,44 @@ import WsUpload from '@/components/WsUpload'
             type: 'warning'
           })
           .then(() => {
-            woekflowhandle({
+            this.title='通过'
+            this.rejectshow=true
+            
+          })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      reject(){
+        this.title='驳回'
+        this.rejectshow=true
+      },
+      rejectclick(){
+        if(this.title=='驳回'){
+          woekflowhandle({
+            taskId: this.deptBudgetList.taskId,
+            approved:false,
+            auditMind: this.textarea,
+            needReapply: true,
+          }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.rejectshow=false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
+          })
+        }else{
+          woekflowhandle({
               taskId: this.deptBudgetList.taskId,
               approved:true,
-              auditMind: '34',
+              auditMind: this.textarea,
               needReapply: true,
             }).toPromise()
             .then((response) => {
@@ -237,34 +272,8 @@ import WsUpload from '@/components/WsUpload'
                 type: 'error',
               })
             })
-          })
-      },
-      returnsales(){
-        this.$router.go(-1)
-      },
-      reject(){
-        this.rejectshow=true
-      },
-      rejectclick(){
-        woekflowhandle({
-          taskId: this.deptBudgetList.taskId,
-          approved:false,
-          auditMind: this.textarea,
-          needReapply: true,
-        }).toPromise()
-        .then((response) => {
-          this.$message({
-            message: '驳回成功!',
-            type: 'success',
-          })
-          this.rejectshow=false
-          this.$router.go(-1)
-        }).catch((response) => {
-          this.$message({
-            message: '驳回失败!',
-            type: 'error',
-          })
-        })
+        }
+        
       },
       getList() {
        getcontract({

+ 31 - 25
src/views/statisticalReport/autoSettlementList.vue

@@ -16,6 +16,7 @@
           </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>
@@ -425,7 +426,8 @@ import {
   autopaymoney,
   openinvoicelist,
   submitlogistics,
-  editgrainprice
+  editgrainprice,
+  getexport
   // postaudit,
   //   getselectctcontractno,
 } from '@/model/statisticalReport/index'
@@ -444,8 +446,9 @@ import {
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import {
-  EventBus
-} from 'base-core-lib'
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -560,6 +563,10 @@ export default {
         paymentScreenshot: '',
         id: '',
       },
+      date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
       carType:'',
       settlementPrice:0,
       amountNotPayable: 0,
@@ -588,6 +595,27 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    async exportlist() {
+      if(this.modification.length>0){
+        const {
+          data
+        } = await getexport({
+          tranSettlementReportList:this.modification,
+        }, {}, {
+          responseType: 'blob',
+        }).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_汽运结算`,
+          type: 'xls',
+        })
+      }else{
+        this.$message.warning('请勾选要导出的条目')
+      }
+        
+      },
     editgrainPrice(){
       if(this.grainPricetext=='编辑'){
         this.grainPricetext='提交'
@@ -1605,28 +1633,6 @@ export default {
           this.historyList = response
         })
     },
-    async exportlist() {
-      const {
-        data
-      } = await export1({
-        compId: localStorage.getItem('ws-pf_compId'),
-        contractType: this.contractType,
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord,
-        startDate: this.startDate,
-        endDate: this.endDate,
-      }, {}, {
-        responseType: 'blob'
-      }).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${this.date.year + (this.date.month ? `-${this.date.month}` : '')
-          }_采购合同`,
-        type: 'xls',
-      })
-    },
     total() { },
   },
 }