浏览代码

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 2 年之前
父节点
当前提交
6255e4c425

+ 49 - 17
public/static/weightCheck.html

@@ -590,9 +590,9 @@
             pageType: '',
             isDDPrint: false,
             isEWPrint: false,
-            imgUrl: ""
+            imgUrl: "",
+            serverIp: ""
         },
-        computed: {},
         methods: {
             tableRowClassName({
                 row,
@@ -619,29 +619,32 @@
             printSmall() { },
             printBig() { },
             closeDialog() {
-                
-// var ippath=API_CONFIG.devServer.proxy['/pb'].target
-// console.log(ippath)
-                if (this.tableData.length == 1) {//this.tableData  条数为1 认为单个打印
+                var that = this
+                if (location.host == "www.eliangeyun.com") {
+                    that.serverIp = "https://api2.eliangeyun.com"
+                } else {
+                    that.serverIp = localStorage.getItem("serverIp")
+                }
+                if (that.tableData.length == 1) {//this.tableData  条数为1 认为单个打印
                     html2canvas(document.querySelector("#saveImg"), { foreignObjectRendering: true, allowTaint: true }).then((canvas) => {
                         let dataURL = canvas.toDataURL('image/png')
-                        this.imgUrl = dataURL
-                        if (this.imgUrl !== '') {
-                            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+                        that.imgUrl = dataURL
+                        if (that.imgUrl !== '') {
+                            let b = that.dataURLtoFile(that.imgUrl, 'printImage')
                             let formdata = new FormData()
                             formdata.append('file', b)
                             axios({
                                 method: 'post',
-                                url: "http://192.168.110.9:9888/appendix/admin",
+                                url: "https://api2.eliangeyun.com/appendix/admin",
                                 data: formdata,
                             }).then((response) => {
                                 // 编辑接口
-                                this.weighingList = this.tableData[0]
-                                this.weighingList.pictureAddress = response.data.data.url
+                                that.weighingList = that.tableData[0]
+                                that.weighingList.pictureAddress = response.data.data.url
                                 axios({//皮重检斤接口
                                     method: 'post',
-                                    url: "http://192.168.110.9:9888/weighingManagement/api/editTare",
-                                    data: this.weighingList,
+                                    url: that.serverIp + "/weighingManagement/api/editTare",
+                                    data: that.weighingList,
                                 }).then((response) => {//入库单截图上传成功
                                 })
                             })
@@ -649,9 +652,39 @@
                     })
                 }
             },
+            // async getImgBase64() {
+            //     var that = this
+            //     let ele = document.querySelector("#saveImg")
+            //     const width = ele.offsetWidth
+            //     const height = ele.offsetHeight
+            //     let canvas = await html2canvas(ele, {
+            //         scale: 2,
+            //         width,
+            //         height,
+            //         backgroundColor: "red",
+            //         foreignObjectRendering:true,
+            //         allowTaint:true
+            //     })
+            //     let dataURL = canvas.toDataURL('image/png')
+            //     that.imgUrl = dataURL
+            //     if (that.imgUrl !== '') {
+            //         let b = that.dataURLtoFile(that.imgUrl, 'printImage')
+            //         let formdata = new FormData()
+            //         formdata.append('file', b)
+            //         document.body.appendChild(canvas)
+            //         // axios({
+            //         //     method: 'post',
+            //         //     url: "https://api2.eliangeyun.com/appendix/admin",
+            //         //     data: formdata,
+            //         // }).then((response) => { 
+            //         //     debugger
+            //         // })
+            //     }
+            // }
         },
         updated() {
             this.closeDialog()
+            // this.getImgBase64()
         },
         mounted() {
             let _data = {}
@@ -688,13 +721,12 @@
                 this.tableData = JSON.parse(_data.replace(/baifenhao/g, '%'))
             }
             // sessionStorage.setItem('record_print', JSON.stringify(response))
-            // this.tableData = JSON.parse(sessionStorage.getItem("record_print"))
-
+            // this.tableData = JSON.parse(sessionStorage.getItem("record_print")
             document.title = "粮食检斤单"
-            window.print()
             window.onafterprint = function (event) {
                 window.history.back(-1)
             };
+            window.print()
         },
         watch: {}
     })

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

@@ -103,4 +103,6 @@ export const API_BATCH_DEL_FIXEDINFO = '/fixedAssetsInfo/batchDeleteFixedAssets'
 // 发起人撤回
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
 // 入库单列表
-export const API_GET_WAREHOUSINGORDER_LIST = '/warehousingOrder/selectInfo'
+export const API_GET_WAREHOUSINGORDER_LIST = '/warehousingOrder/selectInfo'
+//费用明细信息
+export const API_POST_EXPORTFILE = '/expenseInfo/exportPc'

+ 1 - 0
src/layout/index/top/index.vue

@@ -666,6 +666,7 @@
            _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1
            _saomadata.monitorUrl2 = this.toPageData.warehouseBaseInfo.monitorUrl2
            _saomadata.allowEdit = this.toPageData.warehouseBaseInfo.allowEdit
+           _saomadata.number = this.toPageData.number
             localStorage.setItem('saoma_data',JSON.stringify(_saomadata))
              this.$router.push({
             name: 'newWeighingManagement',query: {  id:this.index++ }

+ 4 - 1
src/model/profitable/index.js

@@ -53,6 +53,7 @@ import {
   API_BATCH_DEL_FIXEDINFO,
   API_SPONSOR_WITHDRAW,
   API_GET_WAREHOUSINGORDER_LIST,
+  API_POST_EXPORTFILE
 } from '@/api/V2/profitable'
 //收支明细列表
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
@@ -158,4 +159,6 @@ export const batchDelFixedInfo = appRx.post(API_BATCH_DEL_FIXEDINFO, errorCatche
 	// 发起人撤回
   export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
   //入库单列表
-export const getwarehousingorderList = appRx.get(API_GET_WAREHOUSINGORDER_LIST,errorCatcher, errorHandle, filter)
+export const getwarehousingorderList = appRx.get(API_GET_WAREHOUSINGORDER_LIST,errorCatcher, errorHandle, filter)
+// 导出费用明细信息
+export const exportFile = appRx.post(API_POST_EXPORTFILE)

+ 55 - 8
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -311,6 +311,7 @@
   import BalanceAlert from '@/components/balanceAlert'
   import html2canvas from 'html2canvas'
   import axios from 'axios'
+  import configText from '../../../vue.config.js'
   export default {
     components: {
       weightCheckPrint,
@@ -337,6 +338,7 @@
                 this.allowEdit = _saomaData.allowEdit
                 this.id = _saomaData.id
                 this.tpyeNo = _saomaData.typeNo
+                this.number = _saomaData.number
                 if (_saomaData.managementType) {
                   this.inWarehouseType = _saomaData.managementType
                 }
@@ -558,6 +560,7 @@
         statusType: 1,
         jjSelectPrintList: [],
         printSeparately: false,
+        number:'',
       }
     },
     beforeDestroy() {
@@ -566,6 +569,7 @@
       }
     },
     mounted() {
+      localStorage.setItem('serverIp',configText.devServer.proxy['/pb'].target)
       if(localStorage.getItem('compNameoptions')){
         var company=JSON.parse(localStorage.getItem('compNameoptions'))
         var extra=company.filter((item)=>{
@@ -612,6 +616,7 @@
             this.allowEdit = _saomaData.allowEdit
             this.id = _saomaData.id
             this.tpyeNo = _saomaData.typeNo
+            this.number = _saomaData.number
             if (_saomaData.managementType) {
               this.inWarehouseType = _saomaData.managementType
             }
@@ -1037,14 +1042,26 @@
           console.log(this.mList)
           this.carList = this.mList
           this.carList1 = this.mListTotal
-          if (this.mList.length != 0) {
-            this.setCurrent(this.mList[0])
-            this.weighingList = this.mList[0]
-            this.weighingList.donecount=this.mList[0].completedQuantity+'/'+this.mList[0].weight
-            this.carWeightInfo = {
-              carNumber: this.mList[0].carNumber,
-              type: this.information,
-              weight: this.weighingList.grossWeight,
+          for (let i = 0; i < this.mList.length; i++) {
+            if (this.number == this.mList[i].number) {
+              this.setCurrent(this.mList[i])
+              this.weighingList = this.mList[i]
+              this.weighingList.donecount = this.mList[i].completedQuantity + '/' + this.mList[i].weight
+              this.carWeightInfo = {
+                carNumber: this.mList[i].carNumber,
+                type: this.information,
+                weight: this.weighingList.grossWeight,
+              }
+            }
+            else{
+              this.setCurrent(this.mList[0])
+              this.weighingList = this.mList[0]
+              this.weighingList.donecount = this.mList[0].completedQuantity + '/' + this.mList[0].weight
+              this.carWeightInfo = {
+                carNumber: this.mList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.grossWeight,
+              }
             }
           }
         } else {
@@ -1052,6 +1069,36 @@
           console.log(this.pList)
           this.carList = this.pList
           this.carList1 = this.pListTotal
+          for (let i = 0; i < this.pList.length; i++) {
+            if (this.number == this.pList[i].number) {
+              this.setCurrent(this.pList[i])
+              this.weighingList = this.pList[i]
+              this.weighingList.donecount = this.mList[i].completedQuantity + '/' + this.mList[i].weight
+              this.weighingList.inOutType = this.pList[i].qualityInspectionManagement.inOutType
+              this.weighingList.inOutTypeKey = this.pList[i].qualityInspectionManagement.inOutTypeKey
+              this.weighingList.deductionAmount = this.pList[i].qualityInspectionManagement.deductionAmount
+              // console.log(this.weighingList)
+              this.carWeightInfo = {
+                carNumber: this.pList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.tare
+              }
+            }
+            else {
+              this.setCurrent(this.pList[0])
+              this.weighingList = this.pList[0]
+              this.weighingList.donecount = this.mList[0].completedQuantity + '/' + this.mList[0].weight
+              this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
+              this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
+              this.weighingList.deductionAmount = this.pList[0].qualityInspectionManagement.deductionAmount
+              // console.log(this.weighingList)
+              this.carWeightInfo = {
+                carNumber: this.pList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.tare
+              }
+            }
+          }
           if (this.pList.length != 0) {
             this.setCurrent(this.pList[0])
             this.weighingList = this.pList[0]

+ 3 - 3
src/views/houseSelfCollect/settlement.vue

@@ -365,15 +365,15 @@
               data: formdata,
             }).then((response) => {
               //编辑接口
-              this.paymentList.pictureAddress = response.data.url
+              this.paymentList.pictureAddress = response.data.data.url
               settlementEdit(this.paymentList)
                 .toPromise()
-                .then((response) => {})
+                .then((response) => {
+                })
               this.paymentList = []
 
             })
             this.dialogTableVisible = true
-
           }
         })
         this.isShowPrint = false

+ 42 - 4
src/views/profitable/expensemanagementdetails.vue

@@ -23,6 +23,10 @@
         <el-col :span="18">
           <div class="datascreen">
             <!-- <el-input placeholder="可按费用名称、流向、经办人查找" class="input_css" v-model="searchKeyWord" clearable></el-input> -->
+            <el-select v-model="warehouseName"  filterable placeholder="按仓库筛选" clearable @change="getList" class="options_css">
+              <el-option label="全部仓库" value=""></el-option>
+              <el-option v-for="item in warehousNameList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName"></el-option>
+            </el-select>
             <el-select v-model="costNo" multiple filterable allow-create default-first-option placeholder="按编号筛选" clearable @change="getList" class="options_css">
               <el-option v-for="item in choiceObj" :key="item.id" :label="item.costNo" :value="item.costNo">
               </el-option>
@@ -69,6 +73,7 @@
           <el-button @click="costChange(1)" :type="expensesPurpose == 1 ? 'primary' : ''">合同费用</el-button>
           <el-button @click="costChange(5)" :type="expensesPurpose == 5 ? 'primary' : ''">经营性费用</el-button>
           <el-button @click="costChange(2)" :type="expensesPurpose == 2 ? 'primary' : ''">运费</el-button>
+          <el-button @click="exportFile" type="primary">导出</el-button>
         </el-col>
         <el-col style="text-align: right" :span="6">
           <el-badge v-if="approveStatus" is-dot class="item">
@@ -244,7 +249,7 @@
       <div style="padding: 20px" v-for="(item, index) in recordList" :style="{
         'border-bottom':
           index != recordList.length - 1 ? '1px solid #ccc' : 'none',
-      }">
+      }" :key="index">
         <div style="width: 100%; justify-content: space-between" class="flex">
           <div style="width: 33.333%; text-align: left">
             {{ item.operateUser }}
@@ -303,8 +308,13 @@ import {
   getAuditRecord,
   getfielfillinginfo,
   getXialaList,
-  sponsorWithdraw
+  sponsorWithdraw,
+  exportFile,
 } from '@/model/profitable/index'
+import { getwarehousName} from '@/model/warehouse/index'
+import {
+    downloadFile
+  } from '@/utils/batchDown'
 export default {
   components: {
     WsUpload,
@@ -370,15 +380,35 @@ export default {
       flowToList:[],
       costNameList:[],
       moneyList:[],
-      personList:[]
+      personList:[],
+      warehousNameList:[],
+      warehouseName:""
     }
   },
   activated() {
+  
     this.getPassYearFormatDate()
     this.getList()
     this.xiala()
   },
   methods: {
+    async exportFile(){
+        let _data = {
+          expenseInfoExportList:this.choiceObj
+        }
+        const {
+          data
+        } = await exportFile(
+          _data, {}, {
+            responseType: 'blob',
+          }
+        ).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `费用明细`,
+          type: 'xls',
+        })
+    },
     withdraw(row) {
       this.$confirm(`撤回成功后,可再次提交,确定撤回吗?`, {
         cancelButtonText: '取消',
@@ -396,7 +426,14 @@ export default {
       })
     },
     xiala(){
-      
+      //仓库筛选
+      getwarehousName({
+        compId: localStorage.getItem('ws-pf_compId'),
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehousNameList = response
+        })
        //搜索框下拉数据
        getexenseinfo({
         compId: localStorage.getItem('ws-pf_compId'),
@@ -793,6 +830,7 @@ export default {
         unallocatedNumber:this.unallocatedAmount.length>0?this.unallocatedAmount.toString():'',
         agent:this.agent.length>0?this.agent.toString():'',
         flowTo:this.flowTo.length>0?this.flowTo.toString():'',
+        warehouseName:this.warehouseName
       })
         .toPromise()
         .then((response) => {

+ 1 - 1
src/views/taskManagement/supplyofgoods.vue

@@ -72,7 +72,7 @@
         </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
   </div>
 </template>
 <script>