|
@@ -41,27 +41,51 @@
|
|
|
@resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 328)"
|
|
|
@saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 328)" >
|
|
|
<template slot="menuLeft">
|
|
|
- <!--<el-button-->
|
|
|
- <!-- type="primary" icon="el-icon-plus"-->
|
|
|
- <!-- @click="addfun"-->
|
|
|
- <!-- size="small">新增-->
|
|
|
- <!--</el-button>-->
|
|
|
- <el-button type="danger"
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- plain
|
|
|
- @click="handleDelete">删 除
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small" @click="initializationfun" >初始化
|
|
|
</el-button>
|
|
|
+ <!--<el-button type="danger"-->
|
|
|
+ <!-- size="small"-->
|
|
|
+ <!-- icon="el-icon-delete"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- @click="handleDelete">删 除-->
|
|
|
+ <!--</el-button>-->
|
|
|
</template>
|
|
|
+ <!--<template slot-scope="{ row }" slot="currencyCodeForm" >-->
|
|
|
+ <!-- <search-query :datalist="currencyData"-->
|
|
|
+ <!-- :selectValue="form.currencyCode"-->
|
|
|
+ <!-- :clearable="true"-->
|
|
|
+ <!-- :buttonIf="false"-->
|
|
|
+ <!-- placeholder="请选择币种"-->
|
|
|
+ <!-- :forParameter="{key:'id',label:'code',value:'code'}"-->
|
|
|
+ <!-- @remoteMethod="bcurrencyGetExratefun"-->
|
|
|
+ <!-- @corpChange="corpChange($event,'currencyCode')"-->
|
|
|
+ <!-- @corpFocus="bcurrencyGetExratefun" >-->
|
|
|
+ <!-- </search-query>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <template slot="subjectCodeForm" slot-scope="{ row }">
|
|
|
+ <search-query :datalist="subjectData"
|
|
|
+ :selectValue="form.subjectCode"
|
|
|
+ :filterable="true"
|
|
|
+ :clearable="true"
|
|
|
+ :remote="true"
|
|
|
+ :buttonIf="false"
|
|
|
+ :forParameter="{key:'id',label:'code',value:'code'}"
|
|
|
+ @corpFocus="accountsListfun"
|
|
|
+ @corpChange="corpChange($event,'subjectCode')">
|
|
|
+ </search-query>
|
|
|
+ </template>
|
|
|
+
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<!--类别弹窗-->
|
|
|
- <el-dialog title="类别" :visible.sync="corpTypeVisible" append-to-body width="60%" :before-close="corpTypeClose">
|
|
|
+ <el-dialog title="类别" :visible.sync="corpTypeVisible" append-to-body width="70%" :before-close="corpTypeClose">
|
|
|
<div>
|
|
|
- <bvouchertype></bvouchertype>
|
|
|
+ <bbusinesstype></bbusinesstype>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="corpTypeVisible = false">取 消</el-button>
|
|
@@ -76,9 +100,21 @@
|
|
|
import bvouchertype from "@/views/iosBasicData/bvouchertype/index.vue";
|
|
|
import {bvouchertypelist} from "@/api/bvouchertype/index";
|
|
|
import {mapGetters} from "vuex";
|
|
|
- import {vouchertemplatelist, vouchertemplateDetail, vouchertemplateSubmit, vouchertemplateRemove} from "@/api/vouchertemplate/index";
|
|
|
+ import {
|
|
|
+ vouchertemplatelist,
|
|
|
+ vouchertemplateDetail,
|
|
|
+ vouchertemplateSubmit,
|
|
|
+ vouchertemplateRemove,
|
|
|
+ initialization
|
|
|
+ } from "@/api/vouchertemplate/index";
|
|
|
+ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
|
|
|
+ import {bcurrencyGetExrate} from "@/api/iosBasicData/rateManagement";
|
|
|
+ import {getCurrentDate} from "@/util/date";
|
|
|
+ import {accountsList} from "@/api/iosBasicData/accounts";
|
|
|
+ import { bbusinesstypeList } from "@/api/iosBasicData/bbusinesstype";
|
|
|
+ import bbusinesstype from "@/views/iosBasicData/bbusinesstype/index.vue";
|
|
|
export default {
|
|
|
- components: {bvouchertype},
|
|
|
+ components: {SearchQuery, bvouchertype,bbusinesstype},
|
|
|
data() {
|
|
|
return {
|
|
|
treeOption: {
|
|
@@ -99,6 +135,8 @@
|
|
|
form: {
|
|
|
// currencyCode:'RMB', // 币种代码
|
|
|
},
|
|
|
+ currencyData:[], // 币种数据
|
|
|
+ subjectData:[], // 科目数据
|
|
|
query: {},
|
|
|
loading: true,
|
|
|
page: {
|
|
@@ -120,29 +158,29 @@
|
|
|
viewBtn: true,
|
|
|
selection: true,
|
|
|
dialogClickModal: false,
|
|
|
+ menuWidth:'100',
|
|
|
column: [
|
|
|
{
|
|
|
label: "币别代码",
|
|
|
prop: "currencyCode",
|
|
|
- type: 'select',
|
|
|
- dicUrl:'/api/blade-los/bcurrency/page?current=1&size=20',
|
|
|
- props: {
|
|
|
- label: "code",
|
|
|
- value: "id",
|
|
|
- res:'data.records'
|
|
|
- },
|
|
|
+ // formslot:true,
|
|
|
overHidden:true,
|
|
|
+ display:false,
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "币别名称",
|
|
|
prop: "currencyName",
|
|
|
overHidden:true,
|
|
|
- display: true
|
|
|
+ display:false,
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "凭证类型",
|
|
|
prop: "voucherType",
|
|
|
overHidden:true,
|
|
|
+ display:false,
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "凭证名称",
|
|
@@ -153,21 +191,32 @@
|
|
|
label: "类型",
|
|
|
prop: "dcType",
|
|
|
overHidden:true,
|
|
|
+ display:false,
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "科目代码",
|
|
|
prop: "subjectCode",
|
|
|
+ formslot:true,
|
|
|
overHidden:true,
|
|
|
},
|
|
|
{
|
|
|
label: "科目名称",
|
|
|
prop: "subjectName",
|
|
|
overHidden:true,
|
|
|
- display: true
|
|
|
+ disabled: true
|
|
|
},
|
|
|
{
|
|
|
label: "金额方向",
|
|
|
prop: "amountDirection",
|
|
|
+ type: 'select',
|
|
|
+ dicData: [{
|
|
|
+ label: '借',
|
|
|
+ value: 'D'
|
|
|
+ }, {
|
|
|
+ label: '贷',
|
|
|
+ value: 'C'
|
|
|
+ }],
|
|
|
overHidden:true,
|
|
|
},
|
|
|
{
|
|
@@ -176,8 +225,25 @@
|
|
|
overHidden:true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "状态",
|
|
|
+ prop: "status",
|
|
|
+ type: 'select',
|
|
|
+ overHidden:true,
|
|
|
+ dicData: [{
|
|
|
+ label: '启用',
|
|
|
+ value: 0
|
|
|
+ }, {
|
|
|
+ label: '停用',
|
|
|
+ value: 1
|
|
|
+ }],
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "附加公式",
|
|
|
prop: "additionalFormulas",
|
|
|
+ type:'textarea',
|
|
|
+ minRows: 2,
|
|
|
+ span: 12,
|
|
|
overHidden:true,
|
|
|
},
|
|
|
{
|
|
@@ -217,23 +283,12 @@
|
|
|
display:false,
|
|
|
},
|
|
|
{
|
|
|
- label: "状态",
|
|
|
- prop: "status",
|
|
|
- type: 'select',
|
|
|
- overHidden:true,
|
|
|
- dicData: [{
|
|
|
- label: '启用',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '停用',
|
|
|
- value: 1
|
|
|
- }],
|
|
|
- value: 0
|
|
|
- },
|
|
|
- {
|
|
|
label: "备注",
|
|
|
prop: "remarks",
|
|
|
overHidden:true,
|
|
|
+ type:'textarea',
|
|
|
+ minRows: 2,
|
|
|
+ span: 12,
|
|
|
},
|
|
|
]
|
|
|
},
|
|
@@ -244,9 +299,9 @@
|
|
|
...mapGetters(["permission"]),
|
|
|
permissionList() {
|
|
|
return {
|
|
|
- // addBtn: this.vaildData(this.permission.bvouchertype_add, false),
|
|
|
- // viewBtn: this.vaildData(this.permission.bvouchertype_view, false),
|
|
|
- // delBtn: this.vaildData(this.permission.bvouchertype_delete, false),
|
|
|
+ addBtn: this.vaildData(this.permission.bvouchertype_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.bvouchertype_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.bvouchertype_delete, false),
|
|
|
// editBtn: this.vaildData(this.permission.bvouchertype_edit, false)
|
|
|
};
|
|
|
},
|
|
@@ -260,14 +315,46 @@
|
|
|
},
|
|
|
async created() {
|
|
|
this.option = await this.getColumnData(this.getColumnName(328), this.optionBack);
|
|
|
- this.bvouchertypelistfun()
|
|
|
+ this.bbusinesstypeListfun()
|
|
|
+ this.accountsListfun() // 科目
|
|
|
},
|
|
|
methods:{
|
|
|
- // // 新增
|
|
|
- // addfun(){
|
|
|
- // this.$refs.crud
|
|
|
- // },
|
|
|
+ // 所属币别
|
|
|
+ corpChange(value,name){
|
|
|
+ if (name == 'currencyCode') {
|
|
|
+ for(let item of this.currencyData) {
|
|
|
+ if (item.code == value) {
|
|
|
+ this.$set(this.form,'currencyCode',item.code)
|
|
|
+ this.$set(this.form,'currencyName',item.cnName)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'subjectCode') {
|
|
|
+ for (let item of this.subjectData) {
|
|
|
+ if (item.code == value) {
|
|
|
+ this.$set(this.form,'subjectCode',item.code)
|
|
|
+ this.$set(this.form,'subjectName',item.cnName)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取币别数据
|
|
|
+ bcurrencyGetExratefun(){
|
|
|
+ bcurrencyGetExrate({
|
|
|
+ date:getCurrentDate(), // 当前日期
|
|
|
+ dc:'C'
|
|
|
+ }).then(res=>{
|
|
|
+ this.currencyData = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取科目类型数据
|
|
|
+ accountsListfun(){
|
|
|
+ accountsList(1,10,).then(res=>{
|
|
|
+ this.subjectData = res.data.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
rowSave(row, done, loading) {
|
|
|
+ console.log(row,'添加')
|
|
|
vouchertemplateSubmit(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
@@ -281,6 +368,7 @@
|
|
|
});
|
|
|
},
|
|
|
rowUpdate(row, index, done, loading) {
|
|
|
+ console.log(row,'编辑')
|
|
|
vouchertemplateSubmit(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
@@ -383,10 +471,31 @@
|
|
|
this.selectionClear();
|
|
|
});
|
|
|
},
|
|
|
+ // 初始化
|
|
|
+ initializationfun(){
|
|
|
+ if (!this.search.businessTypeId) {
|
|
|
+ return this.$message.warning('请选择左侧的类型')
|
|
|
+ }
|
|
|
+ this.$confirm('初始化会清空数据', {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(()=>{
|
|
|
+ initialization({
|
|
|
+ businessTypeId:this.search.businessTypeId,
|
|
|
+ businessType:this.search.businessType
|
|
|
+ }).then(res=>{
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, this.search);
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 左侧筛选
|
|
|
nodeClick(data) {
|
|
|
- console.log(data,64)
|
|
|
this.search.businessTypeId = data.id
|
|
|
+ this.search.businessType = data.code
|
|
|
+ this.form.businessTypeId = data.id
|
|
|
+ this.form.businessType = data.code
|
|
|
// this.detailData.businessTypeId = data.id
|
|
|
// this.detailData.businessTypeCnName = data.cnName
|
|
|
// this.detailData.businessTypeEnName = data.enName
|
|
@@ -394,8 +503,8 @@
|
|
|
this.onLoad(this.page, this.search);
|
|
|
},
|
|
|
// 获取左侧业务类别数据
|
|
|
- bvouchertypelistfun() {
|
|
|
- bvouchertypelist(1,100,).then(res => {
|
|
|
+ bbusinesstypeListfun() {
|
|
|
+ bbusinesstypeList(1,100,{enableVoucher:'1'}).then(res => {
|
|
|
this.feesTypeData = res.data.data.records
|
|
|
})
|
|
|
},
|