Browse Source

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

mxx 3 years ago
parent
commit
c70656baad

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -87,4 +87,6 @@ export const API_POST_INVOICING = '/paymentManagement/api/readXmlManagement'
 export const API_POST_EXPORT = '/paymentManagement/export'
 // 车牌号
 export const API_GET_SHIPPINGINFOFORMATION = '/shippingInformation/selectShippingInformation'
+//确认质检信息
+export const API_POST_INSPECTIONCHECK = '/qualityInspectionManagement/api/editQualityInspection'
 

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

@@ -45,7 +45,8 @@ import {
   API_GET_INSPECT_GETJURISDICTION,
   API_POST_INVOICING,
   API_POST_EXPORT,
-  API_GET_SHIPPINGINFOFORMATION
+  API_GET_SHIPPINGINFOFORMATION,
+  API_POST_INSPECTIONCHECK
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -136,4 +137,6 @@ export const invoicing  = appRx.post(API_POST_INVOICING, errorCatcher, errorHand
 
 export const export1 = appRx.post(API_POST_EXPORT)
 // 车牌号
-export const getshippinginfo  = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
+export const getshippinginfo  = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
+// 确认初检信息
+export const postCheck  = appRx.post(API_POST_INSPECTIONCHECK, errorCatcher, errorHandle, filter)

+ 63 - 24
src/views/houseSelfCollect/inspectInfo.vue

@@ -62,8 +62,7 @@
                 size="small" />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
-              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName"
-                @change="waterContentChange">
+              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName" @change="waterContentChange">
                 <ws-option v-for="item in goodNameList" :key="item.goodsName" :label="item.goodsName"
                   :value="item.goodsName" />
               </ws-select>
@@ -148,11 +147,12 @@
             </ws-form-item>
           </ws-info-table>
           <div class="but">
-            <el-button @click="cancel" v-if="this.types != 2" type="primary">取消</el-button>
-            <el-button @click="print" v-if="this.types ==3 || this.types ==4 ||this.types ==1" type="primary">保存
+            <el-button @click="cancel" v-if="types != 2" type="primary">取消</el-button>
+               <el-button @click="checkOk" v-if="types ==3 || types == 4" type="primary">确认初检信息</el-button>
+            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存
             </el-button>
-            <el-button @click="print" v-if="this.types ==5 " type="primary">确认并打印</el-button>
-            <el-button @click="cancel" v-if="this.types == 2" type="primary">关闭</el-button>
+            <el-button @click="print" v-if="types == 5 || types==4" type="primary">确认并打印</el-button>
+            <el-button @click="cancel" v-if="types == 2" type="primary">关闭</el-button>
           </div>
         </div>
       </ws-form>
@@ -180,7 +180,8 @@
     getamount,
     getCount,
     getDryGrainPrice,
-    getshippinginfo
+    getshippinginfo,
+    postCheck
   } from '@/model/houseSelfCollect/index'
   import {
     packList
@@ -280,11 +281,36 @@
       } else {
         this.disabled1 = false
         this.disabled = false
+        this.disabledName = false
       }
       this.calculation()
       this.getList(this.id)
     },
     methods: {
+      //确认初检信息
+      checkOk(){
+        this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              postCheck({id:this.id,flag:2})
+                .toPromise()
+                .then((response) => {
+                  debugger
+                  if(response == "OK"){
+                      this.$message.success('提交成功')
+                        this.$router.push({path: 'inspectionManagement' })
+                  }else{
+                    this.$message.error('提交失败')
+                  }
+                }).catch(() => {
+              return false
+            })
+        })
+
+      },
       printSmall() {
         window.open('../../../static/inspection.html?type=1&dataList=' + JSON.stringify(this.inspect))
       },
@@ -431,9 +457,18 @@
                 .toPromise()
                 .then((response) => {
                   this.$message.success('修改成功')
-                  this.$router.push({
-                    path: 'inspectionManagement'
-                  })
+                  
+                  // this.$router.push({
+                  //   path: 'inspectionManagement'
+                  // })
+                   getinspectLook({
+                      id: this.inspect.id
+                    })
+                    .toPromise()
+                    .then((response) => {
+                      this.inspect = response
+                    })
+                  this.isShowPrint = true
                 })
             })
             .catch(() => {
@@ -489,20 +524,21 @@
           })
           return
         }
