tb-fee-details-list.html 22 KB

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