瀏覽代碼

Merge branch 'master' of http://git.zthymaoyi.com:3000/gdc/yiliangyiyun-pc

gjy 3 年之前
父節點
當前提交
a96347e0fe

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

@@ -21,7 +21,7 @@
       <!-- 使用租户 -->
       
       <div class="hidden-content">
-        <el-input ref="hiddenFocus" type="password" class="input-Style" readonly v-model="barCode" size="small" @focus="focus" @blur="blur" autocomplete="off" 
+        <el-input ref="hiddenFocus" type="password" class="input-Style" v-model="barCode" size="small" @focus="focus" @blur="blur" autocomplete="off" auto-complete="new-password"
           @keyup.enter.native="payCode" placeholder="扫码枪内容"></el-input>
         <div v-show="isOpenCodeGun" class="code-scan-text">扫码枪已连接</div>
         <div v-show="!isOpenCodeGun" @click="setCodeGun" class="code-scan-text">点我扫码</div>
@@ -51,7 +51,7 @@
       </div>
       <div class="compName-row">
         <!-- <span class="compName">{{compName}}</span> -->
-        <el-select style='width:260px;' @change='compNameChange' v-model="compName" placeholder="请选择" filterable clearable>
+        <el-select style='width:260px;' @change='compNameChange' v-model="compName" placeholder="请选择">
         <el-option
           v-for="item in compNameoptions"
           :key="item"

+ 33 - 13
src/utils/util.js

@@ -1,4 +1,6 @@
-import { validatenull } from './validate'
+import {
+  validatenull
+} from './validate'
 /**
  * 动态插入css
  */