-        if (!this.inspect.storageTagNo) {
-          this.$message({
-            message: '囤位号不能为空',
-            type: 'warning',
-          })
-          return
-        }
-
-        if (this.inspect.storageTagNo.length > 10) {
-          this.$message({
-            message: '囤位号不超过10个字符',
-            type: 'warning',
-          })
-          return
+        // if (!this.inspect.storageTagNo) {
+        //   this.$message({
+        //     message: '囤位号不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if(this.inspect.storageTagNo){
+            if (this.inspect.storageTagNo.length > 10) {
+            this.$message({
+              message: '囤位号不超过10个字符',
+              type: 'warning',
+            })
+            return
+          }
         }
         if (!this.inspect.carNumber) {
           this.$message({
@@ -661,6 +697,7 @@
           })
           return
         }
+        if( this.information != "编辑复检"){
         if (!this.inspect.waterContent) {
           this.$message({
             message: '水分不能为空',
@@ -683,6 +720,8 @@
           })
           return
         }
+        }
+        
         if (!this.inspect.mildewGrain) {
           this.$message({
             message: '霉变粒不能为空',

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

@@ -411,8 +411,8 @@
         this.getList()
       },
       isConfirmQuality(val) {
-        if (val.qualityInspectionManagement.confirm == '1'&&val.qualityInspectionManagement.warehouseName=='哈尔滨依兰库') return true;
-        return false
+        if (val.qualityInspectionManagement.confirm == '1'&&val.qualityInspectionManagement.warehouseName=='哈尔滨依兰库') return false;
+        return true
       },
       weightCheck(row, num) {
         console.log(this.cangid)

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

@@ -977,8 +977,13 @@
   }
 
   /deep/.el-table .el-table__header .cell,
-  .el-table .el-table__body .cell {
+  /deep/.el-table .el-table__body .cell {
     text-align: center;
+    font-size: 16px;
+    // background: #f6f7fc;
+  }
+  /deep/.el-table td{
+   background: #e7e8ef; 
   }
 
   /deep/.el-table--enable-row-transition .el-table__body td {

+ 4 - 4
src/views/tradeServicesManagement/inOutRecord.vue

@@ -77,9 +77,9 @@
       </el-table-column>
       <el-table-column prop="goodsName" label="货名"> </el-table-column>
       <el-table-column prop="grossWeight" label="毛重(吨)"> 
-        <template slot-scope="scope">{{scope.grossWeight.toF}}</template>
+        <template slot-scope="scope">{{scope.grossWeight}}</template>
       </el-table-column>
-      <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+      <el-table-column prop="tare" label="皮重(吨)">  </el-table-column>
       <el-table-column prop="weight" label="扣重(吨)"> </el-table-column>
       <el-table-column prop="netWeight" label="净重(吨)"> </el-table-column>
       <el-table-column prop="inOutType" label="类型"> </el-table-column>
@@ -93,8 +93,7 @@
           <el-button
             @click="handleLook(2, scope.row)"
             v-if="scope.row.inOutType == '收购入库'"
-            >查看</el-button
-          >
+            >查看</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="inOutDate" label="出入库日期"> </el-table-column>
@@ -452,6 +451,7 @@ export default {
     }
   },
   activated() {
+    localStorage.setItem("pageUp","1")
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName

+ 23 - 10
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -48,7 +48,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="goodsName" label="品级">
+      <el-form-item prop="grade" label="品级">
         <el-select v-model="deptBudgetList.grade" placeholder="请选择品级">
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
@@ -128,7 +128,8 @@
           renown: '',
           grade: '',
           bank: '',
-          three: ''
+          three: '',
+          goodsName:"",
         },
         size: 10,
         compId: '',
@@ -149,8 +150,12 @@
     activated() {
       this.compId = localStorage.getItem('ws-pf_compId')
       this.deptBudgetList.compId = this.compId
+      let i = localStorage.getItem("pageUp")
+      if(i != 1){
       this.getcompList()
       this.getList()
+      }
+      
     },
     methods: {
       inputChange(e) {
@@ -208,18 +213,24 @@
                  this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].baseId : ''
               }
               if(response[0].goodsNameInfos){
+                this.goodsList = []
                 for(let i = 0 ; i < response[0].goodsNameInfos.length ; i++){
                   if(response[0].goodsNameInfos[i].binNumber ==  this.deptBudgetList.warehouseNo ){
                     this.goodsList.push(response[0].goodsNameInfos[i])
                   }
                 }
-                console.log(this.goodsList)
-            // this.goodsList = response[0].goodsNameInfos
-            this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].storage : ''
-            this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useStorage
-            // this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsName : ''
-            this.deptBudgetList.goodsName = this.goodsList[0].goodsName
-            this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
+                if(this.goodsList.length > 0 ){
+                  this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].storage : ''
+                  this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useStorage
+                  this.deptBudgetList.goodsName = this.goodsList[0].goodsName
+                  this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
+                }else {
+                    this.deptBudgetList.nowWeight = ""
+                  this.deptBudgetList.useWeight = ""
+                  this.deptBudgetList.goodsName =""
+                  this.deptBudgetList.goodsNameKey = ""
+                }
+            
               }
               
             this.deptBudgetList.warehouseId = response[0].id
@@ -235,7 +246,7 @@
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
             this.deptBudgetList.nowWeight = _data[i].storage
-            this.deptBudgetList.useWeight =  _data[i].useStorag
+            this.deptBudgetList.useWeight =  _data[i].useStorage                                       
             return
           }
         }
