refactor(xumu): 优化保险审计提交逻辑
- 添加耳号列表处理,提高数据准确性 - 使用对象展开运算符简化代码结构 - 优化 API 请求数据格式
This commit is contained in:
@@ -73,6 +73,7 @@ export default {
|
||||
},
|
||||
submit() {
|
||||
this.$refs.detail.validate().then(() => {
|
||||
const earNumberList = this.detail.detailList.map(e => e.biochipEarNumber)
|
||||
const farmPicture = {}
|
||||
this.formImages.forEach(e => {
|
||||
const { prop } = e
|
||||
@@ -82,7 +83,7 @@ export default {
|
||||
}
|
||||
})
|
||||
this.detail.farmPicture = JSON.stringify(farmPicture)
|
||||
this.instance.post("/api/insurance/apply/addOrEditOffline", this.detail).then(res => {
|
||||
this.instance.post("/api/insurance/apply/addOrEditOffline", { ...this.detail, earNumberList }).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
this.back()
|
||||
|
||||
Reference in New Issue
Block a user