|
|
@@ -1,593 +1,573 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <basic-container v-if="isShow">
|
|
|
- <avue-crud :option="option"
|
|
|
- :table-loading="loading"
|
|
|
- :data="data"
|
|
|
- :page.sync="page"
|
|
|
- :search.sync="query"
|
|
|
- :permission="permissionList"
|
|
|
- :before-open="beforeOpen"
|
|
|
- v-model="form"
|
|
|
- id="out-table"
|
|
|
- :header-cell-class-name="headerClassName"
|
|
|
- ref="crud"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-del="rowDel"
|
|
|
- @search-change="searchChange"
|
|
|
- @search-reset="searchReset"
|
|
|
- @selection-change="selectionChange"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 321)"
|
|
|
- @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 321)"
|
|
|
- @on-load="onLoad" >
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="addbtnfun()">新建财务凭证
|
|
|
- </el-button>
|
|
|
- <el-button type="danger"
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- plain
|
|
|
- @click="handleDelete">删 除
|
|
|
- </el-button>
|
|
|
- <el-button type="success"
|
|
|
- size="small"
|
|
|
- plain @click.stop="voucherAccountingfun" >凭证记账
|
|
|
- </el-button>
|
|
|
- <el-button type="danger"
|
|
|
- size="small"
|
|
|
- plain
|
|
|
- @click="revokeFinVouchersfun">撤销记账
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot="menu" slot-scope="{row}">
|
|
|
- <el-button type="text"
|
|
|
- size="small"
|
|
|
- @click="editFun(row)">编辑
|
|
|
- </el-button>
|
|
|
- <el-button type="text"
|
|
|
- size="small"
|
|
|
- @click="rowDel(row)">删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot="billNo" slot-scope="{row}">
|
|
|
- <span class="textHide" style="color: #1e9fff;cursor: pointer;" @click="editFun(row)">{{row.billNo}}</span>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
- </basic-container>
|
|
|
- <finvouchersitems ref="finvouchersitemsRef" v-if="!isShow" @goBack="goBack"></finvouchersitems>
|
|
|
+ <basic-container v-if="isShow">
|
|
|
+ <custom-loading ref="customLloading">
|
|
|
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
|
|
|
+ :permission="permissionList" :before-open="beforeOpen" v-model="form" id="out-table"
|
|
|
+ :header-cell-class-name="headerClassName" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
|
|
|
+ @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
|
|
|
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
|
|
|
+ @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 321)"
|
|
|
+ @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 321)" @on-load="onLoad">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新建财务凭证
|
|
|
+ </el-button>
|
|
|
+ <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success" size="small" plain @click.stop="voucherAccountingfun">凭证记账
|
|
|
+ </el-button>
|
|
|
+ <el-button type="danger" size="small" plain @click="revokeFinVouchersfun">撤销记账
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{row}">
|
|
|
+ <el-button type="text" size="small" @click="editFun(row)">编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text" size="small" @click="rowDel(row)">删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="billNo" slot-scope="{row}">
|
|
|
+ <span class="textHide" style="color: #1e9fff;cursor: pointer;" @click="editFun(row)">{{ row.billNo }}</span>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </custom-loading>
|
|
|
+
|
|
|
+ </basic-container>
|
|
|
+ <finvouchersitems ref="finvouchersitemsRef" v-if="!isShow" @goBack="goBack"></finvouchersitems>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- finvouchersList,
|
|
|
- finvouchersDetail,
|
|
|
- finvouchersSubmit,
|
|
|
- finvouchersRemove,
|
|
|
- confirmFinVouchers, revokeFinVouchers
|
|
|
+ finvouchersList,
|
|
|
+ finvouchersDetail,
|
|
|
+ finvouchersSubmit,
|
|
|
+ finvouchersRemove,
|
|
|
+ confirmFinVouchers, revokeFinVouchers
|
|
|
} from "@/api/iosBasicData/finvouchers";
|
|
|
- import {mapGetters} from "vuex";
|
|
|
- import finvouchersitems from "@/views/iosBasicData/finvouchers/finvouchersitems.vue";
|
|
|
- import finstlbillsDetails from "@/views/iosBasicData/finstlbills/finstlbillsDetails.vue";
|
|
|
- import {getWorkDicts} from "@/api/system/dictbiz";
|
|
|
-
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- isShow:true, // 详情弹窗
|
|
|
- form: {},
|
|
|
- query: {},
|
|
|
- loading: true,
|
|
|
- page: {
|
|
|
- pageSize: 10,
|
|
|
- currentPage: 1,
|
|
|
- total: 0
|
|
|
- },
|
|
|
- selectionList: [],
|
|
|
- option:{},
|
|
|
- optionBack: {
|
|
|
- height:'auto',
|
|
|
- calcHeight: 30,
|
|
|
- tip: false,
|
|
|
- searchShow: true,
|
|
|
- searchMenuSpan: 6,
|
|
|
- border: true,
|
|
|
- index: true,
|
|
|
- viewBtn: true,
|
|
|
- selection: true,
|
|
|
- dialogClickModal: false,
|
|
|
- menuWidth:'100',
|
|
|
- searchIcon: true,
|
|
|
- searchIndex: 3,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "账单编号",
|
|
|
- prop: "billNo",
|
|
|
- search: true,
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "凭证来源",
|
|
|
- prop: "voucherSource",
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- dicData:[],
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_source_los",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "凭证类型",
|
|
|
- prop: "voucherType",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "凭证号",
|
|
|
- prop: "voucherNo",
|
|
|
- search: true,
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "凭证日期",
|
|
|
- prop: "voucherDate",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "凭证开始日期",
|
|
|
- prop: "voucherDateStart",
|
|
|
- search:true,
|
|
|
- overHidden:true,
|
|
|
- searchLabelWidth:"100",
|
|
|
- hide:true,
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "凭证结束日期",
|
|
|
- prop: "voucherDateEnd",
|
|
|
- search:true,
|
|
|
- overHidden:true,
|
|
|
- searchLabelWidth:"100",
|
|
|
- hide:true,
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "财务年",
|
|
|
- prop: "accountYear",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "财务月",
|
|
|
- prop: "accountMonth",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "财务日",
|
|
|
- prop: "accountDay",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "分录摘要",
|
|
|
- prop: "descr",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "借方金额(CNY)",
|
|
|
- prop: "amountDr",
|
|
|
- width:'140',
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "贷方金额(CNY)",
|
|
|
- prop: "amountCr",
|
|
|
- width:'140',
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "借方金额(USD)",
|
|
|
- prop: "amountDrUsd",
|
|
|
- width:'140',
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "贷方金额(USD)",
|
|
|
- prop: "amountCrUsd",
|
|
|
- width:'140',
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合计本位币借方金额(CNY)",
|
|
|
- prop: "amountDrLoc",
|
|
|
- width:'170',
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合计本位币贷方金额(CNY)",
|
|
|
- prop: "amountCrLoc",
|
|
|
- width:'170',
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "外币凭证",
|
|
|
- prop: "isForeign",
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- dicData:[],
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "数量凭证",
|
|
|
- prop: "isQuantity",
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- dicData:[],
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "复核人",
|
|
|
- prop: "checkUserName",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "复核时间",
|
|
|
- prop: "checkTime",
|
|
|
- overHidden:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "记账人",
|
|
|
- prop: "postUserName",
|
|
|
- overHidden:true,
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import finvouchersitems from "@/views/iosBasicData/finvouchers/finvouchersitems.vue";
|
|
|
+import finstlbillsDetails from "@/views/iosBasicData/finstlbills/finstlbillsDetails.vue";
|
|
|
+import { getWorkDicts } from "@/api/system/dictbiz";
|
|
|
+import CustomLoading from '@/views/iosBasicData/finvouchers/components/loading.vue'
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isShow: true, // 详情弹窗
|
|
|
+ form: {},
|
|
|
+ query: {},
|
|
|
+ loading: true,
|
|
|
+ page: {
|
|
|
+ pageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ selectionList: [],
|
|
|
+ option: {},
|
|
|
+ optionBack: {
|
|
|
+ height: 'auto',
|
|
|
+ calcHeight: 30,
|
|
|
+ tip: false,
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 6,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: true,
|
|
|
+ dialogClickModal: false,
|
|
|
+ menuWidth: '100',
|
|
|
+ searchIcon: true,
|
|
|
+ searchIndex: 3,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "账单编号",
|
|
|
+ prop: "billNo",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证来源",
|
|
|
+ prop: "voucherSource",
|
|
|
+ search: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [],
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_source_los",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
},
|
|
|
- {
|
|
|
- label: "记账时间",
|
|
|
- prop: "postTime",
|
|
|
- overHidden:true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证类型",
|
|
|
+ prop: "voucherType",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证号",
|
|
|
+ prop: "voucherNo",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证日期",
|
|
|
+ prop: "voucherDate",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证开始日期",
|
|
|
+ prop: "voucherDateStart",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ searchLabelWidth: "100",
|
|
|
+ hide: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证结束日期",
|
|
|
+ prop: "voucherDateEnd",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ searchLabelWidth: "100",
|
|
|
+ hide: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "财务年",
|
|
|
+ prop: "accountYear",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "财务月",
|
|
|
+ prop: "accountMonth",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "财务日",
|
|
|
+ prop: "accountDay",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "分录摘要",
|
|
|
+ prop: "descr",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "借方金额(CNY)",
|
|
|
+ prop: "amountDr",
|
|
|
+ width: '140',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "贷方金额(CNY)",
|
|
|
+ prop: "amountCr",
|
|
|
+ width: '140',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "借方金额(USD)",
|
|
|
+ prop: "amountDrUsd",
|
|
|
+ width: '140',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "贷方金额(USD)",
|
|
|
+ prop: "amountCrUsd",
|
|
|
+ width: '140',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合计本位币借方金额(CNY)",
|
|
|
+ prop: "amountDrLoc",
|
|
|
+ width: '170',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合计本位币贷方金额(CNY)",
|
|
|
+ prop: "amountCrLoc",
|
|
|
+ width: '170',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "外币凭证",
|
|
|
+ prop: "isForeign",
|
|
|
+ search: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [],
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
},
|
|
|
- {
|
|
|
- label: "凭证状态",
|
|
|
- prop: "voucherStatus",
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- dicData:[],
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_status_los",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
- overHidden:true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数量凭证",
|
|
|
+ prop: "isQuantity",
|
|
|
+ search: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [],
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ifInvoice",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
},
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- overHidden:true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "复核人",
|
|
|
+ prop: "checkUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "复核时间",
|
|
|
+ prop: "checkTime",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "记账人",
|
|
|
+ prop: "postUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "记账时间",
|
|
|
+ prop: "postTime",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "凭证状态",
|
|
|
+ prop: "voucherStatus",
|
|
|
+ search: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [],
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_status_los",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
},
|
|
|
- ]
|
|
|
- },
|
|
|
- data: []
|
|
|
- };
|
|
|
- },
|
|
|
- components:{finstlbillsDetails, finvouchersitems},
|
|
|
- computed: {
|
|
|
- ...mapGetters(["permission"]),
|
|
|
- permissionList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.finvouchers_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.finvouchers_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.finvouchers_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.finvouchers_edit, false)
|
|
|
- };
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ ]
|
|
|
},
|
|
|
- ids() {
|
|
|
- let ids = [];
|
|
|
- this.selectionList.forEach(ele => {
|
|
|
- ids.push(ele.id);
|
|
|
- });
|
|
|
- return ids.join(",");
|
|
|
- }
|
|
|
+ data: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: { finstlbillsDetails, finvouchersitems, CustomLoading },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["permission"]),
|
|
|
+ permissionList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.finvouchers_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.finvouchers_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.finvouchers_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.finvouchers_edit, false)
|
|
|
+ };
|
|
|
},
|
|
|
- async created() {
|
|
|
- this.option = await this.getColumnData(this.getColumnName(321), this.optionBack);
|
|
|
- this.voucherStatusWorkDictsfun()
|
|
|
+ ids() {
|
|
|
+ let ids = [];
|
|
|
+ this.selectionList.forEach(ele => {
|
|
|
+ ids.push(ele.id);
|
|
|
+ });
|
|
|
+ return ids.join(",");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(321), this.optionBack);
|
|
|
+ this.voucherStatusWorkDictsfun()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ revokeFinVouchers,
|
|
|
+ // 获取字典数据
|
|
|
+ voucherStatusWorkDictsfun() {
|
|
|
+ getWorkDicts("voucher_status_los").then(res => {
|
|
|
+ this.findObject(this.option.column, "voucherStatus").dicData = res.data.data;
|
|
|
+ })
|
|
|
+ // 是否字典
|
|
|
+ getWorkDicts("ifInvoice").then(res => {
|
|
|
+ this.findObject(this.option.column, "isForeign").dicData = res.data.data;
|
|
|
+ this.findObject(this.option.column, "isQuantity").dicData = res.data.data;
|
|
|
+ })
|
|
|
+ getWorkDicts("voucher_source_los").then(res => {
|
|
|
+ this.findObject(this.option.column, "voucherSource").dicData = res.data.data;
|
|
|
+ })
|
|
|
},
|
|
|
- methods: {
|
|
|
- revokeFinVouchers,
|
|
|
- // 获取字典数据
|
|
|
- voucherStatusWorkDictsfun(){
|
|
|
- getWorkDicts("voucher_status_los").then(res => {
|
|
|
- this.findObject(this.option.column, "voucherStatus").dicData = res.data.data;
|
|
|
- })
|
|
|
- // 是否字典
|
|
|
- getWorkDicts("ifInvoice").then(res => {
|
|
|
- this.findObject(this.option.column, "isForeign").dicData = res.data.data;
|
|
|
- this.findObject(this.option.column, "isQuantity").dicData = res.data.data;
|
|
|
- })
|
|
|
- getWorkDicts("voucher_source_los").then(res => {
|
|
|
- this.findObject(this.option.column, "voucherSource").dicData = res.data.data;
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
- // 凭证记账
|
|
|
- voucherAccountingfun(){
|
|
|
- if (this.selectionList.length === 0) {
|
|
|
- this.$message.warning("请选择至少一条数据");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.selectionList.length === 1) {
|
|
|
- if (this.selectionList[0].voucherStatus == 1) {
|
|
|
- return this.$message.warning("请选择还未记账的数据");
|
|
|
- }
|
|
|
- }
|
|
|
- this.$confirm("确定将选择数据进行记账?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(()=>{
|
|
|
- let arrids = this.selectionList.map(item=>{
|
|
|
- if (item.voucherStatus == 0) {
|
|
|
- return item.id
|
|
|
- }
|
|
|
- })
|
|
|
- this.loading = true;
|
|
|
- confirmFinVouchers({ids:arrids.join(',')}).then(res=>{
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- this.loading = false;
|
|
|
- this.onLoad(this.page, this.query);
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- // 撤销记账
|
|
|
- revokeFinVouchersfun(){
|
|
|
- if (this.selectionList.length === 0) {
|
|
|
- this.$message.warning("请选择至少一条数据");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.selectionList.length === 1) {
|
|
|
- if (this.selectionList[0].voucherStatus == 0) {
|
|
|
- return this.$message.warning("请选择已记账的数据");
|
|
|
- }
|
|
|
+ // 凭证记账
|
|
|
+ voucherAccountingfun() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.selectionList.length === 1) {
|
|
|
+ if (this.selectionList[0].voucherStatus == 1) {
|
|
|
+ return this.$message.warning("请选择还未记账的数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据进行记账?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let arrids = this.selectionList.map(item => {
|
|
|
+ if (item.voucherStatus == 0) {
|
|
|
+ return item.id
|
|
|
}
|
|
|
- this.$confirm("确定将选择数据撤销记账?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(()=>{
|
|
|
- let arrids = this.selectionList.map(item=>{
|
|
|
- if (item.voucherStatus == 1) {
|
|
|
- return item.id
|
|
|
- }
|
|
|
- })
|
|
|
- this.loading = true;
|
|
|
- revokeFinVouchers({ids:arrids.join(',')}).then(res=>{
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- this.loading = false;
|
|
|
- this.onLoad(this.page, this.query);
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- // 新建凭证
|
|
|
- addbtnfun(){
|
|
|
- this.isShow = false
|
|
|
- },
|
|
|
- // 编辑
|
|
|
- editFun(row) {
|
|
|
- this.isShow = false
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.$refs.finvouchersitemsRef.finvouchersDetailfun(row.id)
|
|
|
- })
|
|
|
- },
|
|
|
- // 详情的返回列表
|
|
|
- goBack() {
|
|
|
- // 初始化数据
|
|
|
- if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
- this.$router.$avueRouter.closeTag();
|
|
|
- this.$router.push({
|
|
|
- path: "/iosBasicData/finvouchers/index"
|
|
|
- });
|
|
|
+ })
|
|
|
+ // this.loading = true;
|
|
|
+ this.$refs.customLloading.startLoading()
|
|
|
+ confirmFinVouchers({ ids: arrids.join(',') }).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ // this.loading = false;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.$refs.customLloading.endLoading()
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 撤销记账
|
|
|
+ revokeFinVouchersfun() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.selectionList.length === 1) {
|
|
|
+ if (this.selectionList[0].voucherStatus == 0) {
|
|
|
+ return this.$message.warning("请选择已记账的数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据撤销记账?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let arrids = this.selectionList.map(item => {
|
|
|
+ if (item.voucherStatus == 1) {
|
|
|
+ return item.id
|
|
|
}
|
|
|
- this.isShow = true;
|
|
|
+ })
|
|
|
+ this.$refs.customLloading.startLoading()
|
|
|
+ revokeFinVouchers({ ids: arrids.join(',') }).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
this.onLoad(this.page, this.query);
|
|
|
- },
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.$refs.customLloading.endLoading()
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 新建凭证
|
|
|
+ addbtnfun() {
|
|
|
+ this.isShow = false
|
|
|
+ },
|
|
|
+ // 编辑
|
|
|
+ editFun(row) {
|
|
|
+ this.isShow = false
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.finvouchersitemsRef.finvouchersDetailfun(row.id)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 详情的返回列表
|
|
|
+ goBack() {
|
|
|
+ // 初始化数据
|
|
|
+ if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
+ this.$router.$avueRouter.closeTag();
|
|
|
+ this.$router.push({
|
|
|
+ path: "/iosBasicData/finvouchers/index"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.isShow = true;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ },
|
|
|
|
|
|
- rowSave(row, done, loading) {
|
|
|
- finvouchersSubmit(row).then(() => {
|
|
|
+ rowSave(row, done, loading) {
|
|
|
+ finvouchersSubmit(row).then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ }, error => {
|
|
|
+ loading();
|
|
|
+ window.console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
+ finvouchersSubmit(row).then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ }, error => {
|
|
|
+ loading();
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rowDel(row) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return finvouchersRemove(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
- done();
|
|
|
- }, error => {
|
|
|
- loading();
|
|
|
- window.console.log(error);
|
|
|
});
|
|
|
- },
|
|
|
- rowUpdate(row, index, done, loading) {
|
|
|
- finvouchersSubmit(row).then(() => {
|
|
|
+ },
|
|
|
+ handleDelete() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return finvouchersRemove(this.ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
- done();
|
|
|
- }, error => {
|
|
|
- loading();
|
|
|
- console.log(error);
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
- },
|
|
|
- rowDel(row) {
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- return finvouchersRemove(row.id);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- handleDelete() {
|
|
|
- if (this.selectionList.length === 0) {
|
|
|
- this.$message.warning("请选择至少一条数据");
|
|
|
- return;
|
|
|
- }
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ },
|
|
|
+ beforeOpen(done, type) {
|
|
|
+ if (["edit", "view"].includes(type)) {
|
|
|
+ finvouchersDetail(this.form.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ searchReset() {
|
|
|
+ this.query = {};
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ searchChange(params, done) {
|
|
|
+ this.query = params;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ selectionChange(list) {
|
|
|
+ this.selectionList = list;
|
|
|
+ },
|
|
|
+ selectionClear() {
|
|
|
+ this.selectionList = [];
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
+ },
|
|
|
+ currentChange(currentPage) {
|
|
|
+ this.page.currentPage = currentPage;
|
|
|
+ },
|
|
|
+ sizeChange(pageSize) {
|
|
|
+ this.page.pageSize = pageSize;
|
|
|
+ },
|
|
|
+ refreshChange() {
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ },
|
|
|
+ onLoad(page, params = {}) {
|
|
|
+ this.loading = true;
|
|
|
+ finvouchersList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
+ const data = res.data.data;
|
|
|
+ this.page.total = data.total;
|
|
|
+ this.data = data.records.map(item => {
|
|
|
+ item.isForeign = item.isForeign + ''
|
|
|
+ item.isQuantity = item.isQuantity + ''
|
|
|
+ item.voucherStatus = item.voucherStatus + ''
|
|
|
+ return item
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- return finvouchersRemove(this.ids);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- this.$refs.crud.toggleSelection();
|
|
|
- });
|
|
|
- },
|
|
|
- beforeOpen(done, type) {
|
|
|
- if (["edit", "view"].includes(type)) {
|
|
|
- finvouchersDetail(this.form.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- });
|
|
|
+ this.loading = false;
|
|
|
+ this.selectionClear();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 更改表格颜色
|
|
|
+ headerClassName(tab) {
|
|
|
+ //颜色间隔
|
|
|
+ let back = ""
|
|
|
+ if (tab.columnIndex >= 0 && tab.column.level === 1) {
|
|
|
+ if (tab.columnIndex % 2 === 0) {
|
|
|
+ back = "back-one"
|
|
|
+ } else if (tab.columnIndex % 2 === 1) {
|
|
|
+ back = "back-two"
|
|
|
}
|
|
|
- done();
|
|
|
- },
|
|
|
- searchReset() {
|
|
|
- this.query = {};
|
|
|
- this.onLoad(this.page);
|
|
|
- },
|
|
|
- searchChange(params, done) {
|
|
|
- this.query = params;
|
|
|
- this.page.currentPage = 1;
|
|
|
- this.onLoad(this.page, this.query);
|
|
|
- done();
|
|
|
- },
|
|
|
- selectionChange(list) {
|
|
|
- this.selectionList = list;
|
|
|
- },
|
|
|
- selectionClear() {
|
|
|
- this.selectionList = [];
|
|
|
- this.$refs.crud.toggleSelection();
|
|
|
- },
|
|
|
- currentChange(currentPage){
|
|
|
- this.page.currentPage = currentPage;
|
|
|
- },
|
|
|
- sizeChange(pageSize){
|
|
|
- this.page.pageSize = pageSize;
|
|
|
- },
|
|
|
- refreshChange() {
|
|
|
- this.onLoad(this.page, this.query);
|
|
|
- },
|
|
|
- onLoad(page, params = {}) {
|
|
|
- this.loading = true;
|
|
|
- finvouchersList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
- const data = res.data.data;
|
|
|
- this.page.total = data.total;
|
|
|
- this.data = data.records.map(item=>{
|
|
|
- item.isForeign = item.isForeign + ''
|
|
|
- item.isQuantity = item.isQuantity + ''
|
|
|
- item.voucherStatus = item.voucherStatus + ''
|
|
|
- return item
|
|
|
- })
|
|
|
- this.loading = false;
|
|
|
- this.selectionClear();
|
|
|
- });
|
|
|
- },
|
|
|
- //自定义列保存
|
|
|
- async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
- /**
|
|
|
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
- */
|
|
|
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("保存成功");
|
|
|
- //关闭窗口
|
|
|
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
- }
|
|
|
- },
|
|
|
- //自定义列重置
|
|
|
- async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
- this[option] = this[optionBack];
|
|
|
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("重置成功");
|
|
|
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
- }
|
|
|
- },
|
|
|
- // 更改表格颜色
|
|
|
- headerClassName(tab){
|
|
|
- //颜色间隔
|
|
|
- let back = ""
|
|
|
- if (tab.columnIndex >= 0 && tab.column.level === 1) {
|
|
|
- if (tab.columnIndex % 2 === 0) {
|
|
|
- back = "back-one"
|
|
|
- } else if (tab.columnIndex % 2 === 1) {
|
|
|
- back = "back-two"
|
|
|
- }
|
|
|
- }
|
|
|
- return back;
|
|
|
- },
|
|
|
+ }
|
|
|
+ return back;
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
::v-deep#out-table .back-one {
|
|
|
- background: #ecf5ff !important;
|
|
|
- text-align: center;
|
|
|
+ background: #ecf5ff !important;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
+
|
|
|
::v-deep#out-table .back-two {
|
|
|
- background: #ecf5ff !important;
|
|
|
- text-align: center;
|
|
|
+ background: #ecf5ff !important;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.textHide {
|
|
|
- width: 100%;
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
}
|
|
|
+
|
|
|
/deep/ .el-col-md-8 {
|
|
|
- width: 24.33333%;
|
|
|
+ width: 24.33333%;
|
|
|
}
|
|
|
</style>
|