@@ -400,6 +411,7 @@
           }).then(() => {
             addList(this.deptBudgetList).toPromise().then((response) => {
               // this.tableData = response.records
+              localStorage.removeItem("pageUp")
               this.$message.success('提交成功')
               this.$router.push({
                 path: 'warehouseReceiptRegulation'
@@ -423,6 +435,7 @@
           })
       },
       cancel() {
+        localStorage.removeItem("pageUp")
         this.$router.push({
           path: 'warehouseReceiptRegulation'
         })

+ 12 - 7
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -214,6 +214,7 @@ import {
     selectWarehouseSelf,
   } from '@/model/houseSelfCollect/index'
 import WsUpload from '@/components/WsUpload'
+import { lastEachIterate } from 'xe-utils/methods'
 export default {
   components: {
     WsUpload,
@@ -231,15 +232,15 @@ export default {
         },
       compOptionList:[],
       taskhistories:[],
-        warehouseList: [],
-        cwNumberList:[],
-        goodsList:[],
-        bankList:[],
-        threeList:[],
+      warehouseList: [],
+      cwNumberList:[],
+      goodsList:[],
+      bankList:[],
+      threeList:[],
     }
   },
   activated() {
-    
+     localStorage.removeItem("pageUp")//删除出入库跳返回时数据刷新的问题
     this.getList()
     this.getcompList()
     this.getWarehouse()
@@ -296,7 +297,7 @@ export default {
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
             this.deptBudgetList.nowWeight = _data[i].storage
-             this.deptBudgetList.useWeight =  _data[i].useStorage
+            this.deptBudgetList.useWeight =  _data[i].useStorage
              return
           }
         }
@@ -342,8 +343,12 @@ export default {
         }
         if(this.goodsList.length == 0){
           this.deptBudgetList.goodsName = ""
+             this.deptBudgetList.nowWeight = ''
+            this.deptBudgetList.useWeight = ""
         }else{
            this.deptBudgetList.goodsName = this.goodsList[0].goodsName
+            this.deptBudgetList.nowWeight = this.goodsList[0].storage
+            this.deptBudgetList.useWeight = this.goodsList[0].useStorage
         }
       },
     getcompList(){

+ 1 - 0
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -305,6 +305,7 @@ export default {
     }
   },
   activated() {
+    localStorage.removeItem("pageUp")
     this.getList(this.$route.query.id)
     // this.getcompList()
   },

+ 1 - 0
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -108,6 +108,7 @@
       }
     },
     activated() {
+        localStorage.removeItem("pageUp")//删除出入库跳返回时数据刷新的问题
       // debugger
       // let i = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
       // console.log(i)