Explorar o código

修改入库扫码

zhongtianhaoyuan %!s(int64=3) %!d(string=hai) anos
pai
achega
2961a25908

+ 29 - 92
src/layout/index/top/index.vue

@@ -43,8 +43,9 @@
               <el-button v-hasPermission="`acquisitionManagement.acquisitionPay.add`" v-if="btnStatus.status5"
                 @click="goToPage(5)" class="btn_css">去结算</el-button>
               <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`" 
-                v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'" class="btn_css">去称皮重
+                v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" class="btn_css">去称皮重
               </el-button>
+              <!-- v-show="toPageData.qualityInspectionManagement.confirm != '1'"  -->
               <el-button @click="cancel" class="btn" >关闭</el-button>
           </div>
         </el-dialog>
@@ -616,81 +617,39 @@
         this.isOpenCodeGun = false
       },
       goToPage(type) {
+        var _saomadata = {}
+        _saomadata.cangid = this.cangid
+        _saomadata.id = this.toPageData.qualityInspectionManagement.id
+        _saomadata.warehouseName = this.toPageData.qualityInspectionManagement.warehouseName
+       _saomadata.managementType = this.toPageData.qualityInspectionManagement.managementType//贸易入库1 收购入库3
          this.barCode = ''
         let _url = ''
         if (type === 1) {
-// this.toPageData 
+           _saomadata.type = 1
+           localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
           this.$router.push({
-          	name: 'inspectInfo',
-          	query: {
-          		type: 3,
-          		cangid: this.cangid,
-          		id: this.toPageData.qualityInspectionManagement.id,
-          		warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-          		count: 0,
-          		warehouseNo: 0,
-          		allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
-          		status:this.toPageData.status
-          	},
+          	name: 'inspectionManagementNew'
           })
         } else if (type === 2) {
-               this.$router.push({
-          	name: 'inspectInfo',
-          	query: {
-          		type: 5,
-          		cangid: this.cangid,
-          		id: this.toPageData.qualityInspectionManagement.id,
-          		warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-          		count: 0,
-          		warehouseNo: 0,
-          		allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
-          		status:this.toPageData.status
-          	},
+           _saomadata.type = 2
+           localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
+            this.$router.push({
+          	name: 'inspectionManagementNew'
           })
         } else if (type === 3) {
+           _saomadata.type = 3
+           localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
             this.$router.push({
-          	name: 'inspectInfo',
-          	query: {
-          		type: 4,
-          		cangid: this.cangid,
-          		id: this.toPageData.qualityInspectionManagement.id,
-          		warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-          		count: 0,
-          		warehouseNo: 0,
-          		allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
-          		status:this.toPageData.status
-          	},
+          	name: 'inspectionManagementNew'
           })
         } else if (type === 4) {
+           _saomadata.typeNo = 1
+           _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1
+           _saomadata.monitorUrl2 = this.toPageData.warehouseBaseInfo.monitorUrl2
+           _saomadata.allowEdit = this.toPageData.warehouseBaseInfo.allowEdit
+            localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
              this.$router.push({
-            name: 'weightCheck',
-            query: {
-              tpyeNo: 1,
-              id: this.toPageData.id,
-              number: this.toPageData.number,
-              binNumber: this.toPageData.binNumber,
-              customer: this.toPageData.customer,
-              storageNumber: this.toPageData.storageNumber,
-              carNumber: this.toPageData.carNumber,
-              boxNo: this.toPageData.qualityInspectionManagement.boxNo,
-              boxNoOther: this.toPageData.qualityInspectionManagement.boxNoOther,
-              titleNo: this.toPageData.qualityInspectionManagement.titleNo,
-              titleNoOther: this.toPageData.qualityInspectionManagement.titleNoOther,
-              goodsName: this.toPageData.goodsName,
-              grossWeight: this.toPageData.grossWeight,
-              tare: this.toPageData.tare,
-              netWeight: this.toPageData.netWeight,
-              relationId: this.toPageData.relationId,
-              warehouseId: this.cangid,
-              monitorUrl1: this.toPageData.warehouseBaseInfo.monitorUrl1,
-              monitorUrl2: this.toPageData.warehouseBaseInfo.monitorUrl2,
-              allowEdit: this.toPageData.warehouseBaseInfo.allowEdit,
-              cangid: this.cangid,
-              warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-              paramType: this.toPageData.qualityInspectionManagement.paramType,
-              customerNumberCard: this.toPageData.customerNumberCard,
-              automaticWeightAcquisition: this.toPageData.automaticWeightAcquisition
-            },
+            name: 'newWeighingManagement'
           })
         } else if (type === 5) {
              localStorage.setItem('paymentManagementReturn', false)
@@ -702,35 +661,13 @@
             },
           })
         } else if (type === 6) {
+            _saomadata.typeNo = 2
+           _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1
+           _saomadata.monitorUrl2 = this.toPageData.warehouseBaseInfo.monitorUrl2
+           _saomadata.allowEdit = this.toPageData.warehouseBaseInfo.allowEdit
+            localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
            this.$router.push({
-            name: 'weightCheck',
-            query: {
-              tpyeNo: 2,
-              id: this.toPageData.id,
-              number: this.toPageData.number,
-              binNumber: this.toPageData.binNumber,
-              customer: this.toPageData.customer,
-              storageNumber: this.toPageData.storageNumber,
-              carNumber: this.toPageData.carNumber,
-              boxNo: this.toPageData.qualityInspectionManagement.boxNo,
-              boxNoOther: this.toPageData.qualityInspectionManagement.boxNoOther,
-              titleNo: this.toPageData.qualityInspectionManagement.titleNo,
-              titleNoOther: this.toPageData.qualityInspectionManagement.titleNoOther,
-              goodsName: this.toPageData.goodsName,
-              grossWeight: this.toPageData.grossWeight,
-              tare: this.toPageData.tare,
-              netWeight: this.toPageData.netWeight,
-              relationId: this.toPageData.relationId,
-              warehouseId: this.cangid,
-              monitorUrl1: this.toPageData.warehouseBaseInfo.monitorUrl1,
-              monitorUrl2: this.toPageData.warehouseBaseInfo.monitorUrl2,
-              allowEdit: this.toPageData.warehouseBaseInfo.allowEdit,
-              cangid: this.cangid,
-              warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-              paramType: this.toPageData.qualityInspectionManagement.paramType,
-              customerNumberCard: this.toPageData.customerNumberCard,
-              automaticWeightAcquisition: this.toPageData.automaticWeightAcquisition
-            },
+            name: 'newWeighingManagement',
           })
         }
         this.smAlert = false

+ 1 - 1
src/views/houseSelfCollect/component/routers/route.js

@@ -103,7 +103,7 @@ const houseSelfCollectRouter = {
       path: 'inspectionManagement',
       component: () =>
         import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagementNew'),
-      name: 'inspectionManagement',
+      name: 'inspectionManagementNew',
       meta: {
         title: 'inspectionManagement',
         shortcutEntrance: 'houseSelfCollect',

+ 27 - 9
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -149,9 +149,9 @@
                   </el-select>
                 </ws-form-item>
                 <ws-form-item label="车牌号" span="1" prop="carNo">
-                  <ws-input :disabled="disabled2" v-if="options2.length == 0" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
+                  <ws-input :disabled="disabled2" v-if="options2.length == 0 || serviceManagementType==3" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
                   size="small" />
-                <el-select :disabled="disabled2" v-if="carstatus && options2.length > 0" filterable clearable v-model="deptBudgetList.carNoCopy" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                <el-select :disabled="disabled2" v-if="carstatus && options2.length > 0 && serviceManagementType!=3" filterable clearable v-model="deptBudgetList.carNoCopy" placeholder="请选择车牌号" class="typeselect" @change="carChange">
                   <el-option v-for="(item,index) in options2" :key="index"
                     :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index" />
                 </el-select>
@@ -454,13 +454,31 @@
         // searchKeyWord:''
       }
     },
-    mounted() {
-      this.selectWarehouse()
-      let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
-      _WarehouseName = JSON.parse(_WarehouseName)
-      if (_WarehouseName) {
-        this.warehouseNameChange(_WarehouseName.value)
-      }
+    mounted(){
+       this.selectWarehouse()
+       var _saomaData = JSON.parse(localStorage.getItem("saoma_data"))
+       if(_saomaData){//缓存中有值,证明扫码进来的
+         this.warehouseName = _saomaData.warehouseName
+         this.warehouseNameChange(this.warehouseName)
+          let ids={}
+         ids.id = _saomaData.id
+         this.listclick(ids)
+          if(_saomaData.type == 1){
+         this.statusTypetext = "初检"
+       }else if(_saomaData.type == 2){
+         this.statusTypetext = "确认"
+       }else if(_saomaData.type == 3){
+         this.statusTypetext = "复检"
+       }
+       this.serviceManagementType = _saomaData.managementType
+         localStorage.removeItem("saoma_data");//第一次进来结束后清除缓存
+       }else{
+          let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
+          _WarehouseName = JSON.parse(_WarehouseName)
+          if (_WarehouseName) {
+            this.warehouseNameChange(_WarehouseName.value)
+          }
+       }
     },
     
     methods: {

+ 23 - 8
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -315,7 +315,8 @@
         inWarehouseType: 1, //入库类型
         mListTotal: [],
         pListTotal: [],
-        submitAllow:false
+        submitAllow:false,
+        id:"",
       }
     },
     activated() {
@@ -332,6 +333,7 @@
       // }
       //  if (this.$route.query.automaticWeightAcquisition == '1') {
       this.isShowBalance = true
+       var _saomaData = JSON.parse(localStorage.getItem("saoma_data"))//判断是否扫码进来的
       // }
       //仓库
       selectWarehouseSelf({
@@ -340,7 +342,17 @@
         .toPromise()
         .then((response) => {
           this.warehouseList = response
-          if (localStorage.getItem('ck')) {
+          if(_saomaData){//缓存中有值,证明扫码进来的
+            this.warehouseName = _saomaData.warehouseName
+              this.cangid = _saomaData.cangid
+              this.monitorUrl1 = _saomaData.monitorUrl1
+              this.monitorUrl2 = _saomaData.monitorUrl2
+              this.allowEdit = _saomaData.allowEdit
+              this.id = _saomaData.id
+              this.tpyeNo = _saomaData.typeNo
+              this.inWarehouseType = _saomaData.managementType
+              localStorage.removeItem("saoma_data");//第一次进来结束后清除缓存
+          }else if (localStorage.getItem('ck')) {
             this.warehouseName = localStorage.getItem('ck')
             for (var i = 0; i < response.length; i++) {
               if (this.warehouseName == this.warehouseList[i].warehouseName) {
@@ -363,16 +375,17 @@
             this.disabled = true
           } else if (this.allowEdit == 1) {
             this.disabled = false
+          }
+              if (this.tpyeNo == 1) {
+            this.information = '毛重'
+            this.weighingList.tare = 0
+          } else if (this.tpyeNo == 2) {
+            this.information = '皮重'
           }
           this.getList()
         })
 
-      if (this.tpyeNo == 1) {
-        this.information = '毛重'
-        this.weighingList.tare = 0
-      } else if (this.tpyeNo == 2) {
-        this.information = '皮重'
-      }
+      
     },
     methods: {
       warehouseNameChange() {
@@ -1041,6 +1054,7 @@ this.deptBudgetTotal = this.carList.length
                               title: '成功',
                               message: '保存成功',
                             })
+                            this.getList()
                             //贸易入库需要走再入库接口
                             if(this.inWarehouseType == 1){
                               warehousing.grossWeight /= 1000
@@ -1078,6 +1092,7 @@ this.deptBudgetTotal = this.carList.length
                     title: '成功',
                     message: '保存成功',
                   })
+                  this.getList()
                   //贸易入库需要再走入库接口
                    if(this.inWarehouseType == 1){
                           warehousing.statusFlag = 3