tb-car-disincle-list.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>入境登记-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <script src="../../static/kj/upload-util.js"></script>
  18. </head>
  19. <style>
  20. .complete-modal .c-label,
  21. .confirm-in .c-label,
  22. .confirm-info .c-label {
  23. width: 290px;
  24. }
  25. </style>
  26. <body>
  27. <div class="vue-box" style="display: none;" :style="'display: block;'">
  28. <div class="c-panel">
  29. <!-- ------------- 检索参数 ------------- -->
  30. <div class="c-title">检索参数</div>
  31. <el-form ref="form" :model='p' @submit.native.prevent>
  32. <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="p.carNo"></sa-item>
  33. <div class="c-item">
  34. <label class="c-label">确认状态:</label>
  35. <el-select v-model="p.adminConfirmInput" placeholder="请选择" @change="f5()">
  36. <el-option label="全部" :value="-1"></el-option>
  37. <el-option label="已确认" :value="1"></el-option>
  38. <el-option label="未确认" :value="0"></el-option>
  39. </el-select>
  40. </div>
  41. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  42. <el-button type="info" icon="el-icon-search" @click="p.carNo = '';p.adminConfirmInput=-1; f5()">重置</el-button>
  43. <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="add()">
  44. 新增</el-button>
  45. <br />
  46. </el-form>
  47. <!-- ------------- 数据列表 ------------- -->
  48. <el-table class="data-table" ref="data-table" :data="dataList">
  49. <el-table-column type="index" width="50"></el-table-column>
  50. <sa-td name="业务单号" prop="no" width="160"></sa-td>
  51. <sa-td name="车辆类型" prop="goodsName"></sa-td>
  52. <sa-td name="业务项" prop="itemTypeName" width="160"></sa-td>
  53. <sa-td name="车牌号" prop="carNo"></sa-td>
  54. <sa-td name="作业时间" prop="operateTime" width="160"></sa-td>
  55. <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
  56. <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
  57. <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
  58. <sa-td name="入场时间" prop="realInTime" width="140"></sa-td>
  59. <sa-td name="离场时间" prop="realOutTime" width="140"></sa-td>
  60. <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
  61. </sa-td>
  62. <el-table-column label="操作" width="360px" fixed="right">
  63. <template slot-scope="s">
  64. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-flex-business-confirm')
  65. &&currentCustomerId=='1'&&s.row.adminConfirmInput==0" @click="confirmFn(s.row)">账单确认</el-button>
  66. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
  67. &&currentCustomerId=='1'&&s.row.adminConfirmInput==1" @click="checkConfirmFn(s.row)">查看账单</el-button>
  68. <el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
  69. <el-button class="c-btn" type="primary" v-if="currentCustomerId=='1'||(s.row.adminConfirmInput==0&&sa.isAuth('tb-flex-business-edit'))"
  70. @click="update(s.row)">
  71. 修改</el-button>
  72. <el-button class="c-btn" type="primary"
  73. v-if="(currentCustomerId=='1'||(sa.isAuth('tb-flex-business-pay')))
  74. &&s.row.payStatus!=='3'"
  75. @click="handlerPay(s.row)">
  76. 线下收费</el-button>
  77. <el-button v-if="sa.isAuth('tb-business-car-bind')" class="c-btn" type="primary"
  78. @click="businessFn(s.row)">绑定车辆
  79. </el-button>
  80. <el-button class="c-btn" type="danger"
  81. v-if="sa.isAuth('tb-flex-business-del')&&s.row.adminConfirmInput==0&&s.row.payMoney==0"
  82. @click="del(s.row)">删除
  83. </el-button>
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. <!-- ------------- 分页 ------------- -->
  88. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  89. </sa-item>
  90. </div>
  91. <el-dialog :title="confirm.title" :visible.sync="confirm.visible" width="650px">
  92. <div class="confirm-info">
  93. <el-row>
  94. <sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
  95. <sa-info :name="item.itemName" br v-for="item in confirm.form.items">
  96. {{item.itemPrice}}x{{item.num}}={{item.total}}元
  97. </sa-info>
  98. <sa-info name="创建时间" br>{{confirm.form.createTime}}</sa-info>
  99. <sa-info name="总计费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
  100. </el-row>
  101. </div>
  102. <span slot="footer" class="dialog-footer">
  103. <div v-if="confirm.form.adminConfirmInput==0">
  104. <el-button @click="confirm.visible = false">取 消</el-button>
  105. <el-button type="primary" @click="sureConfirmFn">确 认</el-button>
  106. </div>
  107. <div v-else>
  108. <el-button @click="confirm.visible = false">关闭</el-button>
  109. </div>
  110. </span>
  111. </el-dialog>
  112. </div>
  113. <script>
  114. var app = new Vue({
  115. components: {
  116. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
  117. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  118. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  119. },
  120. el: '.vue-box',
  121. data: {
  122. value: '',
  123. currentCustomerId: '1',
  124. confirm: {
  125. visible: false,
  126. title:'',
  127. form: {
  128. ids: ''
  129. }
  130. },
  131. p: { // 查询参数
  132. id: '', // 主键
  133. no: '', // 编号
  134. isCar: 1,
  135. adminConfirmInput: -1,
  136. carNo: '', // 车牌号
  137. outDayTime: '', // 离境时间
  138. partMoney: '', // 停车费用
  139. partTime: '', // 停车时常(分)
  140. pageNo: 1, // 当前页
  141. pageSize: 20, // 页大小
  142. sortType: 0 // 排序方式
  143. },
  144. dataCount: 0,
  145. dataList: [], // 数据集合
  146. timmer: null,
  147. fresh: {
  148. value: 60
  149. }
  150. },
  151. methods: {
  152. businessFn(data){
  153. sa.showIframe('绑定车辆', '../tb-business-car/tb-business-car-business.html?id=' + data.id+'&businessCarId='+data.businessCarId+'&carNo='+data.carNo, '90%',"90%");
  154. },
  155. handlerPay(data){
  156. sa.showIframe('人工收费', 'tb-car-disincle-pay.html?id=' + data.id, '1050px', '90%');
  157. },
  158. getCurrendCustomer() {
  159. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  160. this.currentCustomerId = resp.data;
  161. }.bind(this));
  162. },
  163. // 查看
  164. get: function(data) {
  165. sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1050px', '90%');
  166. },
  167. add: function(data) {
  168. sa.showIframe('新增数据', 'tb-car-disincle-add.html?id=-1', '1080px', '90%');
  169. },
  170. update(data) {
  171. sa.showIframe('修改数据', 'tb-car-disincle-edit.html?id=' + data.id, '1080px', '90%');
  172. },
  173. getPcodeByCurrRid() {
  174. sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
  175. this.perCode = resp.data;
  176. }.bind(this))
  177. },
  178. confirmFn(data) {
  179. sa.ajax('/TbBusinessItem/getList', {
  180. businessId: data.id
  181. }, function(resp) {
  182. data.items = resp.data;
  183. Object.assign(this.confirm, {
  184. visible: true,
  185. title:'账单确认',
  186. form: data,
  187. })
  188. this.confirm.form.ids = data.id;
  189. }.bind(this));
  190. },
  191. checkConfirmFn(data){
  192. sa.ajax('/TbBusinessItem/getList', {
  193. businessId: data.id
  194. }, function(resp) {
  195. data.items = resp.data;
  196. Object.assign(this.confirm, {
  197. visible: true,
  198. title:'查看账单',
  199. form: data,
  200. })
  201. }.bind(this));
  202. },
  203. // 删除
  204. del: function(data) {
  205. sa.confirm('是否删除,此操作不可撤销', function() {
  206. sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id+'&businessCarId='+data.businessCarId, function(res) {
  207. sa.arrayDelete(this.dataList, data);
  208. sa.ok('删除成功');
  209. sa.f5TableHeight(); // 刷新表格高度
  210. }.bind(this))
  211. }.bind(this));
  212. },
  213. sureConfirmFn() {
  214. sa.ajax('/TbBusiness/confirm', {
  215. ids: this.confirm.form.ids
  216. }, function(resp) {
  217. this.confirm.visible = false;
  218. this.f5();
  219. }.bind(this))
  220. },
  221. // 刷新
  222. f5: function() {
  223. sa.ajaxNoLoading('/TbBusiness/getCarDisincleList', sa.removeNull(this.p), function(res) {
  224. this.dataList = res.data; // 数据
  225. this.dataCount = res.dataCount; // 数据总数
  226. sa.f5TableHeight(); // 刷新表格高度
  227. }.bind(this));
  228. },
  229. },
  230. created: function() {
  231. sa.onInputEnter();
  232. },
  233. mounted() {
  234. this.getCurrendCustomer();
  235. this.f5();
  236. },
  237. })
  238. </script>
  239. </body>
  240. </html>