Bläddra i källkod

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

# Conflicts:
#	src/views/houseSelfCollect/newWeighingManagement.vue
ccjgmwz 3 år sedan
förälder
incheckning
ed5a572a01

+ 41 - 15
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -740,6 +740,7 @@
             this.setCurrent(this.mList[0])
 
             this.weighingList = this.mList[0]
+            console.log(this.weighingList)
             this.carWeightInfo = {
               carNumber: this.mList[0].carNumber,
               type: this.information,
@@ -756,7 +757,6 @@
             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,
@@ -1400,21 +1400,47 @@
                       id: this.weighingList.warehouseInOutId
                     }).toPromise().then((response) => {
                       that.inOutDate = response
-                      warehousing.statusFlag = 3
-                      warehousing.grossWeight /= 1000
-                      warehousing.tare /= 1000
-                      warehousing.netWeight /= 1000
-                      warehousing.pureWeight = 1000
-                      warehousing.deductionAmount = Number(warehousing.deductionAmount) * 1000
-                      warehousing.deductionWeight /= 1000
-                      warehousing.inOutFlag = 2
-                      console.log(that.weighingList)
-                      warehousing.inOutTypeKey = that.weighingList.inOutTypeKey
-                      warehousing.inOutType = that.weighingList.inOutType
-                      warehousing.deductionAmount = that.weighingList.deductionAmount
-                      warehousing.id = warehousing.warehouseInOutId
+                      that.$set(that.inOutDate,'statusFlag',3)
+                      that.$set(that.inOutDate,'grossWeight',warehousing.grossWeight /1000)
+                      that.$set(that.inOutDate,'tare',warehousing.grossWeight /1000)
+                      that.$set(that.inOutDate,'netWeight',warehousing.netWeight /1000)
+
+                      // that.$set(that.inOutDate,'pureWeight',warehousing.pureWeight /1000)
+                      that.$set(that.inOutDate,'deductionAmount',Number(warehousing.deductionAmount) * 1000)
+                      that.$set(that.inOutDate,'deductionWeight',warehousing.deductionWeight /1000)
+                      that.$set(that.inOutDate,'inOutFlag',2)
+                      // that.inOutDate = response
+                      // that.$set(that.inOutDate)
+                      // .statusFlag = 3
+                      // that.inOutDate.grossWeight=warehousing.grossWeight /1000
+                      // that.inOutDate.tare=warehousing.tare /1000
+                      // that.inOutDate.netWeight=warehousing.netWeight /1000
+                      // that.inOutDate.pureWeight=warehousing.pureWeight /1000
+                      // that.inOutDate.deductionAmount= Number(warehousing.deductionAmount) * 1000
+                      // that.inOutDate.deductionWeight=warehousing.deductionWeight /1000
+                      // that.inOutDate.inOutFlag = 2
+                      console.log(that.inOutDate)
+                      // warehousing.inOutTypeKey = that.weighingList.inOutTypeKey
+                      // warehousing.inOutType = that.weighingList.inOutType
+                      // warehousing.deductionAmount = that.weighingList.deductionAmount
+                      // warehousing.positionId = that.weighingList.positionId
+                      // warehousing.id = warehousing.warehouseInOutId
+                      // warehousing.statusFlag = 3
+                      // warehousing.grossWeight /= 1000
+                      // warehousing.tare /= 1000
+                      // warehousing.netWeight /= 1000
+                      // warehousing.pureWeight = 1000
+                      // warehousing.deductionAmount = Number(warehousing.deductionAmount) * 1000
+                      // warehousing.deductionWeight /= 1000
+                      // warehousing.inOutFlag = 2
+                      // console.log(that.inOutDate)
+                      // warehousing.inOutTypeKey = that.weighingList.inOutTypeKey
+                      // warehousing.inOutType = that.weighingList.inOutType
+                      // warehousing.deductionAmount = that.weighingList.deductionAmount
+                      // // warehousing.positionId = that.weighingList.positionId
+                      // warehousing.id = warehousing.warehouseInOutId
                       // delete that.inOutDate.status
-                      that.inOutDate = Object.assign(that.inOutDate, warehousing)
+                      // that.inOutDate = Object.assign(that.inOutDate, warehousing)
                       addstorageputList(that.inOutDate).toPromise().then((response) => {})
                     })
                   }

