| | |
| | | <div v-if="crud.props.searchToggle"> |
| | | <!-- 搜索 --> |
| | | <el-date-picker v-model="query.flowYearMonth" type="month" clearable placeholder="流水年月" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" /> |
| | | <el-select v-model="query.companyId" filterable clearable placeholder="所属公司" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery"> |
| | | <el-select v-model="query.accountCompanyId" filterable clearable placeholder="所属年度账号" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | v-for="item in accountCompanyList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :label="item.accountName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | |
| | | </crudOperation> |
| | | <!--表单组件--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
| | | <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
| | | <el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px"> |
| | | <el-form-item label="流水年月" prop="flowYearMonth"> |
| | | <el-date-picker v-model="form.flowYearMonth" type="month" style="width: 370px;" placeholder="请选择" value-format="yyyy-MM-dd HH:mm:ss" /> |
| | | <el-date-picker v-model="form.flowYearMonth" type="month" style="width: 340px;" placeholder="请选择" value-format="yyyy-MM-dd HH:mm:ss" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属公司" prop="companyId"> |
| | | <el-select v-model="form.companyId" filterable clearable placeholder="请选择" style="width: 370px;"> |
| | | <el-form-item label="所属年度账号" prop="accountCompanyId"> |
| | | <el-select v-model="form.accountCompanyId" filterable clearable placeholder="请选择" style="width: 340px;"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | v-for="item in accountCompanyList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :label="item.accountName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 370px;" /> |
| | | <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 340px;" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | {{ crud.toMonth(scope.row.flowYearMonth) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="companyName" label="所属公司"> |
| | | <el-table-column prop="accountCompanyName" label="所属年度账号"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ scope.row.companyName }}</el-tag> |
| | | <el-tag>{{ scope.row.accountCompanyName }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="capitalFlowExpendsAmount" label="支出总金额"> |
| | |
| | | placeholder="请选择" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="所属公司" prop="companyId"> |
| | | <el-select v-model="generateForm.companyId" filterable clearable placeholder="请选择" style="width: 370px;"> |
| | | <el-form-item label="所属年度账号" prop="accountCompanyId"> |
| | | <el-select v-model="generateForm.accountCompanyId" filterable clearable placeholder="请选择" style="width: 370px;"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | v-for="item in accountCompanyList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :label="item.accountName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | |
| | | import crudOperation from '@crud/CRUD.operation' |
| | | import udOperation from '@crud/UD.operation' |
| | | import pagination from '@crud/Pagination' |
| | | import crudSysCompany from '@/api/system/sysCompany' |
| | | import crudCapitalAccountCompany from '@/api/capital/accountCompany' |
| | | |
| | | const defaultForm = { id: null, flowYearMonth: null, companyId: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | const defaultForm = { id: null, flowYearMonth: null, accountCompanyId: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | export default { |
| | | name: 'CapitalFlow', |
| | | components: { pagination, crudOperation, rrOperation, udOperation }, |
| | |
| | | flowYearMonth: [ |
| | | { required: true, message: '流水年月不能为空', trigger: 'change' } |
| | | ], |
| | | companyId: [ |
| | | accountCompanyId: [ |
| | | { required: true, message: '所属公司不能为空', trigger: 'change' } |
| | | ] |
| | | }, |
| | | queryTypeOptions: [ |
| | | { key: 'flowYearMonth', display_name: '流水年月' }, |
| | | { key: 'companyId', display_name: '所属公司' } |
| | | { key: 'accountCompanyId', display_name: '所属公司' } |
| | | ], |
| | | // 公司列表 |
| | | companyList: [], |
| | | // 年度账号列表 |
| | | accountCompanyList: [], |
| | | // 生成表单状态 |
| | | generateStatus: false, |
| | | // 生成表单加载 |
| | | generateLoading: false, |
| | | // 生成表单数据 |
| | | generateForm: { flowYearMonth: null, companyId: null }, |
| | | generateForm: { flowYearMonth: null, accountCompanyId: null }, |
| | | // 生成表单验证 |
| | | generateRules: { |
| | | flowYearMonth: [ |
| | |
| | | methods: { |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | | [CRUD.HOOK.beforeRefresh]() { |
| | | // 获取公司数据 |
| | | this.getCompanyList() |
| | | // 获取年度账号数据 |
| | | this.getAccountCompanyList() |
| | | return true |
| | | }, |
| | | // 获取公司数据 |
| | | getCompanyList() { |
| | | // 获取公司数据 |
| | | crudSysCompany.getAll().then(res => { |
| | | // 公司列表 |
| | | this.companyList = res |
| | | // 获取年度账号数据 |
| | | getAccountCompanyList() { |
| | | // 获取年度账号数据 |
| | | crudCapitalAccountCompany.getAll().then(res => { |
| | | // 年度账号列表 |
| | | this.accountCompanyList = res |
| | | }) |
| | | }, |
| | | // 生成表单打开 |