| | |
| | | "logo": "logo/SDTXLogo.png", |
| | | "favicon": "favicon/SDTXfavicon.ico" |
| | | }, |
| | | "QXY": { |
| | | "env": { |
| | | "VITE_APP_TITLE": "强信宇电器管理系统", |
| | | "VITE_BASE_API": "http://36.134.154.10:9001", |
| | | "VITE_JAVA_API": "http://36.134.154.10:9000" |
| | | }, |
| | | "logo": "logo/QXYLogo.png", |
| | | "favicon": "favicon/QXYfavicon.ico" |
| | | }, |
| | | "XCDQ": { |
| | | "env": { |
| | | "VITE_APP_TITLE": "旭晨电器管理系统", |
| | | "VITE_BASE_API": "http://36.133.45.183:9001", |
| | | "VITE_JAVA_API": "http://36.133.45.183:9002" |
| | | }, |
| | | "logo": "logo/XCDQLogo.png", |
| | | "favicon": "favicon/XCDQfavicon.ico" |
| | | }, |
| | | "ZQSY": { |
| | | "env": { |
| | | "VITE_APP_TITLE": "泽淇实业", |
| | |
| | | }, |
| | | "QXY": { |
| | | "env": { |
| | | "VITE_APP_TITLE": "强信宇电器云主机", |
| | | "VITE_APP_TITLE": "强信宇", |
| | | "VITE_BASE_API": "http://36.134.154.10:9000", |
| | | "VITE_JAVA_API": "http://36.134.154.10:9001" |
| | | }, |
| | |
| | | ], |
| | | }, |
| | | // 财务管理模块路由 |
| | | // { |
| | | // path: "/financial", |
| | | // component: Layout, |
| | | // hidden: false, |
| | | // redirect: "/financial/general-ledger", |
| | | // alwaysShow: true, |
| | | // meta: { title: "财务管理", icon: "money" }, |
| | | // children: [ |
| | | // { |
| | | // path: "sales-out", |
| | | // component: () => import("@/views/financialManagement/receivable/salesOut.vue"), |
| | | // name: "SalesOut", |
| | | // meta: { title: "销售出库" }, |
| | | // }, |
| | | // { |
| | | // path: "sales-return", |
| | | // component: () => import("@/views/financialManagement/receivable/salesReturn.vue"), |
| | | // name: "SalesReturn", |
| | | // meta: { title: "销售退货" }, |
| | | // }, |
| | | // |
| | | // { |
| | | // path: "invoice-apply", |
| | | // component: () => import("@/views/financialManagement/receivable/invoiceApply.vue"), |
| | | // name: "InvoiceApply", |
| | | // meta: { title: "开票申请" }, |
| | | // }, |
| | | // { |
| | | // path: "output-invoice", |
| | | // component: () => import("@/views/financialManagement/receivable/outputInvoice.vue"), |
| | | // name: "OutputInvoice", |
| | | // meta: { title: "销项发票" }, |
| | | // }, |
| | | // { |
| | | // path: "receipt", |
| | | // component: () => import("@/views/financialManagement/receivable/receipt.vue"), |
| | | // name: "Receipt", |
| | | // meta: { title: "收款单" }, |
| | | // }, |
| | | // { |
| | | // path: "receivable-reconciliation", |
| | | // component: () => import("@/views/financialManagement/receivable/reconciliation.vue"), |
| | | // name: "ReceivableReconciliation", |
| | | // meta: { title: "应收对账" }, |
| | | // }, |
| | | // { |
| | | // path: "purchase-in", |
| | | // component: () => import("@/views/financialManagement/payable/purchaseIn.vue"), |
| | | // name: "PurchaseIn", |
| | | // meta: { title: "采购入库" }, |
| | | // }, |
| | | // { |
| | | // path: "purchase-return", |
| | | // component: () => import("@/views/financialManagement/payable/purchaseReturn.vue"), |
| | | // name: "PurchaseReturn", |
| | | // meta: { title: "采购退货" }, |
| | | // }, |
| | | // { |
| | | // path: "input-invoice", |
| | | // component: () => import("@/views/financialManagement/payable/input-invoice.vue"), |
| | | // name: "InputInvoice", |
| | | // meta: { title: "进项发票" }, |
| | | // }, |
| | | // { |
| | | // path: "payment-apply", |
| | | // component: () => import("@/views/financialManagement/payable/paymentApply.vue"), |
| | | // name: "PaymentApply", |
| | | // meta: { title: "付款申请" }, |
| | | // }, |
| | | // |
| | | // { |
| | | // path: "payment", |
| | | // component: () => import("@/views/financialManagement/payable/payment.vue"), |
| | | // name: "Payment", |
| | | // meta: { title: "付款单" }, |
| | | // }, |
| | | // { |
| | | // path: "payable-reconciliation", |
| | | // component: () => import("@/views/financialManagement/payable/reconciliation.vue"), |
| | | // name: "PayableReconciliation", |
| | | // meta: { title: "应付对账" }, |
| | | // }, |
| | | // { |
| | | // path: "fixed-assets", |
| | | // component: () => import("@/views/financialManagement/assets/fixedAssets.vue"), |
| | | // name: "FixedAssets", |
| | | // meta: { title: "固定资产" }, |
| | | // }, |
| | | // { |
| | | // path: "intangible-assets", |
| | | // component: () => import("@/views/financialManagement/assets/intangibleAssets.vue"), |
| | | // name: "IntangibleAssets", |
| | | // meta: { title: "无形资产" }, |
| | | // }, |
| | | // { |
| | | // path: "general-ledger", |
| | | // component: () => import("@/views/financialManagement/generalLedger/index.vue"), |
| | | // name: "GeneralLedger", |
| | | // meta: { title: "总帐科目" }, |
| | | // }, |
| | | // { |
| | | // path: "voucher", |
| | | // component: () => import("@/views/financialManagement/voucher/index.vue"), |
| | | // name: "Voucher", |
| | | // meta: { title: "凭证" }, |
| | | // }, |
| | | // { |
| | | // path: "voucher-general-ledger", |
| | | // component: () => import("@/views/financialManagement/voucher/generalLedger.vue"), |
| | | // name: "VoucherGeneralLedger", |
| | | // meta: { title: "科目总帐" }, |
| | | // }, |
| | | // { |
| | | // path: "voucher-detail-ledger", |
| | | // component: () => import("@/views/financialManagement/voucher/detailLedger.vue"), |
| | | // name: "VoucherDetailLedger", |
| | | // meta: { title: "科目明细帐" }, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | /*{ |
| | | path: "/financial", |
| | | component: Layout, |
| | | hidden: false, |
| | | redirect: "/financial/general-ledger", |
| | | alwaysShow: true, |
| | | meta: { title: "财务管理", icon: "money" }, |
| | | children: [ |
| | | { |
| | | path: "sales-out", |
| | | component: () => import("@/views/financialManagement/receivable/salesOut.vue"), |
| | | name: "SalesOut", |
| | | meta: { title: "销售出库" }, |
| | | }, |
| | | { |
| | | path: "sales-return", |
| | | component: () => import("@/views/financialManagement/receivable/salesReturn.vue"), |
| | | name: "SalesReturn", |
| | | meta: { title: "销售退货" }, |
| | | }, |
| | | |
| | | { |
| | | path: "invoice-apply", |
| | | component: () => import("@/views/financialManagement/receivable/invoiceApply.vue"), |
| | | name: "InvoiceApply", |
| | | meta: { title: "开票申请" }, |
| | | }, |
| | | { |
| | | path: "output-invoice", |
| | | component: () => import("@/views/financialManagement/receivable/outputInvoice.vue"), |
| | | name: "OutputInvoice", |
| | | meta: { title: "销项发票" }, |
| | | }, |
| | | { |
| | | path: "receipt", |
| | | component: () => import("@/views/financialManagement/receivable/receipt.vue"), |
| | | name: "Receipt", |
| | | meta: { title: "收款单" }, |
| | | }, |
| | | { |
| | | path: "receivable-reconciliation", |
| | | component: () => import("@/views/financialManagement/receivable/reconciliation.vue"), |
| | | name: "ReceivableReconciliation", |
| | | meta: { title: "应收对账" }, |
| | | }, |
| | | { |
| | | path: "purchase-in", |
| | | component: () => import("@/views/financialManagement/payable/purchaseIn.vue"), |
| | | name: "PurchaseIn", |
| | | meta: { title: "采购入库" }, |
| | | }, |
| | | { |
| | | path: "purchase-return", |
| | | component: () => import("@/views/financialManagement/payable/purchaseReturn.vue"), |
| | | name: "PurchaseReturn", |
| | | meta: { title: "采购退货" }, |
| | | }, |
| | | { |
| | | path: "input-invoice", |
| | | component: () => import("@/views/financialManagement/payable/input-invoice.vue"), |
| | | name: "InputInvoice", |
| | | meta: { title: "进项发票" }, |
| | | }, |
| | | { |
| | | path: "payment-apply", |
| | | component: () => import("@/views/financialManagement/payable/paymentApply.vue"), |
| | | name: "PaymentApply", |
| | | meta: { title: "付款申请" }, |
| | | }, |
| | | |
| | | { |
| | | path: "payment", |
| | | component: () => import("@/views/financialManagement/payable/payment.vue"), |
| | | name: "Payment", |
| | | meta: { title: "付款单" }, |
| | | }, |
| | | { |
| | | path: "payable-reconciliation", |
| | | component: () => import("@/views/financialManagement/payable/reconciliation.vue"), |
| | | name: "PayableReconciliation", |
| | | meta: { title: "应付对账" }, |
| | | }, |
| | | { |
| | | path: "fixed-assets", |
| | | component: () => import("@/views/financialManagement/assets/fixedAssets.vue"), |
| | | name: "FixedAssets", |
| | | meta: { title: "固定资产" }, |
| | | }, |
| | | { |
| | | path: "intangible-assets", |
| | | component: () => import("@/views/financialManagement/assets/intangibleAssets.vue"), |
| | | name: "IntangibleAssets", |
| | | meta: { title: "无形资产" }, |
| | | }, |
| | | { |
| | | path: "general-ledger", |
| | | component: () => import("@/views/financialManagement/generalLedger/index.vue"), |
| | | name: "GeneralLedger", |
| | | meta: { title: "总帐科目" }, |
| | | }, |
| | | { |
| | | path: "voucher", |
| | | component: () => import("@/views/financialManagement/voucher/index.vue"), |
| | | name: "Voucher", |
| | | meta: { title: "凭证" }, |
| | | }, |
| | | { |
| | | path: "voucher-general-ledger", |
| | | component: () => import("@/views/financialManagement/voucher/generalLedger.vue"), |
| | | name: "VoucherGeneralLedger", |
| | | meta: { title: "科目总帐" }, |
| | | }, |
| | | { |
| | | path: "voucher-detail-ledger", |
| | | component: () => import("@/views/financialManagement/voucher/detailLedger.vue"), |
| | | name: "VoucherDetailLedger", |
| | | meta: { title: "科目明细帐" }, |
| | | }, |
| | | ], |
| | | },*/ |
| | | ]; |
| | | |
| | | // 动态路由,基于用户权限动态去加载 |
| | |
| | | <el-descriptions-item label="报价总额" |
| | | :span="2"> |
| | | <span style="font-size: 18px; color: #e6a23c; font-weight: bold;"> |
| | | ¥{{ Number(currentQuotation.totalAmount ?? 0).toFixed(6) }} |
| | | ¥{{ Number(currentQuotation.totalAmount ?? 0).toFixed(2) }} |
| | | </span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | |
| | | label="单位" /> |
| | | <el-table-column prop="unitPrice" |
| | | label="单价"> |
| | | <template #default="scope">¥{{ Number(scope.row.unitPrice ?? 0).toFixed(6) }}</template> |
| | | <template #default="scope">¥{{ Number(scope.row.unitPrice ?? 0).toFixed(2) }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | <el-table-column label="数量" prop="quantity" /> |
| | | <el-table-column label="库存预留数量" prop="stockReservedQuantity" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormattedNumber" width="150" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="150" /> |
| | | <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="150" /> |
| | | <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="150" /> |
| | | <template #append> |
| | | <div class="summary-row" v-if="productData.length > 0"> |
| | | <div class="summary-label">合计</div> |
| | | <div class="summary-value" style="width: 150px"> |
| | | {{ unitPriceFormattedNumber(null, null, sumTaxInclusiveUnitPrice) }} |
| | | {{ formattedNumber(null, null, sumTaxInclusiveUnitPrice) }} |
| | | </div> |
| | | <div class="summary-value" style="width: 150px"> |
| | | {{ formattedNumber(null, null, sumTaxInclusiveTotalPrice) }} |
| | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue != null && !isNaN(cellValue)) { |
| | | return Number(cellValue).toFixed(2) |
| | | } |
| | | return cellValue |
| | | } |
| | | |
| | | |
| | | const unitPriceFormattedNumber = (row, column, cellValue) => { |
| | | if (cellValue != null && !isNaN(cellValue)) { |
| | | return Number(cellValue).toFixed(6) |
| | | } |
| | | return cellValue |
| | | } |
| | |
| | | <el-table-column label="可用数量" prop="availableQuality" /> |
| | | <el-table-column label="退货数量" prop="returnQuality" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormatter" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" /> |
| | | <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" /> |
| | | <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" /> |
| | | </el-table> |
| | |
| | | <el-table-column label="数量" prop="quantity" width="70" /> |
| | | <el-table-column label="库存预警数量" prop="warnNum" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="税率(%)" prop="taxRate" width="80" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormatter" width="150" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="150" /> |
| | | <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="150" /> |
| | | <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="150" /> |
| | | <el-table-column label="是否质检" prop="isChecked" width="150"> |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税单价(元):" prop="taxInclusiveUnitPrice"> |
| | | <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="6" :step="0.1" :min="0" clearable |
| | | <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="2" :step="0.1" :min="0" clearable |
| | | style="width: 100%" @change="mathNum" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | const unitPriceFormatter = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(6); |
| | | }; |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | Number(productForm.value.quantity) |
| | | ).toFixed(6); |
| | | ).toFixed(2); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.taxInclusiveUnitPrice) < 0) { |
| | | productForm.value.taxInclusiveUnitPrice = "0"; |
| | |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | Number(productForm.value.quantity) |
| | | ).toFixed(6); |
| | | ).toFixed(2); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.taxInclusiveUnitPrice) < 0) { |
| | | productForm.value.taxInclusiveUnitPrice = "0"; |
| | |
| | | }); |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(6); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | |
| | | const formatAmount = (value) => { |
| | |
| | | const stat = passRateStatisticsData.value.find(item => item.modelType === type); |
| | | if (stat) { |
| | | if (field === 'completionRate' || field === 'passRate') { |
| | | return stat[field] ? Number(stat[field]).toFixed(0) + '%' : '0%'; |
| | | return stat[field] ? parseFloat(stat[field]) + '%' : '0%'; |
| | | } |
| | | return stat[field]; |
| | | } |
| | |
| | | customewTransactionsDetails, |
| | | } from "@/api/salesManagement/indicatorStats.js"; |
| | | import Pagination from "../../../components/PIMTable/Pagination.vue"; |
| | | import {summarizeTable} from "@/utils/summarizeTable.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | | const receiptRecord = ref([]); |
| | |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return cellValue ? parseFloat(cellValue).toFixed(2) : "0.00"; |
| | | return parseFloat(cellValue).toFixed(8); |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = param => { |
| | |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | } |
| | | ); |
| | | if (receiptRecord.value?.length > 0) { |
| | | const index = tableData.value.findIndex( |
| | | (item) => item.id == customerId.value |
| | | ); |
| | | summarizeTable[summarizeTable.length - 1] = tableData.value[index].unReceiptPaymentAmount.toFixed(8); |
| | | } else { |
| | | summarizeTable[summarizeTable.length - 1] = 0.0; |
| | | } |
| | | return summarizeTable; |
| | | }; |
| | | |
| | |
| | | const calculateRowAmount = (row) => { |
| | | const stockOutNum = Number(row.returnQuantity || 0); |
| | | const price = Number(row.price || 0); |
| | | row.amount = (stockOutNum * price).toFixed(2); |
| | | row.amount = (stockOutNum * price).toFixed(8); |
| | | }; |
| | | |
| | | const calculateTotalRefund = () => { |
| | | const total = tableData.value.reduce((sum, row) => { |
| | | return sum + Number(row.amount || 0); |
| | | }, 0); |
| | | form.value.refundAmount = total.toFixed(2); |
| | | form.value.refundAmount = total.toFixed(8); |
| | | }; |
| | | |
| | | const availableProducts = ref([]); |
| | |
| | | prop="taxRate" /> |
| | | <el-table-column label="含税单价(元)" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="sensitiveUnitPriceFormatter" /> |
| | | :formatter="sensitiveAmountFormatter" /> |
| | | <el-table-column label="含税总价(元)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="sensitiveAmountFormatter" /> |
| | |
| | | :label="item.customerName" |
| | | :value="item.id"> |
| | | {{ |
| | | item.customerName + "——" + item.taxpayerIdentificationNumber |
| | | item.customerName |
| | | }} |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <el-table-column label="税率(%)" |
| | | prop="taxRate" /> |
| | | <el-table-column label="含税单价(元)" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="unitPriceFormatter" /> |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="format8" /> |
| | | <el-table-column label="含税总价(元)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" /> |
| | | :formatter="format8" /> |
| | | <el-table-column label="不含税总价(元)" |
| | | prop="taxExclusiveTotalPrice" |
| | | :formatter="formattedNumber" /> |
| | | :formatter="format8" /> |
| | | <el-table-column label="是否生产" |
| | | prop="isProduction" |
| | | width="150"> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税单价(元):" |
| | | prop="taxInclusiveUnitPrice"> |
| | | <el-input-number :step="0.01" |
| | | <el-input-number :step="1" |
| | | :min="0" |
| | | v-model="productForm.taxInclusiveUnitPrice" |
| | | style="width: 100%" |
| | | :precision="6" |
| | | :precision="8" |
| | | placeholder="请输入" |
| | | clearable |
| | | @change="calculateFromUnitPrice" /> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="数量:" |
| | | prop="quantity"> |
| | | <el-input-number :step="0.1" |
| | | <el-input-number :step="1" |
| | | :min="0" |
| | | v-model="productForm.quantity" |
| | | placeholder="请输入" |
| | | clearable |
| | | :precision="2" |
| | | :precision="8" |
| | | @change="calculateFromQuantity" |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | |
| | | return productOptions.value; |
| | | }); |
| | | }; |
| | | const calculateTaxExclusiveTotalPrice8 = (inclusiveTotalPrice, taxRate) => { |
| | | const taxRateDecimal = taxRate / 100; |
| | | return (inclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(8); |
| | | }; |
| | | |
| | | const calculateTaxIncludeTotalPrice8 = (unitPrice, quantity) => { |
| | | return (unitPrice * quantity).toFixed(8); |
| | | }; |
| | | |
| | | const format8 = (row, column, cellValue) => { |
| | | if (cellValue === undefined || cellValue === null || cellValue === "") { |
| | | return "0.00000000"; |
| | | } |
| | | return parseFloat(cellValue).toFixed(8); |
| | | }; |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue === undefined || cellValue === null || cellValue === "") { |
| | | return "0.00"; |
| | | } |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | const unitPriceFormatter = (row, column, cellValue) => { |
| | | if (cellValue === undefined || cellValue === null || cellValue === "") { |
| | | return "0.000000"; |
| | | } |
| | | return parseFloat(cellValue).toFixed(6); |
| | | return parseFloat(cellValue).toFixed(8); |
| | | }; |
| | | const findLedgerRecordByRow = row => { |
| | | if (!row) return null; |
| | |
| | | if (!isCurrentUserMaintainer(row)) { |
| | | return "*****"; |
| | | } |
| | | return formattedNumber(row, column, cellValue); |
| | | }; |
| | | const sensitiveUnitPriceFormatter = (row, column, cellValue) => { |
| | | if (!isCurrentUserMaintainer(row)) { |
| | | return "*****"; |
| | | } |
| | | return unitPriceFormatter(row, column, cellValue); |
| | | return format8(row, column, cellValue); |
| | | }; |
| | | // 获取tree子数据 |
| | | const getModels = value => { |
| | |
| | | "contractAmount", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ]); |
| | | ], { |
| | | taxInclusiveTotalPrice: { decimalPlaces: 8 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 8 }, |
| | | }); |
| | | }; |
| | | // 子表合计方法 |
| | | const summarizeChildrenTable = (param, parentRow) => { |
| | |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ]); |
| | | ], { |
| | | taxInclusiveUnitPrice: { decimalPlaces: 8 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 8 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 8 }, |
| | | }); |
| | | }; |
| | | // 打开弹框 |
| | | const openForm = async (type, row) => { |
| | |
| | | const quantity = Number(p.quantity ?? 0) || 0; |
| | | const unitPrice = Number(p.unitPrice ?? 0) || 0; |
| | | const taxRate = "13"; // 默认 13%,便于直接提交(如需可在产品中自行修改) |
| | | const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); |
| | | const taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice( |
| | | const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(8); |
| | | const taxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice8( |
| | | taxInclusiveTotalPrice, |
| | | taxRate |
| | | ); |
| | | return { |
| | | // 台账字段 |
| | | productCategory: p.product || p.productName || "", |
| | | specificationModel: p.specification || "", |
| | | unit: p.unit || "", |
| | | quantity: quantity, |
| | | taxRate: taxRate, |
| | | taxInclusiveUnitPrice: unitPrice.toFixed(6), |
| | | taxInclusiveUnitPrice: unitPrice.toFixed(8), |
| | | taxInclusiveTotalPrice: taxInclusiveTotalPrice, |
| | | taxExclusiveTotalPrice: taxExclusiveTotalPrice, |
| | | invoiceType: "增普票", |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0); |
| | | }, 0); |
| | | return total.toFixed(2); |
| | | return total.toFixed(8); |
| | | }; |
| | | |
| | | // 用于打印的计算函数 |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0); |
| | | }, 0); |
| | | return total.toFixed(2); |
| | | return total.toFixed(8); |
| | | }; |
| | | |
| | | const mathNum = () => { |
| | | console.log("productForm.value", productForm.value); |
| | | if (!productForm.value.taxInclusiveUnitPrice) { |
| | | return; |
| | | } |
| | | if (!productForm.value.quantity) { |
| | | return; |
| | | } |
| | | // 含税总价计算 |
| | | productForm.value.taxInclusiveTotalPrice = |
| | | proxy.calculateTaxIncludeTotalPrice( |
| | | productForm.value.taxInclusiveUnitPrice, |
| | | productForm.value.quantity |
| | | ); |
| | | productForm.value.taxInclusiveTotalPrice = calculateTaxIncludeTotalPrice8( |
| | | productForm.value.taxInclusiveUnitPrice, |
| | | productForm.value.quantity |
| | | ); |
| | | if (productForm.value.taxRate) { |
| | | // 不含税总价计算 |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | productForm.value.taxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice8( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | } |
| | | }; |
| | | |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算含税单价 = 含税总价 / 数量 |
| | | productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(6); |
| | | productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(8); |
| | | |
| | | // 如果有税率,计算不含税总价 |
| | | if (productForm.value.taxRate) { |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | totalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | productForm.value.taxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice8( |
| | | totalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | } |
| | | |
| | | isCalculating.value = false; |
| | |
| | | // 先计算含税总价 = 不含税总价 / (1 - 税率/100) |
| | | const taxRateDecimal = taxRate / 100; |
| | | const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal); |
| | | productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2); |
| | | productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(8); |
| | | |
| | | // 计算含税单价 = 含税总价 / 数量 |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | | inclusiveTotalPrice / quantity |
| | | ).toFixed(6); |
| | | ).toFixed(8); |
| | | |
| | | isCalculating.value = false; |
| | | }; |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算含税总价 |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(8); |
| | | |
| | | // 如果有税率,计算不含税总价 |
| | | if (productForm.value.taxRate) { |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | productForm.value.taxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice8( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | } |
| | | |
| | | isCalculating.value = false; |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算含税总价 |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(8); |
| | | |
| | | // 如果有税率,计算不含税总价 |
| | | if (productForm.value.taxRate) { |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | productForm.value.taxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice8( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | ); |
| | | } |
| | | |
| | | isCalculating.value = false; |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算不含税总价 |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice(inclusiveTotalPrice, taxRate); |
| | | productForm.value.taxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice8( |
| | | inclusiveTotalPrice, |
| | | taxRate |
| | | ); |
| | | |
| | | isCalculating.value = false; |
| | | }; |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="totalAmount" label="报价金额" width="120"> |
| | | <template #default="scope"> |
| | | ¥{{ scope.row.totalAmount.toFixed(6) }} |
| | | ¥{{ scope.row.totalAmount.toFixed(2) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="200" fixed="right" align="center"> |
| | |
| | | <el-table-column prop="unitPrice" label="单价"> |
| | | <template #default="scope"> |
| | | <el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item"> |
| | | <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="6" style="width: 100%" /> |
| | | <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="8" style="width: 100%" /> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>--> |
| | | <!-- </el-descriptions-item>--> |
| | | <el-descriptions-item label="报价总额" :span="2"> |
| | | <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">¥{{ currentQuotation.totalAmount?.toFixed(6) }}</span> |
| | | <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">¥{{ currentQuotation.totalAmount?.toFixed(2) }}</span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | |
| | | <el-table-column prop="unit" label="单位" /> |
| | | <el-table-column prop="unitPrice" label="单价"> |
| | | <template #default="scope"> |
| | | ¥{{ scope.row.unitPrice.toFixed(6) }} |
| | | ¥{{ scope.row.unitPrice.toFixed(2) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | } |
| | | |
| | | const handleEdit = async (row) => { |
| | | console.log("1111111111111111111", row) |
| | | dialogTitle.value = '编辑报价' |
| | | isEdit.value = true |
| | | editId.value = row.id |
| | |
| | | |
| | | <script setup> |
| | | import { useRouter } from 'vue-router' |
| | | import aiHead from '@/assets/images/head.png' |
| | | import aiHead from '@/assets/images/head.svg' |
| | | |
| | | const router = useRouter() |
| | | |
| | |
| | | } |
| | | |
| | | .ai-stage__ring { |
| | | width: 380px; |
| | | height: 380px; |
| | | width: 300px; |
| | | height: 300px; |
| | | display: grid; |
| | | place-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .ai-stage__core { |
| | | width: 380px; |
| | | height: 380px; |
| | | width: 340px; |
| | | height: 340px; |
| | | display: grid; |
| | | place-items: center; |
| | | } |
| | | |
| | | .ai-stage__core img { |
| | | width: 380px; |
| | | height: 380px; |
| | | width: 360px; |
| | | height: 360px; |
| | | object-fit: contain; |
| | | transform: translateY(-24px); |
| | | filter: drop-shadow(0 10px 24px rgba(76, 135, 255, 0.22)); |