tb-fee-details-list.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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. <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="sureExport">确 定</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. },
  264. methods: {
  265. getTotalPrice(){
  266. if ( this.selectTime != null && this.selectTime.length != 0) {
  267. this.selectTimeRange.beginTime = this.selectTime[0];
  268. this.selectTimeRange.endTime = this.selectTime[1];
  269. }
  270. sa.ajax('/TbFeeDetails/getTotalMoney?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
  271. sa.removeNull(this.p), function(res) {
  272. this.totalPrice = res.data;
  273. }.bind(this));
  274. },
  275. kaiDanConfirm(){
  276. let selection = this.$refs['data-table'].selection;
  277. let ids = sa.getArrayField(selection, 'id');
  278. if(selection.length == 0) {
  279. return sa.msg('请至少选择一条数据')
  280. }
  281. this.$confirm('确定进行开单确认操作?', '提示', {
  282. confirmButtonText: '确定',
  283. cancelButtonText: '取消',
  284. }).then(() => {
  285. sa.ajax('/TbFeeDetails/kaiDanConfirm', {ids: ids.join(',')}, function(res) {
  286. this.f5();
  287. }.bind(this))
  288. }).catch(() => {
  289. });
  290. },
  291. diaoDuConfirm(){
  292. let selection = this.$refs['data-table'].selection;
  293. let ids = sa.getArrayField(selection, 'id');
  294. if(selection.length == 0) {
  295. return sa.msg('请至少选择一条数据')
  296. }
  297. this.$confirm('确定进行调度确认操作?', '提示', {
  298. confirmButtonText: '确定',
  299. cancelButtonText: '取消',
  300. }).then(() => {
  301. sa.ajax('/TbFeeDetails/diaoDuConfirm', {ids: ids.join(',')}, function(res) {
  302. this.f5();
  303. }.bind(this))
  304. }).catch(() => {
  305. });
  306. },
  307. jiChaConfirm(){
  308. let selection = this.$refs['data-table'].selection;
  309. let ids = sa.getArrayField(selection, 'id');
  310. if(selection.length == 0) {
  311. return sa.msg('请至少选择一条数据')
  312. }
  313. this.$confirm('确定进行稽查确认操作?', '提示', {
  314. confirmButtonText: '确定',
  315. cancelButtonText: '取消',
  316. }).then(() => {
  317. sa.ajax('/TbFeeDetails/jiChaConfirm', {ids: ids.join(',')}, function(res) {
  318. this.f5();
  319. }.bind(this))
  320. }).catch(() => {
  321. });
  322. },
  323. jiChaCancel(){
  324. let selection = this.$refs['data-table'].selection;
  325. let ids = sa.getArrayField(selection, 'id');
  326. if(selection.length == 0) {
  327. return sa.msg('请至少选择一条数据')
  328. }
  329. this.$confirm('确定进行开单确认操作?', '提示', {
  330. confirmButtonText: '确定',
  331. cancelButtonText: '取消',
  332. type: 'warning'
  333. }).then(() => {
  334. sa.ajax('/TbFeeDetails/jiChaCancel', {ids: ids.join(',')}, function(res) {
  335. this.f5();
  336. }.bind(this))
  337. }).catch(() => {
  338. });
  339. },
  340. print: function() {
  341. if ( this.selectTime != null && this.selectTime.length != 0) {
  342. this.selectTimeRange.beginTime = this.selectTime[0];
  343. this.selectTimeRange.endTime = this.selectTime[1];
  344. }
  345. var beginTime = this.selectTimeRange.beginTime;
  346. var endTime = this.selectTimeRange.endTime;
  347. var feeType = this.p.feeType;
  348. var itemTypeName = this.p.itemTypeName;
  349. var str = '';
  350. if(beginTime === '' && endTime === ''){
  351. str += '所有时间';
  352. }else {
  353. str += beginTime + "至" + endTime
  354. }
  355. if(feeType === ''){
  356. str += "、所有收费项目";
  357. }else{
  358. var feeTypeName = '';
  359. if(feeType == 1){
  360. feeTypeName = "核酸检测";
  361. }else if(feeType == 2){
  362. feeTypeName = "消杀作业";
  363. }else if(feeType == 3){
  364. feeTypeName = "装卸作业";
  365. }else if(feeType == 4){
  366. feeTypeName = "停车费";
  367. }else if(feeType == 5){
  368. feeTypeName = "过磅费";
  369. }else if(feeType == 6){
  370. feeTypeName = "入场管理费";
  371. }else if(feeType == 7){
  372. feeTypeName = "充电打冷作业";
  373. }
  374. str += "、收费项目为" + feeTypeName;
  375. }
  376. if(itemTypeName === ''){
  377. str += "、所有业务类型";
  378. }else{
  379. str += "、业务类型为" + itemTypeName;
  380. }
  381. this.$confirm('确定打印'+str+'的数据?', '提示', {
  382. confirmButtonText: '确定',
  383. cancelButtonText: '取消',
  384. type: 'warning'
  385. }).then(() => {
  386. sa.showIframe('打印申报信息表', 'detailPrint.html?beginTime='+beginTime+"&endTime="+endTime+"&feeType="+feeType+"&itemTypeName="+itemTypeName , '1000px', '100%');
  387. }).catch(() => {
  388. });
  389. },
  390. exportFn() {
  391. Object.assign(this.emodel, {
  392. visible: true,
  393. })
  394. this.exportTime = [];
  395. this.emodel.form.feeType = '';
  396. this.emodel.form.itemTypeName = '';
  397. this.emodel.form.beginTime = '';
  398. this.emodel.form.endTime = '';
  399. },
  400. sureExport() {
  401. if ( this.exportTime != null && this.exportTime.length != 0) {
  402. this.emodel.form.beginTime = this.exportTime[0];
  403. this.emodel.form.endTime = this.exportTime[1];
  404. }
  405. if (this.emodel.form.beginTime == '' || this.emodel.form.endTime == '') {
  406. sa.msg("请选择日期范围");
  407. return;
  408. }
  409. const begin = new Date(this.emodel.form.beginTime);
  410. const end = new Date(this.emodel.form.endTime);
  411. if(end.getTime()-begin.getTime() > 3600 * 1000 * 24 * 31) {
  412. sa.msg("日期范围不可超过一个月");
  413. return;
  414. }
  415. sa.ajax('/TbFeeDetails/export/details', this.emodel.form, function(resp) {
  416. window.open(resp.data);
  417. this.emodel.visible = false;
  418. }.bind(this));
  419. },
  420. // 刷新
  421. f5: function() {
  422. if ( this.selectTime != null && this.selectTime.length != 0) {
  423. this.selectTimeRange.beginTime = this.selectTime[0];
  424. this.selectTimeRange.endTime = this.selectTime[1];
  425. }
  426. sa.ajax('/TbFeeDetails/getList?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
  427. sa.removeNull(this.p), function(res) {
  428. this.dataList = res.data; // 数据
  429. this.dataCount = res.dataCount; // 数据总数
  430. sa.f5TableHeight(); // 刷新表格高度
  431. }.bind(this));
  432. this.getTotalPrice();
  433. },
  434. // 查看
  435. get: function(data) {
  436. sa.showIframe('数据详情', 'tb-fee-details-info.html?id=' + data.id, '1050px', '90%');
  437. },
  438. // 查看 - 根据选中的
  439. getBySelect: function(data) {
  440. var selection = this.$refs['data-table'].selection;
  441. if(selection.length == 0) {
  442. return sa.msg('请选择一条数据')
  443. }
  444. this.get(selection[0]);
  445. },
  446. getItemTypeList() {
  447. sa.ajax('/TbItemType/getList', {
  448. pageNo: 1,
  449. pageSize: 100
  450. }, function(resp) {
  451. this.itemTypeList = resp.data;
  452. }.bind(this));
  453. },
  454. },
  455. created: function() {
  456. this.f5();
  457. this.getItemTypeList();
  458. sa.onInputEnter();
  459. }
  460. })
  461. </script>
  462. </body>
  463. </html>