| | |
| | | productForm.value.taxInclusiveUnitPrice, |
| | | productForm.value.quantity |
| | | ); |
| | | // 优化:使带税和不带税价格一致 |
| | | productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice; |
| | | |
| | | // 根据税率计算不含税总价 |
| | | const taxRate = Number(productForm.value.taxRate) || 0; |
| | | productForm.value.taxExclusiveTotalPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100) |
| | | ).toFixed(2); |
| | | }; |
| | | const reverseMathNum = field => { |
| | | // 确保输入值不为负数 |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | const taxRate = Number(productForm.value.taxRate) || 0; |
| | | |
| | | if (field === "taxInclusiveTotalPrice") { |
| | | // 已知含税总价和数量,反算含税单价 |
| | |
| | | productForm.value.quantity = "0"; |
| | | } |
| | | } |
| | | // 优化:使带税和不带税价格一致 |
| | | productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice; |
| | | // 根据税率计算不含税总价 |
| | | productForm.value.taxExclusiveTotalPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100) |
| | | ).toFixed(2); |
| | | } else if (field === "taxExclusiveTotalPrice") { |
| | | // 优化:使带税和不带税价格一致 |
| | | productForm.value.taxInclusiveTotalPrice = productForm.value.taxExclusiveTotalPrice; |
| | | // 根据税率计算含税总价 |
| | | productForm.value.taxInclusiveTotalPrice = ( |
| | | Number(productForm.value.taxExclusiveTotalPrice) * (1 + taxRate / 100) |
| | | ).toFixed(2); |
| | | |
| | | // 已知数量,反算含税单价 |
| | | if (productForm.value.quantity) { |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | |
| | | <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip /> |
| | | <el-table-column label="产品名称" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="商品总数" prop="quantity" show-overflow-tooltip /> |
| | | <el-table-column label="本次发货数量" prop="partSendAmount" show-overflow-tooltip /> |
| | | <el-table-column label="发货时间" prop="shippingDate" show-overflow-tooltip /> |
| | | <el-table-column label="快递公司" prop="expressCompany" show-overflow-tooltip /> |
| | | <el-table-column label="快递单号" prop="expressNumber" show-overflow-tooltip /> |
| | |
| | | <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增发货台账' : '编辑发货台账'" width="40%" |
| | | @close="closeDia"> |
| | | <el-form :model="form" label-width="120px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <!-- <el-row :gutter="30"> --> |
| | | <!-- <el-col :span="24"> |
| | | <el-form-item label="发货类型:" prop="type"> |
| | | <el-select |
| | | v-model="form.type" |
| | |
| | | <el-option label="快递" value="快递" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> --> |
| | | <!-- </el-row> --> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="发货日期:" prop="shippingDate"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="数量" prop ="quantity" /> |
| | | <el-table-column label="已发货数量" prop="partSendAmount" /> |
| | | <el-table-column label="已发货数量" prop="partSendAmount" > |
| | | <template #default="scope"> |
| | | {{ scope.row.partSendAmount || 0 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="税率(%)" prop="taxRate" /> |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" /> |
| | | <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" /> |
| | |
| | | > |
| | | <el-form :model="deliveryForm" label-width="120px" label-position="top" :rules="deliveryRules" ref="deliveryFormRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="发货类型:" prop="type"> |
| | | <el-select |
| | | v-model="deliveryForm.type" |
| | |
| | | <el-option label="快递" value="快递" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="待发货数量:"> |
| | | <el-input v-model="deliveryForm.remainAmount" disabled placeholder="请输入待发货数量"></el-input> |
| | |
| | | if (!deliveryDetailSalesLedgerId.value) return; |
| | | deliveryDetailLoading.value = true; |
| | | return deliveryLedgerListPage({ |
| | | salesLedgerId: deliveryDetailSalesLedgerId.value, |
| | | salesLedgerProductId: deliveryDetailSalesLedgerId.value, |
| | | current: deliveryDetailPage.current, |
| | | size: deliveryDetailPage.size, |
| | | }).then((res) => { |
| | |
| | | }; |
| | | |
| | | const openDeliveryDetail = (row) => { |
| | | deliveryDetailSalesLedgerId.value = row?.salesLedgerId ?? null; |
| | | deliveryDetailSalesLedgerId.value = row?.id ?? null; |
| | | deliveryDetailPage.current = 1; |
| | | deliveryDetailVisible.value = true; |
| | | getDeliveryDetailList(); |
| | |
| | | // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 |
| | | base: VITE_APP_ENV === "production" ? "/" : "/", |
| | | plugins: createVitePlugins(env, command === "build"), |
| | | optimizeDeps: { |
| | | include: ["@vue-office/docx", "@vue-office/excel"], |
| | | }, |
| | | resolve: { |
| | | // https://cn.vitejs.dev/config/#resolve-alias |
| | | alias: { |