fix:所有采购合同号改为采购单号。销售合同号改为销售单号。
| | |
| | | // 采购-来票登记接口 |
| | | import request from "@/utils/request"; |
| | | |
| | | // 查询采购合同号 |
| | | // 查询采购单号 |
| | | export function getProduct(query) { |
| | | return request({ |
| | | url: "/purchase/ledger/getProduct", |
| | |
| | | }); |
| | | } |
| | | |
| | | // 查询id采购合同号 |
| | | // 查询id采购单号 |
| | | export function getPurchaseNoById(query) { |
| | | return request({ |
| | | url: "/purchase/ledger/getPurchaseNoById", |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | // 根据采购合同号查询详细信息 |
| | | // 根据采购单号查询详细信息 |
| | | export function getInfo(query) { |
| | | return request({ |
| | | url: "/purchase/ledger/getInfo", |
| | |
| | | method: "get", |
| | | }); |
| | | } |
| | | // 根据采购合同号查询详情 |
| | | // 根据采购单号查询详情 |
| | | export function byPurchaseId(query) { |
| | | return request({ |
| | | url: "/purchase/paymentRegistration/byPurchaseId/" + query, |
| | | method: "get", |
| | | }); |
| | | } |
| | | // 查询采购合同号 |
| | | // 查询采购单号 |
| | | export function getPurchaseNo() { |
| | | return request({ |
| | | url: "/purchase/ledger/getPurchaseNo", |
| | |
| | | }); |
| | | } |
| | | |
| | | // 根据销售合同号查产品信息 |
| | | // 根据销售单号查产品信息 |
| | | export function getProductInfoByContractNo(query) { |
| | | return request({ |
| | | url: "/purchase/ledger/getProductBySalesNo", |
| | |
| | | </el-row> |
| | | <el-row v-if="!isQuotationApproval && !isPurchaseApproval"> |
| | | <el-col :span="24"> |
| | | <el-form-item :label="props.approveType == 5 ? '采购合同号:' : '审批事由:'" prop="approveReason"> |
| | | <el-form-item :label="props.approveType == 5 ? '采购单号:' : '审批事由:'" prop="approveReason"> |
| | | <el-input v-model="form.approveReason" placeholder="请输入" clearable type="textarea" disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-empty v-if="!currentPurchase || !currentPurchase.purchaseContractNumber" description="未查询到对应采购详情" /> |
| | | <template v-else> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="采购合同号">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item> |
| | | <el-descriptions-item label="采购单号">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item> |
| | | <el-descriptions-item label="供应商名称">{{ currentPurchase.supplierName }}</el-descriptions-item> |
| | | <el-descriptions-item label="项目名称">{{ currentPurchase.projectName }}</el-descriptions-item> |
| | | <el-descriptions-item label="销售合同号">{{ currentPurchase.salesContractNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="销售单号">{{ currentPurchase.salesContractNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="签订日期">{{ currentPurchase.executionDate }}</el-descriptions-item> |
| | | <el-descriptions-item label="录入日期">{{ currentPurchase.entryDate }}</el-descriptions-item> |
| | | <el-descriptions-item label="付款方式">{{ currentPurchase.paymentMethod }}</el-descriptions-item> |
| | |
| | | } |
| | | } |
| | | |
| | | // 采购审批:用审批事由字段承载的"采购合同号"去查采购详情 |
| | | // 采购审批:用审批事由字段承载的"采购单号"去查采购详情 |
| | | if (isPurchaseApproval.value) { |
| | | const purchaseContractNumber = row?.approveReason; |
| | | if (purchaseContractNumber) { |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item :label="props.approveType == 5 ? '采购合同号:' : '审批事由:'" prop="approveReason"> |
| | | <el-form-item :label="props.approveType == 5 ? '采购单号:' : '审批事由:'" prop="approveReason"> |
| | | <el-input v-model="form.approveReason" placeholder="请输入" clearable type="textarea" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: isQuotationType ? "报价单号" : isPurchaseType ? "采购合同号" : "审批事由", |
| | | label: isQuotationType ? "报价单号" : isPurchaseType ? "采购单号" : "审批事由", |
| | | prop: "approveReason", |
| | | }, |
| | | { |
| | |
| | | <el-input v-model="searchForm.supplierName" placeholder="请输入" clearable prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="采购合同号:"> |
| | | <el-form-item label="采购单号:"> |
| | | <el-input |
| | | v-model="searchForm.purchaseContractNumber" |
| | | style="width: 240px" |
| | |
| | | :prefix-icon="Search" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="销售合同号:"> |
| | | <el-form-item label="销售单号:"> |
| | | <el-input v-model="searchForm.salesContractNo" placeholder="请输入" clearable prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column |
| | | label="采购合同号" |
| | | label="采购单号" |
| | | prop="purchaseContractNumber" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | label="销售单号" |
| | | prop="salesContractNo" |
| | | width="200" |
| | | show-overflow-tooltip |
| | |
| | | }; |
| | | // 审批通过方法 |
| | | const approvePurchase = (row) => { |
| | | ElMessageBox.confirm(`确认通过采购合同号为 ${row.purchaseContractNumber} 的审批?`, '审批确认', { |
| | | ElMessageBox.confirm(`确认通过采购单号为 ${row.purchaseContractNumber} 的审批?`, '审批确认', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | |
| | | |
| | | // 审批拒绝方法 |
| | | const rejectPurchase = (row) => { |
| | | ElMessageBox.confirm(`确认拒绝采购合同号为 ${row.purchaseContractNumber} 的审批?`, '审批确认', { |
| | | ElMessageBox.confirm(`确认拒绝采购单号为 ${row.purchaseContractNumber} 的审批?`, '审批确认', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | |
| | | // 显示二维码 |
| | | const showQRCode = async (row) => { |
| | | try { |
| | | // 构建二维码内容,只包含采购合同号(纯文本) |
| | | // 构建二维码内容,只包含采购单号(纯文本) |
| | | const qrContent = row.purchaseContractNumber || ''; |
| | | // 检查内容是否为空 |
| | | if (!qrContent || qrContent.trim() === '') { |
| | | proxy.$modal.msgWarning("该行没有采购合同号,无法生成二维码"); |
| | | proxy.$modal.msgWarning("该行没有采购单号,无法生成二维码"); |
| | | return; |
| | | } |
| | | qrCodeUrl.value = await QRCode.toDataURL(qrContent, { |
| | |
| | | |
| | | const a = document.createElement('a'); |
| | | a.href = qrCodeUrl.value; |
| | | a.download = `采购合同号二维码_${new Date().getTime()}.png`; |
| | | a.download = `采购单号二维码_${new Date().getTime()}.png`; |
| | | document.body.appendChild(a); |
| | | a.click(); |
| | | document.body.removeChild(a); |
| | |
| | | scanRemark: "", |
| | | }); |
| | | const scanAddRules = { |
| | | purchaseContractNumber: [{ required: true, message: "请输入采购合同号", trigger: "blur" }], |
| | | purchaseContractNumber: [{ required: true, message: "请输入采购单号", trigger: "blur" }], |
| | | supplierName: [{ required: true, message: "请输入供应商名称", trigger: "blur" }], |
| | | projectName: [{ required: true, message: "请输入项目名称", trigger: "blur" }], |
| | | }; |
| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">销售合同号:</span> |
| | | <span class="search_title">销售单号:</span> |
| | | <el-input |
| | | v-model="searchForm.salesContractNo" |
| | | style="width: 240px" |
| | | placeholder="请输入销售合同号搜索" |
| | | placeholder="请输入销售单号搜索" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width: 170 |
| | | }, |
| | |
| | | <el-table-column prop="customerName" label="客户名称" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="productName" label="产品名称" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="specificationModel" label="规格型号" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="salesContractNo" label="销售合同号" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="salesContractNo" label="销售单号" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="shippingNo" label="发货单号" min-width="130" show-overflow-tooltip /> |
| | | <el-table-column prop="shippingDate" label="发货日期" width="110" align="center" /> |
| | | <el-table-column prop="outboundAmount" label="出库金额" width="110" align="right"> |
| | |
| | | min-width="140" |
| | | show-overflow-tooltip /> |
| | | <el-table-column prop="salesContractNo" |
| | | label="销售合同号" |
| | | label="销售单号" |
| | | min-width="140" |
| | | show-overflow-tooltip /> |
| | | <el-table-column prop="shippingNo" |
| | |
| | | > |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="采购合同号:" prop="purchaseLedgerNo"> |
| | | <el-form-item label="采购单号:" prop="purchaseLedgerNo"> |
| | | <el-input v-model="form.purchaseLedgerNo" disabled placeholder="多合同批量处理(具体合同号见产品列表)" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号:" prop="salesContractNo"> |
| | | <el-form-item label="销售单号:" prop="salesContractNo"> |
| | | <el-input |
| | | v-model="form.salesContractNo" |
| | | placeholder="自动填充" |
| | |
| | | const formRef = ref(); |
| | | const { proxy } = getCurrentInstance(); |
| | | const { form } = useFormData({ |
| | | purchaseLedgerNo: undefined, // 采购合同号 |
| | | salesContractNo: undefined, // 销售合同号 |
| | | purchaseLedgerNo: undefined, // 采购单号 |
| | | salesContractNo: undefined, // 销售单号 |
| | | supplierName: undefined, // 供应商名称 |
| | | projectName: undefined, // 项目名称 |
| | | invoiceNumber: undefined, // 发票号 |
| | |
| | | return; |
| | | } |
| | | |
| | | // 允许不同的采购合同号批量处理,无需检查重复 |
| | | // 允许不同的采购单号批量处理,无需检查重复 |
| | | |
| | | // 清空表单数据 |
| | | Object.keys(form).forEach(key => { |
| | |
| | | allProductData.push({ |
| | | ...item, |
| | | purchaseLedgerId: contractId, // 添加合同ID用于筛选 |
| | | purchaseLedgerNo: contract.purchaseContractNumber, // 添加采购合同号 |
| | | purchaseLedgerNo: contract.purchaseContractNumber, // 添加采购单号 |
| | | supplierName: contract.supplierName, // 添加供应商名称 |
| | | projectName: contract.projectName // 添加项目名称 |
| | | // 保留产品本身的id,不覆盖 |
| | |
| | | } |
| | | }); |
| | | |
| | | // 设置表单数据(使用第一个合同的基本信息,采购合同号留空) |
| | | form.purchaseLedgerNo = ""; // 采购合同号留空,因为会在产品表格中分别显示 |
| | | // 设置表单数据(使用第一个合同的基本信息,采购单号留空) |
| | | form.purchaseLedgerNo = ""; // 采购单号留空,因为会在产品表格中分别显示 |
| | | form.invoiceNumber = ""; |
| | | form.entryDate = dayjs().format("YYYY-MM-DD"); |
| | | form.enterDate = dayjs().format("YYYY-MM-DD"); |
| | |
| | | |
| | | // 合同实际信息 |
| | | purchaseLedgerId: contract.id, // 使用id作为字段名,值为purchaseLedgerId |
| | | purchaseContractNumber: contract.purchaseContractNumber, // 使用实际的采购合同号 |
| | | salesContractNo: contract.salesContractNo, // 使用实际的销售合同号 |
| | | purchaseContractNumber: contract.purchaseContractNumber, // 使用实际的采购单号 |
| | | salesContractNo: contract.salesContractNo, // 使用实际的销售单号 |
| | | supplierName: contract.supplierName, // 使用实际的供应商名称 |
| | | projectName: contract.projectName, // 使用实际的项目名称 |
| | | |
| | |
| | | |
| | | // 合同实际信息 |
| | | purchaseLedgerId: singleContract.id, // 使用id作为字段名,值为purchaseLedgerId |
| | | purchaseContractNumber: singleContract.purchaseContractNumber, // 使用实际的采购合同号 |
| | | salesContractNo: singleContract.salesContractNo, // 使用实际的销售合同号 |
| | | purchaseContractNumber: singleContract.purchaseContractNumber, // 使用实际的采购单号 |
| | | salesContractNo: singleContract.salesContractNo, // 使用实际的销售单号 |
| | | supplierName: singleContract.supplierName, // 使用实际的供应商名称 |
| | | projectName: singleContract.projectName, // 使用实际的项目名称 |
| | | |
| | |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="销售合同号"> |
| | | <el-form-item label="销售单号"> |
| | | <el-input |
| | | v-model="filters.salesContractNo" |
| | | placeholder="请输入销售合同号" |
| | | placeholder="请输入销售单号" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width:150 |
| | | }, |
| | |
| | | size="small" |
| | | > |
| | | <el-table-column type="index" label="序号" width="50" align="center"/> |
| | | <el-table-column label="采购合同号" prop="purchaseContractNumber" show-overflow-tooltip /> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip /> |
| | | <el-table-column label="采购单号" prop="purchaseContractNumber" show-overflow-tooltip /> |
| | | <el-table-column label="销售单号" prop="salesContractNo" show-overflow-tooltip /> |
| | | <el-table-column label="供应商名称" prop="supplierName" show-overflow-tooltip /> |
| | | <el-table-column |
| | | label="产品大类" |
| | |
| | | slot: "expand", |
| | | }, |
| | | { |
| | | label: "采购合同号", |
| | | label: "采购单号", |
| | | prop: "purchaseContractNumber", |
| | | width:160 |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width:160 |
| | | }, |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="采购合同号"> |
| | | <el-form-item label="采购单号"> |
| | | <el-input |
| | | v-model="searchForm.purchaseContractNumber" |
| | | style="width: 240px" |
| | | placeholder="输入采购合同号搜索" |
| | | placeholder="输入采购单号搜索" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | |
| | | const isShowSummarySon = ref(true); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "采购合同号", |
| | | label: "采购单号", |
| | | prop: "purchaseContractNumber", |
| | | }, |
| | | { |
| | |
| | | width: 110, |
| | | }, |
| | | { |
| | | label: "采购合同号", |
| | | label: "采购单号", |
| | | prop: "purchaseContractNumber", |
| | | width: 150, |
| | | }, |
| | |
| | | <el-form :model="form"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="采购合同号:"> |
| | | <el-form-item label="采购单号:"> |
| | | <el-tag size="large">{{ form.purchaseContractNumber }}</el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号:"> |
| | | <el-form-item label="销售单号:"> |
| | | <el-text>{{ form.salesContractNo }}</el-text> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | const { form, resetForm } = useFormData({ |
| | | id: undefined, |
| | | purchaseContractNumber: undefined, // 采购合同号 |
| | | salesContractNo: undefined, // 销售合同号 |
| | | purchaseContractNumber: undefined, // 采购单号 |
| | | salesContractNo: undefined, // 销售单号 |
| | | createdAt: undefined, // 创建时间 |
| | | invoiceNumber: undefined, // 发票号 |
| | | ticketsNum: undefined, // 来票数 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="filters" :inline="true"> |
| | | <el-form-item label="采购合同号"> |
| | | <el-form-item label="采购单号"> |
| | | <el-input |
| | | v-model="filters.purchaseContractNumber" |
| | | style="width: 240px" |
| | |
| | | } = usePaginationApi( |
| | | productRecordPage, |
| | | { |
| | | purchaseContractNumber: undefined, // 采购合同号 |
| | | purchaseContractNumber: undefined, // 采购单号 |
| | | supplierName: undefined, // 供应商 |
| | | createdAt: [], // 来票日期 |
| | | }, |
| | | [ |
| | | { |
| | | label: "采购合同号", |
| | | label: "采购单号", |
| | | prop: "purchaseContractNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width: 150, |
| | | }, |
| | |
| | | form.value.entryDate = getCurrentDate(); |
| | | |
| | | if (type === "add") { |
| | | // 新增时生成采购合同号 |
| | | // 新增时生成采购单号 |
| | | try { |
| | | const purchaseNoRes = await createPurchaseNo(); |
| | | if (purchaseNoRes?.data) { |
| | | form.value.purchaseContractNumber = purchaseNoRes.data; |
| | | } |
| | | } catch (error) { |
| | | console.error("生成采购合同号失败:", error); |
| | | proxy.$modal.msgWarning("生成采购合同号失败"); |
| | | console.error("生成采购单号失败:", error); |
| | | proxy.$modal.msgWarning("生成采购单号失败"); |
| | | } |
| | | } else if (type === "edit" && row?.id) { |
| | | // 编辑时加载数据 |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="采购合同号:" |
| | | label="采购单号:" |
| | | prop="purchaseLedgerId" |
| | | :rules="[ |
| | | { |
| | | required: true, |
| | | message: '请选择采购合同号', |
| | | message: '请选择采购单号', |
| | | trigger: 'change', |
| | | } |
| | | ]" |
| | |
| | | <div class="app-container"> |
| | | <!-- 搜索过滤区 --> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="采购合同号"> |
| | | <el-form-item label="采购单号"> |
| | | <el-input v-model="searchForm.purchaseContractNumber" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="供应商"> |
| | |
| | | <el-table :data="orderList" border v-loading="loading" height="calc(100vh - 12em)"> |
| | | <!-- 添加序号列 --> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column prop="purchaseContractNumber" label="采购合同号" show-overflow-tooltip /> |
| | | <el-table-column prop="purchaseContractNumber" label="采购单号" show-overflow-tooltip /> |
| | | <el-table-column prop="supplierName" label="供应商" show-overflow-tooltip /> |
| | | <el-table-column label="付款状态"> |
| | | <template #default="scope"> |
| | |
| | | <!-- 确认收货对话框 --> |
| | | <FormDialog v-model="receiptDialogVisible" title="确认收货" :width="'70%'" @close="receiptDialogVisible = false" @confirm="submitReceipt" @cancel="receiptDialogVisible = false"> |
| | | <el-form :model="receiptForm" label-width="120px" ref="formRef"> |
| | | <el-form-item label="采购合同号"> |
| | | <el-form-item label="采购单号"> |
| | | <el-input v-model="receiptForm.purchaseContractNumber" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="异常原因"> |
| | |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width: '150px', |
| | | }, |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width: 120, |
| | | }, |
| | |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="序号" type="index" width="55" align="center" /> |
| | | <el-table-column label="销售合同号" prop="contractNo" width="160" /> |
| | | <el-table-column label="销售单号" prop="contractNo" width="160" /> |
| | | <el-table-column label="产品编号" prop="productCode" width="140" /> |
| | | <el-table-column label="产品型号" prop="productModel" width="140" /> |
| | | <el-table-column label="客户名称" prop="customerName" width="160" /> |
| | |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号" prop="contractNo"> |
| | | <el-form-item label="销售单号" prop="contractNo"> |
| | | <el-input |
| | | v-model="form.contractNo" |
| | | placeholder="请选择关联销售合同号" |
| | | placeholder="请选择关联销售单号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | }, |
| | | rules: { |
| | | contractNo: [ |
| | | { required: true, message: "销售合同号不能为空", trigger: "blur" }, |
| | | { required: true, message: "销售单号不能为空", trigger: "blur" }, |
| | | ], |
| | | productCode: [ |
| | | { required: true, message: "产品编号不能为空", trigger: "blur" }, |
| | |
| | | }, |
| | | [ |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | align: "center", |
| | | prop: "customerContractNo", |
| | | }, |
| | |
| | | </el-row> |
| | | <el-row v-if="!isQuotationApproval && !isPurchaseApproval"> |
| | | <el-col :span="24"> |
| | | <el-form-item :label="props.approveType == 5 ? '采购合同号:' : '审批事由:'" |
| | | <el-form-item :label="props.approveType == 5 ? '采购单号:' : '审批事由:'" |
| | | prop="approveReason"> |
| | | <el-input v-model="form.approveReason" |
| | | placeholder="请输入" |
| | |
| | | <template v-else> |
| | | <el-descriptions :column="2" |
| | | border> |
| | | <el-descriptions-item label="采购合同号">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item> |
| | | <el-descriptions-item label="采购单号">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item> |
| | | <el-descriptions-item label="供应商名称">{{ currentPurchase.supplierName }}</el-descriptions-item> |
| | | <el-descriptions-item label="项目名称">{{ currentPurchase.projectName }}</el-descriptions-item> |
| | | <el-descriptions-item label="销售合同号">{{ currentPurchase.salesContractNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="销售单号">{{ currentPurchase.salesContractNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="签订日期">{{ currentPurchase.executionDate }}</el-descriptions-item> |
| | | <el-descriptions-item label="录入日期">{{ currentPurchase.entryDate }}</el-descriptions-item> |
| | | <el-descriptions-item label="付款方式">{{ currentPurchase.paymentMethod }}</el-descriptions-item> |
| | |
| | | } |
| | | } |
| | | |
| | | // 采购审批:用审批事由字段承载的"采购合同号"去查采购详情 |
| | | // 采购审批:用审批事由字段承载的"采购单号"去查采购详情 |
| | | if (isPurchaseApproval.value) { |
| | | const purchaseContractNumber = row?.approveReason; |
| | | if (purchaseContractNumber) { |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item :label="props.approveType == 5 ? '采购合同号:' : '审批事由:'" |
| | | <el-form-item :label="props.approveType == 5 ? '采购单号:' : '审批事由:'" |
| | | prop="approveReason"> |
| | | <el-input v-model="form.approveReason" |
| | | placeholder="请输入" |
| | |
| | | <div class="search_form"> |
| | | <el-form :inline="true" :model="searchForm"> |
| | | <el-form-item label="客户名称/合同号"> |
| | | <el-input v-model="searchForm.searchText" style="width: 240px" placeholder="输入客户名称/销售合同号搜索" |
| | | <el-input v-model="searchForm.searchText" style="width: 240px" placeholder="输入客户名称/销售单号搜索" |
| | | @change="handleQuery" clearable :prefix-icon="Search" /> |
| | | </el-form-item> |
| | | <el-form-item label="开票日期"> |
| | |
| | | :row-key="(row) => row.id" show-summary :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)"> |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip width="180" /> |
| | | <el-table-column label="销售单号" prop="salesContractNo" show-overflow-tooltip width="180" /> |
| | | <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip width="240" /> |
| | | <el-table-column label="产品大类" prop="productCategory" width="200" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" width="160" show-overflow-tooltip /> |
| | |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号:" prop="salesContractNo"> |
| | | <el-form-item label="销售单号:" prop="salesContractNo"> |
| | | <el-input v-model="form.salesContractNo" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | label="销售单号" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | /> |
| | |
| | | > |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号:" prop="salesContractNo"> |
| | | <el-form-item label="销售单号:" prop="salesContractNo"> |
| | | <el-input v-model="form.salesContractNo" disabled placeholder="多合同批量处理(具体合同号见产品列表)"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | return; |
| | | } |
| | | |
| | | // 允许不同的销售合同号批量处理,无需检查重复 |
| | | // 允许不同的销售单号批量处理,无需检查重复 |
| | | |
| | | form.value = {}; |
| | | productData.value = []; |
| | |
| | | allProductData.push({ |
| | | ...item, |
| | | // id: contractId, // 明确设置合同ID |
| | | salesContractNo: contract.salesContractNo, // 添加销售合同号 |
| | | salesContractNo: contract.salesContractNo, // 添加销售单号 |
| | | customerName: contract.customerName, // 添加客户名称 |
| | | customerContractNo: contract.customerContractNo // 添加客户合同号 |
| | | }); |
| | |
| | | } |
| | | }); |
| | | |
| | | // 设置表单数据(使用第一个合同的基本信息,销售合同号留空) |
| | | // 设置表单数据(使用第一个合同的基本信息,销售单号留空) |
| | | form.value = { ...results[0] }; |
| | | form.value.createTime = dayjs().format("YYYY-MM-DD"); |
| | | form.value.issueDate = dayjs().format("YYYY-MM-DD"); |
| | | form.value.createUer = userStore.nickName; |
| | | form.value.selectedContractIds = selectedRows.value.map(row => row.id); // 存储所有选中的合同ID |
| | | form.value.salesContractNo = ""; // 销售合同号留空,因为会在产品表格中分别显示 |
| | | form.value.salesContractNo = ""; // 销售单号留空,因为会在产品表格中分别显示 |
| | | |
| | | productData.value = allProductData; |
| | | |
| | |
| | | item.salesLedgerId === contract.id |
| | | ); |
| | | |
| | | // 为每个销售合同号创建独立的对象 |
| | | // 为每个销售单号创建独立的对象 |
| | | return { |
| | | // 基础表单数据 |
| | | issueDate: form.value.issueDate, |
| | |
| | | |
| | | // 合同实际信息 |
| | | id: contract.id, // 使用id作为字段名,值为salesLedgerId |
| | | salesContractNo: contract.salesContractNo, // 使用实际的销售合同号 |
| | | salesContractNo: contract.salesContractNo, // 使用实际的销售单号 |
| | | customerName: contract.customerName, // 使用实际的客户名称 |
| | | customerId: contract.customerId, // 添加客户ID |
| | | customerContractNo: contract.customerContractNo, // 使用实际的客户合同号 |
| | |
| | | |
| | | // 合同实际信息 |
| | | id: singleContract.id, // 使用id作为字段名,值为salesLedgerId |
| | | salesContractNo: singleContract.salesContractNo, // 使用实际的销售合同号 |
| | | salesContractNo: singleContract.salesContractNo, // 使用实际的销售单号 |
| | | customerName: singleContract.customerName, // 使用实际的客户名称 |
| | | customerId: singleContract.customerId, // 添加客户ID |
| | | customerContractNo: singleContract.customerContractNo, // 使用实际的客户合同号 |
| | |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | label="销售单号" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | width="240" |
| | |
| | | size="small" |
| | | > |
| | | <el-table-column type="index" label="序号" width="50" align="center"/> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip /> |
| | | <el-table-column label="销售单号" prop="salesContractNo" show-overflow-tooltip /> |
| | | <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip /> |
| | | <el-table-column |
| | | label="产品大类" |
| | |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "销售合同号", |
| | | label: "销售单号", |
| | | prop: "salesContractNo", |
| | | width:240 |
| | | }, |
| | |
| | | <el-input v-model="searchForm.customerName" placeholder="请输入" clearable prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="销售合同号:"> |
| | | <el-form-item label="销售单号:"> |
| | | <el-input v-model="searchForm.salesContractNo" placeholder="请输入" clearable prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="销售单号" prop="salesContractNo" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="客户名称" prop="customerName" width="300" show-overflow-tooltip /> |
| | | <el-table-column label="业务员" prop="salesman" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="项目名称" prop="projectName" width="180" show-overflow-tooltip /> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号:" prop="salesContractNo"> |
| | | <el-form-item label="销售单号:" prop="salesContractNo"> |
| | | <el-input v-model="form.salesContractNo" placeholder="自动生成" clearable disabled /> |
| | | </el-form-item> |
| | | </el-col> |