tb-deduction-record-list.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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="https://unpkg.com/element-ui@2.13.0/lib/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. <style>
  18. .sum-div {
  19. text-align: right;
  20. padding: 10px 150px 10px;
  21. font-weight: bold;
  22. }
  23. .sum-title {
  24. color: darkred;
  25. font-weight: bold;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div class="vue-box" style="display: none;" :style="'display: block;'">
  31. <div class="c-panel">
  32. <!-- ------------- 检索参数 ------------- -->
  33. <div class="c-title">检索参数</div>
  34. <el-form ref="form" :model='p' @submit.native.prevent>
  35. <sa-item type="text" name="企业" v-model="p.customerName"></sa-item>
  36. <sa-item type="text" name="业务单号" v-model="p.businessNo"></sa-item>
  37. <sa-item type="text" name="车牌号" v-model="p.carNo"></sa-item>
  38. <sa-item type="enum" name="收费项目">
  39. <el-select v-model="p.feeType" clearable placeholder="请选择" filterable>
  40. <el-option label="核酸检测" value="1"></el-option>
  41. <el-option label="消杀作业" value="2"></el-option>
  42. <el-option label="装卸作业" value="3"></el-option>
  43. <el-option label="停车费" value="4"></el-option>
  44. <el-option label="过磅费" value="5"></el-option>
  45. <el-option label="入场管理费" value="6"></el-option>
  46. <el-option label="充电打冷作业" value="7"></el-option>
  47. </el-select>
  48. </sa-item>
  49. <sa-item type="enum" name="业务类型">
  50. <el-select v-model="p.itemTypeName" clearable placeholder="请选择" filterable>
  51. <el-option v-for="item in itemTypeList" :key="item.id" :label="item.name"
  52. :value="item.name">
  53. </el-option>
  54. </el-select>
  55. </sa-item>
  56. <sa-item type="text" name="扣款时间">
  57. <el-date-picker v-model="p.payTime" type="daterange" align="right" unlink-panels
  58. value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
  59. end-placeholder="结束日期" :picker-options="pickerOptions">
  60. </el-date-picker>
  61. </sa-item>
  62. <sa-item type="text" name="复核状态">
  63. <el-select v-model="p.reviewStatus" clearable placeholder="请选择">
  64. <el-option v-for="item in reviewStatusList" :key="item.id" :label="item.name"
  65. :value="item.id">
  66. </el-option>
  67. </el-select>
  68. </sa-item>
  69. <sa-item type="text" name="订单状态">
  70. <el-select v-model="p.status" placeholder="请选择">
  71. <el-option label="全部" :value="-1">
  72. </el-option>
  73. <el-option label="正常" :value="1">
  74. </el-option>
  75. <el-option label="异常" :value="0">
  76. </el-option>
  77. </el-select>
  78. </sa-item>
  79. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  80. <sa-item type="fast-btn" show="reset" style="display: inline;"></sa-item>
  81. <el-button v-if="sa.isAuth('tb-deduction-record-export')" type="primary" icon="el-icon-download" @click="exportFn">导出</el-button>
  82. </el-form>
  83. <!-- ------------- 快捷按钮 ------------- -->
  84. <!-- ------------- 数据列表 ------------- -->
  85. <div class="sum-div">总共 <span class="sum-title">{{dataCount}}</span>条;扣款金额:<span
  86. class="sum-title">¥{{totalMoney.toFixed(2)}}</span>元</div>
  87. <el-table class="data-table" ref="data-table" :data="dataList">
  88. <sa-td type="index" name="序号"></sa-td>
  89. <sa-td name="企业" prop="customerName" width="150"></sa-td>
  90. <sa-td name="业务单号" prop="businessNo" width="150"></sa-td>
  91. <sa-td name="车牌号" prop="carNo" width="100"></sa-td>
  92. <sa-td name="收费项目" prop="feeType" type="enum"
  93. :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
  94. <sa-td name="业务类型" prop="itemTypeName" width="150"></sa-td>
  95. <sa-td name="车型" prop="itemName" width="150"></sa-td>
  96. <sa-td name="原金额" prop="originalMoney" width="120"></sa-td>
  97. <sa-td name="扣除金额" prop="deductMoney" width="90"></sa-td>
  98. <sa-td name="余额" prop="totalMoney"></sa-td>
  99. <sa-td name="订单状态" prop="status" type="enum" :jv="{0: '异常',1: '正常'}"></sa-td>
  100. <sa-td name="结算状态" prop="isSettle" type="enum" :jv="{0: '未结算',1: '已结算'}"></sa-td>
  101. <sa-td name="复核状态" prop="reviewStatus" type="enum" :jv="{0: '未复核',1: '已复核'}"></sa-td>
  102. <sa-td name="税率%">
  103. <template slot-scope="s">
  104. <span>{{s.row.taxRate * 100}}</span>
  105. </template>
  106. </sa-td>
  107. <el-table-column label="税额(元)">
  108. <template slot-scope="s">
  109. <span>{{Number(s.row.taxPrice).toFixed(2)}}</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="不含税(元)" width="100">
  113. <template slot-scope="s">
  114. <span>{{Number(s.row.noTaxPrice).toFixed(2)}}</span>
  115. </template>
  116. </el-table-column>
  117. <!-- <sa-td name="生成时间" prop="createTime" width="150px"></sa-td> -->
  118. <sa-td name="扣款时间" prop="payTime" width="150px"></sa-td>
  119. <el-table-column label="操作" fixed="right" width="130px">
  120. <template slot-scope="s">
  121. <el-button class="c-btn" type="primary"
  122. v-if="s.row.reviewStatus!=1 && sa.isAuth('tb-deduction-record-list-review')"
  123. @click="toReview(s.row)">复审</el-button>
  124. <el-button class="c-btn" type="warning" v-if="sa.isAuth('tb-deduction-record-set-error')"
  125. @click="setError(s.row)">异常订单</el-button>
  126. </template>
  127. </el-table-column>
  128. </el-table>
  129. <!-- ------------- 分页 ------------- -->
  130. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  131. </sa-item>
  132. </div>
  133. </div>
  134. <script>
  135. var app = new Vue({
  136. components: {
  137. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  138. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  139. },
  140. el: '.vue-box',
  141. data: {
  142. totalMoney:0,
  143. p: { // 查询参数
  144. id: '', // 主键
  145. businessId: '', // 业务id
  146. businessNo: '', // 业务单号
  147. carNo: '', // 车牌号
  148. feeType: '', // 收费类型
  149. itemTypeId: '', // 业务类型id
  150. itemTypeName: '', // 业务类型
  151. itemId: '', //
  152. itemName: '', // 业务项
  153. itemPrice: '', // 项目金额(元)
  154. unitPrice: '', //
  155. payDay: '', // 支付日期
  156. payTime: '', // 支付时间
  157. payType: '', // 支付方式(3=微信支付)
  158. payMode: '', //
  159. createTime: '', // 创建时间
  160. updateTime: '', // 更新时间
  161. businessItemId: '', //
  162. businessItemNo: '', // 业务项单号
  163. pickCustomerName: '', //
  164. customerName: '', // 客户名称
  165. entityName: '', // 主体名称
  166. taxRate: '', //
  167. noTaxPrice: '', //
  168. taxPrice: '', //
  169. weight: '', //
  170. num: '', //
  171. isSettle: '', // 是否结算
  172. remark: '', // 备注
  173. invoice: '', // 发票
  174. transactionId: '', // 微信交易单号
  175. outTradeNo: '', // 支付单号
  176. businessCarId: '', //
  177. businessCarNo: '', //
  178. kaiDanPerson: '', // 开单员
  179. diaoDuPerson: '', // 调度员
  180. jiChaPerson: '', // 稽查员
  181. customerId: '', // 客户id
  182. deductMoney: '', // 扣除金额
  183. feeDetailsId: '', // 收费明细id
  184. reviewBy: '', // 复核人员
  185. reviewTime: '', // 复核时间
  186. reviewStatus: '', // 复核状态,0-未复核、1-已复核
  187. partner: '', // 合作伙伴
  188. originalMoney: '', // 原金额
  189. totalMoney: '', // 余额
  190. pageNo: 1, // 当前页
  191. pageSize: 10, // 页大小
  192. sortType: 0, // 排序方式
  193. status:-1
  194. },
  195. pickerOptions: {
  196. shortcuts: [{
  197. text: '最近一周',
  198. onClick(picker) {
  199. const end = new Date();
  200. const start = new Date();
  201. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  202. picker.$emit('pick', [start, end]);
  203. }
  204. }, {
  205. text: '最近一个月',
  206. onClick(picker) {
  207. const end = new Date();
  208. const start = new Date();
  209. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  210. picker.$emit('pick', [start, end]);
  211. }
  212. }, {
  213. text: '最近三个月',
  214. onClick(picker) {
  215. const end = new Date();
  216. const start = new Date();
  217. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  218. picker.$emit('pick', [start, end]);
  219. }
  220. }]
  221. },
  222. reviewStatusList: [{
  223. id: 2,
  224. name: '全部'
  225. },
  226. {
  227. id: 0,
  228. name: '未复核'
  229. },
  230. {
  231. id: 1,
  232. name: '已复核'
  233. }
  234. ],
  235. dataCount: 0,
  236. dataList: [], // 数据集合
  237. itemTypeList: [],
  238. },
  239. methods: {
  240. getSum(){
  241. let p=this.p;
  242. if(p.payTime){
  243. p.startTime=p.payTime[0];
  244. p.endTime=p.payTime[1];
  245. }else{
  246. p.startTime='';
  247. p.endTime='';
  248. }
  249. sa.ajax('/TbDeductionRecord/getSum', sa.removeNull(this.p), function(res) {
  250. this.totalMoney=res.data;
  251. }.bind(this));
  252. },
  253. exportFn () {
  254. let p=this.p;
  255. if(p.payTime){
  256. p.startTime=p.payTime[0];
  257. p.endTime=p.payTime[1];
  258. }else{
  259. p.startTime='';
  260. p.endTime='';
  261. }
  262. sa.confirm('是否导出符合筛选条件的扣费记录', function() {
  263. sa.ajax('/TbDeductionRecord/export', sa.removeNull(this.p),
  264. function(res) {
  265. window.location.href=res.data;
  266. }.bind(this))
  267. }.bind(this));
  268. },
  269. setError(data) {
  270. let that = this;
  271. layer.prompt({
  272. title: '输入异常原因'
  273. }, function(pass, index) {
  274. layer.close(index);
  275. sa.ajax('/TbDeductionRecord/setError', {
  276. id: data.id,
  277. errorRemark: pass
  278. }, function(res) {
  279. layer.msg('成功');
  280. that.f5();
  281. })
  282. });
  283. },
  284. // 刷新
  285. f5: function() {
  286. let p=this.p;
  287. if(p.payTime){
  288. p.startTime=p.payTime[0];
  289. p.endTime=p.payTime[1];
  290. }else{
  291. p.startTime='';
  292. p.endTime='';
  293. }
  294. sa.ajax('/TbDeductionRecord/getList', sa.removeNull(this.p), function(res) {
  295. this.dataList = res.data; // 数据
  296. this.dataCount = res.dataCount; // 数据总数
  297. sa.f5TableHeight(); // 刷新表格高度
  298. this.getSum();
  299. }.bind(this));
  300. },
  301. // 查看
  302. get: function(data) {
  303. sa.showIframe('数据详情', 'tb-deduction-record-info.html?id=' + data.id, '1050px', '90%');
  304. },
  305. // 查看 - 根据选中的
  306. getBySelect: function(data) {
  307. var selection = this.$refs['data-table'].selection;
  308. if (selection.length == 0) {
  309. return sa.msg('请选择一条数据')
  310. }
  311. this.get(selection[0]);
  312. },
  313. // 修改
  314. update: function(data) {
  315. sa.showIframe('修改数据', 'tb-deduction-record-add.html?id=' + data.id, '1000px', '90%');
  316. },
  317. // 新增
  318. add: function(data) {
  319. sa.showIframe('新增数据', 'tb-deduction-record-add.html?id=-1', '1000px', '90%');
  320. },
  321. //复审
  322. toReview(data) {
  323. let ss = ',业务单号:' + data.businessNo + ')';
  324. sa.confirm('您确认对(' + data.customerName + ss + '复审吗?', function() {
  325. sa.ajax('/TbDeductionRecord/review?id=' + data.id, function(res) {
  326. sa.ok('复审成功');
  327. this.f5();
  328. sa.f5TableHeight(); // 刷新表格高度
  329. }.bind(this))
  330. }.bind(this));
  331. },
  332. getItemTypeList() {
  333. sa.ajax('/TbItemType/getList', {
  334. pageNo: 1,
  335. pageSize: 100
  336. }, function(resp) {
  337. this.itemTypeList = resp.data;
  338. }.bind(this));
  339. },
  340. },
  341. created: function() {
  342. this.f5();
  343. this.getItemTypeList();
  344. sa.onInputEnter();
  345. }
  346. })
  347. </script>
  348. </body>
  349. </html>