Просмотр исходного кода

修复离线编辑联系人图片不可见。

Pen Li 9 лет назад
Родитель
Сommit
4bef2853b8

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 4 - 1
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -3345,7 +3345,7 @@
     if (update){
         contact_id = [params objectForKey:@"contact_id"];
         if (!contact_id) {
-            contact_id = [NSUUID UUID].UUIDString;
+            contact_id = @"";
         }
         sql = [NSString stringWithFormat:@"update offline_contact set company_name = '%@',addr_1 = '%@',addr_2 = '%@',addr_3 = '%@',addr_4 = '%@',country = '%@',state = '%@',city = '%@',zipcode = '%@',first_name = '%@',last_name = '%@',phone = '%@',fax = '%@',email = '%@',notes = '%@',price_type = '%@',sales_rep = '%@',img_0 = '%@',img_1 = '%@',img_2 = '%@' where contact_id = '%@';",companyName,addr1,addr2,addr3,addr4,country,state,city,zipcode,fistName,lastName,phone,fax,email,notes,price,salesRep,img_0,img_1,img_2,contact_id];
     } else
@@ -3654,6 +3654,9 @@
     [self setValue:img_0 forItemKey:@"item_3" valueKey:@"img_url_aname_0" inDictionary:section_0];
     [self setValue:img_1 forItemKey:@"item_3" valueKey:@"img_url_aname_1" inDictionary:section_0];
     [self setValue:img_2 forItemKey:@"item_3" valueKey:@"img_url_aname_2" inDictionary:section_0];
+    [self setValue:img_0 forItemKey:@"item_3" valueKey:@"img_url_0" inDictionary:section_0];
+    [self setValue:img_1 forItemKey:@"item_3" valueKey:@"img_url_1" inDictionary:section_0];
+    [self setValue:img_2 forItemKey:@"item_3" valueKey:@"img_url_2" inDictionary:section_0];
     
     // addr 1 2 3 4
     [self setValue:addr_1 forItemKey:@"item_4" valueKey:@"value" inDictionary:section_0];