123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <template>
- <basic-container v-if="show">
- <avue-crud :option="option"
- :data="dataList"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :search.sync="search"
- :table-loading="loading"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
- <template slot="corpIdSearch">
- <select-component
- v-model="search.corpId"
- :configuration="configuration"
- ></select-component>
- </template>
- <template slot="menuLeft">
- <el-button type="primary"
- size="small"
- icon="el-icon-plus"
- @click="addReceipt">新 单
- </el-button>
- <el-button size="small"
- type="info"
- @click.stop="openReport()"
- >导出报表
- </el-button>
- </template>
- <template slot-scope="scope" slot="menu">
- <el-button
- type="text"
- size="small"
- @click.stop="editOpen(scope.row, 2)"
- >编辑
- </el-button>
- <el-button
- type="text"
- size="small"
- @click.stop="rowDel(scope.row, scope.index)"
- >删除
- </el-button>
- </template>
- </avue-crud>
- </basic-container>
- <detail-page
- ref="detail"
- @goBack="goBack"
- :detailData="detailData"
- v-else
- ></detail-page>
- </template>
- <script>
- import option from "./configuration/mainList.json";
- import {getList ,remove} from "@/api/financialManagement/financialManagement"
- import detailPage from "./paymentSettleDetailsPage";
- export default {
- data() {
- return {
- loading : false,
- form: {},
- search:{},
- show:true,
- detailData:{},
- option: option,
- parentId:0,
- dataList: [],
- page: {
- pageSize: 10,
- pagerCount: 5,
- total: 0,
- },
- query:{},
- configuration:{
- multipleChoices:false,
- multiple:false,
- disabled:false,
- searchShow:true,
- collapseTags:false,
- clearable:true,
- placeholder:'请点击右边按钮选择',
- dicData:[]
- },
- }
- },
- created() {
- if(this.$route.query.params){
- this.detailData={
- params:this.$route.query.params
- }
- this.show = false;
- this.$store.commit("PAY_IN_DETAIL");
- }
- },
- components:{
- detailPage
- },
- mounted() {
- // this.option.height = window.innerHeight - 200;
- },
- methods: {
- //新单打开
- addReceipt(row){
- this.detailData = {
- id: row.id,
- status: 1
- };
- this.show = false;
- this.$store.commit("PAY_IN_DETAIL");
- },
- //编辑打开
- editOpen(row, status){
- this.detailData = {
- id: row.id,
- status: status
- };
- this.show = false;
- this.$store.commit("PAY_IN_DETAIL");
- },
- rowDel(row, index, done) {
- if(row.id){
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- remove(row.id).then(res =>{
- if(res.data.success){
- this.$message.success("操作成功!");
- this.onLoad(this.page);
- }
- })
- });
- }
- },
- //点击搜索按钮触发
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done()
- },
- searchReset() {
- console.log('1')
- },
- selectionChange() {
- console.log('1')
- },
- currentChange() {
- console.log('1')
- },
- sizeChange() {
- console.log('1')
- },
- refreshChange() {
- console.log('1')
- },
- onLoad(page, params = {}) {
- params.billType = "付费"
- if (params.settlementDate != undefined) { //合同
- params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
- params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
- this.$delete(params,'settlementDate')
- }
- this.loading = true
- getList(page.currentPage, page.pageSize,params).then(res =>{
- this.dataList = res.data.data.records
- this.page.total = res.data.data.total
- this.loading = false
- })
- },
- goBack() {
- this.detailData=this.$options.data().detailData
- this.show = true;
- }
- }
- }
- </script>
- <style scoped>
- </style>
|