tb-fee-details-list.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  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="invoice" width="145px"></sa-td>
  167. <sa-td name="企业名称" prop="pickCustomerName" ></sa-td>
  168. <sa-td name="生成时间" prop="createTime" width="150px" ></sa-td>
  169. <sa-td name="付款时间" prop="payTime" width="150px" ></sa-td>
  170. <sa-td name="备注" prop="remark" ></sa-td>
  171. <sa-td name="开单员" prop="kaiDanPerson" width="80px" ></sa-td>
  172. <sa-td name="复核员" prop="diaoDuPerson" width="80px" ></sa-td>
  173. <sa-td name="统计稽查员" prop="jiChaPerson" width="80px" ></sa-td>
  174. <!-- <el-table-column label="操作" fixed="right" width="240px">-->
  175. <!-- <template slot-scope="s">-->
  176. <!-- <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->
  177. <!-- <el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>-->
  178. <!-- <el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除</el-button>-->
  179. <!-- </template>-->
  180. <!-- </el-table-column>-->
  181. </el-table>
  182. <!-- ------------- 分页 ------------- -->
  183. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  184. </div>
  185. <el-dialog title="提示" :visible.sync="emodel.visible" width="38%">
  186. <!-- <el-form size="mini">-->
  187. <!-- <div class="c-item">-->
  188. <!-- <label class="c-label">日期:</label>-->
  189. <!-- <el-date-picker type="date" value-format="yyyy-MM-dd" v-model="emodel.form.payDay"></el-date-picker>-->
  190. <!-- </div>-->
  191. <!-- </el-form>-->
  192. <div class="c-item">
  193. <label class="c-label">收费项目:</label>
  194. <el-select v-model="emodel.form.feeType" placeholder="请选择" filterable>
  195. <el-option label="核酸检测" value="1"></el-option>
  196. <el-option label="消杀作业" value="2"></el-option>
  197. <el-option label="装卸作业" value="3"></el-option>
  198. <el-option label="停车费" value="4"></el-option>
  199. <el-option label="过磅费" value="5"></el-option>
  200. <el-option label="入场管理费" value="6"> </el-option>
  201. <el-option label="充电打冷作业" value="7"> </el-option>
  202. </el-select>
  203. </div>
  204. <div class="c-item">
  205. <label class="c-label">业务类型:</label>
  206. <el-select v-model="emodel.form.itemTypeName" placeholder="请选择" filterable>
  207. <el-option v-for="item in itemTypeList" :key="item.id"
  208. :label="item.name" :value="item.name">
  209. </el-option>
  210. </el-select>
  211. </div>
  212. <div class="c-item">
  213. <label class="c-label"><span style="color: red;">*</span>日期范围:</label>
  214. <el-date-picker size="mini" v-model="exportTime" type="daterange" unlink-panels="false"
  215. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  216. format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
  217. </el-date-picker>
  218. </div>
  219. <span slot="footer" class="dialog-footer">
  220. <el-button @click="emodel.visible = false">取 消</el-button>
  221. <el-button type="primary" @click="">确 定</el-button>
  222. </span>
  223. </el-dialog>
  224. </div>
  225. <script>
  226. var app = new Vue({
  227. components: {
  228. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  229. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  230. },
  231. el: '.vue-box',
  232. data: {
  233. p: { // 查询参数
  234. id: '', // 主键
  235. businessNo: '', // 业务单号
  236. carNo: '', // 车牌号
  237. feeType: '', //收费类型
  238. itemTypeId: '', // 业务类型id
  239. itemTypeName: '', // 业务类型
  240. itemId: '', //
  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. console.log("执行了getSumRol")
  281. const columns = param.columns;
  282. const sums = [];
  283. columns.forEach((column, index) => {
  284. if (index === 0) {
  285. sums[index] = "合计";
  286. return;
  287. }
  288. //根据当前列绑定的字段名进行判断,根据字段名决定展示什么内容
  289. switch (column.label) {
  290. //金额;
  291. case "总价(元)":
  292. //在这里你就可以根据需要对数据进行一些处理(保留小数位数,加上单位等)
  293. sums[index] = this.tableSum.itemPriceSum;
  294. break;
  295. //人数
  296. case "税款(元)":
  297. sums[index] = this.tableSum.taxPriceSum;
  298. break;
  299. //件数;
  300. case "不含税金额(元)":
  301. sums[index] = this.tableSum.noTaxPriceSum;
  302. break;
  303. //不需要计算合计的列就展示‘--’
  304. default:
  305. sums[index] = "";
  306. break;
  307. }
  308. });
  309. return sums;
  310. },
  311. calcuSum(){
  312. var itemPriceSum = 0;
  313. var taxPriceSum = 0;
  314. var noTaxPriceSum = 0;
  315. var len = this.dataList.length;
  316. for(var i=0; i<len; i++){
  317. itemPriceSum = (itemPriceSum*100 + this.dataList[i].itemPrice*100)/100;
  318. taxPriceSum = (taxPriceSum*100 + this.dataList[i].taxPrice*100)/100;
  319. noTaxPriceSum = (noTaxPriceSum*100 + this.dataList[i].noTaxPrice*100)/100;
  320. }
  321. this.tableSum.itemPriceSum = itemPriceSum;
  322. this.tableSum.taxPriceSum = Number(taxPriceSum).toFixed(2);
  323. this.tableSum.noTaxPriceSum = Number(noTaxPriceSum).toFixed(2);
  324. },
  325. getTotalPrice(){
  326. if ( this.selectTime != null && this.selectTime.length != 0) {
  327. this.selectTimeRange.beginTime = this.selectTime[0];
  328. this.selectTimeRange.endTime = this.selectTime[1];
  329. }
  330. sa.ajax('/TbFeeDetails/getTotalMoney?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
  331. sa.removeNull(this.p), function(res) {
  332. this.totalPrice = res.data.itemPriceSum;
  333. this.tableSum.itemPriceSum = res.data.itemPriceSum;
  334. this.tableSum.taxPriceSum = res.data.taxPriceSum;
  335. this.tableSum.noTaxPriceSum = res.data.noTaxPriceSum;
  336. }.bind(this));
  337. },
  338. kaiDanConfirm(){
  339. let selection = this.$refs['data-table'].selection;
  340. let ids = sa.getArrayField(selection, 'id');
  341. if(selection.length == 0) {
  342. return sa.msg('请至少选择一条数据')
  343. }
  344. this.$confirm('确定进行开单确认操作?', '提示', {
  345. confirmButtonText: '确定',
  346. cancelButtonText: '取消',
  347. }).then(() => {
  348. sa.ajax('/TbFeeDetails/kaiDanConfirm', {ids: ids.join(',')}, 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', {ids: ids.join(',')}, function(res) {
  365. this.f5();
  366. }.bind(this))
  367. }).catch(() => {
  368. });
  369. },
  370. jiChaConfirm(){
  371. let selection = this.$refs['data-table'].selection;
  372. let ids = sa.getArrayField(selection, 'id');
  373. if(selection.length == 0) {
  374. return sa.msg('请至少选择一条数据')
  375. }
  376. this.$confirm('确定进行稽查确认操作?', '提示', {
  377. confirmButtonText: '确定',
  378. cancelButtonText: '取消',
  379. }).then(() => {
  380. sa.ajax('/TbFeeDetails/jiChaConfirm', {ids: ids.join(',')}, function(res) {
  381. this.f5();
  382. }.bind(this))
  383. }).catch(() => {
  384. });
  385. },
  386. jiChaCancel(){
  387. let selection = this.$refs['data-table'].selection;
  388. let ids = sa.getArrayField(selection, 'id');
  389. if(selection.length == 0) {
  390. return sa.msg('请至少选择一条数据')
  391. }
  392. this.$confirm('确定进行开单确认操作?', '提示', {
  393. confirmButtonText: '确定',
  394. cancelButtonText: '取消',
  395. type: 'warning'
  396. }).then(() => {
  397. sa.ajax('/TbFeeDetails/jiChaCancel', {ids: ids.join(',')}, function(res) {
  398. this.f5();
  399. }.bind(this))
  400. }).catch(() => {
  401. });
  402. },
  403. print: function() {
  404. if ( this.selectTime != null && this.selectTime.length != 0) {
  405. this.selectTimeRange.beginTime = this.selectTime[0];
  406. this.selectTimeRange.endTime = this.selectTime[1];
  407. }
  408. var beginTime = this.selectTimeRange.beginTime;
  409. var endTime = this.selectTimeRange.endTime;
  410. var feeType = this.p.feeType;
  411. var itemTypeName = this.p.itemTypeName;
  412. var str = '';
  413. if(beginTime === '' && endTime === ''){
  414. str += '所有时间';
  415. }else {
  416. str += beginTime + "至" + endTime
  417. }
  418. if(feeType === ''){
  419. str += "、所有收费项目";
  420. }else{
  421. var feeTypeName = '';
  422. if(feeType == 1){
  423. feeTypeName = "核酸检测";
  424. }else if(feeType == 2){
  425. feeTypeName = "消杀作业";
  426. }else if(feeType == 3){
  427. feeTypeName = "装卸作业";
  428. }else if(feeType == 4){
  429. feeTypeName = "停车费";
  430. }else if(feeType == 5){
  431. feeTypeName = "过磅费";
  432. }else if(feeType == 6){
  433. feeTypeName = "入场管理费";
  434. }else if(feeType == 7){
  435. feeTypeName = "充电打冷作业";
  436. }
  437. str += "、收费项目为" + feeTypeName;
  438. }
  439. if(itemTypeName === ''){
  440. str += "、所有业务类型";
  441. }else{
  442. str += "、业务类型为" + itemTypeName;
  443. }
  444. this.$confirm('确定打印'+str+'的数据?', '提示', {
  445. confirmButtonText: '确定',
  446. cancelButtonText: '取消',
  447. type: 'warning'
  448. }).then(() => {
  449. sa.showIframe('打印申报信息表', 'detailPrint.html?beginTime='+beginTime+"&endTime="+endTime+"&feeType="+feeType+"&itemTypeName="+itemTypeName , '1000px', '100%');
  450. }).catch(() => {
  451. });
  452. },
  453. exportFn() {
  454. if ( this.selectTime != null && this.selectTime.length != 0) {
  455. this.selectTimeRange.beginTime = this.selectTime[0];
  456. this.selectTimeRange.endTime = this.selectTime[1];
  457. }
  458. var beginTime = this.selectTimeRange.beginTime;
  459. var endTime = this.selectTimeRange.endTime;
  460. var feeType = this.p.feeType;
  461. var itemTypeName = this.p.itemTypeName;
  462. var str = '';
  463. if(beginTime === '' && endTime === ''){
  464. str += '所有时间';
  465. }else {
  466. str += beginTime + "至" + endTime
  467. }
  468. if(feeType === ''){
  469. str += "、所有收费项目";
  470. }else{
  471. var feeTypeName = '';
  472. if(feeType == 1){
  473. feeTypeName = "核酸检测";
  474. }else if(feeType == 2){
  475. feeTypeName = "消杀作业";
  476. }else if(feeType == 3){
  477. feeTypeName = "装卸作业";
  478. }else if(feeType == 4){
  479. feeTypeName = "停车费";
  480. }else if(feeType == 5){
  481. feeTypeName = "过磅费";
  482. }else if(feeType == 6){
  483. feeTypeName = "入场管理费";
  484. }else if(feeType == 7){
  485. feeTypeName = "充电打冷作业";
  486. }
  487. str += "、收费项目为" + feeTypeName;
  488. }
  489. if(itemTypeName === ''){
  490. str += "、所有业务类型";
  491. }else{
  492. str += "、业务类型为" + itemTypeName;
  493. }
  494. this.$confirm('确定导出'+str+'的数据?', '提示', {
  495. confirmButtonText: '确定',
  496. cancelButtonText: '取消',
  497. type: 'warning'
  498. }).then(() => {
  499. sa.ajax('/TbFeeDetails/export/details?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime
  500. , sa.removeNull(this.p), function(resp) {
  501. window.open(resp.data);
  502. }.bind(this));
  503. }).catch(() => {
  504. });
  505. },
  506. // 刷新
  507. f5: function() {
  508. if ( this.selectTime != null && this.selectTime.length != 0) {
  509. this.selectTimeRange.beginTime = this.selectTime[0];
  510. this.selectTimeRange.endTime = this.selectTime[1];
  511. }
  512. sa.ajax('/TbFeeDetails/getList?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
  513. sa.removeNull(this.p), function(res) {
  514. this.dataList = res.data; // 数据
  515. this.dataCount = res.dataCount; // 数据总数
  516. sa.f5TableHeight(); // 刷新表格高度
  517. }.bind(this));
  518. this.getTotalPrice();
  519. },
  520. // 查看
  521. get: function(data) {
  522. sa.showIframe('数据详情', 'tb-fee-details-info.html?id=' + data.id, '1050px', '90%');
  523. },
  524. // 查看 - 根据选中的
  525. getBySelect: function(data) {
  526. var selection = this.$refs['data-table'].selection;
  527. if(selection.length == 0) {
  528. return sa.msg('请选择一条数据')
  529. }
  530. this.get(selection[0]);
  531. },
  532. getItemTypeList() {
  533. sa.ajax('/TbItemType/getList', {
  534. pageNo: 1,
  535. pageSize: 100
  536. }, function(resp) {
  537. this.itemTypeList = resp.data;
  538. }.bind(this));
  539. },
  540. },
  541. created: function() {
  542. this.f5();
  543. this.getItemTypeList();
  544. sa.onInputEnter();
  545. }
  546. })
  547. </script>
  548. </body>
  549. </html>