瀏覽代碼

前端 更新 sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
9f64617495

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

@@ -80,8 +80,10 @@ export const API_GET_WAREHOUSETASK = '/inOutWarehouseTask/selectWarehouseTask'
 export const API_GET_CHECKORUPDATE = '/inOutWarehouseTask/api/checkOrUpdateInOutTask'
 // 获取出入库任务编号
 export const API_GET_RECEIPTTASKNO = '/inOutWarehouseTask/selectInOutWarehouseNo'
-//导出
+//导出入库
 export const API_POST_EXPORT = '/warehouseBaseInfo/export'
+//导出出库
+export const API_POST_EXPORTOUT = '/warehouseBaseInfo/exportOut'
 //打印增量
 export const API_GET_PRINT = '/commonConstantFalse/getInfo'
 

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

@@ -40,7 +40,8 @@ import {
     API_GET_CHECKORUPDATE,
     API_GET_RECEIPTTASKNO,
     API_POST_EXPORT,
-    API_GET_PRINT
+    API_GET_PRINT,
+    API_POST_EXPORTOUT
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // 列表
@@ -120,8 +121,10 @@ export const getwarehousetask = appRx.get(API_GET_WAREHOUSETASK,errorCatcher, er
 export const postcheckorupdate = appRx.post(API_GET_CHECKORUPDATE,errorCatcher, errorHandle, filter)
 //获取出入库任务编号
 export const getReceiptTaskNo = appRx.get(API_GET_RECEIPTTASKNO,errorCatcher, errorHandle, filter)
-//导出
+//导出入库
 export const postExport = appRx.post(API_POST_EXPORT)
+//导出出库
+export const postExportOut = appRx.post(API_POST_EXPORTOUT)
 //打印增量
 export const  printAdd = appRx.get(API_GET_PRINT,errorCatcher, errorHandle, filter)
 

+ 2 - 2
src/views/houseSelfCollect/paymentManagement.vue

@@ -1154,11 +1154,11 @@ export default {
         for (let i = 0; i < this.modification.length; i++) {
           if (this.modification[i].status != '已驳回') {
             if (
-              this.modification[i].approveStatus == '待决策人审核' ||
+              this.modification[i].approveStatus == '待决策人审核' || this.modification[i].approveStatus == '待财务审核'||
               this.modification[i].status == '全部付款'
             ) {
               this.$message.error(
-                '请选择状态为已通过且部分付款或未付款的条目'
+                '请选择状态为已通过且待结算或者部分付款的条目'
               )
               return false
             } else {

+ 3 - 3
src/views/statisticalReport/autoSettlementList.vue

@@ -819,7 +819,7 @@ export default {
     //付款
     handlepayment() {
       this.amountNotPayable = 0
-      this.money = this.money
+      // this.money = this.money
       this.tranSettlementReportList = this.warehouseList.records[0].tranSettlementReportList
       this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
       this.paymentDate = this.paymentDate
@@ -834,7 +834,7 @@ export default {
             this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
             return
           }
-          this.amountNotPayable += this.modification[i].amountNotPayable
+          this.amountNotPayable += Number(this.modification[i].amountNotPayable)
         }
         this.dialogFormVisible1 = true
       }
@@ -873,7 +873,7 @@ export default {
           })
           return
         }
-        if (this.money > this.modification[0].amountNotPayable) {
+        if (Number(this.money) > Number(this.amountNotPayable)) {
           this.$message({
             message: '付款金额不能大于未付金额!',
             type: 'warning',

+ 4 - 1
src/views/statisticalReport/huoyunList.vue

@@ -636,7 +636,7 @@ export default {
     //结算
     handlepayment() {
       this.amountNotPayable = 0
-      this.money = this.money
+      // this.money = this.money
       this.tranSettlementReportList = this.warehouseList.records[0].tranSettlementReportList
       this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
       this.paymentDate = this.paymentDate
@@ -1167,8 +1167,11 @@ export default {
                 }
               } 
           }
+          if(response.records.length > 0){
             this.amountEdPayable = response.records[0].amountEdPayable // 已付
              this.alreadyInvoice = response.records[0].amountNotPayable//未付
+
+          }
           this.deptBudgetTotal = response.total
           this.warehouseList = response
         })

+ 5 - 3
src/views/statisticalReport/shippingList.vue

@@ -684,7 +684,7 @@ export default {
             this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
             return
           }
-          this.amountNotPayable += this.modification[i].amountNotPayable
+          this.amountNotPayable += Number(this.modification[i].amountNotPayable)
         }
         this.dialogFormVisible1 = true
       }
@@ -1219,8 +1219,10 @@ export default {
               }
             }
           }
-          this.amountEdPayable = response.records[0].amountEdPayable // 已付
-          this.alreadyInvoice = response.records[0].amountNotPayable //未付
+          if(response.records.length > 0){
+              this.amountEdPayable = response.records[0].amountEdPayable // 已付
+               this.alreadyInvoice = response.records[0].amountNotPayable //未付
+          }
           this.deptBudgetTotal = response.total
           this.warehouseList = response
         })

