Przeglądaj źródła

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

zhongtianhaoyuan 3 lat temu
rodzic
commit
9b323f6dc1

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

@@ -109,7 +109,7 @@ const houseSelfCollectRouter = {
         shortcutEntrance: 'houseSelfCollect',
         module: 'acquisitionManagement.acquisitionQuality.view',
         permissicon: [],
-        // keepAlive:true
+        keepAlive:true
       }
     },
     // // 检斤管理

+ 235 - 39
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -9,7 +9,7 @@
       <template slot="right">
         <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
           style="margin: 0 10px">
-          <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+          <ws-option v-for="item in warehouseList" :key="'cangku'+item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
         <!-- <el-checkbox @change='checkchange' v-model="checked">默认</el-checkbox> -->
@@ -51,14 +51,14 @@
               <ws-info-table>
                 <ws-form-item v-if='serviceManagementType==1' label="任务编号" span="1" prop="inOutTaskNo">
                   <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
-                    <el-option v-for="item in taskNolist" :key="item.inOutTaskNo" :label="item.inOutTaskNo" :value="item.inOutTaskNo" />
+                    <el-option v-for="item in taskNolist" :key="'renwu'+item.inOutTaskNo" :label="item.inOutTaskNo" :value="item.inOutTaskNo" />
                   </el-select>
                 </ws-form-item>
                 <ws-form-item v-if='serviceManagementType==3' label="业务编号" span="1" prop="qualityNo">
                   <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
                 </ws-form-item>
                 <ws-form-item label="仓位号" span="1" prop="inOutTaskNo">
-                  <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.binNumber" placeholder="请选择仓位号" class="typeselect" @change="contractNoChange">
+                  <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.binNumber" placeholder="请选择仓位号" class="typeselect" @change="binNumberChange">
                     <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber" :value="item.binNumber" />
                   </el-select>
                 </ws-form-item>
@@ -68,7 +68,7 @@
                 <ws-form-item v-if='serviceManagementType==3' label="客户" span="1" prop="customerName">
                   <el-select v-model="deptBudgetList.customerName" clearable filterable placeholder="请选择" class="typeselect"
                     @change="customerChange" :disabled="disabled1">
-                    <el-option v-for="item in customerList" :key="item.valueKey" :label="item.value" :value="item.value" />
+                    <el-option v-for="item in customerList" :key="'kehu'+item.valueKey" :label="item.value" :value="item.value" />
                   </el-select>
                 </ws-form-item>
                 <ws-form-item label="囤位号" span="1" prop="storageTagNo">
@@ -99,7 +99,7 @@
                 <ws-form-item v-if='serviceManagementType==3' label="货名" span="1" prop="inOutTaskNo">
                   <el-select v-model="deptBudgetList.goodsName" clearable filterable placeholder="请选择" class="typeselect"
                     @change="goodsNameChange" :disabled="goodsdisabled">
-                    <el-option v-for="item in goodnameList" :key="item.valueKey" :label="item.goodsName" :value="item.goodsName" />
+                    <el-option v-for="item in goodnameList" :key="'huoming'+item.valueKey" :label="item.goodsName" :value="item.goodsName" />
                   </el-select>
                 </ws-form-item>
                 <ws-form-item v-if='statusTypetext!="初检"&&serviceManagementType==1' label="经办人" span="1" prop="agent">
@@ -115,7 +115,7 @@
                 </ws-form-item>
                 <ws-form-item v-if='serviceManagementType==3' label="类型" span="1" prop="type">
                   <ws-select v-model="deptBudgetList.type" disabled>
-                    <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                    <ws-option v-for="item in typeList" :key="'leixin'+item" :label="item" :value="item" />
                   </ws-select>
                 </ws-form-item>
                 <ws-form-item v-if='statusTypetext=="初检"&&serviceManagementType==1' label="运费(元/吨)" span="1" prop="freight">
@@ -128,7 +128,7 @@
                 </ws-form-item>
                 <ws-form-item v-if='serviceManagementType==1' label="入库类型" span="1">
                   <ws-select v-model="deptBudgetList.inOutType" placeholder class="typeselect" @change="selectstorageType" :disabled="isSelectType">
