<template>
|
<div>
|
<el-row :gutter="5">
|
<el-col :span="7">
|
<div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
|
<ft-category-select ref="category" @on-selected="onCategorySelected"/>
|
</div>
|
</el-col>
|
<el-col :span="17">
|
<div class="mod-ftCategory-ftCategory fa-card-a" style="margin-left: 5px;">
|
<zt-table-wraper ref="tableObj" query-url="/ftDetail/FtDetail/page" delete-url="/ftDetail/FtDetail/"
|
v-slot="{ table }">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
|
<el-form-item>
|
<el-input v-model="dataForm.accountCode" placeholder="请输入科目编码" clearable></el-input>
|
|
</el-form-item>
|
<el-form-item>
|
<zt-button type="query" @click="table.query()"/>
|
<zt-button type="add" @click="add()"/>
|
<zt-button type="delete" @click="table.deleteHandle()"/>
|
</el-form-item>
|
</el-form>
|
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
|
border @selection-change="table.selectionChangeHandle">
|
<el-table-column type="selection" width="40"/>
|
<el-table-column prop="accountCode" label="科目编码"/>
|
<el-table-column prop="assCode" label="辅助项目编码"/>
|
<el-table-column prop="assName" label="辅助项目名称"/>
|
<el-table-column prop="ftExpense" label="分摊费用"/>
|
<el-table-column prop="remark" label="备注"/>
|
<zt-table-column-handle :table="table" :has-edit="false"/>
|
</el-table>
|
<!-- 弹窗, 新增 / 修改 -->
|
<add-or-update ref="AddOrUpdate" @refreshDataList="table.query"/>
|
<ft-detail-add ref="add" @refreshDataList="table.query"/>
|
</zt-table-wraper>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
</template>
|
|
<script>
|
import FtDetailUpdate from './ftDetail-Update.vue'
|
import FtCategorySelect from '@/views/modules/ftCategory/ftCategorySelect.vue'
|
import FtDetailAdd from "@/views/modules/ftDetail/ftDetail-Add.vue";
|
|
export default {
|
data() {
|
return {
|
dataForm: {
|
accountCode: '',
|
ftCategoryId: ''
|
}
|
}
|
},
|
components: {
|
FtDetailAdd,
|
FtCategorySelect,
|
AddOrUpdate: FtDetailUpdate
|
},
|
|
methods: {
|
add() {
|
if (this.dataForm.ftCategoryId === '') {
|
this.$alert('请选择分摊名目')
|
return
|
}
|
this.$refs.add.$refs.dialog.init(null, this.dataForm.ftCategoryId)
|
},
|
onCategorySelected(row) {
|
this.dataForm.ftCategoryId = row.id
|
this.$refs.tableObj.query()
|
}
|
}
|
}
|
</script>
|