Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 3 years ago
parent
commit
4cb3d0fa12

+ 0 - 1
public/static/inspection.html

@@ -169,7 +169,6 @@
             <td class="col">{{tableData.jiaorenli}}</td>
             <td class="col">{{tableData.jiaorenli}}</td>
             <td v-if="tableData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
             <td v-if="tableData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
             <td v-else class="col col-bgc">待定单价(元/公斤)</td>
             <td v-else class="col col-bgc">待定单价(元/公斤)</td>
-            <td class="col">{{tableData.tidalGrainPrice}}</td>
             <td class="col " v-if="tableData.type == '潮粮'">
             <td class="col " v-if="tableData.type == '潮粮'">
               {{tableData.tidalGrainPrice}}
               {{tableData.tidalGrainPrice}}
             </td>
             </td>

+ 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_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_GET_REPAYMENT_LIST,
     API_POST_REPAYMENT_SUBMIT,
     API_POST_REPAYMENT_SUBMIT,
     API_GET_WAREHOUSERECEIPT_BANKLIST,
     API_GET_WAREHOUSERECEIPT_BANKLIST,
-    API_GET_SETDEFAULT
+    API_GET_SETDEFAULT,
+    API_SET_SETDEFAULT
 } from '@/api/V2/tradeServicesManagement'
 } from '@/api/V2/tradeServicesManagement'
 // 列表
 // 列表
 export const getList = appRx.get(API_GET_TRADESERVICES_LIST, errorCatcher, errorHandle, filter)
 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 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)

+ 34 - 2
src/views/houseSelfCollect/inspectInfo.vue

@@ -164,7 +164,7 @@
         </div>
         </div>
       </ws-form>
       </ws-form>
     </div>
     </div>
-    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @close="closeDialog"
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @opened='opendBtn' @close="closeDialog"
       :close-on-click-modal="false">
       :close-on-click-modal="false">
       <inspectInfoPrint :printData="inspect" ref="saveImg"></inspectInfoPrint>
       <inspectInfoPrint :printData="inspect" ref="saveImg"></inspectInfoPrint>
       <div style="text-align:center">
       <div style="text-align:center">
@@ -362,7 +362,39 @@
                     // this.isName = false;
                     // this.isName = false;
                 }
                 }
             },
             },
-
+      opendBtn(){
+           html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.inspect.flag = 0
+              } else if (this.types == 4) {
+                this.inspect.flag = 1
+              }
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+              
+                })
+            })
+          }
+        })
+      },
+      
       closeDialog() {
       closeDialog() {
         html2canvas(this.$refs.saveImg.$el).then(canvas => {
         html2canvas(this.$refs.saveImg.$el).then(canvas => {
           let dataURL = canvas.toDataURL('image/png');
           let dataURL = canvas.toDataURL('image/png');

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

@@ -74,6 +74,9 @@
         <ws-button type="primary" @click="selectPrint(1)"
         <ws-button type="primary" @click="selectPrint(1)"
           v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
           v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
         </ws-button>
         </ws-button>
+        <ws-button type="primary" @click="agreementPrint()"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.dow`">下载结算单
+        </ws-button>
       </template>
       </template>
       <template slot="right"> </template>
       <template slot="right"> </template>
     </BaseHeaderLayout>
     </BaseHeaderLayout>
@@ -487,6 +490,21 @@
         this.printType = 1
         this.printType = 1
         this.isShowPrintType = true
         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() {
       async exportlist() {
         console.log('导出数据', this.modification)
         console.log('导出数据', this.modification)
         let _data = {
         let _data = {

+ 24 - 0
src/views/houseSelfCollect/settlement.vue

@@ -400,6 +400,7 @@
       :visible.sync="isShowPrint"
       :visible.sync="isShowPrint"
       :title="printData.compName+'结算凭证'"
       :title="printData.compName+'结算凭证'"
        @close="closeDialog"
        @close="closeDialog"
+       @opened = 'opendBtn'
        :modal-append-to-body = "false"
        :modal-append-to-body = "false"
     >
     >
       <paymentPrint :printData="printData" ref="saveImg"></paymentPrint>
       <paymentPrint :printData="printData" ref="saveImg"></paymentPrint>
@@ -455,6 +456,29 @@ export default {
     inputFocus(event){
     inputFocus(event){
       event.currentTarget.select()
       event.currentTarget.select()
     },
     },
+    opendBtn(){
+            html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+        let dataURL = canvas.toDataURL('image/png')
+        this.imgUrl = dataURL
+        if (this.imgUrl !== '' ) {
+          let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+          let formdata = new FormData()
+          formdata.append('file', b)
+          axios({
+            method: 'post',
+            url: 'https://www.zthymaoyi.com/upload/admin',
+            data: formdata,
+          }).then((response) => {
+            //编辑接口
+            this.paymentList.pictureAddress = response.data.url
+            settlementEdit(this.paymentList)
+              .toPromise()
+              .then((response) => {})
+
+          })
+        }
+      })
+    },
     closeDialog(){
     closeDialog(){
       html2canvas(this.$refs.saveImg.$el).then((canvas) => {
       html2canvas(this.$refs.saveImg.$el).then((canvas) => {
         let dataURL = canvas.toDataURL('image/png')
         let dataURL = canvas.toDataURL('image/png')

+ 23 - 1
src/views/houseSelfCollect/weightCheck.vue

@@ -164,7 +164,7 @@
       </div>
       </div>
 
 
     </div>
     </div>
-    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @close="closeDialog"
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @opened = 'opendBtn' @close="closeDialog"
       :close-on-click-modal="false">
       :close-on-click-modal="false">
       <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
       <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
       <div style="text-align:center">
       <div style="text-align:center">
@@ -774,6 +774,28 @@
       printBig() {
       printBig() {
         window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.inspect))
         window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.inspect))
       },
       },
+      opendBtn(){
+            html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+          let dataURL = canvas.toDataURL('image/png')
+          this.imgUrl = dataURL
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+            let formdata = new FormData()
+            formdata.append('file', b)
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata,
+            }).then((response) => {
+              //编辑接口
+              this.weighingList.pictureAddress = response.data.url
+              tare(this.weighingList)
+                .toPromise()
+                .then((response) => {})
+            })
+          }
+        })
+      },
       closeDialog() {
       closeDialog() {
         html2canvas(this.$refs.saveImg.$el).then((canvas) => {
         html2canvas(this.$refs.saveImg.$el).then((canvas) => {
           let dataURL = canvas.toDataURL('image/png')
           let dataURL = canvas.toDataURL('image/png')

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

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