|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button size="mini" type="primary" @click="dialogFormVisible = true">新 建</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="dialogFormVisible = true; classList()">新 建</el-button>
|
|
|
<el-drawer
|
|
|
title="创建收入凭证"
|
|
|
:visible.sync="dialogFormVisible"
|
|
|
size="40%"
|
|
|
direction="rtl"
|
|
|
append-to-body
|
|
|
- @close="dialogFormVisible = false">
|
|
|
+ @close="onClose">
|
|
|
<div class="drawer__panel">
|
|
|
<el-row :gutter="20">
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
|
|
@@ -57,8 +57,8 @@
|
|
|
<el-option
|
|
|
v-for="item in subClass"
|
|
|
:key="item.rowindex"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value">
|
|
|
+ :label="item"
|
|
|
+ :value="item">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -72,7 +72,7 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="fixed__btn__panel">
|
|
|
- <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
|
|
|
<el-button size="small" type="primary" @click="onSubmit" :loading="loading" class="normal-btn-width">确 定</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
@@ -195,16 +195,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- console.log("收入凭证分类",res)
|
|
|
this.classData = res.data
|
|
|
- console.log(this.classData)
|
|
|
},
|
|
|
classChange(res){
|
|
|
- console.log("选择",res)
|
|
|
- console.log("明细",this.classData[res-1])
|
|
|
- this.form.class = this.classData[res-1].value
|
|
|
- this.subClass = this.classData[res-1].subvalues
|
|
|
- console.log("form",this.form)
|
|
|
+ this.form.subclass = ''
|
|
|
+ this.subClass = []
|
|
|
+ this.classData.forEach(item=>{
|
|
|
+ if (item.value == res){
|
|
|
+ this.subClass = item.subvalues
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onClose(){
|
|
|
this.dialogFormVisible = false
|
|
@@ -226,7 +226,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.classList()
|
|
|
+
|
|
|
},
|
|
|
watch:{
|
|
|
"form.sys_enterpriseid":function (val){
|