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

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