|
|
@@ -1,855 +1,984 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <basic-container v-show="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', 323)"
|
|
|
- @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 323)"
|
|
|
- @on-load="onLoad"
|
|
|
- @tree-load="treeLoad" >
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="addAccountsfun">新 增
|
|
|
- </el-button>
|
|
|
- <el-button type="danger"
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- plain
|
|
|
- @click="handleDelete">删 除
|
|
|
- </el-button>
|
|
|
- <div style="margin-top: 10px">
|
|
|
- <el-tabs type="card" v-model="query.property" @tab-click="handleClick">
|
|
|
- <el-tab-pane :label="item.dictValue" :name="item.dictKey"
|
|
|
- v-for="item in propertyData" :key="item.dictKey">
|
|
|
- <span slot="label">{{item.dictValue}}</span>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button size="small" icon="el-icon-edit" type="text" :disabled="row.count == 1" @click="editfun(row,index)">编辑</el-button>
|
|
|
- <!--<el-button v-if="row.isItem == 1" size="small" type="text" @click="editOpeningfun(row,index)">核算期初</el-button>-->
|
|
|
- <el-button size="small" type="text" :disabled="row.count == 1" @click="addChildfun(row,index)">添加子项</el-button>
|
|
|
- <el-button size="small" icon="el-icon-delete" type="text" :disabled="row.count == 1" @click="rowDel(row, index)">删 除</el-button>
|
|
|
- </template>
|
|
|
- <template slot="code" slot-scope="{ row }">
|
|
|
- <span style="color: #1e9fff" @click="editDetailsfun(row.id)">{{row.code}}</span>
|
|
|
- </template>
|
|
|
- <template slot="isItem" slot-scope="{ row }">
|
|
|
- <span class="pointerClick" v-if="row.isItem == 1" @click="editOpeningfun(row)" >是</span>
|
|
|
- <span v-else >否</span>
|
|
|
- </template>
|
|
|
- <template slot="quantityOpenDr" slot-scope="{ row }">
|
|
|
- <el-input-number style="width: 100%;" v-model="row.quantityOpenDr"
|
|
|
- v-if="row.edit" min="0" :controls="false"
|
|
|
- size="mini" autocomplete="off" clearable
|
|
|
- placeholder="请输入期初借方数量" >
|
|
|
- </el-input-number>
|
|
|
- <span v-else >{{row.quantityOpenDr}}</span>
|
|
|
- </template>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">
|
|
|
+ <div class="box">
|
|
|
+ <el-scrollbar>
|
|
|
+ <basic-container>
|
|
|
+ <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
|
|
|
+ </basic-container>
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <basic-container v-show="isShow">
|
|
|
+ <!-- :page.sync="page"-->
|
|
|
+ <avue-crud
|
|
|
+ :option="option"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="data"
|
|
|
+ :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', 323)"
|
|
|
+ @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 323)"
|
|
|
+ @on-load="onLoad"
|
|
|
+ @tree-load="treeLoad"
|
|
|
+ >
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-plus" @click="addAccountsfun">新 增 </el-button>
|
|
|
+ <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除 </el-button>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-check" plain @click="handleBalanceCheck">平衡检查 </el-button>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-paperclip" plain @click="handleAccountsPost">科目入账 </el-button>
|
|
|
+ <div style="margin-top: 10px">
|
|
|
+ <el-tabs type="card" v-model="query.property" @tab-click="handleClick">
|
|
|
+ <el-tab-pane :label="item.dictValue" :name="item.dictKey" v-for="item in propertyData" :key="item.dictKey">
|
|
|
+ <span slot="label">{{ item.dictValue }}</span>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" :disabled="row.count == 1" @click="editfun(row, index)">编辑</el-button>
|
|
|
+ <!--<el-button v-if="row.isItem == 1" size="small" type="text" @click="editOpeningfun(row,index)">核算期初</el-button>-->
|
|
|
+ <el-button size="small" type="text" :disabled="row.count == 1" @click="addChildfun(row, index)">添加子项</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" :disabled="row.count == 1" @click="rowDel(row, index)">删 除</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="code" slot-scope="{ row }">
|
|
|
+ <span style="color: #1e9fff" @click="editDetailsfun(row.id)">{{ row.code }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="isItem" slot-scope="{ row }">
|
|
|
+ <span class="pointerClick" v-if="row.isItem == 1" @click="editOpeningfun(row)">是</span>
|
|
|
+ <span v-else>否</span>
|
|
|
+ </template>
|
|
|
+ <template slot="quantityOpenDr" slot-scope="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="row.quantityOpenDr"
|
|
|
+ v-if="row.edit"
|
|
|
+ min="0"
|
|
|
+ :controls="false"
|
|
|
+ size="mini"
|
|
|
+ autocomplete="off"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入期初借方数量"
|
|
|
+ >
|
|
|
+ </el-input-number>
|
|
|
+ <span v-else>{{ row.quantityOpenDr }}</span>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
- </basic-container>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <!--辅助核算-->
|
|
|
- <el-dialog
|
|
|
- title="账户管理"
|
|
|
- append-to-body
|
|
|
- :visible.sync="accountsVisible"
|
|
|
- class="el-dialogDeep"
|
|
|
- width="60%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :before-close="handleClose">
|
|
|
- <accounts-dialog ref="accountsDialog" :form="form"></accounts-dialog>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="accountsVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="bigSavefun">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
+ <!--辅助核算-->
|
|
|
+ <el-dialog
|
|
|
+ title="账户管理"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="accountsVisible"
|
|
|
+ class="el-dialogDeep"
|
|
|
+ width="60%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <accounts-dialog ref="accountsDialog" :form="form"></accounts-dialog>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="accountsVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="bigSavefun">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <!--从表数据-->
|
|
|
- <el-dialog
|
|
|
- title="辅助核算期初"
|
|
|
- append-to-body
|
|
|
- :visible.sync="sopenblcVisible"
|
|
|
- class="el-dialogDeep"
|
|
|
- width="70%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :before-close="handleClose">
|
|
|
- <accitemsopenblc :form="form" ></accitemsopenblc>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="sopenblcVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="openingCalculatefun">保 存</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
+ <!--从表数据-->
|
|
|
+ <el-dialog
|
|
|
+ title="辅助核算期初"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="sopenblcVisible"
|
|
|
+ class="el-dialogDeep"
|
|
|
+ width="70%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <accitemsopenblc :form="form"></accitemsopenblc>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="sopenblcVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="openingCalculatefun">保 存</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <!--<accountsDetails v-if="!isShow" @goBack="goBack"></accountsDetails>-->
|
|
|
+ <!--<accountsDetails v-if="!isShow" @goBack="goBack"></accountsDetails>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- accountsList,
|
|
|
- accountsDetail,
|
|
|
- accountsSubmit,
|
|
|
- accountsRemove,
|
|
|
- getAccountsCode
|
|
|
+ accountsList,
|
|
|
+ accountsDetail,
|
|
|
+ accountsSubmit,
|
|
|
+ accountsRemove,
|
|
|
+ getAccountsCode,
|
|
|
+ getAccountsLazyTree,
|
|
|
+ balanceCheck,
|
|
|
} from "@/api/iosBasicData/accounts";
|
|
|
- import {mapGetters} from "vuex";
|
|
|
- import accountsDialog from "@/views/iosBasicData/accounts/assembly/accountsDialog.vue";
|
|
|
- import accountsDetails from "@/views/iosBasicData/accounts/accountsDetails.vue";
|
|
|
- import {getWorkDicts} from "@/api/system/dictbiz";
|
|
|
- import accitemsopenblc from "@/views/iosBasicData/accounts/assembly/accitemsopenblc.vue";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import accountsDialog from "@/views/iosBasicData/accounts/assembly/accountsDialog.vue";
|
|
|
+import accountsDetails from "@/views/iosBasicData/accounts/accountsDetails.vue";
|
|
|
+import { getWorkDicts } from "@/api/system/dictbiz";
|
|
|
+import accitemsopenblc from "@/views/iosBasicData/accounts/assembly/accitemsopenblc.vue";
|
|
|
+import { getDeptLazyTree } from "@/api/system/dept";
|
|
|
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- accountsVisible:false, // 添加编辑弹窗
|
|
|
- sopenblcVisible:false, // 从表数据
|
|
|
- isShow:true,
|
|
|
- form: {},
|
|
|
- query: {
|
|
|
- property:'0',
|
|
|
- },
|
|
|
- loading: true,
|
|
|
- page: {
|
|
|
- pageSize: 10,
|
|
|
- currentPage: 1,
|
|
|
- total: 0
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ accountsVisible: false, // 添加编辑弹窗
|
|
|
+ sopenblcVisible: false, // 从表数据
|
|
|
+ isShow: true,
|
|
|
+ form: {},
|
|
|
+ query: {
|
|
|
+ property: "0",
|
|
|
+ },
|
|
|
+ loading: true,
|
|
|
+ page: {
|
|
|
+ pageSize: 10000, // 10
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+
|
|
|
+ treeAccProperty: undefined,
|
|
|
+ treeAccCode: undefined,
|
|
|
+ treeData: [],
|
|
|
+ treeOption: {
|
|
|
+ nodeKey: "id",
|
|
|
+ lazy: true,
|
|
|
+ iconClassField: 'icon',
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
+ const parentId = node.level === 0 ? 0 : node.data.id;
|
|
|
+ getAccountsLazyTree(parentId).then((res) => {
|
|
|
+ resolve(
|
|
|
+ res.data.data.map((item) => {
|
|
|
+ let n = {
|
|
|
+ ...item,
|
|
|
+ leaf: !item.hasChildren,
|
|
|
+ icon: 'el-icon-document',
|
|
|
+ };
|
|
|
+ return n;
|
|
|
+ })
|
|
|
+ );
|
|
|
+ });
|
|
|
},
|
|
|
- selectionList: [],
|
|
|
- option:{},
|
|
|
- optionBack: {
|
|
|
- height:'auto',
|
|
|
- calcHeight: 30,
|
|
|
- tip: false,
|
|
|
- searchShow: true,
|
|
|
- searchMenuSpan: 6,
|
|
|
- border: true,
|
|
|
- index: true,
|
|
|
- viewBtn: true,
|
|
|
- selection: true,
|
|
|
- dialogClickModal: false,
|
|
|
- menuWidth:"200",
|
|
|
- lazy: true,
|
|
|
- tree: true,
|
|
|
- rowKey:'code',
|
|
|
- rowParentKey:'children',
|
|
|
- simplePage: true,
|
|
|
- searchIcon:true,
|
|
|
- searchIndex:3,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "科目代码",
|
|
|
- prop: "code",
|
|
|
- search: true,
|
|
|
- width: 100,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "中文名称",
|
|
|
- prop: "cnName",
|
|
|
- search: true,
|
|
|
- width: 200,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "方向",
|
|
|
- prop: "dc",
|
|
|
- overHidden: true,
|
|
|
- type:'select',
|
|
|
- search: true,
|
|
|
- width: 50,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'借方',
|
|
|
- value:'D',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'贷方',
|
|
|
- value:'C',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "外币",
|
|
|
- prop: "isForeign",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 50,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:0,
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:1,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "币种",
|
|
|
- prop: "curCode",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- width: 50,
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: "数量",
|
|
|
- // prop: "isQuantity",
|
|
|
- // overHidden: true,
|
|
|
- // search: true,
|
|
|
- // type:'select',
|
|
|
- // width: "50",
|
|
|
- // dicData:[
|
|
|
- // {
|
|
|
- // label:'否',
|
|
|
- // value:0,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label:'是',
|
|
|
- // value:1,
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // },
|
|
|
- {
|
|
|
- label: "客户",
|
|
|
- prop: "isCorp",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 50,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:0,
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:1,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "部门",
|
|
|
- prop: "isDept",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 50,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:0,
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:1,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "职员",
|
|
|
- prop: "isEmpl",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 50,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:0,
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:1,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: "项目",
|
|
|
- // prop: "isItem",
|
|
|
- // overHidden: true,
|
|
|
- // search: true,
|
|
|
- // type:'select',
|
|
|
- // width: "50",
|
|
|
- // dicData:[
|
|
|
- // {
|
|
|
- // label:'否',
|
|
|
- // value:0,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label:'是',
|
|
|
- // value:1,
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // },
|
|
|
- {
|
|
|
- label: "是否生成过凭证",
|
|
|
- prop: "count",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 120,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:'0',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:'1',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "允许手工凭证使用",
|
|
|
- prop: "isManual",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 120,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:'0',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:'1',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "应收/应付科目",
|
|
|
- prop: "isDc",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 120,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:'0',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:'1',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "预收/预付科目",
|
|
|
- prop: "isArAp",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- width: 120,
|
|
|
- dicData:[
|
|
|
- {
|
|
|
- label:'否',
|
|
|
- value:'0',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'是',
|
|
|
- value:'1',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "上级科目",
|
|
|
- prop: "parentCode",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: "children",
|
|
|
- // prop: "children",
|
|
|
- // hasChildren:true,
|
|
|
- // },
|
|
|
- {
|
|
|
- label: "期初数量借方",
|
|
|
- prop: "quantityOpenDr",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初本币借方金额",
|
|
|
- prop: "amountOpenDr",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初外币借方金额",
|
|
|
- prop: "amountOpenDrUsd",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初数量贷方",
|
|
|
- prop: "quantityOpenCr",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初本币贷方金额",
|
|
|
- prop: "amountOpenCr",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初外币贷方金额",
|
|
|
- prop: "amountOpenCrUsd",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初数量余额",
|
|
|
- prop: "quantityOpenUsdBlc",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初本币余额",
|
|
|
- prop: "amountOpenBlc",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "期初外币余额",
|
|
|
- prop: "amountOpenUsdBlc",
|
|
|
- overHidden: true,
|
|
|
- width: 120,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期数量借方",
|
|
|
- prop: "quantityDr",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期本币借方金额",
|
|
|
- prop: "amountDr",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期外币借方金额",
|
|
|
- prop: "amountDrUsd",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期数量贷方",
|
|
|
- prop: "quantityCr",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期本币贷方金额",
|
|
|
- prop: "amountCr",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期外币贷方金额",
|
|
|
- prop: "amountCrUsd",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期数量余额",
|
|
|
- prop: "quantityUsdBlc",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期本币余额",
|
|
|
- prop: "amountBlc",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "本期外币余额",
|
|
|
- prop: "amountUsdBlc",
|
|
|
- width: 120,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- overHidden: true,
|
|
|
- width: 200,
|
|
|
- },
|
|
|
- ]
|
|
|
+ addBtn: false,
|
|
|
+ menu: false,
|
|
|
+ size: "small",
|
|
|
+ props: {
|
|
|
+ labelText: "标题",
|
|
|
+ label: "title",
|
|
|
+ value: "value",
|
|
|
+ children: "children",
|
|
|
},
|
|
|
- data: [],
|
|
|
- propertyData:[], // 科目类别
|
|
|
+ },
|
|
|
+
|
|
|
+ selectionList: [],
|
|
|
+ option: {},
|
|
|
+ optionBack: {
|
|
|
+ height: "auto",
|
|
|
+ calcHeight: 30,
|
|
|
+ tip: false,
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 6,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: true,
|
|
|
+ dialogClickModal: false,
|
|
|
+ menuWidth: "200",
|
|
|
+ lazy: true,
|
|
|
+ tree: true,
|
|
|
+ rowKey: "code",
|
|
|
+ rowParentKey: "children",
|
|
|
+ simplePage: true,
|
|
|
+ searchIcon: true,
|
|
|
+ searchIndex: 3,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "科目代码",
|
|
|
+ prop: "code",
|
|
|
+ search: true,
|
|
|
+ width: 100,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "中文名称",
|
|
|
+ prop: "cnName",
|
|
|
+ search: true,
|
|
|
+ width: 200,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "方向",
|
|
|
+ prop: "dc",
|
|
|
+ overHidden: true,
|
|
|
+ type: "select",
|
|
|
+ search: true,
|
|
|
+ width: 50,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "借方",
|
|
|
+ value: "D",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "贷方",
|
|
|
+ value: "C",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "外币",
|
|
|
+ prop: "isForeign",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ width: 50,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "币种",
|
|
|
+ prop: "curCode",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ width: 50,
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "数量",
|
|
|
+ // prop: "isQuantity",
|
|
|
+ // overHidden: true,
|
|
|
+ // search: true,
|
|
|
+ // type:'select',
|
|
|
+ // width: "50",
|
|
|
+ // dicData:[
|
|
|
+ // {
|
|
|
+ // label:'否',
|
|
|
+ // value:0,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label:'是',
|
|
|
+ // value:1,
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "客户",
|
|
|
+ prop: "isCorp",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ width: 50,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "部门",
|
|
|
+ prop: "isDept",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ width: 50,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "职员",
|
|
|
+ prop: "isEmpl",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ width: 50,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "项目",
|
|
|
+ // prop: "isItem",
|
|
|
+ // overHidden: true,
|
|
|
+ // search: true,
|
|
|
+ // type:'select',
|
|
|
+ // width: "50",
|
|
|
+ // dicData:[
|
|
|
+ // {
|
|
|
+ // label:'否',
|
|
|
+ // value:0,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label:'是',
|
|
|
+ // value:1,
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "是否生成过凭证",
|
|
|
+ prop: "count",
|
|
|
+ overHidden: true,
|
|
|
+ search: false,
|
|
|
+ type: "select",
|
|
|
+ width: 120,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "允许手工凭证使用",
|
|
|
+ prop: "isManual",
|
|
|
+ overHidden: true,
|
|
|
+ search: false,
|
|
|
+ type: "select",
|
|
|
+ width: 120,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "应收/应付科目",
|
|
|
+ prop: "isDc",
|
|
|
+ overHidden: true,
|
|
|
+ search: false,
|
|
|
+ type: "select",
|
|
|
+ width: 120,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "预收/预付科目",
|
|
|
+ prop: "isArAp",
|
|
|
+ overHidden: true,
|
|
|
+ search: false,
|
|
|
+ type: "select",
|
|
|
+ width: 120,
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "上级科目",
|
|
|
+ prop: "parentCode",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "children",
|
|
|
+ // prop: "children",
|
|
|
+ // hasChildren:true,
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "期初数量借方",
|
|
|
+ prop: "quantityOpenDr",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初本币借方金额",
|
|
|
+ prop: "amountOpenDr",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初外币借方金额",
|
|
|
+ prop: "amountOpenDrUsd",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初数量贷方",
|
|
|
+ prop: "quantityOpenCr",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初本币贷方金额",
|
|
|
+ prop: "amountOpenCr",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初外币贷方金额",
|
|
|
+ prop: "amountOpenCrUsd",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初数量余额",
|
|
|
+ prop: "quantityOpenUsdBlc",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初本币余额",
|
|
|
+ prop: "amountOpenBlc",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "期初外币余额",
|
|
|
+ prop: "amountOpenUsdBlc",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期数量借方",
|
|
|
+ prop: "quantityDr",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期本币借方金额",
|
|
|
+ prop: "amountDr",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期外币借方金额",
|
|
|
+ prop: "amountDrUsd",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期数量贷方",
|
|
|
+ prop: "quantityCr",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期本币贷方金额",
|
|
|
+ prop: "amountCr",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期外币贷方金额",
|
|
|
+ prop: "amountCrUsd",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期数量余额",
|
|
|
+ prop: "quantityUsdBlc",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期本币余额",
|
|
|
+ prop: "amountBlc",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "本期外币余额",
|
|
|
+ prop: "amountUsdBlc",
|
|
|
+ width: 120,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ overHidden: true,
|
|
|
+ width: 200,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ data: [],
|
|
|
+ propertyData: [], // 科目类别
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: { accitemsopenblc, accountsDialog, accountsDetails },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["permission"]),
|
|
|
+ permissionList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.accounts_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.accounts_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.accounts_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.accounts_edit, false),
|
|
|
};
|
|
|
},
|
|
|
- components:{accitemsopenblc, accountsDialog,accountsDetails},
|
|
|
- computed: {
|
|
|
- ...mapGetters(["permission"]),
|
|
|
- permissionList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.accounts_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.accounts_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.accounts_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.accounts_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- ids() {
|
|
|
- let ids = [];
|
|
|
- this.selectionList.forEach(ele => {
|
|
|
- ids.push(ele.id);
|
|
|
+ ids() {
|
|
|
+ let ids = [];
|
|
|
+ this.selectionList.forEach((ele) => {
|
|
|
+ ids.push(ele.id);
|
|
|
+ });
|
|
|
+ return ids.join(",");
|
|
|
+ },
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(323), this.optionBack);
|
|
|
+ this.propertyWorkDictsfun();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ balanceCheck,
|
|
|
+ nodeClick(data) {
|
|
|
+ this.treeAccCode = data.code;
|
|
|
+ this.treeAccProperty = data.property;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ // 辅助核算期初确认
|
|
|
+ openingCalculatefun() {
|
|
|
+ this.accountsSubmitfun();
|
|
|
+ this.sopenblcVisible = false;
|
|
|
+ },
|
|
|
+ // 核算项目数据
|
|
|
+ propertyWorkDictsfun(cnName) {
|
|
|
+ getWorkDicts("itemClassify_los").then((res) => {
|
|
|
+ this.propertyData = res.data.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ addAccountsfun() {
|
|
|
+ if (this.selectionList.length > 1) {
|
|
|
+ return this.$message.warning("只能选择一条数据");
|
|
|
+ }
|
|
|
+ this.form = {};
|
|
|
+ if (this.selectionList.length == 1) {
|
|
|
+ if (this.selectionList[0].count == 1) {
|
|
|
+ return this.$message.warning("当前科目已经生成凭证");
|
|
|
+ }
|
|
|
+ getAccountsCode({ code: this.selectionList[0].code }).then((res) => {
|
|
|
+ this.$set(this.form, "code", res.data.data);
|
|
|
});
|
|
|
- return ids.join(",");
|
|
|
}
|
|
|
+ if (this.selectionList.length == 0) {
|
|
|
+ getAccountsCode({ code: 0 }).then((res) => {
|
|
|
+ this.$set(this.form, "code", res.data.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 复制上默认值
|
|
|
+ this.form.isItem = "0";
|
|
|
+ this.form.curCode = "CNY";
|
|
|
+ // 打开弹窗
|
|
|
+ this.accountsVisible = true;
|
|
|
+ // this.isShow = false
|
|
|
},
|
|
|
- async created() {
|
|
|
- this.option = await this.getColumnData(this.getColumnName(323), this.optionBack);
|
|
|
- this.propertyWorkDictsfun()
|
|
|
+ // 编辑
|
|
|
+ editDetailsfun(id) {
|
|
|
+ // 详情接口
|
|
|
+ accountsDetail(id).then((res) => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.$set(this.form, "property", this.form.property + "");
|
|
|
+ });
|
|
|
+ this.accountsVisible = true;
|
|
|
},
|
|
|
- methods: {
|
|
|
- // 辅助核算期初确认
|
|
|
- openingCalculatefun(){
|
|
|
- this.accountsSubmitfun()
|
|
|
- this.sopenblcVisible = false
|
|
|
- },
|
|
|
- // 核算项目数据
|
|
|
- propertyWorkDictsfun(cnName){
|
|
|
- getWorkDicts('itemClassify_los').then((res) => {
|
|
|
- this.propertyData = res.data.data
|
|
|
- });
|
|
|
- },
|
|
|
- // 添加
|
|
|
- addAccountsfun(){
|
|
|
- if (this.selectionList.length > 1) {
|
|
|
- return this.$message.warning('只能选择一条数据')
|
|
|
- }
|
|
|
- this.form = {}
|
|
|
- if (this.selectionList.length == 1) {
|
|
|
- if (this.selectionList[0].count == 1) {
|
|
|
- return this.$message.warning('当前科目已经生成凭证')
|
|
|
- }
|
|
|
- getAccountsCode({code:this.selectionList[0].code}).then(res=>{
|
|
|
- this.$set(this.form,'code',res.data.data)
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.selectionList.length == 0) {
|
|
|
- getAccountsCode({code:0}).then(res=>{
|
|
|
- this.$set(this.form,'code',res.data.data)
|
|
|
- })
|
|
|
- }
|
|
|
- // 复制上默认值
|
|
|
- this.form.isItem = '0'
|
|
|
- this.form.curCode = 'CNY'
|
|
|
- // 打开弹窗
|
|
|
- this.accountsVisible = true
|
|
|
- // this.isShow = false
|
|
|
- },
|
|
|
- // 编辑
|
|
|
- editDetailsfun(id){
|
|
|
- // 详情接口
|
|
|
- accountsDetail(id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.$set(this.form,'property',this.form.property + '')
|
|
|
- });
|
|
|
- this.accountsVisible = true
|
|
|
- },
|
|
|
- // 大保存
|
|
|
- bigSavefun(){
|
|
|
- let msgs=[]
|
|
|
- if (!this.form.code) {
|
|
|
- msgs.push('科目编码')
|
|
|
- }
|
|
|
- if (!this.form.cnName) {
|
|
|
- msgs.push('科目名称')
|
|
|
- }
|
|
|
- if (!this.form.dc) {
|
|
|
- msgs.push('方向')
|
|
|
- }
|
|
|
- if(msgs.length>0) {
|
|
|
- this.$alert(`请填写下列信息:${msgs.join(" ,")}!`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
- this.accountsSubmitfun()
|
|
|
- },
|
|
|
- // 保存
|
|
|
- accountsSubmitfun(){
|
|
|
- accountsSubmit(this.form).then(res=>{
|
|
|
- this.$message.success("操作成功!")
|
|
|
- this.accountsVisible = false
|
|
|
- this.onLoad(this.page, this.query)
|
|
|
- })
|
|
|
- },
|
|
|
- // 弹窗点击差号
|
|
|
- handleClose(done) {
|
|
|
- done();
|
|
|
- // this.$confirm('确认关闭?')
|
|
|
- // .then(_ => {
|
|
|
- // done();
|
|
|
- // })
|
|
|
- // .catch(_ => {});
|
|
|
- },
|
|
|
- // 添加
|
|
|
- rowSave(row, done, loading) {
|
|
|
- accountsSubmit(row).then(() => {
|
|
|
+ // 大保存
|
|
|
+ bigSavefun() {
|
|
|
+ let msgs = [];
|
|
|
+ if (!this.form.code) {
|
|
|
+ msgs.push("科目编码");
|
|
|
+ }
|
|
|
+ if (!this.form.cnName) {
|
|
|
+ msgs.push("科目名称");
|
|
|
+ }
|
|
|
+ if (!this.form.dc) {
|
|
|
+ msgs.push("方向");
|
|
|
+ }
|
|
|
+ if (msgs.length > 0) {
|
|
|
+ this.$alert(`请填写下列信息:${msgs.join(" ,")}!`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.accountsSubmitfun();
|
|
|
+ },
|
|
|
+ // 保存
|
|
|
+ accountsSubmitfun() {
|
|
|
+ accountsSubmit(this.form).then((res) => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.accountsVisible = false;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 弹窗点击差号
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
+ // this.$confirm('确认关闭?')
|
|
|
+ // .then(_ => {
|
|
|
+ // done();
|
|
|
+ // })
|
|
|
+ // .catch(_ => {});
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ rowSave(row, done, loading) {
|
|
|
+ accountsSubmit(row).then(
|
|
|
+ () => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
done();
|
|
|
- }, error => {
|
|
|
+ },
|
|
|
+ (error) => {
|
|
|
loading();
|
|
|
window.console.log(error);
|
|
|
- });
|
|
|
- },
|
|
|
- // 编辑操作
|
|
|
- rowUpdate(row, index, done, loading) {
|
|
|
- accountsSubmit(row).then(() => {
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 编辑操作
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
+ accountsSubmit(row).then(
|
|
|
+ () => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
done();
|
|
|
- }, error => {
|
|
|
- loading();
|
|
|
- });
|
|
|
- },
|
|
|
- // 删除
|
|
|
- rowDel(row) {
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- return accountsRemove(row.id);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 编辑
|
|
|
- editfun(row){
|
|
|
- accountsDetail(row.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.$set(this.form,'property',this.form.property + '')
|
|
|
- });
|
|
|
- this.accountsVisible = true
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.$refs.accountsDialog.propertyWorkDictsfun()
|
|
|
- })
|
|
|
- },
|
|
|
- // 添加子项
|
|
|
- addChildfun(row){
|
|
|
- this.form = {
|
|
|
- parentId:row.id,
|
|
|
- parentCode:row.code,
|
|
|
- parentCnName:row.cnName,
|
|
|
- }
|
|
|
- getAccountsCode({code:row.code}).then(res=>{
|
|
|
- this.$set(this.form,'code',res.data.data)
|
|
|
- })
|
|
|
- // 复制上默认值
|
|
|
- this.form.isItem = '0'
|
|
|
- this.form.curCode = 'CNY'
|
|
|
-
|
|
|
- this.accountsVisible = true
|
|
|
},
|
|
|
- // 核算期初
|
|
|
- editOpeningfun(row){
|
|
|
- accountsDetail(row.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- });
|
|
|
- this.sopenblcVisible = true
|
|
|
- },
|
|
|
-
|
|
|
- // 匹配删除
|
|
|
- handleDelete() {
|
|
|
- if (this.selectionList.length === 0) {
|
|
|
- this.$message.warning("请选择至少一条数据");
|
|
|
- return;
|
|
|
+ (error) => {
|
|
|
+ loading();
|
|
|
}
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ rowDel(row) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return accountsRemove(row.id);
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- return accountsRemove(this.ids);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- this.$refs.crud.toggleSelection();
|
|
|
- });
|
|
|
- },
|
|
|
- // 打开弹窗调用详情接口
|
|
|
- beforeOpen(done, type) {
|
|
|
- if (["edit", "view"].includes(type)) {
|
|
|
- accountsDetail(this.form.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 编辑
|
|
|
+ editfun(row) {
|
|
|
+ accountsDetail(row.id).then((res) => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.$set(this.form, "property", this.form.property + "");
|
|
|
+ });
|
|
|
+ this.accountsVisible = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.accountsDialog.propertyWorkDictsfun();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 添加子项
|
|
|
+ addChildfun(row) {
|
|
|
+ this.form = {
|
|
|
+ parentId: row.id,
|
|
|
+ parentCode: row.code,
|
|
|
+ parentCnName: row.cnName,
|
|
|
+ };
|
|
|
+ getAccountsCode({ code: row.code }).then((res) => {
|
|
|
+ this.$set(this.form, "code", res.data.data);
|
|
|
+ });
|
|
|
+ // 复制上默认值
|
|
|
+ let copyFlds = "dc,property,isArAp,isBank,isManual,isDiary";
|
|
|
+ copyFlds.split(",").forEach((item) => {
|
|
|
+ if (row[item]) {
|
|
|
+ this.form[item] = row[item];
|
|
|
}
|
|
|
- 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();
|
|
|
- },
|
|
|
- // table 切换
|
|
|
- handleClick(){
|
|
|
- this.page.currentPage = 1;
|
|
|
- this.onLoad(this.page, this.query);
|
|
|
- },
|
|
|
- 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;
|
|
|
- accountsList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
- const data = res.data.data;
|
|
|
- this.page.total = data.total;
|
|
|
+ });
|
|
|
+ this.form.property = this.form.property + "";
|
|
|
+ this.form.isItem = "0";
|
|
|
+ this.form.curCode = "CNY";
|
|
|
|
|
|
- // 前端去掉凭证明细中已使用的判断
|
|
|
- data.records.forEach(item => {
|
|
|
- item.count = "0"
|
|
|
- })
|
|
|
+ this.accountsVisible = true;
|
|
|
+ },
|
|
|
+ // 核算期初
|
|
|
+ editOpeningfun(row) {
|
|
|
+ accountsDetail(row.id).then((res) => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ });
|
|
|
+ this.sopenblcVisible = true;
|
|
|
+ },
|
|
|
|
|
|
- this.data = data.records;
|
|
|
- this.loading = false;
|
|
|
- this.selectionClear();
|
|
|
+ // 匹配删除
|
|
|
+ handleDelete() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return accountsRemove(this.ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!",
|
|
|
+ });
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
- },
|
|
|
- // 懒加载查询子节点数据
|
|
|
- treeLoad(row, treeNode, resolve){
|
|
|
- console.log(row,688)
|
|
|
- console.log(row,treeNode,resolve,673)
|
|
|
- },
|
|
|
- // 详情的返回列表
|
|
|
- goBack() {
|
|
|
- // 初始化数据
|
|
|
- if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
- this.$router.$avueRouter.closeTag();
|
|
|
- this.$router.push({
|
|
|
- path: "/iosBasicData/accounts/index"
|
|
|
- });
|
|
|
- }
|
|
|
- this.isShow = true;
|
|
|
- this.onLoad(this.page, this.search);
|
|
|
- },
|
|
|
- //自定义列保存
|
|
|
- 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"
|
|
|
+ },
|
|
|
+ // 平衡检查
|
|
|
+ async handleBalanceCheck (){
|
|
|
+ this.loading = true;
|
|
|
+ try{
|
|
|
+ await balanceCheck().then((res) => {
|
|
|
+ if(res.data.msg==="success"){
|
|
|
+ this.$messsage.success("账户全部符合平衡检查!");
|
|
|
+ }else{
|
|
|
+ this.$alert(
|
|
|
+ "下列问题导致账户不平衡:<br >" + res.data.data.replaceAll("\n", "<br />"),
|
|
|
+ "账户平衡检查",
|
|
|
+ {
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
}
|
|
|
+ );
|
|
|
}
|
|
|
- return back;
|
|
|
- },
|
|
|
+ });
|
|
|
+ }finally {
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 科目入账
|
|
|
+ async handleAccountsPost(){
|
|
|
+
|
|
|
+ },
|
|
|
+ // 打开弹窗调用详情接口
|
|
|
+ beforeOpen(done, type) {
|
|
|
+ if (["edit", "view"].includes(type)) {
|
|
|
+ accountsDetail(this.form.id).then((res) => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ searchReset() {
|
|
|
+ this.query = {
|
|
|
+ property: this.propertyData[0].dictKey,
|
|
|
+ };
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ // 搜索按钮点击
|
|
|
+ searchChange(params, done) {
|
|
|
+ // this.query = params;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ // table 切换
|
|
|
+ handleClick() {
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ },
|
|
|
+ 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 = {}) {
|
|
|
+ // console.log(this.treeAccProperty, this.treeAccCode, this.query.property, "v", this.treeAccProperty || this.treeAccProperty==0 ? this.treeAccProperty : this.query.property );
|
|
|
+ this.loading = true;
|
|
|
+ console.log(this.query);
|
|
|
+ let qry = JSON.parse(JSON.stringify(Object.assign(params, this.query)));
|
|
|
|
|
|
- }
|
|
|
- };
|
|
|
+ qry.property = this.treeAccProperty || this.treeAccProperty == 0 ? this.treeAccProperty : this.query.property;
|
|
|
+ qry.code = this.treeAccCode ? this.treeAccCode : this.query.code;
|
|
|
+
|
|
|
+ if (this.treeAccProperty || this.treeAccProperty == 0) {
|
|
|
+ this.query.property = this.treeAccProperty + "";
|
|
|
+ // console.log("set this.query.property", this.query.property);
|
|
|
+ }
|
|
|
+
|
|
|
+ this.treeAccProperty = undefined;
|
|
|
+ this.treeAccCode = undefined;
|
|
|
+ accountsList(page.currentPage, page.pageSize, qry).then((res) => {
|
|
|
+ const data = res.data.data;
|
|
|
+ this.page.total = data.total;
|
|
|
+
|
|
|
+ // 前端去掉凭证明细中已使用的判断
|
|
|
+ data.records.forEach((item) => {
|
|
|
+ item.count = "0";
|
|
|
+ });
|
|
|
+
|
|
|
+ this.data = data.records;
|
|
|
+ this.loading = false;
|
|
|
+ this.selectionClear();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 懒加载查询子节点数据
|
|
|
+ treeLoad(row, treeNode, resolve) {
|
|
|
+ console.log(row, 688);
|
|
|
+ console.log(row, treeNode, resolve, 673);
|
|
|
+ },
|
|
|
+ // 详情的返回列表
|
|
|
+ goBack() {
|
|
|
+ // 初始化数据
|
|
|
+ if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
+ this.$router.$avueRouter.closeTag();
|
|
|
+ this.$router.push({
|
|
|
+ path: "/iosBasicData/accounts/index",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.isShow = true;
|
|
|
+ this.onLoad(this.page, this.search);
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ 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;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.box {
|
|
|
+ height: 800px;
|
|
|
+}
|
|
|
+
|
|
|
+.el-scrollbar {
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.box .el-scrollbar__wrap {
|
|
|
+ overflow: scroll;
|
|
|
+}
|
|
|
+
|
|
|
::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;
|
|
|
}
|
|
|
.pointerClick {
|
|
|
- cursor:pointer;
|
|
|
- color: #1e9fff;
|
|
|
+ cursor: pointer;
|
|
|
+ color: #1e9fff;
|
|
|
}
|
|
|
::v-deep .el-col-md-8 {
|
|
|
- width: 24.33333%;
|
|
|
+ width: 24.33333%;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|
|
|
+<style>
|
|
|
+.custom-alert {
|
|
|
+ width: auto !important; /* 设置宽度 */
|
|
|
}
|
|
|
</style>
|