|
|
@@ -39,8 +39,8 @@
|
|
|
</el-row>
|
|
|
</el-radio-group>
|
|
|
<div v-if="functionForm.quoteCompany == 2" style="display: flex; justify-content: flex-start; flex-wrap: wrap">
|
|
|
- <div style="display: flex; align-items: center; padding: 3px 16px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px; width: 240px" v-for="(item, index) in companySelected">
|
|
|
- <span>{{ item.nameSimple }}</span>
|
|
|
+ <div style="display: flex; align-items: center; padding: 3px 16px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px; width: 240px; margin-top: 10px" v-for="(item, index) in companySelected">
|
|
|
+ <span>{{ item?.nameSimple }}</span>
|
|
|
<el-icon style=" margin-left: 20px;cursor: pointer;" @click="handleDelete(item, index)"><Close /></el-icon></div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
@@ -187,6 +187,20 @@ const initCompany = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+let newCompany = ref([])
|
|
|
+const initNewCompany = () => {
|
|
|
+ api.configurate.gainTopList().then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ newCompany.value = res.data
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 机构
|
|
|
let institutionList = ref([])
|
|
|
const initInstitution = (val) => {
|
|
|
@@ -214,10 +228,8 @@ const handleEdit = () => {
|
|
|
functionForm.value.salesmanWithdrawAccountAuditDeptList = functionForm.value.salesmanWithdrawAccountAuditDeptList[0]
|
|
|
functionForm.value.salesmanWithdrawPaymentAuditDeptList = functionForm.value.salesmanWithdrawPaymentAuditDeptList[0]
|
|
|
if(functionForm.value.quoteCompanyList.length > 0) {
|
|
|
- companySelected.value = functionForm.value.quoteCompanyList.map(a => {
|
|
|
- let obj = company.value.find(b => b.id === a)
|
|
|
- return obj || null
|
|
|
- })
|
|
|
+ companySelected.value = newCompany.value.filter(a => functionForm.value.quoteCompanyList.find(b => b === a.id))
|
|
|
+ console.log(123, companySelected.value)
|
|
|
}
|
|
|
} else {
|
|
|
ElMessage.error(res.msg)
|
|
|
@@ -317,6 +329,7 @@ const handleComfirm = () => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
initCompany()
|
|
|
+ initNewCompany()
|
|
|
})
|
|
|
|
|
|
</script>
|