tb-deduction-record-add.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
  11. <script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
  12. <script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
  13. <script src="https://unpkg.com/jquery@3.4.1/dist/jquery.js"></script>
  14. <script src="https://www.layuicdn.com/layer-v3.1.1/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. </style>
  20. </head>
  21. <body>
  22. <div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
  23. <!-- ------- 内容部分 ------- -->
  24. <div class="s-body">
  25. <div class="c-panel">
  26. <div class="c-title" v-if="id == 0">数据添加</div>
  27. <div class="c-title" v-else>数据修改</div>
  28. <el-form v-if="m">
  29. <sa-item type="text" name="主键" v-model="m.id" br></sa-item>
  30. <sa-item type="text" name="业务id" v-model="m.businessId" br></sa-item>
  31. <sa-item type="text" name="业务单号" v-model="m.businessNo" br></sa-item>
  32. <sa-item type="text" name="车牌号" v-model="m.carNo" br></sa-item>
  33. <sa-item type="text" name="收费类型" v-model="m.feeType" br></sa-item>
  34. <sa-item type="text" name="业务类型id" v-model="m.itemTypeId" br></sa-item>
  35. <sa-item type="text" name="业务类型" v-model="m.itemTypeName" br></sa-item>
  36. <sa-item type="text" name="" v-model="m.itemId" br></sa-item>
  37. <sa-item type="text" name="业务项" v-model="m.itemName" br></sa-item>
  38. <sa-item type="text" name="项目金额" v-model="m.itemPrice" br></sa-item>
  39. <sa-item type="text" name="" v-model="m.unitPrice" br></sa-item>
  40. <sa-item type="text" name="支付日期" v-model="m.payDay" br></sa-item>
  41. <sa-item type="text" name="支付时间" v-model="m.payTime" br></sa-item>
  42. <sa-item type="enum" name="支付方式" v-model="m.payType" :jv="{3: '微信支付'}" jtype="3" br></sa-item>
  43. <sa-item type="text" name="" v-model="m.payMode" br></sa-item>
  44. <sa-item type="text" name="创建时间" v-model="m.createTime" br></sa-item>
  45. <sa-item type="text" name="更新时间" v-model="m.updateTime" br></sa-item>
  46. <sa-item type="text" name="" v-model="m.businessItemId" br></sa-item>
  47. <sa-item type="text" name="业务项单号" v-model="m.businessItemNo" br></sa-item>
  48. <sa-item type="text" name="" v-model="m.pickCustomerName" br></sa-item>
  49. <sa-item type="text" name="客户名称" v-model="m.customerName" br></sa-item>
  50. <sa-item type="text" name="主体名称" v-model="m.entityName" br></sa-item>
  51. <sa-item type="text" name="" v-model="m.taxRate" br></sa-item>
  52. <sa-item type="text" name="" v-model="m.noTaxPrice" br></sa-item>
  53. <sa-item type="text" name="" v-model="m.taxPrice" br></sa-item>
  54. <sa-item type="text" name="" v-model="m.weight" br></sa-item>
  55. <sa-item type="text" name="" v-model="m.num" br></sa-item>
  56. <sa-item type="text" name="是否结算" v-model="m.isSettle" br></sa-item>
  57. <sa-item type="text" name="备注" v-model="m.remark" br></sa-item>
  58. <sa-item type="text" name="发票" v-model="m.invoice" br></sa-item>
  59. <sa-item type="text" name="微信交易单号" v-model="m.transactionId" br></sa-item>
  60. <sa-item type="text" name="支付单号" v-model="m.outTradeNo" br></sa-item>
  61. <sa-item type="text" name="" v-model="m.businessCarId" br></sa-item>
  62. <sa-item type="text" name="" v-model="m.businessCarNo" br></sa-item>
  63. <sa-item type="text" name="开单员" v-model="m.kaiDanPerson" br></sa-item>
  64. <sa-item type="text" name="调度员" v-model="m.diaoDuPerson" br></sa-item>
  65. <sa-item type="text" name="稽查员" v-model="m.jiChaPerson" br></sa-item>
  66. <sa-item type="text" name="客户id" v-model="m.customerId" br></sa-item>
  67. <sa-item type="text" name="扣除金额" v-model="m.deductMoney" br></sa-item>
  68. <sa-item type="text" name="收费明细id" v-model="m.feeDetailsId" br></sa-item>
  69. <sa-item type="text" name="复核人员" v-model="m.reviewBy" br></sa-item>
  70. <sa-item type="text" name="复核时间" v-model="m.reviewTime" br></sa-item>
  71. <sa-item type="text" name="复核状态,0-未复核、1-已复核" v-model="m.reviewStatus" br></sa-item>
  72. <sa-item type="text" name="合作伙伴" v-model="m.partner" br></sa-item>
  73. <sa-item type="text" name="原金额" v-model="m.originalMoney" br></sa-item>
  74. <sa-item type="text" name="余额" v-model="m.totalMoney" br></sa-item>
  75. <sa-item name="" class="s-ok" br>
  76. <el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
  77. </sa-item>
  78. </el-form>
  79. </div>
  80. </div>
  81. <!-- ------- 底部按钮 ------- -->
  82. <div class="s-foot">
  83. <el-button type="primary" @click="ok()">确定</el-button>
  84. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  85. </div>
  86. </div>
  87. <script>
  88. var app = new Vue({
  89. components: {
  90. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
  91. },
  92. el: '.vue-box',
  93. data: {
  94. id: sa.p('id', 0), // 获取超链接中的id参数(0=添加,非0=修改)
  95. m: null, // 实体对象
  96. },
  97. methods: {
  98. // 创建一个 默认Model
  99. createModel: function() {
  100. return {
  101. id: '', // 主键
  102. businessId: '', // 业务id
  103. businessNo: '', // 业务单号
  104. carNo: '', // 车牌号
  105. feeType: '', // 收费类型
  106. itemTypeId: '', // 业务类型id
  107. itemTypeName: '', // 业务类型
  108. itemId: '', //
  109. itemName: '', // 业务项
  110. itemPrice: '', // 项目金额(元)
  111. unitPrice: '', //
  112. payDay: '', // 支付日期
  113. payTime: '', // 支付时间
  114. payType: '', // 支付方式(3=微信支付)
  115. payMode: '', //
  116. createTime: '', // 创建时间
  117. updateTime: '', // 更新时间
  118. businessItemId: '', //
  119. businessItemNo: '', // 业务项单号
  120. pickCustomerName: '', //
  121. customerName: '', // 客户名称
  122. entityName: '', // 主体名称
  123. taxRate: '', //
  124. noTaxPrice: '', //
  125. taxPrice: '', //
  126. weight: '', //
  127. num: '', //
  128. isSettle: '', // 是否结算
  129. remark: '', // 备注
  130. invoice: '', // 发票
  131. transactionId: '', // 微信交易单号
  132. outTradeNo: '', // 支付单号
  133. businessCarId: '', //
  134. businessCarNo: '', //
  135. kaiDanPerson: '', // 开单员
  136. diaoDuPerson: '', // 调度员
  137. jiChaPerson: '', // 稽查员
  138. customerId: '', // 客户id
  139. deductMoney: '', // 扣除金额
  140. feeDetailsId: '', // 收费明细id
  141. reviewBy: '', // 复核人员
  142. reviewTime: '', // 复核时间
  143. reviewStatus: '', // 复核状态,0-未复核、1-已复核
  144. partner: '', // 合作伙伴
  145. originalMoney: '', // 原金额
  146. totalMoney: '', // 余额
  147. }
  148. },
  149. // 提交数据
  150. ok: function(){
  151. // 表单校验
  152. let m = this.m;
  153. sa.checkNull(m.id, '请输入 [主键]');
  154. sa.checkNull(m.businessId, '请输入 [业务id]');
  155. sa.checkNull(m.businessNo, '请输入 [业务单号]');
  156. sa.checkNull(m.carNo, '请输入 [车牌号]');
  157. sa.checkNull(m.feeType, '请输入 [收费类型]');
  158. sa.checkNull(m.itemTypeId, '请输入 [业务类型id]');
  159. sa.checkNull(m.itemTypeName, '请输入 [业务类型]');
  160. sa.checkNull(m.itemId, '请输入 []');
  161. sa.checkNull(m.itemName, '请输入 [业务项]');
  162. sa.checkNull(m.itemPrice, '请输入 [项目金额]');
  163. sa.checkNull(m.unitPrice, '请输入 []');
  164. sa.checkNull(m.payDay, '请输入 [支付日期]');
  165. sa.checkNull(m.payTime, '请输入 [支付时间]');
  166. sa.checkNull(m.payType, '请输入 [支付方式]');
  167. sa.checkNull(m.payMode, '请输入 []');
  168. sa.checkNull(m.createTime, '请输入 [创建时间]');
  169. sa.checkNull(m.updateTime, '请输入 [更新时间]');
  170. sa.checkNull(m.businessItemId, '请输入 []');
  171. sa.checkNull(m.businessItemNo, '请输入 [业务项单号]');
  172. sa.checkNull(m.pickCustomerName, '请输入 []');
  173. sa.checkNull(m.customerName, '请输入 [客户名称]');
  174. sa.checkNull(m.entityName, '请输入 [主体名称]');
  175. sa.checkNull(m.taxRate, '请输入 []');
  176. sa.checkNull(m.noTaxPrice, '请输入 []');
  177. sa.checkNull(m.taxPrice, '请输入 []');
  178. sa.checkNull(m.weight, '请输入 []');
  179. sa.checkNull(m.num, '请输入 []');
  180. sa.checkNull(m.isSettle, '请输入 [是否结算]');
  181. sa.checkNull(m.remark, '请输入 [备注]');
  182. sa.checkNull(m.invoice, '请输入 [发票]');
  183. sa.checkNull(m.transactionId, '请输入 [微信交易单号]');
  184. sa.checkNull(m.outTradeNo, '请输入 [支付单号]');
  185. sa.checkNull(m.businessCarId, '请输入 []');
  186. sa.checkNull(m.businessCarNo, '请输入 []');
  187. sa.checkNull(m.kaiDanPerson, '请输入 [开单员]');
  188. sa.checkNull(m.diaoDuPerson, '请输入 [调度员]');
  189. sa.checkNull(m.jiChaPerson, '请输入 [稽查员]');
  190. sa.checkNull(m.customerId, '请输入 [客户id]');
  191. sa.checkNull(m.deductMoney, '请输入 [扣除金额]');
  192. sa.checkNull(m.feeDetailsId, '请输入 [收费明细id]');
  193. sa.checkNull(m.reviewBy, '请输入 [复核人员]');
  194. sa.checkNull(m.reviewTime, '请输入 [复核时间]');
  195. sa.checkNull(m.reviewStatus, '请输入 [复核状态,0-未复核、1-已复核]');
  196. sa.checkNull(m.partner, '请输入 [合作伙伴]');
  197. sa.checkNull(m.originalMoney, '请输入 [原金额]');
  198. sa.checkNull(m.totalMoney, '请输入 [余额]');
  199. // 开始增加或修改
  200. if(this.id <= 0) { // 添加
  201. sa.ajax('/TbDeductionRecord/add', m, function(res){
  202. sa.alert('增加成功', this.clean);
  203. }.bind(this));
  204. } else { // 修改
  205. sa.ajax('/TbDeductionRecord/update', m, function(res){
  206. sa.alert('修改成功', this.clean);
  207. }.bind(this));
  208. }
  209. },
  210. // 添加/修改 完成后的动作
  211. clean: function() {
  212. if(this.id == 0) {
  213. this.m = this.createModel();
  214. } else {
  215. parent.app.f5(); // 刷新父页面列表
  216. sa.closeCurrIframe(); // 关闭本页
  217. }
  218. }
  219. },
  220. mounted: function(){
  221. // 初始化数据
  222. if(this.id <= 0) {
  223. this.m = this.createModel();
  224. } else {
  225. sa.ajax('/TbDeductionRecord/getById?id=' + this.id, function(res) {
  226. this.m = res.data;
  227. if(res.data == null) {
  228. sa.alert('未能查找到 id=' + this.id + " 详细数据");
  229. }
  230. }.bind(this))
  231. }
  232. }
  233. })
  234. </script>
  235. </body>
  236. </html>