@@ -46,11 +48,11 @@ const isInclude = (name) => {
 }
 const addCallback = (obj, callback) => {
   if (obj.addEventListener) {
-    obj.addEventListener('load', function () {
+    obj.addEventListener('load', function() {
       callback && callback();
     }, false);
   } else if (obj.attachEvent) {
-    obj.attachEvent('onreadystatechange', function () {
+    obj.attachEvent('onreadystatechange', function() {
       var target = window.event.srcElement;
       if (target.readyState == 'loaded') {
         callback && callback();
@@ -172,16 +174,16 @@ export const listenfullscreen = (callback) => {
   function listen() {
     callback()
   }
-  document.addEventListener('fullscreenchange', function () {
+  document.addEventListener('fullscreenchange', function() {
     listen();
   });
-  document.addEventListener('mozfullscreenchange', function () {
+  document.addEventListener('mozfullscreenchange', function() {
     listen();
   });
-  document.addEventListener('webkitfullscreenchange', function () {
+  document.addEventListener('webkitfullscreenchange', function() {
     listen();
   });
-  document.addEventListener('msfullscreenchange', function () {
+  document.addEventListener('msfullscreenchange', function() {
     listen();
   });
 };
@@ -244,7 +246,8 @@ export const diff = (obj1, obj2) => {
   delete obj1.close;
   var o1 = obj1 instanceof Object;
   var o2 = obj2 instanceof Object;
-  if (!o1 || !o2) { /*  判断不是对象  */
+  if (!o1 || !o2) {
+    /*  判断不是对象  */
     return obj1 === obj2;
   }
 
@@ -270,7 +273,7 @@ export const diff = (obj1, obj2) => {
 export const findByvalue = (dic, value) => {
   let result = '';
   if (validatenull(dic)) return value;
-  if (typeof (value) == 'string' || typeof (value) == 'number' || typeof (value) == 'boolean') {
+  if (typeof(value) == 'string' || typeof(value) == 'number' || typeof(value) == 'boolean') {
     let index = 0;
     index = findArray(dic, value);
     if (index != -1) {
@@ -321,12 +324,16 @@ export const openWindow = (url, title, w, h) => {
   const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left
   const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top
 
-  const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width
-  const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height
+  const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document
+    .documentElement.clientWidth : screen.width
+  const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document
+    .documentElement.clientHeight : screen.height
 
   const left = ((width / 2) - (w / 2)) + dualScreenLeft
   const top = ((height / 2) - (h / 2)) + dualScreenTop
-  const newWindow = window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left)
+  const newWindow = window.open(url, title,
+    'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' +
+    w + ', height=' + h + ', top=' + top + ', left=' + left)
 
   // Puts focus on the newWindow
   if (window.focus) {
@@ -371,7 +378,9 @@ export const generateTitle = (title, key, _this) => {
 }
 //处理路由
 export const getPath = (params) => {
-  let { src } = params;
+  let {
+    src
+  } = params;
   let result = src || '/';
   if (src.includes('http') || src.includes('https')) {
     result = `/myiframe/urlPath?${objToform(params)}`;
@@ -390,3 +399,14 @@ export const getValue = (route) => {
   return value;
 }
 // 路由处理 结束
+
+// null赋值空字符串
+export const nullToString = (obj) => {
+
+  Object.keys(obj).forEach(function(key) {
+    console.log(key, obj[key])
+    if (obj[key] === null) {
+      obj[key] = ''
+    }
+  })
+}

+ 23 - 16
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -12,7 +12,7 @@
       </el-col>
     </el-row>
     <div class="center">
-      <el-form ref="deptBudgetList" :model="deptBudgetList"  label-width="110px">
+      <el-form ref="deptBudgetList" :model="deptBudgetList" label-width="110px">
         <div class="basicInformation">
           <div class="small-title" style="font-size: 16px">任务详情</div>
           <el-row>
@@ -77,8 +77,9 @@
                 <el-input type="text" class="row-item" v-model="deptBudgetList.contractNo" disabled></el-input>
               </el-form-item>
             </el-col>
-             <el-col :span="8">
-              <el-form-item label="关联合同" v-if="deptBudgetList.relatedContract" span="1" prop="inOutDate" class="relatedContract">
+            <el-col :span="8">
+              <el-form-item label="关联合同" v-if="deptBudgetList.relatedContract" span="1" prop="inOutDate"
+                class="relatedContract">
                 <el-input type="text" class="row-item" v-model="deptBudgetList.relatedContract" disabled></el-input>
               </el-form-item>
             </el-col>
@@ -95,9 +96,9 @@
             </el-form-item>
             <div class="input-item-margin">
               <div v-if="deptBudgetList.priceStatus=='审核中'">
-                <el-button type="primary"
-                v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small" @click="examine()">审核中
-              </el-button>
+                <el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
+                  @click="examine()">审核中
+                </el-button>
               </div>
               <el-button v-else type="primary" @click="priceSubmit()">提交</el-button>
             </div>
@@ -121,8 +122,8 @@
               <el-col :span="8">
 
                 <el-form-item label="姓名:" span="1" prop="driverName" label-width="125px">
-                  <el-select v-show="!item.temporaryDriverFlag" v-model="item.driver" filterable clearable placeholder="请选择司机"
-                    class="row-item" @change="
+                  <el-select ref="driverSelect" v-show="!item.temporaryDriverFlag" @visible-change="clearBlur"
+                    v-model="item.driver" filterable clearable placeholder="请选择司机" class="row-item" @change="
                              (val) => {
                                carchange(val, index)
                              }
@@ -138,8 +139,8 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="司机电话:" span="1" prop="impurity" label-width="125px">
-                  <el-select v-show="!item.temporaryDriverFlag" v-model="item.driverPhone" placeholder="请选择司机电话" filterable clearable
-                    class="row-item" @change="
+                  <el-select v-show="!item.temporaryDriverFlag" v-model="item.driverPhone" placeholder="请选择司机电话"
+                    filterable clearable class="row-item" @change="
                                (val) => {
                                  phonechange(val, index)
                                }
@@ -155,8 +156,7 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="车牌号:" span="1" prop="carNo" label-width="125px">
-                  <el-input :disabled="readonly" v-model="item.carNo" placeholder="" maxlength="120"
-                    size="small" />
+                  <el-input :disabled="readonly" v-model="item.carNo" placeholder="" maxlength="120" size="small" />
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -180,15 +180,13 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="车型:" span="1" prop="carModel" label-width="125px">
-                  <el-input :disabled="readonly" v-model="item.carModel" placeholder="" maxlength="120"
-                    size="small" />
+                  <el-input :disabled="readonly" v-model="item.carModel" placeholder="" maxlength="120" size="small" />
                 </el-form-item>
               </el-col>
               <el-col :span="8">
 
                 <el-form-item label="车长:" span="1" prop="carLength" label-width="125px">
-                  <el-input :disabled="readonly" v-model="item.carLength" placeholder="" maxlength="120"
-                    size="small" />
+                  <el-input :disabled="readonly" v-model="item.carLength" placeholder="" maxlength="120" size="small" />
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -304,6 +302,14 @@
       },
     },
     methods: {
+      clearBlur(e) {
+        let k = this.$refs.driverSelect
+        if (!e) {
+          for (let i = 0; i < k.length; i++) {
+            k[i].blur()
+          }
+        }
+      },
       //返回按钮
       revert() {
         this.$router.go(-1)
@@ -957,6 +963,7 @@
       margin-top: 20px;
     }
   }
+
   .content4 {
     background: #F5F7FA;
     display: flex;

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

@@ -38,7 +38,7 @@
         <!--其他负责人-->
         <ws-form-item label="其他负责人" span="1" prop="otherPersonCharge">
           <el-select v-model="deptBudgetList.otherPersonPhone" placeholder="请选择其他负责人" @change="selectstaffOther"
-            multiple filterable clearable>
+            multiple filterable clearable collapse-tags>
             <el-option v-for="item in optionsOther" :key="item.staffMobilePhone" :label="item.staffName"
               :value="item.staffMobilePhone" />
           </el-select>

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

@@ -41,7 +41,7 @@
           <!--其他负责人-->
           <ws-form-item label="其他负责人" v-if="warehouseType == 1" span="1" prop="otherPersonCharge">
             <el-select v-model="deptBudgetList.otherPersonPhone" placeholder="请选择其他负责人" @change="selectstaffOther"
-              :filter-method="dataFilter1" filterable clearable multiple>
+              :filter-method="dataFilter1" filterable clearable multiple collapse-tags>
               <el-option v-for="item in optionsOther" :key="item.staffMobilePhone" :label="item.staffName"
                 :value="item.staffMobilePhone " />
             </el-select>

+ 3 - 1
src/views/warehouse/warehouseManagementGross.vue

@@ -27,7 +27,7 @@
           <div class="top">
             <div class="car-type">毛重</div>
             <div class="weight">
-              {{ deptBudgetList.grossWeight }} <span class="kg-style">kg</span>
+              {{ grossWeight }} <span class="kg-style">kg</span>
             </div>
             <!-- <div v-else class="weight">{{weighingList.tare}} <span class="kg-style">kg</span></div> -->
             <div class="car-no">{{ deptBudgetList.carNo }}</div>
@@ -517,6 +517,7 @@
             return time.getTime() > Date.now()
           },
         },
+
         accessoryTFs: false,
         allowEdit: true,
         param: 9600,
@@ -1023,6 +1024,7 @@
           })
           return
         }
+
         // if (
         //   this.deptBudgetList.contractNo.length < 6 ||
         //   this.deptBudgetList.contractNo.length > 20

+ 4 - 1
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -28,7 +28,7 @@
             <div class="car-type">皮重</div>
             <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
             <div class="weight">
-              {{ dataList.tare }} <span class="kg-style">kg</span>
+              {{ tare }} <span class="kg-style">kg</span>
             </div>
             <div class="car-no">{{ dataList.carNo }}</div>
           </div>
@@ -541,6 +541,7 @@
             value: '3',
           },
         ],
+        tare:"",
       }
     },
     mounted() {},
@@ -560,6 +561,7 @@
       this.dataList.warehouseName = this.$route.query.warehouseName
       this.dataList.binNumber = this.$route.query.binNumber
       this.dataList.tare = Math.round(this.$route.query.tare * 1000)
+      this.tare = this.dataList.tare
       this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
       this.dataList.grade = this.$route.query.grade
       this.dataList.agent = this.$route.query.agent
@@ -1448,6 +1450,7 @@
         })
       },
       tarechange(e) {
+        this.tare = this.dataList.tare
         if (this.dataList.grossWeight && this.dataList.tare) {
           this.dataList.netWeight = Number(
             this.dataList.grossWeight - this.dataList.tare

+ 4 - 1
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -27,7 +27,7 @@
           <div class="top">
             <div class="car-type">毛重</div>
             <div class="weight">
-              {{ dataList.grossWeight }}
+              {{ grossWeight }}
               <span class="kg-style">kg</span>
             </div>
             <!-- <div class="weight">{{dataList.tare}} <span class="kg-style">kg</span></div> -->
@@ -483,6 +483,7 @@
         param: 9600,
         allowEdit: true,
         result1: '00',
+        grossWeight:"",//显示的毛重
       }
     },
     mounted() {},
@@ -496,6 +497,7 @@
       this.deptBudgetList1.binNumber = this.$route.query.binNumber
       this.dataList.id = this.$route.query.id
       this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
+      this.grossWeight =  this.dataList.grossWeight
       this.dataList.contractNo = this.$route.query.contractNo
       this.dataList.baseId = this.$route.query.baseId
       this.dataList.positionId = this.$route.query.positionId
@@ -1213,6 +1215,7 @@
         }
       },
       grossWeightchange(e) {
+        this.grossWeight = this.dataList.grossWeight
         if (this.dataList.grossWeight && this.dataList.tare) {
           this.dataList.netWeight = Number(
             this.dataList.grossWeight - this.dataList.tare

+ 6 - 0
src/views/warehouse/warehouseManagementRecord.vue

@@ -17,6 +17,7 @@
 				<span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
 				<div class="ware" v-show="warehouseType==1">
 					<!-- {{binNumber}}仓位(容量{{capacity}}吨) -->
+					<span class="binNo">仓位号:</span>
 					<el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
               @change="binNumberChange">
 			  <el-option  key="" label="全部仓位"
@@ -1156,4 +1157,9 @@
 	/deep/.el-table td , /deep/.el-table .el-table__header .cell{
 		text-align: center;
 	}
+	.binNo{
+		color: #333;
+		font-size: 18px;
+		margin-left: 20px;
+	}
 </style>

+ 3 - 1
src/views/warehouse/warehouseManagementTare.vue

@@ -27,7 +27,7 @@
             <div class="car-type">皮重</div>
             <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
             <div class="weight">
-              {{ deptBudgetList.tare }} <span class="kg-style">kg</span>
+              {{ tare }} <span class="kg-style">kg</span>
             </div>
             <div class="car-no">{{ deptBudgetList.carNo }}</div>
           </div>
@@ -431,6 +431,7 @@
             value: '3',
           },
         ],
+        tare:"",//显示的皮重
       }
     },
     mounted() {
@@ -1496,6 +1497,7 @@
         })
       },
       tarechange(e) {
+        this.tare = this.deptBudgetList.tare
         if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
           this.deptBudgetList.netWeight = Number(
             this.deptBudgetList.grossWeight - this.deptBudgetList.tare