From c3334e4a5563021437c4aaa65b43de60eede5dec Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 07 四月 2026 14:02:55 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue |   87 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 83 insertions(+), 4 deletions(-)

diff --git a/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue b/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue
index dee3a6d..9550586 100644
--- a/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue
+++ b/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue
@@ -988,6 +988,11 @@
                     this.formShow = true
                     this.formLoading = false
 
+                    // 鍔犺浇杩愯緭绾胯矾銆佽繍杈撶被鍨嬨�佽溅鍨嬪垪琛�
+                    if (this.form.HContractTransportInterID) {
+                        this.loadTransportData()
+                    }
+
                     // 鍔犺浇宸蹭笂浼犵殑鏂囦欢鍒楄〃
                     this.getFileList();
 
@@ -1171,12 +1176,11 @@
                             this.form.HMoney = 0
                             return
                         }
-                        this.form.HContractTransportEntryID = response.data[0].HEntryID
                         this.form.HCarrierID = response.data[0].HSupID
                         this.form.HCarrierName = response.data[0].渚涘簲鍟嗗悕绉�
                         this.form.HCurID = response.data[0].甯佸埆
                         this.form.HCurName = response.data[0].璐у竵鍚嶇О
-                        this.form.HExRate = response.data[0].姹囩巼 == null ? 0 : response.data[0].姹囩巼
+                        this.form.HExRate = response.data[0].姹囩巼 == null ? 0 : response.data[0].姹囩巼 - 0
                         this.form.HSSID = response.data[0].缁撶畻鏂瑰紡
                         this.form.HSSName = response.data[0].缁撶畻鏂瑰紡鍚嶇О
                         this.transportList = [...new Set(response.data.map(item => item.杩愯緭璺嚎鍚嶇О))]
@@ -1497,6 +1501,7 @@
                     var sSubStr = JSON.stringify(this.editData);
                     // var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType;
                     var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"]
+                    console.log(sMainSub)
                     axios({
                         method: 'post',
                         url: this.baseURL + "/WLYayBillController/SaveBill",
@@ -2091,6 +2096,44 @@
             });
         },
 
+        // 鍔犺浇杩愯緭鐩稿叧鏁版嵁
+        loadTransportData() {
+            axios.get(this.$baseUrl + '/WLYayBillController/initDataForSelectContractTransportBill', {
+                params: {
+                    "hmainid": this.form.HContractTransportInterID,
+                },
+            }).then(res => {
+                let response = res.data
+                if (response.code == 1) {
+                    // 杩愯緭绾胯矾鍘婚噸
+                    this.transportList = [...new Set(response.data.map(item => item.杩愯緭璺嚎鍚嶇О))]
+                    // this.$nextTick(()=>{
+
+                    // })
+                    this.getTransCost('line')
+                    this.getTransCost('type')
+                    this.getTransCost('car')
+
+
+                    // // 杩愯緭绫诲瀷鍘婚噸
+                    // this.transTypeList = [...new Set(response.data.map(item => item.杩愯緭绫诲瀷))]
+
+                    // // 杞﹀瀷鍘婚噸
+                    // const carTypeMap = new Map()
+                    // response.data.forEach(item => {
+                    //     const key = item.杩愯緭鏂瑰紡鍚嶇О
+                    //     if (!carTypeMap.has(key)) {
+                    //         carTypeMap.set(key, { value: item.杩愯緭鏂瑰紡鍚嶇О, id: item.杩愯緭鏂瑰紡 })
+                    //     }
+                    // })
+                    // this.HCarTypeNameList = Array.from(carTypeMap.values())
+                } else {
+                    this.$modal.msgError("閿欒:" + response.data.code + response.data.Message);
+                }
+            }).catch(error => {
+                this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+            });
+        },
         // 鑾峰彇宸蹭笂浼犳枃浠跺垪琛�
         getFileList() {
         },
@@ -2119,16 +2162,51 @@
         transLineNameChange() {
             this.form.HTransType = ''
             this.form.HCarTypeName = ''
+            this.form.HCarTypeID = 0
+            this.form.HContractTransportEntryID = 0
+            this.form.HBeginAddrName = ''
+            this.form.HBeginAddr = 0
+            this.form.HEndAddrName = ''
+            this.form.HEndAddr = 0
+            this.form.HCarTypeMaxVolume = 0
+            this.form.HDistance = 0
+            this.form.HTransportTimes = ''
+            this.form.HTransportTyep = ''
+            this.form.HMoney = 0
             this.transTypeList = []
             this.HCarTypeNameList = []
             this.getTransCost('line')
         },
         transTypeChange() {
             this.form.HCarTypeName = ''
+            this.form.HCarTypeID = 0
+            this.form.HContractTransportEntryID = 0
+            this.form.HBeginAddrName = ''
+            this.form.HBeginAddr = 0
+            this.form.HEndAddrName = ''
+            this.form.HEndAddr = 0
+            this.form.HCarTypeMaxVolume = 0
+            this.form.HDistance = 0
+            this.form.HTransportTimes = ''
+            this.form.HTransportTyep = ''
+            this.form.HMoney = 0
             this.HCarTypeNameList = []
             this.getTransCost('type')
         },
-        transHCarChange() {
+        transHCarChange(val) {
+            this.form.HContractTransportEntryID = 0
+            this.form.HBeginAddrName = ''
+            this.form.HBeginAddr = 0
+            this.form.HEndAddrName = ''
+            this.form.HEndAddr = 0
+            this.form.HCarTypeMaxVolume = 0
+            this.form.HDistance = 0
+            this.form.HTransportTimes = ''
+            this.form.HTransportTyep = ''
+            this.form.HMoney = 0
+            let item = this.HCarTypeNameList.find(item => item.id === val);
+            this.form.HCarTypeName = item.value
+            this.form.HCarTypeID = val
             this.getTransCost('car')
         },
         checkAndCallGetTransCost() {
@@ -2185,11 +2263,12 @@
                         })
                         this.HCarTypeNameList = Array.from(carTypeMap.values())
                     } else if (val == 'car') {
+                        this.form.HContractTransportEntryID = response.data[0].HEntryID
                         this.form.HBeginAddrName = response.data[0].濮嬪彂鍦板悕绉�
                         this.form.HBeginAddr = response.data[0].濮嬪彂鍦�
                         this.form.HEndAddrName = response.data[0].鐩殑鍦板悕绉�
                         this.form.HEndAddr = response.data[0].鐩殑鍦�
-                        this.form.HCarTypeMaxVolume = response.data[0].杞﹁締鏈�澶у绉�
+                        this.form.HCarTypeMaxVolume = response.data[0].杞﹀瀷鏈�澶у绉�
                         this.form.HDistance = response.data[0].璺濈
                         this.form.HTransportTimes = response.data[0].杩愯緭鏃舵晥
                         this.form.HTransportTyep = response.data[0].杩愯緭绫诲瀷

--
Gitblit v1.9.1