Compare commits
27 Commits
a599566b20
...
devops
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b72cc93a0 | ||
|
|
6819b17126 | ||
|
|
d9a35f0081 | ||
|
|
4b26e6f5d0 | ||
|
|
ebb28ed676 | ||
|
|
a059d2bd57 | ||
|
|
fde372007f | ||
|
|
9aed740388 | ||
|
|
8a20db021a | ||
|
|
8daf15cf3f | ||
|
|
ba8dc41c83 | ||
|
|
6744b18240 | ||
|
|
a3ea6d9c51 | ||
|
|
5fa30a0e0e | ||
|
|
6b030791bb | ||
|
|
d0922c5309 | ||
|
|
d46bb82086 | ||
|
|
1ead1b2e9a | ||
|
|
c5f4f9b356 | ||
|
|
3fbde7f193 | ||
|
|
e5abd1514b | ||
|
|
33ed4fe5d5 | ||
|
|
4051b31101 | ||
|
|
94b1788e8c | ||
|
|
7944a1a8e3 | ||
|
|
17b28025d8 | ||
|
|
0a6b77943f |
@@ -17,7 +17,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety")
|
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety", "productType")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detail: {detailList: []},
|
detail: { detailList: [], list: [] },
|
||||||
records
|
records
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -55,6 +55,7 @@ export default {
|
|||||||
return id && this.instance.post("/api/insurance/claim/apply/getInfo", null, { params: { orderNo: id } }).then(res => {
|
return id && this.instance.post("/api/insurance/claim/apply/getInfo", null, { params: { orderNo: id } }).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
const detail = res.data
|
const detail = res.data
|
||||||
|
detail.detailList = detail.detailList || []
|
||||||
return this.detail = { ...detail }
|
return this.detail = { ...detail }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -91,7 +92,7 @@ export default {
|
|||||||
<ai-input :value="dict.getLabel('insureType', detail.insureType)" :edit="!1" />
|
<ai-input :value="dict.getLabel('insureType', detail.insureType)" :edit="!1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保险产品" prop="productType">
|
<el-form-item label="保险产品" prop="productType">
|
||||||
<b v-text="detail.productType"/>
|
<b v-text="dict.getLabel('productType',detail.productType)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系人">
|
<el-form-item label="联系人">
|
||||||
<ai-input v-model="detail.contacts" :edit="!1" />
|
<ai-input v-model="detail.contacts" :edit="!1" />
|
||||||
@@ -103,12 +104,13 @@ export default {
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="投保对象">
|
<ai-card title="投保对象">
|
||||||
<template #right v-if="isClaim">
|
<template #right v-if="isClaim">
|
||||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
<ai-eartag-picker @select="v => detail.detailList = v.map(e=>({biochipEarNumber:e}))" :instance="instance"
|
||||||
:action="`/api/insurance/claim/apply/getClaimEarNumberList?orderNo=${detail.orderNo}`">
|
:action="`/api/insurance/claim/apply/getClaimEarNumberList?orderNo=${detail.orderNo}`">
|
||||||
<el-button type="text">选择</el-button>
|
<el-button type="text">选择</el-button>
|
||||||
</ai-eartag-picker>
|
</ai-eartag-picker>
|
||||||
</template>
|
</template>
|
||||||
<ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber||0}只,已理赔标的共 @v 只`" color="red" :value="selectedEartags"/>
|
<ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber || 0}只,已理赔标的共 @v 只`" color="red"
|
||||||
|
:value="selectedEartags" />
|
||||||
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions />
|
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions />
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="理赔材料" v-if="isClaim">
|
<ai-card title="理赔材料" v-if="isClaim">
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
getTableData() {
|
getTableData() {
|
||||||
this.instance.post("/api/insurance/claim/apply/page", {...this.page, ...this.search}).then(res => {
|
this.instance.post("/api/insurance/claim/apply/page", {...this.page, ...this.search}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.tableData = res.data?.records.map(e => ({...e, permit: `${e.status}` + e.auditStatus}))
|
this.tableData = res.data?.records.map(e => ({...e, permit: e.remarks == "可申请理赔"}))
|
||||||
this.page.total = res.data.total
|
this.page.total = res.data.total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<template v-if="['12'].includes(row.permit)">
|
<template v-if="row.permit">
|
||||||
<el-button type="text" @click="dialog=true,$set(form,'id',row.orderNo)">理赔</el-button>
|
<el-button type="text" @click="dialog=true,$set(form,'id',row.orderNo)">理赔</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.orderNo}})">查看</el-button>
|
<el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.orderNo}})">查看</el-button>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety")
|
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety", "productType")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
<ai-input :value="dict.getLabel('insureType',detail.insureType)" :edit="!1"/>
|
<ai-input :value="dict.getLabel('insureType',detail.insureType)" :edit="!1"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保险产品" prop="productType">
|
<el-form-item label="保险产品" prop="productType">
|
||||||
<b v-text="detail.productType"/>
|
<b v-text="dict.getLabel('productType',detail.productType)"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系人">
|
<el-form-item label="联系人">
|
||||||
<ai-input v-model="detail.contacts" :edit="!1"/>
|
<ai-input v-model="detail.contacts" :edit="!1"/>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex"
|
import { mapState } from "vuex"
|
||||||
|
import AiAudit from "../components/AiAudit.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "deathAdd",
|
name: "deathAdd",
|
||||||
@@ -13,6 +14,7 @@ export default {
|
|||||||
detail: { detailList: [] }
|
detail: { detailList: [] }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components:{AiAudit},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
userinfo: v => v.user.info || {},
|
userinfo: v => v.user.info || {},
|
||||||
@@ -34,8 +36,8 @@ export default {
|
|||||||
},
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
const { id } = this.$route.query
|
const { id } = this.$route.query
|
||||||
return id && this.instance.post("/api/breed/death/page", null, {params: {id}}).then(res => {
|
return id && this.instance.post("/api/breed/death/getAuditPage", { id }).then(res => {
|
||||||
if (res?.data?.records) {
|
if (res?.data?.records?.[0]) {
|
||||||
const detail = res.data.records[0] || {}
|
const detail = res.data.records[0] || {}
|
||||||
if (detail.picture) {
|
if (detail.picture) {
|
||||||
Object.entries(JSON.parse(detail.picture)).forEach(([key, value]) => {
|
Object.entries(JSON.parse(detail.picture)).forEach(([key, value]) => {
|
||||||
@@ -87,10 +89,10 @@ export default {
|
|||||||
<b v-text="detail.originalEarNumber" />
|
<b v-text="detail.originalEarNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类别" prop="category">
|
<el-form-item label="类别" prop="category">
|
||||||
<b v-text="detail.category"/>
|
<b v-text="dict.getLabel('category', detail.category)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="品种" prop="variety">
|
<el-form-item label="品种" prop="variety">
|
||||||
<b v-text="detail.variety"/>
|
<b v-text="dict.getLabel('variety', detail.variety)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="row flex">
|
<div class="row flex">
|
||||||
<el-form-item v-for="(img, i) in formImages" :key="i" v-bind="img">
|
<el-form-item v-for="(img, i) in formImages" :key="i" v-bind="img">
|
||||||
@@ -114,7 +116,7 @@ export default {
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
<template v-if="isAudit">
|
<template v-if="isAudit">
|
||||||
<el-form-item label="审批状态" prop="auditStatus" :rules="{ required: true, message: '请选择审批状态' }">
|
<el-form-item label="审批状态" prop="auditStatus" :rules="{ required: true, message: '请选择审批状态' }">
|
||||||
<ai-select v-model="detail.auditStatus" dict="auditStatus"/>
|
<ai-audit @change="v => $set(detail, 'auditStatus', v)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="意见">
|
<el-form-item label="意见">
|
||||||
<ai-input type="textarea" :rows="3" v-model="detail.remark" />
|
<ai-input type="textarea" :rows="3" v-model="detail.remark" />
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-download :instance="instance" url="/api/breed/death/export" :params="{...search,...page}" :fileName="`${pageTitle}导出表-${Date.now()}`"/>
|
<ai-download :instance="instance" url="/api/breed/death/exportAudit" :params="{...search,...page}" :fileName="`${pageTitle}导出表-${Date.now()}`"/>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData"
|
<ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety")
|
this.dict.load("insuranceAuditStatus", "insureType", "insureStatus", "category", "variety")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export default {
|
|||||||
},
|
},
|
||||||
submit(submitType) {
|
submit(submitType) {
|
||||||
this.$refs.detail.validate().then(() => {
|
this.$refs.detail.validate().then(() => {
|
||||||
|
const earNumberList = this.detail.detailList.map(e => e.biochipEarNumber)
|
||||||
const farmPicture = {}
|
const farmPicture = {}
|
||||||
this.formImages.forEach(e => {
|
this.formImages.forEach(e => {
|
||||||
const {prop} = e
|
const {prop} = e
|
||||||
@@ -78,7 +79,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.detail.farmPicture = JSON.stringify(farmPicture)
|
this.detail.farmPicture = JSON.stringify(farmPicture)
|
||||||
this.instance.post("/api/insurance/apply/addOrEdit", {...this.detail, submitType}).then(res => {
|
this.instance.post("/api/insurance/apply/addOrEdit", {...this.detail, submitType, earNumberList}).then(res => {
|
||||||
if (res?.code == '0') {
|
if (res?.code == '0') {
|
||||||
this.$message.success("提交成功!")
|
this.$message.success("提交成功!")
|
||||||
this.back()
|
this.back()
|
||||||
@@ -110,7 +111,7 @@ export default {
|
|||||||
<el-form-item label="保险产品" prop="productType" :rules="{required: isAdd||isEdit,message:'请选择 保险产品'}">
|
<el-form-item label="保险产品" prop="productType" :rules="{required: isAdd||isEdit,message:'请选择 保险产品'}">
|
||||||
<ai-select v-if="isAdd||isEdit" v-model="detail.productType" :select-list="getProducts(detail.companyId)" :prop="{label:'name',value:'productType'}"
|
<ai-select v-if="isAdd||isEdit" v-model="detail.productType" :select-list="getProducts(detail.companyId)" :prop="{label:'name',value:'productType'}"
|
||||||
@select="v=>$set(detail,'insureType',v.children[0].insureType)"/>
|
@select="v=>$set(detail,'insureType',v.children[0].insureType)"/>
|
||||||
<b v-else v-text="detail.productType"/>
|
<b v-else v-text="dict.getLabel('productType', detail.productType)"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="投保类型">
|
<el-form-item label="投保类型">
|
||||||
<ai-input :value="dict.getLabel('insureType',detail.insureType)" placeholder="根据保险产品自动带出" :edit="isAdd||isEdit" readonly/>
|
<ai-input :value="dict.getLabel('insureType',detail.insureType)" placeholder="根据保险产品自动带出" :edit="isAdd||isEdit" readonly/>
|
||||||
@@ -125,7 +126,7 @@ export default {
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="投保对象">
|
<ai-card title="投保对象">
|
||||||
<template #right v-if="isAdd||isEdit">
|
<template #right v-if="isAdd||isEdit">
|
||||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance" value-key="biochipEarNumber"
|
||||||
:action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
:action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||||
<el-button type="text">选择</el-button>
|
<el-button type="text">选择</el-button>
|
||||||
</ai-eartag-picker>
|
</ai-eartag-picker>
|
||||||
@@ -141,7 +142,7 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="审核信息" v-if="!(isAdd||isEdit)">
|
<ai-card title="审核信息" v-if="!(isAdd||isEdit)">
|
||||||
<el-form-item label="审核状态">{{ dict.getLabel('auditStatus', detail.auditStatus) }}</el-form-item>
|
<el-form-item label="审核状态">{{ dict.getLabel('insuranceAuditStatus', detail.auditStatus) }}</el-form-item>
|
||||||
<el-form-item label="审核时间">{{ detail.auditTime }}</el-form-item>
|
<el-form-item label="审核时间">{{ detail.auditTime }}</el-form-item>
|
||||||
<el-form-item label="审核人">{{ detail.auditName }}</el-form-item>
|
<el-form-item label="审核人">{{ detail.auditName }}</el-form-item>
|
||||||
<el-form-item label="保单订单号">{{ detail.orderNo }}</el-form-item>
|
<el-form-item label="保单订单号">{{ detail.orderNo }}</el-form-item>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const columns = [
|
|||||||
{label: "承保公司", prop: "companyName"},
|
{label: "承保公司", prop: "companyName"},
|
||||||
{label: "投保时间", prop: "createTime"},
|
{label: "投保时间", prop: "createTime"},
|
||||||
{label: "投保状态", prop: "status", width: 160, dict: "insureStatus"},
|
{label: "投保状态", prop: "status", width: 160, dict: "insureStatus"},
|
||||||
{label: "审核状态", prop: "auditStatus", width: 120, dict: "auditStatus"},
|
{label: "审核状态", prop: "auditStatus", width: 120, dict: "insuranceAuditStatus"},
|
||||||
{label: "申请人", prop: "applyName", width: 120},
|
{label: "申请人", prop: "applyName", width: 120},
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety")
|
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety", "productType")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { mapState } from "vuex"
|
import { mapState } from "vuex"
|
||||||
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue";
|
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue";
|
||||||
import AiIdcardRemote from "@project/xumu/components/AiIdcardRemote.vue";
|
import AiIdcardRemote from "@project/xumu/components/AiIdcardRemote.vue";
|
||||||
|
import AiAudit from "../components/AiAudit.vue";
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ label: "序号", type: "index" },
|
{ label: "序号", type: "index" },
|
||||||
@@ -11,7 +12,7 @@ const columns = [
|
|||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: "iaAdd",
|
name: "iaAdd",
|
||||||
components: {AiIdcardRemote, AiEartagPicker},
|
components: { AiIdcardRemote, AiEartagPicker, AiAudit },
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
permissions: Function,
|
permissions: Function,
|
||||||
@@ -72,6 +73,7 @@ export default {
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.detail.validate().then(() => {
|
this.$refs.detail.validate().then(() => {
|
||||||
|
const earNumberList = this.detail.detailList.map(e => e.biochipEarNumber)
|
||||||
const farmPicture = {}
|
const farmPicture = {}
|
||||||
this.formImages.forEach(e => {
|
this.formImages.forEach(e => {
|
||||||
const { prop } = e
|
const { prop } = e
|
||||||
@@ -81,7 +83,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.detail.farmPicture = JSON.stringify(farmPicture)
|
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) {
|
if (res?.code == 0) {
|
||||||
this.$message.success("提交成功!")
|
this.$message.success("提交成功!")
|
||||||
this.back()
|
this.back()
|
||||||
@@ -103,8 +105,10 @@ export default {
|
|||||||
userId && this.instance.post("/api/siteUser/querySiteByUserId", null, {
|
userId && this.instance.post("/api/siteUser/querySiteByUserId", null, {
|
||||||
params: { userId }
|
params: { userId }
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data?.[0]) {
|
||||||
this.$set(this.detail, "farmId", res.data?.[0]?.id)
|
const { id } = res.data[0]
|
||||||
|
this.$set(this.detail, "farmId", id)
|
||||||
|
this.$set(this.detail, "targetUser", userId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -124,20 +128,24 @@ export default {
|
|||||||
<ai-idcard-remote :instance="instance" @enter="getRemoteInfo" />
|
<ai-idcard-remote :instance="instance" @enter="getRemoteInfo" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="养殖场" prop="farmId" :rules="{ required: isAdd || isEdit, message: '请选择 养殖场' }">
|
<el-form-item label="养殖场" prop="farmId" :rules="{ required: isAdd || isEdit, message: '请选择 养殖场' }">
|
||||||
<ai-select v-if="isAdd||isEdit" v-model="detail.farmId" :instance="instance" :action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{label:'name'}"/>
|
<ai-select v-if="isAdd || isEdit" v-model="detail.farmId" :instance="instance"
|
||||||
|
:action="`/api/siteUser/querySiteByUserId?userId=${detail.targetUser}`" :prop="{ label: 'name' }" />
|
||||||
<b v-else v-text="detail.farmName" />
|
<b v-else v-text="detail.farmName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="承保公司" prop="companyId" :rules="{ required: isAdd || isEdit, message: '请选择 承保公司' }">
|
<el-form-item label="承保公司" prop="companyId" :rules="{ required: isAdd || isEdit, message: '请选择 承保公司' }">
|
||||||
<ai-select v-if="isAdd||isEdit" v-model="detail.companyId" :select-list="companyList" :prop="{label:'name'}" disabled/>
|
<ai-select v-if="isAdd || isEdit" v-model="detail.companyId" :select-list="companyList"
|
||||||
|
:prop="{ label: 'name' }" disabled />
|
||||||
<b v-else v-text="detail.companyName" />
|
<b v-else v-text="detail.companyName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保险产品" prop="productType" :rules="{ required: isAdd || isEdit, message: '请选择 保险产品' }">
|
<el-form-item label="保险产品" prop="productType" :rules="{ required: isAdd || isEdit, message: '请选择 保险产品' }">
|
||||||
<ai-select v-if="isAdd||isEdit" v-model="detail.productType" :select-list="getProducts(detail.companyId)" :prop="{label:'name',value:'productType'}"
|
<ai-select v-if="isAdd || isEdit" v-model="detail.productType" :select-list="getProducts(detail.companyId)"
|
||||||
|
:prop="{ label: 'name', value: 'productType' }"
|
||||||
@select="v => $set(detail, 'insureType', v.children[0].insureType)" />
|
@select="v => $set(detail, 'insureType', v.children[0].insureType)" />
|
||||||
<b v-else v-text="detail.productType"/>
|
<b v-else v-text="dict.getLabel('productType', detail.productType)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="投保类型">
|
<el-form-item label="投保类型">
|
||||||
<ai-input :value="dict.getLabel('insureType',detail.insureType)" placeholder="根据保险产品自动带出" :edit="isAdd||isEdit" readonly/>
|
<ai-input :value="dict.getLabel('insureType', detail.insureType)" placeholder="根据保险产品自动带出"
|
||||||
|
:edit="isAdd || isEdit" readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系人">
|
<el-form-item label="联系人">
|
||||||
<ai-input v-model="detail.contacts" :edit="isAdd || isEdit" />
|
<ai-input v-model="detail.contacts" :edit="isAdd || isEdit" />
|
||||||
@@ -159,7 +167,8 @@ export default {
|
|||||||
<ai-card title="证件信息">
|
<ai-card title="证件信息">
|
||||||
<div class="grid c-5 el-form--label-top">
|
<div class="grid c-5 el-form--label-top">
|
||||||
<el-form-item v-for="(img, i) in formImages" :key="i" v-bind="img">
|
<el-form-item v-for="(img, i) in formImages" :key="i" v-bind="img">
|
||||||
<ai-uploader v-if="isAdd||isEdit" v-model="detail[img.prop]" :instance="instance" :limit="1" value-is-url/>
|
<ai-uploader v-if="isAdd || isEdit" v-model="detail[img.prop]" :instance="instance" :limit="1"
|
||||||
|
value-is-url />
|
||||||
<el-image :src="detail[img.prop]" :preview-src-list="[detail[img.prop]]" v-else />
|
<el-image :src="detail[img.prop]" :preview-src-list="[detail[img.prop]]" v-else />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -176,12 +185,18 @@ export default {
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="保险资料" v-if="isAudit">
|
<ai-card title="保险资料" v-if="isAudit">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<el-form-item label="保单订单号" prop="orderNo" :rules="{required:true,message:'请输入 保单订单号'}">
|
<el-form-item label="审批" prop="auditStatus"
|
||||||
<ai-input v-model="detail.orderNo"/>
|
:rules="[{ required: true, type: 'enum', enum: [2, 3], message: '请选择是否同意' },]">
|
||||||
|
<ai-audit @change="v => $set(detail, 'auditStatus', v)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保单资料" class="sc-2">
|
<el-form-item label="保单资料" class="sc-3">
|
||||||
<ai-uploader v-model="detail.picture" value-is-url :instance="instance" :limit="1" />
|
<ai-uploader v-model="detail.picture" value-is-url :instance="instance" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="保单订单号" prop="orderNo" :rules="{ required: true, message: '请输入 保单订单号' }"
|
||||||
|
v-if="detail.auditStatus == 2">
|
||||||
|
<ai-input v-model="detail.orderNo" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="说明">
|
<el-form-item label="说明">
|
||||||
<ai-input type="textarea" :rows="3" v-model="detail.remarks" />
|
<ai-input type="textarea" :rows="3" v-model="detail.remarks" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export default {
|
|||||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<template v-if="['00','02'].includes(row.permit)">
|
<template v-if="['01'].includes(row.permit)">
|
||||||
<el-button type="text" @click="$router.push({hash:'#audit',query:{id:row.id}})">审批</el-button>
|
<el-button type="text" @click="$router.push({hash:'#audit',query:{id:row.id}})">审批</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.id}})">查看</el-button>
|
<el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.id}})">查看</el-button>
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export default {
|
|||||||
},
|
},
|
||||||
submit(submitType) {
|
submit(submitType) {
|
||||||
this.$refs.detail.validate().then(() => {
|
this.$refs.detail.validate().then(() => {
|
||||||
|
const earNumberList = this.detail.detailList.map(e => e.biochipEarNumber)
|
||||||
const farmPicture = {}
|
const farmPicture = {}
|
||||||
this.formImages.forEach(e => {
|
this.formImages.forEach(e => {
|
||||||
const { prop } = e
|
const { prop } = e
|
||||||
@@ -81,7 +82,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.detail.farmPicture = JSON.stringify(farmPicture)
|
this.detail.farmPicture = JSON.stringify(farmPicture)
|
||||||
this.instance.post("/api/loan/apply/addOrEdit", {...this.detail, submitType}).then(res => {
|
this.instance.post("/api/loan/apply/addOrEdit", { ...this.detail, submitType, earNumberList }).then(res => {
|
||||||
if (res?.code == '0') {
|
if (res?.code == '0') {
|
||||||
this.$message.success("提交成功!")
|
this.$message.success("提交成功!")
|
||||||
this.back()
|
this.back()
|
||||||
@@ -103,7 +104,8 @@ export default {
|
|||||||
<ai-card title="基础信息">
|
<ai-card title="基础信息">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<el-form-item label="养殖场" prop="farmId" :rules="{ required: isAdd || isEdit, message: '请选择 养殖场' }">
|
<el-form-item label="养殖场" prop="farmId" :rules="{ required: isAdd || isEdit, message: '请选择 养殖场' }">
|
||||||
<ai-select v-if="isAdd||isEdit" v-model="detail.farmId" :instance="instance" :action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{label:'name'}"/>
|
<ai-select v-if="isAdd || isEdit" v-model="detail.farmId" :instance="instance"
|
||||||
|
:action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{ label: 'name' }" />
|
||||||
<b v-else v-text="detail.farmName" />
|
<b v-else v-text="detail.farmName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款银行" prop="bankId" :rules="{ required: isAdd || isEdit, message: '请选择 贷款银行' }">
|
<el-form-item label="贷款银行" prop="bankId" :rules="{ required: isAdd || isEdit, message: '请选择 贷款银行' }">
|
||||||
@@ -111,8 +113,8 @@ export default {
|
|||||||
<b v-else v-text="detail.bankName" />
|
<b v-else v-text="detail.bankName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款产品" prop="productType" :rules="{ required: isAdd || isEdit, message: '请选择 贷款产品' }">
|
<el-form-item label="贷款产品" prop="productType" :rules="{ required: isAdd || isEdit, message: '请选择 贷款产品' }">
|
||||||
<ai-select v-if="isAdd||isEdit" v-model="detail.productType"
|
<ai-select v-if="isAdd || isEdit" v-model="detail.productType" :select-list="getProducts(detail.bankId)"
|
||||||
:select-list="getProducts(detail.bankId)" :prop="{label:'name',value:'productType'}"/>
|
:prop="{ label: 'name', value: 'productType' }" />
|
||||||
<b v-else v-text="dict.getLabel('loanProduct', detail.productType)" />
|
<b v-else v-text="dict.getLabel('loanProduct', detail.productType)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预期贷款额(万)" prop="loanAmount" :rules="{ required: isAdd || isEdit, message: '请输入 预期贷款额' }">
|
<el-form-item label="预期贷款额(万)" prop="loanAmount" :rules="{ required: isAdd || isEdit, message: '请输入 预期贷款额' }">
|
||||||
@@ -130,7 +132,7 @@ export default {
|
|||||||
<template #right>
|
<template #right>
|
||||||
<ai-input placeholder="请输入/扫描耳标号" v-model="filterText" class="shrink" />
|
<ai-input placeholder="请输入/扫描耳标号" v-model="filterText" class="shrink" />
|
||||||
<ai-eartag-picker @select="v => detail.detailList = v" :instance="instance" v-if="isAdd || isEdit"
|
<ai-eartag-picker @select="v => detail.detailList = v" :instance="instance" v-if="isAdd || isEdit"
|
||||||
:action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
value-key="biochipEarNumber" :action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||||
<el-button type="text">选择</el-button>
|
<el-button type="text">选择</el-button>
|
||||||
</ai-eartag-picker>
|
</ai-eartag-picker>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { mapState } from "vuex"
|
import { mapState } from "vuex"
|
||||||
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue";
|
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue";
|
||||||
import AiIdcardRemote from "@project/xumu/components/AiIdcardRemote.vue";
|
import AiIdcardRemote from "@project/xumu/components/AiIdcardRemote.vue";
|
||||||
|
import AiAudit from "../components/AiAudit.vue";
|
||||||
|
|
||||||
const records = [
|
const records = [
|
||||||
{ label: "序号", type: "index" },
|
{ label: "序号", type: "index" },
|
||||||
@@ -12,7 +13,7 @@ const records = [
|
|||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: "loanAdd",
|
name: "loanAdd",
|
||||||
components: {AiIdcardRemote, AiEartagPicker},
|
components: { AiIdcardRemote, AiEartagPicker, AiAudit },
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
permissions: Function,
|
permissions: Function,
|
||||||
@@ -133,16 +134,18 @@ export default {
|
|||||||
<ai-idcard-remote :instance="instance" @enter="getRemoteInfo" />
|
<ai-idcard-remote :instance="instance" @enter="getRemoteInfo" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="养殖场" prop="farmId" :rules="{ required: isAdd, message: '请选择 养殖场' }">
|
<el-form-item label="养殖场" prop="farmId" :rules="{ required: isAdd, message: '请选择 养殖场' }">
|
||||||
<ai-select v-if="isAdd" v-model="detail.farmId" :instance="instance" :action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{label:'name'}"/>
|
<ai-select v-if="isAdd" v-model="detail.farmId" :instance="instance"
|
||||||
|
:action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{ label: 'name' }" />
|
||||||
<b v-else v-text="detail.farmName" />
|
<b v-else v-text="detail.farmName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款银行" prop="bankId" :rules="{ required: isAdd, message: '请选择 贷款银行' }">
|
<el-form-item label="贷款银行" prop="bankId" :rules="{ required: isAdd, message: '请选择 贷款银行' }">
|
||||||
<ai-select v-if="isAdd" v-model="detail.bankId" :select-list="bankList" :prop="{label:'name'}" disabled/>
|
<ai-select v-if="isAdd" v-model="detail.bankId" :select-list="bankList" :prop="{ label: 'name' }"
|
||||||
|
disabled />
|
||||||
<b v-else v-text="detail.bankName" />
|
<b v-else v-text="detail.bankName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款产品" prop="productType" :rules="{ required: isAdd, message: '请选择 贷款产品' }">
|
<el-form-item label="贷款产品" prop="productType" :rules="{ required: isAdd, message: '请选择 贷款产品' }">
|
||||||
<ai-select v-if="isAdd" v-model="detail.productType"
|
<ai-select v-if="isAdd" v-model="detail.productType" :select-list="getProducts(detail.bankId)"
|
||||||
:select-list="getProducts(detail.bankId)" :prop="{label:'name',value:'productType'}"/>
|
:prop="{ label: 'name', value: 'productType' }" />
|
||||||
<b v-else v-text="dict.getLabel('loanProduct', detail.productType)" />
|
<b v-else v-text="dict.getLabel('loanProduct', detail.productType)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预期贷款额(万)" prop="loanAmount" :rules="{ required: isAdd, message: '请输入 预期贷款额' }">
|
<el-form-item label="预期贷款额(万)" prop="loanAmount" :rules="{ required: isAdd, message: '请输入 预期贷款额' }">
|
||||||
@@ -192,12 +195,13 @@ export default {
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
<template v-if="isAudit">
|
<template v-if="isAudit">
|
||||||
<el-form-item label="审批状态" prop="auditStatus" :rules="{ required: true, message: '请选择审批状态' }">
|
<el-form-item label="审批状态" prop="auditStatus" :rules="{ required: true, message: '请选择审批状态' }">
|
||||||
<ai-select v-model="detail.auditStatus" dict="auditStatus"/>
|
<ai-audit @change="v => $set(detail, 'auditStatus', v)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款资料" class="sc-3">
|
<el-form-item label="贷款资料" class="sc-3">
|
||||||
<ai-uploader v-model="detail.picture" value-is-url :instance="instance" :limit="1" />
|
<ai-uploader v-model="detail.picture" value-is-url :instance="instance" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款合同号" prop="contractNo" :rules="{required:true,message:'请输入 报案号'}">
|
<el-form-item label="贷款合同号" prop="contractNo"
|
||||||
|
:rules="{ required: detail.auditStatus == 2, message: '请输入 报案号' }">
|
||||||
<ai-input v-model="detail.contractNo" />
|
<ai-input v-model="detail.contractNo" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="说明">
|
<el-form-item label="说明">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex"
|
import { mapState } from "vuex"
|
||||||
|
import AiAudit from "../components/AiAudit.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "oaAdd",
|
name: "oaAdd",
|
||||||
@@ -8,6 +9,7 @@ export default {
|
|||||||
permissions: Function,
|
permissions: Function,
|
||||||
dict: Object
|
dict: Object
|
||||||
},
|
},
|
||||||
|
components:{AiAudit},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detail: { detailList: [] }
|
detail: { detailList: [] }
|
||||||
@@ -41,9 +43,9 @@ export default {
|
|||||||
},
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
const { id } = this.$route.query
|
const { id } = this.$route.query
|
||||||
return id && this.instance.post("/api/breed/out/getAuditInfo", null, {params: {id}}).then(res => {
|
return id && this.instance.post("/api/breed/out/getAuditPage", { id }).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data?.records?.[0]) {
|
||||||
const detail = res.data
|
const detail = res.data.records[0] || {}
|
||||||
return this.detail = { ...detail }
|
return this.detail = { ...detail }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -89,10 +91,10 @@ export default {
|
|||||||
<b v-text="detail.originalEarNumber" />
|
<b v-text="detail.originalEarNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类别" prop="category">
|
<el-form-item label="类别" prop="category">
|
||||||
<b v-text="detail.category"/>
|
<b v-text="dict.getLabel('category',detail.category)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="品种" prop="variety">
|
<el-form-item label="品种" prop="variety">
|
||||||
<b v-text="detail.variety"/>
|
<b v-text="dict.getLabel('variety',detail.variety)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="row flex">
|
<div class="row flex">
|
||||||
<el-form-item v-for="(img, i) in formImages" :key="i" v-bind="img">
|
<el-form-item v-for="(img, i) in formImages" :key="i" v-bind="img">
|
||||||
@@ -116,7 +118,7 @@ export default {
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
<template v-if="isAudit">
|
<template v-if="isAudit">
|
||||||
<el-form-item label="审批状态" prop="auditStatus" :rules="{ required: true, message: '请选择审批状态' }">
|
<el-form-item label="审批状态" prop="auditStatus" :rules="{ required: true, message: '请选择审批状态' }">
|
||||||
<ai-select v-model="detail.auditStatus" dict="auditStatus"/>
|
<ai-audit @change="v => $set(detail, 'auditStatus', v)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="意见">
|
<el-form-item label="意见">
|
||||||
<ai-input type="textarea" :rows="3" v-model="detail.remark" />
|
<ai-input type="textarea" :rows="3" v-model="detail.remark" />
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ export default {
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.detail.validate().then(() => {
|
this.$refs.detail.validate().then(() => {
|
||||||
this.instance.post("/api/sell/apply/add", {...this.detail}).then(res => {
|
const earNumberList = this.detail.detailList.map(e => e.biochipEarNumber)
|
||||||
|
this.instance.post("/api/sell/apply/add", { ...this.detail, earNumberList }).then(res => {
|
||||||
if (res?.code == '0') {
|
if (res?.code == '0') {
|
||||||
this.$message.success("提交成功!")
|
this.$message.success("提交成功!")
|
||||||
this.back()
|
this.back()
|
||||||
@@ -90,7 +91,7 @@ export default {
|
|||||||
<el-form-item label="贷款产品" prop="productType" :rules="{ message: '请选择 贷款产品' }">
|
<el-form-item label="贷款产品" prop="productType" :rules="{ message: '请选择 贷款产品' }">
|
||||||
<b v-text="dict.getLabel('loanProduct', detail.productType)" />
|
<b v-text="dict.getLabel('loanProduct', detail.productType)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="贷款金额(万)" prop="loanAmount" :rules="{message:'请输入 预期贷款额'}">
|
<el-form-item label="贷款金额(万)" prop="loanAmount">
|
||||||
<ai-input v-model.number="detail.loanAmount" :edit="!1" />
|
<ai-input v-model.number="detail.loanAmount" :edit="!1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系人" prop="contacts" :rules="{ message: '请输入 联系人' }">
|
<el-form-item label="联系人" prop="contacts" :rules="{ message: '请输入 联系人' }">
|
||||||
@@ -103,12 +104,13 @@ export default {
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="标的信息">
|
<ai-card title="标的信息">
|
||||||
<template #right v-if="isEdit">
|
<template #right v-if="isEdit">
|
||||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
<ai-eartag-picker @select="v => detail.detailList = v.map(e=>({biochipEarNumber:e}))" :instance="instance"
|
||||||
:action="`/api/sell/apply/getClaimEarNumberList?contractNo=${detail.contractNo}`">
|
:action="`/api/sell/apply/getClaimEarNumberList?contractNo=${detail.contractNo}`">
|
||||||
<el-button type="text">选择</el-button>
|
<el-button type="text">选择</el-button>
|
||||||
</ai-eartag-picker>
|
</ai-eartag-picker>
|
||||||
</template>
|
</template>
|
||||||
<ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber||0}只,已理赔标的共 @v 只`" color="red" :value="selectedEartags"/>
|
<ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber || 0}只,已理赔标的共 @v 只`" color="red"
|
||||||
|
:value="selectedEartags" />
|
||||||
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions />
|
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions />
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="解押材料" v-if="isEdit">
|
<ai-card title="解押材料" v-if="isEdit">
|
||||||
|
|||||||
19
project/xumu/components/AiAudit.vue
Normal file
19
project/xumu/components/AiAudit.vue
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<script>
|
||||||
|
const options = [
|
||||||
|
{ dictValue: 2, dictName: '同意' },
|
||||||
|
{ dictValue: 3, dictName: '不同意' }
|
||||||
|
]
|
||||||
|
export default {
|
||||||
|
name: "AiAudit",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options, auditStatus: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<section class="AiAudit">
|
||||||
|
<ai-select v-model="auditStatus" :select-list="options" v-bind="$attrs" v-on="$listeners" />
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
@@ -5,7 +5,8 @@ export default {
|
|||||||
instance: Function,
|
instance: Function,
|
||||||
value: { default: () => [] },
|
value: { default: () => [] },
|
||||||
action: { default: "/api/breed/earTag/getEarTagByPenId" },
|
action: { default: "/api/breed/earTag/getEarTagByPenId" },
|
||||||
penId: String
|
penId: String,
|
||||||
|
valueKey: { type: String, default: "biochipEarNumber" }
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
prop: "value",
|
prop: "value",
|
||||||
@@ -15,7 +16,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
dialog: false,
|
dialog: false,
|
||||||
selected: []
|
selected: [],
|
||||||
|
origin: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -39,14 +41,22 @@ export default {
|
|||||||
getEartag() {
|
getEartag() {
|
||||||
!/undefined/.test(this.api) && this.instance.post(this.api).then(res => {
|
!/undefined/.test(this.api) && this.instance.post(this.api).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.list = res.data?.map(v => ({ key: v, label: v })) || []
|
const key = this.valueKey
|
||||||
|
this.origin = res.data ?? []
|
||||||
|
this.list = res.data?.map(v => {
|
||||||
|
if (typeof v == 'string') {
|
||||||
|
return { key: v, label: v }
|
||||||
|
} else if (key) {
|
||||||
|
return { key: v[key], label: v[key] }
|
||||||
|
}
|
||||||
|
}) || []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
this.$emit("input", this.selected)
|
this.$emit("input", this.selected)
|
||||||
this.$emit("select", this.list.filter(v => this.selected.includes(v.id)))
|
this.$emit("select", this.origin.filter(v => this.selected.includes(v?.[this.valueKey] ?? v)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,10 +68,10 @@ export default {
|
|||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<el-select v-else :value="value" clearable multiple placeholder="请选择">
|
<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" />
|
<el-option v-for="(op, i) in list" :key="i" :label="op.label" :value="op.key" />
|
||||||
<div slot="prefix" @click.stop="dialog = true" />
|
<div slot="prefix" @click.stop="dialog = true" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<ai-dialog v-model="dialog" title="选择牲畜" width="640px" @confirm="handleConfirm" @closed="selected = []"
|
<ai-dialog v-model="dialog" title="选择牲畜" width="800px" @confirm="handleConfirm" @closed="selected = []"
|
||||||
@open="selected = value">
|
@open="selected = value">
|
||||||
<el-transfer :data="list" v-model="selected" :titles="['可选', '已选择']" />
|
<el-transfer :data="list" v-model="selected" :titles="['可选', '已选择']" />
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
@@ -90,5 +100,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-transfer) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.el-transfer-panel {
|
||||||
|
width: auto;
|
||||||
|
min-width: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@import "ckeditor";
|
@import "ckeditor";
|
||||||
@import "vars";
|
@import "vars";
|
||||||
|
|
||||||
$cdn: "https://cdn.cunwuyun.cn/";
|
$cdn: "https://cdn.sinoecare.com/";
|
||||||
$--color-primary: $primaryColor;
|
$--color-primary: $primaryColor;
|
||||||
$--color-text-placeholder: $placeholderColor;
|
$--color-text-placeholder: $placeholderColor;
|
||||||
$--border-color-base: $borderColor;
|
$--border-color-base: $borderColor;
|
||||||
@@ -164,7 +164,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|||||||
缺省页相关样式
|
缺省页相关样式
|
||||||
*/
|
*/
|
||||||
.no-data {
|
.no-data {
|
||||||
background: url("https://cdn.cunwuyun.cn/ui/svg/NoData.svg") no-repeat center;
|
background: url("https://cdn.sinoecare.com/ui/svg/NoData.svg") no-repeat center;
|
||||||
background-size: 120px 120px;
|
background-size: 120px 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
margin: 48px auto 10px;
|
margin: 48px auto 10px;
|
||||||
@@ -174,28 +174,28 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|||||||
缺省页相关样式
|
缺省页相关样式
|
||||||
*/
|
*/
|
||||||
.ai-empty__bg {
|
.ai-empty__bg {
|
||||||
background: url("https://cdn.cunwuyun.cn/ui/svg/empty.svg") no-repeat center;
|
background: url("https://cdn.sinoecare.com/ui/svg/empty.svg") no-repeat center;
|
||||||
background-size: 120px 120px;
|
background-size: 120px 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
margin: 48px auto 0;
|
margin: 48px auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-permission {
|
.no-permission {
|
||||||
background: url("https://cdn.cunwuyun.cn/ui/svg/NoAuthority.svg") no-repeat center;
|
background: url("https://cdn.sinoecare.com/ui/svg/NoAuthority.svg") no-repeat center;
|
||||||
background-size: 120px 120px;
|
background-size: 120px 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
margin-top: 48px;
|
margin-top: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-message {
|
.no-message {
|
||||||
background: url("https://cdn.cunwuyun.cn/ui/svg/NoMessage.svg") no-repeat center;
|
background: url("https://cdn.sinoecare.com/ui/svg/NoMessage.svg") no-repeat center;
|
||||||
background-size: 120px 120px;
|
background-size: 120px 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
margin-top: 48px;
|
margin-top: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.done-success {
|
.done-success {
|
||||||
background: url("https://cdn.cunwuyun.cn/ui/svg/Success.svg") no-repeat center;
|
background: url("https://cdn.sinoecare.com/ui/svg/Success.svg") no-repeat center;
|
||||||
background-size: 120px 120px;
|
background-size: 120px 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.developing {
|
.developing {
|
||||||
background: url("https://cdn.cunwuyun.cn/ui/svg/developing.svg") no-repeat center;
|
background: url("https://cdn.sinoecare.com/ui/svg/developing.svg") no-repeat center;
|
||||||
background-size: 400px 320px;
|
background-size: 400px 320px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -657,11 +657,11 @@ h1, h2, h3, p {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.signLeftBg {
|
.signLeftBg {
|
||||||
background-image: url('#{$cdn}/ui/background/#{$theme}/loginLeft.png');
|
background-image: url('#{$cdn}ui/background/#{$theme}/loginLeft.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
.navBg {
|
.navBg {
|
||||||
background-image: url('#{$cdn}/ui/background/#{$theme}/nav_bg.png');
|
background-image: url('#{$cdn}ui/background/#{$theme}/nav_bg.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user