| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="登记人" prop="registrantId"> |
| | | <el-input v-model="form.registrantId" disabled placeholder="请输入"/> |
| | | <el-input :value="match(form.registrantId)" v-model.number="form.registrantId" disabled placeholder="请输入"/> |
| | | </el-form-item> |
| | | <el-form-item label="登记日期" prop="registrationDate"> |
| | | <el-date-picker |
| | |
| | | |
| | | const userStore = useUserStore(); |
| | | const userInfo = ref({}); |
| | | |
| | | const match = () => { |
| | | return userInfo.value.nickName || "未知用户"; |
| | | }; |
| | | // 处理税率输入框失焦,确保精度 |
| | | const handleTaxRateBlur = () => { |
| | | if ( |
| | |
| | | |
| | | onMounted(async () => { |
| | | let res = await userStore.getInfo(); |
| | | userInfo.value = res; |
| | | userInfo.value = res.user; |
| | | getDropdownData() |
| | | |
| | | }); |
| | | const rules = { |
| | | supplierName: [ |
| | |
| | | // 触发ref里面的方法 |
| | | return; |
| | | } |
| | | console.log(userInfo.value) |
| | | // 新建时初始化表单 |
| | | form.value = { |
| | | supplierName: "", |
| | | coal: "", |
| | | unit: "吨", |
| | | purchaseQuantity: "", |
| | | priceExcludingTax: "", |
| | | totalPriceExcludingTax: "", |
| | | priceIncludingTax: "", |
| | | totalPriceIncludingTax: "", |
| | | taxRate: "", |
| | | registrantId: userInfo.value.userName, |
| | | registrantId: userInfo.value.userId, |
| | | registrationDate: new Date().toISOString().split("T")[0], |
| | | }; |
| | | // 新建时也需要设置 copyForm 用于重置功能 |
| | |
| | | |
| | | .search-form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | |