| | |
| | | <el-card class="box-card"> |
| | | <!-- 搜索区域 --> |
| | | <el-row :gutter="20" class="search-row"> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <el-input |
| | | v-model="searchForm.quotationNo" |
| | | placeholder="请输入报价单号" |
| | |
| | | </template> |
| | | </el-input> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <el-select v-model="searchForm.customerId" placeholder="请选择客户" clearable> |
| | | <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"> |
| | | {{ |
| | |
| | | <!-- <el-option label="已过期" value="已过期"></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <el-select v-model="searchForm.projectId" placeholder="请选择项目名称" clearable filterable> |
| | | <el-option v-for="item in projectOptions" :key="item.id" :label="item.no + ' - ' + item.title" :value="item.id" /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-button type="primary" @click="handleSearch">搜索</el-button> |
| | | <el-button @click="resetSearch">重置</el-button> |
| | | <el-button style="float: right;" type="primary" @click="handleAdd"> |
| | |
| | | > |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column prop="quotationNo" label="报价单号" /> |
| | | <el-table-column prop="projectName" label="项目名称" /> |
| | | <el-table-column prop="customer" label="客户名称" /> |
| | | <el-table-column prop="salesperson" label="业务员" width="100" /> |
| | | <el-table-column prop="quotationDate" label="报价日期" width="120" /> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式" prop="paymentMethod"> |
| | | <el-input v-model="form.paymentMethod" placeholder="请输入付款方式" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目名称" prop="projectId"> |
| | | <el-select v-model="form.projectId" placeholder="请选择项目名称" style="width: 100%" clearable filterable> |
| | | <el-option v-for="item in projectOptions" :key="item.id" :label="item.no + ' - ' + item.title" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-dialog v-model="viewDialogVisible" title="报价详情" width="800px"> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="报价单号">{{ currentQuotation.quotationNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="项目名称">{{ currentQuotation.projectName }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{ currentQuotation.customer }}</el-descriptions-item> |
| | | <el-descriptions-item label="业务员">{{ currentQuotation.salesperson }}</el-descriptions-item> |
| | | <el-descriptions-item label="报价日期">{{ currentQuotation.quotationDate }}</el-descriptions-item> |
| | |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import {listCustomer} from "@/api/basicData/customer.js"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import { listProject } from "@/api/projectManagement/project.js"; |
| | | |
| | | // 响应式数据 |
| | | const loading = ref(false) |
| | | const searchForm = reactive({ |
| | | quotationNo: '', |
| | | customerId: '', |
| | | status: '' |
| | | status: '', |
| | | projectId: undefined |
| | | }) |
| | | |
| | | const quotationList = ref([]) |
| | | const userList = ref([]) |
| | | const productOptions = ref([]); |
| | | const modelOptions = ref([]); |
| | | const projectOptions = ref([]); |
| | | const pagination = reactive({ |
| | | total: 3, |
| | | currentPage: 1, |
| | |
| | | const form = reactive({ |
| | | quotationNo: '', |
| | | customerId: undefined, |
| | | projectId: undefined, |
| | | customer: '', |
| | | salesperson: '', |
| | | quotationDate: '', |
| | |
| | | searchForm.quotationNo = '' |
| | | searchForm.customer = '' |
| | | searchForm.status = '' |
| | | searchForm.projectId = undefined |
| | | // 重置到第一页并重新查询 |
| | | pagination.currentPage = 1 |
| | | handleSearch() |
| | |
| | | resetForm() |
| | | dialogVisible.value = true |
| | | getProductOptions(); |
| | | fetchCustomerOptions() |
| | | fetchCustomerOptions(); |
| | | fetchProjectOptions(); |
| | | } |
| | | |
| | | const fetchProjectOptions = () => { |
| | | if (projectOptions.value.length > 0) return |
| | | listProject({current: -1,size:-1}).then((res) => { |
| | | projectOptions.value = res.data.records; |
| | | }); |
| | | } |
| | | |
| | | const fetchCustomerOptions = () => { |
| | |
| | | unitPrice: product.unitPrice || 0, |
| | | amount: product.amount || 0 |
| | | })) : [], |
| | | totalAmount: row.totalAmount || 0 |
| | | totalAmount: row.totalAmount || 0, |
| | | projectName: row.projectName || '' |
| | | } |
| | | viewDialogVisible.value = true |
| | | } |
| | |
| | | // 先加载产品树数据,否则 el-tree-select 无法反显产品名称 |
| | | await getProductOptions() |
| | | await fetchCustomerOptions() |
| | | await fetchProjectOptions() |
| | | |
| | | // 只复制需要的字段,避免将组件引用放入响应式对象 |
| | | form.quotationNo = row.quotationNo || '' |
| | | form.customer = row.customer || '' |
| | | form.customerId = row.customerId || undefined |
| | | form.projectId = row.projectId || undefined |
| | | form.salesperson = row.salesperson || '' |
| | | form.quotationDate = row.quotationDate || '' |
| | | form.validDate = row.validDate || '' |
| | |
| | | |
| | | const resetForm = () => { |
| | | form.customer = '' |
| | | form.customerId = undefined |
| | | form.projectId = undefined |
| | | form.salesperson = '' |
| | | form.quotationDate = '' |
| | | form.validDate = '' |
| | |
| | | getUserList() |
| | | handleSearch() |
| | | fetchCustomerOptions() |
| | | fetchProjectOptions() |
| | | }) |
| | | </script> |
| | | |