| | |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-table :data="tableData" border :preserve-expanded-content="preserveExpanded" v-loading="tableLoading" |
| | | @selection-change="handleSelectionChange" :toggleRowExpansion="toggleRowExpansion" |
| | | :header-cell-style="{ background: '#F0F1F5', color: '#333333' }" height="calc(100vh - 18.5em)"> |
| | | @selection-change="handleSelectionChange" @expand-change="expandChange" |
| | | height="calc(100vh - 18.5em)"> |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column type="expand"> |
| | | <template #default="props"> |
| | | <el-table :data="props.row.children" border> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip/> |
| | | <el-table-column label="客户合同号" prop="customerContractNo" show-overflow-tooltip/> |
| | | <el-table-column label="客户名称" prop="customerName" /> |
| | | <el-table-column label="业务员" prop="salesman" /> |
| | | <el-table-column label="项目名称" prop="projectName" /> |
| | | <el-table-column label="录入人" prop="entryPerson" /> |
| | | <el-table-column label="录入日期" prop="entryDate" /> |
| | | <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip/> |
| | | <el-table-column label="业务员" prop="salesman" show-overflow-tooltip/> |
| | | <el-table-column label="项目名称" prop="projectName" show-overflow-tooltip/> |
| | | <el-table-column label="录入人" prop="entryPerson" show-overflow-tooltip/> |
| | | <el-table-column label="录入日期" prop="entryDate" show-overflow-tooltip/> |
| | | <el-table-column fixed="right" label="操作" min-width="60" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row);">编辑</el-button> |
| | |
| | | import {addCustomer, delCustomer, getCustomer, listCustomer, updateCustomer} from "@/api/basicData/customerFile.js"; |
| | | import {ElMessageBox } from "element-plus"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | | import {customerList} from "@/api/salesManagement/salesLedger.js"; |
| | | import {ledgerList} from "@/api/salesManagement/salesLedger.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const preserveExpanded = ref(false) |
| | | const tableData = ref([]) |
| | |
| | | } |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | customerList({...searchForm.value, ...page}).then(res => { |
| | | ledgerList({...searchForm.value, ...page}).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.rows |
| | | total.value = res.total |
| | |
| | | selectedRows.value = selection |
| | | } |
| | | // 展开行 |
| | | const toggleRowExpansion = (row, expanded) => { |
| | | console.log('row', row) |
| | | console.log('expanded', expanded) |
| | | const expandChange = (row, expandedRows) => { |
| | | const isExpanded = expandedRows.includes(row.id); |
| | | if (isExpanded) { |
| | | console.log('该行已展开'); |
| | | // 可以在这里进行懒加载或其他操作 |
| | | } else { |
| | | console.log('该行已收起'); |
| | | } |
| | | } |
| | | // 打开弹框 |
| | | const openForm = (type, row) => { |