diff --git a/project/xumu/AppInsuranceApply/AppInsuranceApply.vue b/project/xumu/AppInsuranceApply/AppInsuranceApply.vue new file mode 100644 index 00000000..6374143d --- /dev/null +++ b/project/xumu/AppInsuranceApply/AppInsuranceApply.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/project/xumu/AppInsuranceApply/add.vue b/project/xumu/AppInsuranceApply/add.vue new file mode 100644 index 00000000..de51a9ad --- /dev/null +++ b/project/xumu/AppInsuranceApply/add.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/project/xumu/AppInsuranceApply/list.vue b/project/xumu/AppInsuranceApply/list.vue new file mode 100644 index 00000000..778b3bc4 --- /dev/null +++ b/project/xumu/AppInsuranceApply/list.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/project/xumu/components/AiEartagPicker.vue b/project/xumu/components/AiEartagPicker.vue index 1157eb30..3fea28e3 100644 --- a/project/xumu/components/AiEartagPicker.vue +++ b/project/xumu/components/AiEartagPicker.vue @@ -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 { - +