Просмотр исходного кода

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

zhongtianhaoyuan 3 лет назад
Родитель
Сommit
935680e71c

+ 18 - 5
public/static/print.html

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

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

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

+ 14 - 14
src/layout/index/top/index.vue

@@ -265,20 +265,20 @@ export default {
       passwordFlag: false,
       passwordMsgRules: {
         originalPassword: [{ required: true, message: ' ', trigger: 'blur' }],
-        newPassword: [
-          {
-            required: true,
-            trigger: 'blur',
-            validator: validPasswordRule.bind(this),
-          },
-        ],
-        password: [
-          {
-            required: true,
-            trigger: 'blur',
-            validator: validPasswordRule2.bind(this),
-          },
-        ],
+        // newPassword: [
+        //   {
+        //     required: true,
+        //     trigger: 'blur',
+        //     validator: validPasswordRule.bind(this),
+        //   },
+        // ],
+        // password: [
+        //   {
+        //     required: true,
+        //     trigger: 'blur',
+        //     validator: validPasswordRule2.bind(this),
+        //   },
+        // ],
       },
       passwordMsg: {
         originalPassword: '', // 原始密码

+ 6 - 1
src/router/index.js

@@ -215,7 +215,12 @@ router.beforeEach(async (to, from, next) => {
       }
     }
     renewalHead(data).toPromise().then(() => {
-      next()
+      console.log(sessionStorage.getItem('paymentManagementReturn'))
+      if(to.name=='settlement'&&sessionStorage.getItem('paymentManagementReturn')=='true'){
+        next(`/houseSelfCollect/paymentManagement`);
+      }else{
+        next()
+      }
     })
     .catch((err) => {
       clearStorage()

+ 2 - 1
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -26,7 +26,8 @@
               <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterBase" @input="changeBaseWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
-          <div v-if="baseInfoForm.paramType != '1'" class="grid-content">
+          <!-- <div v-if="baseInfoForm.paramType != '1'" class="grid-content"> -->
+          <div class="grid-content">
             <el-form-item label="扣重比">
               <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.deductWeight" :disabled="!isEdit"></el-input>
             </el-form-item>

+ 12 - 4
src/views/houseSelfCollect/paymentManagement.vue

@@ -135,6 +135,10 @@
                     scope.row.status == '待结算'
                   "
               @click="settlement(1, scope.row)"
+            >结算</el-button>
+                      <el-button
+            
+              @click="settlement(1, scope.row)"
             >结算</el-button>
           </span>
 
@@ -572,11 +576,15 @@ export default {
       this.getList()
     },
     settlement(index, row) {
-      if (row.goodsName)
+      if (row.goodsName){
+      sessionStorage.setItem('paymentManagementReturn', false)
         this.$router.push({
-          path: 'settlement',
-          query: { type: index, id: row.id }
-        })
+                path: 'settlement',
+                query: { type: index, id: row.id }
+              })
+      }
+      
+     
     },
     payment() {
       this.imageUrl = ''

+ 2 - 1
src/views/houseSelfCollect/settlement.vue

@@ -765,15 +765,16 @@ export default {
             type: 'warning',
           })
       }
-      
     },
     cancel() {
       this.isShowPrint = false
       this.paymentList = [] 
+      sessionStorage.setItem('paymentManagementReturn', true)
       this.$router.push({ path: 'paymentManagement' })
     },
     closePrint(){
         this.isShowPrint = false
+         sessionStorage.setItem('paymentManagementReturn', true)
         this.$router.push({path:'paymentManagement'})
       },
   },

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

@@ -21,26 +21,22 @@
         <h2 class="bg-left titleup">实时监控</h2>
         <div class="bottom">
           <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 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 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 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>
@@ -74,26 +70,28 @@
                 <ws-input v-model="weighingList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
               </ws-form-item>
               <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>
               <el-button type="primary" :class="index ==0 ? '' : 'butCss'" @click="openPort">重新获取</el-button>
               <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>
               <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
               <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 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>
               </div>
             </ws-info-table>
@@ -142,7 +140,8 @@
       </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>
       <div style="text-align:center">
         <el-button type="primary" @click="closePrint">关闭</el-button>
