tb-fee-details-list.html 22 KB

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