tb-fee-details-list.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  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" >
  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. <!-- <sa-td name="系统流水号" prop="tradeNo" width="140px" ></sa-td>-->
  144. <el-table-column label="系统流水号" width="140px">
  145. <template slot-scope="s">
  146. <span v-if="s.row.businessNo != null && s.row.businessNo != ''" >{{s.row.businessNo}}</span>
  147. <span v-else>{{s.row.businessCarNo}}</span>
  148. </template>
  149. </el-table-column>
  150. <!-- <sa-td name="订单编号" prop="transactionId" width="220px" ></sa-td>-->
  151. <el-table-column label="微信支付业务单号" width="220px">
  152. <template slot-scope="s">
  153. <el-tooltip :content="s.row.transactionId"placement="bottom"effect="light">
  154. <el-button class="keyButton">{{ s.row.transactionId }}</el-button>
  155. </el-tooltip>
  156. </template>
  157. </el-table-column>
  158. <sa-td name="作业编号" prop="businessItemNo" width="145px" ></sa-td>
  159. <sa-td name="企业名称" prop="pickCustomerName" ></sa-td>
  160. <sa-td name="发票号" prop="" ></sa-td>
  161. <sa-td name="生成时间" prop="createTime" width="150px" ></sa-td>
  162. <sa-td name="付款时间" prop="payTime" width="150px" ></sa-td>
  163. <sa-td name="备注" prop="remark" ></sa-td>
  164. <sa-td name="开单员" prop="kaiDanPerson" width="80px" ></sa-td>
  165. <sa-td name="现场调度员" prop="diaoDuPerson" width="80px" ></sa-td>
  166. <sa-td name="统计稽查员" prop="jiChaPerson" width="80px" ></sa-td>
  167. <!-- <el-table-column label="操作" fixed="right" width="240px">-->
  168. <!-- <template slot-scope="s">-->
  169. <!-- <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->
  170. <!-- <el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>-->
  171. <!-- <el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除</el-button>-->
  172. <!-- </template>-->
  173. <!-- </el-table-column>-->
  174. </el-table>
  175. <!-- ------------- 分页 ------------- -->
  176. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  177. </div>
  178. <el-dialog title="提示" :visible.sync="emodel.visible" width="38%">
  179. <!-- <el-form size="mini">-->
  180. <!-- <div class="c-item">-->
  181. <!-- <label class="c-label">日期:</label>-->
  182. <!-- <el-date-picker type="date" value-format="yyyy-MM-dd" v-model="emodel.form.payDay"></el-date-picker>-->
  183. <!-- </div>-->
  184. <!-- </el-form>-->
  185. <div class="c-item">
  186. <label class="c-label">收费项目:</label>
  187. <el-select v-model="emodel.form.feeType" placeholder="请选择" filterable>
  188. <el-option label="核酸检测" value="1"></el-option>
  189. <el-option label="消杀作业" value="2"></el-option>
  190. <el-option label="装卸作业" value="3"></el-option>
  191. <el-option label="停车费" value="4"></el-option>
  192. <el-option label="过磅费" value="5"></el-option>
  193. <el-option label="入场管理费" value="6"> </el-option>
  194. <el-option label="充电打冷作业" value="7"> </el-option>
  195. </el-select>
  196. </div>
  197. <div class="c-item">
  198. <label class="c-label">业务类型:</label>
  199. <el-select v-model="emodel.form.itemTypeName" placeholder="请选择" filterable>
  200. <el-option v-for="item in itemTypeList" :key="item.id"
  201. :label="item.name" :value="item.name">
  202. </el-option>
  203. </el-select>
  204. </div>
  205. <div class="c-item">
  206. <label class="c-label"><span style="color: red;">*</span>日期范围:</label>
  207. <el-date-picker size="mini" v-model="exportTime" type="daterange" unlink-panels="false"
  208. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  209. format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
  210. </el-date-picker>
  211. </div>
  212. <span slot="footer" class="dialog-footer">
  213. <el-button @click="emodel.visible = false">取 消</el-button>
  214. <el-button type="primary" @click="sureExport">确 定</el-button>
  215. </span>
  216. </el-dialog>
  217. </div>
  218. <script>
  219. var app = new Vue({
  220. components: {
  221. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  222. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  223. },
  224. el: '.vue-box',
  225. data: {
  226. p: { // 查询参数
  227. id: '', // 主键
  228. businessNo: '', // 业务单号
  229. carNo: '', // 车牌号
  230. feeType: '', //收费类型
  231. itemTypeId: '', // 业务类型id
  232. itemTypeName: '', // 业务类型
  233. itemId: '', //
  234. itemName: '', // 业务项
  235. itemPrice: '', // 项目金额(元)
  236. payDay: '', // 支付日期
  237. payType: '', // 支付方式(3=微信支付)
  238. createTime: '', // 创建时间
  239. pageNo: 1, // 当前页
  240. pageSize: 10, // 页大小
  241. sortType: 11, // 排序方式
  242. type: ''
  243. },
  244. dataCount: 0,
  245. dataList: [], // 数据集合
  246. itemTypeList: [],
  247. selectTime:[],
  248. selectTimeRange: {
  249. beginTime: '', //查询开始时间
  250. endTime: '', //查询结束时间
  251. },
  252. exportTime:[],
  253. emodel: {
  254. visible: false,
  255. form: {
  256. // payDay: ''
  257. feeType: '',
  258. itemTypeName: '',
  259. beginTime: '', //查询开始时间
  260. endTime: '', //查询结束时间
  261. }
  262. },
  263. totalPrice: 0,
  264. },
  265. methods: {
  266. getTotalPrice(){
  267. if ( this.selectTime != null && this.selectTime.length != 0) {
  268. this.selectTimeRange.beginTime = this.selectTime[0];
  269. this.selectTimeRange.endTime = this.selectTime[1];
  270. }
  271. sa.ajax('/TbFeeDetails/getTotalMoney?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
  272. sa.removeNull(this.p), function(res) {
  273. this.totalPrice = res.data;
  274. }.bind(this));
  275. },
  276. kaiDanConfirm(){
  277. let selection = this.$refs['data-table'].selection;
  278. let ids = sa.getArrayField(selection, 'id');
  279. if(selection.length == 0) {
  280. return sa.msg('请至少选择一条数据')
  281. }
  282. this.$confirm('确定进行开单确认操作?', '提示', {
  283. confirmButtonText: '确定',
  284. cancelButtonText: '取消',
  285. }).then(() => {
  286. sa.ajax('/TbFeeDetails/kaiDanConfirm', {ids: ids.join(',')}, function(res) {
  287. this.f5();
  288. }.bind(this))
  289. }).catch(() => {
  290. });
  291. },
  292. diaoDuConfirm(){
  293. let selection = this.$refs['data-table'].selection;
  294. let ids = sa.getArrayField(selection, 'id');
  295. if(selection.length == 0) {
  296. return sa.msg('请至少选择一条数据')
  297. }
  298. this.$confirm('确定进行调度确认操作?', '提示', {
  299. confirmButtonText: '确定',
  300. cancelButtonText: '取消',
  301. }).then(() => {
  302. sa.ajax('/TbFeeDetails/diaoDuConfirm', {ids: ids.join(',')}, function(res) {
  303. this.f5();
  304. }.bind(this))
  305. }).catch(() => {
  306. });
  307. },
  308. jiChaConfirm(){
  309. let selection = this.$refs['data-table'].selection;
  310. let ids = sa.getArrayField(selection, 'id');
  311. if(selection.length == 0) {
  312. return sa.msg('请至少选择一条数据')
  313. }
  314. this.$confirm('确定进行稽查确认操作?', '提示', {
  315. confirmButtonText: '确定',
  316. cancelButtonText: '取消',
  317. }).then(() => {
  318. sa.ajax('/TbFeeDetails/jiChaConfirm', {ids: ids.join(',')}, function(res) {
  319. this.f5();
  320. }.bind(this))
  321. }).catch(() => {
  322. });
  323. },
  324. jiChaCancel(){
  325. let selection = this.$refs['data-table'].selection;
  326. let ids = sa.getArrayField(selection, 'id');
  327. if(selection.length == 0) {
  328. return sa.msg('请至少选择一条数据')
  329. }
  330. this.$confirm('确定进行开单确认操作?', '提示', {
  331. confirmButtonText: '确定',
  332. cancelButtonText: '取消',
  333. type: 'warning'
  334. }).then(() => {
  335. sa.ajax('/TbFeeDetails/jiChaCancel', {ids: ids.join(',')}, function(res) {
  336. this.f5();
  337. }.bind(this))
  338. }).catch(() => {
  339. });
  340. },
  341. print: function() {
  342. if ( this.selectTime != null && this.selectTime.length != 0) {
  343. this.selectTimeRange.beginTime = this.selectTime[0];
  344. this.selectTimeRange.endTime = this.selectTime[1];
  345. }
  346. var beginTime = this.selectTimeRange.beginTime;
  347. var endTime = this.selectTimeRange.endTime;
  348. var feeType = this.p.feeType;
  349. var itemTypeName = this.p.itemTypeName;
  350. var str = '';
  351. if(beginTime === '' && endTime === ''){
  352. str += '所有时间';
  353. }else {
  354. str += beginTime + "至" + endTime
  355. }
  356. if(feeType === ''){
  357. str += "、所有收费项目";
  358. }else{
  359. var feeTypeName = '';
  360. if(feeType == 1){
  361. feeTypeName = "核酸检测";
  362. }else if(feeType == 2){
  363. feeTypeName = "消杀作业";
  364. }else if(feeType == 3){
  365. feeTypeName = "装卸作业";
  366. }else if(feeType == 4){
  367. feeTypeName = "停车费";
  368. }else if(feeType == 5){
  369. feeTypeName = "过磅费";
  370. }else if(feeType == 6){
  371. feeTypeName = "入场管理费";
  372. }else if(feeType == 7){
  373. feeTypeName = "充电打冷作业";
  374. }
  375. str += "、收费项目为" + feeTypeName;
  376. }
  377. if(itemTypeName === ''){
  378. str += "、所有业务类型";
  379. }else{
  380. str += "、业务类型为" + itemTypeName;
  381. }
  382. this.$confirm('确定打印'+str+'的数据?', '提示', {
  383. confirmButtonText: '确定',
  384. cancelButtonText: '取消',
  385. type: 'warning'
  386. }).then(() => {
  387. sa.showIframe('打印申报信息表', 'detailPrint.html?beginTime='+beginTime+"&endTime="+endTime+"&feeType="+feeType+"&itemTypeName="+itemTypeName , '1000px', '100%');
  388. }).catch(() => {
  389. });
  390. },
  391. exportFn() {
  392. Object.assign(this.emodel, {
  393. visible: true,
  394. })
  395. this.exportTime = [];
  396. this.emodel.form.feeType = '';
  397. this.emodel.form.itemTypeName = '';
  398. this.emodel.form.beginTime = '';
  399. this.emodel.form.endTime = '';
  400. },
  401. sureExport() {
  402. if ( this.exportTime != null && this.exportTime.length != 0) {
  403. this.emodel.form.beginTime = this.exportTime[0];
  404. this.emodel.form.endTime = this.exportTime[1];
  405. }
  406. if (this.emodel.form.beginTime == '' || this.emodel.form.endTime == '') {
  407. sa.msg("请选择日期范围");
  408. return;
  409. }
  410. const begin = new Date(this.emodel.form.beginTime);
  411. const end = new Date(this.emodel.form.endTime);
  412. if(end.getTime()-begin.getTime() > 3600 * 1000 * 24 * 31) {
  413. sa.msg("日期范围不可超过一个月");
  414. return;
  415. }
  416. sa.ajax('/TbFeeDetails/export/details', this.emodel.form, function(resp) {
  417. window.open(resp.data);
  418. this.emodel.visible = false;
  419. }.bind(this));
  420. },
  421. // 刷新
  422. f5: function() {
  423. if ( this.selectTime != null && this.selectTime.length != 0) {
  424. this.selectTimeRange.beginTime = this.selectTime[0];
  425. this.selectTimeRange.endTime = this.selectTime[1];
  426. }
  427. sa.ajax('/TbFeeDetails/getList?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
  428. sa.removeNull(this.p), function(res) {
  429. this.dataList = res.data; // 数据
  430. this.dataCount = res.dataCount; // 数据总数
  431. sa.f5TableHeight(); // 刷新表格高度
  432. }.bind(this));
  433. this.getTotalPrice();
  434. },
  435. // 查看
  436. get: function(data) {
  437. sa.showIframe('数据详情', 'tb-fee-details-info.html?id=' + data.id, '1050px', '90%');
  438. },
  439. // 查看 - 根据选中的
  440. getBySelect: function(data) {
  441. var selection = this.$refs['data-table'].selection;
  442. if(selection.length == 0) {
  443. return sa.msg('请选择一条数据')
  444. }
  445. this.get(selection[0]);
  446. },
  447. getItemTypeList() {
  448. sa.ajax('/TbItemType/getList', {
  449. pageNo: 1,
  450. pageSize: 100
  451. }, function(resp) {
  452. this.itemTypeList = resp.data;
  453. }.bind(this));
  454. },
  455. },
  456. created: function() {
  457. this.f5();
  458. this.getItemTypeList();
  459. sa.onInputEnter();
  460. }
  461. })
  462. </script>
  463. </body>
  464. </html>