@@ -168,15 +167,15 @@
     components: {
       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() {
       return {
@@ -215,9 +214,9 @@
         param: 9600,
         monitorUrl1: '',
         monitorUrl2: '',
-        cangid:'',
-        paramType:'1',
-        warehouseName:''
+        cangid: '',
+        paramType: '1',
+        warehouseName: ''
       }
     },
     activated() {
@@ -240,8 +239,7 @@
       this.warehouseId = this.$route.query.warehouseId
       if (!this.$route.query.grossWeight) {
         this.$route.query.grossWeight = 0
-      }
-      else{
+      } else {
         this.weighingList.grossWeight = this.$route.query.grossWeight
       }
       // this.purchasePriceList = this.$route.query.purchasePriceList
@@ -291,7 +289,8 @@
           .then((response) => {
             for (let i = 0; i < response.records.length; i++) {
               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
                 } else {
                   response.records[i].allow = 2
@@ -315,13 +314,13 @@
         console.log(this.common.commonWeighingList, 'commonWeighingList')
         let _list = this.common.commonWeighingList
         for (let i = 0; i < _list.length; i++) {
-          if(_list[i].allow == 2){
+          if (_list[i].allow == 2) {
             continue
           }
           if (_list[i].status == '已质检' || _list[i].status == '已称毛重') {
             this.mList.push(_list[i])
           }
-          
+
           if ((_list[i].status == '已称皮重' || _list[i].status == '已称毛重')) {
             this.pList.push(_list[i])
           }
@@ -330,42 +329,66 @@
           this.index = 0
           this.carList = this.mList
           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 {
           this.index = 1
           this.carList = this.pList
           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) {
@@ -409,7 +432,7 @@
             baudRate: this.param
           }); // set baud rate
           this.reader = port.readable.getReader();
-          
+
           // 监听来自串行设备的数据
           while (true) {
             const {
@@ -427,7 +450,7 @@
             // var receData = HexConvert.ByteToString(value);
             // console.log("receData",receData);
             var flag = false;
-            if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+            if (this.warehouseName && this.warehouseName == '山东诸城迈饶库') {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 if (tmp == '+') {
@@ -438,22 +461,21 @@
                 }
               }
               if (this.tpyeNo != 2) {
-                if(parseInt(result)|| parseInt(result) == 0){
+                if (parseInt(result) || parseInt(result) == 0) {
                   this.weighingList.grossWeight = parseInt(result)
                 }
               } else {
-                if(parseInt(result)|| parseInt(result) == 0){
+                if (parseInt(result) || parseInt(result) == 0) {
                   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])
-                if(value[0] != 49 && value[0] != 2){
+                if (value[0] != 49 && value[0] != 2) {
                   break
                 }
-                if (tmp == String.fromCharCode(32) ) {
+                if (tmp == String.fromCharCode(32)) {
                   flag = true
                 }
                 if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
@@ -467,16 +489,16 @@
                 }
               }
               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 {
-                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)
             // value 是一个 Uint8Array
           }
@@ -662,7 +684,7 @@
                         //累计售粮没有超上限完成毛检保存
                         this.weighingList.relationId = this.relationId;
                         this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName'),
-                        grossWeight(this.weighingList)
+                          grossWeight(this.weighingList)
                           .toPromise()
                           .then((response) => {
                             this.$notify.success({
@@ -800,10 +822,12 @@
         padding: 20px;
         border-radius: 10px;
         margin: 0 20px 20px 20px;
-        .car-type{
+
+        .car-type {
           text-align: left;
         }
-        .kg-style{
+
+        .kg-style {
           font-size: 30px;
         }
       }
@@ -929,7 +953,8 @@
     padding: 10px 0 !important;
     height: auto !important;
   }
-  .weight{
+
+  .weight {
     font-size: 68px;
   }
 </style>

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

@@ -80,7 +80,7 @@
           </template>
         </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">
             <div
               v-if="

+ 1 - 1
vue.config.js

@@ -142,7 +142,7 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.107/:8090/',
-        target: 'http://192.168.1.107:8090/',
+        target: 'http://192.168.1.122:9100/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',