-                    <ws-option v-for="item in storageType" :key="item.constKey" :label="item.constValue" :value="item.constValue" />
+                    <ws-option v-for="item in storageType" :key="'rklx'+item.constKey" :label="item.constValue" :value="item.constValue" />
                   </ws-select>
                 </ws-form-item>
                 <ws-form-item v-if='serviceManagementType==1' label="入库日期" span="1" prop="inOutDate" class="deliverydate">
@@ -136,7 +136,7 @@
                 </ws-form-item>
                 <ws-form-item label="运输方式" span="1" prop="outType">
                   <el-select v-if='serviceManagementType==1' :disabled='recheck' v-model="deptBudgetList.outType" placeholder="请选择运输方式">
-                    <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                    <el-option v-for="item in multiSelector" :key="'ysfs'+item.value" :label="item.name" :value="item.name" />
                   </el-select>
                   <el-select v-if='serviceManagementType==3' @change='outTypechange' :disabled='recheck' v-model="outType" placeholder="请选择运输方式">
                     <el-option v-for="item in multiSelector1" :key="item.id" :label="item.type+'('+item.contractNo+' '+item.seller+')'" :value="item.id" />
@@ -454,7 +454,7 @@
         // searchKeyWord:''
       }
     },
-    mounted(){
+    activated(){
        this.selectWarehouse()
        var _saomaData = JSON.parse(localStorage.getItem("saoma_data"))
        if(_saomaData){//缓存中有值,证明扫码进来的
@@ -482,6 +482,14 @@
     },
     
     methods: {
+      binNumberChange(e){
+        for (let i = 0; i < this.positionInfos.length; i++) {
+          if(this.positionInfos[i].binNumber==e){
+            this.deptBudgetList.positionId=this.positionInfos[i].id
+          }
+          
+        }
+      },
       goodsNameChange(e){
         for (let q = 0; q < this.goodnameList.length; q++) {
             if(this.goodnameList[q].contractNo=e){
@@ -492,7 +500,7 @@
           this.waterContentChange()
       },
       outTypechange(e){
-        console.log(e)
+        // console.log(e)
         if(e!='他运'){
           for (let i = 0; i < this.multiSelector1.length; i++) {
             this.deptBudgetList.contractNo=this.multiSelector1[i].contractNo
@@ -707,9 +715,60 @@
                   this.types = ''
                   // this.inspect = [] 
                   this.isShowPrint = false
-                  this.$router.push({
-                    path: 'inspectionManagement'
-                  })
+                  this.deptBudgetList={
+                    type: '潮粮',
+                    freight: 0,
+                    cost: '',
+                    addressUrl: '',
+                    tidalGrainPrice: 0,
+                    buckleWeightRatio: 0,
+                    natureOfGrainPurchase: '贸易粮',
+                    buckleMiscellaneous: 0,
+                    paramType: 1,
+                    warehouseInOutDetail: {
+                      grade:'',
+                      reGrade:'',
+                      imperfectGrain:'',
+                      reImperfectGrain:'',
+                      impurity:'',
+                      reImpurity:'',
+                      jiaorenli:'',
+                      reJiaorenli:'',
+                      bulkDensity:'',
+                      reBulkDensity:'',
+                      mildewGrain:'',
+                      reMildewGrain:'',
+                    },
+                    disablednotarize:false,
+                    deductionAmount: 0,
+                    deductionWeight: 0,
+                    grossWeight: 0,
+                    tare: 0,
+                    grade:'',
+                    inOutDate: '',
+                    netWeight:0,
+                    pureWeight:0,
+                    deductionWeight:0,
+                    waterContent:'',
+                    reWaterContent:'',
+                    reGrade:'',
+                    imperfectGrain:'',
+                    reImperfectGrain:'',
+                    impurity:'',
+                    reImpurity:'',
+                    jiaorenli:'',
+                    reJiaorenli:'',
+                    bulkDensity:'',
+                    reBulkDensity:'',
+                    reMemo:'',
+                    storageTagNo:'',
+                    mildewGrain:'',
+                    reMildewGrain:'',
+                    boxNo:'',
+                    boxNoOther:'',
+                    titleNo:'',
+                    titleNoOther:'',
+                  }
                 })
             })
             this.dialogTableVisible = true;
@@ -1547,6 +1606,7 @@
           .then(() => {
             this.$refs.deptBudgetList.validate((valid) => {
               if (valid) {
+                this.deptBudgetList.baseId=this.cangid
                 this.deptBudgetList.carNumber=this.deptBudgetList.carNo
                 this.deptBudgetList.warehouseName=this.warehouseName
                 this.deptBudgetList.serviceManagementType=this.serviceManagementType
@@ -1557,12 +1617,13 @@
                 this.deptBudgetList.pcFlag = 1
                 this.deptBudgetList.statusFlag = 1
                 if(this.statusTypetext=='初检'){
-                  inspectAdd(this.deptBudgetList)
+                 addstorageputList(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
-                    addstorageputList(this.deptBudgetList)
+                    this.deptBudgetList.warehouseInOutId=response
+                     inspectAdd(this.deptBudgetList)
                     .toPromise()
-                    .then((response) => {
+                    .then((response1) => {
                       if (this.reader) {
                         this.reader.cancel()
                       }
@@ -1571,29 +1632,29 @@
                       // this.$router.push({
                       //   path: 'warehouseManagementList',
                       // })
-                    })
-                    .catch((response) => {
-                    })
-                    
-                    // this.$message.success('保存成功')
-                    getinspectLook({
-                        id: response
+                       getinspectLook({
+                        id: response1
                       })
                       .toPromise()
-                      .then((response) => {
+                      .then((response2) => {
                       //  let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid 
                       //       getQRcode({printString}).toPromise()
                       //             .then((res) => {
                               this.isShowPrint = true
-                              this.printData = response
+                              this.printData = response2
                               // this.printData.qrCodeUrl = res
                               // })
-                        this.deptBudgetList = response
+                        this.deptBudgetList = response2
                         if (response.compName == '黑龙江秋收有限公司') {
                     		 this.deptBudgetList.compName = '黑龙江中天昊元贸易有限公司'
                     			}
                       })
-                    this.isShowPrint = true
+                    })
+                    .catch((response) => {
+                    })
+                    
+                    // this.$message.success('保存成功')
+                   
                     //打印
                     // this.$router.go(-1)
                   })
@@ -1609,6 +1670,60 @@
                           this.reader.cancel()
                         }
                         this.$message.success('修改成功')
+                        this.deptBudgetList={
+                          type: '潮粮',
+                          freight: 0,
+                          cost: '',
+                          addressUrl: '',
+                          tidalGrainPrice: 0,
+                          buckleWeightRatio: 0,
+                          natureOfGrainPurchase: '贸易粮',
+                          buckleMiscellaneous: 0,
+                          paramType: 1,
+                          warehouseInOutDetail: {
+                            grade:'',
+                            reGrade:'',
+                            imperfectGrain:'',
+                            reImperfectGrain:'',
+                            impurity:'',
+                            reImpurity:'',
+                            jiaorenli:'',
+                            reJiaorenli:'',
+                            bulkDensity:'',
+                            reBulkDensity:'',
+                            mildewGrain:'',
+                            reMildewGrain:'',
+                          },
+                          disablednotarize:false,
+                          deductionAmount: 0,
+                          deductionWeight: 0,
+                          grossWeight: 0,
+                          tare: 0,
+                          grade:'',
+                          inOutDate: '',
+                          netWeight:0,
+                          pureWeight:0,
+                          deductionWeight:0,
+                          waterContent:'',
+                          reWaterContent:'',
+                          reGrade:'',
+                          imperfectGrain:'',
+                          reImperfectGrain:'',
+                          impurity:'',
+                          reImpurity:'',
+                          jiaorenli:'',
+                          reJiaorenli:'',
+                          bulkDensity:'',
+                          reBulkDensity:'',
+                          reMemo:'',
+                          storageTagNo:'',
+                          mildewGrain:'',
+                          reMildewGrain:'',
+                          boxNo:'',
+                          boxNoOther:'',
+                          titleNo:'',
+                          titleNoOther:'',
+                        }
                         this.getList()
                       })
                       .catch((response) => {
@@ -1626,6 +1741,60 @@
                         this.reader.cancel()
                       }
                       this.$message.success('修改成功')
+                      this.deptBudgetList={
+                        type: '潮粮',
+                        freight: 0,
+                        cost: '',
+                        addressUrl: '',
+                        tidalGrainPrice: 0,
+                        buckleWeightRatio: 0,
+                        natureOfGrainPurchase: '贸易粮',
+                        buckleMiscellaneous: 0,
+                        paramType: 1,
+                        warehouseInOutDetail: {
+                          grade:'',
+                          reGrade:'',
+                          imperfectGrain:'',
+                          reImperfectGrain:'',
+                          impurity:'',
+                          reImpurity:'',
+                          jiaorenli:'',
+                          reJiaorenli:'',
+                          bulkDensity:'',
+                          reBulkDensity:'',
+                          mildewGrain:'',
+                          reMildewGrain:'',
+                        },
+                        disablednotarize:false,
+                        deductionAmount: 0,
+                        deductionWeight: 0,
+                        grossWeight: 0,
+                        tare: 0,
+                        grade:'',
+                        inOutDate: '',
+                        netWeight:0,
+                        pureWeight:0,
+                        deductionWeight:0,
+                        waterContent:'',
+                        reWaterContent:'',
+                        reGrade:'',
+                        imperfectGrain:'',
+                        reImperfectGrain:'',
+                        impurity:'',
+                        reImpurity:'',
+                        jiaorenli:'',
+                        reJiaorenli:'',
+                        bulkDensity:'',
+                        reBulkDensity:'',
+                        reMemo:'',
+                        storageTagNo:'',
+                        mildewGrain:'',
+                        reMildewGrain:'',
+                        boxNo:'',
+                        boxNoOther:'',
+                        titleNo:'',
+                        titleNoOther:'',
+                      }
                       this.getList()
                     })
                     .catch((response) => {
@@ -1731,9 +1900,7 @@
       },
       closePrint() {
         this.isShowPrint = false
-        this.$router.push({
-          path: 'inspectionManagement'
-        })
+        
       },
       warehousetypechange(status){
         this.serviceManagementType=status
@@ -1867,9 +2034,36 @@
             this.WAREHOUSE[1].payname = this.warehouseList[i].value
             this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
             localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
+            getReceiptTaskNo({
+              flag: 2,
+              warehouseName: this.warehouseName,
+              agentKey: localStorage.getItem('ws-pf_userId'),
+            })
+            .toPromise()
+            .then((response) => {
+              console.log(response)
+              this.taskNolist = response
+            })
+           
+              this.getList()
           }
         }
+        for (let i = 0; i < this.warehouseList1.length; i++) {
+          if (this.warehouseList1[i].warehouseName == e) {
+            this.positionInfos=this.warehouseList1[i].positionInfos
+          }
+        }
+        console.log(this.positionInfos)
         if(this.warehouseName){
+          getReceiptTaskNo({
+              flag: 2,
+              warehouseName: this.warehouseName,
+              agentKey: localStorage.getItem('ws-pf_userId'),
+            })
+            .toPromise()
+            .then((response) => {
+              this.taskNolist = response
+            })
           this.getList()
         }
       },
@@ -1891,20 +2085,22 @@
       getList() {
         // 类型
         this.storageType = []
+        console.log(this.storageType)
           pullDown({
               constId: 'CON5',
             })
             .toPromise()
             .then((response) => {
-              // this.storageType = response
-              for (let i = 0; i < response.length; i++) {
-                if (
-                  response[i].constValue == '移库入库' ||
-                  response[i].constValue == '退库'
-                ) {
-                  this.storageType.push(response[i])
-                }
-              }
+              this.storageType = response
+              // for (let i = 0; i < response.length; i++) {
+              //   if (
+              //     response[i].constValue == '移库入库' ||
+              //     response[i].constValue == '退库'
+              //   ) {
+              //     this.storageType.push(response[i])
+              //     console.log(this.storageType)
+              //   }
+              // }
             })
           getinspectLookGoods({
             warehouseId: this.cangid