gjy 2 år sedan
förälder
incheckning
f0ed79eeda

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

@@ -126,4 +126,6 @@ export const API_GET_BASEID ='/qualityInspectionManagement/selectBaseId'
 export const API_POST_TASK_NO = `/weighingManagement/api/changeTaskNo`
 // 丹东港生成入库单
 export const API_POST_DANDONG_ORDER = `/paymentManagement/api/generateOrder`
+// 检查客户送粮量
+export const API_GETQUALITY = '/qualityInspectionManagement/getQualityInspectionManagementMap'
 

+ 4 - 1
src/model/houseSelfCollect/index.js

@@ -65,7 +65,8 @@ import {
   API_POST_DELETE,
   API_GET_CONTRACT,
   API_SPONSOR_WITHDRAW,
-  API_GET_BASEID
+  API_GET_BASEID,
+  API_GETQUALITY
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -197,3 +198,5 @@ export const getBaseId = appRx.get(API_GET_BASEID, errorCatcher, errorHandle, fi
 export const changeTaskNo = appRx.post(API_POST_TASK_NO, errorCatcher, errorHandle, filter)
 // 丹东港生成入库单
 export const dandongOrder = appRx.post(API_POST_DANDONG_ORDER, errorCatcher, errorHandle, filter)
+// 检查客户送粮量
+export const getquality = appRx.get(API_GETQUALITY, errorCatcher, errorHandle, filter)

+ 47 - 6
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -182,10 +182,16 @@
                       :value="item.value" />
                   </el-select>
                 </ws-form-item>
+                
                 <ws-form-item label="封号-2" span="1" prop="titleNoOther"
                   v-if="serviceManagementType == 3 && qyJurisdiction&&statusTypetext == '初检'||serviceManagementType == 3 && statusTypetext != '初检'">
                   <ws-input :disabled='recheck' v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
                     size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction' label="交易量" span="1"
+                  prop="customerName">
+                  <el-input :class="redstatus?'volumeofbusiness':''" disabled  v-model="deptBudgetList.volumeofbusiness" placeholder="自动获取,不可编辑" maxlength="20"
+                    size="small" />
                 </ws-form-item>
                  <ws-form-item v-if='serviceManagementType == 3 && zjJurisdiction && statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="囤位号(选填)" span="1"
                   prop="storageTagNo">
@@ -551,7 +557,8 @@ import {
   getinspectLookGoods,
   getshippinginfo,
   postCheck,
-  getcontract
+  getcontract,
+  getquality
 } from '@/model/houseSelfCollect/index'
 import {
   pullDown,
@@ -626,6 +633,7 @@ export default {
       customerName: '',
       customerPhone: '',
       contractFlag:7,
+      redstatus:false,
       deptBudgetList: {
         type: '干粮',
         freight: 0,
@@ -1057,7 +1065,7 @@ export default {
         }
       }
     },
-    customerChange(e) {
+    async customerChange(e) {
       let customers = e.split('(')
       this.deptBudgetList.bankCard = customers[1].split(')')[0]
       this.deptBudgetList.customerName = customers[0]
@@ -1069,6 +1077,22 @@ export default {
           this.deptBudgetList.customerPhone = this.customerList1[i].customerPhone
         }
       }
+      if( this.deptBudgetList.goodsName&&this.deptBudgetList.customerName){
+        await getquality({goodsName:this.deptBudgetList.goodsName,compId:localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName,customerNumberCard:this.deptBudgetList.customerNumberCard})
+        .toPromise().then((response) => {
+          if(response.A+response.B+response.C*50>response.D-50){
+            this.redstatus=true
+          }else{
+						this.redstatus=false
+					}
+          var a=response.A>0?response.A+'吨':''
+          var b=response.B>0?response.B+'吨':''
+          var c=response.C>0?response.C+'车':''
+          
+          this.deptBudgetList.volumeofbusiness=a+b+c
+          this.$forceUpdate()
+        })
+      }
     },
     waterContentChange(type) {
           //客户
@@ -3694,7 +3718,7 @@ export default {
     find() {
       this.getList()
     },
-    contractNoChange(e) {
+    async contractNoChange(e) {
       // console.log(e)
       // 循环任务编号获取合同号
       for (let i = 0; i < this.taskNolist.length; i++) {
@@ -3735,7 +3759,7 @@ export default {
         }
       }
       if (!data) return
-      getcontract({contractNo:this.deptBudgetList.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+      var response=await getcontract({contractNo:this.deptBudgetList.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise()
         this.outContractNo=response  
         if(this.outContractNo.priceType == "定价收购"){
             if( this.deptBudgetList.type == "潮粮"){
@@ -3866,8 +3890,22 @@ export default {
           }else{
             this.fleetNameList = []
           }
-          console.log(this.deptBudgetList.inOutType,this.outContractNo.inOutType)
-      })
+          if( this.deptBudgetList.goodsName&&this.deptBudgetList.customerName){
+        await getquality({goodsName:this.deptBudgetList.goodsName,compId:localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName,customerNumberCard:this.deptBudgetList.customerNumberCard})
+        .toPromise().then((response) => {
+          if(response.A+response.B+response.C*50>response.D-50){
+            this.redstatus=true
+          }else{
+						this.redstatus=false
+					}
+          var a=response.A>0?response.A+'吨':''
+          var b=response.B>0?response.B+'吨':''
+          var c=response.C>0?response.C+'车':''
+          
+          this.deptBudgetList.volumeofbusiness=a+b+c
+          this.$forceUpdate()
+        })
+      }
     },
     selectstorageType() {
 
@@ -4167,4 +4205,7 @@ export default {
   font-weight: 500;
   margin-left: 10px;
 }
+/deep/.el-input.volumeofbusiness .el-input__inner{
+  color:red !important;
+}
 </style>

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

@@ -48,15 +48,15 @@
         </el-upload>
       <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780"
         @selection-change="handleSelectionChange">
-        <el-table-column type="selection" width="55"></el-table-column>
-        <el-table-column type="index" label="序号" width="80">
+        <el-table-column key="0" type="selection" width="55"></el-table-column>
+        <el-table-column key="1" type="index" label="序号" width="80">
           <template scope="scope">
             <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="number" label="业务编号"></el-table-column>
-        <el-table-column prop="contractNo" label="合同编号/移库编号" v-if="warehousingType == 1" width="130">
+        <el-table-column key="2" prop="number" label="业务编号"></el-table-column>
+        <el-table-column key="3" prop="contractNo" label="合同编号/移库编号" v-if="warehousingType == 1" width="130">
           <template scope="scope">
             <span v-if="scope.row.contractNo">{{scope.row.contractNo}}</span>
             <span v-else>{{scope.row.moveTaskNo}}</span>
@@ -64,17 +64,17 @@
 
         </el-table-column>
         <!--//moveTaskNo -->
-        <el-table-column prop="customer" label="客户" v-if="warehousingType == 3"></el-table-column>
-        <el-table-column prop="carNumber" label="车牌号"></el-table-column>
-        <el-table-column prop="goodsName" label="货名"></el-table-column>
-        <el-table-column prop="grossWeight" label="毛重(公斤)" width="100"></el-table-column>
-        <el-table-column prop="tare" label="皮重(公斤)" width="100"></el-table-column>
-        <el-table-column prop="buckleMiscellaneous" label="扣重(公斤)" width="100"></el-table-column>
-        <el-table-column prop="netWeight" label="净重(公斤)" width="100"></el-table-column>
-        <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
-        <el-table-column prop="grossDate" label="检斤时间"></el-table-column>
-        <el-table-column prop="status" label="状态"></el-table-column>
-        <el-table-column label="操作" min-width="300">
+        <el-table-column key="4" prop="customer" label="客户" v-if="warehousingType == 3"></el-table-column>
+        <el-table-column key="5" prop="carNumber" label="车牌号"></el-table-column>
+        <el-table-column key="6" prop="goodsName" label="货名"></el-table-column>
+        <el-table-column key="7" prop="grossWeight" label="毛重(公斤)" width="100"></el-table-column>
+        <el-table-column key="8" prop="tare" label="皮重(公斤)" width="100"></el-table-column>
+        <el-table-column key="9" prop="buckleMiscellaneous" label="扣重(公斤)" width="100"></el-table-column>
+        <el-table-column key="10" prop="netWeight" label="净重(公斤)" width="100"></el-table-column>
+        <el-table-column key="11" prop="secretaryWeigher" label="司称员"></el-table-column>
+        <el-table-column key="12" prop="grossDate" label="检斤时间"></el-table-column>
+        <el-table-column key="13" prop="status" label="状态"></el-table-column>
+        <el-table-column key="14" label="操作" min-width="300">
           <template scope="scope">
             <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
             <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>