create.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:17k
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta name="layout" content="main" />
- <title><g:message code="customer.create" default="Create Customer" /></title>
- </head>
- <body>
- <div class="nav">
- <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
- <span class="menuButton"><g:link class="list" action="list"><g:message code="customer.list" default="Customer List" /></g:link></span>
- </div>
- <div class="body">
- <h1><g:message code="customer.create" default="Create Customer" /></h1>
- <g:if test="${flash.message}">
- <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
- </g:if>
- <g:hasErrors bean="${customer}">
- <div class="errors">
- <g:renderErrors bean="${customer}" as="list" />
- </div>
- </g:hasErrors>
- <g:form action="save" method="post" enctype="multipart/form-data">
- <div class="dialog">
- <table>
- <tbody>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusName"><g:message code="customer.cusName" default="Cus Name" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusName','errors')}">
- <input type="text" maxlength="10" id="cusName" name="cusName" value="${fieldValue(bean:customer,field:'cusName')}"/>
- </td>
- <td valign="top" class="name">
- <label for="cusEname"><g:message code="customer.cusEname" default="Cus Ename" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusEname','errors')}">
- <input type="text" maxlength="20" id="cusEname" name="cusEname" value="${fieldValue(bean:customer,field:'cusEname')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusCompany"><g:message code="customer.cusCompany" default="Cus Company" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusCompany','errors')}">
- <input type="text" maxlength="50" id="cusCompany" name="cusCompany" value="${fieldValue(bean:customer,field:'cusCompany')}"/>
- </td>
-
- <td valign="top" class="name">
- <label for="cusSex"><g:message code="customer.cusSex" default="Cus Sex" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusSex','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('SexType'))}" name="cusSex.id" value="${customer?.cusSex?.id}" ></g:select>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusBirth"><g:message code="customer.cusBirth" default="Cus Birth" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusBirth','errors')}">
- <g:datePicker name="cusBirth" value="${customer?.cusBirth}" noSelection="['':'']" precision="day"></g:datePicker>
- </td>
-
- <td valign="top" class="name">
- <label for="cusCard"><g:message code="customer.cusCard" default="Cus Card" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusCard','errors')}">
- <input type="text" maxlength="20" id="cusCard" name="cusCard" value="${fieldValue(bean:customer,field:'cusCard')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusImage"><g:message code="customer.cusImage" default="Cus Image" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusImage','errors')}">
- <input type="file" id="cusImage" name="cusImage" />
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusTel1"><g:message code="customer.cusTel1" default="Cus Tel1" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusTel1','errors')}">
- <input type="text" maxlength="20" id="cusTel1" name="cusTel1" value="${fieldValue(bean:customer,field:'cusTel1')}"/>
- </td>
-
- <td valign="top" class="name">
- <label for="cusTel2"><g:message code="customer.cusTel2" default="Cus Tel2" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusTel2','errors')}">
- <input type="text" maxlength="20" id="cusTel2" name="cusTel2" value="${fieldValue(bean:customer,field:'cusTel2')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusLinkman"><g:message code="customer.cusLinkman" default="Cus Linkman" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusLinkman','errors')}">
- <input type="text" maxlength="10" id="cusLinkman" name="cusLinkman" value="${fieldValue(bean:customer,field:'cusLinkman')}"/>
- </td>
- <td valign="top" class="name">
- <label for="cusLinktel"><g:message code="customer.cusLinktel" default="Cus Linktel" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusLinktel','errors')}">
- <input type="text" maxlength="20" id="cusLinktel" name="cusLinktel" value="${fieldValue(bean:customer,field:'cusLinktel')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusEmail"><g:message code="customer.cusEmail" default="Cus Email" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusEmail','errors')}">
- <input type="text" maxlength="20" id="cusEmail" name="cusEmail" value="${fieldValue(bean:customer,field:'cusEmail')}"/>
- </td>
- <td valign="top" class="name">
- <label for="cusClan"><g:message code="customer.cusClan" default="Cus Clan" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusClan','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('ClanType'))}" name="cusClan.id" value="${customer?.cusClan?.id}" ></g:select>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusNative"><g:message code="customer.cusNative" default="Cus Native" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusNative','errors')}">
- <input type="text" maxlength="20" id="cusNative" name="cusNative" value="${fieldValue(bean:customer,field:'cusNative')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusAddress"><g:message code="customer.cusAddress" default="Cus Address" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusAddress','errors')}">
- <input type="text" maxlength="50" id="cusAddress" name="cusAddress" value="${fieldValue(bean:customer,field:'cusAddress')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusEducation"><g:message code="customer.cusEducation" default="Cus Education" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusEducation','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('EducationType'))}" name="cusEducation.id" value="${customer?.cusEducation?.id}" ></g:select>
- </td>
- <td valign="top" class="name">
- <label for="cusProfession"><g:message code="customer.cusProfession" default="Cus Profession" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusProfession','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('ProfessionType'))}" name="cusProfession.id" value="${customer?.cusProfession?.id}" ></g:select>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusWorkstate"><g:message code="customer.cusWorkstate" default="Cus Workstate" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusWorkstate','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Workstate'))}" name="cusWorkstate.id" value="${customer?.cusWorkstate?.id}" ></g:select>
- </td>
- <td valign="top" class="name">
- <label for="cusSchool"><g:message code="customer.cusSchool" default="Cus School" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusSchool','errors')}">
- <input type="text" maxlength="25" id="cusSchool" name="cusSchool" value="${fieldValue(bean:customer,field:'cusSchool')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusHealth"><g:message code="customer.cusHealth" default="Cus Health" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusHealth','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('HealthState'))}" name="cusHealth.id" value="${customer?.cusHealth?.id}" ></g:select>
- </td>
-
- <td valign="top" class="name">
- <label for="cusType"><g:message code="customer.cusType" default="Cus Type" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusType','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('CustomerType'))}" name="cusType.id" value="${customer?.cusType?.id}" ></g:select>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusServer"><g:message code="customer.cusServer" default="Cus Server" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusServer','errors')}">
- <input type="text" maxlength="20" id="cusServer" name="cusServer" value="${fieldValue(bean:customer,field:'cusServer')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusLikegoods"><g:message code="customer.cusLikegoods" default="Cus Likegoods" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusLikegoods','errors')}">
- <input type="text" maxlength="200" id="cusLikegoods" name="cusLikegoods" value="${fieldValue(bean:customer,field:'cusLikegoods')}"/>
- </td>
- </tr>
- <tr class="prop">
- <td valign="top" class="name">
- <label for="cusMemo"><g:message code="customer.cusMemo" default="Cus Memo" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:customer,field:'cusMemo','errors')}">
- <textarea rows="5" cols="40" name="cusMemo">${customer?.cusMemo?.encodeAsHTML()}</textarea>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="buttons">
- <input type="hidden" name="_conId" value="${params._cusName}" />
- <input type="hidden" name="_conMan" value="${params._cusProfession_id}" />
- <input type="hidden" name="_staType_id" value="${params._cusType_id}" />
- <input type="hidden" name="_conLastchangefrom" value="${params._cusLastchangefrom}" />
- <input type="hidden" name="_conLastchangeto" value="${params._cusLastchangeto}" />
- <input type="hidden" name="_conDel" value="${params._cusDel}" />
- <input type="hidden" name="max" value="${params.max}" />
- <input type="hidden" name="sort" value="${params.sort}" />
- <input type="hidden" name="offset" value="${params.offset}" />
- <input type="hidden" name="order" value="${params.order}" />
- <span class="button"><input class="save" type="submit" value="${message(code:'create', 'default':'Create')}" /></span>
- <span class="button"><input class="delete" type="button" onclick=" history.go(-1);" value="${message(code:'back', 'default':'Back')}"/> </span>
- </div>
- </g:form>
- </div>
- </body>
- </html>