Jelajahi Sumber

去掉发件货物名称不能为空的验证

daxu0403 7 tahun lalu
induk
melakukan
ffa32ba5e7
3 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 3 3
      lib/pages/send_express_page.dart
  2. 1 1
      lib/util/config.dart
  3. 2 2
      lib/util/models.dart

+ 3 - 3
lib/pages/send_express_page.dart

@@ -1007,9 +1007,9 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
         if (receiptCompanyAddress == '') {
           errStr = '请填写收件详细地址';
         }
-        if (goods == '') {
-          errStr = '请填写货物名称';
-        }
+        // if (goods == '') {
+        //   errStr = '请填写货物名称';
+        // }
         if (goodsQuantity == 0) {
           errStr = '请填写货物数量';
         }

+ 1 - 1
lib/util/config.dart

@@ -1,6 +1,6 @@
 class Config{
   String baseUrl = "https://logistics.5fire.tech/";
-  //String baseUrl='http://192.168.100.11:8866/';
+  //String baseUrl='http://192.168.100.8:8866/';
   int connectTimeout = 30000;
   int receiveTimeout = 30000;
 }

+ 2 - 2
lib/util/models.dart

@@ -552,7 +552,7 @@ class OrderDetailData {
     return OrderDetailData(
         createTime:json['createTime'],
         orderNo: json['orderNo'],
-        goods: json['goods'],
+        goods: json['goods'] ?? '',
         goodsAgencyFund: json['goodsAgencyFund'] ?? 0,
         goodsCategoryId:json['goodsCategoryId'],
         goodsCategoryName:json['goodsCategoryName'],
@@ -566,7 +566,7 @@ class OrderDetailData {
         goodsPaymentMethod:json['goodsPaymentMethod'],
         goodsQuantity: json['goodsQuantity'],
         goodsValue: json['goodsValue'],
-        goodsWeight: json['goodsWeight'],
+        goodsWeight: json['goodsWeight'] ?? 0,
         id: json['id'],
         lineCode:json['lineCode'],
         lineId:json['lineId'],