From 0481353111afb43a2322e18530dde26f1d841ead Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期五, 21 四月 2023 11:15:34 +0800
Subject: [PATCH] 代码调整

---
 ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tCar/tCar_info.js |  442 +++++++++++++++++++++++++++----------------------------
 1 files changed, 216 insertions(+), 226 deletions(-)

diff --git a/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tCar/tCar_info.js b/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tCar/tCar_info.js
index 76181f7..169b423 100644
--- a/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tCar/tCar_info.js
+++ b/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tCar/tCar_info.js
@@ -4,24 +4,24 @@
 var TCarInfoDlg = {
     tCarInfoData : {},
     validateFields: {
-        // carBrandId: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '请选择车辆品牌'
-        //         }
-        //     }
-        // },
-        // carModelId: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '请选择车辆类型'
-        //         }
-        //     }
-        // },
+        carBrandId: {
+            validators: {
+                notEmpty: {
+                    message: '请选择车辆品牌'
+                }
+            }
+        },
+        carModelId: {
+            validators: {
+                notEmpty: {
+                    message: '请选择车辆类型'
+                }
+            }
+        },
         zcModel: {
             validators: {
                 notEmpty: {
-                    message: '请选择快车车型'
+                    message: '请选择专车车型'
                 }
             }
         },
@@ -32,13 +32,6 @@
                 }
             }
         },
-        carLicensePlate: {
-            validators: {
-                notEmpty: {
-                    message: '车牌号不能为空'
-                }
-            }
-        },
         carColor: {
             validators: {
                 notEmpty: {
@@ -46,195 +39,195 @@
                 }
             }
         },
-        // drivingLicenseNumber: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '行驶证编号不能为空'
-        //         }
-        //     }
-        // },
-        // annualInspectionTime: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '年检到期时间不能为空'
-        //         }
-        //     }
-        // },
-        // commercialInsuranceTime: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '商业保险到期时间不能为空'
-        //         }
-        //     }
-        // },
-        // plateColor: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车牌颜色不能为空'
-        //         }
-        //     }
-        // },
-        // vehicleType: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆类型不能为空'
-        //         }
-        //     }
-        // },
-        // ownerName: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆所有人不能为空'
-        //         }
-        //     }
-        // },
-        // engineId: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '发动机号不能为空'
-        //         }
-        //     }
-        // },
-        // VIN: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆VIN码不能为空'
-        //         }
-        //     }
-        // },
-        // certifyDateA: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆注册日期不能为空'
-        //         }
-        //     }
-        // },
-        // fuelType: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆燃料类型不能为空'
-        //         }
-        //     }
-        // },
-        // engineDisplace: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '发动机排量不能为空'
-        //         }
-        //     }
-        // },
-        // certificate: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '运输证字号不能为空'
-        //         }
-        //     }
-        // },
-        // transAgency: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆运输证发证机构不能为空'
-        //         }
-        //     }
-        // },
-        // transArea: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆经营区域不能为空'
-        //         }
-        //     }
-        // },
-        // transDateStart: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆运输证有效期起不能为空'
-        //         }
-        //     }
-        // },
-        // transDateStop: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆运输证有效期止不能为空'
-        //         }
-        //     }
-        // },
-        // certifyDateB: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆初次登记日期不能为空'
-        //         }
-        //     }
-        // },
-        // fixState: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆维修状态不能为空'
-        //         }
-        //     }
-        // },
-        // nextFixDate: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆下次年检时间不能为空'
-        //         }
-        //     }
-        // },
-        // checkState: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆年度审核状态不能为空'
-        //         }
-        //     }
-        // },
-        // feePrintId: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '发票打印设备序列号不能为空'
-        //         }
-        //     }
-        // },
-        // GPSBrand: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '卫星定位装置品牌不能为空'
-        //         }
-        //     }
-        // },
-        // GPSModel: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '卫星定位装置型号不能为空'
-        //         }
-        //     }
-        // },
-        // GPSIMEI: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '卫星定位装置IMEI号不能为空'
-        //         }
-        //     }
-        // },
-        // GPSInstallDate: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '卫星定位装置安装时间不能为空'
-        //         }
-        //     }
-        // },
-        // registerDate: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '车辆报备日期不能为空'
-        //         }
-        //     }
-        // },
-        // commercialType: {
-        //     validators: {
-        //         notEmpty: {
-        //             message: '服务类型不能为空'
-        //         }
-        //     }
-        // }
+        drivingLicenseNumber: {
+            validators: {
+                notEmpty: {
+                    message: '行驶证编号不能为空'
+                }
+            }
+        },
+        annualInspectionTime: {
+            validators: {
+                notEmpty: {
+                    message: '年检到期时间不能为空'
+                }
+            }
+        },
+        commercialInsuranceTime: {
+            validators: {
+                notEmpty: {
+                    message: '商业保险到期时间不能为空'
+                }
+            }
+        },
+        plateColor: {
+            validators: {
+                notEmpty: {
+                    message: '车牌颜色不能为空'
+                }
+            }
+        },
+        vehicleType: {
+            validators: {
+                notEmpty: {
+                    message: '车辆类型不能为空'
+                }
+            }
+        },
+        ownerName: {
+            validators: {
+                notEmpty: {
+                    message: '车辆所有人不能为空'
+                }
+            }
+        },
+        engineId: {
+            validators: {
+                notEmpty: {
+                    message: '发动机号不能为空'
+                }
+            }
+        },
+        VIN: {
+            validators: {
+                notEmpty: {
+                    message: '车辆VIN码不能为空'
+                }
+            }
+        },
+        certifyDateA: {
+            validators: {
+                notEmpty: {
+                    message: '车辆注册日期不能为空'
+                }
+            }
+        },
+        fuelType: {
+            validators: {
+                notEmpty: {
+                    message: '车辆燃料类型不能为空'
+                }
+            }
+        },
+        engineDisplace: {
+            validators: {
+                notEmpty: {
+                    message: '发动机排量不能为空'
+                }
+            }
+        },
+        certificate: {
+            validators: {
+                notEmpty: {
+                    message: '运输证字号不能为空'
+                }
+            }
+        },
+        transAgency: {
+            validators: {
+                notEmpty: {
+                    message: '车辆运输证发证机构不能为空'
+                }
+            }
+        },
+        transArea: {
+            validators: {
+                notEmpty: {
+                    message: '车辆经营区域不能为空'
+                }
+            }
+        },
+        transDateStart: {
+            validators: {
+                notEmpty: {
+                    message: '车辆运输证有效期起不能为空'
+                }
+            }
+        },
+        transDateStop: {
+            validators: {
+                notEmpty: {
+                    message: '车辆运输证有效期止不能为空'
+                }
+            }
+        },
+        certifyDateB: {
+            validators: {
+                notEmpty: {
+                    message: '车辆初次登记日期不能为空'
+                }
+            }
+        },
+        fixState: {
+            validators: {
+                notEmpty: {
+                    message: '车辆维修状态不能为空'
+                }
+            }
+        },
+        nextFixDate: {
+            validators: {
+                notEmpty: {
+                    message: '车辆下次年检时间不能为空'
+                }
+            }
+        },
+        checkState: {
+            validators: {
+                notEmpty: {
+                    message: '车辆年度审核状态不能为空'
+                }
+            }
+        },
+        feePrintId: {
+            validators: {
+                notEmpty: {
+                    message: '发票打印设备序列号不能为空'
+                }
+            }
+        },
+        GPSBrand: {
+            validators: {
+                notEmpty: {
+                    message: '卫星定位装置品牌不能为空'
+                }
+            }
+        },
+        GPSModel: {
+            validators: {
+                notEmpty: {
+                    message: '卫星定位装置型号不能为空'
+                }
+            }
+        },
+        GPSIMEI: {
+            validators: {
+                notEmpty: {
+                    message: '卫星定位装置IMEI号不能为空'
+                }
+            }
+        },
+        GPSInstallDate: {
+            validators: {
+                notEmpty: {
+                    message: '卫星定位装置安装时间不能为空'
+                }
+            }
+        },
+        registerDate: {
+            validators: {
+                notEmpty: {
+                    message: '车辆报备日期不能为空'
+                }
+            }
+        },
+        commercialType: {
+            validators: {
+                notEmpty: {
+                    message: '服务类型不能为空'
+                }
+            }
+        }
     }
 };
 
