| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">客户名称:</span> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | | style="width: 150px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <span class="search_title ml-10">客户合同号:</span> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input |
| | | v-model="searchForm.customerContractNo" |
| | | style="width: 150px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | @change="handleQuery" |
| | | /> |
| | | <span class="search_title ml-10">销售合同号:</span> |
| | | </el-form-item> |
| | | <el-form-item label="客户合同号:"> |
| | | <el-input |
| | | v-model="searchForm.customerContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="销售合同号:"> |
| | | <el-input |
| | | v-model="searchForm.salesContractNo" |
| | | style="width: 150px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | @change="handleQuery" |
| | | /> |
| | | <span class="search_title ml-10">项目名称:</span> |
| | | </el-form-item> |
| | | <el-form-item label="项目名称:"> |
| | | <el-input |
| | | v-model="searchForm.projectName" |
| | | style="width: 150px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | @change="handleQuery" |
| | | /> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px" |
| | | > |
| | | 搜索 |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item label="录入日期:"> |
| | | <el-date-picker |
| | | v-model="searchForm.entryDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> 搜索 </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <div class="actions"> |
| | | <div></div> |
| | | <div> |
| | | <el-button type="primary" @click="openForm('add')">新增台账</el-button> |
| | | <el-button type="primary" @click="openForm('add')"> |
| | | 新增台账 |
| | | </el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | |
| | | delLedgerFile, |
| | | } from "@/api/salesManagement/salesLedger.js"; |
| | | import { modelList, productTreeList } from "@/api/basicData/product.js"; |
| | | import useFormData from "@/hooks/useFormData.js"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const userStore = useUserStore(); |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | |
| | | customerContractNo: "", // 客户合同编号 |
| | | salesContractNo: "", // 销售合同编号 |
| | | projectName: "", // 项目名称 |
| | | entryDate: dayjs().format("YYYY-MM-DD"), // 录入日期 |
| | | }, |
| | | form: { |
| | | salesContractNo: "", |
| | |
| | | executionDate: [{ required: true, message: "请选择", trigger: "change" }], |
| | | }, |
| | | }); |
| | | const { searchForm, form, rules } = toRefs(data); |
| | | const { form, rules } = toRefs(data); |
| | | const { form: searchForm } = useFormData(data.searchForm); |
| | | // 产品表单弹框数据 |
| | | const productFormVisible = ref(false); |
| | | const productOperationType = ref(""); |
| | |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | ledgerListPage({ ...searchForm.value, ...page }) |
| | | ledgerListPage({ ...searchForm, ...page }) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | |
| | | // 上传前校检 |
| | | function handleBeforeUpload(file) { |
| | | // 校检文件大小 |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | proxy.$modal.msgError("上传文件大小不能超过10MB!"); |
| | | return false; |
| | | } |
| | | // if (file.size > 1024 * 1024 * 10) { |
| | | // proxy.$modal.msgError("上传文件大小不能超过10MB!"); |
| | | // return false; |
| | | // } |
| | | proxy.$modal.loading("正在上传文件,请稍候..."); |
| | | return true; |
| | | } |
| | |
| | | .ml-10 { |
| | | margin-left: 10px; |
| | | } |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | .actions { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |