tb-fee-details-list.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  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. </head>
  18. <style>
  19. @page {
  20. size: portrait;
  21. /* 纵向 */
  22. margin: 1.5cm 2.5cm 1.5cm 2.5cm;
  23. * 边距 上右下左 */
  24. }
  25. .keyButton.el-button {
  26. width: 100%;
  27. overflow: hidden;
  28. text-align: left;
  29. text-overflow: ellipsis;
  30. white-space: nowrap;
  31. border: 0 !important;
  32. background: transparent;
  33. padding: 0 !important;
  34. }
  35. .keyButton.el-button:hover {
  36. border: 0 !important;
  37. background: transparent;
  38. padding: 0 !important;
  39. }
  40. .price-t {
  41. font-size: 14px;
  42. font-weight: bold;
  43. line-height: 2em;
  44. margin-bottom: 3px;
  45. float: right;
  46. }
  47. </style>
  48. <body>
  49. <div class="vue-box" style="display: none;" :style="'display: block;'">
  50. <div class="c-panel">
  51. <!-- ------------- 检索参数 ------------- -->
  52. <div class="c-title">检索参数</div>
  53. <el-form ref="form" :model='p' @submit.native.prevent>
  54. <div class="c-item">
  55. <label class="c-label">类型:</label>
  56. <el-select v-model="p.type" placeholder="请选择" filterable>
  57. <el-option label="停车费" value="4"></el-option>
  58. <el-option label="业务费" value="1,2,3,5,6,7"></el-option>
  59. </el-select>
  60. </div>
  61. <sa-item type="text" name="车型" v-model="p.itemName"></sa-item>
  62. <sa-item type="text" name="车牌号" v-model="p.carNo"></sa-item>
  63. <sa-item type="text" name="业务单号" v-model="p.businessNo"></sa-item>
  64. <div class="c-item">
  65. <label class="c-label">收费项目:</label>
  66. <el-select v-model="p.feeType" placeholder="请选择" filterable>
  67. <el-option label="核酸检测" value="1"></el-option>
  68. <el-option label="消杀作业" value="2"></el-option>
  69. <el-option label="装卸作业" value="3"></el-option>
  70. <el-option label="停车业务" value="4"></el-option>
  71. <el-option label="过磅费" value="5"></el-option>
  72. <el-option label="入场管理费" value="6"></el-option>
  73. <el-option label="充电打冷作业" value="7"></el-option>
  74. </el-select>
  75. </div>
  76. <div class="c-item">
  77. <label class="c-label">业务类型:</label>
  78. <el-select v-model="p.itemTypeName" placeholder="请选择" filterable>
  79. <el-option v-for="item in itemTypeList" :key="item.id" :label="item.name"
  80. :value="item.name">
  81. </el-option>
  82. </el-select>
  83. </div>
  84. <div class="c-item">
  85. <label class="c-label">日期范围:</label>
  86. <el-date-picker size="mini" v-model="selectTime" type="daterange" unlink-panels="false"
  87. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  88. format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
  89. </el-date-picker>
  90. </div>
  91. <div class="c-item">
  92. <label class="c-label">是否开票:</label>
  93. <el-select v-model="p.isInvoice" placeholder="请选择" filterable>
  94. <el-option label="全部" value=""></el-option>
  95. <el-option label="未开票" value="0"></el-option>
  96. <el-option label="已开票" value="1"></el-option>
  97. </el-select>
  98. </div>
  99. <sa-item type="text" name="微信支付号" v-model="p.transactionId"></sa-item>
  100. <sa-item type="text" name="作业公司" v-model="p.pickCustomerName"></sa-item>
  101. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  102. <el-button type="info" @click="sa.f5()">刷新</el-button>
  103. <el-button type="warning" v-if="sa.isAuth('tb-statistics-export')" @click="exportFn()">导出
  104. </el-button>
  105. <el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-statistics-print')"
  106. @click="print()">打印</el-button>
  107. <el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-kaidan-confirm')"
  108. @click="kaiDanConfirm()">开单确认</el-button>
  109. <el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-diaodu-confirm')"
  110. @click="diaoDuConfirm()">复核确认</el-button>
  111. <el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-jicha-confirm')"
  112. @click="jiChaConfirm()">稽查确认</el-button>
  113. <el-button class="c-btn" type="danger" icon="el-icon" v-if="sa.isAuth('tb-jicha-cancel')"
  114. @click="jiChaCancel()">取消确认</el-button>
  115. <slot></slot>
  116. <div class="price-t">
  117. 总共<span
  118. style="color: #ff6600">&nbsp&nbsp{{dataCount}}&nbsp&nbsp</span>条&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
  119. 总金额<span style="color: #ff6600">&nbsp&nbsp{{totalPrice}}&nbsp&nbsp</span>元
  120. </div>
  121. <br />
  122. </el-form>
  123. <!-- ------------- 数据列表 ------------- -->
  124. <el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol"
  125. style="margin-top: 10px;">
  126. <sa-td type="selection"></sa-td>
  127. <sa-td name="收费项目" prop="feeType" type="enum"
  128. :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
  129. <sa-td name="业务类型" prop="itemTypeName"></sa-td>
  130. <sa-td name="车型" prop="itemName"></sa-td>
  131. <sa-td name="车牌号" prop="carNo" width="90px"></sa-td>
  132. <!-- <sa-td name="重量(kg)" prop="weight"></sa-td> -->
  133. <sa-td name="数量" prop="num"></sa-td>
  134. <sa-td name="单价(元)" prop="unitPrice"></sa-td>
  135. <sa-td name="总价(元)" prop="itemPrice"></sa-td>
  136. <sa-td name="缴费方式" prop="module"></sa-td>
  137. <sa-td name="结算状态" prop="isSettle" type="enum" :jv="{0: '未结算',1: '已结算'}"></sa-td>
  138. <sa-td name="复核状态" prop=""></sa-td>
  139. <!-- <sa-td name="税率(%)" prop="taxRate" ></sa-td>-->
  140. <el-table-column label="税率(%)">
  141. <template slot-scope="s">
  142. <span>{{s.row.taxRate * 100}}</span>
  143. </template>
  144. </el-table-column>
  145. <!-- <sa-td name="税款(元)" prop="taxPrice" ></sa-td>-->
  146. <el-table-column label="税款(元)">
  147. <template slot-scope="s">
  148. <span>{{Number(s.row.taxPrice).toFixed(2)}}</span>
  149. </template>
  150. </el-table-column>
  151. <!-- <sa-td name="不含税金额(元)" prop="noTaxPrice" ></sa-td>-->
  152. <el-table-column label="不含税金额(元)">
  153. <template slot-scope="s">
  154. <span>{{Number(s.row.noTaxPrice).toFixed(2)}}</span>
  155. </template>
  156. </el-table-column>
  157. <!-- <sa-td name="收款方式" prop="payType" type="enum" :jv="{3: '微信支付'}"></sa-td>
  158. <sa-td name="收款种类" prop="payMode" type="enum" :jv="{1: '直接收款'}"></sa-td> -->
  159. <el-table-column label="业务单号" width="140px">
  160. <template slot-scope="s">
  161. <span v-if="s.row.businessNo != null && s.row.businessNo != ''">{{s.row.businessNo}}</span>
  162. <span v-else>{{s.row.businessCarNo}}</span>
  163. </template>
  164. </el-table-column>
  165. <!-- <sa-td name="订单编号" prop="transactionId" width="220px" ></sa-td>-->
  166. <el-table-column label="微信支付业务单号" width="220px">
  167. <template slot-scope="s">
  168. <el-tooltip :content="s.row.transactionId" placement="bottom" effect="light">
  169. <el-button class="keyButton">{{ s.row.transactionId }}</el-button>
  170. </el-tooltip>
  171. </template>
  172. </el-table-column>
  173. <sa-td name="作业编号" prop="businessItemNo" width="145px"></sa-td>
  174. <sa-td name="作业公司" prop="pickCustomerName"></sa-td>
  175. <sa-td name="客户名称" prop="customerName"></sa-td>
  176. <sa-td name="发票号" prop="invoice" width="145px"></sa-td>
  177. <sa-td name="主体名称" prop="entityName"></sa-td>
  178. <sa-td name="生成时间" prop="createTime" width="150px"></sa-td>
  179. <sa-td name="付款时间" prop="payTime" width="150px"></sa-td>
  180. <sa-td name="更新时间" prop="updateTime" width="150px"></sa-td>
  181. <sa-td name="备注" prop="remark"></sa-td>
  182. <sa-td name="开单员" prop="kaiDanPerson" width="80px"></sa-td>
  183. <sa-td name="复核员" prop="diaoDuPerson" width="80px"></sa-td>
  184. <sa-td name="统计稽查员" prop="jiChaPerson" width="80px"></sa-td>
  185. </el-table>
  186. <!-- ------------- 分页 ------------- -->
  187. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  188. </sa-item>
  189. </div>
  190. <el-dialog title="提示" :visible.sync="emodel.visible" width="38%">
  191. <div class="c-item">
  192. <label class="c-label">收费项目:</label>
  193. <el-select v-model="emodel.form.feeType" placeholder="请选择" filterable>
  194. <el-option label="核酸检测" value="1"></el-option>
  195. <el-option label="消杀作业" value="2"></el-option>
  196. <el-option label="装卸作业" value="3"></el-option>
  197. <el-option label="停车费" value="4"></el-option>
  198. <el-option label="过磅费" value="5"></el-option>
  199. <el-option label="入场管理费" value="6"> </el-option>
  200. <el-option label="充电打冷作业" value="7"> </el-option>
  201. </el-select>
  202. </div>
  203. <div class="c-item">
  204. <label class="c-label">业务类型:</label>
  205. <el-select v-model="emodel.form.itemTypeName" placeholder="请选择" filterable>
  206. <el-option v-for="item in itemTypeList" :key="item.id" :label="item.name" :value="item.name">
  207. </el-option>
  208. </el-select>
  209. </div>
  210. <div class="c-item">
  211. <label class="c-label"><span style="color: red;">*</span>日期范围:</label>
  212. <el-date-picker size="mini" v-model="exportTime" type="daterange" unlink-panels="false"
  213. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日"
  214. value-format="yyyy-MM-dd">
  215. </el-date-picker>
  216. </div>
  217. <span slot="footer" class="dialog-footer">
  218. <el-button @click="emodel.visible = false">取 消</el-button>
  219. <el-button type="primary" @click="">确 定</el-button>
  220. </span>
  221. </el-dialog>
  222. </div>
  223. <script>
  224. var app = new Vue({
  225. components: {
  226. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  227. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  228. },
  229. el: '.vue-box',
  230. data: {
  231. count:0,
  232. p: { // 查询参数
  233. id: '', // 主键
  234. businessNo: '', // 业务单号
  235. transactionId: '', //微信支付号
  236. pickCustomerName: '',
  237. carNo: '', // 车牌号
  238. feeType: '', //收费类型
  239. itemTypeId: '', // 业务类型id
  240. itemTypeName: '', // 业务类型
  241. itemName: '', // 业务项
  242. itemPrice: '', // 项目金额(元)
  243. payDay: '', // 支付日期
  244. payType: '', // 支付方式(3=微信支付)
  245. createTime: '', // 创建时间
  246. pageNo: 1, // 当前页
  247. pageSize: 10, // 页大小
  248. sortType: 11, // 排序方式
  249. type: '',
  250. isInvoice: '', //是否开票
  251. },
  252. dataCount: 0,
  253. dataList: [], // 数据集合
  254. itemTypeList: [],
  255. selectTime: [],
  256. selectTimeRange: {
  257. beginTime: '', //查询开始时间
  258. endTime: '', //查询结束时间
  259. },
  260. exportTime: [],
  261. emodel: {
  262. visible: false,
  263. form: {
  264. // payDay: ''
  265. feeType: '',
  266. itemTypeName: '',
  267. beginTime: '', //查询开始时间
  268. endTime: '', //查询结束时间
  269. }
  270. },
  271. totalPrice: 0,
  272. tableSum: {
  273. itemPriceSum: 0,
  274. taxPriceSum: 0,
  275. noTaxPriceSum: 0,
  276. },
  277. },
  278. methods: {
  279. getSumRol(param) {
  280. const columns = param.columns;
  281. const sums = [];
  282. columns.forEach((column, index) => {
  283. if (index === 0) {
  284. sums[index] = "合计";
  285. return;
  286. }
  287. //根据当前列绑定的字段名进行判断,根据字段名决定展示什么内容
  288. switch (column.label) {
  289. //金额;
  290. case "总价(元)":
  291. //在这里你就可以根据需要对数据进行一些处理(保留小数位数,加上单位等)
  292. sums[index] = this.tableSum.itemPriceSum;
  293. break;
  294. //人数
  295. case "税款(元)":
  296. sums[index] = this.tableSum.taxPriceSum;
  297. break;
  298. //件数;
  299. case "不含税金额(元)":
  300. sums[index] = this.tableSum.noTaxPriceSum;
  301. break;
  302. //不需要计算合计的列就展示‘--’
  303. default:
  304. sums[index] = "";
  305. break;
  306. }
  307. });
  308. return sums;
  309. },
  310. calcuSum() {
  311. var itemPriceSum = 0;
  312. var taxPriceSum = 0;
  313. var noTaxPriceSum = 0;
  314. var len = this.dataList.length;
  315. for (var i = 0; i < len; i++) {
  316. itemPriceSum = (itemPriceSum * 100 + this.dataList[i].itemPrice * 100) / 100;
  317. taxPriceSum = (taxPriceSum * 100 + this.dataList[i].taxPrice * 100) / 100;
  318. noTaxPriceSum = (noTaxPriceSum * 100 + this.dataList[i].noTaxPrice * 100) / 100;
  319. }
  320. this.tableSum.itemPriceSum = itemPriceSum;
  321. this.tableSum.taxPriceSum = Number(taxPriceSum).toFixed(2);
  322. this.tableSum.noTaxPriceSum = Number(noTaxPriceSum).toFixed(2);
  323. },
  324. getTotalPrice() {
  325. if (this.selectTime != null && this.selectTime.length != 0) {
  326. this.selectTimeRange.beginTime = this.selectTime[0];
  327. this.selectTimeRange.endTime = this.selectTime[1];
  328. }
  329. sa.ajax('/TbFeeDetails/getTotalMoney?beginTime=' + this.selectTimeRange.beginTime + '&endTime=' +
  330. this.selectTimeRange.endTime,
  331. sa.removeNull(this.p),
  332. function(res) {
  333. this.totalPrice = res.data.itemPriceSum;
  334. this.tableSum.itemPriceSum = res.data.itemPriceSum;
  335. this.tableSum.taxPriceSum = res.data.taxPriceSum;
  336. this.tableSum.noTaxPriceSum = res.data.noTaxPriceSum;
  337. }.bind(this));
  338. },
  339. kaiDanConfirm() {
  340. let selection = this.$refs['data-table'].selection;
  341. let ids = sa.getArrayField(selection, 'id');
  342. if (selection.length == 0) {
  343. return sa.msg('请至少选择一条数据')
  344. }
  345. this.$confirm('确定进行开单确认操作?', '提示', {
  346. confirmButtonText: '确定',
  347. cancelButtonText: '取消',
  348. }).then(() => {
  349. sa.ajax('/TbFeeDetails/kaiDanConfirm', {
  350. ids: ids.join(',')
  351. }, function(res) {
  352. this.f5();
  353. }.bind(this))
  354. }).catch(() => {
  355. });
  356. },
  357. diaoDuConfirm() {
  358. let selection = this.$refs['data-table'].selection;
  359. let ids = sa.getArrayField(selection, 'id');
  360. if (selection.length == 0) {
  361. return sa.msg('请至少选择一条数据')
  362. }
  363. this.$confirm('确定进行复核确认操作?', '提示', {
  364. confirmButtonText: '确定',
  365. cancelButtonText: '取消',
  366. }).then(() => {
  367. sa.ajax('/TbFeeDetails/diaoDuConfirm', {
  368. ids: ids.join(',')
  369. }, function(res) {
  370. this.f5();
  371. }.bind(this))
  372. }).catch(() => {
  373. });
  374. },
  375. jiChaConfirm() {
  376. let selection = this.$refs['data-table'].selection;
  377. let ids = sa.getArrayField(selection, 'id');
  378. if (selection.length == 0) {
  379. return sa.msg('请至少选择一条数据')
  380. }
  381. this.$confirm('确定进行稽查确认操作?', '提示', {
  382. confirmButtonText: '确定',
  383. cancelButtonText: '取消',
  384. }).then(() => {
  385. sa.ajax('/TbFeeDetails/jiChaConfirm', {
  386. ids: ids.join(',')
  387. }, function(res) {
  388. this.f5();
  389. }.bind(this))
  390. }).catch(() => {
  391. });
  392. },
  393. jiChaCancel() {
  394. let selection = this.$refs['data-table'].selection;
  395. let ids = sa.getArrayField(selection, 'id');
  396. if (selection.length == 0) {
  397. return sa.msg('请至少选择一条数据')
  398. }
  399. this.$confirm('确定进行开单确认操作?', '提示', {
  400. confirmButtonText: '确定',
  401. cancelButtonText: '取消',
  402. type: 'warning'
  403. }).then(() => {
  404. sa.ajax('/TbFeeDetails/jiChaCancel', {
  405. ids: ids.join(',')
  406. }, function(res) {
  407. this.f5();
  408. }.bind(this))
  409. }).catch(() => {
  410. });
  411. },
  412. print: function() {
  413. let selection = this.$refs['data-table'].selection;
  414. let ids = sa.getArrayField(selection, 'id');
  415. let params = '?';
  416. var str = '';
  417. if (selection.length > 0) {
  418. params += 'ids=' + ids.join(',');
  419. str = '所选项目';
  420. } else {
  421. if (this.selectTime != null && this.selectTime.length != 0) {
  422. this.selectTimeRange.beginTime = this.selectTime[0];
  423. this.selectTimeRange.endTime = this.selectTime[1];
  424. }
  425. var beginTime = this.selectTimeRange.beginTime;
  426. var endTime = this.selectTimeRange.endTime;
  427. var feeType = this.p.feeType;
  428. var itemTypeName = this.p.itemTypeName;
  429. if (beginTime === '' && endTime === '') {
  430. str += '所有时间';
  431. } else {
  432. str += beginTime + "至" + endTime
  433. }
  434. if (feeType === '') {
  435. str += "、所有收费项目";
  436. } else {
  437. var feeTypeName = '';
  438. if (feeType == 1) {
  439. feeTypeName = "核酸检测";
  440. } else if (feeType == 2) {
  441. feeTypeName = "消杀作业";
  442. } else if (feeType == 3) {
  443. feeTypeName = "装卸作业";
  444. } else if (feeType == 4) {
  445. feeTypeName = "停车费";
  446. } else if (feeType == 5) {
  447. feeTypeName = "过磅费";
  448. } else if (feeType == 6) {
  449. feeTypeName = "入场管理费";
  450. } else if (feeType == 7) {
  451. feeTypeName = "充电打冷作业";
  452. }
  453. str += "、收费项目为" + feeTypeName;
  454. }
  455. if (itemTypeName === '') {
  456. str += "、所有业务类型";
  457. } else {
  458. str += "、业务类型为" + itemTypeName;
  459. }
  460. let itemName = this.p.itemName;
  461. if (itemName) {
  462. str += '车型为:' + itemName;
  463. }
  464. params += 'beginTime=' + beginTime +
  465. "&endTime=" + endTime + "&feeType=" + feeType + "&itemTypeName=" +
  466. itemTypeName;
  467. }
  468. this.$confirm('确定打印' + str + '的数据?', '提示', {
  469. confirmButtonText: '确定',
  470. cancelButtonText: '取消',
  471. type: 'warning'
  472. }).then(() => {
  473. sa.showIframe('打印申报信息表', 'detailPrint.html' + params, '100%', '100%');
  474. }).catch(() => {
  475. });
  476. },
  477. exportFn() {
  478. let selection = this.$refs['data-table'].selection;
  479. let ids = sa.getArrayField(selection, 'id');
  480. var str = '';
  481. if (selection.length > 0) {
  482. this.p.ids = ids.join(',');
  483. str = '所选项目';
  484. } else {
  485. if (this.selectTime != null && this.selectTime.length != 0) {
  486. this.selectTimeRange.beginTime = this.selectTime[0];
  487. this.selectTimeRange.endTime = this.selectTime[1];
  488. }
  489. var beginTime = this.selectTimeRange.beginTime;
  490. var endTime = this.selectTimeRange.endTime;
  491. if (!beginTime && !endTime) {
  492. sa.error('导出时间必选');
  493. return;
  494. }
  495. var feeType = this.p.feeType;
  496. var itemTypeName = this.p.itemTypeName;
  497. if (beginTime === '' && endTime === '') {
  498. str += '所有时间';
  499. } else {
  500. str += beginTime + "至" + endTime
  501. }
  502. if (feeType === '') {
  503. str += "、所有收费项目";
  504. } else {
  505. var feeTypeName = '';
  506. if (feeType == 1) {
  507. feeTypeName = "核酸检测";
  508. } else if (feeType == 2) {
  509. feeTypeName = "消杀作业";
  510. } else if (feeType == 3) {
  511. feeTypeName = "装卸作业";
  512. } else if (feeType == 4) {
  513. feeTypeName = "停车费";
  514. } else if (feeType == 5) {
  515. feeTypeName = "过磅费";
  516. } else if (feeType == 6) {
  517. feeTypeName = "入场管理费";
  518. } else if (feeType == 7) {
  519. feeTypeName = "充电打冷作业";
  520. }
  521. str += "、收费项目为" + feeTypeName;
  522. }
  523. if (itemTypeName === '') {
  524. str += "、所有业务类型";
  525. } else {
  526. str += "、业务类型为" + itemTypeName;
  527. }
  528. let itemName = this.p.itemName;
  529. if (itemName) {
  530. str += '车型为:' + itemName;
  531. }
  532. }
  533. this.p.beginTime = beginTime;
  534. this.p.endTime = endTime;
  535. this.$confirm('确定导出' + str + '的数据?', '提示', {
  536. confirmButtonText: '确定',
  537. cancelButtonText: '取消',
  538. type: 'warning'
  539. }).then(() => {
  540. let uuid=new Date().getTime();
  541. this.p.uuid=uuid;
  542. sa.ajax('/TbFeeDetails/export/details', sa.removeNull(this.p),
  543. function(resp) {
  544. sa.loading('正在导出....');
  545. this.count=0
  546. this.checkExportUrl(uuid);
  547. }.bind(this));
  548. }).catch(() => {
  549. });
  550. },
  551. checkExportUrl(uuid) {
  552. sa.ajaxNoLoading('/TbFeeDetails/export/details/path?uuid=' + uuid,
  553. function(resp) {
  554. let url = resp.data;
  555. if (url) {
  556. sa.hideLoading();
  557. window.location.href = url;
  558. } else {
  559. let count=this.count;
  560. if(count>=30){
  561. sa.error('导出超时');
  562. sa.hideLoading();
  563. return;
  564. }
  565. setTimeout(() => {
  566. this.count=count+1
  567. this.checkExportUrl(uuid);
  568. }, 1000)
  569. }
  570. }.bind(this));
  571. },
  572. // 刷新
  573. f5: function() {
  574. if (this.selectTime != null && this.selectTime.length != 0) {
  575. this.selectTimeRange.beginTime = this.selectTime[0];
  576. this.selectTimeRange.endTime = this.selectTime[1];
  577. }
  578. if (!this.selectTime) {
  579. this.selectTimeRange.beginTime = '';
  580. this.selectTimeRange.endTime = '';
  581. }
  582. sa.ajax('/TbFeeDetails/getList?beginTime=' + this.selectTimeRange.beginTime + '&endTime=' +
  583. this.selectTimeRange.endTime,
  584. sa.removeNull(this.p),
  585. function(res) {
  586. this.dataList = res.data; // 数据
  587. this.dataCount = res.dataCount; // 数据总数
  588. sa.f5TableHeight(); // 刷新表格高度
  589. }.bind(this));
  590. this.getTotalPrice();
  591. },
  592. // 查看
  593. get: function(data) {
  594. sa.showIframe('数据详情', 'tb-fee-details-info.html?id=' + data.id, '1050px', '90%');
  595. },
  596. // 查看 - 根据选中的
  597. getBySelect: function(data) {
  598. var selection = this.$refs['data-table'].selection;
  599. if (selection.length == 0) {
  600. return sa.msg('请选择一条数据')
  601. }
  602. this.get(selection[0]);
  603. },
  604. getItemTypeList() {
  605. sa.ajax('/TbItemType/getList', {
  606. pageNo: 1,
  607. pageSize: 100
  608. }, function(resp) {
  609. this.itemTypeList = resp.data;
  610. }.bind(this));
  611. },
  612. },
  613. created: function() {
  614. this.f5();
  615. this.getItemTypeList();
  616. sa.onInputEnter();
  617. }
  618. })
  619. </script>
  620. </body>
  621. </html>