edit.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:18k
源码类别:

PlugIns编程

开发平台:

Java

  1. <html>
  2.     <head>
  3.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  4.         <meta name="layout" content="main" />
  5.         <title><g:message code="customer.edit" default="Edit Customer" /></title>
  6.     </head>
  7.     <body>
  8.         <div class="nav">
  9.             <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  10.             <span class="menuButton"><g:link class="list" action="list"><g:message code="customer.list" default="Customer List" /></g:link></span>
  11.             <span class="menuButton"><g:link class="create" action="create" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,sort:params.sort,offset:params.offset,order:params.order]}"><g:message code="customer.new" default="New Customer" /></g:link></span>
  12.         </div>
  13.         <div class="body">
  14.             <h1><g:message code="customer.edit" default="Edit Customer" /></h1>
  15.             <g:if test="${flash.message}">
  16.             <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
  17.             </g:if>
  18.             <g:hasErrors bean="${customer}">
  19.             <div class="errors">
  20.                 <g:renderErrors bean="${customer}" as="list" />
  21.             </div>
  22.             </g:hasErrors>
  23.             <g:form method="post"  >
  24.                 <input type="hidden" name="id" value="${customer?.id}" />
  25.                 <div class="dialog">
  26.                     <table>
  27.                         <tbody>
  28.                             <tr class="prop">
  29.                                 <td valign="top" class="name">
  30.                                     <label for="cusId"><g:message code="customer.cusId" default="Cus Id" />:</label>
  31.                                 </td>
  32.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusId','errors')}">
  33.                                     <input type="text" maxlength="12" id="cusId" name="cusId" value="${fieldValue(bean:customer,field:'cusId')}"/>
  34.                                 </td>
  35.                             </tr>
  36.                             <tr class="prop">
  37.                                 <td valign="top" class="name">
  38.                                     <label for="cusName"><g:message code="customer.cusName" default="Cus Name" />:</label>
  39.                                 </td>
  40.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusName','errors')}">
  41.                                     <input type="text" maxlength="10" id="cusName" name="cusName" value="${fieldValue(bean:customer,field:'cusName')}"/>
  42.                                 </td>
  43.                                 <td valign="top" class="name">
  44.                                     <label for="cusEname"><g:message code="customer.cusEname" default="Cus Ename" />:</label>
  45.                                 </td>
  46.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusEname','errors')}">
  47.                                     <input type="text" maxlength="20" id="cusEname" name="cusEname" value="${fieldValue(bean:customer,field:'cusEname')}"/>
  48.                                 </td>
  49.                             </tr>
  50.                             <tr class="prop">
  51.                                 <td valign="top" class="name">
  52.                                     <label for="cusCompany"><g:message code="customer.cusCompany" default="Cus Company" />:</label>
  53.                                 </td>
  54.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusCompany','errors')}">
  55.                                     <input type="text" maxlength="50" id="cusCompany" name="cusCompany" value="${fieldValue(bean:customer,field:'cusCompany')}"/>
  56.                                 </td>
  57.                           
  58.                                 <td valign="top" class="name">
  59.                                     <label for="cusSex"><g:message code="customer.cusSex" default="Cus Sex" />:</label>
  60.                                 </td>
  61.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusSex','errors')}">
  62.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('SexType'))}" name="cusSex.id" value="${customer?.cusSex?.id}" ></g:select>
  63.                                 </td>
  64.                             </tr>
  65.                             <tr class="prop">
  66.                                 <td valign="top" class="name">
  67.                                     <label for="cusBirth"><g:message code="customer.cusBirth" default="Cus Birth" />:</label>
  68.                                 </td>
  69.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusBirth','errors')}">
  70.                                     <g:datePicker name="cusBirth" value="${customer?.cusBirth}" noSelection="['':'']" precision="day"></g:datePicker>
  71.                                 </td>
  72.                                 <td valign="top" class="name">
  73.                                     <label for="cusCard"><g:message code="customer.cusCard" default="Cus Card" />:</label>
  74.                                 </td>
  75.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusCard','errors')}">
  76.                                     <input type="text" maxlength="20" id="cusCard" name="cusCard" value="${fieldValue(bean:customer,field:'cusCard')}"/>
  77.                                 </td>
  78.                             </tr>
  79.                             <tr class="prop">
  80.                                 <td valign="top" class="name">
  81.                                     <label for="cusImage"><g:message code="customer.cusImage" default="Cus Image" />:</label>
  82.                                 </td>
  83.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusImage','errors')}">
  84.                                     <input type="file" id="cusImage" name="cusImage" />
  85.                                 </td>
  86.                             </tr>
  87.                             <tr class="prop">
  88.                                 <td valign="top" class="name">
  89.                                     <label for="cusTel1"><g:message code="customer.cusTel1" default="Cus Tel1" />:</label>
  90.                                 </td>
  91.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusTel1','errors')}">
  92.                                     <input type="text" maxlength="20" id="cusTel1" name="cusTel1" value="${fieldValue(bean:customer,field:'cusTel1')}"/>
  93.                                 </td>
  94.                                 <td valign="top" class="name">
  95.                                     <label for="cusTel2"><g:message code="customer.cusTel2" default="Cus Tel2" />:</label>
  96.                                 </td>
  97.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusTel2','errors')}">
  98.                                     <input type="text" maxlength="20" id="cusTel2" name="cusTel2" value="${fieldValue(bean:customer,field:'cusTel2')}"/>
  99.                                 </td>
  100.                             </tr>
  101.                             <tr class="prop">
  102.                                 <td valign="top" class="name">
  103.                                     <label for="cusLinkman"><g:message code="customer.cusLinkman" default="Cus Linkman" />:</label>
  104.                                 </td>
  105.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusLinkman','errors')}">
  106.                                     <input type="text" maxlength="10" id="cusLinkman" name="cusLinkman" value="${fieldValue(bean:customer,field:'cusLinkman')}"/>
  107.                                 </td>
  108.                                 <td valign="top" class="name">
  109.                                     <label for="cusLinktel"><g:message code="customer.cusLinktel" default="Cus Linktel" />:</label>
  110.                                 </td>
  111.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusLinktel','errors')}">
  112.                                     <input type="text" maxlength="20" id="cusLinktel" name="cusLinktel" value="${fieldValue(bean:customer,field:'cusLinktel')}"/>
  113.                                 </td>
  114.                             </tr>
  115.                             <tr class="prop">
  116.                                 <td valign="top" class="name">
  117.                                     <label for="cusEmail"><g:message code="customer.cusEmail" default="Cus Email" />:</label>
  118.                                 </td>
  119.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusEmail','errors')}">
  120.                                     <input type="text" maxlength="20" id="cusEmail" name="cusEmail" value="${fieldValue(bean:customer,field:'cusEmail')}"/>
  121.                                 </td>
  122.                                 <td valign="top" class="name">
  123.                                     <label for="cusClan"><g:message code="customer.cusClan" default="Cus Clan" />:</label>
  124.                                 </td>
  125.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusClan','errors')}">
  126.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('ClanType'))}" name="cusClan.id" value="${customer?.cusClan?.id}" ></g:select>
  127.                                 </td>
  128.                             </tr>
  129.                             <tr class="prop">
  130.                                 <td valign="top" class="name">
  131.                                     <label for="cusNative"><g:message code="customer.cusNative" default="Cus Native" />:</label>
  132.                                 </td>
  133.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusNative','errors')}">
  134.                                     <input type="text" maxlength="20" id="cusNative" name="cusNative" value="${fieldValue(bean:customer,field:'cusNative')}"/>
  135.                                 </td>
  136.                             </tr>
  137.                             <tr class="prop">
  138.                                 <td valign="top" class="name">
  139.                                     <label for="cusAddress"><g:message code="customer.cusAddress" default="Cus Address" />:</label>
  140.                                 </td>
  141.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusAddress','errors')}">
  142.                                     <input type="text" maxlength="50" id="cusAddress" name="cusAddress" value="${fieldValue(bean:customer,field:'cusAddress')}"/>
  143.                                 </td>
  144.                             </tr>
  145.                             <tr class="prop">
  146.                                 <td valign="top" class="name">
  147.                                     <label for="cusEducation"><g:message code="customer.cusEducation" default="Cus Education" />:</label>
  148.                                 </td>
  149.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusEducation','errors')}">
  150.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('EducationType'))}" name="cusEducation.id" value="${customer?.cusEducation?.id}"  ></g:select>
  151.                                 </td>
  152.                                 <td valign="top" class="name">
  153.                                     <label for="cusProfession"><g:message code="customer.cusProfession" default="Cus Profession" />:</label>
  154.                                 </td>
  155.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusProfession','errors')}">
  156.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('ProfessionType'))}" name="cusProfession.id" value="${customer?.cusProfession?.id}"  ></g:select>
  157.                                 </td>
  158.                             </tr>
  159.                             <tr class="prop">
  160.                                 <td valign="top" class="name">
  161.                                     <label for="cusWorkstate"><g:message code="customer.cusWorkstate" default="Cus Workstate" />:</label>
  162.                                 </td>
  163.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusWorkstate','errors')}">
  164.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Workstate'))}" name="cusWorkstate.id" value="${customer?.cusWorkstate?.id}"  ></g:select>
  165.                                 </td>
  166.                                 <td valign="top" class="name">
  167.                                     <label for="cusSchool"><g:message code="customer.cusSchool" default="Cus School" />:</label>
  168.                                 </td>
  169.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusSchool','errors')}">
  170.                                     <input type="text" maxlength="25" id="cusSchool" name="cusSchool" value="${fieldValue(bean:customer,field:'cusSchool')}"/>
  171.                                 </td>
  172.                             </tr>
  173.                             <tr class="prop">
  174.                                 <td valign="top" class="name">
  175.                                     <label for="cusHealth"><g:message code="customer.cusHealth" default="Cus Health" />:</label>
  176.                                 </td>
  177.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusHealth','errors')}">
  178.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('HealthState'))}" name="cusHealth.id" value="${customer?.cusHealth?.id}"  ></g:select>
  179.                                 </td>
  180.                          
  181.                                 <td valign="top" class="name">
  182.                                     <label for="cusType"><g:message code="customer.cusType" default="Cus Type" />:</label>
  183.                                 </td>
  184.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusType','errors')}">
  185.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('CustomerType'))}" name="cusType.id" value="${customer?.cusType?.id}"  ></g:select>
  186.                                 </td>
  187.                             </tr>
  188.                             <tr class="prop">
  189.                                 <td valign="top" class="name">
  190.                                     <label for="cusServer"><g:message code="customer.cusServer" default="Cus Server" />:</label>
  191.                                 </td>
  192.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusServer','errors')}">
  193.                                     <input type="text" maxlength="20" id="cusServer" name="cusServer" value="${fieldValue(bean:customer,field:'cusServer')}"/>
  194.                                 </td>
  195.                             </tr>
  196.                             <tr class="prop">
  197.                                 <td valign="top" class="name">
  198.                                     <label for="cusLikegoods"><g:message code="customer.cusLikegoods" default="Cus Likegoods" />:</label>
  199.                                 </td>
  200.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusLikegoods','errors')}">
  201.                                     <input type="text" maxlength="200" id="cusLikegoods" name="cusLikegoods" value="${fieldValue(bean:customer,field:'cusLikegoods')}"/>
  202.                                 </td>
  203.                             </tr>
  204.                             <tr class="prop">
  205.                                 <td valign="top" class="name">
  206.                                     <label for="cusMemo"><g:message code="customer.cusMemo" default="Cus Memo" />:</label>
  207.                                 </td>
  208.                                 <td valign="top" class="value ${hasErrors(bean:customer,field:'cusMemo','errors')}">
  209.                                     <textarea rows="5" cols="40" name="cusMemo">${customer?.cusMemo?.encodeAsHTML()}</textarea>
  210.                                 </td>
  211.                             </tr>
  212.  
  213.                         </tbody>
  214.                     </table>
  215.                 </div>
  216.                 <div class="buttons">
  217.                     <input type="hidden" name="_conId" value="${params._cusName}" />
  218.                     <input type="hidden" name="_conMan" value="${params._cusProfession_id}" />
  219.                     <input type="hidden" name="_staType_id" value="${params._cusType_id}" />
  220.                     <input type="hidden" name="_conLastchangefrom" value="${params._cusLastchangefrom}" />
  221.                     <input type="hidden" name="_conLastchangeto" value="${params._cusLastchangeto}" />
  222.                     <input type="hidden" name="_conDel" value="${params._cusDel}" />
  223.                     <input type="hidden" name="max" value="${params.max}" />
  224.                     <input type="hidden" name="sort" value="${params.sort}" />
  225.                     <input type="hidden" name="offset" value="${params.offset}" />
  226.                     <input type="hidden" name="order" value="${params.order}" />
  227.                     <span class="button"><g:actionSubmit class="save" action="Update" value="${message(code:'update', 'default':'Update')}" /></span>
  228.                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('${message(code:'delete.confirm', 'default':'Are you sure?')}');" action="Delete" value="${message(code:'delete', 'default':'Delete')}" /></span>
  229.                     <span class="button"><input  class="delete" type="button" onclick=" history.go(-1);" value="${message(code:'back', 'default':'Back')}"/> </span>
  230.                 </div>
  231.             </g:form>
  232.         </div>
  233.     </body>
  234. </html>