From d7e7e80121be970b323288a3f52a9cc51d51ab54 Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期三, 03 十二月 2025 11:03:10 +0800
Subject: [PATCH] 提交

---
 tms/src/main/java/com/ruoyi/tms/domain/TmsDispatchOrder.java                  |   34 
 ui/admin-ui3/src/views/tms/tmsSettlementEntity/index.vue                      |  267 +++---
 tms/src/main/java/com/ruoyi/tms/service/impl/TmsConsignorServiceImpl.java     |    5 
 ui/admin-ui3/src/views/tms/tmsConsignor/index.vue                             |   68 +
 ui/admin-ui3/src/views/tms/tmsContainer/index.vue                             |    2 
 tms/src/main/java/com/ruoyi/tms/service/ITmsConsignorService.java             |    2 
 tms/src/main/java/com/ruoyi/tms/domain/TmsVehicle.java                        |    9 
 tms/src/main/java/com/ruoyi/tms/domain/TransportRouteVi.java                  |    2 
 ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue                           |  164 ++--
 tms/src/main/resources/mapper/tms/TmsVehicleMapper.xml                        |   24 
 tms/src/main/java/com/ruoyi/tms/controller/TmsConsignorController.java        |    2 
 ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue                         | 1264 +++++++++++++++++++++++-----------
 tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml                  |   15 
 tms/src/main/java/com/ruoyi/tms/service/impl/TmsDispatchOrderServiceImpl.java |    4 
 ui/admin-ui3/src/api/common.ts                                                |    7 
 ui/admin-ui3/src/views/tms/tmsVehicle/index.vue                               |  230 ++++--
 ui/admin-ui3/src/views/tms/tmsContract/index.vue                              |   10 
 17 files changed, 1,370 insertions(+), 739 deletions(-)

diff --git a/tms/src/main/java/com/ruoyi/tms/controller/TmsConsignorController.java b/tms/src/main/java/com/ruoyi/tms/controller/TmsConsignorController.java
index 42bee12..93ef661 100644
--- a/tms/src/main/java/com/ruoyi/tms/controller/TmsConsignorController.java
+++ b/tms/src/main/java/com/ruoyi/tms/controller/TmsConsignorController.java
@@ -81,7 +81,7 @@
     @PostMapping
     public AjaxResult add(@RequestBody TmsConsignor tmsConsignor)
     {
-        return toAjax(tmsConsignorService.insertTmsConsignor(tmsConsignor));
+        return AjaxResult.success(tmsConsignorService.insertTmsConsignor(tmsConsignor));
     }
 
     /**
diff --git a/tms/src/main/java/com/ruoyi/tms/domain/TmsDispatchOrder.java b/tms/src/main/java/com/ruoyi/tms/domain/TmsDispatchOrder.java
index 201fa73..feed965 100644
--- a/tms/src/main/java/com/ruoyi/tms/domain/TmsDispatchOrder.java
+++ b/tms/src/main/java/com/ruoyi/tms/domain/TmsDispatchOrder.java
@@ -398,7 +398,10 @@
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @TableField("create_time")
     private Date createTime;
-
+    @TableField(exist = false)
+    private String createTimeBegin;
+    @TableField(exist = false)
+    private String createTimeEnd;
 
     /** 鏇存柊浜� */
     @Excel(name = "鏇存柊浜�")
