Parcourir la source

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

ccjgmwz il y a 3 ans
Parent
commit
b5d9312f8c

+ 18 - 5
public/static/print.html

@@ -22,6 +22,9 @@
       border-right: 1px solid #EBEEF5; */
       border-right: 1px solid #EBEEF5; */
       /* padding: 20px; */
       /* padding: 20px; */
       box-sizing: border-box;
       box-sizing: border-box;
+      display: flex;
+      justify-content: center;
+      align-items: center;
     }
     }
 
 
     .name {
     .name {
@@ -32,14 +35,14 @@
     }
     }
 
 
     .price {
     .price {
-      position: absolute;
+      /* position: absolute;
       right: 10px;
       right: 10px;
       bottom: 0;
       bottom: 0;
       margin: auto;
       margin: auto;
       font-size: 14px;
       font-size: 14px;
       top: 0;
       top: 0;
       display: flex;
       display: flex;
-    align-items: center;
+    align-items: center; */
     }
     }
     .tableBox {
     .tableBox {
       width: 80px;
       width: 80px;
@@ -66,6 +69,7 @@
     .tableBox .cell {
     .tableBox .cell {
       text-align: center;
       text-align: center;
       padding: 0!important;
       padding: 0!important;
+      line-height: 22px;
       /* margin:0 2px!important; */
       /* margin:0 2px!important; */
     }
     }
     .table-row{
     .table-row{
@@ -96,24 +100,33 @@
     height: 0px;
     height: 0px;
 }
 }
 .content0{
 .content0{
-  margin-bottom: 30vh;
+  /* margin-bottom: 30vh; */
   /* padding-top: 5vh; */
   /* padding-top: 5vh; */
+  /* background-color: powderblue; */
 }
 }
 .content1{
 .content1{
-  margin-bottom: 30vh;
+  /* margin-bottom: 20vh; */
   /* padding-top: 5vh; */
   /* padding-top: 5vh; */
-
+  margin-top: 15vh;
+/* background: palegreen; */
 }
 }
 .content2{
 .content2{
   /* padding-top: 5vh; */
   /* padding-top: 5vh; */
   /* margin-bottom: 30vh; */
   /* margin-bottom: 30vh; */
+  margin-top: 15vh;
+  /* background: yellow; */
 }
 }
 .content3{
 .content3{
   /* padding-top: 10px; */
   /* padding-top: 10px; */
+  margin-top: 15vh;
+  /* background-color: red; */
 }
 }
 .has-gutter th:nth-of-type(1){
 .has-gutter th:nth-of-type(1){
   width: 40%;
   width: 40%;
 }
 }
+.has-gutter th:nth-of-type(2){
+  width: 60%;
+}
 .tableBox7 tr{
 .tableBox7 tr{
 border-right: 1px solid #ccc!important;
 border-right: 1px solid #ccc!important;
 }
 }

+ 2 - 2
src/components/mapdrag/mapdrag.vue

@@ -236,7 +236,7 @@ export default {
           var geocoder = new AMap.Geocoder({
           var geocoder = new AMap.Geocoder({
             radius: 1000,
             radius: 1000,
           })
           })
-          that.map.on('moveend', function(e){debugger
+          that.map.on('moveend', function(e){
              that.center = that.map.getCenter(); //获取当前地图中心位置
              that.center = that.map.getCenter(); //获取当前地图中心位置
              that.center.lat =Number(that.center.lat.toFixed(3))
              that.center.lat =Number(that.center.lat.toFixed(3))
              that.center.lng =Number(that.center.lng.toFixed(3))
              that.center.lng =Number(that.center.lng.toFixed(3))
@@ -342,7 +342,7 @@ export default {
     this.loadmap()
     this.loadmap()
   },
   },
   methods: {
   methods: {
-    positions() {debugger
+    positions() {
       this.status = false
       this.status = false
       var status = {
       var status = {
         zoomEnable: false,
         zoomEnable: false,

+ 110 - 85
src/views/houseSelfCollect/weightCheck.vue

@@ -21,26 +21,22 @@
         <h2 class="bg-left titleup">实时监控</h2>
         <h2 class="bg-left titleup">实时监控</h2>
         <div class="bottom">
         <div class="bottom">
           <div v-if="!monitorUrl1" class="video1">
           <div v-if="!monitorUrl1" class="video1">
-            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" >
-            <div >监控视频未连接</div>
-              
+            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1">
+            <div>监控视频未连接</div>
+
           </div>
           </div>
           <div v-else class="video1">
           <div v-else class="video1">
-           <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen ="true"
-           webkitallowfullscreen="true"
-           mozallowfullscreen="true"
-           allow="autoplay; fullscreen; microphone;"></iframe>
+            <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+              mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
           </div>
           </div>
           <div v-if="!monitorUrl2" class="video1">
           <div v-if="!monitorUrl2" class="video1">
-            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" >
-            <div >监控视频未连接</div>
-              
+            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1">
+            <div>监控视频未连接</div>
+
           </div>
           </div>
           <div v-else class="video2">
           <div v-else class="video2">
-           <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true"
-           webkitallowfullscreen="true"
-           mozallowfullscreen="true"
-            allow="autoplay; fullscreen; microphone;"></iframe>
+            <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+              mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -74,26 +70,28 @@
                 <ws-input v-model="weighingList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
                 <ws-input v-model="weighingList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
               </ws-form-item>
               </ws-form-item>
               <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
               <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
-                <ws-input type="number" @mousewheel.native.prevent v-if="this.index == 0" v-model="weighingList.grossWeight" @input="calculation"
-                  placeholder="未获取到毛重" maxlength="100" size="small" :disabled="disabled" />
-                <ws-input type="number" @mousewheel.native.prevent v-else v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重"
-                  maxlength="100" size="small" disabled />
+                <ws-input type="number" @mousewheel.native.prevent v-if="this.index == 0"
+                  v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重" maxlength="100"
+                  size="small" :disabled="disabled" />
+                <ws-input type="number" @mousewheel.native.prevent v-else v-model="weighingList.grossWeight"
+                  @input="calculation" placeholder="未获取到毛重" maxlength="100" size="small" disabled />
               </ws-form-item>
               </ws-form-item>
               <el-button type="primary" :class="index ==0 ? '' : 'butCss'" @click="openPort">重新获取</el-button>
               <el-button type="primary" :class="index ==0 ? '' : 'butCss'" @click="openPort">重新获取</el-button>
               <ws-form-item label="皮重(公斤)" span="1" prop="tare" v-if="information == '皮重'">
               <ws-form-item label="皮重(公斤)" span="1" prop="tare" v-if="information == '皮重'">
-                <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation" placeholder="未获取到皮重" maxlength="100"
-                  size="small" :disabled="disabled" />
+                <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation"
+                  placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
               </ws-form-item>
               </ws-form-item>
               <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
               <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
               <div class="formItem">
               <div class="formItem">
-                <ws-form-item label="扣重(公斤)" span="1" prop="buckleWeightRatio" v-if="information == '皮重' && paramType == '2'">
-                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous" @input="calculation" placeholder="请输入扣重"
-                    maxlength="100" size="small" />
+                <ws-form-item label="扣重(公斤)" span="1" prop="buckleWeightRatio"
+                  v-if="information == '皮重' && paramType == '2'">
+                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
+                    @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
                 </ws-form-item>
                 </ws-form-item>
 
 
                 <ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="information == '皮重'">
                 <ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="information == '皮重'">
-                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight" placeholder="请输入净重" maxlength="100" size="small"
-                    disabled />
+                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
+                    placeholder="请输入净重" maxlength="100" size="small" disabled />
                 </ws-form-item>
                 </ws-form-item>
               </div>
               </div>
             </ws-info-table>
             </ws-info-table>
@@ -142,7 +140,8 @@
       </div>
       </div>
 
 
     </div>
     </div>
-    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @close="closeDialog" :close-on-click-modal="false">
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @close="closeDialog"
+      :close-on-click-modal="false">
       <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
       <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
       <div style="text-align:center">
       <div style="text-align:center">
         <el-button type="primary" @click="closePrint">关闭</el-button>
         <el-button type="primary" @click="closePrint">关闭</el-button>
@@ -168,15 +167,15 @@
     components: {
     components: {
       weightCheckPrint,
       weightCheckPrint,
     },
     },
-    watch:{
-      weighingList:{//深度监听,可监听到对象、数组的变化
-         handler(val, oldVal){
-           if(val.tare){
-             this.weighingList.netWeight = this.weighingList.grossWeight - val.tare
-           }
-         },
-         deep:true //true 深度监听
-     }
+    watch: {
+      weighingList: { //深度监听,可监听到对象、数组的变化
+        handler(val, oldVal) {
+          if (val.tare) {
+            this.weighingList.netWeight = this.weighingList.grossWeight - val.tare
+          }
+        },
+        deep: true //true 深度监听
+      }
     },
     },
     data() {
     data() {
       return {
       return {
@@ -215,9 +214,9 @@
         param: 9600,
         param: 9600,
         monitorUrl1: '',
         monitorUrl1: '',
         monitorUrl2: '',
         monitorUrl2: '',
-        cangid:'',
-        paramType:'1',
-        warehouseName:''
+        cangid: '',
+        paramType: '1',
+        warehouseName: ''
       }
       }
     },
     },
     activated() {
     activated() {
@@ -240,8 +239,7 @@
       this.warehouseId = this.$route.query.warehouseId
       this.warehouseId = this.$route.query.warehouseId
       if (!this.$route.query.grossWeight) {
       if (!this.$route.query.grossWeight) {
         this.$route.query.grossWeight = 0
         this.$route.query.grossWeight = 0
-      }
-      else{
+      } else {
         this.weighingList.grossWeight = this.$route.query.grossWeight
         this.weighingList.grossWeight = this.$route.query.grossWeight
       }
       }
       // this.purchasePriceList = this.$route.query.purchasePriceList
       // this.purchasePriceList = this.$route.query.purchasePriceList
@@ -291,7 +289,8 @@
           .then((response) => {
           .then((response) => {
             for (let i = 0; i < response.records.length; i++) {
             for (let i = 0; i < response.records.length; i++) {
               if (response.records[i].paymentManagement) {
               if (response.records[i].paymentManagement) {
-                if (response.records[i].paymentManagement.status == '待结算' && !response.records[i].paymentManagement.approveStatus) {
+                if (response.records[i].paymentManagement.status == '待结算' && !response.records[i].paymentManagement
+                  .approveStatus) {
                   response.records[i].allow = 1
                   response.records[i].allow = 1
                 } else {
                 } else {
                   response.records[i].allow = 2
                   response.records[i].allow = 2
@@ -315,13 +314,13 @@
         console.log(this.common.commonWeighingList, 'commonWeighingList')
         console.log(this.common.commonWeighingList, 'commonWeighingList')
         let _list = this.common.commonWeighingList
         let _list = this.common.commonWeighingList
         for (let i = 0; i < _list.length; i++) {
         for (let i = 0; i < _list.length; i++) {
-          if(_list[i].allow == 2){
+          if (_list[i].allow == 2) {
             continue
             continue
           }
           }
           if (_list[i].status == '已质检' || _list[i].status == '已称毛重') {
           if (_list[i].status == '已质检' || _list[i].status == '已称毛重') {
             this.mList.push(_list[i])
             this.mList.push(_list[i])
           }
           }
-          
+
           if ((_list[i].status == '已称皮重' || _list[i].status == '已称毛重')) {
           if ((_list[i].status == '已称皮重' || _list[i].status == '已称毛重')) {
             this.pList.push(_list[i])
             this.pList.push(_list[i])
           }
           }
@@ -330,42 +329,66 @@
           this.index = 0
           this.index = 0
           this.carList = this.mList
           this.carList = this.mList
           if (this.mList.length != 0) {
           if (this.mList.length != 0) {
-      let _item = this.mList.filter(function(val){
-        console.log(that.$route.query.id)
-                if(val.id==that.$route.query.id){
-                  return val
-                }
+            let _item = this.mList.filter(function(val) {
+              console.log(that.$route.query.id)
+              if (val.id == that.$route.query.id) {
+                return val
+              }
             })
             })
+            if (_item.length != 0) {
+              this.setCurrent(_item[0])
+
+              this.weighingList = _item[0]
+              this.carWeightInfo = {
+                carNumber: _item[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.grossWeight
+              }
 
 
-            this.setCurrent(_item[0])
+              this.weighingList = _item[0]
+            } else {
+              this.setCurrent(this.mList[0])
 
 
-            this.carWeightInfo = {
-              carNumber: _item[0].carNumber,
-              type: this.information,
-              weight: this.weighingList.grossWeight
+              this.weighingList = this.mList[0]
+              this.carWeightInfo = {
+                carNumber: this.mList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.grossWeight
+              }
             }
             }
-            this.deptBudgetTotal =  this.mList.length
+            this.deptBudgetTotal = this.mList.length
           }
           }
-          this.weighingList = _item[0]
+
         } else {
         } else {
           this.index = 1
           this.index = 1
           this.carList = this.pList
           this.carList = this.pList
           if (this.pList.length != 0) {
           if (this.pList.length != 0) {
-            let _item = this.pList.filter(function(val1){
-                if(val1.id==that.$route.query.id){
-                  return val1
-                }
+            let _item = this.pList.filter(function(val1) {
+              if (val1.id == that.$route.query.id) {
+                return val1
+              }
             })
             })
-            this.setCurrent(_item[0])
-
-            this.carWeightInfo = {
-              carNumber: _item[0].carNumber,
-              type: this.information,
-              weight: this.weighingList.tare
+            if (_item.length != 0) {
+              this.setCurrent(_item[0])
+              this.weighingList = _item[0]
+              this.carWeightInfo = {
+                carNumber: _item[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.tare
+              }
+            } else {
+              this.setCurrent(this.pList[0])
+
+              this.weighingList = this.pList[0]
+              this.carWeightInfo = {
+                carNumber: this.pList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.tare
+              }
             }
             }
-             this.deptBudgetTotal =  this.pList.length
+
+            this.deptBudgetTotal = this.pList.length
           }
           }
-          this.weighingList = _item[0]
         }
         }
       },
       },
       tabClick(val) {
       tabClick(val) {
@@ -409,7 +432,7 @@
             baudRate: this.param
             baudRate: this.param
           }); // set baud rate
           }); // set baud rate
           this.reader = port.readable.getReader();
           this.reader = port.readable.getReader();
-          
+
           // 监听来自串行设备的数据
           // 监听来自串行设备的数据
           while (true) {
           while (true) {
             const {
             const {
@@ -427,7 +450,7 @@
             // var receData = HexConvert.ByteToString(value);
             // var receData = HexConvert.ByteToString(value);
             // console.log("receData",receData);
             // console.log("receData",receData);
             var flag = false;
             var flag = false;
-            if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+            if (this.warehouseName && this.warehouseName == '山东诸城迈饶库') {
               for (var i = 0; i < value.length; i++) {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 var tmp = String.fromCharCode(value[i])
                 if (tmp == '+') {
                 if (tmp == '+') {
@@ -438,22 +461,21 @@
                 }
                 }
               }
               }
               if (this.tpyeNo != 2) {
               if (this.tpyeNo != 2) {
-                if(parseInt(result)|| parseInt(result) == 0){
+                if (parseInt(result) || parseInt(result) == 0) {
                   this.weighingList.grossWeight = parseInt(result)
                   this.weighingList.grossWeight = parseInt(result)
                 }
                 }
               } else {
               } else {
-                if(parseInt(result)|| parseInt(result) == 0){
+                if (parseInt(result) || parseInt(result) == 0) {
                   this.weighingList.tare = parseInt(result)
                   this.weighingList.tare = parseInt(result)
                 }
                 }
               }
               }
-            }
-            else{
-              for(var i=0;i<value.length;i++){
+            } else {
+              for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 var tmp = String.fromCharCode(value[i])
-                if(value[0] != 49 && value[0] != 2){
+                if (value[0] != 49 && value[0] != 2) {
                   break
                   break
                 }
                 }
-                if (tmp == String.fromCharCode(32) ) {
+                if (tmp == String.fromCharCode(32)) {
                   flag = true
                   flag = true
                 }
                 }
                 if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
                 if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
@@ -467,16 +489,16 @@
                 }
                 }
               }
               }
               if (this.tpyeNo != 2) {
               if (this.tpyeNo != 2) {
-                if(parseInt(result)|| parseInt(result) == 0){
-                  this.weighingList.grossWeight = parseInt(result)*100
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.weighingList.grossWeight = parseInt(result) * 100
                 }
                 }
               } else {
               } else {
-                if(parseInt(result)|| parseInt(result) == 0){
-                  this.weighingList.tare = parseInt(result)*100
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.weighingList.tare = parseInt(result) * 100
                 }
                 }
               }
               }
             }
             }
-            
+
             setTimeout(1000)
             setTimeout(1000)
             // value 是一个 Uint8Array
             // value 是一个 Uint8Array
           }
           }
@@ -662,7 +684,7 @@
                         //累计售粮没有超上限完成毛检保存
                         //累计售粮没有超上限完成毛检保存
                         this.weighingList.relationId = this.relationId;
                         this.weighingList.relationId = this.relationId;
                         this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName'),
                         this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName'),
-                        grossWeight(this.weighingList)
+                          grossWeight(this.weighingList)
                           .toPromise()
                           .toPromise()
                           .then((response) => {
                           .then((response) => {
                             this.$notify.success({
                             this.$notify.success({
@@ -800,10 +822,12 @@
         padding: 20px;
         padding: 20px;
         border-radius: 10px;
         border-radius: 10px;
         margin: 0 20px 20px 20px;
         margin: 0 20px 20px 20px;
-        .car-type{
+
+        .car-type {
           text-align: left;
           text-align: left;
         }
         }
-        .kg-style{
+
+        .kg-style {
           font-size: 30px;
           font-size: 30px;
         }
         }
       }
       }
@@ -929,7 +953,8 @@
     padding: 10px 0 !important;
     padding: 10px 0 !important;
     height: auto !important;
     height: auto !important;
   }
   }
-  .weight{
+
+  .weight {
     font-size: 68px;
     font-size: 68px;
   }
   }
 </style>
 </style>

+ 1 - 1
src/views/warehouse/tranManagementWarehouseInOutTask.vue

@@ -80,7 +80,7 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="任务编号"></el-table-column>
         <el-table-column prop="inOutTaskNo" label="任务编号"></el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="80">
+        <el-table-column prop="contractNo" label="合同编号">
           <!-- <template scope="scope">
           <!-- <template scope="scope">
             <div
             <div
               v-if="
               v-if="