feat(xumu): 新增投保申请功能
- 添加投保申请列表和新增页面 - 实现养殖场、承保公司、保险产品等选择功能 - 添加投保对象选择功能,支持耳标号选择 - 实现投保申请数据的查询、新增、编辑和删除 -优化表格组件,增加隐藏操作列的功能 - 更新耳标号选择组件,支持自定义请求地址
This commit is contained in:
		| @@ -4,7 +4,8 @@ export default { | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     value: {default: () => []}, | ||||
|     penId: {default: "", required: true} | ||||
|     action: {default: "/api/breed/earTag/getEarTagByPenId"}, | ||||
|     penId: String | ||||
|   }, | ||||
|   model: { | ||||
|     prop: "value", | ||||
| @@ -18,18 +19,20 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   watch: { | ||||
|     penId: { | ||||
|     action: { | ||||
|       immediate: true, | ||||
|       handler(v) { | ||||
|         this.getEartag(v) | ||||
|       handler() { | ||||
|         this.getEartag() | ||||
|       } | ||||
|     } | ||||
|     }, | ||||
|   }, | ||||
|   methods: { | ||||
|     getEartag(penId) { | ||||
|       penId && this.instance.post("/api/breed/earTag/getEarTagByPenId", null, { | ||||
|         params: {penId} | ||||
|       }).then(res => { | ||||
|     getEartag() { | ||||
|       let url = this.action | ||||
|       if (this.penId) { | ||||
|         url += `?penId=${this.penId}` | ||||
|       } | ||||
|       this.instance.post(url).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.list = res.data | ||||
|         } | ||||
| @@ -38,6 +41,7 @@ export default { | ||||
|     handleConfirm() { | ||||
|       this.dialog = false | ||||
|       this.$emit("input", this.selected) | ||||
|       this.$emit("select", this.list.filter(v => this.selected.includes(v.id))) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @@ -45,7 +49,10 @@ export default { | ||||
|  | ||||
| <template> | ||||
|   <section class="AiEartagPicker"> | ||||
|     <el-select :value="value" clearable multiple placeholder="请选择"> | ||||
|     <div v-if="$slots.default" @click="dialog=true"> | ||||
|       <slot/> | ||||
|     </div> | ||||
|     <el-select v-else :value="value" clearable multiple placeholder="请选择"> | ||||
|       <el-option v-for="op in list" :key="op.id" :label="op.earTag" :value="op.id"/> | ||||
|       <div slot="prefix" @click.stop="dialog=true"/> | ||||
|     </el-select> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user