@@ -411,7 +414,10 @@
     @Excel(name = "鏇存柊鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     @TableField("update_time")
     private Date updateTime;
-
+    @TableField(exist = false)
+    private String updateTimeBegin;
+    @TableField(exist = false)
+    private String updateTimeEnd;
 
     /** 澶囨敞 */
     @TableField("remark")
@@ -468,4 +474,28 @@
     @Excel(name = "鍏宠仈鎶ヤ环鏂规ID")
     @TableField("quote_plan_id")
     private Integer quotePlanId;
+
+    /**
+     * 纭鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField("confirm_time")
+    private Date confirmTime;
+    @TableField(exist = false)
+    private String confirmTimeBegin;
+    @TableField(exist = false)
+    private String confirmTimeEnd;
+    /**
+     * 瀹屾垚鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField("ok_time")
+    private Date okTime;
+
+    @TableField(exist = false)
+    private String okTimeBegin;
+    @TableField(exist = false)
+    private String okTimeEnd;
+
+
 }
\ No newline at end of file
diff --git a/tms/src/main/java/com/ruoyi/tms/domain/TmsVehicle.java b/tms/src/main/java/com/ruoyi/tms/domain/TmsVehicle.java
index 44c2f44..defd2fc 100644
--- a/tms/src/main/java/com/ruoyi/tms/domain/TmsVehicle.java
+++ b/tms/src/main/java/com/ruoyi/tms/domain/TmsVehicle.java
@@ -358,5 +358,14 @@
     @TableField("carrier_type")
     private Integer carrierType;
 
+    @TableField("settlement_id")
+    private Integer settlementId;
+
+    @TableField("settlement_name")
+    private String settlementName;
+     @TableField("car_key_no")
+    private String carKeyNo;
+
+
 
 }
diff --git a/tms/src/main/java/com/ruoyi/tms/domain/TransportRouteVi.java b/tms/src/main/java/com/ruoyi/tms/domain/TransportRouteVi.java
index 4455bf1..55a63e6 100644
--- a/tms/src/main/java/com/ruoyi/tms/domain/TransportRouteVi.java
+++ b/tms/src/main/java/com/ruoyi/tms/domain/TransportRouteVi.java
@@ -32,6 +32,8 @@
      */
     private Integer customerId;
 
+    private String customerCode;
+
     /**
      * 瀹㈡埛鍏ㄧО鍛�
      */
diff --git a/tms/src/main/java/com/ruoyi/tms/service/ITmsConsignorService.java b/tms/src/main/java/com/ruoyi/tms/service/ITmsConsignorService.java
index a378741..c9000f6 100644
--- a/tms/src/main/java/com/ruoyi/tms/service/ITmsConsignorService.java
+++ b/tms/src/main/java/com/ruoyi/tms/service/ITmsConsignorService.java
@@ -51,7 +51,7 @@
      * @param tmsConsignor 鏀跺彂璐т汉绠$悊
      * @return 缁撴灉
      */
-    public int insertTmsConsignor(TmsConsignor tmsConsignor);
+    public TmsConsignor insertTmsConsignor(TmsConsignor tmsConsignor);
 
     /**
      * 鏂板鏀跺彂璐т汉绠$悊[鎵归噺]
diff --git a/tms/src/main/java/com/ruoyi/tms/service/impl/TmsConsignorServiceImpl.java b/tms/src/main/java/com/ruoyi/tms/service/impl/TmsConsignorServiceImpl.java
index d224121..378d90e 100644
--- a/tms/src/main/java/com/ruoyi/tms/service/impl/TmsConsignorServiceImpl.java
+++ b/tms/src/main/java/com/ruoyi/tms/service/impl/TmsConsignorServiceImpl.java
@@ -112,12 +112,13 @@
      * @return 缁撴灉
      */
     @Override
-    public int insertTmsConsignor(TmsConsignor tmsConsignor)
+    public TmsConsignor insertTmsConsignor(TmsConsignor tmsConsignor)
     {
         tmsConsignor.setConsignorCode(systemDataNoService.getNoByKey(SystemDataNoEnum.ZXH));
         tmsConsignor.setCreateBy(SecurityUtils.getUsername());
         tmsConsignor.setCreateTime(DateUtils.getNowDate());
-        return tmsConsignorMapper.insertTmsConsignor(tmsConsignor);
+        tmsConsignorMapper.insertTmsConsignor(tmsConsignor);
+        return tmsConsignor;
     }
 
     /**
diff --git a/tms/src/main/java/com/ruoyi/tms/service/impl/TmsDispatchOrderServiceImpl.java b/tms/src/main/java/com/ruoyi/tms/service/impl/TmsDispatchOrderServiceImpl.java
index 44ad3ed..fff168e 100644
--- a/tms/src/main/java/com/ruoyi/tms/service/impl/TmsDispatchOrderServiceImpl.java
+++ b/tms/src/main/java/com/ruoyi/tms/service/impl/TmsDispatchOrderServiceImpl.java
@@ -96,7 +96,7 @@
         if (tmsDispatchOrder.getVehicleId() == null){
             return AjaxResult.error("璇峰厛閫夋嫨杞﹁締");
         }
-
+        tmsDispatchOrder.setConfirmTime(DateUtils.getNowDate());
         tmsDispatchOrder.setStatus(1);
 
         tmsDispatchOrder.setUpdateBy(SecurityUtils.getUsername());
@@ -121,7 +121,7 @@
             return AjaxResult.error("璇ヨ皟搴﹀崟鏁版嵁鐘舵�佸紓甯�");
         }
         tmsDispatchOrder.setStatus(3);
-
+        tmsDispatchOrder.setOkTime(DateUtils.getNowDate());
         tmsDispatchOrder.setUpdateBy(SecurityUtils.getUsername());
         int i = tmsDispatchOrderMapper.updateTmsDispatchOrder(tmsDispatchOrder);
         if (i > 0){
diff --git a/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml b/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
index 864fae6..fb5e8fe 100644
--- a/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
+++ b/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
@@ -87,10 +87,13 @@
         <result property="quoteDetailId"    column="quote_detail_id"    />
         <result property="operationMode"    column="operation_mode"    />
         <result property="quotePlanId"    column="quote_plan_id"    />
+        <result property="okTime"    column="ok_time"    />
+        <result property="confirmTime"    column="confirm_time"    />
+
     </resultMap>
 
     <sql id="selectTmsDispatchOrderVo">
-        select thisTab.id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.customer_code, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.order_type, thisTab.transport_line, thisTab.sign_type, thisTab.vehicle_provider_id, thisTab.vehicle_provider_name, thisTab.loading_service_provider_id, thisTab.loading_service_provider_name, thisTab.customs_service_provider_id, thisTab.customs_service_provider_name, thisTab.is_urgent, thisTab.transport_type, thisTab.load_method, thisTab.main_driver_id, thisTab.main_driver_name, thisTab.assistant_driver_id, thisTab.required_vehicle_types, thisTab.assistant_driver_name, thisTab.vehicle_id, thisTab.container_no, thisTab.license_plate, thisTab.shipper_id, thisTab.earliest_departure, thisTab.shipper_name, thisTab.latest_departure, thisTab.shipper_mobile, thisTab.earliest_arrival, thisTab.shipper_address, thisTab.latest_arrival, thisTab.departure_address, thisTab.shipper_region_code, thisTab.receiver_id, thisTab.destination_address, thisTab.receiver_name, thisTab.actual_vehicle_type, thisTab.receiver_mobile, thisTab.actual_load_start, thisTab.shipper_region_label, thisTab.receiver_address, thisTab.actual_unload_end, thisTab.receiver_region_code, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.receiver_region_label, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.container_id, thisTab.electronic_lock, thisTab.empty_mileage, thisTab.shelf_id, thisTab.empty_fuel, thisTab.shelf_code, thisTab.loaded_mileage, thisTab.loaded_fuel, thisTab.shift_no, thisTab.line_no, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.accounts_receivable_status, thisTab.accounts_payable_status, thisTab.collection_plan_id, thisTab.payment_plan_id , thisTab.is_customs, thisTab.start_region_code, thisTab.end_region_code, thisTab.quote_detail_id, thisTab.operation_mode, thisTab.quote_plan_id from tms_dispatch_order AS thisTab
+        select thisTab.id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.customer_code, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.order_type, thisTab.transport_line, thisTab.sign_type, thisTab.vehicle_provider_id, thisTab.vehicle_provider_name, thisTab.loading_service_provider_id, thisTab.loading_service_provider_name, thisTab.customs_service_provider_id, thisTab.customs_service_provider_name, thisTab.is_urgent, thisTab.transport_type, thisTab.load_method, thisTab.main_driver_id, thisTab.main_driver_name, thisTab.assistant_driver_id, thisTab.required_vehicle_types, thisTab.assistant_driver_name, thisTab.vehicle_id, thisTab.container_no, thisTab.license_plate, thisTab.shipper_id, thisTab.earliest_departure, thisTab.shipper_name, thisTab.latest_departure, thisTab.shipper_mobile, thisTab.earliest_arrival, thisTab.shipper_address, thisTab.latest_arrival, thisTab.departure_address, thisTab.shipper_region_code, thisTab.receiver_id, thisTab.destination_address, thisTab.receiver_name, thisTab.actual_vehicle_type, thisTab.receiver_mobile, thisTab.actual_load_start, thisTab.shipper_region_label, thisTab.receiver_address, thisTab.actual_unload_end, thisTab.receiver_region_code, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.receiver_region_label, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.container_id, thisTab.electronic_lock, thisTab.empty_mileage, thisTab.shelf_id, thisTab.empty_fuel, thisTab.shelf_code, thisTab.loaded_mileage, thisTab.loaded_fuel, thisTab.shift_no, thisTab.line_no, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.accounts_receivable_status, thisTab.accounts_payable_status, thisTab.collection_plan_id, thisTab.payment_plan_id , thisTab.is_customs, thisTab.start_region_code, thisTab.end_region_code, thisTab.quote_detail_id, thisTab.operation_mode, thisTab.quote_plan_id, thisTab.ok_time, thisTab.confirm_time from tms_dispatch_order AS thisTab
     </sql>
     <sql id="selectTmsDispatchOrderVoCount">
         select count(0) from tms_dispatch_order as thisTab
@@ -150,6 +153,13 @@
         <if test="quoteDetailId != null "> and thisTab.quote_detail_id = #{quoteDetailId}</if>
         <if test="operationMode != null "> and thisTab.operation_mode = #{operationMode}</if>
         <if test="quotePlanId != null "> and thisTab.quote_plan_id = #{quotePlanId}</if>
+        <if test="createTimeBegin != null and createTimeBegin != '' and createTimeEnd != null and createTimeEnd != ''"> and  thisTab.create_time between #{createTimeBegin} and #{createTimeEnd}</if>
+        <if test="updateTimeBegin != null and updateTimeBegin != '' and updateTimeEnd != null and updateTimeEnd != ''"> and  thisTab.update_time between #{updateTimeBegin} and #{updateTimeEnd}</if>
+        <if test="confirmTimeBegin != null and confirmTimeBegin != '' and confirmTimeEnd != null and confirmTimeEnd != ''"> and  thisTab.confirm_time between #{confirmTimeBegin} and #{confirmTimeEnd}</if>
+        <if test="okTimeBegin != null and okTimeBegin != '' and okTimeEnd != null and okTimeEnd != ''"> and  thisTab.ok_time between #{okTimeBegin} and #{okTimeEnd}</if>
+
+
+
     </sql>
 
     <!--鏌ヨ-->
@@ -439,6 +449,9 @@
             <if test="quoteDetailId != null">quote_detail_id = #{quoteDetailId},</if>
             <if test="operationMode != null">operation_mode = #{operationMode},</if>
             <if test="quotePlanId != null">quote_plan_id = #{quotePlanId},</if>
+            <if test="confirmTime != null">confirm_time,</if>
+            <if test="okTime != null">ok_time = #{okTime},</if>
+
         </trim>
         where id = #{id}
     </update>
diff --git a/tms/src/main/resources/mapper/tms/TmsVehicleMapper.xml b/tms/src/main/resources/mapper/tms/TmsVehicleMapper.xml
index d098674..0343dc5 100644
--- a/tms/src/main/resources/mapper/tms/TmsVehicleMapper.xml
+++ b/tms/src/main/resources/mapper/tms/TmsVehicleMapper.xml
@@ -51,10 +51,13 @@
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
         <result property="carrierType"    column="carrier_type"    />
+        <result property="settlementId"    column="settlement_id"    />
+        <result property="settlementName"    column="settlement_name"    />
+        <result property="carKeyNo"    column="car_key_no"    />
     </resultMap>
 
     <sql id="selectTmsVehicleVo">
-        select thisTab.id, thisTab.system_code, thisTab.service_provider_id, thisTab.vehicle_type, thisTab.service_provider_name, thisTab.internal_code, thisTab.license_plate, thisTab.license_hk, thisTab.license_mo, thisTab.license_color, thisTab.owner, thisTab.is_blacklist, thisTab.is_customs_control, thisTab.is_trailer, thisTab.main_driver, thisTab.main_driver_phone, thisTab.assistant_driver, thisTab.assistant_driver_phone, thisTab.has_task, thisTab.vehicle_usage_status, thisTab.body_color, thisTab.frame_number, thisTab.engine_number, thisTab.energy_type, thisTab.empty_load_fuel, thisTab.full_load_fuel, thisTab.purchase_date, thisTab.purchase_price, thisTab.mandatory_scrap_date, thisTab.last_annual_inspection, thisTab.commercial_insurance_expiry, thisTab.traffic_insurance_expiry, thisTab.actual_length, thisTab.actual_width, thisTab.actual_height, thisTab.load_volume, thisTab.load_weight, thisTab.emission_standard, thisTab.engine_power, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark,thisTab.carrier_type from tms_vehicle AS thisTab
+        select thisTab.id, thisTab.system_code, thisTab.service_provider_id, thisTab.vehicle_type, thisTab.service_provider_name, thisTab.internal_code, thisTab.license_plate, thisTab.license_hk, thisTab.license_mo, thisTab.license_color, thisTab.owner, thisTab.is_blacklist, thisTab.is_customs_control, thisTab.is_trailer, thisTab.main_driver, thisTab.main_driver_phone, thisTab.assistant_driver, thisTab.assistant_driver_phone, thisTab.has_task, thisTab.vehicle_usage_status, thisTab.body_color, thisTab.frame_number, thisTab.engine_number, thisTab.energy_type, thisTab.empty_load_fuel, thisTab.full_load_fuel, thisTab.purchase_date, thisTab.purchase_price, thisTab.mandatory_scrap_date, thisTab.last_annual_inspection, thisTab.commercial_insurance_expiry, thisTab.traffic_insurance_expiry, thisTab.actual_length, thisTab.actual_width, thisTab.actual_height, thisTab.load_volume, thisTab.load_weight, thisTab.emission_standard, thisTab.engine_power, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark,thisTab.carrier_type, thisTab.settlement_id, thisTab.settlement_name, thisTab.car_key_no from tms_vehicle AS thisTab
     </sql>
     <sql id="selectTmsVehicleVoCount">
         select count(0) from tms_vehicle as thisTab
@@ -70,6 +73,9 @@
         <if test="vehicleUsageStatus != null "> and thisTab.vehicle_usage_status = #{vehicleUsageStatus}</if>
         <if test="status != null "> and thisTab.status = #{status}</if>
         <if test="carrierType != null "> and thisTab.carrier_type = #{carrierType}</if>
+        <if test="settlementId != null "> and thisTab.settlement_id = #{settlementId}</if>
+        <if test="settlementName != null  and settlementName != ''"> and  thisTab.settlement_name like concat('%', #{settlementName}, '%')</if>
+        <if test="carKeyNo != null "> and thisTab.car_key_no = #{carKeyNo}</if>
     </sql>
 
     <!--鏌ヨ-->
@@ -142,6 +148,9 @@
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
             <if test="carrierType != null">carrier_type,</if>
+            <if test="settlementId != null">settlement_id,</if>
+            <if test="settlementName != null">settlement_name,</if>
+            <if test="carKeyNo != null">car_key_no,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
@@ -189,17 +198,20 @@
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
             <if test="carrierType != null">#{carrierType},</if>
+            <if test="settlementId != null">#{settlementId},</if>
+            <if test="settlementName != null">#{settlementName},</if>
+            <if test="carKeyNo != null">#{carKeyNo},</if>
         </trim>
     </insert>
 
     <insert id="insertTmsVehicleBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
         insert into tms_vehicle
         <trim prefix="(" suffix=") values" suffixOverrides=",">
-            id,system_code,service_provider_id,vehicle_type,service_provider_name,internal_code,license_plate,license_hk,license_mo,license_color,owner,is_blacklist,is_customs_control,is_trailer,main_driver,main_driver_phone,assistant_driver,assistant_driver_phone,has_task,vehicle_usage_status,body_color,frame_number,engine_number,energy_type,empty_load_fuel,full_load_fuel,purchase_date,purchase_price,mandatory_scrap_date,last_annual_inspection,commercial_insurance_expiry,traffic_insurance_expiry,actual_length,actual_width,actual_height,load_volume,load_weight,emission_standard,engine_power,status,create_by,create_time,update_by,update_time,remark,carrier_type,
+            id,system_code,service_provider_id,vehicle_type,service_provider_name,internal_code,license_plate,license_hk,license_mo,license_color,owner,is_blacklist,is_customs_control,is_trailer,main_driver,main_driver_phone,assistant_driver,assistant_driver_phone,has_task,vehicle_usage_status,body_color,frame_number,engine_number,energy_type,empty_load_fuel,full_load_fuel,purchase_date,purchase_price,mandatory_scrap_date,last_annual_inspection,commercial_insurance_expiry,traffic_insurance_expiry,actual_length,actual_width,actual_height,load_volume,load_weight,emission_standard,engine_power,status,create_by,create_time,update_by,update_time,remark,carrier_type,settlement_id,settlement_name,car_key_no,
         </trim>
         <foreach item="item" index="index" collection="list" separator=",">
             <trim prefix="(" suffix=") " suffixOverrides=",">
-                #{item.id},#{item.systemCode},#{item.serviceProviderId},#{item.vehicleType},#{item.serviceProviderName},#{item.internalCode},#{item.licensePlate},#{item.licenseHk},#{item.licenseMo},#{item.licenseColor},#{item.owner},#{item.isBlacklist},#{item.isCustomsControl},#{item.isTrailer},#{item.mainDriver},#{item.mainDriverPhone},#{item.assistantDriver},#{item.assistantDriverPhone},#{item.hasTask},#{item.vehicleUsageStatus},#{item.bodyColor},#{item.frameNumber},#{item.engineNumber},#{item.energyType},#{item.emptyLoadFuel},#{item.fullLoadFuel},#{item.purchaseDate},#{item.purchasePrice},#{item.mandatoryScrapDate},#{item.lastAnnualInspection},#{item.commercialInsuranceExpiry},#{item.trafficInsuranceExpiry},#{item.actualLength},#{item.actualWidth},#{item.actualHeight},#{item.loadVolume},#{item.loadWeight},#{item.emissionStandard},#{item.enginePower},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.carrierType},
+                #{item.id},#{item.systemCode},#{item.serviceProviderId},#{item.vehicleType},#{item.serviceProviderName},#{item.internalCode},#{item.licensePlate},#{item.licenseHk},#{item.licenseMo},#{item.licenseColor},#{item.owner},#{item.isBlacklist},#{item.isCustomsControl},#{item.isTrailer},#{item.mainDriver},#{item.mainDriverPhone},#{item.assistantDriver},#{item.assistantDriverPhone},#{item.hasTask},#{item.vehicleUsageStatus},#{item.bodyColor},#{item.frameNumber},#{item.engineNumber},#{item.energyType},#{item.emptyLoadFuel},#{item.fullLoadFuel},#{item.purchaseDate},#{item.purchasePrice},#{item.mandatoryScrapDate},#{item.lastAnnualInspection},#{item.commercialInsuranceExpiry},#{item.trafficInsuranceExpiry},#{item.actualLength},#{item.actualWidth},#{item.actualHeight},#{item.loadVolume},#{item.loadWeight},#{item.emissionStandard},#{item.enginePower},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.carrierType},#{item.settlementId},#{item.settlementName},#{item.carKeyNo},
             </trim>
         </foreach>
     </insert>
@@ -253,6 +265,9 @@
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="carrierType != null">carrier_type = #{carrierType},</if>
+            <if test="settlementId != null">settlement_id = #{settlementId},</if>
+            <if test="settlementName != null">settlement_name = #{settlementName},</if>
+            <if test="carKeyNo != null">car_key_no = #{carKeyNo},</if>
         </trim>
         where id = #{id}
     </update>
@@ -306,6 +321,9 @@
                 <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                 <if test="item.remark != null">remark = #{item.remark},</if>
                 <if test="item.carrierType != null">carrier_type = #{item.carrierType},</if>
+                <if test="item.settlementId != null">settlement_id = #{item.settlementId},</if>
+                <if test="item.settlementName != null">settlement_name = #{item.settlementName},</if>
+                <if test="item.carKeyNo != null">car_key_no = #{item.carKeyNo},</if>
             </trim>
             where id = #{item.id}
         </foreach>
diff --git a/ui/admin-ui3/src/api/common.ts b/ui/admin-ui3/src/api/common.ts
index d03d9d4..f12bff4 100644
--- a/ui/admin-ui3/src/api/common.ts
+++ b/ui/admin-ui3/src/api/common.ts
@@ -1,5 +1,6 @@
 import request, {requestType} from "@/utils/request";
 
+import axios from "axios";
 
 
 export const getNoCountApi: requestType = () => {
@@ -14,4 +15,8 @@
         url: '/tms/tmsMessageNotify/read/'+id,
         method: 'get'
     })
-}
\ No newline at end of file
+}
+
+export const mapRegeo: requestType = (latitude, longitude) => {
+  return  axios.get(`https://restapi.amap.com/v3/geocode/regeo?platform=JS&s=rsv3&logversion=2.0&key=69e209992bdd0d511d6cf6dc73dfd0c0&sdkversion=2.0.6.4&csid=E8C55ED3-3588-409E-B4C4-DC5651FC93C5&jscode=a1004b7eb9064c8c09f3725ccc135767&key=69e209992bdd0d511d6cf6dc73dfd0c0&s=rsv3&language=zh_cn&location=${longitude},${latitude}`);
+}
diff --git a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
index d64942b..c8f558d 100644
--- a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
@@ -66,6 +66,7 @@
 import {hasPermission} from "@/utils/permissionUtils";
 import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
 import {getArea, getCity, getProvince, getStreet,getAddressCode} from "@/api/tms/tmsRegion";
+import {mapRegeo} from "@/api/common";
 
 const {proxy} = useCurrentInstance();
 const crudRef = ref();
@@ -293,27 +294,44 @@
           hide: true,
           search: false,
           type: 'map',
-          mapChange: async (params:any)=>{
-            if (params.info === "OK") {
-              console.log( params)
-              let { province, city, district, township } = params.regeocode.addressComponent || {};
-
-              const res = await getAddressCode({province, city, district, township});
-              const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
-
-              form.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
-
-              form.value.region = [provinceCode, cityCode, districtCode, townshipCode];
-              form.value.provinceId = provinceCode;
-              form.value.cityId = cityCode;
-              form.value.districtId = districtCode;
-              form.value.streetId = townshipCode;
-
-              form.value.dispatchTransportArea = params.regeocode.formattedAddress;
-
+          // mapChange: async (params:any)=>{
+          //   if (params.info === "OK") {
+          //     console.log( params)
+          //     let { province, city, district, township } = params.regeocode.addressComponent || {};
+          //
+          //     const res = await getAddressCode({province, city, district, township});
+          //     const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
+          //
+          //     form.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
+          //
+          //     form.value.region = [provinceCode, cityCode, districtCode, townshipCode];
+          //     form.value.provinceId = provinceCode;
+          //     form.value.cityId = cityCode;
+          //     form.value.districtId = districtCode;
+          //     form.value.streetId = townshipCode;
+          //
+          //     form.value.dispatchTransportArea = params.regeocode.formattedAddress;
+          //
+          //   }
+          // }
+          change: async ({value}:any)=>{
+            if (Array.isArray(value) && value.length === 3){
+              mapRegeo(value[1], value[0]).then(async res => {
+                let params = res.data || {};
+                if (params.info === "OK") {
+                  let {province, city, district, township} = params.regeocode.addressComponent || {};
+                  const res = await getAddressCode({province, city, district, township});
+                  const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
+                  form.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
+                  form.value.provinceId = provinceCode;
+                  form.value.cityId = cityCode;
+                  form.value.districtId = districtCode;
+                  form.value.streetId = townshipCode;
+                  form.value.dispatchTransportArea = params.regeocode.formatted_address || params.regeocode.formattedAddress;
+                }
+              });
             }
-          }
-
+          },
         },
         dispatchTransportArea: {
           label: '璋冨害鍗曡繍杈撳湴',
@@ -597,13 +615,13 @@
   },
   rowSaveBegin:(row:any)=>{
     if (row.mapLocationDetail){
-      row.mapLocation = row.mapLocationDetail[1]+','+row.mapLocationDetail[0];
+      row.mapLocation = row.mapLocationDetail[0]+','+row.mapLocationDetail[1];
       row.addressDetail = row.mapLocationDetail[2]
     }
   },
   rowUpdateBegin:(row:any)=>{
     if (row.mapLocationDetail){
-      row.mapLocation = row.mapLocationDetail[1]+','+row.mapLocationDetail[0];
+      row.mapLocation = row.mapLocationDetail[0]+','+row.mapLocationDetail[1];
       row.addressDetail = row.mapLocationDetail[2]
     }
   },
@@ -613,9 +631,9 @@
       crudRef.value.getPropRef('mapLocationDetail').$refs.temp.text = form.value.mapLocationDetail;
 
     }
-    nextTick(()=>{
-      crudRef.value.getPropRef('region').$refs.temp.$forceUpdate()
-    })
+    // nextTick(()=>{
+    //   crudRef.value.getPropRef('region').$refs.temp.$forceUpdate()
+    // })
     console.log( )
      // crudRef.value.getPropRef('region').$refs.temp.setCheckedKeys(form.value.region);
 
diff --git a/ui/admin-ui3/src/views/tms/tmsContainer/index.vue b/ui/admin-ui3/src/views/tms/tmsContainer/index.vue
index c792f72..3fb44c0 100644
--- a/ui/admin-ui3/src/views/tms/tmsContainer/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsContainer/index.vue
@@ -163,7 +163,7 @@
           addDisplay: true,
           editDisplay: true,
           viewDisplay: true,
-          hide: false,minWidth:150,
+          hide: false,minWidth:150,dataType: 'string',
           search: true,
           rules: [
             {
diff --git a/ui/admin-ui3/src/views/tms/tmsContract/index.vue b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
index cab7a94..a0d499d 100644
--- a/ui/admin-ui3/src/views/tms/tmsContract/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
@@ -120,6 +120,16 @@
           addDisplay: true,value:'1',
           editDisplay: true,
           viewDisplay: true,
+          change: ({value}: any) => {
+            option.value.group.forEach((item: any) => {
+              if (item.prop == 'fjxx') {
+                item.column.attachmentPath.rules.forEach((item:any)=>{
+                  item.required = value == 1;
+                })
+              }
+            })
+            console.log(value)
+          },
           rules: [
             {
               required: true,
diff --git a/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue b/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
index 1d8e947..24c338f 100644
--- a/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
@@ -21,21 +21,21 @@
         @on-load="onLoad"
     >
       <template #menu-left>
-<!--        <el-button-->
-<!--            type="success"-->
-<!--            icon="Edit"-->
-<!--            :disabled="pageF.single"-->
-<!--            v-hasPermi="['tms:tmsDispatchOrder:edit']"-->
-<!--            @click="handleUpdate">淇敼-->
-<!--        </el-button>-->
-<!--        <el-button-->
-<!--            type="danger"-->
-<!--            icon="Delete"-->
-<!--            :disabled="pageF.multiple"-->
-<!--            @click="handleDelete"-->
-<!--            v-hasPermi="['tms:tmsDispatchOrder:remove']"-->
-<!--        >鍒犻櫎-->
-<!--        </el-button>-->
+        <!--        <el-button-->
+        <!--            type="success"-->
+        <!--            icon="Edit"-->
+        <!--            :disabled="pageF.single"-->
+        <!--            v-hasPermi="['tms:tmsDispatchOrder:edit']"-->
+        <!--            @click="handleUpdate">淇敼-->
+        <!--        </el-button>-->
+        <!--        <el-button-->
+        <!--            type="danger"-->
+        <!--            icon="Delete"-->
+        <!--            :disabled="pageF.multiple"-->
+        <!--            @click="handleDelete"-->
+        <!--            v-hasPermi="['tms:tmsDispatchOrder:remove']"-->
+        <!--        >鍒犻櫎-->
+        <!--        </el-button>-->
         <el-button
             type="warning"
             plain
@@ -71,28 +71,36 @@
 
       </template>
       <template #menu-before="{row}">
-        <el-link size="small" type="primary"  @click="handleAddGoods(row)" class="link-btn"
+        <el-link size="small" type="primary" @click="handleAddGoods(row)" class="link-btn"
+                 v-hasPermi="['tms:tmsGoodsDetail:add']"
                  :underline="false" icon="el-icon-document-add">杩愯緭璐у搧鐧昏
         </el-link>
-        <el-link size="small" type="primary"  @click="handleActual(row)" class="link-btn"
+        <el-link size="small" type="primary" @click="handleActual(row)" class="link-btn"
+                 v-hasPermi="['tms:tmsDispatchOrder:update']"
                  :underline="false" icon="el-icon-set-up">瀹為檯杩愯緭璁板綍
         </el-link>
         <el-link size="small" type="primary" v-if="row.status == 0" @click="handleConfirm(row)" class="link-btn"
+                 v-hasPermi="['tms:tmsDispatchOrder:confirmOrder']"
                  :underline="false" icon="el-icon-pointer">纭畾
         </el-link>
         <el-link size="small" type="primary" @click="handleCopy(row)" class="link-btn" :underline="false"
+                 v-hasPermi="['tms:tmsDispatchOrder:copyOrder']"
                  icon="el-icon-connection">澶嶅埗
         </el-link>
         <el-link size="small" type="primary" v-if="[1,2].includes(row.status)" @click="handleUploadItinerary(row)"
+                 v-hasPermi="['tms:tmsTrip:add']"
                  class="link-btn" :underline="false" icon="el-icon-upload">涓婁紶琛岀▼
         </el-link>
         <el-link size="small" type="primary" v-if="![0,1].includes(row.status)" @click="handleLogItinerary(row)"
+                 v-hasPermi="['tms:tmsTrip:list']"
                  class="link-btn" :underline="false" icon="el-icon-view">鏌ョ湅琛岀▼
         </el-link>
         <el-link size="small" type="primary" v-if="[2].includes(row.status)" @click="handleOk(row)" class="link-btn"
+                 v-hasPermi="['tms:tmsDispatchOrder:okOrder']"
                  :underline="false" icon="el-icon-circle-check">瀹屾垚琛岀▼
         </el-link>
-        <el-link size="small" type="primary" v-if="[2,3].includes(row.status)" @click="handleAddFinance(row)" class="link-btn"
+        <el-link size="small" type="primary" v-if="[2,3].includes(row.status)" @click="handleAddFinance(row)"
+                 class="link-btn" v-hasPermi="['tms:tmsFinanceDetail:add']"
                  :underline="false" icon="el-icon-edit-pen">璐圭敤鐧昏
         </el-link>
       </template>
@@ -101,20 +109,46 @@
                  icon="el-icon-tickets">鏃ュ織
         </el-link>
       </template>
+
+      <template #shipperId-form>
+        <div style="display:flex; align-items: center;justify-content: space-between">
+          <avue-input-table :props="consignorProps"
+                            :children="consignorOption"
+                            :on-load="onShipperLoad" suffixIcon="search"
+                            v-model="form.shipperId" style="width: 80%"
+                            @change="changeShipper"
+                            placeholder="璇烽�夋嫨瑁呰揣鐐�"></avue-input-table>
+          <el-button icon="plus" @click="handleAddShipper"></el-button>
+        </div>
+      </template>
+      <template #receiverId-form>
+        <div style="display:flex; align-items: center;justify-content: space-between">
+          <avue-input-table :props="consignorProps"
+                            :children="consignorOption"
+                            :on-load="onConsignorLoad" suffixIcon="search"
+                            v-model="form.receiverId"
+                            @change="changeReceiver" style="width: 80%"
+                            placeholder="璇烽�夋嫨鍗歌揣鐐�"></avue-input-table>
+          <el-button icon="plus" @click="handleAddReceiver"></el-button>
+        </div>
+      </template>
+
     </avue-crud>
     <el-dialog :title="pageF.title" v-model="pageF.open" class="avue-dialog avue-dialog--top" width="80%">
       <h2 v-if="optionType == 'addFinance'">鎶ヤ环璐圭敤</h2>
       <avue-crud v-if="optionType == 'addFinance'"
-          :option="itemsTableOption"
-          :data="itemsTableData"
+                 :option="itemsTableOption"
+                 :data="itemsTableData"
                  @selection-change="selectionChange2"
       >
         <template #count="{row}">
-          <el-input-number v-model="row.count" @change="countChange(row)" placeholder="璇疯緭鍏ヨ璐规暟閲�" min="0"></el-input-number>
+          <el-input-number v-model="row.count" @change="countChange(row)" placeholder="璇疯緭鍏ヨ璐规暟閲�"
+                           min="0"></el-input-number>
         </template>
       </avue-crud>
       <h2 v-if="optionType == 'addFinance'">瀹炴姤瀹為攢璐圭敤</h2>
-      <avue-form v-if="optionType == 'addItinerary' || optionType == 'addFinance'" v-model="boxForm" ref="boxFormRef" :option="boxFormOption">
+      <avue-form v-if="optionType == 'addItinerary' || optionType == 'addFinance'" v-model="boxForm" ref="boxFormRef"
+                 :option="boxFormOption">
 
       </avue-form>
       <avue-crud
@@ -124,11 +158,13 @@
       </avue-crud>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" v-if="optionType == 'addItinerary' || optionType == 'addFinance'" :loading="pageF.isUploading" @click="submitForm">
+          <el-button type="primary" v-if="optionType == 'addItinerary' || optionType == 'addFinance'"
+                     :loading="pageF.isUploading" @click="submitForm">
             {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
           </el-button>
 
-          <el-button type="primary" v-if="optionType == 'generate' " :loading="pageF.isUploading" @click="submitGenerate">
+          <el-button type="primary" v-if="optionType == 'generate' " :loading="pageF.isUploading"
+                     @click="submitGenerate">
             {{ pageF.isUploading ? '鐢熸垚涓�' : '鐢熸垚璐圭敤' }}
           </el-button>
           <el-button @click="cancelBox">鍙� 娑�</el-button>
@@ -143,23 +179,23 @@
             border
         >
           <el-descriptions-item label="璋冨害鍗曞彿">{{ form.dispatchNo }}</el-descriptions-item>
-          <el-descriptions-item label="瀹㈡埛" >{{ form.customerName }}</el-descriptions-item>
-          <el-descriptions-item label="瀹為檯杩愯緭宸ュ叿绫诲瀷" >{{ form.$actualVehicleType}}</el-descriptions-item>
-          <el-descriptions-item label="杩愯緭宸ュ叿鍙风爜" >{{ form.licensePlate }}</el-descriptions-item>
-          <el-descriptions-item label="鎵樻灦鍙�" >{{ form.shelfCode }}</el-descriptions-item>
-          <el-descriptions-item label="涓婚┚椹跺憳" >{{ form.mainDriverName }}</el-descriptions-item>
-          <el-descriptions-item label="鍓┚椹跺憳" >{{ form.assistantDriverName }}</el-descriptions-item>
+          <el-descriptions-item label="瀹㈡埛">{{ form.customerName }}</el-descriptions-item>
+          <el-descriptions-item label="瀹為檯杩愯緭宸ュ叿绫诲瀷">{{ form.$actualVehicleType }}</el-descriptions-item>
+          <el-descriptions-item label="杩愯緭宸ュ叿鍙风爜">{{ form.licensePlate }}</el-descriptions-item>
+          <el-descriptions-item label="鎵樻灦鍙�">{{ form.shelfCode }}</el-descriptions-item>
+          <el-descriptions-item label="涓婚┚椹跺憳">{{ form.mainDriverName }}</el-descriptions-item>
+          <el-descriptions-item label="鍓┚椹跺憳">{{ form.assistantDriverName }}</el-descriptions-item>
         </el-descriptions>
       </div>
-      <div  v-if="optionType == 'connectHang'">
+      <div v-if="optionType == 'connectHang'">
         <el-descriptions style="margin-bottom: 20px"
-            :column="2"
-            border
+                         :column="2"
+                         border
         >
           <el-descriptions-item label="璋冨害鍗曞彿">{{ form.dispatchNo }}</el-descriptions-item>
-          <el-descriptions-item label="瀹㈡埛" >{{ form.customerName }}</el-descriptions-item>
-          <el-descriptions-item label="瀹為檯杩愯緭宸ュ叿绫诲瀷" >{{ form.$actualVehicleType}}</el-descriptions-item>
-          <el-descriptions-item label="鎵樻灦鍙�" >{{ form.shelfCode }}</el-descriptions-item>
+          <el-descriptions-item label="瀹㈡埛">{{ form.customerName }}</el-descriptions-item>
+          <el-descriptions-item label="瀹為檯杩愯緭宸ュ叿绫诲瀷">{{ form.$actualVehicleType }}</el-descriptions-item>
+          <el-descriptions-item label="鎵樻灦鍙�">{{ form.shelfCode }}</el-descriptions-item>
         </el-descriptions>
         <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption">
 
@@ -167,7 +203,7 @@
       </div>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary"  :loading="pageF.isUploading" @click="submitForm2">
+          <el-button type="primary" :loading="pageF.isUploading" @click="submitForm2">
             {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
           </el-button>
           <el-button @click="cancelBox2">鍙� 娑�</el-button>
@@ -186,32 +222,31 @@
           :data="goodsTableData" ref="goodsCrudRef"
       >
       </avue-crud>
-<!--      <template #footer>-->
-<!--        <div class="dialog-footer">-->
-<!--          <el-button type="primary"  :loading="pageF.isUploading" @click="submitForm2">-->
-<!--            {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}-->
-<!--          </el-button>-->
-<!--          <el-button @click="open2 = false">鍙� 娑�</el-button>-->
-<!--        </div>-->
-<!--      </template>-->
+      <!--      <template #footer>-->
+      <!--        <div class="dialog-footer">-->
+      <!--          <el-button type="primary"  :loading="pageF.isUploading" @click="submitForm2">-->
+      <!--            {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}-->
+      <!--          </el-button>-->
+      <!--          <el-button @click="open2 = false">鍙� 娑�</el-button>-->
+      <!--        </div>-->
+      <!--      </template>-->
     </el-dialog>
 
     <el-dialog title="瀹為檯杩愯緭淇℃伅" v-model="open3" class="avue-dialog avue-dialog--top" width="80%">
-      <avue-form  v-model="actualForm" 
-                  ref="actualFormRef"
-                  :option="actualFormOption">
+      <avue-form v-model="actualForm"
+                 ref="actualFormRef"
+                 :option="actualFormOption">
 
       </avue-form>
-            <template #footer>
-              <div class="dialog-footer">
-                <el-button type="primary"  :loading="pageF.isUploading" @click="submitForm3">
-                  {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
-                </el-button>
-                <el-button @click="open3 = false">鍙� 娑�</el-button>
-              </div>
-            </template>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" :loading="pageF.isUploading" @click="submitForm3">
+            {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
+          </el-button>
+          <el-button @click="open3 = false">鍙� 娑�</el-button>
+        </div>
+      </template>
     </el-dialog>
-
 
 
   </basicContainer>
@@ -229,7 +264,7 @@
   confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, connectHang
 } from "@/api/tms/tmsDispatchOrder";
 import useCurrentInstance from "@/utils/useCurrentInstance";
-import {computed, onMounted, reactive, ref, toRefs, watch} from "vue";
+import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance} from "vue";
 import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
 import {usePagePlus} from "@/hooks/usePagePlus";
 import {hasPermission} from "@/utils/permissionUtils";
@@ -241,7 +276,7 @@
 import {getTmsVehicle, listTmsVehicle} from "@/api/tms/tmsVehicle";
 import {getTmsContainer, listTmsContainer} from "@/api/tms/tmsContainer";
 import {getTmsShelf, listTmsShelf} from "@/api/tms/tmsShelf";
-import {getTmsConsignor, listTmsConsignor} from "@/api/tms/tmsConsignor";
+import {addTmsConsignor, getTmsConsignor, listTmsConsignor} from "@/api/tms/tmsConsignor";
 import {ElMessage, ElMessageBox} from "element-plus";
 import {addTmsTrip, listTmsTrip} from "@/api/tms/tmsTrip";
 import {addTmsFinanceDetail, listTmsFinanceDetail, updateTmsFinanceDetail} from "@/api/tms/tmsFinanceDetail";
@@ -249,6 +284,12 @@
 import {addTmsGoodsDetail, delTmsGoodsDetail, listTmsGoodsDetail, updateTmsGoodsDetail} from "@/api/tms/tmsGoodsDetail";
 import {getTransportRouteVi, listTransportRouteVi} from "@/api/tms/tmsTransportRouteVi";
 import {listTmsQuoteItem} from "@/api/tms/tmsQuotePlanItem";
+import {$DialogForm} from '@smallwei/avue'
+import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
+import {getAddressCode} from "@/api/tms/tmsRegion";
+import {mapRegeo} from "@/api/common";
+
+const {appContext} = getCurrentInstance();
 
 const {proxy} = useCurrentInstance();
 const crudRef = ref();
@@ -263,7 +304,7 @@
   } else if (key == 'delBtn') {
     return hasPermission(["tms:tmsDispatchOrder:remove"]) && row?.status == 0
   } else if (key == 'editBtn') {
-    return hasPermission(["tms:tmsDispatchOrder:edit"]) && [0,1].includes(row?.status)
+    return hasPermission(["tms:tmsDispatchOrder:edit"]) && [0, 1].includes(row?.status)
   } else if (key == 'viewBtn') {
     return hasPermission(["tms:tmsDispatchOrder:query"])
   } else {
@@ -286,17 +327,18 @@
   boxTableOption: <any>{},
   title: '',
   open: false,
-  open2:false,
+  open2: false,
   goodsTableData: <any>[],
   selectionList2: <any>[],
-  goodsForm:<any>{},
+  goodsForm: <any>{},
   open3: false,
-  actualForm:<any>{},
+  actualForm: <any>{},
 })
-const {queryParams, form, page, selectionList,open3,
+const {
+  queryParams, form, page, selectionList, open3,
   boxTableData, optionType,
-  boxFormOption,boxForm,boxTableOption,title,open,open2,
-  goodsTableData,goodsForm,actualForm,selectionList2
+  boxFormOption, boxForm, boxTableOption, title, open, open2,
+  goodsTableData, goodsForm, actualForm, selectionList2
 } = toRefs(data);
 const option = ref({
   pageKey: 'TmsDispatchOrder',
@@ -417,7 +459,7 @@
           display: true, disabled: true
         },
         requiredVehicleTypes: {
-          label: '涓嬪崟杞﹀瀷',disabled: true,
+          label: '涓嬪崟杞﹀瀷', disabled: true,
           display: true, type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string',
           rules: [
             {
@@ -437,17 +479,17 @@
               message: "璁㈠崟绫诲瀷涓嶈兘涓虹┖", trigger: "change"
             }
           ],
-          change:({value}: any)=>{
-              option.value.group.forEach((item:any) =>{
-                if (item.prop == 'pcxx'){
-                  item.column.shipperId.rules.forEach((cItem:any)=>{
-                    cItem.required = !(value == 1);
-                  }) ;
-                  item.column.receiverId.rules.forEach((cItem:any)=>{
-                    cItem.required = !(value == 1);
-                  }) ;
-                }
-              })
+          change: ({value}: any) => {
+            option.value.group.forEach((item: any) => {
+              if (item.prop == 'pcxx') {
+                item.column.shipperId.rules.forEach((cItem: any) => {
+                  cItem.required = !(value == 1);
+                });
+                item.column.receiverId.rules.forEach((cItem: any) => {
+                  cItem.required = !(value == 1);
+                });
+              }
+            })
           }
         },
         // signType: {
@@ -649,7 +691,7 @@
           ],
         },
         latestArrival: {
-          label: '瑕佹眰鏈�鏅氬埌杈炬椂闂�',labelWidth: 150,
+          label: '瑕佹眰鏈�鏅氬埌杈炬椂闂�', labelWidth: 150,
           type: 'datetime',  // 鏀逛负 datetime 绫诲瀷
           format: 'YYYY-MM-DD HH:mm:ss',
           valueFormat: 'YYYY-MM-DD HH:mm:ss',
@@ -663,15 +705,14 @@
         },
 
 
-
       }
     },
     {
       label: '娲捐溅淇℃伅',
       prop: 'pcxx',
       column: {
-        operationMode:{
-          label: '鏄惁鏄嚜钀ヨ溅闃�',value:0,
+        operationMode: {
+          label: '鏄惁鏄嚜钀ヨ溅闃�', value: 0,
           type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is',
           rules: [
             {
@@ -679,13 +720,13 @@
               message: "鏄惁鏄嚜钀ヨ溅闃熶笉鑳戒负绌�", trigger: "change"
             }
           ],
-          change: ({value}:any) => {
+          change: ({value}: any) => {
             console.log(value)
-            option.value.group.forEach((item:any) =>{
-              if (item.prop == 'pcxx'){
-                item.column.vehicleProviderId.rules.forEach((cItem:any)=>{
-                  cItem.required = value != 1;
-                }) ;
+            option.value.group.forEach((item: any) => {
+              if (item.prop == 'pcxx') {
+                item.column.vehicleProviderId.rules.forEach((cItem: any) => {
+                  cItem.required = value == 1;
+                });
               }
             })
           },
@@ -778,7 +819,7 @@
         },
         mainDriverId: {
           label: '涓婚┚椹跺憳',
-          display: true,dataType: 'string',
+          display: true, dataType: 'string',
           rules: [
             {
               required: true,
@@ -813,7 +854,7 @@
               licenseType: {
                 label: '鍑嗛┚杞﹀瀷', minWidth: 120,
                 type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type',
-                search: true,multiple:true,
+                search: true, multiple: true,
               },
             },
 
@@ -832,7 +873,11 @@
                 return callback(res.data || {})
               })
             } else {
-              listTmsDriver({pageSize: page.pageSize, pageNum: page.currentPage, ...data,carrierType:form.value.operationMode}).then(res => {
+              listTmsDriver({
+                pageSize: page.pageSize,
+                pageNum: page.currentPage, ...data,
+                carrierType: form.value.operationMode
+              }).then(res => {
                 return callback({
                   total: res.total,
                   data: res.rows || [],
@@ -846,7 +891,7 @@
         },
         assistantDriverId: {
           label: '鍓┚椹跺憳',
-          display: true,dataType: 'string',
+          display: true, dataType: 'string',
           change: (val: any) => {
             const table = crudRef.value?.getPropRef?.('assistantDriverId')?.$refs?.temp;
             if (!table) return;
@@ -873,7 +918,7 @@
                 search: true,
               },
               licenseType: {
-                label: '鍑嗛┚杞﹀瀷', minWidth: 120,multiple:true,
+                label: '鍑嗛┚杞﹀瀷', minWidth: 120, multiple: true,
                 type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type',
                 search: true,
               },
@@ -894,7 +939,11 @@
                 return callback(res.data || {})
               })
             } else {
-              listTmsDriver({pageSize: page.pageSize, pageNum: page.currentPage, ...data,carrierType:form.value.operationMode}).then(res => {
+              listTmsDriver({
+                pageSize: page.pageSize,
+                pageNum: page.currentPage, ...data,
+                carrierType: form.value.operationMode
+              }).then(res => {
                 return callback({
                   total: res.total,
                   data: res.rows || [],
@@ -906,7 +955,7 @@
 
         },
         vehicleId: {
-          label: '杞︾墝鍙�',dataType: 'string',
+          label: '杞︾墝鍙�', dataType: 'string',
           display: true,
           rules: [
             {
@@ -973,7 +1022,11 @@
                 return callback(res.data || {})
               })
             } else {
-              listTmsVehicle({pageSize: page.pageSize, pageNum: page.currentPage, ...data,carrierType:form.value.operationMode}).then(res => {
+              listTmsVehicle({
+                pageSize: page.pageSize,
+                pageNum: page.currentPage, ...data,
+                carrierType: form.value.operationMode
+              }).then(res => {
                 return callback({
                   total: res.total,
                   data: res.rows || [],
@@ -989,120 +1042,15 @@
           display: true, type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string',
         },
         shipperId: {
-          label: '瑁呰揣鐐�',dataType:'string',
+          label: '瑁呰揣鐐�', dataType: 'string',
           display: true,
-          change: (val: any) => {
-            const table = crudRef.value?.getPropRef?.('shipperId')?.$refs?.temp;
-            if (!table) return;
-            let active = table.active;
-            if (Array.isArray(active)) active = active[0];
-            if (active) {
-              let shipperRegionCode = '';
-              if (active.provinceId){
-                shipperRegionCode = active.provinceId;
-              }
-              if (active.cityId){
-                shipperRegionCode =shipperRegionCode+ ","+active.cityId;
 
-              }
-              if (active.districtId){
-                shipperRegionCode =shipperRegionCode+ ","+active.districtId;
-
-              }
-              if (active.streetId){
-                shipperRegionCode =shipperRegionCode+ ","+active.streetId;
-              }
-              Object.assign(form.value, {
-                shipperId: active.id,
-                shipperName: active.consignorName,
-                shipperRegionLabel: active.regionLabel,
-                shipperAddress: active.addressDetail,
-                shipperMobile: active.contactPhone,
-                shipperRegionCode:shipperRegionCode
-              });
-             }
-          },
           rules: [
             {
               required: false,
               message: "瑁呰揣鐐逛笉鑳戒负绌�", trigger: "change"
             }
           ],
-          type: 'table', suffixIcon: 'search',
-          children: {
-            border: true,
-            searchLabelWidth: 100,
-            searchMenuSpan: 5,
-            column: {
-              consignorCode: {
-                label: '鏀惰璐х偣缂栫爜', minWidth: 130,
-                search: true,
-              },
-              consignorName: {
-                label: '鏀惰璐х偣鍚嶇О', minWidth: 130,
-                search: true,
-              },
-              consignorType: {
-                label: '鏀惰璐х偣绫诲瀷', minWidth: 80,
-                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
-                display: false,
-                hide: false,
-                search: true,
-              },
-              contactName: {
-                label: '鑱旂郴浜哄鍚�', minWidth: 110,
-                display: false,
-                hide: false,
-                search: true,
-              },
-              contactPhone: {
-                label: '鑱旂郴浜虹數璇�', minWidth: 110,
-                display: false,
-                hide: false,
-                search: true,
-              },
-              regionLabel: {
-                label: '琛屾斂鍖哄煙', minWidth: 180,
-                display: false,
-                hide: false,
-                search: true,
-              },
-            },
-
-          },
-          props: {
-            label: 'consignorName',
-            value: 'id'
-          },
-          onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
-            if (value) {
-              let id = value;
-              if (Array.isArray(value)) {
-                id = value[0]
-              }
-              getTmsConsignor(id).then(res => {
-                return callback(res.data || {})
-              })
-            } else {
-              if (form.value.startRegionCode) {
-                const split = form.value.startRegionCode.split(',');
-                const [provinceId, cityId, districtId, streetId] = split;
-
-                if (provinceId) data.provinceId = provinceId;
-                if (cityId) data.cityId = cityId;
-                if (districtId) data.districtId = districtId;
-                if (streetId) data.streetId = streetId;
-              }
-              console.log(form.value.startRegionCode)
-              listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
-                return callback({
-                  total: res.total,
-                  data: res.rows || [],
-                })
-              })
-            }
-
-          }
 
         },
         shipperRegionLabel: {
@@ -1120,120 +1068,13 @@
         },
         receiverId: {
           label: '鍗歌揣鐐�',
-          display: true, dataType:'string',
+          display: true, dataType: 'string',
           rules: [
             {
               required: true,
               message: "鍗歌揣鐐逛笉鑳戒负绌�", trigger: "change"
             }
           ],
-          change: (val: any) => {
-            const table = crudRef.value?.getPropRef?.('receiverId')?.$refs?.temp;
-            if (!table) return;
-            let active = table.active;
-            if (Array.isArray(active)) active = active[0];
-            if (active) {
-              let receiverRegionCode = '';
-              if (active.provinceId){
-                receiverRegionCode = active.provinceId;
-              }
-              if (active.cityId){
-                receiverRegionCode =receiverRegionCode+ ","+active.cityId;
-
-              }
-              if (active.districtId){
-                receiverRegionCode =receiverRegionCode+ ","+active.districtId;
-
-              }
-              if (active.streetId){
-                receiverRegionCode =receiverRegionCode+ ","+active.streetId;
-              }
-
-              Object.assign(form.value, {
-                receiverId: active.id,
-                receiverName: active.consignorName,
-                receiverRegionLabel: active.regionLabel,
-                receiverAddress: active.addressDetail,
-                receiverMobile: active.contactPhone,
-                receiverRegionCode:receiverRegionCode,
-              });
-            }
-          },
-          type: 'table', suffixIcon: 'search',
-          children: {
-            border: true,
-            searchLabelWidth: 100,
-            searchMenuSpan: 5,
-            column: {
-              consignorCode: {
-                label: '鏀惰璐х偣缂栫爜', minWidth: 130,
-                search: true,
-              },
-              consignorName: {
-                label: '鏀惰璐х偣鍚嶇О', minWidth: 130,
-                search: true,
-              },
-              consignorType: {
-                label: '鏀惰璐х偣绫诲瀷', minWidth: 80,
-                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
-                display: false,
-                hide: false,
-                search: true,
-              },
-              contactName: {
-                label: '鑱旂郴浜哄鍚�', minWidth: 110,
-                display: false,
-                hide: false,
-                search: true,
-              },
-              contactPhone: {
-                label: '鑱旂郴浜虹數璇�', minWidth: 110,
-                display: false,
-                hide: false,
-                search: true,
-              },
-              regionLabel: {
-                label: '琛屾斂鍖哄煙', minWidth: 180,
-                display: false,
-                hide: false,
-                search: true,
-              },
-            },
-
-          },
-          props: {
-            label: 'consignorName',
-            value: 'id'
-          },
-          onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
-            if (value) {
-              let id = value;
-              if (Array.isArray(value)) {
-                id = value[0]
-              }
-              getTmsConsignor(id).then(res => {
-                return callback(res.data || {})
-              })
-            } else {
-              if (form.value.endRegionCode) {
-                const split = form.value.endRegionCode.split(',');
-                const [provinceId, cityId, districtId, streetId] = split;
-
-                if (provinceId) data.provinceId = provinceId;
-                if (cityId) data.cityId = cityId;
-                if (districtId) data.districtId = districtId;
-                if (streetId) data.streetId = streetId;
-              }
-              listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
-                return callback({
-                  total: res.total,
-                  data: res.rows || [],
-                })
-              })
-            }
-
-          }
-
         },
         receiverRegionLabel: {
           label: '鍗歌揣鐐硅鏀垮尯鍩�',
@@ -1602,7 +1443,21 @@
       hide: false,
       search: false,
     },
-
+    updateTimeRange: {
+      label: '鏇存柊鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+      format: 'YYYY-MM-DD', hide: true, searchSpan: 5,
+      valueFormat: 'YYYY-MM-DD',
+    },
+    confirmTimeRange: {
+      label: '纭鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+      format: 'YYYY-MM-DD', hide: true, searchSpan: 5,
+      valueFormat: 'YYYY-MM-DD',
+    },
+    okTimeRange: {
+      label: '瀹屾垚鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+      format: 'YYYY-MM-DD', hide: true, searchSpan: 5,
+      valueFormat: 'YYYY-MM-DD',
+    },
 
   }
 })
@@ -1666,7 +1521,7 @@
     voucherUrl: {
       label: '琛岀▼鍑瘉',
       display: true,
-      span: 24,dataType: 'string',
+      span: 24, dataType: 'string',
       type: 'upload',
       action: '/common/upload2',
 
@@ -1722,7 +1577,7 @@
     voucherUrl: {
       label: '琛岀▼鍑瘉',
       display: true,
-      span: 24,dataType: 'string',
+      span: 24, dataType: 'string',
       type: 'upload',
       action: '/common/upload2',
 
@@ -1761,7 +1616,7 @@
       label: '琛岀▼鍑瘉',
       display: true,
       span: 24,
-      accept:'string',dataType: 'string',
+      accept: 'string', dataType: 'string',
       type: 'upload',
       action: '/common/upload2',
 
@@ -1809,7 +1664,7 @@
       label: '璐圭敤鍑瘉',
       display: true,
       span: 24,
-      accept:'string',dataType: 'object',
+      accept: 'string', dataType: 'object',
       type: 'upload',
       action: '/common/upload2',
 
@@ -1860,7 +1715,7 @@
     },
     transportLine: {
       label: '杩愯緭绾胯矾',
-      display: false,minWidth: 180, overHidden: true
+      display: false, minWidth: 180, overHidden: true
     },
     actualVehicleType: {
       label: '杞﹀瀷', minWidth: 130,
@@ -1888,7 +1743,7 @@
           message: "鎺ユ寕杞﹁締鍙风爜涓嶈兘涓虹┖", trigger: "change"
         }
       ],
-      type: 'table', suffixIcon: 'search',dataType: 'string',
+      type: 'table', suffixIcon: 'search', dataType: 'string',
       children: {
         border: true,
         searchLabelWidth: 100,
@@ -1954,7 +1809,7 @@
           message: "鎺ユ寕鍙告満涓嶈兘涓虹┖", trigger: "change"
         }
       ],
-      type: 'table', suffixIcon: 'search',dataType: 'string',
+      type: 'table', suffixIcon: 'search', dataType: 'string',
       children: {
         border: true,
         searchMenuSpan: 5,
@@ -1970,7 +1825,7 @@
           licenseType: {
             label: '鍑嗛┚杞﹀瀷', minWidth: 120,
             type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type',
-            search: true,multiple:true,
+            search: true, multiple: true,
           },
         },
 
@@ -2010,8 +1865,8 @@
   viewBtn: false,
   column: {
     productId: {
-      label: '璐у搧鍚嶇О',hide:true,
-      display: true,minWidth: 120, type: 'table', suffixIcon: 'search',dataType: 'string',
+      label: '璐у搧鍚嶇О', hide: true,
+      display: true, minWidth: 120, type: 'table', suffixIcon: 'search', dataType: 'string',
       children: {
         border: true,
         searchLabelWidth: 100,
@@ -2058,10 +1913,11 @@
             return callback(res.data || {})
           })
         } else {
-          listTmsProductInfo({pageSize: page.pageSize,
+          listTmsProductInfo({
+            pageSize: page.pageSize,
             pageNum: page.currentPage,
             ...data,
-            customerId:form.value.customerId
+            // customerId:form.value.customerId
           }).then(res => {
             return callback({
               total: res.total,
@@ -2087,87 +1943,88 @@
             packUnit: active.packUnit,
           });
 
-          goodsForm.value.sumWeight = active.grossWeight|| 0 * goodsForm.value.quantity;
-          goodsForm.value.sumNetWeight = active.netWeight || 0* goodsForm.value.quantity;
-          goodsForm.value.sumVolume = active.volume|| 0 * goodsForm.value.quantity;
+          goodsForm.value.sumWeight = active.grossWeight || 0 * goodsForm.value.quantity;
+          goodsForm.value.sumNetWeight = active.netWeight || 0 * goodsForm.value.quantity;
+          goodsForm.value.sumVolume = active.volume || 0 * goodsForm.value.quantity;
 
         }
       },
     },
     productName: {
-      label: '璐у搧鍚嶇О',minWidth: 120,
-      display :false,
+      label: '璐у搧鍚嶇О', minWidth: 120,
+      display: false,
       hide: false,
     },
     quantity: {
       label: '鏁伴噺',
-      addDisplay :true,minWidth: 100,
-      editDisplay :true,
-      viewDisplay :true,
+      addDisplay: true, minWidth: 100,
+      editDisplay: true,
+      viewDisplay: true,
       value: 1,
-      change:()=>{
+      change: () => {
         goodsForm.value.sumWeight = goodsForm.value.grossWeight || 0 * goodsForm.value.quantity;
-        goodsForm.value.sumNetWeight = goodsForm.value.netWeight || 0* goodsForm.value.quantity;
+        goodsForm.value.sumNetWeight = goodsForm.value.netWeight || 0 * goodsForm.value.quantity;
         goodsForm.value.sumVolume = goodsForm.value.volume || 0 * goodsForm.value.quantity;
       }
     },
     sumWeight: {
       label: '閲嶉噺(kg)',
-      addDisplay :true,minWidth: 100,append: 'Kg',
-      editDisplay :true,
-      viewDisplay :true,
+      addDisplay: true, minWidth: 100, append: 'Kg',
+      editDisplay: true,
+      viewDisplay: true,
     },
     sumNetWeight: {
       label: '鍑�閲�(kg)',
-      addDisplay :true,
-      editDisplay :true,minWidth: 100,append: 'Kg',
-      viewDisplay :true,
+      addDisplay: true,
+      editDisplay: true, minWidth: 100, append: 'Kg',
+      viewDisplay: true,
     },
     sumVolume: {
       label: '浣撶Н(m鲁)',
-      addDisplay :true,
-      editDisplay :true,minWidth: 100,append: 'm鲁',
-      viewDisplay :true,
+      addDisplay: true,
+      editDisplay: true, minWidth: 100, append: 'm鲁',
+      viewDisplay: true,
     },
 
 
     loosePieces: {
       label: '鏁d欢鏁�',
-      addDisplay :true,
-      editDisplay :true,minWidth: 100,
-      viewDisplay :true,
+      addDisplay: true,
+      editDisplay: true, minWidth: 100,
+      viewDisplay: true,
     },
 
     fullContainers: {
       label: '鏁寸鏁�',
-      addDisplay :true,
-      editDisplay :true,minWidth: 100,
-      viewDisplay :true,
+      addDisplay: true,
+      editDisplay: true, minWidth: 100,
+      viewDisplay: true,
     },
     containerNo: {
       label: '闆嗚绠卞彿',
-      addDisplay :true,
-      editDisplay :true,minWidth: 100,
-      viewDisplay :true,
+      addDisplay: true,
+      editDisplay: true, minWidth: 100,
+      viewDisplay: true,
     },
     palletCount: {
       label: '鎵樻暟',
-      addDisplay :true,minWidth: 100,
-      editDisplay :true,
-      viewDisplay :true,
+      addDisplay: true, minWidth: 100,
+      editDisplay: true,
+      viewDisplay: true,
     }
-  }})
+  }
+})
 
 const actualFormOption = ref({
-   menuBtn: false, labelWidth: 140,
-  column:{
-    departureAddress:{
+  menuBtn: false, labelWidth: 140,
+  column: {
+    departureAddress: {
       label: '瀹為檯鍑哄彂鍦板湴鍧�',
-      span:24,
+      span: 24,
     },
-    destinationAddress:{
+    destinationAddress: {
       label: '瀹為檯鐩殑鍦板湴鍧�',
-      span:24,
+      span: 24,
     },
     actualLoadStart: {
       label: '瀹為檯瑁呰溅寮�濮嬫椂闂�',
@@ -2198,18 +2055,18 @@
       display: true,
     },
     actualQuantity: {
-      label: '瀹炲彂鏁伴噺',type: 'number',
+      label: '瀹炲彂鏁伴噺', type: 'number',
     },
     actualWeight: {
-      label: '瀹炲彂閲嶉噺',type: 'number',
+      label: '瀹炲彂閲嶉噺', type: 'number',
     },
     actualVolume: {
-      label: '瀹炲彂浣撶Н',type: 'number',
+      label: '瀹炲彂浣撶Н', type: 'number',
     },
     reweighWeight: {
-      label: '澶嶇閲嶉噺',type: 'number',
+      label: '澶嶇閲嶉噺', type: 'number',
     },
-    electronicLock:{
+    electronicLock: {
       label: '鐢靛瓙閿�',
     }
   }
@@ -2220,29 +2077,76 @@
   pageKey: 'itemsTable',
   rowKey: 'rowKey',
   header: false,
-  addBtn: false,menu: false,
-  column:{
-    feeType:{
+  addBtn: false, menu: false,
+  column: {
+    feeType: {
       label: '璐圭敤鍚嶇О',
     },
-    unit:{
+    unit: {
       label: '*璁¢噺鍗曚綅',
     },
-    price:{
+    price: {
       label: '*璁¤垂閲戦',
     },
-    currency:{
+    currency: {
       label: '甯佸埗',
     },
-    count:{
-      label: '璁¤垂鏁伴噺',minWidth:130,
+    count: {
+      label: '璁¤垂鏁伴噺', minWidth: 130,
     },
-    sum:{
+    sum: {
       label: '鎬婚噾棰�',
     }
   }
 })
-const itemsCrudRef =ref()
+
+const consignorOption = ref({
+  border: true,
+  searchLabelWidth: 100,
+  searchMenuSpan: 5,
+  column: {
+    consignorCode: {
+      label: '鏀惰璐х偣缂栫爜', minWidth: 130,
+      search: true,
+    },
+    consignorName: {
+      label: '鏀惰璐х偣鍚嶇О', minWidth: 130,
+      search: true,
+    },
+    consignorType: {
+      label: '鏀惰璐х偣绫诲瀷', minWidth: 80,
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
+      display: false,
+      hide: false,
+      search: true,
+    },
+    contactName: {
+      label: '鑱旂郴浜哄鍚�', minWidth: 110,
+      display: false,
+      hide: false,
+      search: true,
+    },
+    contactPhone: {
+      label: '鑱旂郴浜虹數璇�', minWidth: 110,
+      display: false,
+      hide: false,
+      search: true,
+    },
+    regionLabel: {
+      label: '琛屾斂鍖哄煙', minWidth: 180,
+      display: false,
+      hide: false,
+      search: true,
+    },
+  },
+})
+const consignorProps = ref({
+  label: 'consignorName',
+  value: 'id'
+})
+
+
+const itemsCrudRef = ref()
 const itemsTableData = ref<any>([])
 
 const {
@@ -2279,6 +2183,12 @@
   },
   handleSelectionChangeFunc: (selection: any) => {
     selectionList.value = selection;
+  },
+  getBeginListFunc: () => {
+    queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.createTimeRange, 'createTime') || {};
+    queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.updateTimeRange, 'updateTime') || {};
+    queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.confirmTimeRange, 'confirmTime') || {};
+    queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.okTimeRange, 'okTime') || {};
   }
 })
 const handleConfirm = (row: any) => {
@@ -2358,7 +2268,7 @@
 }
 
 const submitForm = () => {
-  if (optionType.value === 'addItinerary'){
+  if (optionType.value === 'addItinerary') {
     if (Array.isArray(boxForm.value.voucherUrl)) {
       boxForm.value.voucherUrl = boxForm.value.voucherUrl.toString();
     }
@@ -2370,19 +2280,19 @@
       cancelBox();
       onLoad(page.value);
     })
-  }else if (optionType.value === 'addFinance'){
+  } else if (optionType.value === 'addFinance') {
     if (Array.isArray(boxForm.value.feeVoucherUrl)) {
       boxForm.value.feeVoucherUrl = boxForm.value.feeVoucherUrl.toString();
     }
-    let filter = selectionList2.value.filter((item:any)=>{
+    let filter = selectionList2.value.filter((item: any) => {
       return !item.count
     });
-    if (filter.length > 0){
+    if (filter.length > 0) {
       proxy.$modal.msgError("鍕鹃�夋姤浠疯垂鐢ㄨ濉啓璁¤垂鏁伴噺");
       return;
     }
     boxForm.value.items = selectionList2.value;
-    addTmsFinanceDetail(boxForm.value).then(res=>{
+    addTmsFinanceDetail(boxForm.value).then(res => {
       ElMessage({
         message: "鎿嶄綔鎴愬姛锛�",
         type: 'success'
@@ -2410,27 +2320,28 @@
   })
 }
 
-const handleAddFinance = async (row:any)=>{
+const handleAddFinance = async (row: any) => {
   optionType.value = 'addFinance';
   boxFormOption.value = financeOption.value;
   boxTableOption.value = financeTableOption.value;
-  const quotePlanItemRes = await listTmsQuoteItem({quotePlanId:row.quotePlanId,pageNum: 1, pageSize: 999});
+  const quotePlanItemRes = await listTmsQuoteItem({quotePlanId: row.quotePlanId, pageNum: 1, pageSize: 999});
   let items = quotePlanItemRes.rows || [];
-  itemsTableData.value = items.map((item:any) => {
+  itemsTableData.value = items.map((item: any) => {
     return {
       rowKey: item.id,
       feeType: item.freeName,
       unit: item.unit,
       price: item.price,
       currency: item.currency,
-      count:  0,
+      count: 0,
       sum: 0,
     }
   })
 
   listTmsFinanceDetail({
-    dispatchOrderId: row.id,financeType:2,
-    pageNum: 1, pageSize: 999}).then(res => {
+    dispatchOrderId: row.id, financeType: 2,
+    pageNum: 1, pageSize: 999
+  }).then(res => {
 
 
     boxTableData.value = res.rows || [];
@@ -2439,15 +2350,15 @@
     boxForm.value = {
       dispatchOrderId: row.id,
       dataSource: 0,
-      financeType:2,
+      financeType: 2,
     }
   })
 }
 
 const handleGenerate = () => {
-  let ids = selectionList.value.map((item:any) => item.id);
+  let ids = selectionList.value.map((item: any) => item.id);
   initGenerate(ids).then(res => {
-    boxTableData.value = res.data|| [];
+    boxTableData.value = res.data || [];
     optionType.value = 'generate';
     pageF.open = true;
     pageF.title = '鐢熸垚搴旀敹搴斾粯璐圭敤鏁版嵁';
@@ -2457,7 +2368,7 @@
 
 const submitGenerate = () => {
   pageF.isUploading = true;
-  let ids = selectionList.value.map((item:any) => item.id);
+  let ids = selectionList.value.map((item: any) => item.id);
 
   generateTmsDispatchOrder(ids).then(res => {
     pageF.isUploading = false;
@@ -2467,7 +2378,7 @@
     })
     cancelBox();
     onLoad(page.value);
-  }).finally(()=>{
+  }).finally(() => {
     pageF.isUploading = false;
   })
 }
@@ -2475,7 +2386,7 @@
  * 鐢╂寕
  */
 const handleDropHook = () => {
-    title.value = '璋冨害鍗曠敥鎸�';
+  title.value = '璋冨害鍗曠敥鎸�';
   open.value = true;
   form.value = selectionList.value[0];
   optionType.value = 'dropHook';
@@ -2501,14 +2412,14 @@
       })
       cancelBox2();
       onLoad(page.value);
