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