tb-fee-details-list.html 21 KB

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