Merge remote-tracking branch 'origin/master'
# Conflicts: # src/api/crm/contractaauthorizedcompany/index.ts # src/api/crm/contractaauthorizedperson/index.ts # src/api/crm/contractbauthorizedperson/index.ts # src/views/crm/business/components/BusinessProductForm.vue # src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue # src/views/crm/contract/components/ContractAAuthorizedPersonForm.vue # src/views/crm/contract/components/ContractBAuthorizedPersonForm.vue # src/views/crm/quotation/QuotationForm.vuepull/781/head
commit
211a982241
|
|
@ -4,7 +4,7 @@ NODE_ENV=development
|
||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://192.168.251.60:48080'
|
VITE_BASE_URL='http://172.22.3.6:48080'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ export interface BusinessVO {
|
||||||
dealTime: Date
|
dealTime: Date
|
||||||
totalProductPrice: number
|
totalProductPrice: number
|
||||||
totalPrice: number
|
totalPrice: number
|
||||||
discountPercent: number
|
|
||||||
remark: string
|
remark: string
|
||||||
creator: string // 创建人
|
creator: string // 创建人
|
||||||
creatorName?: string // 创建人名称
|
creatorName?: string // 创建人名称
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export interface ContractAAuthorizedCompanyVO {
|
||||||
companyBank: string // 开户行
|
companyBank: string // 开户行
|
||||||
companyAccount: string // 开户账号
|
companyAccount: string // 开户账号
|
||||||
companyAddress: string // 通讯地址
|
companyAddress: string // 通讯地址
|
||||||
deletedFlag: number // 删除标记:1-正常,-1-已删除
|
deleted: number // 删除标记:1-正常,-1-已删除
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合同甲方关联单位 API
|
// 合同甲方关联单位 API
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export interface ContractAAuthorizedPersonVO {
|
||||||
wechat: string // 微信号
|
wechat: string // 微信号
|
||||||
idNumber: string // 身份证号
|
idNumber: string // 身份证号
|
||||||
email: string // 电子邮箱
|
email: string // 电子邮箱
|
||||||
deletedFlag: number // 删除标记:1-正常,-1-已删除
|
deleted: number // 删除标记:1-正常,-1-已删除
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合同甲方授权人信息 API
|
// 合同甲方授权人信息 API
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export interface ContractBAuthorizedPersonVO {
|
||||||
phoneNumber: string // 手机号
|
phoneNumber: string // 手机号
|
||||||
wechat: string // 微信号
|
wechat: string // 微信号
|
||||||
email: string // 电子邮箱
|
email: string // 电子邮箱
|
||||||
deletedFlag: number // 删除标记:1-正常,-1-已删除
|
deleted: number // 删除标记:1-正常,-1-已删除
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合同乙方授权人信息 API
|
// 合同乙方授权人信息 API
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ export interface ProductVO {
|
||||||
price: number
|
price: number
|
||||||
status: number
|
status: number
|
||||||
categoryId: number
|
categoryId: number
|
||||||
|
offlinePrice: number
|
||||||
|
onlinePrice: number
|
||||||
|
totalPrice: number
|
||||||
categoryName?: string
|
categoryName?: string
|
||||||
description: string
|
description: string
|
||||||
ownerUserId: number
|
ownerUserId: number
|
||||||
|
|
|
||||||
|
|
@ -217,11 +217,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="折扣后金额" prop="price">
|
<el-form-item label="总金额" prop="totalPrice">
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
v-model="formData.totalPrice"
|
v-model="formData.totalPrice"
|
||||||
placeholder="请输入商机金额"
|
|
||||||
:formatter="erpPriceInputFormatter"
|
:formatter="erpPriceInputFormatter"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
|
@ -130,10 +130,10 @@ watch(
|
||||||
}
|
}
|
||||||
// 循环处理
|
// 循环处理
|
||||||
val.forEach((item) => {
|
val.forEach((item) => {
|
||||||
if (item.businessPrice != null && item.count != null) {
|
if (item.offlinePrice != null && item.onlinePrice != null) {
|
||||||
item.totalPrice = item.offlinePrice + item.onlinePrice
|
item.totalPrice = item.offlinePrice + item.onlinePrice
|
||||||
} else {
|
} else {
|
||||||
item.totalPrice = undefined
|
item.totalPrice = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,8 @@
|
||||||
/>
|
/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-row class="mt-10px" justify="end">
|
<el-row class="mt-10px" justify="end">
|
||||||
<el-col :span="3"> 整单折扣:{{ erpPriceInputFormatter(business.discountPercent) }}% </el-col>
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
产品总金额:{{ erpPriceInputFormatter(business.totalProductPrice) }} 元
|
总金额:{{ erpPriceInputFormatter(business.totalPrice) }} 元
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.ownerUserId"
|
v-model="formData.ownerUserId"
|
||||||
:disabled="formType !== 'create'"
|
:disabled="formType !== 'create'"
|
||||||
|
filterable
|
||||||
class="w-1/1"
|
class="w-1/1"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -36,6 +37,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="formData.customerDefault"
|
:disabled="formData.customerDefault"
|
||||||
v-model="formData.customerId"
|
v-model="formData.customerId"
|
||||||
|
filterable
|
||||||
placeholder="请选择客户"
|
placeholder="请选择客户"
|
||||||
class="w-1/1"
|
class="w-1/1"
|
||||||
>
|
>
|
||||||
|
|
@ -113,7 +115,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="直属上级" prop="parentId">
|
<el-form-item label="直属上级" prop="parentId">
|
||||||
<el-select v-model="formData.parentId" placeholder="请选择直属上级" class="w-1/1">
|
<el-select v-model="formData.parentId" filterable placeholder="请选择直属上级" class="w-1/1">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in contactList"
|
v-for="item in contactList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
|
||||||
|
|
@ -58,13 +58,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="删除标记:1-正常,-1-已删除" min-width="150">
|
|
||||||
<template #default="{ row, $index }">
|
|
||||||
<el-form-item :prop="`${$index}.deletedFlag`" :rules="formRules.deletedFlag" class="mb-0px!">
|
|
||||||
<el-input v-model="row.deletedFlag" placeholder="请输入删除标记:1-正常,-1-已删除" />
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" fixed="right" label="操作" width="60">
|
<el-table-column align="center" fixed="right" label="操作" width="60">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<el-button @click="handleDelete($index)" link>—</el-button>
|
<el-button @click="handleDelete($index)" link>—</el-button>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,12 @@
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.authPersonType`" :rules="formRules.authPersonType" class="mb-0px!">
|
<el-form-item :prop="`${$index}.authPersonType`" :rules="formRules.authPersonType" class="mb-0px!">
|
||||||
<el-select v-model="row.authPersonType" placeholder="请选择授权人类型">
|
<el-select v-model="row.authPersonType" placeholder="请选择授权人类型">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions('auth_person_type')"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -60,13 +65,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="删除标记:1-正常,-1-已删除" min-width="150">
|
|
||||||
<template #default="{ row, $index }">
|
|
||||||
<el-form-item :prop="`${$index}.deletedFlag`" :rules="formRules.deletedFlag" class="mb-0px!">
|
|
||||||
<el-input v-model="row.deletedFlag" placeholder="请输入删除标记:1-正常,-1-已删除" />
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" fixed="right" label="操作" width="60">
|
<el-table-column align="center" fixed="right" label="操作" width="60">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<el-button @click="handleDelete($index)" link>—</el-button>
|
<el-button @click="handleDelete($index)" link>—</el-button>
|
||||||
|
|
@ -80,6 +78,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as ContractApi from '@/api/crm/contract'
|
import * as ContractApi from '@/api/crm/contract'
|
||||||
|
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getBoolDictOptions } from '@/utils/dict'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
contractId: undefined // 合同ID(主表的关联字段)
|
contractId: undefined // 合同ID(主表的关联字段)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,12 @@
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.authType`" :rules="formRules.authType" class="mb-0px!">
|
<el-form-item :prop="`${$index}.authType`" :rules="formRules.authType" class="mb-0px!">
|
||||||
<el-select v-model="row.authType" placeholder="请选择类别">
|
<el-select v-model="row.authType" placeholder="请选择类别">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions('auth_type')"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -74,13 +79,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="删除标记:1-正常,-1-已删除" min-width="150">
|
|
||||||
<template #default="{ row, $index }">
|
|
||||||
<el-form-item :prop="`${$index}.deletedFlag`" :rules="formRules.deletedFlag" class="mb-0px!">
|
|
||||||
<el-input v-model="row.deletedFlag" placeholder="请输入删除标记:1-正常,-1-已删除" />
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" fixed="right" label="操作" width="60">
|
<el-table-column align="center" fixed="right" label="操作" width="60">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<el-button @click="handleDelete($index)" link>—</el-button>
|
<el-button @click="handleDelete($index)" link>—</el-button>
|
||||||
|
|
@ -94,6 +92,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as ContractApi from '@/api/crm/contract'
|
import * as ContractApi from '@/api/crm/contract'
|
||||||
|
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getBoolDictOptions } from '@/utils/dict'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
contractId: undefined // 合同ID(主表的关联字段)
|
contractId: undefined // 合同ID(主表的关联字段)
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,8 @@
|
||||||
/>
|
/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-row class="mt-10px" justify="end">
|
<el-row class="mt-10px" justify="end">
|
||||||
<el-col :span="3"> 整单折扣:{{ erpPriceInputFormatter(contract.discountPercent) }}% </el-col>
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
产品总金额:{{ erpPriceInputFormatter(contract.totalProductPrice) }} 元
|
总金额:{{ erpPriceInputFormatter(contract.totalPrice) }} 元
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
<Dialog v-model="dialogVisible" :title="dialogTitle" width="50%">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
<el-descriptions-item label="客户来源">
|
<el-descriptions-item label="客户来源">
|
||||||
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="customer.source" />
|
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="customer.source" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="合作类型">{{ customer.cooperationType }}</el-descriptions-item>
|
<el-descriptions-item label="合作类型">{{ getName(getIntDictOptions(DICT_TYPE.CRM_COOPERATION_TYPE),customer.cooperationType) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="合作地区">{{ customer.cooperationArea }}</el-descriptions-item>
|
<el-descriptions-item label="合作地区">{{ getName(getIntDictOptions(DICT_TYPE.CRM_COOPERATION_AREA),customer.cooperationArea) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="客户级别">
|
<el-descriptions-item label="客户级别">
|
||||||
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="customer.level" />
|
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="customer.level" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as CustomerApi from '@/api/crm/customer'
|
import * as CustomerApi from '@/api/crm/customer'
|
||||||
import { DICT_TYPE } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
defineOptions({ name: 'CrmCustomerDetailsInfo' })
|
defineOptions({ name: 'CrmCustomerDetailsInfo' })
|
||||||
|
|
@ -75,5 +75,11 @@ const { customer } = defineProps<{
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const activeNames = ref(['basicInfo', 'systemInfo']) // 展示的折叠面板
|
const activeNames = ref(['basicInfo', 'systemInfo']) // 展示的折叠面板
|
||||||
|
const getName = (opt, val) => {
|
||||||
|
console.log('%csrc/views/crm/customer/detail/CustomerDetailsInfo.vue:79 opt, val', 'color: #007acc;', opt, val);
|
||||||
|
const arr = opt.filter(v => v.value == val)
|
||||||
|
console.log('%csrc/views/crm/customer/detail/CustomerDetailsInfo.vue:81 arr', 'color: #007acc;', arr);
|
||||||
|
return arr.length ? arr[0]['label'] : ''
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<el-tab-pane label="联系人" lazy>
|
<el-tab-pane label="联系人" lazy>
|
||||||
<ContactList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
|
<ContactList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="团队成员">
|
<el-tab-pane label="团队成员">
|
||||||
<PermissionList
|
<PermissionList
|
||||||
ref="permissionListRef"
|
ref="permissionListRef"
|
||||||
:biz-id="customer.id!"
|
:biz-id="customer.id!"
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
:show-action="!permissionListRef?.isPool || false"
|
:show-action="!permissionListRef?.isPool || false"
|
||||||
@quit-team="close"
|
@quit-team="close"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane> -->
|
</el-tab-pane>
|
||||||
<el-tab-pane label="商机" lazy>
|
<el-tab-pane label="商机" lazy>
|
||||||
<BusinessList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
|
<BusinessList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="100px"
|
label-width="110px"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
<Icon class="mr-5px" icon="ep:plus" />
|
<Icon class="mr-5px" icon="ep:plus" />
|
||||||
添加联系人
|
添加联系人
|
||||||
</el-button>
|
</el-button>
|
||||||
<FollowUpRecordContactForm :contacts="formData.contacts" />
|
<FollowUpRecordContactForm @success="del" :contacts="formData.contacts" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -111,7 +111,9 @@ const formData = ref({
|
||||||
nextTime: undefined,
|
nextTime: undefined,
|
||||||
picUrls: undefined,
|
picUrls: undefined,
|
||||||
fileUrls: undefined,
|
fileUrls: undefined,
|
||||||
contactIds: undefined
|
contactIds: undefined,
|
||||||
|
contacts: []
|
||||||
|
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
|
|
@ -126,6 +128,18 @@ const contactTableSelectRef = ref<InstanceType<typeof ContactListModal>>()
|
||||||
const handleOpenContact = () => {
|
const handleOpenContact = () => {
|
||||||
contactTableSelectRef.value?.open()
|
contactTableSelectRef.value?.open()
|
||||||
}
|
}
|
||||||
|
const handleAddContact = (contactId: [], newContacts: ContactApi.ContactVO[]) => {
|
||||||
|
newContacts.forEach((contact) => {
|
||||||
|
if (!formData.value.contacts.some((item) => item.id === contact.id)) {
|
||||||
|
formData.value.contacts.push(contact)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const del = (index: number) => {
|
||||||
|
formData.value.contacts.splice(index, 1)
|
||||||
|
|
||||||
|
}
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (bizType: number, bizId: number) => {
|
const open = async (bizType: number, bizId: number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|
@ -145,14 +159,12 @@ const submitForm = async () => {
|
||||||
// 提交请求
|
// 提交请求
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const data = formData.value as unknown as ReturnVisitRecordVO
|
const data = {
|
||||||
if (formType.value === 'create') {
|
...formData.value,
|
||||||
|
contactIds: formData.value.contacts.map((item) => item.id),
|
||||||
|
} as unknown as ReturnVisitRecordVO
|
||||||
await ReturnVisitRecordApi.createReturnVisitRecord(data)
|
await ReturnVisitRecordApi.createReturnVisitRecord(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
|
||||||
await ReturnVisitRecordApi.updateReturnVisitRecord(data)
|
|
||||||
message.success(t('common.updateSuccess'))
|
|
||||||
}
|
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
|
|
@ -172,6 +184,7 @@ const resetForm = () => {
|
||||||
nextTime: undefined,
|
nextTime: undefined,
|
||||||
picUrls: undefined,
|
picUrls: undefined,
|
||||||
fileUrls: undefined,
|
fileUrls: undefined,
|
||||||
|
contacts: [] ,
|
||||||
contactIds: undefined
|
contactIds: undefined
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope.row.id)"
|
@click="handleDelete(scope.row.id)"
|
||||||
v-hasPermi="['crm:return-visit-record:delete']"
|
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
<Icon class="mr-5px" icon="ep:plus" />
|
<Icon class="mr-5px" icon="ep:plus" />
|
||||||
添加联系人
|
添加联系人
|
||||||
</el-button>
|
</el-button>
|
||||||
<FollowUpRecordContactForm :contacts="formData.contacts" />
|
<FollowUpRecordContactForm @success="del" :contacts="formData.contacts" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="formData.bizType == BizTypeEnum.CRM_CUSTOMER">
|
<el-col :span="24" v-if="formData.bizType == BizTypeEnum.CRM_CUSTOMER">
|
||||||
|
|
@ -162,6 +162,10 @@ const handleAddContact = (contactId: [], newContacts: ContactApi.ContactVO[]) =>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const del = (index: number) => {
|
||||||
|
formData.value.contacts.splice(index, 1)
|
||||||
|
|
||||||
|
}
|
||||||
/** 关联商机 */
|
/** 关联商机 */
|
||||||
const businessTableSelectRef = ref<InstanceType<typeof BusinessListModal>>()
|
const businessTableSelectRef = ref<InstanceType<typeof BusinessListModal>>()
|
||||||
const handleOpenBusiness = () => {
|
const handleOpenBusiness = () => {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" fixed="right" label="操作" width="130">
|
<el-table-column align="center" fixed="right" label="操作" width="130">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"> 移除</el-button>
|
<el-button link type="danger" @click="handleDelete(scope.$index)"> 移除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -40,8 +40,10 @@ watch(
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = (index: number) => {
|
const handleDelete = (index: number) => {
|
||||||
formData.value.splice(index, 1)
|
emit('success', index)
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="50%">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="100px"
|
label-width="110px"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="总金额" prop="price">
|
<el-form-item label="总金额" prop="totalPrice">
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
v-model="formData.totalPrice"
|
v-model="formData.totalPrice"
|
||||||
|
|
@ -403,6 +403,8 @@ const formData = ref({
|
||||||
creator: undefined,
|
creator: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updater: undefined,
|
updater: undefined,
|
||||||
|
onlinePrice: undefined,
|
||||||
|
offlinePrice: undefined,
|
||||||
totalPrice: undefined,
|
totalPrice: undefined,
|
||||||
cooperationType: undefined, // 合作类型
|
cooperationType: undefined, // 合作类型
|
||||||
companyType: undefined, // 公司类型
|
companyType: undefined, // 公司类型
|
||||||
|
|
@ -449,6 +451,8 @@ const onBusinessChange = async (businessId: string) => {
|
||||||
formData.value.creditMethod = res.creditMethod;
|
formData.value.creditMethod = res.creditMethod;
|
||||||
formData.value.creditCalcCycle = res.creditCalcCycle;
|
formData.value.creditCalcCycle = res.creditCalcCycle;
|
||||||
formData.value.deptId = res.deptId;
|
formData.value.deptId = res.deptId;
|
||||||
|
formData.value.offlinePrice = res.offlinePrice;
|
||||||
|
formData.value.onlinePrice = res.onlinePrice;
|
||||||
formData.value.totalPrice = res.totalPrice;
|
formData.value.totalPrice = res.totalPrice;
|
||||||
// 🔁 自动加载客户详情
|
// 🔁 自动加载客户详情
|
||||||
await onCustomerChange(res.customerId);
|
await onCustomerChange(res.customerId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue