gjy 3 лет назад
Родитель
Сommit
fd7798de7b

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

@@ -85,4 +85,6 @@ export const API_GET_INSPECT_GETJURISDICTION = '/paymentManagement/selectTaskId'
 //财务开票
 export const API_POST_INVOICING = '/paymentManagement/api/readXmlManagement'
 export const API_POST_EXPORT = '/paymentManagement/export'
+// 车牌号
+export const API_GET_SHIPPINGINFOFORMATION = '/shippingInformation/selectShippingInformation'
 

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

@@ -44,7 +44,8 @@ import {
   API_GET_INSPECT_GETDRYGRAINPRICE,
   API_GET_INSPECT_GETJURISDICTION,
   API_POST_INVOICING,
-  API_POST_EXPORT
+  API_POST_EXPORT,
+  API_GET_SHIPPINGINFOFORMATION
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -133,4 +134,6 @@ export const getJurisdiction  = appRx.get(API_GET_INSPECT_GETJURISDICTION, error
 //财务开票post
 export const invoicing  = appRx.post(API_POST_INVOICING, errorCatcher, errorHandle, filter)
 
-export const export1 = appRx.post(API_POST_EXPORT)
+export const export1 = appRx.post(API_POST_EXPORT)
+// 车牌号
+export const getshippinginfo  = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)

+ 61 - 9
src/views/houseSelfCollect/inspectInfo.vue

@@ -27,19 +27,24 @@
                 <ws-option v-for="item in getbinNumberList" :key="item.value" :label="item.value" :value="item.value" />
               </ws-select>
             </ws-form-item>
-            <ws-form-item label="客户" span="1" prop="customerName">
-              <el-select v-model="inspect.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-select>
-            </ws-form-item>
+            
             <ws-form-item label="囤位号" span="1" prop="storageTagNo">
               <ws-input v-model="inspect.storageTagNo" placeholder="请输入囤位号" maxlength="15" size="small"
                 :disabled="disabled" />
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="carNumber">
-              <ws-input v-model="inspect.carNumber" placeholder="请输入车牌号" maxlength="10" size="small"
-                :disabled="disabled" />
+              <el-select v-model="inspect.carNumber" clearable filterable  placeholder="请选择" class="typeselect" @change="shipperNameChange"
+                :disabled="disabled1">
+                <el-option v-for="(item,index) in carNumberList" :key="index" :label="item.carNo" :value="index" />
+              </el-select>
+              <!-- <ws-input v-model="inspect.carNumber" placeholder="请输入车牌号" maxlength="10" size="small"
+                :disabled="disabled" /> -->
+            </ws-form-item>
+            <ws-form-item label="客户" span="1" prop="customerName">
+              <el-select v-model="inspect.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-select>
             </ws-form-item>
             <ws-form-item label="箱号-1" span="1" prop="boxNo">
             <ws-input :disabled="disabled" v-model="inspect.boxNo" placeholder="请输入箱号" maxlength="20"
@@ -169,7 +174,8 @@
     getinspectEdit,
     getamount,
     getCount,
-    getDryGrainPrice
+    getDryGrainPrice,
+    getshippinginfo
   } from '@/model/houseSelfCollect/index'
    import {
     packList
@@ -195,6 +201,7 @@
           paramType:1,
           type:'潮粮'
         },
+        carNumberList:[],
         disabled: false,
         disabled1: false,
         disabled2: false,
@@ -751,6 +758,47 @@
         })
 
       },
+      shipperNameChange(e){
+        this.$set(this.inspect,'customerName',this.carNumberList[e].shipperName)
+        this.$set(this.inspect,'carNumber',this.carNumberList[e].carNo)
+        this.$set(this.inspect,'customerPhone',this.carNumberList[e].shipperPhone)
+        for (let i = 0; i < this.customerList1.length; i++) {
+          if(this.customerList1[i].customerName==this.inspect.customerName){
+            this.inspect.customerNumberCard=this.customerList1[i].customerNumberCard
+          }
+        }
+        if(this.inspect.goodsName && this.inspect.customerName){
+          // //查看当前用户对应货名有未结算状态的送货
+        let count = 0
+        getCount({
+          compId: localStorage.getItem('ws-pf_compId'),
+          customerName: this.inspect.customerName,
+          goodsName: this.inspect.goodsName,
+          customerNumberCard:this.inspect.customerNumberCard
+        })  .toPromise()
+          .then((response) => {
+               count = response
+          })
+          //  客户下拉校验
+        getamount({
+          compId: localStorage.getItem('ws-pf_compId'),
+          customerName: this.inspect.customerName,
+          goodsName: this.inspect.goodsName,
+          customerNumberCard:this.inspect.customerNumberCard
+        })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < this.purchasePriceList.length; i++) {
+              if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+                if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0)&&this.tipFlag) {
+                  this.tipFlag = false
+                  this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+                }
+              }
+            }
+          })
+        }
+      },
       customerChange(e) {
         let customers = e.split('(')
         this.inspect.customerName = customers[0]
@@ -933,6 +981,10 @@
               })
             }
           })
+          getshippinginfo({compId: localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName}).toPromise()
+          .then((response) => {
+            this.carNumberList=response
+          })
         // 仓位
         getbinNumber({
             id: this.cangid