| | |
| | | v-model="form.number" |
| | | placeholder="请输入数量" |
| | | type="number" |
| | | @change="mathNum" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | v-model="form.taxIncludingPriceUnit" |
| | | placeholder="请输入含税单价" |
| | | type="number" |
| | | @change="mathNum" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | v-model="form.taxIncludingPriceTotal" |
| | | placeholder="请输入含税总价" |
| | | type="number" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="税率" prop="taxRate"> |
| | | <el-input |
| | | <el-form-item label="税率(%)" prop="taxRate"> |
| | | <!-- <el-input |
| | | v-model="form.taxRate" |
| | | placeholder="请输入税率" |
| | | type="number" |
| | | > |
| | | <template #append> % </template> |
| | | </el-input> |
| | | </el-input> --> |
| | | <el-select |
| | | v-model="form.taxRate" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="mathNum" |
| | | > |
| | | <el-option label="1" :value="1" /> |
| | | <el-option label="6" :value="6" /> |
| | | <el-option label="13" :value="13" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | v-model="form.unTaxIncludingPriceTotal" |
| | | placeholder="请输入不含税总价" |
| | | type="number" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | // import useUserStore from "@/store/modules/user"; |
| | | import { getLedgerById } from "@/api/equipmentManagement/ledger"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | calculateTaxIncludeTotalPrice, |
| | | calculateTaxExclusiveTotalPrice, |
| | | } from "@/utils/summarizeTable"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | defineOptions({ |
| | | name: "设备台账表单", |
| | |
| | | } |
| | | }; |
| | | |
| | | const mathNum = () => { |
| | | if (!form.taxIncludingPriceUnit) { |
| | | ElMessage.error("请输入单价"); |
| | | return; |
| | | } |
| | | if (!form.number) { |
| | | ElMessage.error("请输入数量"); |
| | | return; |
| | | } |
| | | form.taxIncludingPriceTotal = calculateTaxIncludeTotalPrice( |
| | | form.taxIncludingPriceUnit, |
| | | form.number |
| | | ); |
| | | if (form.taxRate) { |
| | | form.unTaxIncludingPriceTotal = calculateTaxExclusiveTotalPrice( |
| | | form.taxIncludingPriceTotal, |
| | | form.taxRate |
| | | ); |
| | | } |
| | | }; |
| | | |
| | | defineExpose({ |
| | | form, |
| | | loadForm, |