|
|
@@ -2,7 +2,60 @@
|
|
|
<div class="container" style="width: 99%; margin-top: 0px">
|
|
|
<templateTable :searchData.sync="queryFrom" :tableConfig="tableConfig" :data="pageResult" @getList="findPage" :pagination="pageData">
|
|
|
</templateTable>
|
|
|
-
|
|
|
+ <el-dialog
|
|
|
+ title="税源管理"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="50%"
|
|
|
+ >
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick" >
|
|
|
+ <el-tab-pane label="协议选择" name="1">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="license"
|
|
|
+ label="车牌"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="协议选择"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.agreementId" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.insuranceCompany"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="是否启动"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch
|
|
|
+ v-model="scope.row.isTaxSource"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </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-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitDialog()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -13,6 +66,13 @@ export default {
|
|
|
components: { templateTable },
|
|
|
data() {
|
|
|
return {
|
|
|
+ dialogVisible:false,
|
|
|
+ activeName:'1',
|
|
|
+ defaultProps: {
|
|
|
+ children: 'children',
|
|
|
+ label: 'name'
|
|
|
+ },
|
|
|
+ treeData:[],
|
|
|
formList: [
|
|
|
{
|
|
|
label: "开票员",
|
|
|
@@ -25,30 +85,16 @@ export default {
|
|
|
tableConfig: {
|
|
|
columns: [
|
|
|
// 数据列
|
|
|
- { prop: "invoiceClerk", label: "保险公司名称", type: 'text' },
|
|
|
- {
|
|
|
- prop: "subjects",
|
|
|
- label: "科目", type: 'text',
|
|
|
- },
|
|
|
- { prop: "invCompanyName", label: "开票方", type: 'text', },
|
|
|
-
|
|
|
- { prop: "peerCompanyName", label: "对方单位名称", type: 'text', },
|
|
|
- { prop: "invoiceNum", label: "号码", type: 'text', },
|
|
|
+ { prop: "name", label: "保险公司名称", type: 'text' },
|
|
|
{
|
|
|
- prop: "invoiceDate",
|
|
|
- label: "日期",
|
|
|
- type: 'text',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "taxExclusivePrice",
|
|
|
- label: "金额",
|
|
|
- type: 'text',
|
|
|
+ prop: "id",
|
|
|
+ label: "id", type: 'text',
|
|
|
},
|
|
|
],
|
|
|
loading: true,
|
|
|
isPaginationShow: true,
|
|
|
isShowIndex: true,
|
|
|
- operationWidth: '120',
|
|
|
+ operationWidth: '30',
|
|
|
optBtns: [
|
|
|
{
|
|
|
type: 'primary',
|
|
|
@@ -63,19 +109,35 @@ export default {
|
|
|
pageSize: 10,
|
|
|
totalSize: 0
|
|
|
},
|
|
|
+ tableData:[],
|
|
|
+ options:[],
|
|
|
+ tableFormData:[]
|
|
|
}
|
|
|
},
|
|
|
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){
|
|
|
+ this.tableData=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
this.findPage()
|
|
|
},
|
|
|
methods:{
|
|
|
- findPage(data) {
|
|
|
+ findPage() {
|
|
|
this.tableConfig.loading = true;
|
|
|
- this.$api.dict
|
|
|
- .queryPage({ ...this.pageData, ...data })
|
|
|
+ this.$api.dept.insureCompany({ ...this.pageData })
|
|
|
.then((res) => {
|
|
|
this.tableConfig.loading = false;
|
|
|
- this.pageResult = res.data.content;
|
|
|
+ this.pageResult = res.data;
|
|
|
this.pageData.pageNum = res.data.pageNum;
|
|
|
this.pageData.pageSize = res.data.pageSize;
|
|
|
this.pageData.totalSize = res.data.totalSize;
|
|
|
@@ -83,8 +145,38 @@ methods:{
|
|
|
})
|
|
|
},
|
|
|
addSource(row){
|
|
|
+ this.dialogVisible=true
|
|
|
+ this.$api.dept.agreement(row.id)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.options=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleClick(data){
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ handleNodeClick(data){
|
|
|
|
|
|
},
|
|
|
+ submitDialog(){
|
|
|
+ console.log()
|
|
|
+ let agreementTaxList=[]
|
|
|
+ this.treeData.forEach(val=>{
|
|
|
+ agreementTaxList.push({
|
|
|
+ agreementId:val.agreementId,
|
|
|
+ license:val.license,
|
|
|
+ isTaxSource:val.isTaxSource,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.$api.dept.saveTaxSource({})
|
|
|
+ .then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.options=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
}
|