Compare commits
3 Commits
356e6438e0
...
7762eb6d24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7762eb6d24 | ||
|
|
db1a323921 | ||
|
|
1a61475f57 |
@@ -3,10 +3,10 @@ import {mapState} from "vuex"
|
|||||||
import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue";
|
import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue";
|
||||||
|
|
||||||
const formImages = [
|
const formImages = [
|
||||||
{label: "身长测量照片", prop: "heightPic", rules: {required: true, message: '请上传 身长测量照片'}},
|
{label: "身长测量照片", prop: "heightPic",},
|
||||||
{label: "生物芯片照片", prop: "biochipPic", rules: {required: true, message: '请上传 生物芯片照片'}},
|
{label: "生物芯片照片", prop: "biochipPic",},
|
||||||
{label: "防疫耳标照片", prop: "preventionPic", rules: {required: true, message: '请上传 防疫耳标照片'}},
|
{label: "防疫耳标照片", prop: "preventionPic",},
|
||||||
{label: "其他说明照片", prop: "otherPic", rules: {required: true, message: '请上传 其他说明照片'}},
|
{label: "其他说明照片", prop: "otherPic",},
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: "deathAdd",
|
name: "deathAdd",
|
||||||
@@ -55,7 +55,7 @@ export default {
|
|||||||
this.$refs.detail.validate().then(() => {
|
this.$refs.detail.validate().then(() => {
|
||||||
const {biochipEarNumber, id, deathTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
|
const {biochipEarNumber, id, deathTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
|
||||||
this.instance.post("/api/breed/death/addOrEdit", {
|
this.instance.post("/api/breed/death/addOrEdit", {
|
||||||
biochipEarNumber, id, deathTime, picture: {heightPic, biochipPic, preventionPic, otherPic}, reason, remarks
|
biochipEarNumber, id, deathTime, picture: JSON.stringify({heightPic, biochipPic, preventionPic, otherPic}), reason, remarks
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0 && res?.data != 1) {
|
if (res?.code == 0 && res?.data != 1) {
|
||||||
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))
|
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import { mapState } from "vuex"
|
|||||||
import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue";
|
import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue";
|
||||||
|
|
||||||
const formImages = [
|
const formImages = [
|
||||||
{ label: "身长测量照片", prop: "heightPic", rules: { required: true, message: '请上传 身长测量照片' } },
|
{label: "身长测量照片", prop: "heightPic",},
|
||||||
{ label: "生物芯片照片", prop: "biochipPic", rules: { required: true, message: '请上传 生物芯片照片' } },
|
{label: "生物芯片照片", prop: "biochipPic",},
|
||||||
{ label: "防疫耳标照片", prop: "preventionPic", rules: { required: true, message: '请上传 防疫耳标照片' } },
|
{label: "防疫耳标照片", prop: "preventionPic",},
|
||||||
{ label: "其他说明照片", prop: "otherPic", rules: { required: true, message: '请上传 其他说明照片' } },
|
{label: "其他说明照片", prop: "otherPic",},
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: "outAdd",
|
name: "outAdd",
|
||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
this.$refs.detail.validate().then(() => {
|
this.$refs.detail.validate().then(() => {
|
||||||
const {biochipEarNumber, id, outTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
|
const {biochipEarNumber, id, outTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
|
||||||
this.instance.post("/api/breed/out/addOrEdit", {
|
this.instance.post("/api/breed/out/addOrEdit", {
|
||||||
biochipEarNumber, id, outTime, picture: { heightPic, biochipPic, preventionPic, otherPic }, reason, remarks
|
biochipEarNumber, id, deathTime, picture: JSON.stringify({heightPic, biochipPic, preventionPic, otherPic}), reason, remarks
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0 && res?.data != 1) {
|
if (res?.code == 0 && res?.data != 1) {
|
||||||
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))
|
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getText(biochipEarNumber) {
|
getText(biochipEarNumber) {
|
||||||
this.info = {}
|
this.info = {}
|
||||||
return this.instance.post("/api/breed/earTag/page", null, {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => {
|
return this.instance.post("/api/breed/earTag/page", {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => {
|
||||||
if (res?.data?.records) {
|
if (res?.data?.records) {
|
||||||
this.info = res.data.records[0]
|
this.info = res.data.records[0]
|
||||||
this.$emit('enter', this.info)
|
this.$emit('enter', this.info)
|
||||||
|
|||||||
Reference in New Issue
Block a user