Sfoglia il codice sorgente

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

gjy 3 anni fa
parent
commit
611316bee5

+ 3 - 0
src/api/V2/outboundManagement/index.js

@@ -40,3 +40,6 @@ export const API_POST_COLLECTION_ADDREMARKS = '/paymentManagement/api/addRemarks
 export const API_POST_NEW_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
 // 换仓
 export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
+// 退回
+export const API_POST_GO_BACK = `/weighingManagement/api/outWeightReturn`
+

+ 30 - 27
src/components/balanceAlert.vue

@@ -1,4 +1,3 @@
-
 <template>
   <div class="content">
     <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
@@ -23,7 +22,7 @@ export default {
     return {
       param: 9600,
       grossWeightVal: '',
-      tareVal: '',
+      tareVal: ''
     }
   },
   activated() {},
@@ -56,16 +55,19 @@ export default {
           // The Web Serial API is supported.
           console.log('the Web Serial API is supported.')
           const port = await navigator.serial.requestPort()
-          if (this.deptBudgetList.warehouseName == '白城内陆港'||this.deptBudgetList.warehouseName == '肇东金信库') {
+          if (
+            this.deptBudgetList.warehouseName == '白城内陆港' ||
+            this.deptBudgetList.warehouseName == '肇东金信库'
+          ) {
             this.param = 1200
-          } else if(this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
+          } else if (this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
             this.param = 2400
-          }else {
+          } else {
             this.param = 9600
           }
           console.log(this.param)
           await port.open({
-            baudRate: this.param,
+            baudRate: this.param
           }) // set baud rate
           this.reader = port.readable.getReader()
           console.log('port  ', port)
@@ -77,7 +79,6 @@ export default {
         }
         // 监听来自串行设备的数据
         while (true) {
-          
           const { value, done } = await this.reader.read()
           // console.log('value',value);
           if (done) {
@@ -109,37 +110,39 @@ export default {
           //     this.deptBudgetList.tare = parseInt(result)
           //   }
           // }
-          
-          if(value.length > 3 ){
-             if(value.length <= 6){
+
+          if (value.length > 3) {
+            if (value.length <= 6) {
               continue
-             }
-            if(this.deptBudgetList.warehouseName == '肇东金信库' && value.length < 10){
-              var start = (new Date()).getTime();
-              while((new Date()).getTime() - start < 200) {
-              }
+            }
+            if (
+              this.deptBudgetList.warehouseName == '肇东金信库' &&
+              value.length < 10
+            ) {
+              var start = new Date().getTime()
+              while (new Date().getTime() - start < 200) {}
               continue
             }
             console.log('value23:', value)
-          }
-          else if(this.deptBudgetList.warehouseName == '白城内陆港' ||this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'){
+          } else if (
+            this.deptBudgetList.warehouseName == '白城内陆港' ||
+            this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'
+          ) {
             console.log('value:', value)
-            var start = (new Date()).getTime();
-            while((new Date()).getTime() - start < 400) {
-
-            }
-            continue;
+            var start = new Date().getTime()
+            while (new Date().getTime() - start < 400) {}
+            continue
           }
           if (
             this.deptBudgetList.warehouseName &&
             (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
-            this.deptBudgetList.warehouseName == '山东园丰库' ||
+              this.deptBudgetList.warehouseName == '山东园丰库' ||
               this.deptBudgetList.warehouseName == '克东千红库' ||
               this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库' ||
               this.deptBudgetList.warehouseName == '哈尔滨依兰库' ||
               this.deptBudgetList.warehouseName == '龙江金信库' ||
-              this.deptBudgetList.warehouseName == '白城内陆港'||
-              this.deptBudgetList.warehouseName == '肇东金信库'||
+              this.deptBudgetList.warehouseName == '白城内陆港' ||
+              this.deptBudgetList.warehouseName == '肇东金信库' ||
               this.deptBudgetList.warehouseName == '呼兰大金仓')
           ) {
             for (var i = 0; i < value.length; i++) {
@@ -259,8 +262,8 @@ export default {
       } else {
         console.log('the Web Serial API is not supported.', navigator)
       }
-    },
-  },
+    }
+  }
 }
 </script>
 

+ 5 - 2
src/model/outboundManagement/index.js

@@ -22,7 +22,8 @@ import {
     API_POST_COLLECTION_MONEY,
     API_GET_INSPECT_CONTRANCLISTWEIGHING,
     API_POST_NEW_SUBMIT,
-    API_POST_CHANE_NO
+    API_POST_CHANE_NO,
+    API_POST_GO_BACK
 }   from '@/api/V2/outboundManagement'
 
   //质检列表
@@ -66,4 +67,6 @@ export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatche
 //新检斤保存
 export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)
 // 换仓
-export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
+export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
+// 退回
+export const goBack = appRx.post(API_POST_GO_BACK, errorCatcher, errorHandle, filter)

+ 5 - 3
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -251,7 +251,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -1714,7 +1714,8 @@
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
                         this
                         .warehouseName == '哈尔滨依兰库' || this
-                        .warehouseName == '白城内陆港')) {
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库')) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                         let cang = {}
                         cang.value = this.weighingList.seller
@@ -1787,7 +1788,8 @@
                     this.idPrint = response
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
                         .warehouseName == '哈尔滨依兰库' || this
-                        .warehouseName == '白城内陆港')) {
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库')) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                         let cang = {}
                         cang.value = this.weighingList.seller

+ 4 - 4
src/views/houseSelfCollect/weighingManagement.vue

@@ -136,7 +136,7 @@
         <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
           <div>收货单位:</div>
           <!-- <div>{{companyName}}</div> -->
-          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;" v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;" v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
             <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
           <el-select v-model="companyName1" placeholder="请选择" style="width: 75%;" v-else>
@@ -144,7 +144,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -546,7 +546,7 @@
                 this.dialogDataList.push(_datas)
              }else{
               // this.dialogData.compName = this.companyName
-               if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'){
+               if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'){
                  this.dialogData.companyName = this.companyName
                }else{
                  this.dialogData.companyName = this.companyName1
@@ -574,7 +574,7 @@
               .toPromise()
               .then((response) => {
                 index1++;
-                if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'){
+                if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'){
                   response.compName = this.companyName
                }else{
                  response.compName = this.companyName1

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

@@ -200,7 +200,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||this.warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>

+ 3 - 3
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -105,7 +105,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -581,7 +581,7 @@
             return
           }
           for (let _num = 0; _num < this.modification.length; _num++) {
-            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库')) {
+            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
               if (this.modification[_num].seller && this.modification[_num].buyer) {
                 let cang = {}
                 cang.value = this.modification[_num].seller
@@ -600,7 +600,7 @@
           }
           this.isShowPrintType = true
         } else {
-          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库')) {
+          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
             if (row.seller && row.buyer) {
               let cang = {}
               cang.value = row.seller

+ 15 - 1
src/views/outboundManagement/weighingManagementrecord.vue

@@ -76,6 +76,7 @@
           <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
             v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
              <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称皮重'">换仓</el-button>
+             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="returnBack(scope.row)" v-if="scope.row.status == '已称毛重'">退回</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -132,7 +133,8 @@
     selectWarehouseSelf,
     delelteWeighing,
     getweighing,
-    changeNo
+    changeNo,
+    goBack
   } from '@/model/outboundManagement/index'
   import {
     EventBus
@@ -183,6 +185,18 @@
       this.showType = this.isShow
     },
     methods: {
+      returnBack(item){   
+          goBack({id:item.id}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '退回成功',
+                })
+                this.getList()
+						}) .catch(() => {
+            return false
+          })
+      },
        binNumberChange(e){
         this.binNumber = e
         for(let i = 0 ; i < this.binnumberList.length ; i++){

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

@@ -302,7 +302,11 @@
             </el-option>
           </el-select>
         </div>
+<<<<<<< HEAD
+        <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'||deptBudgetList.warehouseName=='哈尔滨依兰库'||this.warehouseName=='山东园丰库'">
+=======
         <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'">
+>>>>>>> 32173094c0b5517c2d64af85d92ed9b3864725d5
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>