+ 0 - 1
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -369,7 +369,6 @@
       },
       print(row, type, pageType) {
         //打印
-        debugger
         if (type == 1) { //
           if (this.modification.length == 0) {
             this.$message.error('请选择批量打印的条目!')

+ 169 - 110
src/views/outboundManagement/weighingManagementNew.vue

@@ -25,19 +25,13 @@
       </template>
     </BaseHeaderLayout>
 
-    <el-row :gutter="20">
-      <el-col :span="8">
-        <div style="background: #f6f7fc; padding: 10px" class="grid-content bg-purple">
+    <el-row :gutter="20" class="size_css">
+      <el-col :span="8" class="call-show">
+        <div style="background: #f6f7fc; padding: 10px" class="grid-content bg-purple " >
+          <BalanceAlert v-if="isShowBalance" ref="weightChild" :deptBudgetList="deptBudgetList"
+            :information="information" v-on:balanceListen="setVal" class="zujian">
+          </BalanceAlert>
           <div class="top">
-            <div>{{ tpyeNo == 1 ? '皮重' : '毛重' }}</div>
-            <div class="confirmInfo">
-              <div class="car-type">车牌号</div>
-              <div class="car-no">{{ weighingList.carNumber }}</div>
-            </div>
-            <div class="confirmInfo">
-              <div class="car-type">浮动重量</div>
-              <div class="car-no">{{ weighingList.weight }}kg</div>
-            </div>
             <div class="confirmWeight">
               <div class="titleWeight">确认重量</div>
               <div v-if="index == 0" class="weight">
@@ -47,7 +41,11 @@
                 {{ weighingList.grossWeight }} <span class="kg-style">kg</span>
               </div>
             </div>
-            <el-button @click="weightweight" type="success" plain>确定</el-button>
+            <div class="confirmInfo">
+              <div class="car-type">车牌号</div>
+              <div class="car-no">{{ weighingList.carNumber }}</div>
+            </div>
+            <!-- <el-button @click="weightweight" type="success" plain>确定</el-button> -->
           </div>
           <div class="bg-left titleup">
             <span class="word_css">实时监控</span>
@@ -260,7 +258,8 @@
         </div>
       </el-col>
       <el-col :span="8">
-        <div style="justify-content: space-between" class="flex">
+        <div class="list-info">
+          <div style="justify-content: space-between" class="flex">
           <div>
             <el-button v-if="tpyeNo == 1" @click="add" type="primary">新增</el-button>
             <el-button v-if="tpyeNo == 1" @click="deletelist" type="danger">删除</el-button>
@@ -283,6 +282,8 @@
         <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>
+        </div>
+        
       </el-col>
     </el-row>
     <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @opened="opendBtn"
@@ -320,6 +321,7 @@
   import inspectInfoPrint from './component/inspectInfoPrint.vue'
   import html2canvas from 'html2canvas'
   import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
   import {
     EventBus
   } from 'base-core-lib'
@@ -328,9 +330,11 @@
       WsUpload,
       inspectInfoPrint,
       weightCheckPrint,
+      BalanceAlert
     },
     data() {
       return {
+        isShowBalance: false,
         isShowPrint: false,
         warehouseName: '',
         warehouseList: [],
@@ -367,7 +371,7 @@
         carstatus: false,
         carjudge: false,
         warehouseCount: 0,
-		warehouseCount1:0,
+        warehouseCount1: 0,
         warehouseNo: '',
         statusType: '3',
         warehouseType: 1,
@@ -399,6 +403,7 @@
           type: '',
           weight: '',
         },
+        deptBudgetList:{},
         multiSelector: [{
             name: '汽运',
             value: '0',
@@ -421,6 +426,7 @@
     mounted() {
       this.selectWarehouse()
       this.showType = this.isShow
+      this.isShowBalance = true
       this.openPort()
       this.getNowTime()
       if (localStorage.getItem('houseSelfCollect_house1').allowEdit == 1) {
@@ -460,12 +466,12 @@
       printSmall() {
         // localStorage.setItem('inspect', JSON.stringify(this.inspect))
         // window.open('../../../static/weightChecknew.html?type=1')
-         localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
-         window.open('../../../../static/outWeightPrint.html?type=1&other="true"')
+        localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
+        window.open('../../../../static/outWeightPrint.html?type=1&other="true"')
       },
       printBig() {
-         localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
-         window.open('../../../../static/outWeightPrint.html?type=2&other="true"')
+        localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
+        window.open('../../../../static/outWeightPrint.html?type=2&other="true"')
         // window.open('../../../static/weightChecknew.html?type=2&dataList=' + JSON.stringify(this.inspect))
       },
       opendBtn() {
@@ -493,30 +499,30 @@
                 .toPromise()
                 .then((response) => {
                   this.types = ''
-				  this.weighingList = {
-                            grossWeight: 0,
-                            tare: 0,
-                            tips: '',
-                            // contractNo:'',
-                            // inOutTaskNo:'',
-                            buckleMiscellaneous: 0,
-                            netWeight: 0,
-                            receivableWeighingFee: '',
-                            warehouseInOutDetail: {
-                              grade: '',
-                              imperfectGrain: '',
-                              impurity: '',
-                              jiaorenli: '',
-                              bulkDensity: '',
-                              mildewGrain: '',
-                            },
-                            qualityInspectionManagement: {
-                              boxNo: '暂无',
-                              boxNoOther: '暂无',
-                              titleNo: '暂无',
-                              titleNoOther: '暂无',
-                            },
-                          }
+                  this.weighingList = {
+                    grossWeight: 0,
+                    tare: 0,
+                    tips: '',
+                    // contractNo:'',
+                    // inOutTaskNo:'',
+                    buckleMiscellaneous: 0,
+                    netWeight: 0,
+                    receivableWeighingFee: '',
+                    warehouseInOutDetail: {
+                      grade: '',
+                      imperfectGrain: '',
+                      impurity: '',
+                      jiaorenli: '',
+                      bulkDensity: '',
+                      mildewGrain: '',
+                    },
+                    qualityInspectionManagement: {
+                      boxNo: '暂无',
+                      boxNoOther: '暂无',
+                      titleNo: '暂无',
+                      titleNoOther: '暂无',
+                    },
+                  }
                   // this.inspect = []
                 })
             })
@@ -550,30 +556,30 @@
                   this.types = ''
                   // this.inspect = []
                   this.isShowPrint = false
-				  this.weighingList = {
-                            grossWeight: 0,
-                            tare: 0,
-                            tips: '',
-                            // contractNo:'',
-                            // inOutTaskNo:'',
-                            buckleMiscellaneous: 0,
-                            netWeight: 0,
-                            receivableWeighingFee: '',
-                            warehouseInOutDetail: {
-                              grade: '',
-                              imperfectGrain: '',
-                              impurity: '',
-                              jiaorenli: '',
-                              bulkDensity: '',
-                              mildewGrain: '',
-                            },
-                            qualityInspectionManagement: {
-                              boxNo: '暂无',
-                              boxNoOther: '暂无',
-                              titleNo: '暂无',
-                              titleNoOther: '暂无',
-                            },
-                          }
+                  this.weighingList = {
+                    grossWeight: 0,
+                    tare: 0,
+                    tips: '',
+                    // contractNo:'',
+                    // inOutTaskNo:'',
+                    buckleMiscellaneous: 0,
+                    netWeight: 0,
+                    receivableWeighingFee: '',
+                    warehouseInOutDetail: {
+                      grade: '',
+                      imperfectGrain: '',
+                      impurity: '',
+                      jiaorenli: '',
+                      bulkDensity: '',
+                      mildewGrain: '',
+                    },
+                    qualityInspectionManagement: {
+                      boxNo: '暂无',
+                      boxNoOther: '暂无',
+                      titleNo: '暂无',
+                      titleNoOther: '暂无',
+                    },
+                  }
                 })
             })
             this.dialogTableVisible = true
@@ -597,6 +603,13 @@
         console.log(`当前页: ${val}`)
         this.getList()
       },
+      setVal(data) {
+        if (this.information == '毛重') {
+          this.weighingList.grossWeight = data
+        } else {
+          this.weighingList.tare = data
+        }
+      },
       listclick(row) {
         this.id = row.id
         getweighing({
@@ -831,20 +844,20 @@
           .then(() => {
             this.weighingList.inOutFlag = 1
             this.weighingList.statusFlag = 3
-			if(this.weighingList.grossWeight){
-				this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
-			}
-            
-			if(this.weighingList.netWeight){
-				this.weighingList.netWeight = this.weighingList.netWeight / 1000
-			}
+            if (this.weighingList.grossWeight) {
+              this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
+            }
+
+            if (this.weighingList.netWeight) {
+              this.weighingList.netWeight = this.weighingList.netWeight / 1000
+            }
             this.weighingList.tare = this.weighingList.tare / 1000
-			if(this.weighingList.buckleMiscellaneous){
-				this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
-			}
+            if (this.weighingList.buckleMiscellaneous) {
+              this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
+            }
             if (this.tpyeNo == 1) {
-			//  this.weighingList.serviceManagementType=2
-			 this.weighingList.statusFlag = 1
+              //  this.weighingList.serviceManagementType=2
+              this.weighingList.statusFlag = 1
               this.weighingList.relationId = this.relationId
               this.weighingList.warehouseId = this.warehouseId
               this.weighingList.baseId = this.warehouseId
@@ -854,7 +867,7 @@
                 addstorageputList(this.weighingList)
                   .toPromise()
                   .then((response) => {
-					this.weighingList.tare = this.weighingList.tare * 1000
+                    this.weighingList.tare = this.weighingList.tare * 1000
                     this.weighingList.warehouseInOutId = response
                     tareEdit(this.weighingList)
                       .toPromise()
@@ -864,7 +877,7 @@
                         })
                         toPromise().then((response) => {
                           if (this.reader) {
-                            this.reader.cancel()
+    	                   this.reader.cancel()
                           }
                           this.$notify({
                             title: '成功',
@@ -873,8 +886,8 @@
                           })
                           this.getList()
                           this.weighingList = response
-                          this.warehouseCount = Number(this.warehouseCount)+ 1
-						  this.warehouseCount1 = Number(this.warehouseCount1)+ 1
+                          this.warehouseCount = Number(this.warehouseCount) + 1
+                          this.warehouseCount1 = Number(this.warehouseCount1) + 1
                           this.inspect = JSON.parse(
                             JSON.stringify(this.weighingLis)
                           )
@@ -917,7 +930,7 @@
                 addstorageputList(this.weighingList)
                   .toPromise()
                   .then((response) => {
-					this.weighingList.tare = this.weighingList.tare * 1000
+                    this.weighingList.tare = this.weighingList.tare * 1000
                     this.weighingList.warehouseInOutId = response
                     tareAdd(this.weighingList)
                       .toPromise()
@@ -928,8 +941,8 @@
                           .toPromise()
                           .then((response) => {
                             this.weighingList = response
-                        	this.warehouseCount = Number(this.warehouseCount)+ 1
-							this.warehouseCount1 = Number(this.warehouseCount1)+ 1
+                            this.warehouseCount = Number(this.warehouseCount) + 1
+                            this.warehouseCount1 = Number(this.warehouseCount1) + 1
                             this.inspect = JSON.parse(
                               JSON.stringify(this.weighingList)
                             )
@@ -1018,17 +1031,28 @@
               addstorageputList(this.weighingList)
                 .toPromise()
                 .then((response) => {
-					this.weighingList.grossWeight =
-                        this.weighingList.grossWeight * 1000
-                      this.weighingList.tare = this.weighingList.tare * 1000
-                      this.weighingList.netWeight =
-                        this.weighingList.netWeight * 1000
-                      this.weighingList.buckleMiscellaneous =
-                        this.weighingList.buckleMiscellaneous * 1000
+                  this.weighingList.grossWeight =
+                    this.weighingList.grossWeight * 1000
+                  this.weighingList.tare = this.weighingList.tare * 1000
+                  this.weighingList.netWeight =
+                    this.weighingList.netWeight * 1000
+                  this.weighingList.buckleMiscellaneous =
+                    this.weighingList.buckleMiscellaneous * 1000
                   this.weighingList.warehouseInOutId = response
                   grossWeight(this.weighingList)
                     .toPromise()
                     .then((response) => {
+						 getweighing({
+                            id: response
+                          })
+                          .toPromise()
+                          .then((response) => {
+                            this.weighingList = response
+                            this.inspect = JSON.parse(
+                              JSON.stringify(this.weighingList)
+                            )
+                            this.isShowPrint = true
+                          })
                       if (this.reader) {
                         this.reader.cancel()
                       }
@@ -1041,10 +1065,10 @@
                         message: '提交成功',
                         type: 'success',
                       })
-                      
-                        // debugger
+
+                      // debugger
                       this.inspect = JSON.parse(JSON.stringify(this.weighingList))
-                      
+
                       this.isShowPrint = true
                       this.weighingList = {
                         grossWeight: 0,
@@ -1092,7 +1116,28 @@
         }
       },
       tabClick(val) {
-        this.weighingList = []
+        this.weighingList = {
+            grossWeight: 0,
+            tare: 0,
+            tips: '',
+            buckleMiscellaneous: 0,
+            netWeight: 0,
+            receivableWeighingFee: '',
+            warehouseInOutDetail: {
+				grade: '',
+				imperfectGrain: '',
+				impurity: '',
+				jiaorenli: '',
+				bulkDensity: '',
+				mildewGrain: '',
+            },
+			qualityInspectionManagement: {
+                boxNo: '暂无',
+                boxNoOther: '暂无',
+                titleNo: '暂无',
+                titleNoOther: '暂无',
+			},
+        }
         this.index = val
         // this.disabled=true
         if (val == 0) {
@@ -1340,7 +1385,7 @@
         return date.getFullYear() + mouth + date.getDate()
       },
       contractNoChange(e) {
-		this.warehouseCount=this.warehouseCount1
+        this.warehouseCount = this.warehouseCount1
         for (let i = 0; i < this.taskNolist.length; i++) {
           if (this.taskNolist[i].inOutTaskNo == e) {
             var data = this.taskNolist[i]
@@ -1365,7 +1410,7 @@
             this.weighingList.grade = this.outContractNo[i].grade
             this.weighingList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '销售出库') {
-              this.warehouseCount = '000' +(Number(this.warehouseCount) + 1) 
+              this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
               this.weighingList.number =
                 'XSCK' +
                 this.getTime() +
@@ -1385,7 +1430,7 @@
               }
               this.weighingList.inOutTypeKey = 1
             } else if (this.outContractNo[i].inOutType == '移库出库') {
-              this.warehouseCount = '000' +(Number(this.warehouseCount) + 1) 
+              this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
               this.weighingList.number =
                 'YKCK' +
                 this.getTime() +
@@ -1451,7 +1496,7 @@
                 this.warehouseId = response[i].id
                 this.positionInfos = response[i].positionInfos
                 this.warehouseCount = response[i].outCount
-				this.warehouseCount1 = response[i].outCount
+                this.warehouseCount1 = response[i].outCount
                 this.warehouseNo = response[i].commonWarehouseNo
                 this.warehouseType = response[i].warehouseType
                 if (response[i].allowEdit == 1) {
@@ -1465,10 +1510,10 @@
                 this.warehouseId = this.warehouseList[0].warehouseId
                 this.positionInfos = response[0].positionInfos
                 this.warehouseCount = response[0].outCount
-				this.warehouseCount1 = response[i].outCount
+                this.warehouseCount1 = response[i].outCount
                 this.warehouseNo = response[0].commonWarehouseNo
                 this.warehouseType = response[0].warehouseType
-				if (response[0].allowEdit == 1) {
+                if (response[0].allowEdit == 1) {
                   this.disabled = false
                 } else {
                   this.disabled = true
@@ -1547,6 +1592,11 @@
   .center {
     background: #fff;
   }
+  .size_css{
+    width: 100%;
+    min-width: 1930px;
+    overflow-x: scroll;
+  }
 
   .ws-info-table {
     border: none;
@@ -1699,15 +1749,23 @@
     color: #2aff7c;
     width: 50%;
   }
-
+  .call-show{
+    width: 540px;
+  }
+  // .list-info{
+  //   min-width: 561px;
+  // }
   .top {
     background: black;
     color: #2aff7c;
     font-size: 32px;
     text-align: right;
-    padding: 20px;
-    // border-radius: 10px;
+    padding: 0 10px 0 20px;
+    border-radius: 10px;
     margin: 0 20px 20px 20px;
+      position: absolute;
+        top: 140px;
+        width:445px;
 
     .zujian {
       position: relative;
@@ -1720,12 +1778,12 @@
 
     .confirmInfo {
       display: flex;
-      line-height: 90px;
+      // line-height: 90px;
 
       .car-type {
         text-align: left;
         width: 50%;
-		min-width:200px;
+        min-width: 200px;
       }
 
       .car-no {
@@ -1740,7 +1798,7 @@
 
       .titleWeight {
         width: 35%;
-		min-width:200px;
+        min-width: 200px;
         text-align: left;
         line-height: 90px;
         color: red;
@@ -1775,7 +1833,8 @@
       text-align: center;
     }
   }
-  /deep/.title_css .el-dialog__header{
+
+  /deep/.title_css .el-dialog__header {
     text-align: center !important;
   }
 </style>