gjy 3 years ago
parent
commit
0e8e7b247b

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

@@ -36,5 +36,7 @@ export const API_POST_REPAYMENT_SUBMIT = '/repaymentManagement/api/repaymentMone
 //银行
 export const API_GET_WAREHOUSERECEIPT_BANKLIST = '/commonSysParameter/getInfo'
 // 贸易服务默认显示
-export const API_GET_SETDEFAULT = '/tradeWarehouseReceiptAppl/api/setDefault'
+export const API_GET_SETDEFAULT = '/enabledInfo/getEnabledInfo'
+// 贸易服务设置显示
+export const API_SET_SETDEFAULT = '/enabledInfo/api/setEnabledInfo'
 

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

@@ -18,7 +18,8 @@ import {
     API_GET_REPAYMENT_LIST,
     API_POST_REPAYMENT_SUBMIT,
     API_GET_WAREHOUSERECEIPT_BANKLIST,
-    API_GET_SETDEFAULT
+    API_GET_SETDEFAULT,
+    API_SET_SETDEFAULT
 } from '@/api/V2/tradeServicesManagement'
 // 列表
 export const getList = appRx.get(API_GET_TRADESERVICES_LIST, errorCatcher, errorHandle, filter)
@@ -55,4 +56,6 @@ export const repaymentSubmit = appRx.post(API_POST_REPAYMENT_SUBMIT, errorCatche
 export const WarehouseReceiptBankList = appRx.get(API_GET_WAREHOUSERECEIPT_BANKLIST, errorCatcher, errorHandle, filter)
 
 // 贸易服务默认显示
-export const setDefault = appRx.post(API_GET_SETDEFAULT, errorCatcher, errorHandle, filter)
+export const getDefault = appRx.get(API_GET_SETDEFAULT, errorCatcher, errorHandle, filter)
+// 贸易服务设置显示
+export const setDefault = appRx.post(API_SET_SETDEFAULT, errorCatcher, errorHandle, filter)

+ 18 - 0
src/views/houseSelfCollect/paymentManagement.vue

@@ -74,6 +74,9 @@
         <ws-button type="primary" @click="selectPrint(1)"
           v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
         </ws-button>
+        <ws-button type="primary" @click="agreementPrint()"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.dow`">下载结算单
+        </ws-button>
       </template>
       <template slot="right"> </template>
     </BaseHeaderLayout>
@@ -487,6 +490,21 @@
         this.printType = 1
         this.isShowPrintType = true
       },
+      agreementPrint(){
+         var arr = []
+              for (let i = 0; i < this.modification.length; i++) {
+                if(this.modification[i].pictureAddress){
+                  arr.push({
+                  fileUrl: this.modification[i].pictureAddress,
+                  renameFileName: '结算单' + i + '.png',
+                })
+                }
+                
+              }
+              if(arr.length>0){
+                this.filesToRar(arr, '结算单文件')
+              }
+      },
       async exportlist() {
         console.log('导出数据', this.modification)
         let _data = {

+ 37 - 19
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -6,14 +6,14 @@
       <div class="bottom-content">
         <div class="bottom-item" @click="startHacking">查看申请记录</div>
         <div class="bottom-item" @click="startHacking"><i class="el-icon-d-arrow-right icon"></i></div>
-        <el-radio class="bottom-item" v-model="radio" label="1" @change="selectShowType">默认地图</el-radio>
+        <el-radio class="bottom-item" v-model="radio" label="1" @change="selectShowType(1)">默认地图</el-radio>
       </div>
     </div>
     <div class="top">
       <div class="top-content">
         <div class="top-item" @click="startHacking1">查看地图</div>
         <div class="top-item" @click="startHacking1"><i class="el-icon-d-arrow-left icon"></i></div>
-        <el-radio class="top-item" v-model="radio" label="2" @change="selectShowType">默认列表</el-radio>
+        <el-radio class="top-item" v-model="radio" label="2" @change="selectShowType(2)">默认列表</el-radio>
       </div>
     </div>
     <div class="content2">
@@ -82,6 +82,7 @@
     getList,
     getMapInfo,
     deleteTrageInfo,
+    getDefault,
     setDefault
   } from '@/model/tradeServicesManagement/index'
   import {
@@ -96,7 +97,7 @@
         searchVal: '',
         searchKeyWord: '',
         isActive: false,
-        radio: '1',
+        radio: '',
         tradeServicesList: [],
         mapInfo: [],
         currentPage: 1,
@@ -106,31 +107,31 @@
         searchType: '',
         warehouseList: [],
         compId: '',
+        id:'',
       }
     },
     activated() {
       let height = document.body.offsetHeight - 57
       document.querySelector('.container').setAttribute('style', 'height:' + height + 'px;')
-      let _showPage = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
-      if (_showPage == "1") {
-        this.radio = '1'
+      // let _showPage = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
+      getDefault({functionType:1}).toPromise().then((response) => {
+          console.log('地图数据', response)
+          if(response){
+            this.id=response
+            this.radio=response.enabled
+          }
+          // this.mapInfo = response.data.records
+        })
+      if (this.radio == "1") {
         this.isActive = false
-      } else if (_showPage == "2") {
-        this.radio = '2'
+      } else if (this.radio == "2") {
         this.isActive = true
-      } else {
-        this.radio = '1'
-        this.isActive = false
-      }
+      } 
       this.compId = localStorage.getItem('ws-pf_compId')
       this.getMapInfo()
       // this.getWarehouseList()
       this.tradeServicesList = []
-        //  setDefault().toPromise().then((response) => {
-        //   // console.log('地图数据', response)
-        //   this.mapInfo = response
-        //   // this.mapInfo = response.data.records
-        // })
+         
         localStorage.removeItem("pageUp")//删除出入库跳返回时数据刷新的问题
       // let i = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
       // console.log(i)
@@ -250,8 +251,25 @@
           })
       },
       selectShowType(e) {
-        this.activated = !this.activated;
-        localStorage.setItem('warehouseReceiptRegulation_selectShowType', e)
+        // this.isActive=!this.isActive
+        if(this.radio == 1){
+          this.radio = 2
+        }else{
+          this.radio = 1
+        }
+        
+        var data={}
+        if(this.id!=''){
+          data={functionType:1,enabled:0,id:this.id}
+        }else{
+          data={
+            functionType:1,enabled:1,
+          }
+        }
+        setDefault(data).toPromise()
+          .then(response => {
+            this.getList()
+          })
       },
       add() {
         this.$router.push({