@@ -261,10 +254,7 @@
  * @param val 数据的具体值
  */
 TCarInfoDlg.set = function(key, val) {
-    var v = $("#" + key).val();
-    if('' != v){
-        this.tCarInfoData[key] = (typeof val == "undefined") ? v : val;
-    }
+    this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
     return this;
 }
 
@@ -367,11 +357,11 @@
         Feng.info("请上传车辆照片");
         return;
     }
-    // var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf();
-    // if ("" == drivingLicensePhoto){
-    //     Feng.info("请上传行驶证照片");
-    //     return;
-    // }
+    var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf();
+    if ("" == drivingLicensePhoto){
+        Feng.info("请上传行驶证照片");
+        return;
+    }
 
     //提交信息
     var ajax = new $ax(Feng.ctxPath + "/tCar/add", function(data){
@@ -439,11 +429,11 @@
         Feng.info("请上传车辆照片");
         return;
     }
-    // var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf();
-    // if ("" == drivingLicensePhoto){
-    //     Feng.info("请上传行驶证照片");
-    //     return;
-    // }
+    var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf();
+    if ("" == drivingLicensePhoto){
+        Feng.info("请上传行驶证照片");
+        return;
+    }
     //提交信息
     var ajax = new $ax(Feng.ctxPath + "/tCar/update", function(data){
         Feng.success("修改成功!");
@@ -536,7 +526,7 @@
 }
 
 /**
- * 快车服务被点击
+ * 专车服务被点击
  */
 TCarInfoDlg.zcServerClick = function () {
     var serverBox1 = $('#serverBox1').prop('checked');

--
Gitblit v1.7.1