-    }).finally(()=>{
+    }).finally(() => {
       pageF.isUploading = false;
     })
-  }else{
+  } else {
     connectHang({
-      dispatchId:form.value.id,
-      vehicleId:form.value.vehicleId,
-      driverId:form.value.driverId
+      dispatchId: form.value.id,
+      vehicleId: form.value.vehicleId,
+      driverId: form.value.driverId
     }).then(res => {
       ElMessage({
         message: "鎻愪氦鎴愬姛锛�",
@@ -2516,7 +2427,7 @@
       })
       cancelBox2();
       onLoad(page.value);
-    }).finally(()=>{
+    }).finally(() => {
       pageF.isUploading = false
     })
   }
@@ -2528,13 +2439,13 @@
 }
 
 const handleAddGoods = (row: any) => {
-  listTmsGoodsDetail({dispatchId: row.id,pageSize:999,pageNum:1}).then(res=>{
-    goodsTableData.value =  res.rows || [];
+  listTmsGoodsDetail({dispatchId: row.id, pageSize: 999, pageNum: 1}).then(res => {
+    goodsTableData.value = res.rows || [];
     form.value = row;
     open2.value = true;
   })
 }
-const rowGoodsUpdate = (row:any,index:any,done:any, loading:any) => {
+const rowGoodsUpdate = (row: any, index: any, done: any, loading: any) => {
   updateTmsGoodsDetail(row).then(res => {
     ElMessage({
       message: "淇敼鎴愬姛锛�",
@@ -2543,14 +2454,14 @@
     handleAddGoods(form.value);
     onLoad(page.value);
     done();
-  }).catch(()=>{
+  }).catch(() => {
     loading()
   })
 }
-const rowGoodsSave = (row:any, done:any, loading:any) => {
+const rowGoodsSave = (row: any, done: any, loading: any) => {
   row.dispatchId = form.value.id;
   row.dispatchNo = form.value.dispatchNo;
-  addTmsGoodsDetail(row).then(res=>{
+  addTmsGoodsDetail(row).then(res => {
     ElMessage({
       message: "鏂板鎴愬姛锛�",
       type: 'success'
@@ -2558,12 +2469,16 @@
     handleAddGoods(form.value);
     onLoad(page.value);
     done();
-  }).catch(()=>{
+  }).catch(() => {
     loading()
   })
 }
-const rowGoodsDel = (row:any) => {
-  ElMessageBox.confirm("纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎锛�", '绯荤粺鎻愮ず', {confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning'}).then(() => {
+const rowGoodsDel = (row: any) => {
+  ElMessageBox.confirm("纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎锛�", '绯荤粺鎻愮ず', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning'
+  }).then(() => {
     return delTmsGoodsDetail(row.id);
   }).then(() => {
     handleAddGoods(form.value);
@@ -2574,14 +2489,14 @@
   });
 }
 
-const handleActual = (row:any) => {
-    actualForm.value = row;
-    open3.value = true;
+const handleActual = (row: any) => {
+  actualForm.value = row;
+  open3.value = true;
 
 }
 
-const submitForm3 = ()=>{
-  updateTmsDispatchOrder(actualForm.value).then(res=>{
+const submitForm3 = () => {
+  updateTmsDispatchOrder(actualForm.value).then(res => {
     ElMessage({
       message: "鎿嶄綔鎴愬姛锛�",
       type: 'success'
@@ -2590,7 +2505,7 @@
     onLoad(page.value)
   })
 }
-const countChange = (row:any) => {
+const countChange = (row: any) => {
   row.sum = Number(row.price) * Number(row.count);
 }
 
@@ -2598,5 +2513,526 @@
   selectionList2.value = selection;
 }
 
+const onShipperLoad = ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
+  if (value) {
+    let id = value;
+    if (Array.isArray(value)) {
+      id = value[0]
+    }
+    getTmsConsignor(id).then(res => {
+      return callback(res.data || {})
+    })
+  } else {
+    if (form.value.startRegionCode) {
+      const split = form.value.startRegionCode.split(',');
+      const [provinceId, cityId, districtId, streetId] = split;
+
+      if (provinceId) data.provinceId = provinceId;
+      if (cityId) data.cityId = cityId;
+      if (districtId) data.districtId = districtId;
+      if (streetId) data.streetId = streetId;
+    }
+    listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+      return callback({
+        total: res.total,
+        data: res.rows || [],
+      })
+    })
+  }
+}
+const onConsignorLoad = ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
+  if (value) {
+    let id = value;
+    if (Array.isArray(value)) {
+      id = value[0]
+    }
+    getTmsConsignor(id).then(res => {
+      return callback(res.data || {})
+    })
+  } else {
+    if (form.value.endRegionCode) {
+      const split = form.value.endRegionCode.split(',');
+      const [provinceId, cityId, districtId, streetId] = split;
+
+      if (provinceId) data.provinceId = provinceId;
+      if (cityId) data.cityId = cityId;
+      if (districtId) data.districtId = districtId;
+      if (streetId) data.streetId = streetId;
+    }
+    listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+      return callback({
+        total: res.total,
+        data: res.rows || [],
+      })
+    })
+  }
+}
+const changeShipper = ({value}: any) => {
+
+  if (value) {
+    let id = value;
+    if (Array.isArray(value)) {
+      id = value[0]
+    }
+    getTmsConsignor(id).then(res => {
+      let active = res.data || {};
+      let shipperRegionCode = '';
+      if (active.provinceId) {
+        shipperRegionCode = active.provinceId;
+      }
+      if (active.cityId) {
+        shipperRegionCode = shipperRegionCode + "," + active.cityId;
+
+      }
+      if (active.districtId) {
+        shipperRegionCode = shipperRegionCode + "," + active.districtId;
+
+      }
+      if (active.streetId) {
+        shipperRegionCode = shipperRegionCode + "," + active.streetId;
+      }
+      Object.assign(form.value, {
+        shipperId: active.id,
+        shipperName: active.consignorName,
+        shipperRegionLabel: active.regionLabel,
+        shipperAddress: active.addressDetail,
+        shipperMobile: active.contactPhone,
+        shipperRegionCode: shipperRegionCode
+      });
+    })
+  }
+}
+const changeReceiver = ({value}: any) => {
+
+  if (value) {
+    let id = value;
+    if (Array.isArray(value)) {
+      id = value[0]
+    }
+    getTmsConsignor(id).then(res => {
+      let active = res.data || {};
+      let receiverRegionCode = '';
+      if (active.provinceId) {
+        receiverRegionCode = active.provinceId;
+      }
+      if (active.cityId) {
+        receiverRegionCode = receiverRegionCode + "," + active.cityId;
+
+      }
+      if (active.districtId) {
+        receiverRegionCode = receiverRegionCode + "," + active.districtId;
+
+      }
+      if (active.streetId) {
+        receiverRegionCode = receiverRegionCode + "," + active.streetId;
+      }
+
+      Object.assign(form.value, {
+        receiverId: active.id,
+        receiverName: active.consignorName,
+        receiverRegionLabel: active.regionLabel,
+        receiverAddress: active.addressDetail,
+        receiverMobile: active.contactPhone,
+        receiverRegionCode: receiverRegionCode,
+      });
+    })
+  }
+}
+const consignorAddOption =ref({
+  labelWidth: 120,
+  group: [
+    {
+      label: '鍩虹淇℃伅',
+      prop: 'jcxx',
+      column:{
+        // consignorCode: {
+        //   label: '瑁呭嵏璐х偣缂栫爜',minWidth: 150,
+        //   addDisplay: false, disabled: true,
+        //   editDisplay: true,
+        //   viewDisplay: true,
+        //   hide: false,
+        //   search: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "瑁呭嵏璐х偣缂栫爜涓嶈兘涓虹┖", trigger: "blur"
+        //     }
+        //   ],
+        // },
+        consignorName: {
+          label: '瑁呭嵏璐х偣鍚嶇О',minWidth: 150,
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          hide: false,
+          search: true,
+          rules: [
+            {
+              required: true,
+              message: "瑁呭嵏璐х偣鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+        },
+        customerName:{
+          label: '鎵�灞炲鎴�',minWidth: 150,disabled: true,
+        },
+        // customerId: {
+        //   label: '鎵�灞炲鎴�',minWidth: 150,
+        //   addDisplay: true,
+        //   editDisplay: true,suffixIcon:'search',
+        //   viewDisplay: true,
+        //   hide: true,
+        //   search: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
+        //     }
+        //   ],
+        //   type: 'table',
+        //   children:{
+        //     border: true,
+        //     searchMenuSpan: 5,
+        //     column:{
+        //       customerType: {
+        //         label: '瀹㈡埛绫诲瀷', minWidth: 120,
+        //         type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
+        //         search: true,
+        //       },
+        //       customerShortName: {
+        //         label: '瀹㈡埛绠�绉�', minWidth: 130,
+        //         search: true,
+        //       },
+        //       customerCode: {
+        //         label: '瀹㈡埛缂栧彿',minWidth: 120,
+        //         search: true,
+        //       },
+        //       contactName: {
+        //         label: '鑱旂郴浜哄鍚�',minWidth: 120,
+        //       },
+        //       signCompanyName: {
+        //         label: '绛剧害鍏徃', minWidth: 150,
+        //       },
+        //     },
+        //
+        //   },
+        //   props:{
+        //     label: 'customerShortName',
+        //     value: 'id'
+        //   },
+        //   onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback:any) => {
+        //     if (value){
+        //       let id = value;
+        //       if (Array.isArray(value)){
+        //         id = value[0]
+        //       }
+        //       getTmsCustomerInfo(id).then(res=>{
+        //         return callback(res.data||{})
+        //       })
+        //     }else{
+        //       listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
+        //         return callback({
+        //           total: res.total,
+        //           data: res.rows||[],
+        //         })
+        //       })
+        //     }
+        //
+        //   },
+        //   change: ({value}: any) => {
+        //     if(value){
+        //       getTmsCustomerInfo(value).then(res=>{
+        //         let active = res.data || {};
+        //         if (active){
+        //           console.log(dialForm.value)
+        //           form2.value.customerId = active.id
+        //           form2.value.customerSysCode = active.customerCode
+        //           form2.value.customerName = active.customerShortName
+        //         }
+        //       })
+        //     }
+        //   },
+        // },
+        // customerSysCode: {
+        //   label: '瀹㈡埛缂栫爜',minWidth: 150,
+        //   addDisplay: true,
+        //   editDisplay: true,
+        //   viewDisplay: true,
+        //   hide: false,
+        //   search: true,
+        //   disabled: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "瀹㈡埛缂栫爜涓嶈兘涓虹┖", trigger: "blur"
+        //     }
+        //   ],
+        // },
+        consignorType: {
+          label: '瑁呭嵏璐х偣绫诲瀷',minWidth: 150,
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          hide: false,
+          search: true,
+          rules: [
+            {
+              required: true,
+              message: "瑁呭嵏璐х偣绫诲瀷涓嶈兘涓虹┖", trigger: "change"
+            }
+          ],
+        },
+      }
+    },
+    {
+      label: '鑱旂郴浜轰俊鎭�',
+      prop: 'lxrxx',
+      column:{
+        contactName: {
+          label: '鑱旂郴浜哄鍚�',minWidth: 150,
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          hide: false,
+          search: true,
+          rules: [
+            {
+              required: true,
+              message: "鑱旂郴浜哄鍚嶄笉鑳戒负绌�", trigger: "blur"
+            }
+          ],
+        },
+        contactPhone: {
+          label: '鑱旂郴浜虹數璇�',minWidth: 150,
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          hide: true,
+          search: false,
+        },
+        contactEmail: {
+          label: '鑱旂郴浜洪偖绠�',minWidth: 150,
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          hide: true,
+          search: false,
+        },
+      }
+    },
+    {
+      label: '鍦板潃淇℃伅',
+      prop: 'dzxx',
+      column:{
+
+        mapLocationDetail: {
+          label: '鍦板浘浣嶇疆',minWidth: 150,
+          addDisplay: true,
+          editDisplay: true,span:24,
+          viewDisplay: true,
+          hide: true,
+          search: false,
+          type: 'map',
+          // mapChange: async (params:any)=>{
+          //   if (params.info === "OK") {
+          //     let { province, city, district, township } = params.regeocode.addressComponent || {};
+          //     const res = await getAddressCode({province, city, district, township});
+          //     const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
+          //     form2.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
+          //     //form2.value.region = [provinceCode, cityCode, districtCode, townshipCode];
+          //     form2.value.provinceId = provinceCode;
+          //     form2.value.cityId = cityCode;
+          //     form2.value.districtId = districtCode;
+          //     form2.value.streetId = townshipCode;
+          //     form2.value.dispatchTransportArea = params.regeocode.formattedAddress;
+          //     console.log(form2.value,"form2")
+          //   }
+          // },
+          change: async ({value}:any)=>{
+            if (Array.isArray(value) && value.length === 3){
+                mapRegeo(value[1], value[0]).then(async res => {
+                  let params = res.data || {};
+                  if (params.info === "OK") {
+                    let {province, city, district, township} = params.regeocode.addressComponent || {};
+                    const res = await getAddressCode({province, city, district, township});
+                    const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
+                    form2.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
+                    form2.value.provinceId = provinceCode;
+                    form2.value.cityId = cityCode;
+                    form2.value.districtId = districtCode;
+                    form2.value.streetId = townshipCode;
+                    form2.value.dispatchTransportArea = params.regeocode.formatted_address || params.regeocode.formattedAddress;
+                    console.log(form2.value, "form2")
+                  }
+                });
+            }
+          },
+        },
+        // dispatchTransportArea: {
+        //   label: '璋冨害鍗曡繍杈撳湴',
+        //   addDisplay: true,minWidth: 150,
+        //   editDisplay: true,
+        //   viewDisplay: true,
+        //   hide: false,
+        //   search: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "璋冨害鍗曡繍杈撳湴涓嶈兘涓虹┖", trigger: "blur"
+        //     }
+        //   ],
+        // },
+        electronicFenceRange: {
+          label: '鐢靛瓙鍥存爮鑼冨洿',
+          addDisplay: true,minWidth: 150,
+          editDisplay: true,
+          viewDisplay: true,append:'绫�',
+          hide: false,
+          search: true,
+          rules: [
+            {
+              required: true,
+              message: "鐢靛瓙鍥存爮鑼冨洿涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+        },
+      }
+    },
+    {
+      label: '鍏朵粬淇℃伅',
+      prop: 'qtyxx',
+      column:{
+        remark: {
+          label: '澶囨敞',minWidth: 150,
+          type: 'textarea', minRows: 3, maxRows: 5,
+          addDisplay: true,
+          editDisplay: true,span:24,
+          viewDisplay: true,
+          hide: true,
+          search: false,
+        },
+      }
+    }
+  ],
+})
+const form2 = ref<any>({});
+const dialForm = ref();
+
+const handleAddShipper = () => {
+  if (!form.value.customerId){
+    return ElMessage.error('璇峰厛閫夋嫨杩愯緭璺嚎');
+  }
+  form2.value = {
+    customerId: form.value.customerId,
+    customerSysCode: form.value.customerCode,
+    customerName: form.value.customerName,
+  };
+  dialForm.value = $DialogForm(appContext)({
+    title: '鏂板瑁呰揣鍦�',
+    data:form2.value,
+    width: '80%',
+    option: consignorAddOption.value,
+    menuPosition: 'right',
+    callback: (res:any,) => {
+      let data1 = res.data;
+      if (data1.mapLocationDetail){
+        data1.mapLocation = data1.mapLocationDetail[0]+','+data1.mapLocationDetail[1];
+        data1.addressDetail = data1.mapLocationDetail[2]
+      }
+      addTmsConsignor({...form2.value,...data1}).then(res2=>{
+        let active = res2.data || {};
+        if (active) {
+          let shipperRegionCode = '';
+          if (active.provinceId){
+            shipperRegionCode = active.provinceId;
+          }
+          if (active.cityId){
+            shipperRegionCode =shipperRegionCode+ ","+active.cityId;
+
+          }
+          if (active.districtId){
+            shipperRegionCode =shipperRegionCode+ ","+active.districtId;
+
+          }
+          if (active.streetId){
+            shipperRegionCode =shipperRegionCode+ ","+active.streetId;
+          }
+          Object.assign(form.value, {
+            shipperId: active.id,
+            shipperName: active.consignorName,
+            shipperRegionLabel: active.regionLabel,
+            shipperAddress: active.addressDetail,
+            shipperMobile: active.contactPhone,
+            shipperRegionCode:shipperRegionCode
+          });
+        }
+        dialForm.value.close();
+        res.done();
+      }).catch(err=>{
+        res.done();
+      })
+    },
+  })
+}
+
+const handleAddReceiver = () => {
+  if (!form.value.customerId){
+    return ElMessage.error('璇峰厛閫夋嫨杩愯緭璺嚎');
+  }
+  form2.value = {
+    customerId: form.value.customerId,
+    customerSysCode: form.value.customerCode,
+    customerName: form.value.customerName,
+  };
+  dialForm.value = $DialogForm(appContext)({
+    title: '鏂板鍗歌揣鍦�',
+    data:form2.value,
+    width: '80%',
+    option: consignorAddOption.value,
+    menuPosition: 'right',
+    callback: (res:any,) => {
+      let data1 = res.data;
+      if (data1.mapLocationDetail){
+        data1.mapLocation = data1.mapLocationDetail[0]+','+data1.mapLocationDetail[1];
+        data1.addressDetail = data1.mapLocationDetail[2]
+      }
+      addTmsConsignor({...form2.value,...data1}).then(res2=>{
+        let active = res2.data || {};
+        if (active) {
+          let receiverRegionCode = '';
+          if (active.provinceId){
+            receiverRegionCode = active.provinceId;
+          }
+          if (active.cityId){
+            receiverRegionCode =receiverRegionCode+ ","+active.cityId;
+
+          }
+          if (active.districtId){
+            receiverRegionCode =receiverRegionCode+ ","+active.districtId;
+
+          }
+          if (active.streetId){
+            receiverRegionCode =receiverRegionCode+ ","+active.streetId;
+          }
+
+          Object.assign(form.value, {
+            receiverId: active.id,
+            receiverName: active.consignorName,
+            receiverRegionLabel: active.regionLabel,
+            receiverAddress: active.addressDetail,
+            receiverMobile: active.contactPhone,
+            receiverRegionCode:receiverRegionCode,
+          });
+        }
+        dialForm.value.close();
+        res.done();
+      }).catch(err=>{
+        res.done();
+      })
+    },
+  })
+}
+
 
 </script>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue b/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
index 7fcdd5f..adc44c3 100644
--- a/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
@@ -99,82 +99,82 @@
       label: '鍩虹淇℃伅',
       prop: 'jcxx',
       column: {
-        customerId: {
-          label: '鎵�灞炲鎴�',minWidth: 150,
-          addDisplay: true,
-          editDisplay: true,suffixIcon:'search',
-          viewDisplay: true,
-          hide: true,
-          search: true,
-          rules: [
-            {
-              required: true,
-              message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
-            }
-          ],
-          type: 'table',
-          children:{
-            border: true,
-            searchMenuSpan: 5,
-            column:{
-              customerType: {
-                label: '瀹㈡埛绫诲瀷', minWidth: 120,
-                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
-                search: true,
-              },
-              customerShortName: {
-                label: '瀹㈡埛绠�绉�', minWidth: 130,
-                search: true,
-              },
-              customerCode: {
-                label: '瀹㈡埛缂栧彿',minWidth: 120,
-                search: true,
-              },
-              contactName: {
-                label: '鑱旂郴浜哄鍚�',minWidth: 120,
-              },
-              signCompanyName: {
-                label: '绛剧害鍏徃', minWidth: 150,
-              },
-            },
-
-          },
-          props:{
-            label: 'customerShortName',
-            value: 'id'
-          },
-          onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback:any) => {
-            if (value){
-              let id = value;
-              if (Array.isArray(value)){
-                id = value[0]
-              }
-              getTmsCustomerInfo(id).then(res=>{
-                return callback(res.data||{})
-              })
-            }else{
-              listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
-                return callback({
-                  total: res.total,
-                  data: res.rows||[],
-                })
-              })
-            }
-
-          },
-          change: (val: any) => {
-            const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
-            if (!table) return;
-            let active = table.active;
-            if (Array.isArray(active)) active = active[0];
-            if (active) {
-              Object.assign(form.value, {
-                customerId: active.id,
-                customer: active.customerShortName,
-              });
-            }
-          },
-        },
+        // customerId: {
+        //   label: '鎵�灞炲鎴�',minWidth: 150,
+        //   addDisplay: true,
+        //   editDisplay: true,suffixIcon:'search',
+        //   viewDisplay: true,
+        //   hide: true,
+        //   search: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
+        //     }
+        //   ],
+        //   type: 'table',
+        //   children:{
+        //     border: true,
+        //     searchMenuSpan: 5,
+        //     column:{
+        //       customerType: {
+        //         label: '瀹㈡埛绫诲瀷', minWidth: 120,
+        //         type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
+        //         search: true,
+        //       },
+        //       customerShortName: {
+        //         label: '瀹㈡埛绠�绉�', minWidth: 130,
+        //         search: true,
+        //       },
+        //       customerCode: {
+        //         label: '瀹㈡埛缂栧彿',minWidth: 120,
+        //         search: true,
+        //       },
+        //       contactName: {
+        //         label: '鑱旂郴浜哄鍚�',minWidth: 120,
+        //       },
+        //       signCompanyName: {
+        //         label: '绛剧害鍏徃', minWidth: 150,
+        //       },
+        //     },
+        //
+        //   },
+        //   props:{
+        //     label: 'customerShortName',
+        //     value: 'id'
+        //   },
+        //   onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback:any) => {
+        //     if (value){
+        //       let id = value;
+        //       if (Array.isArray(value)){
+        //         id = value[0]
+        //       }
+        //       getTmsCustomerInfo(id).then(res=>{
+        //         return callback(res.data||{})
+        //       })
+        //     }else{
+        //       listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
+        //         return callback({
+        //           total: res.total,
+        //           data: res.rows||[],
+        //         })
+        //       })
+        //     }
+        //
+        //   },
+        //   change: (val: any) => {
+        //     const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
+        //     if (!table) return;
+        //     let active = table.active;
+        //     if (Array.isArray(active)) active = active[0];
+        //     if (active) {
+        //       Object.assign(form.value, {
+        //         customerId: active.id,
+        //         customer: active.customerShortName,
+        //       });
+        //     }
+        //   },
+        // },
         productCode: {
           label: '璐у搧缂栫爜',
           addDisplay: true,
@@ -411,12 +411,12 @@
     //   search: false,
     // },
 
-    customer: {
-      label: '鎵�灞炲鎴�',
-      display: false,
-      hide: false, minWidth: 150,
-      search: true,
-    },
+    // customer: {
+    //   label: '鎵�灞炲鎴�',
+    //   display: false,
+    //   hide: false, minWidth: 150,
+    //   search: true,
+    // },
     productCode: {
       label: '璐у搧缂栫爜',
       display: false,
diff --git a/ui/admin-ui3/src/views/tms/tmsSettlementEntity/index.vue b/ui/admin-ui3/src/views/tms/tmsSettlementEntity/index.vue
index d778149..2b5d568 100644
--- a/ui/admin-ui3/src/views/tms/tmsSettlementEntity/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsSettlementEntity/index.vue
@@ -134,12 +134,7 @@
           viewDisplay: true,
           hide: false,minWidth:150,
           search: true,
-          rules: [
-            {
-              required: true,
-              message: "杩愯惀涓讳綋绠�绉颁笉鑳戒负绌�", trigger: "blur"
-            }
-          ],
+
         },
 
         customerFullName: {
@@ -149,6 +144,12 @@
           viewDisplay: true,
           hide: true,
           search: false,
+          rules: [
+            {
+              required: true,
+              message: "杩愯惀涓讳綋鍏ㄧО涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
         },
         businessRegistrationNumber: {
           label: '缁忚惀鐧昏璇佷欢鍙风爜',
@@ -241,89 +242,89 @@
     //     },
     //   }
     // },
-    {
-      label: '淇$敤淇℃伅',
-      prop: 'xyxx',
-      addDisplay: false,
-      editDisplay: false,
-      viewDisplay: true,
-      column: {
-        creditRating: {
-          label: '杩愯惀涓讳綋淇$敤璇勭骇',
-          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_credit_rating',
-          addDisplay: false,
-          editDisplay: false,
-          viewDisplay: true,
-          hide: false,minWidth:150,
-          search: true,
-        },
-        creditLimitAmount: {
-          label: '淇$敤棰濆害',
-          addDisplay: false,
-          editDisplay: false,
-          viewDisplay: true,
-          hide: false,minWidth:150,
-          search: true,
-        },
-        creditLimitQuantity: {
-          label: '淇$敤棰濆害',
-          addDisplay: false,
-          editDisplay: false,
-          viewDisplay: true,
-          hide: false,minWidth:150,
-          search: true,
-        },
-        operatingStatus: {
-          label: '缁忚惀鐘舵��',
-          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/business_status',
-          addDisplay: false,
-          editDisplay: false,
-          viewDisplay: true,
-          hide: false,minWidth:150,
-          search: true,
-          rules: [
-            {
-              required: true,
-              message: "缁忚惀鐘舵�佷笉鑳戒负绌�", trigger: "change"
-            }
-          ],
-        },
-        contractStatus: {
-          label: '鍚堝悓鐘舵��',
-          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
-          addDisplay: false,
-          editDisplay: false,
-          viewDisplay: true,
-          hide: false,minWidth:150,
-          search: true,
-          rules: [
-            {
-              required: true,
-              message: "鍚堝悓鐘舵�佷笉鑳戒负绌�", trigger: "change"
-            }
-          ],
-        },
-      }
-    },
+    // {
+    //   label: '淇$敤淇℃伅',
+    //   prop: 'xyxx',
+    //   addDisplay: false,
+    //   editDisplay: false,
+    //   viewDisplay: true,
+    //   column: {
+    //     creditRating: {
+    //       label: '杩愯惀涓讳綋淇$敤璇勭骇',
+    //       type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_credit_rating',
+    //       addDisplay: false,
+    //       editDisplay: false,
+    //       viewDisplay: true,
+    //       hide: false,minWidth:150,
+    //       search: true,
+    //     },
+    //     creditLimitAmount: {
+    //       label: '淇$敤棰濆害',
+    //       addDisplay: false,
+    //       editDisplay: false,
+    //       viewDisplay: true,
+    //       hide: false,minWidth:150,
+    //       search: true,
+    //     },
+    //     creditLimitQuantity: {
+    //       label: '淇$敤棰濆害',
+    //       addDisplay: false,
+    //       editDisplay: false,
+    //       viewDisplay: true,
+    //       hide: false,minWidth:150,
+    //       search: true,
+    //     },
+    //     operatingStatus: {
+    //       label: '缁忚惀鐘舵��',
+    //       type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/business_status',
+    //       addDisplay: false,
+    //       editDisplay: false,
+    //       viewDisplay: true,
+    //       hide: false,minWidth:150,
+    //       search: true,
+    //       rules: [
+    //         {
+    //           required: true,
+    //           message: "缁忚惀鐘舵�佷笉鑳戒负绌�", trigger: "change"
+    //         }
+    //       ],
+    //     },
+    //     contractStatus: {
+    //       label: '鍚堝悓鐘舵��',
+    //       type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
+    //       addDisplay: false,
+    //       editDisplay: false,
+    //       viewDisplay: true,
+    //       hide: false,minWidth:150,
+    //       search: true,
+    //       rules: [
+    //         {
+    //           required: true,
+    //           message: "鍚堝悓鐘舵�佷笉鑳戒负绌�", trigger: "change"
+    //         }
+    //       ],
+    //     },
+    //   }
+    // },
     {
       label: '鍏朵粬淇℃伅',
       prop: 'qtyxx',
       column: {
-        dataStatus: {
-          label: '鏁版嵁鐘舵��',
-          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/data_status',
-          addDisplay: false,
-          editDisplay: false,
-          viewDisplay: true,
-          hide: false,minWidth:150,
-          search: true,
-          rules: [
-            {
-              required: true,
-              message: "鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "change"
-            }
-          ],
-        },
+        // dataStatus: {
+        //   label: '鏁版嵁鐘舵��',
+        //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/data_status',
+        //   addDisplay: false,
+        //   editDisplay: false,
+        //   viewDisplay: true,
+        //   hide: false,minWidth:150,
+        //   search: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "change"
+        //     }
+        //   ],
+        // },
         createBy: {
           label: '鍒涘缓浜�',
           addDisplay: false,
@@ -372,17 +373,21 @@
   ],
 
   column: {
-    customerType: {
-      label: '杩愯惀涓讳綋绫诲瀷',
-      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
-      display: false,
-      hide: false,minWidth:150,
-      search: true,
-    },
+    // customerType: {
+    //   label: '杩愯惀涓讳綋绫诲瀷',
+    //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
     customerShortName: {
       label: '杩愯惀涓讳綋绠�绉�',
       display: false,
       hide: false,minWidth:150,
+      search: true,
+    },
+    customerFullName: {
+      label: '杩愯惀涓讳綋鍏ㄧО', minWidth: 150,   display: false,
       search: true,
     },
     customerCode: {
@@ -409,25 +414,25 @@
     //     }
     //   ],
     // },
-    creditRating: {
-      label: '杩愯惀涓讳綋淇$敤璇勭骇',
-      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_credit_rating',
-      display: false,
-      hide: false,minWidth:150,
-      search: true,
-    },
-    creditLimitAmount: {
-      label: '淇$敤棰濆害',
-      display: false,
-      hide: false,minWidth:150,
-      search: true,
-    },
-    creditLimitQuantity: {
-      label: '淇$敤棰濆害',
-      display: false,
-      hide: false,minWidth:150,
-      search: true,
-    },
+    // creditRating: {
+    //   label: '杩愯惀涓讳綋淇$敤璇勭骇',
+    //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_credit_rating',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
+    // creditLimitAmount: {
+    //   label: '淇$敤棰濆害',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
+    // creditLimitQuantity: {
+    //   label: '淇$敤棰濆害',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
     operatingStatus: {
       label: '缁忚惀鐘舵��',
       type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/business_status',
@@ -435,26 +440,26 @@
       hide: false,minWidth:150,
       search: true,
     },
-    contractStatus: {
-      label: '鍚堝悓鐘舵��',
-      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
-      display: false,
-      hide: false,minWidth:150,
-      search: true,
-    },
-    dataStatus: {
-      label: '鏁版嵁鐘舵��',
-      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/data_status',
-      display: false,
-      hide: false,minWidth:150,
-      search: true,
-      rules: [
-        {
-          required: true,
-          message: "鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "change"
-        }
-      ],
-    },
+    // contractStatus: {
+    //   label: '鍚堝悓鐘舵��',
+    //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
+    // dataStatus: {
+    //   label: '鏁版嵁鐘舵��',
+    //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/data_status',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    //   rules: [
+    //     {
+    //       required: true,
+    //       message: "鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "change"
+    //     }
+    //   ],
+    // },
     updateBy: {
       label: '鏇存柊浜�',
       display: false,
diff --git a/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue b/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
index c5fab1b..9239cfe 100644
--- a/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
@@ -66,6 +66,7 @@
 import {hasPermission} from "@/utils/permissionUtils";
 import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
 import {getTmsServiceProvider, listTmsServiceProvider} from "@/api/tms/tmsServiceProvider";
+import {getTmsSettlementEntity, listTmsSettlementEntity} from "@/api/tms/tmsSettlementEntity";
 
 const {proxy} = useCurrentInstance();
 const crudRef = ref();
@@ -112,10 +113,10 @@
             }
           ],
         },
-        carrierType:{
+        carrierType: {
           label: '杞﹁締鏈嶅姟鍟嗙被鍨�',
           display: true,
-          type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type',value: '0',
+          type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type', value: '0',
           rules: [
             {
               required: true,
@@ -123,13 +124,96 @@
             }
           ],
           change: ({value}: any) => {
-           option.value.group.forEach((item:any) =>{
-             if (item.prop == 'jbxx'){
-               item.column.serviceProviderId.display = value == 1
-             }
-           })
+            option.value.group.forEach((item: any) => {
+              if (item.prop == 'jbxx') {
+                item.column.serviceProviderId.display = value == 1
+                item.column.settlementId.display = value != 1
+              }
+            })
             console.log(value)
           }
+        },
+        settlementId: {
+          label: '鎵�灞炶繍钀ヤ富浣�',
+          minWidth: 150,
+          display: true,
+          hide: false,
+          search: true,
+          rules: [
+            {
+              required: true,
+              message: "鎵�灞炶繍钀ヤ富浣撲笉鑳戒负绌�", trigger: "change"
+            }
+          ],
+          type: 'table', suffixIcon: 'search',
+          children: {
+            border: true,
+            searchLabelWidth: 100,
+            searchMenuSpan: 5,
+            column: {
+              customerCode: {
+                label: '杩愯惀涓讳綋缂栧彿', minWidth: 130,
+                search: true,
+              },
+              customerShortName: {
+                label: '杩愯惀涓讳綋绠�绉�', minWidth: 120,
+                search: true,
+              },
+              customerFullName: {
+                label: '杩愯惀涓讳綋鍏ㄧО', minWidth: 120,
+                search: true,
+              },
+              contactName: {
+                label: '鑱旂郴浜哄鍚�',
+                display: false,
+                hide: false, minWidth: 150,
+                search: true,
+              },
+              operatingStatus: {
+                label: '缁忚惀鐘舵��',
+                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/business_status',
+                display: false,
+                hide: false, minWidth: 150,
+                search: true,
+              },
+            },
+
+          },
+          props: {
+            label: 'customerFullName',
+            value: 'id'
+          },
+          onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
+            if (value) {
+              let id = value;
+              if (Array.isArray(value)) {
+                id = value[0]
+              }
+              getTmsSettlementEntity(id).then(res => {
+                return callback(res.data || {})
+              })
+            } else {
+              listTmsSettlementEntity({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+                return callback({
+                  total: res.total,
+                  data: res.rows || [],
+                })
+              })
+            }
+
+          },
+          change: (val: any) => {
+            const table = crudRef.value?.getPropRef?.('settlementId')?.$refs?.temp;
+            if (!table) return;
+            let active = table.active;
+            if (Array.isArray(active)) active = active[0];
+            if (active) {
+              Object.assign(form.value, {
+                settlementId: active.id,
+                settlementName: active.customerFullName,
+              });
+            }
+          },
         },
         serviceProviderId: {
           label: '杞﹁締鏈嶅姟鍟�',
@@ -182,38 +266,49 @@
               },
             },
 
-          },
-          props: {
-            label: 'serviceShortName',
-            value: 'id'
-          },
-          onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
-            if (value) {
-              let id = value;
-              if (Array.isArray(value)) {
-                id = value[0]
-              }
-              getTmsServiceProvider(id).then(res => {
-                return callback(res.data || {})
-              })
-            } else {
-              listTmsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
-                return callback({
-                  total: res.total,
-                  data: res.rows || [],
+            },
+            props: {
+              label: 'serviceShortName',
+              value: 'id'
+            },
+            onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
+              if (value) {
+                let id = value;
+                if (Array.isArray(value)) {
+                  id = value[0]
+                }
+                getTmsServiceProvider(id).then(res => {
+                  return callback(res.data || {})
                 })
-              })
+              } else {
+                listTmsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+                  return callback({
+                    total: res.total,
+                    data: res.rows || [],
+                  })
+                })
+              }
+
+            },
+            change: (val: any) => {
+              const table = crudRef.value?.getPropRef?.('serviceProviderId')?.$refs?.temp;
+              if (!table) return;
+              let active = table.active;
+              if (Array.isArray(active)) active = active[0];
+              if (active) {
+                Object.assign(form.value, {
+                  serviceProviderId: active.id,
+                  serviceProviderName: active.serviceShortName,
+                });
+              }
             }
-
-          }
-
         },
-        vehicleType: {
-          label: '杞﹁締绫诲瀷',
-          addDisplay: true, minWidth: 150,
-          editDisplay: true,
-          viewDisplay: true,
-          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
+            vehicleType: {
+              label: '杞﹁締绫诲瀷',
+              addDisplay: true, minWidth: 150,
+              editDisplay: true,
+              viewDisplay: true,
+              type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
 
         },
         internalCode: {
@@ -270,6 +365,12 @@
           hide: true,
           search: false,
         },
+        carKeyNo: {
+          label: '杞﹁締閽ュ寵缂栧彿',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
         isBlacklist: {
           label: '鏄惁榛戝悕鍗�', value: '1', dataType: 'string',
           type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is',
@@ -315,6 +416,7 @@
             }
           ],
         },
+
       }
     },
     {
@@ -363,7 +465,7 @@
     },
     {
       label: '瀹炴椂淇℃伅',
-      prop: 'ssxx',addDisplay: false,editDisplay: false,
+      prop: 'ssxx', addDisplay: false, editDisplay: false,
       column: {
         hasTask: {
           label: '鏄惁鏈変换鍔�',
@@ -396,7 +498,7 @@
         },
       }
     },
-      {
+    {
       label: '杞﹁締璇︾粏淇℃伅',
       prop: 'clxqxx',
       column: {
@@ -434,7 +536,7 @@
         },
         emptyLoadFuel: {
           label: '绌鸿浇娌硅��',
-          addDisplay: true,append:'L/Km',
+          addDisplay: true, append: 'L/Km',
           editDisplay: true,
           viewDisplay: true, minWidth: 150,
           hide: true,
@@ -442,7 +544,7 @@
         },
         fullLoadFuel: {
           label: '閲嶈浇娌硅��',
-          addDisplay: true,append:'L/Km',
+          addDisplay: true, append: 'L/Km',
           editDisplay: true, minWidth: 150,
           viewDisplay: true,
           hide: true,
@@ -459,7 +561,7 @@
         purchasePrice: {
           label: '杞﹁締璐疆浠�', minWidth: 150,
           addDisplay: true,
-          editDisplay: true,append:'涓囧厓',
+          editDisplay: true, append: '涓囧厓',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -499,7 +601,7 @@
         actualLength: {
           label: '瀹為檯闀�',
           addDisplay: true,
-          editDisplay: true,append:'mm',
+          editDisplay: true, append: 'mm',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -507,7 +609,7 @@
         actualWidth: {
           label: '瀹為檯瀹�',
           addDisplay: true,
-          editDisplay: true,append:'mm',
+          editDisplay: true, append: 'mm',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -515,7 +617,7 @@
         actualHeight: {
           label: '瀹為檯楂�',
           addDisplay: true,
-          editDisplay: true,append:'mm',
+          editDisplay: true, append: 'mm',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -523,7 +625,7 @@
         loadVolume: {
           label: '瑁呰浇浣撶Н',
           addDisplay: true,
-          editDisplay: true,append:'m鲁',
+          editDisplay: true, append: 'm鲁',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -531,7 +633,7 @@
         loadWeight: {
           label: '瑁呰浇閲嶉噺',
           addDisplay: true,
-          editDisplay: true,append:'Kg',
+          editDisplay: true, append: 'Kg',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -559,7 +661,7 @@
       prop: 'qtxx',
       column: {
         status: {
-          label: '鐘舵��',row:true,span:24,
+          label: '鐘舵��', row: true, span: 24,
           type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
           addDisplay: false,
           editDisplay: false, dataType: 'string',
@@ -626,7 +728,7 @@
     },
     serviceProviderName: {
       label: '杞﹁締鏈嶅姟鍟�',
-       minWidth: 150,
+      minWidth: 150,
       display: false,
       hide: false,
       search: true,
@@ -636,10 +738,11 @@
       display: false,
       hide: false,
       search: true,
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
 
     },
     internalCode: {
-      label: '杞﹁締鍐呴儴缂栫爜',minWidth: 150,
+      label: '杞﹁締鍐呴儴缂栫爜', minWidth: 150,
       display: false,
       hide: false,
       search: false,
@@ -658,16 +761,16 @@
       search: false,
     },
     licenseMo: {
-      label: '婢抽棬鐗岀収',minWidth: 150,
+      label: '婢抽棬鐗岀収', minWidth: 150,
       display: false,
       hide: false,
       search: false,
     },
     hasTask: {
       label: '鏄惁鏈変换鍔�',
-     type: 'select',
+      type: 'select',
       dataType: 'string',
-       minWidth: 150, dicUrl: '/system/dict/data/type/sys_number_is',
+      minWidth: 150, dicUrl: '/system/dict/data/type/sys_number_is',
       display: false,
       search: true,
       rules: [
@@ -694,7 +797,7 @@
       label: '鐘舵��',
       type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
       display: false, dataType: 'string',
-       minWidth: 150,
+      minWidth: 150,
       hide: false,
       search: true,
       rules: [
@@ -711,7 +814,7 @@
       search: false,
     },
     updateTime: {
-      label: '鏇存柊鏃堕棿',minWidth: 180,
+      label: '鏇存柊鏃堕棿', minWidth: 180,
       display: false,
       hide: false,
       search: false,
@@ -755,25 +858,6 @@
     selectionList.value = selection;
   }
 })
-onMounted(() => {
-  watch(() => form.value.serviceProviderId, () => {
 
-    if (!form.value.serviceProviderId){
-      return;
-    }
-    const table = crudRef.value?.getPropRef?.('serviceProviderId')?.$refs?.temp;
-    if (!table) return;
-
-    let active = table.active;
-    if (Array.isArray(active)) active = active[0];
-
-    if (active) {
-      Object.assign(form.value, {
-        serviceProviderId: active.id,
-        serviceProviderName: active.serviceShortName,
-      });
-    }
-  });
-});
 
 </script>

--
Gitblit v1.8.0