+ 27 - 9
src/views/warehouse/warehouseManagementList.vue

@@ -285,17 +285,17 @@
         <div class="print-type-title">{{headerText}}</div>
         <div class="print-type-checkbox">
             <el-form ref="form"  label-width="110px">
-              <el-form-item label="类型" v-if="headerText == '打印记录'">
+              <el-form-item label="类型">
             <el-radio-group v-model="parameter.radio" >
                 <el-radio :label="3" >入库记录</el-radio>
                 <el-radio :label="2">出库记录</el-radio>
              </el-radio-group>
               </el-form-item>
               <el-form-item label="起始日期">
-              <el-date-picker value-format="yyyy-MM-dd" type="date"  placeholder="请选择起始日期" v-model="parameter.startDate" :default-value="new Date()"></el-date-picker>
+              <el-date-picker value-format="yyyy-MM-dd" type="date"  placeholder="请选择起始日期" v-model="parameter.startDate"></el-date-picker>
               </el-form-item>
               <el-form-item label="截止日期">
-              <el-date-picker  value-format="yyyy-MM-dd" type="date" placeholder="请选择截止日期" v-model="parameter.endDate" :default-value="new Date()"></el-date-picker>
+              <el-date-picker  value-format="yyyy-MM-dd" type="date" placeholder="请选择截止日期" v-model="parameter.endDate"></el-date-picker>
               </el-form-item>
                <!--仓库名称-->
             <el-form-item label="仓库名称" span="1" prop="warehouseName" >
@@ -311,9 +311,9 @@
                 />
             </el-select>
           </el-form-item>
-          <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
+          <!-- <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
              <el-input placeholder="请输入增量比例" v-model="parameter.proportion" clearable class="proportion_css"></el-input>
-              </el-form-item>
+          </el-form-item> -->
             </el-form>
         </div>
       </div>
@@ -338,6 +338,7 @@ import {
   postExport,
   addselectinfoList,
   printAdd,
+  postExportOut
 } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -418,7 +419,7 @@ export default {
     //导出、打印
     outData(index){
       if(index == 1){
-        this.headerText = "导出入库记录"
+        this.headerText = "导出记录"
       }else if(index == 2){
         this.headerText = "打印记录"
       }
@@ -464,8 +465,10 @@ export default {
         this.$message.error("请选择所要打印的仓库")
         return
       }
-      if(this.headerText == "导出入库记录"){
-        const { 
+      if(this.headerText == "导出记录"){
+        debugger
+        if(this.parameter.radio == 3){
+          const { 
            data 
            } = await postExport({startDate:this.parameter.startDate,endDate:this.parameter.endDate,warehouseName:this.parameter.warehouseName}, {}, {
           responseType: 'blob'
@@ -474,9 +477,24 @@ export default {
           res: data,
           fileName: `${
           this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }导出记录`,
+        }导出入库记录`,
           type: 'xls',
         })
+        }else if(this.parameter.radio == 2){
+          const { 
+           data 
+           } = await postExportOut({startDate:this.parameter.startDate,endDate:this.parameter.endDate,warehouseName:this.parameter.warehouseName}, {}, {
+          responseType: 'blob'
+        }).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }导出出库记录`,
+          type: 'xls',
+        })
+        }
+        
       }else if(this.headerText == "打印记录"){
         addselectinfoList({
         compId: localStorage.getItem('ws-pf_compId'),