form.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. {extend name="default/base/base_member" /}
  2. {block name="member_main"}
  3. <div class="dsm-default-form fl" style="width: 100%;">
  4. <form method="POST" id="inv_form">
  5. <div class="dsc-form-default">
  6. <dl>
  7. <dt>{$Think.lang.invoice_state}:</dt>
  8. <dd>
  9. <label><input type="radio" {if $invoice.invoice_state==1}checked{/if} name="invoice_state" value="1">{$Think.lang.invoice_state_text[1]}</label>
  10. &emsp;&emsp;
  11. <label><input type="radio" {if $invoice.invoice_state==2}checked{/if} name="invoice_state" value="2">{$Think.lang.invoice_state_text[2]}</label>
  12. </dd>
  13. </dl>
  14. </div>
  15. <div id="invoice_panel" class="dsc-form-default" {if $invoice.invoice_state==2}style="display:none"{/if}>
  16. <dl>
  17. <dt>{$Think.lang.invoice_title}:</dt>
  18. <dd>
  19. <!-- <select name="invoice_title_select">
  20. <option value="person">{$Think.lang.individual}</option>
  21. <option value="company">{$Think.lang.unit}</option>
  22. </select>-->
  23. <input class="text w200" name="invoice_title" id="invoice_title" value="{$invoice.invoice_title}">
  24. </dd>
  25. </dl>
  26. <dl id="invoice_code_dl">
  27. <dt>{$Think.lang.invoice_code}:</dt>
  28. <dd>
  29. <input type="text" class="text w200" maxlength="50" name="invoice_code" id="invoice_code" value="{$invoice.invoice_code}">
  30. </dd>
  31. </dl>
  32. <dl>
  33. <dt>{$Think.lang.invoice_content}:</dt>
  34. <dd>
  35. <!-- <select id="invoice_content" name="invoice_content">
  36. <option selected value="{$Think.lang.details}">{$Think.lang.details}</option>
  37. <option value="{$Think.lang.wine}">{$Think.lang.wine}</option>
  38. <option value="{$Think.lang.food}">{$Think.lang.food}</option>
  39. <option value="{$Think.lang.drink}">{$Think.lang.drink}</option>
  40. <option value="{$Think.lang.toys}">{$Think.lang.toys}</option>
  41. <option value="{$Think.lang.daily_necessities}">{$Think.lang.daily_necessities}</option>
  42. <option value="{$Think.lang.decoration_materials}">{$Think.lang.decoration_materials}</option>
  43. <option value="{$Think.lang.cosmetics}">{$Think.lang.cosmetics}</option>
  44. <option value="{$Think.lang.office_supplies}">{$Think.lang.office_supplies}</option>
  45. <option value="{$Think.lang.student_supplies}">{$Think.lang.student_supplies}</option>
  46. <option value="{$Think.lang.household_goods}">{$Think.lang.household_goods}</option>
  47. <option value="{$Think.lang.accessories}">{$Think.lang.accessories}</option>
  48. <option value="{$Think.lang.clothing}">{$Think.lang.clothing}</option>
  49. <option value="{$Think.lang.luggage}">{$Think.lang.luggage}</option>
  50. <option value="{$Think.lang.boutique}">{$Think.lang.boutique}</option>
  51. <option value="{$Think.lang.home_appliances}">{$Think.lang.home_appliances}</option>
  52. <option value="{$Think.lang.labor_protection_products}">{$Think.lang.labor_protection_products}</option>
  53. <option value="{$Think.lang.consumables}">{$Think.lang.consumables}</option>
  54. <option value="{$Think.lang.computer_accessories}">{$Think.lang.computer_accessories}</option>
  55. </select>-->
  56. <input type="text" class="text w200" maxlength="50" name="invoice_content" id="invoice_content" value="{$invoice.invoice_content}">
  57. </dd>
  58. </dl>
  59. </div>
  60. <div id="vat_invoice_panel" class="dsc-form-default" {if $invoice.invoice_state==1}style="display:none"{/if}>
  61. <dl>
  62. <dt><i class="required">*</i>{$Think.lang.invoice_company}:</dt>
  63. <dd>
  64. <input type="text" class="text w200" maxlength="50" name="invoice_company" value="{$invoice.invoice_company}">
  65. </dd>
  66. </dl>
  67. <dl>
  68. <dt><i class="required">*</i>{$Think.lang.invoice_company_code}:</dt>
  69. <dd>
  70. <input type="text" class="text w200" maxlength="50" name="invoice_company_code" value="{$invoice.invoice_company_code}">
  71. </dd>
  72. </dl>
  73. <dl>
  74. <dt><i class="required">*</i>{$Think.lang.invoice_reg_addr}:</dt>
  75. <dd>
  76. <input type="text" class="text w200" maxlength="50" name="invoice_reg_addr" value="{$invoice.invoice_reg_addr}">
  77. </dd>
  78. </dl>
  79. <dl>
  80. <dt><i class="required">*</i>{$Think.lang.invoice_reg_phone}:</dt>
  81. <dd>
  82. <input type="text" class="text w200" maxlength="50" name="invoice_reg_phone" value="{$invoice.invoice_reg_phone}">
  83. </dd>
  84. </dl>
  85. <dl>
  86. <dt><i class="required">*</i>{$Think.lang.invoice_reg_bname}:</dt>
  87. <dd>
  88. <input type="text" class="text w200" maxlength="50" name="invoice_reg_bname" value="{$invoice.invoice_reg_bname}">
  89. </dd>
  90. </dl>
  91. <dl>
  92. <dt><i class="required">*</i>{$Think.lang.invoice_reg_baccount}:</dt>
  93. <dd>
  94. <input type="text" class="text w200" maxlength="50" name="invoice_reg_baccount" value="{$invoice.invoice_reg_baccount}">
  95. </dd>
  96. </dl>
  97. <!-- <dl>
  98. <dt></dt>
  99. <dd>{$Think.lang.open_information}</dd>
  100. </dl>
  101. <dl>
  102. <dt><i class="required">*</i>{$Think.lang.invoice_content}:</dt>
  103. <dd>{$Think.lang.details}</dd>
  104. </dl>
  105. <dl>
  106. <dt><i class="required">*</i>{$Think.lang.name_of_bearer}:</dt>
  107. <dd>
  108. <input type="text" class="text w200" maxlength="50" name="invoice_rec_name" value="">
  109. </dd>
  110. </dl>
  111. <dl>
  112. <dt><i class="required">*</i>{$Think.lang.ticket_collector_number}:</dt>
  113. <dd>
  114. <input type="text" class="text w200" maxlength="50" name="invoice_rec_mobphone" value="">
  115. </dd>
  116. </dl>
  117. <dl>
  118. <dt><i class="required">*</i>{$Think.lang.drawee_province}:</dt>
  119. <dd id="region">
  120. <select>
  121. </select>
  122. <input type="hidden" value="" name="city_id" id="city_id">
  123. <input type="hidden" name="area_id" id="area_id" class="area_ids"/>
  124. <input type="hidden" name="area_info" id="area_info" class="area_names"/>
  125. </dd>
  126. </dl>
  127. <dl>
  128. <dt><i class="required">*</i>{$Think.lang.ticket_delivery_address}:</dt>
  129. <dd>
  130. <input type="text" class="text w200" maxlength="50" name="invoice_goto_addr" value="">
  131. </dd>
  132. </dl>-->
  133. </div>
  134. <dl class="bottom">
  135. <dt></dt>
  136. <dd>
  137. <input type="submit" class="submit" value="{$Think.lang.ds_common_button_save}">
  138. </dd>
  139. </dl>
  140. </form>
  141. </div>
  142. <script>
  143. $(document).ready(function () {
  144. $('input[name="invoice_state"]').on('click', function() {
  145. if ($(this).val() == 1) {
  146. $('#invoice_panel').show();
  147. $('#vat_invoice_panel').hide();
  148. } else {
  149. $('#invoice_panel').hide();
  150. $('#vat_invoice_panel').show();
  151. }
  152. });
  153. $('#inv_form').validate({
  154. submitHandler: function (form) {
  155. ds_ajaxpost('inv_form','url','{:url('Memberinvoice/index')}');
  156. },
  157. rules: {
  158. invoice_company: {
  159. required: true
  160. },
  161. invoice_company_code: {
  162. required: true
  163. },
  164. invoice_reg_addr: {
  165. required: true
  166. },
  167. invoice_reg_phone: {
  168. required: true
  169. },
  170. invoice_reg_bname: {
  171. required: true
  172. },
  173. invoice_reg_baccount: {
  174. required: true
  175. },
  176. invoice_rec_name: {
  177. required: true
  178. },
  179. invoice_rec_mobphone: {
  180. required: true
  181. },
  182. area_id: {
  183. required: true,
  184. min: 1,
  185. checkarea: true
  186. },
  187. invoice_goto_addr: {
  188. required: true
  189. }
  190. },
  191. messages: {
  192. invoice_company: {
  193. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.unit_name_cannot_empty}'
  194. },
  195. invoice_company_code: {
  196. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.taxpayer_identification_number_cannot_empty}'
  197. },
  198. invoice_reg_addr: {
  199. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.registered_address_cannot_empty}'
  200. },
  201. invoice_reg_phone: {
  202. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.registered_phone_cannot_empty}'
  203. },
  204. invoice_reg_bname: {
  205. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.opening_bank_cannot_empty}'
  206. },
  207. invoice_reg_baccount: {
  208. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.bank_accounts_cannot_empty}'
  209. },
  210. invoice_rec_name: {
  211. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.ticket_collector_name_empty}'
  212. },
  213. invoice_rec_mobphone: {
  214. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.ticket_collector_phone_empty}'
  215. },
  216. area_id: {
  217. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_select_region}',
  218. min: '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_select_region}',
  219. checkarea: '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_select_region}'
  220. },
  221. invoice_goto_addr: {
  222. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.ticket_delivery_address_empty}'
  223. }
  224. }
  225. });
  226. });
  227. </script>
  228. {/block}