Selaa lähdekoodia

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

ccjgmwz 3 vuotta sitten
vanhempi
commit
623f6239f0

+ 6 - 2
src/views/home/index.vue

@@ -70,7 +70,7 @@
               </el-col>
               <el-col :span="12">
                 <h3>粮食总储量</h3>
-                <div ref="myEchart7" style="height: 208px;"></div>
+                <div ref="myEchart7" style="height: 208px;" @click="contract(3)"></div>
               </el-col>
             </el-row>
             <el-row>
@@ -105,7 +105,7 @@
                 <div class="bottom-tip">统计单位:吨</div>
               </div>
             </el-col>
-            <el-col :span="12" class="chart-card" @click="contract(1)">
+            <el-col :span="12" class="chart-card">
               <div style="font-weight: bold;">
                 <div ref="myEchart5" style="height: 288px;" class="roseChart" @click="contract(1)"></div>
                 <div class="bottom-tip">统计单位:元</div>
@@ -426,6 +426,10 @@
             this.$router.push({
               name:"salesContract"
             })
+          }else if(index == 3){
+            this.$router.push({
+              name:"warehouseManagementList"
+            })
           }
       },
       getTime() {

+ 3 - 1
src/views/houseSelfCollect/paymentManagement.vue

@@ -830,7 +830,9 @@ export default {
           index === 10 ||
           index === 11 ||
           index === 12 ||
-          index === 13
+          index === 13 ||
+          index === 15 ||
+          index === 16 
         ) {
           const values = data.map((item) => Number(item[column.property]))
           if (!values.every((value) => isNaN(value))) {

+ 20 - 10
src/views/warehouse/warehouseManagementList.vue

@@ -398,6 +398,7 @@ export default {
        radio:3,
        startDate:"",
        endDate:"",
+       proportion:''
      },
      date: {
 					year: dayjs().format('YYYY'),
@@ -431,7 +432,8 @@ export default {
         var year = date.getFullYear();
         var month = date.getMonth() + 1;
         var strDate = date.getDate()
-        this.parameter.startDate = ""+year+"-"+month+"-"+(strDate-1)
+        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.$forceUpdate();
         this.isShowPrintType = true
@@ -494,6 +496,7 @@ export default {
         }
         
       }else if(this.headerText == "打印记录"){
+        console.log(this.parameter.startDate)
         addselectinfoList({
         compId: localStorage.getItem('ws-pf_compId'),
         startDate:this.parameter.startDate,
@@ -516,16 +519,20 @@ export default {
             var increment = (countWeight * (Number(this.parameter.proportion)/100)).toFixed(2)//所要增加的量
             printAdd().toPromise()
              .then((response1) => {
+              //  setTimeout(function(){
                 for(let i = 0 ; i < response1.length ; i++){
                   increment = Number(increment)
                   if(increment > 0){
-                    let index = Math.round(Math.random()*response1.length - 1)
+                    
+                    let index = Math.abs(Math.round(Math.random()*response1.length - 1))
+                    console.log(Math.abs(Math.round(Math.random()* warehousePrint.length - 1)),response1[index])
                     let pro = response1[index]  //取出假数据并设定值
-                     pro.inOutDate = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].inOutDate
-                     pro.contractNo = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].contractNo
-                     pro.companyName = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].companyName
-                     pro.goodsName = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].goodsName 
-                     pro.boxNo = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].boxNo
+                     pro.inOutDate = warehousePrint[Math.abs(Math.round(Math.random()* warehousePrint.length - 1))].inOutDate
+                     pro.contractNo = warehousePrint[Math.abs(Math.round(Math.random()* warehousePrint.length - 1))].contractNo
+                     pro.companyName = warehousePrint[Math.abs(Math.round(Math.random()* warehousePrint.length - 1))].companyName
+                     
+                     pro.goodsName = warehousePrint[Math.abs(Math.round(Math.random()* warehousePrint.length - 1))].goodsName
+                     pro.boxNo = warehousePrint[Math.abs(Math.round(Math.random()* warehousePrint.length - 1))].boxNo
                     pro.netWeight = Number((Math.random()*(70-10+1)+10).toFixed(2))
                      pro.tare = Number((Math.random()*(20-10+1)+10).toFixed(2))
                     pro.grossWeight = Number((pro.tare + pro.netWeight).toFixed(2))
@@ -535,8 +542,10 @@ export default {
                         pro.netWeight += Number(increment)
                         pro.grossWeight = Number((pro.tare + pro.netWeight).toFixed(2))
                         increment = 0
+                        
                          warehousePrint.push(pro)
                           }else{
+                            increment -= pro.netWeight
                           warehousePrint.push(pro)
                           }
                       }else{
@@ -546,14 +555,15 @@ export default {
                           warehousePrint.push(pro)
                       }
                     response1.splice(index,1)//删除已添加过得假数据车牌号
-                  }else{
+                  }
                     sessionStorage.setItem("inOutWarehouse_Print",JSON.stringify(warehousePrint))
                     let i = ""
                     i = this.parameter.radio+"&warehouseName=" + this.parameter.warehouseName
                     window.open('../../../../../static/warehousePrint.html?type=' + i)
                     // return
-                  }
                 }
+              //  },2000)
+                
              }) 
              }else{
                 sessionStorage.setItem("inOutWarehouse_Print",JSON.stringify(response.records))
@@ -1110,4 +1120,4 @@ export default {
   border-radius: 4px;
   padding-bottom: 20px;
 }
-</style>
+</style>

+ 30 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -55,6 +55,25 @@
 				<el-date-picker  style="margin: 0 10px 0 0" class="dataClass" value-format='yyyy-MM-dd' v-model="value2" @change='datechange' type="daterange" align="right" range-separator="至"
 					start-placeholder="出入库日期起" end-placeholder="出入库日期止" >
 				</el-date-picker>
+		<ws-input
+          v-model="searchKeyWord"
+          placeholder="可按合同编号、车牌号查找"
+          clearable
+          maxlength="250"
+          type="input"
+		  class="input"
+        >
+        </ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button class="find" type="primary" @click="find()">
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; position: relative; top: 0px"
+            src="../../../public/img/sousuo.png"
+            alt
+          />
+        </ws-button>
 				<el-table show-summary :summary-method="getSummaries" ref="tableData" :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'">
 					<el-table-column type="expand">
 						<template #default="props">
@@ -469,7 +488,7 @@
 			this.value2= [formatDate, nowData]  // 默认赋值一年时间
    		 },
 			print(row){
-				sessionStorage.removeItem("record_print")
+				sessionStorage.removeItem('record_print')
 				getPrintInfo({
                         id: row.id
                       })
@@ -483,6 +502,7 @@
 				this.$router.push({
 					path: 'warehouseManagementList'
 				})
+				this.searchKeyWord = ''
 			},
 			//
 			iossrecord() {
@@ -521,6 +541,9 @@
 			datechange(){
 				this.getList()
 			},
+			find() {
+      			this.getList()
+    		},
 			handleClose() {
 				this.accessoryTFs = false
 			},
@@ -572,6 +595,7 @@
 							startDate:startDate,
        					    endDate:endDate,
 							searchType: this.searchType,
+							searchKeyWord: this.searchKeyWord,
 							currentPage: this.currentPage,
 							pcFlag: this.pcFlag,
 							pageSize: this.pageSize
@@ -601,6 +625,7 @@
 							startDate:startDate,
        					    endDate:endDate,
 							searchType: this.searchType,
+							searchKeyWord: this.searchKeyWord,
 							currentPage: this.currentPage,
 							pageSize: this.pageSize,
 						})
@@ -1037,6 +1062,10 @@
 	.dataClass {
        width: 20% !important;
 	}
+	.input {
+		width: 20% !important;
+	}
+
 
 	/deep/.ws-info-table .el-form-item .el-form-item__label {
 		background-color: #f6f7fc;