加载详情 [UserAuthorizeAttribute(ModuleAlias = , OperaAction = )] 7 public ActionResult Detail(int? id) 8 { entity = new Domain.SYS_BUSSINESSCUSTOMER() { ChargePersionSex = 1 }; (id!=null && id>0) 13 { entity = BussinessCustomerManage.Get(p => p.ID == id); ViewData[] = ContentManage.Get(p => p.FK_RELATIONID == entity.FK_RELATIONID && p.FK_TABLE == ) ?? new Domain.COM_CONTENT(); 18 } ViewBag.KHLX = ).OrderBy(p=>p.SHOWORDER).ToList(); View(entity); 24 }
7.2 Detail.cshtml
1 @{ ; ; ] == ] as Domain.COM_CONTENT; 5 } 6 @model Domain.SYS_BUSSINESSCUSTOMER > 8 .gray-bg { 9 background-color: white; 10 } 11 </style> , null, new AjaxOptions() 13 { , , , , }, , @role = })) 21 { 22 @Html.HiddenFor(p => p.ID) 23 @Html.HiddenFor(p=>p.FK_RELATIONID) 24 @Html.HiddenFor(p=>p.Fk_DepartId) 25 @Html.HiddenFor(p => p.CreateUser) 26 @Html.HiddenFor(p => p.CreateDate) , content.ID) > > > ></i>添加/修改客户 32 </div> > > > > >客户名称:</label> > , @placeholder = , @datatype = , @nullmsg = , @errormsg = }) 40 </div> 41 </div> 42 </div> > > >客户类型:</label> > => 48 @{ 49 foreach (var item in ViewBag.KHLX) 50 { @(Model.CustomerStyle!=: "")>@item.NAMETEXT</option> 52 } 53 } 54 </select> 55 56 </div> 57 </div> 58 </div> 59 </div> ></div> > > > >公司电话:</label> > , @placeholder = }) 67 </div> 68 </div> 69 </div> > > >公司网址:</label> > , @placeholder = }) 75 </div> 76 </div> 77 </div> 78 </div> ></div> > >所在地:</label> > 83 @Html.HiddenFor(p => p.CompanyProvince) 84 @Html.HiddenFor(p => p.CompanyCity) 85 @Html.HiddenFor(p => p.CompanyArea) id=onchange==> >--请选择--</option> 88 </select> id=onchange==> >--请选择--</option> 91 </select> id=onchange==> >--请选择--</option> 94 </select> 95 </div> 96 </div> ></div> > >通讯地址:</label> > , @placeholder = }) 102 </div> 103 </div> ></div> > > > >负责人:</label> > , @placeholder = , @datatype = , @nullmsg = , @errormsg = }) 111 </div> 112 </div> 113 </div> > > >性别:</label> > > name=value=@(Model.ChargePersionSex != : >男 120 </label> > name=value=@(Model.ChargePersionSex != : >女 123 </label> 124 </div> 125 </div> 126 </div> 127 </div> ></div> > > > >联系电话:</label> > , @placeholder = }) 135 </div> 136 </div> 137 </div> > > >QQ:</label> > , @placeholder = }) 143 </div> 144 </div> 145 </div> 146 </div> ></div> > > > >Email:</label> > , @placeholder = }) 154 </div> 155 </div> 156 </div> > > >验证状态:</label> > > }) 163 </label> 164 </div> 165 </div> 166 </div> 167 </div> ></div> > >公司简介:</label> > name=type=style=> 173 @Html.Raw(content.CONTENT) 174 </script> 175 </div> 176 </div> ></div> > type=><i ></i> <span>确定保存</span></button> id=type=><i ></i> 取消返回</button> 181 </div> 182 </div> 183 </div> 184 </div> 185 } 186 @section scripts{ src=></script> src=></script> src=></script> > 191 $(function () { ).initValidform(); ); 194 r.Initial(); 195 }); 196 var r = { 197 Initial: function () { 198 $.ajax({ , 200 data: null, , , 203 cache: false, 204 success: function (res) { ) { 206 var option = ''; 207 var data = eval(res.Data); 208 for (var i = 0; i < data.length; i++) { 209 var jsonH = data[i]; ).val()) { + jsonH.ID + + jsonH.NAME + ; 212 } 213 else { + jsonH.ID + + jsonH.NAME + ; 215 } 216 } ).html(option); , ); 219 } 220 } 221 }); 222 } 223 }; function SelectCity(t, n) { + t).val(); ).val(prov); + n); 229 var option = ''; 230 if (prov == '') { 231 city.html(option); 232 } else { 233 $.ajax({ + prov, 235 data: null, , , 238 async: false, 239 cache: false, 240 success: function (res) { ) { 242 var data = eval(res.Data); 243 for (var i = 0; i < data.length; i++) { 244 var jsonH = data[i]; ).val()) { + jsonH.ID + + jsonH.NAME + ; 247 } 248 else { + jsonH.ID + + jsonH.NAME + ; 250 } 251 } 252 } 253 city.html(option); , ) 255 } 256 }); 257 } 258 } function SelectCountry(t, n) { + t).val(); ).val(city); + n); 264 var option = ''; 265 if (city == '') { 266 country.html(option); 267 } else { 268 $.ajax({ + city, 270 data: null, , , 273 async: false, 274 cache: false, 275 success: function (res) { ) { 277 var data = eval(res.Data); 278 for (var i = 0; i < data.length; i++) { 279 var jsonH = data[i]; ).val()) { + jsonH.ID + + jsonH.NAME + ; 282 } 283 else { + jsonH.ID + + jsonH.NAME + ; 285 } 286 } 287 } 288 country.html(option); ) 290 } 291 }); 292 } 293 } 294 function SelectAreas(t) { + t).val(); ).val(area); 297 } 298 </script> 299 }
View Code
7.3 保存客户