| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="数量:" prop="quantity"> |
| | | <el-input v-model="productForm.quantity" placeholder="请输入" clearable/> |
| | | <el-input v-model="productForm.quantity" placeholder="请输入" clearable @change="mathNum" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税单价(元):" prop="taxInclusiveUnitPrice"> |
| | | <el-input v-model="productForm.taxInclusiveUnitPrice" placeholder="请输入" clearable/> |
| | | <el-input v-model="productForm.taxInclusiveUnitPrice" placeholder="请输入" clearable @change="mathNum" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税总价(元):" prop="taxInclusiveTotalPrice"> |
| | | <el-input v-model="productForm.taxInclusiveTotalPrice" placeholder="请输入" clearable @change="mathNum" /> |
| | | <el-input v-model="productForm.taxInclusiveTotalPrice" placeholder="请输入" clearable disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | const day = String(today.getDate()).padStart(2, '0'); |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | |
| | | const mathNum = () => { |
| | | productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(productForm.value.taxInclusiveTotalPrice, productForm.value.taxRate) |
| | | 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) |
| | | if(productForm.value.taxRate){ |
| | | // 不含税总价计算 |
| | | productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(productForm.value.taxInclusiveTotalPrice, productForm.value.taxRate) |
| | | } |
| | | } |
| | | getList() |
| | | </script> |