gjy 3 年之前
父节点
当前提交
588fe80534

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

@@ -81,7 +81,8 @@ export const API_POST_ADDDISORREMARKS = '/stockPurchaseReceiptReport/api/disAndR
 export const API_POST_EDITSETTLEMENTWEIGHT = '/stockPurchaseReceiptReport/api/edit'
 //现货采购入库合同
 export const API_GET_STOCK_PURCHASE_CONTRACTNO = '/stockPurchaseReceiptReport/selectContractNoList'
-
+//现货采购入库导出
+export const API_GET_STOCK_PURCHASE_EXPORT ='/stockPurchaseReceiptReport/export'
 
 //现货销售出库报表
 export const API_GET_STOCKSALECEIPT = '/stockSaleReceiptReport/selectSaleOrder'

+ 3 - 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_GET_STOCK_PURCHASE_EXPORT
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -94,7 +95,7 @@ export const postopeninvoice = appRx.post(API_POST_OPENINVOICE, errorCatcher, er
 export const postbatchopeninvoice = appRx.post(API_POST_BATCHOPENINVOICE, errorCatcher, errorHandle, filter)
 
 
-
+export const export1 = appRx.post(API_GET_STOCK_PURCHASE_EXPORT)
 //期货销售出库报表
 export const salelist = appRx.get(API_GET_SALELIST, errorCatcher, errorHandle, filter)
 //期货销售出库出纳收款

+ 41 - 19
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -54,6 +54,12 @@
             @click="dis()"
             >定金</ws-button
           >
+          <ws-button
+            type="primary"
+            v-hasPermission="`report.goodsProcurementInReport.view`"
+            @click="exportlist()"
+            >导出</ws-button
+          >
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:300px" :span="8">
         <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
@@ -160,7 +166,6 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column
-          :selectable="selectInit"
           type="selection"
           width="55"
         ></el-table-column>
@@ -437,13 +442,17 @@ import {
   editSettlementWeight,
   addDisOrRemarks,
   stockPurchasePayMoney,
+  export1
 } from '@/model/statisticalReport/index'
 import { workflowcontent } from '@/model/houseSelfCollect/index'
 import { downloadFile } from '@/utils/batchDown'
 import { posthandle } from '@/model/purchasingManagement/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { EventBus } from 'base-core-lib'
+import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -569,6 +578,10 @@ export default {
       accessoryTFs1: false,
       appendixIdss: [],
       appendixIdss1:'',
+      date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
     }
   },
   activated() {
@@ -684,15 +697,7 @@ export default {
     },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
-      if (row.approveStatus == null) {
-        return true
-      } else if (row.approveStatus != null) {
-        if (row.taskId == null) {
-          return false
-        } else {
-          return true
-        }
-      }
+      
     },
     //添加定金信息
     dis() {
@@ -892,6 +897,18 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择一条要审核的条目')
       } else {
+        for (let i = 0; i < this.modification.length; i++) {
+          if (this.modification[i].approveStatus == null) {
+              this.$message.warning('请选择一条待审核的条目')
+              return
+          } else if (this.modification[i].approveStatus != null) {
+            if (this.modification[i].taskId == null) {
+              this.$message.warning('请选择一条待审核的条目')
+              return 
+            } else {
+            }
+          }
+        }
         this.$confirm(`审核通过后,任务将发送给下一级,是否确定通过?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
@@ -941,6 +958,18 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要驳回的条目')
       } else {
+         for (let i = 0; i < this.modification.length; i++) {
+          if (this.modification[i].approveStatus == null) {
+              this.$message.warning('请选择一条待审核的条目')
+              return
+          } else if (this.modification[i].approveStatus != null) {
+            if (this.modification[i].taskId == null) {
+              this.$message.warning('请选择一条待审核的条目')
+              return 
+            } else {
+            }
+          }
+        }
         this.$confirm(`是否确定驳回?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
@@ -1206,14 +1235,7 @@ export default {
     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,
+         stockPurchaseReceiptReportList: this.modification,
         },
         {},
         { responseType: 'blob' }