tb-people-tax-account-update.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>边民-税务开户信息-添加/修改</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. <style type="text/css">
  17. .c-panel .el-form .c-label{width: 7em !important;}
  18. .c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
  19. table {
  20. font-family: arial, sans-serif;
  21. border-collapse: collapse;
  22. width: 90%;
  23. margin-top: 22px;
  24. margin-left: auto;
  25. margin-right: auto;
  26. }
  27. th {
  28. border: 1px solid darkgray;
  29. text-align: left;
  30. height: 22px;
  31. padding: 8px;
  32. background-color: #dddddd;
  33. }
  34. td {
  35. border: 1px solid darkgray;
  36. text-align: left;
  37. padding: 8px;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
  43. <!-- ------- 内容部分 ------- -->
  44. <div class="s-body">
  45. <div class="c-panel">
  46. <div class="c-title" v-if="id == 0">数据添加</div>
  47. <div class="c-title" v-else>数据修改</div>
  48. <el-form v-if="m">
  49. <table>
  50. <tr>
  51. <th>经营者</th>
  52. <td>{{m.name}}</td>
  53. <th>身份证</th>
  54. <td>{{m.idCard}}</td>
  55. </tr>
  56. <tr>
  57. <th>名称</th>
  58. <td>
  59. <el-input type="text" v-model="m.businessName" placeholder="请输入名称"></el-input>
  60. </td>
  61. <th>社会统一信用代码</th>
  62. <td>
  63. <el-input type="text" v-model="m.dutyParagraph" placeholder="请输入社会统一信用代码"></el-input>
  64. </td>
  65. </tr>
  66. <tr>
  67. <th>开户行</th>
  68. <td>
  69. <el-input type="text" v-model="m.bankName" placeholder="请输入开户行"></el-input>
  70. </td>
  71. <th>银行账号</th>
  72. <td>
  73. <el-input type="text" v-model="m.bankCode" placeholder="请输入银行账号"></el-input>
  74. </td>
  75. </tr>
  76. <tr>
  77. <th>联系人</th>
  78. <td>
  79. <el-input type="text" v-model="m.contacts" placeholder="请输入联系人"></el-input>
  80. </td>
  81. <th>联系电话</th>
  82. <td>
  83. <el-input type="text" v-model="m.phone" placeholder="请输入联系电话"></el-input>
  84. </td>
  85. </tr>
  86. <tr>
  87. <th>组成形式</th>
  88. <td>
  89. <el-input type="text" v-model="m.form" placeholder="请输入组成形式"></el-input>
  90. </td>
  91. <th>经营状态</th>
  92. <td>
  93. <el-input type="text" v-model="m.businessStatus" placeholder="请输入经营状态"></el-input>
  94. </td>
  95. </tr>
  96. <tr>
  97. <th>开票商</th>
  98. <td>
  99. <el-input type="text" v-model="m.invoiceBusiness" placeholder="请输入开票商"></el-input>
  100. </td>
  101. <th>开票人</th>
  102. <td>
  103. <el-input type="text" v-model="m.invoicePeople" placeholder="请输入开票人"></el-input>
  104. </td>
  105. </tr>
  106. <tr>
  107. <th>收款人</th>
  108. <td>
  109. <el-input type="text" v-model="m.payee" placeholder="请输入收款人"></el-input>
  110. </td>
  111. <th>复核人</th>
  112. <td>
  113. <el-input type="text" v-model="m.checker" placeholder="请输入复核人"></el-input>
  114. </td>
  115. </tr>
  116. <!--<tr>
  117. <th>互市区</th>
  118. <td>{{m.tradeAreaName}}</td>
  119. <th>创建时间</th>
  120. <td>{{sa.forDate(m.createTime, 2)}}</td>
  121. </tr>-->
  122. <tr>
  123. <th>经营场所</th>
  124. <td colspan="3">
  125. <el-input type="text" v-model="m.businessAddress" placeholder="请输入经营场所" style="width: 95%;"></el-input>
  126. </td>
  127. </tr>
  128. <tr>
  129. <th>经营范围</th>
  130. <td colspan="3" >
  131. <el-input type="text" v-model="m.businessScope" placeholder="请输入经营范围" style="width: 95%;"></el-input>
  132. </td>
  133. </tr>
  134. </table>
  135. <sa-item name="" class="s-ok" br>
  136. <el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
  137. </sa-item>
  138. </el-form>
  139. </div>
  140. </div>
  141. <!-- ------- 底部按钮 ------- -->
  142. <div class="s-foot">
  143. <el-button type="primary" @click="ok()">确定</el-button>
  144. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  145. </div>
  146. </div>
  147. <script>
  148. var app = new Vue({
  149. components: {
  150. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
  151. },
  152. el: '.vue-box',
  153. data: {
  154. id: sa.p('id', 0), // 获取超链接中的id参数(0=添加,非0=修改)
  155. m: null, // 实体对象
  156. },
  157. methods: {
  158. // 创建一个 默认Model
  159. createModel: function() {
  160. return {
  161. id: '', // 主键id
  162. peopleId: '', // 边民表ID
  163. businessName: '', // 个体户名称
  164. dutyParagraph: '', // 社会统一信用代码
  165. name: '', // 经营者(边民)
  166. address: '', // 地址
  167. form: '', // 组成形式
  168. contacts: '', // 联系人
  169. phone: '', // 联系电话
  170. businessAddress: '', // 经营场所
  171. businessScope: '', // 经营范围
  172. businessStatus: '', // 经营状态
  173. idCard: '', // 身份证
  174. bankName: '', // 开户行
  175. bankCode: '', // 银行账号
  176. invoiceBusiness: '', // 开票商
  177. invoicePeople: '', // 开票人
  178. payee: '', // 收款人
  179. checker: '', // 复核人
  180. createTime: '', // 创建时间
  181. createBy: '', // 创建人编号
  182. createName: '', // 创建人名称
  183. updateTime: '', // 更新时间
  184. updateBy: '', // 更新人编号
  185. updateName: '', // 更新人名称
  186. }
  187. },
  188. // 提交数据
  189. ok: function(){
  190. // 表单校验
  191. let m = this.m;
  192. sa.checkNull(m.id, '请输入 [主键id]');
  193. sa.checkNull(m.peopleId, '请输入 [边民表ID]');
  194. sa.checkNull(m.businessName, '请输入 [个体户名称]');
  195. sa.checkNull(m.dutyParagraph, '请输入 [社会统一信用代码]');
  196. sa.checkNull(m.name, '请输入 [经营者]');
  197. sa.checkNull(m.address, '请输入 [地址]');
  198. sa.checkNull(m.form, '请输入 [组成形式]');
  199. sa.checkNull(m.contacts, '请输入 [联系人]');
  200. sa.checkNull(m.phone, '请输入 [联系电话]');
  201. sa.checkNull(m.businessAddress, '请输入 [经营场所]');
  202. sa.checkNull(m.businessScope, '请输入 [经营范围]');
  203. sa.checkNull(m.businessStatus, '请输入 [经营状态]');
  204. sa.checkNull(m.idCard, '请输入 [身份证]');
  205. sa.checkNull(m.bankName, '请输入 [开户行]');
  206. sa.checkNull(m.bankCode, '请输入 [银行账号]');
  207. sa.checkNull(m.invoiceBusiness, '请输入 [开票商]');
  208. sa.checkNull(m.invoicePeople, '请输入 [开票人]');
  209. sa.checkNull(m.payee, '请输入 [收款人]');
  210. sa.checkNull(m.checker, '请输入 [复核人]');
  211. sa.checkNull(m.createTime, '请输入 [创建时间]');
  212. sa.checkNull(m.createBy, '请输入 [创建人编号]');
  213. sa.checkNull(m.createName, '请输入 [创建人名称]');
  214. sa.checkNull(m.updateTime, '请输入 [更新时间]');
  215. sa.checkNull(m.updateBy, '请输入 [更新人编号]');
  216. sa.checkNull(m.updateName, '请输入 [更新人名称]');
  217. // 开始增加或修改
  218. if(this.id <= 0) { // 添加
  219. sa.ajax('/level-one-server/TbPeopleTaxAccount/add', m, function(res){
  220. sa.alert('增加成功', this.clean);
  221. }.bind(this));
  222. } else { // 修改
  223. sa.ajax('/level-one-server/TbPeopleTaxAccount/update', m, function(res){
  224. sa.alert('修改成功', this.clean);
  225. }.bind(this));
  226. }
  227. },
  228. // 添加/修改 完成后的动作
  229. clean: function() {
  230. if(this.id == 0) {
  231. this.m = this.createModel();
  232. } else {
  233. parent.app.f5(); // 刷新父页面列表
  234. sa.closeCurrIframe(); // 关闭本页
  235. }
  236. }
  237. },
  238. mounted: function(){
  239. // 初始化数据
  240. if(this.id <= 0) {
  241. this.m = this.createModel();
  242. } else {
  243. sa.ajax('/level-one-server/TbPeopleTaxAccount/getById?id=' + this.id, function(res) {
  244. this.m = res.data;
  245. if(res.data == null) {
  246. sa.alert('未能查找到 id=' + this.id + " 详细数据");
  247. }
  248. }.bind(this))
  249. }
  250. }
  251. })
  252. </script>
  253. </body>
  254. </html>