|
|
@@ -23,11 +23,11 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select v-model="scope.row.agreementId" placeholder="请选择">
|
|
|
+ <el-select v-model="tableFormData[scope.$index].agreementId" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
|
:key="item.id"
|
|
|
- :label="item.insuranceCompany"
|
|
|
+ :label="item.agreementName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -38,7 +38,7 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
- v-model="scope.row.isTaxSource"
|
|
|
+ v-model="tableFormData[scope.$index].isTaxSource"
|
|
|
active-value="1"
|
|
|
inactive-value="0"
|
|
|
>
|
|
|
@@ -48,7 +48,7 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="排除" name="2">
|
|
|
- <el-tree show-checkbox :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+ <el-tree default-expand-all ref="tree" show-checkbox :data="treeData" node-key="id" :props="defaultProps" ></el-tree>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
@@ -73,13 +73,6 @@ export default {
|
|
|
label: 'name'
|
|
|
},
|
|
|
treeData:[],
|
|
|
- formList: [
|
|
|
- {
|
|
|
- label: "开票员",
|
|
|
- prop: "invoiceClerk",
|
|
|
- type: 'input'
|
|
|
- },
|
|
|
- ],
|
|
|
pageResult: [], //表格数据
|
|
|
queryFrom: {}, //查询信息
|
|
|
tableConfig: {
|
|
|
@@ -111,24 +104,29 @@ export default {
|
|
|
},
|
|
|
tableData:[],
|
|
|
options:[],
|
|
|
- tableFormData:[]
|
|
|
+ tableFormData:[],
|
|
|
+ rowData:{}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.$api.dept.findTree().then((res) => {
|
|
|
if(res.code==200){
|
|
|
- res.data.forEach((ele,index) => {
|
|
|
- ele.agreementId=''
|
|
|
- ele.isTaxSource='0'
|
|
|
- });
|
|
|
this.treeData=res.data
|
|
|
}
|
|
|
})
|
|
|
this.$api.dept.license().then((res) => {
|
|
|
if(res.code==200){
|
|
|
+ res.data.forEach((ele,index) => {
|
|
|
+ this.tableFormData[index]={
|
|
|
+ agreementId:'',
|
|
|
+ isTaxSource:0
|
|
|
+ }
|
|
|
+ });
|
|
|
this.tableData=res.data
|
|
|
}
|
|
|
})
|
|
|
+ console.log(this.tableFormData,8888888888)
|
|
|
+
|
|
|
this.findPage()
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -146,6 +144,10 @@ methods:{
|
|
|
},
|
|
|
addSource(row){
|
|
|
this.dialogVisible=true
|
|
|
+ this.rowData={
|
|
|
+ insCompanyId:row.id,
|
|
|
+ insCompanyName:row.name
|
|
|
+ }
|
|
|
this.$api.dept.agreement(row.id)
|
|
|
.then((res) => {
|
|
|
if(res.code==200){
|
|
|
@@ -156,13 +158,12 @@ methods:{
|
|
|
handleClick(data){
|
|
|
|
|
|
|
|
|
- },
|
|
|
- handleNodeClick(data){
|
|
|
-
|
|
|
},
|
|
|
submitDialog(){
|
|
|
- console.log()
|
|
|
+ console.log(this.tableFormData,111111111111)
|
|
|
+
|
|
|
let agreementTaxList=[]
|
|
|
+ let agreementTaxExcludeList=[]
|
|
|
this.treeData.forEach(val=>{
|
|
|
agreementTaxList.push({
|
|
|
agreementId:val.agreementId,
|
|
|
@@ -170,7 +171,11 @@ methods:{
|
|
|
isTaxSource:val.isTaxSource,
|
|
|
})
|
|
|
})
|
|
|
- this.$api.dept.saveTaxSource({})
|
|
|
+ this.$refs.tree.getCheckedKeys().forEach(val=>{
|
|
|
+ agreementTaxExcludeList.push({excludeDeptId:val})
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$api.dept.saveTaxSource({...this.tableFormData,agreementTaxList,agreementTaxExcludeList})
|
|
|
.then((res) => {
|
|
|
if(res.code==200){
|
|
|
this.options=res.data
|