Przeglądaj źródła

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

achao 3 lat temu
rodzic
commit
179b863d16

+ 17 - 17
src/views/houseSelfCollect/weightCheck.vue

@@ -477,7 +477,7 @@
       async openPort() {
         console.log('openPort', navigator)
         if ('serial' in navigator) {
-          if (!this.$store.state.app.reader) {
+          // if (!this.$store.state.app.reader) {
             // The Web Serial API is supported.
             console.log('the Web Serial API is supported.')
             console.log(this.param)
@@ -489,10 +489,10 @@
             console.log('beforeReader', port)
             console.log('beforeReader', this.reader)
             this.$store.dispatch('app/setReader', this.reader)
-          } else {
-            console.log('afterport', this.$store.state.app.reader)
-            this.reader = this.$store.state.app.reader
-          }
+          // } else {
+          //   console.log('afterport', this.$store.state.app.reader)
+          //   this.reader = this.$store.state.app.reader
+          // }
           // 监听来自串行设备的数据
           while (true) {
             const {
@@ -608,9 +608,9 @@
       },
       cancel() {
 
-        // if (this.reader) {
-        //   this.reader.cancel()
-        // }
+        if (this.reader) {
+          this.reader.cancel()
+        }
         this.$router.push({
           path: 'weighingManagement'
         })
@@ -661,9 +661,9 @@
         // })
       },
       print() {
-        // if (this.reader) {
-        //   this.reader.cancel()
-        // }
+        if (this.reader) {
+          this.reader.cancel()
+        }
         if (!this.weighingList.grossWeight) {
           this.$message({
             message: '毛重不能为空',
@@ -791,9 +791,9 @@
                           grossWeight(this.weighingList)
                           .toPromise()
                           .then((response) => {
-                            // if (this.reader) {
-                            //   this.reader.cancel()
-                            // }
+                            if (this.reader) {
+                              this.reader.cancel()
+                            }
                             this.$notify.success({
                               title: '成功',
                               message: '保存成功',
@@ -820,9 +820,9 @@
               tare(this.weighingList)
                 .toPromise()
                 .then((response) => {
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
                   this.$notify.success({
                     title: '成功',
                     message: '保存成功',

+ 5 - 5
src/views/outboundManagement/weighing.vue

@@ -181,7 +181,7 @@
 			async openPort(){
 			 console.log('openPort', navigator)
         if ('serial' in navigator) {
-          if (!this.$store.state.app.reader) {
+        //   if (!this.$store.state.app.reader) {
             // The Web Serial API is supported.
             console.log('the Web Serial API is supported.')
             console.log(this.param)
@@ -193,10 +193,10 @@
             console.log('beforeReader', port)
             console.log('beforeReader', this.reader)
             this.$store.dispatch('app/setReader', this.reader)
-          } else {
-            console.log('afterport', this.$store.state.app.reader)
-            this.reader = this.$store.state.app.reader
-          }
+        //   } else {
+        //     console.log('afterport', this.$store.state.app.reader)
+        //     this.reader = this.$store.state.app.reader
+        //   }
 				// 监听来自串行设备的数据
 				while (true) {
 				const { value, done } = await this.reader.read();

+ 5 - 1
src/views/tranManagement/tranManagementTransporHairRespond.vue

@@ -92,7 +92,11 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="processNo" label="运输任务编号" width="140">
+        <el-table-column prop="processNo" label="运输任务编号/合同编号" width="140">
+        <template scope="scope">
+            <span v-if="scope.row.processNo">{{ scope.row.processNo }}</span>
+            <span v-else>{{ scope.row.contractNo }}</span>
+          </template>
         </el-table-column>
         <el-table-column prop="tranType" label="运输方式"> </el-table-column>
         <el-table-column prop="goodsName" label="货名"> </el-table-column>

+ 1 - 1
src/views/tranManagement/tranManagementthirdpartnarFeedback.vue

@@ -1178,7 +1178,7 @@ export default {
 }
 //联络员及车次
 /deep/.liaison .ws-info-table .el-form-item {
-  width: 20%;
+  width: 25%;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 50%;

+ 5 - 2
src/views/tranManagement/tranManagementthirdpartnarFeedbackLook.vue

@@ -415,12 +415,15 @@ export default {
             }
             if(this.checkList.indexOf('火运')!=-1){
               this.status1=true
-              if(response.tranCarInfoList2[i].boxNo&&response.tranCarInfoList2[i].boxNo.indexOf(',')!=-1){
+              for (let i = 0; i < response.tranCarInfoList2.length; i++) {
+                if(response.tranCarInfoList2[i].boxNo&&response.tranCarInfoList2[i].boxNo.indexOf(',')!=-1){
                   response.tranCarInfoList2[i].boxNo1=response.tranCarInfoList2[i].boxNo.split(',')[0]
                   response.tranCarInfoList2[i].boxNo2=response.tranCarInfoList2[i].boxNo.split(',')[1]
                 }else{
                   response.tranCarInfoList2[i].boxNo1=response.tranCarInfoList2[i].boxNo
                 }
+              }
+              
               this.freightspace1=response.tranCarInfoList2
             }else{
               this.status1=false
@@ -804,7 +807,7 @@ export default {
 }
 //联络员及车次
 /deep/.liaison .ws-info-table .el-form-item {
-  width: 20%;
+  width: 25%;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 50%;

+ 1 - 1
src/views/tranManagement/tranManagementthirdpartnarReceiving.vue

@@ -1019,7 +1019,7 @@ export default {
 }
 //联络员及车次
 /deep/.liaison .ws-info-table .el-form-item {
-  width: 20%;
+  width: 25%;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 50%;

+ 1 - 1
src/views/tranManagement/tranManagementthirdpartnarReceivingLook.vue

@@ -805,7 +805,7 @@ export default {
 }
 //联络员及车次
 /deep/.liaison .ws-info-table .el-form-item {
-  width: 20%;
+  width: 25%;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 50%;

+ 14 - 6
src/views/warehouse/warehouseManagementAdd.vue

@@ -323,7 +323,14 @@
       },
 
       submit() {
+        
         if (this.radio == 1) {
+          this.deptBudgetList.warehousePrivate =
+                    CodeToText[this.selectedOptions[0]]
+                  this.deptBudgetList.warehouseCity =
+                    CodeToText[this.selectedOptions[1]]
+                  this.deptBudgetList.warehouseArea =
+                    CodeToText[this.selectedOptions[2]]
           if (!this.deptBudgetList.warehouseName) {
             this.$message({
               message: '仓库名称不能为空!',
@@ -372,6 +379,13 @@
             })
             return
           }
+          if (!this.deptBudgetList.warehousePrivate) {
+            this.$message({
+              message: '请选择仓库所在地!',
+              type: 'warning',
+            })
+            return
+          }
           if (!this.deptBudgetList.detailedAddress) {
             this.$message({
               message: '详细地址不能为空!',
@@ -528,12 +542,6 @@
                 if (valid) {
                   this.deptBudgetList.compId =
                     localStorage.getItem('ws-pf_compId')
-                  this.deptBudgetList.warehousePrivate =
-                    CodeToText[this.selectedOptions[0]]
-                  this.deptBudgetList.warehouseCity =
-                    CodeToText[this.selectedOptions[1]]
-                  this.deptBudgetList.warehouseArea =
-                    CodeToText[this.selectedOptions[2]]
                   this.deptBudgetList.warehousePositionInfoList =
                     this.freightspace
                   this.deptBudgetList.totalStorage = this.totalStorage

+ 17 - 7
src/views/warehouse/warehouseManagementEdit.vue

@@ -98,13 +98,13 @@
           <el-button v-if="warehouseType == 1">上传附件</el-button>
         </el-upload>
         <div class="addressUrls" v-if="addressUrls != null">
-          <div class='addressUrls-item'>
             <div v-for="(item , index) in addressUrls" class="addressUrl" :key="index">
               <div @click='close(index)' class="iconfont icon-guanbi"></div>
-              <img v-if="addressUrls != null" width="100" height="100" :src="item" alt="" />
-            </div>
-
-
+              <el-image  v-if="addressUrls != null"
+                style="width: 100px; height: 100px"
+                :src="item" 
+                :preview-src-list="addressUrls">
+              </el-image>
           </div>
         </div>
         <div class="small-title">仓库定位</div>
@@ -339,6 +339,7 @@
         })
       },
       handleChange(value) {
+        console.log(value)
         this.selectedOptions = value
       },
       warehouseTypechange() {
@@ -468,12 +469,21 @@
           .then((response) => {
             var tmp = []
             tmp[0] = TextToCode[response.warehousePrivate].code
-            tmp[1] =
+            if(response.warehouseCity!=''){
+              tmp[1] =
               TextToCode[response.warehousePrivate][response.warehouseCity].code
-            tmp[2] =
+              tmp[2] =
               TextToCode[response.warehousePrivate][response.warehouseCity][
                 response.warehouseArea
               ].code
+            }else{
+              tmp[1]=TextToCode[response.warehousePrivate]['市辖区'].code
+              tmp[2] =
+              TextToCode[response.warehousePrivate]['市辖区'][
+                response.warehouseArea
+              ].code
+            }
+           
             this.selectedOptions = tmp
             this.deptBudgetList = response
             // if(this.deptBudgetList.addressUrl){

+ 36 - 20
src/views/warehouse/warehouseManagementGross.vue

@@ -360,14 +360,14 @@
             "
           >
             <ws-input
-              v-if="!carstatus"
+              v-if="options2.length==0"
               v-model="deptBudgetList.carNo"
               placeholder="请输入车牌号"
               maxlength="7"
-              size="small"
+              size="small" 
             />
             <el-select
-              v-if="carstatus"
+              v-if='carstatus&&options2.length>0'
               filterable
               :filter-method="dataFilter2"
               v-model="deptBudgetList.carNo"
@@ -382,6 +382,22 @@
                 :value="item.carNo"
               />
             </el-select>
+            <el-select
+              v-if='!carstatus&&options2.length>0'
+              filterable
+              :filter-method="dataFilter2"
+              v-model="deptBudgetList.carNo"
+              placeholder="请选择车牌号"
+              class="typeselect"
+              @change="carChange"
+            >
+              <el-option
+                v-for="item in options2"
+                :key="item.constKey"
+                :label="item.carNo"
+                :value="item.carNo"
+              />
+            </el-select>
           </ws-form-item>
           <!--船名  -->
           <ws-form-item
@@ -911,7 +927,7 @@ export default {
     async openPort() {
       console.log('openPort', navigator)
         if ('serial' in navigator) {
-          if (!this.$store.state.app.reader) {
+          // if (!this.$store.state.app.reader) {
             // The Web Serial API is supported.
             console.log('the Web Serial API is supported.')
             console.log(this.param)
@@ -923,10 +939,10 @@ export default {
             console.log('beforeReader', port)
             console.log('beforeReader', this.reader)
             this.$store.dispatch('app/setReader', this.reader)
-          } else {
-            console.log('afterport', this.$store.state.app.reader)
-            this.reader = this.$store.state.app.reader
-          }
+          // } else {
+          //   console.log('afterport', this.$store.state.app.reader)
+          //   this.reader = this.$store.state.app.reader
+          // }
         // 监听来自串行设备的数据
         while (true) {
           const { value, done } = await this.reader.read()
@@ -1172,9 +1188,9 @@ export default {
     //提交按钮
     submit() {
       
-      // if(this.reader){
-      //   this.reader.cancel()
-      // }
+      if(this.reader){
+        this.reader.cancel()
+      }
       if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -1754,9 +1770,9 @@ export default {
                   // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
                   // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
                   // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
                   this.$message.success('添加成功')
                   this.$router.push({
                     path: 'warehouseManagementList',
@@ -1791,9 +1807,9 @@ export default {
     },
     temporaryStorage() {
       
-        // if(this.reader){
-        //   this.reader.cancel()
-        // }
+        if(this.reader){
+          this.reader.cancel()
+        }
       if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -2288,9 +2304,9 @@ export default {
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
                   this.$message.success('保存成功')
                   this.$router.push({
                     path: 'warehouseManagementList',

+ 14 - 2
src/views/warehouse/warehouseManagementLook.vue

@@ -132,7 +132,8 @@
           </ws-info-table>
         </div>
         <div class="small-title" v-show="warehouseType == '1'">仓库照片</div>
-        <div class="addressUrls">
+        <div>
+          <div class="addressUrls">
           <div v-for="(items, index) in addressUrls" class="addressUrl">
             <img
               v-show="addressUrls.length > 0"
@@ -143,6 +144,8 @@
             />
           </div>
         </div>
+        
+        </div>
       </ws-form>
     </div>
     <div style="text-align: right; padding: 10px">
@@ -157,6 +160,11 @@
   </div>
 </template>
 <script>
+import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
 import { xiala, billoperatehis, getLook } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -307,6 +315,7 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          
           this.packtypeList = response
         })
     },
@@ -342,9 +351,12 @@ export default {
   margin-top: 100px;
   top: 30px;
   width: 90%;
-  height: 500px;
+  // height: 500px;
   margin: 0 auto;
 }
+.container{
+  overflow:scroll;
+}
 .container .bg-left {
   padding-left: 40px;
 }

+ 11 - 11
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -898,7 +898,7 @@ export default {
     async openPort() {
        console.log('openPort', navigator)
         if ('serial' in navigator) {
-          if (!this.$store.state.app.reader) {
+          // if (!this.$store.state.app.reader) {
             // The Web Serial API is supported.
             console.log('the Web Serial API is supported.')
             console.log(this.param)
@@ -910,10 +910,10 @@ export default {
             console.log('beforeReader', port)
             console.log('beforeReader', this.reader)
             this.$store.dispatch('app/setReader', this.reader)
-          } else {
-            console.log('afterport', this.$store.state.app.reader)
-            this.reader = this.$store.state.app.reader
-          }
+          // } else {
+          //   console.log('afterport', this.$store.state.app.reader)
+          //   this.reader = this.$store.state.app.reader
+          // }
         // 监听来自串行设备的数据
         while (true) {
           const { value, done } = await this.reader.read()
@@ -1251,9 +1251,9 @@ export default {
     //提交按钮
     submit() {
       
-      // if(this.reader){
-      //   this.reader.cancel()
-      // }
+      if(this.reader){
+        this.reader.cancel()
+      }
       if (!this.dataList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -1778,9 +1778,9 @@ export default {
                   this.dataList.deductionWeight = Math.round(
                     this.dataList.deductionWeight * 1000
                   )
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
                   this.$message.success('提交成功')
                   this.$confirm(`是否打印磅单`, {
                     cancelButtonText: '取消',

+ 11 - 11
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -668,7 +668,7 @@ export default {
     async openPort() {
       console.log('openPort', navigator)
     if ('serial' in navigator) {
-      if (!this.$store.state.app.reader) {
+      // if (!this.$store.state.app.reader) {
         // The Web Serial API is supported.
         console.log('the Web Serial API is supported.')
         console.log(this.param)
@@ -680,10 +680,10 @@ export default {
         console.log('beforeReader', port)
         console.log('beforeReader', this.reader)
         this.$store.dispatch('app/setReader', this.reader)
-      } else {
-        console.log('afterport', this.$store.state.app.reader)
-        this.reader = this.$store.state.app.reader
-      }
+      // } else {
+      //   console.log('afterport', this.$store.state.app.reader)
+      //   this.reader = this.$store.state.app.reader
+      // }
         // 监听来自串行设备的数据
         while (true) {
           const { value, done } = await this.reader.read()
@@ -973,9 +973,9 @@ export default {
     //提交按钮
     submit() {
       
-      // if(this.reader){
-      //   this.reader.cancel()
-      // }
+      if(this.reader){
+        this.reader.cancel()
+      }
       if (!this.dataList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -1399,9 +1399,9 @@ export default {
               addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
                   this.$message.success('提交成功')
                   this.$confirm(`是否打印磅单`, {
                     cancelButtonText: '取消',

+ 16 - 14
src/views/warehouse/warehouseManagementTare.vue

@@ -785,7 +785,7 @@ export default {
     async openPort() {
       console.log('openPort', navigator)
     if ('serial' in navigator) {
-      if (!this.$store.state.app.reader) {
+      // if (!this.$store.state.app.reader) {
         // The Web Serial API is supported.
         console.log('the Web Serial API is supported.')
         console.log(this.param)
@@ -797,10 +797,10 @@ export default {
         console.log('beforeReader', port)
         console.log('beforeReader', this.reader)
         this.$store.dispatch('app/setReader', this.reader)
-      } else {
-        console.log('afterport', this.$store.state.app.reader)
-        this.reader = this.$store.state.app.reader
-      }
+      // } else {
+      //   console.log('afterport', this.$store.state.app.reader)
+      //   this.reader = this.$store.state.app.reader
+      // }
         // 监听来自串行设备的数据
         while (true) {
           const { value, done } = await this.reader.read()
@@ -1398,16 +1398,18 @@ export default {
               this.deptBudgetList.statusFlag = 1
               this.deptBudgetList.grossWeight /= 1000
               this.deptBudgetList.tare /= 1000
-              this.deptBudgetList.netWeight = Number(
-                this.deptBudgetList.netWeight
-              ).toFixed(2)
+              if(this.deptBudgetList.netWeight){
+                this.deptBudgetList.netWeight = Number(
+                  this.deptBudgetList.netWeight
+                ).toFixed(2)
+              }
               this.deptBudgetList.pureWeight /= 1000
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
                   this.$message.success('保存成功')
                   this.$router.push({
                     path: 'warehouseManagementList',
@@ -1881,9 +1883,9 @@ export default {
             addstorageputList(this.deptBudgetList)
               .toPromise()
               .then((response) => {
-                // if (this.reader) {
-                //   this.reader.cancel()
-                // }
+                if (this.reader) {
+                  this.reader.cancel()
+                }
                 this.$message.success('添加成功')
                 this.$router.push({
                   path: 'warehouseManagementList',