feat(BUG 540): 新增免疫登记功能

- 添加免疫登记对话框和相关表单
- 实现免疫信息的添加和更新功能
- 优化表单样式,调整标签宽度和对齐方式
This commit is contained in:
aixianling
2025-01-14 11:28:46 +08:00
parent 0ef83a945f
commit f730850d93

View File

@@ -75,7 +75,8 @@ export default {
},
submit() {
this.$refs.detail.validate().then(() => {
this.instance.post("/api/breed/immunity/update", this.form).then(res => {
const action = !this.form.id ? "/api/breed/immunity/add" : "/api/breed/immunity/update"
this.instance.post(action, this.form).then(res => {
if (res?.code == 0) {
this.dialog = false
this.getDetail()
@@ -163,7 +164,7 @@ export default {
</template>
</ai-card>
<ai-dialog v-model="dialog" title="免疫登记" @closed="form={}" @confirm="submit">
<el-form size="small" label-width="120px" class="grid">
<el-form size="small" label-width="120px" class="grid">
<el-form-item label="免疫日期" prop="immunityTime" :rules="{required:true,message:'请选择 免疫日期'}">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="form.immunityTime"/>
</el-form-item>