zhongtianhaoyuan 2 years ago
parent
commit
edf42abd33

+ 4 - 0
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -3355,7 +3355,11 @@ export default {
           this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
         ) {
           if(this.outContractNo[i].priceType == "定价收购"){
+            if( this.deptBudgetList.type == "潮粮"){
+           this.deptBudgetList.tidalGrainPrice = Number(this.outContractNo[i].unitContractPrice/1000).toFixed(2)
+            }else{
             this.deptBudgetList.dryGrainPrice = Number(this.outContractNo[i].unitContractPrice/1000).toFixed(2)
+            }
           }
           if(this.serviceManagementType==3){
             var arr=this.goodnameList.filter((item)=>{return item.goodsName==this.outContractNo[i].goodsName})

+ 45 - 23
src/views/warehousenew/warehouseManagementList.vue

@@ -221,11 +221,11 @@
               </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">
-              </el-date-picker>
+              <el-date-picker type="datetime" @change="startDataChange" placeholder="请选择起始日期" v-model="parameter.PrintStartDate"  default-time="12:00:00"></el-date-picker>
+              <!-- <el-date-picker v-model="value3" type="datetime" placeholder="选择日期时间" default-time="12:00:00"></el-date-picker> -->
             </el-form-item>
             <el-form-item label="截止日期">
-              <el-date-picker value-format="timestamp" type="date" placeholder="请选择截止日期" v-model="parameter.endDate">
+              <el-date-picker type="datetime" @change="endDataChange" placeholder="请选择截止日期" v-model="parameter.printEndDate"  default-time="12:00:00">
               </el-date-picker>
             </el-form-item>
               <!-- <el-form-item label="截止日期1">
@@ -380,6 +380,28 @@
       this.showType = this.isShow
     },
     methods: {
+      startDataChange(e){
+          var d = new Date(e);
+          let year =  d.getFullYear()
+          let month =  (d.getMonth() + 1)
+          month= month<10?'0'+month:month
+          let date = d.getDate()<10?'0'+d.getDate():d.getDate()
+          let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
+          let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
+          let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
+          this.parameter.printStartDate = year + "-" + month+ "-" +date + " "+hours+":"+minutes+":"+seconds;
+      },
+      endDataChange(e){
+            var d = new Date(e);
+            let year =  d.getFullYear()
+          let month =  (d.getMonth() + 1)
+          month= month<10?'0'+month:month
+          let date = d.getDate()<10?'0'+d.getDate():d.getDate()
+          let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
+          let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
+          let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
+           this.parameter.printEndDate = year + "-" + month+ "-" +date + " "+hours+":"+minutes+":"+seconds;
+      },
        //导出、打印
       outData(index) {
         if (index == 1) {
@@ -387,14 +409,14 @@
         } else if (index == 2) {
           this.headerText = '打印记录'
         }
-        let date = new Date()
-        var year = date.getFullYear();
-        var month = date.getMonth() + 1;
-        var strDate = date.getDate()
-        var pastdate = new Date(date.getTime() - 24 * 60 * 60 * 1000)
-        this.parameter.startDate = pastdate.getFullYear() + '-' + (pastdate.getMonth() + 1) + '-' + pastdate.getDate()
-        // this.parameter.endDate = '' + year + '-' + month + '-' + strDate
-        this.parameter.endDate = Date.now()
+        // let date = new Date()
+        // var year = date.getFullYear();
+        // var month = date.getMonth() + 1;
+        // var strDate = date.getDate()
+        // var pastdate = new Date(date.getTime() - 24 * 60 * 60 * 1000)
+        // this.parameter.startDate = pastdate.getFullYear() + '-' + (pastdate.getMonth() + 1) + '-' + pastdate.getDate()
+        // // this.parameter.endDate = '' + year + '-' + month + '-' + strDate
+        // this.parameter.endDate = Date.now()
         // this.parameter.endDate1 = Date.now()
         this.$forceUpdate();
         this.isShowPrintType = true
@@ -409,11 +431,11 @@
           this.$message.error('请选择打印的类型')
           return
         }
-        if (!this.parameter.startDate) {
+        if (!this.parameter.printStartDate) {
           this.$message.error('请选择打印的起始日期')
           return
         }
-        if (!this.parameter.endDate) {
+        if (!this.parameter.printEndDate) {
           this.$message.error('请选择打印的截止日期')
           return
         }
@@ -424,17 +446,17 @@
          if(this.parameter.warehouseName == '全部仓库'){
           this.parameter.warehouseName = ''
         }
-        let enddate = new Date(this.parameter.endDate).toLocaleString()//将截止时间的时间戳转为时间
-        this.parameter.endDate = enddate.split(' ')[0].replace('/' ,'-').replace('/','-')
+        // let enddate = new Date(this.parameter.endDate).toLocaleString()//将截止时间的时间戳转为时间
+        // this.parameter.endDate = enddate.split(' ')[0].replace('/' ,'-').replace('/','-')
         this.parameter.warehouseName = this.parameter.warehouseName.replace('(临)','')
-         this.isShowPrintType = false
+        this.isShowPrintType = false
         if (this.headerText == '导出记录') {
           if (this.parameter.radio == 3) {
             const {
               data
             } = await postExport({
-              startDate: this.parameter.startDate,
-              endDate: this.parameter.endDate,
+              startDate: this.parameter.printStartDate,
+              endDate: this.parameter.printEndDate,
               warehouseName: this.parameter.warehouseName
             }, {}, {
               responseType: 'blob'
@@ -467,8 +489,8 @@
         } else if (this.headerText == '打印记录') {
           addselectinfoList({
               compId: localStorage.getItem('ws-pf_compId'),
-              startDate: this.parameter.startDate,
-              endDate: this.parameter.endDate,
+              printStartDate: this.parameter.printStartDate,
+              printEndDate: this.parameter.printEndDate,
               warehouseName: this.parameter.warehouseName,
               searchType: this.parameter.radio,
               currentPage: 1,
@@ -520,7 +542,7 @@
                             sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(warehousePrint))
                             let _canshu = ''
                             _canshu = this.parameter.radio + '&warehouseName=' + this.parameter.warehouseName +
-                              '&startDate=' + this.parameter.startDate + '&endDate=' + this.parameter.startDate
+                              '&startDate=' + this.parameter.printStartDate + '&endDate=' + this.parameter.printEndDate
                             window.open('../../../../../static/warehousePrint.html?type=' + _canshu)
                           }
                         } else { //增量为0时
@@ -531,14 +553,14 @@
                       sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(warehousePrint))
                       let _canshu = ''
                       _canshu = this.parameter.radio + '&warehouseName=' + this.parameter.warehouseName +
-                        '&startDate=' + this.parameter.startDate + '&endDate=' + this.parameter.startDate
+                        '&startDate=' + this.parameter.printStartDate + '&endDate=' + this.parameter.printEndDate
                       window.open('../../../../../static/warehousePrint.html?type=' + _canshu)
                     })
                 } else { //没有增量比例的直接打印
                   sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(response.records))
                   let _canshu1 = ''
                   _canshu1 = this.parameter.radio + '&warehouseName=' + this.parameter.warehouseName +
-                    '&startDate=' + this.parameter.startDate + '&endDate=' + this.parameter.startDate
+                    '&startDate=' + this.parameter.printStartDate + '&endDate=' + this.parameter.printEndDate
                   window.open('../../../../../static/warehousePrint.html?type=' + _canshu1)
                 }
               }