Merge remote-tracking branch 'origin/master'
commit
46c0fb56fa
|
|
@ -125,6 +125,11 @@ export const getRemindContractCount = async () => {
|
|||
return await request.get({ url: '/crm/contract/remind-count' })
|
||||
}
|
||||
|
||||
// 合作主主体
|
||||
export const getOrg = async (params) => {
|
||||
return await request.get({ url: '/system/organizations/page', params })
|
||||
}
|
||||
|
||||
// ==================== 子表(CRM 合同产品关联) ====================
|
||||
|
||||
// 获得CRM 合同产品关联列表
|
||||
|
|
|
|||
|
|
@ -557,11 +557,12 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
component: () => import('@/views/crm/billtemplate/BillTemplateForm.vue')
|
||||
},
|
||||
{
|
||||
path: 'business/quotationAdd',
|
||||
path: 'quotation/QuotationForm',
|
||||
name: 'QuotationAdd',
|
||||
meta: {
|
||||
title: '方案报价新增',
|
||||
noCache: true,
|
||||
canTo: true,
|
||||
hidden: true,
|
||||
activeMenu: '/crm/quotation'
|
||||
},
|
||||
|
|
@ -579,11 +580,12 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
component: () => import('@/views/crm/quotation/QuotationForm.vue')
|
||||
},
|
||||
{
|
||||
path: 'business/quotationDetail',
|
||||
path: 'quotation/quotationDetail',
|
||||
name: 'QuotationDetail',
|
||||
meta: {
|
||||
title: '方案报价详情',
|
||||
noCache: true,
|
||||
canTo: true,
|
||||
hidden: true,
|
||||
activeMenu: '/crm/quotation'
|
||||
},
|
||||
|
|
@ -645,11 +647,12 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
component: () => import('@/views/crm/contract/ContractChange.vue')
|
||||
},
|
||||
{
|
||||
path: 'contract/detail/:id',
|
||||
path: 'contract/detail/index',
|
||||
name: 'CrmContractDetail',
|
||||
meta: {
|
||||
title: '合同详情',
|
||||
noCache: true,
|
||||
canTo: true,
|
||||
hidden: true,
|
||||
activeMenu: '/crm/contract'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,16 +8,17 @@
|
|||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="no">
|
||||
<el-input v-model="formData.no" placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="formType">
|
||||
<el-form-item label="合同编号" prop="no">
|
||||
<el-input v-model="formData.no" placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
|
@ -264,7 +265,7 @@
|
|||
<el-form-item label="合作主体" prop="partnerCompanyId">
|
||||
<el-select v-model="formData.partnerCompanyId" placeholder="请选择合作主体" disabled >
|
||||
<el-option
|
||||
v-for="dict in deptList"
|
||||
v-for="dict in orgList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
|
|
@ -378,11 +379,14 @@ import ContractProductForm from '@/views/crm/contract/components/ContractProduct
|
|||
import ContractAAuthorizedCompanyForm from './components/ContractAAuthorizedCompanyForm.vue'
|
||||
import ContractAAuthorizedPersonForm from './components/ContractAAuthorizedPersonForm.vue'
|
||||
import ContractBAuthorizedPersonForm from './components/ContractBAuthorizedPersonForm.vue'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.number.def(undefined)
|
||||
})
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
|
|
@ -436,6 +440,7 @@ const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
|||
const customerList = ref([]) // 客户列表的数据
|
||||
const quotationList = ref<QuotationVO[]>([])
|
||||
const contactList = ref<ContactApi.ContactVO[]>([])
|
||||
const orgList = ref([])
|
||||
|
||||
/** 子表的表单 */
|
||||
const subTabsName = ref('product')
|
||||
|
|
@ -626,7 +631,7 @@ const getContactOptions = computed(() =>
|
|||
|
||||
const route = useRoute();
|
||||
onMounted(async () => {
|
||||
formType.value = route.query.id;
|
||||
formType.value = props.id || route.query.id
|
||||
|
||||
if (formType.value) open(formType.value)
|
||||
|
||||
|
|
@ -643,5 +648,10 @@ onMounted(async () => {
|
|||
// }
|
||||
// 获取联系人
|
||||
contactList.value = await ContactApi.getSimpleContactList()
|
||||
const data = await ContractApi.getOrg({
|
||||
pageNo: 1,
|
||||
pageSize: 1000
|
||||
})
|
||||
orgList.value = data.list
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -65,9 +65,10 @@ import PermissionList from '@/views/crm/permission/components/PermissionList.vue
|
|||
import FollowUpList from '@/views/crm/followup/index.vue'
|
||||
import ReceivableList from '@/views/crm/receivable/components/ReceivableList.vue'
|
||||
import ReceivablePlanList from '@/views/crm/receivable/plan/components/ReceivablePlanList.vue'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
|
||||
defineOptions({ name: 'CrmContractDetail' })
|
||||
const props = defineProps<{ id?: number }>()
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const message = useMessage()
|
||||
|
|
@ -75,7 +76,9 @@ const contractId = ref(0) // 编号
|
|||
const loading = ref(true) // 加载中
|
||||
const contract = ref<ContractApi.ContractVO>({} as ContractApi.ContractVO) // 详情
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>() // 团队成员列表 Ref
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.number.def(undefined)
|
||||
})
|
||||
/** 编辑 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
|
|
@ -127,7 +130,7 @@ const close = () => {
|
|||
|
||||
/** 初始化 */
|
||||
onMounted(async () => {
|
||||
const id = props.id || route.params.id
|
||||
const id = props.id || route.query.id
|
||||
if (!id) {
|
||||
message.warning('参数错误,合同不能为空!')
|
||||
close()
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
<el-table-column align="center" fixed="left" label="合同编号" prop="no" width="180" />
|
||||
<el-table-column align="center" fixed="left" label="合同名称" prop="name" width="160">
|
||||
<template #default="scope">
|
||||
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
|
||||
<el-link :underline="false" type="primary" @click="openDetail(scope.row)">
|
||||
{{ scope.row.name }}
|
||||
</el-link>
|
||||
</template>
|
||||
|
|
@ -229,17 +229,17 @@
|
|||
<el-button
|
||||
v-else
|
||||
link
|
||||
v-hasPermi="['crm:contract:update']"
|
||||
v-hasPermi="['crm:customer-suggestion:query']"
|
||||
type="primary"
|
||||
@click="handleProcessDetail(scope.row)"
|
||||
>
|
||||
查看审批
|
||||
进度
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasPermi="['crm:contract:query']"
|
||||
link
|
||||
type="primary"
|
||||
@click="openDetail(scope.row.id)"
|
||||
@click="openDetail(scope.row)"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
|
|
@ -327,6 +327,7 @@ const resetQuery = () => {
|
|||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const router = useRouter() // 路由
|
||||
|
||||
const openFormEdit = (row: Object) => {
|
||||
|
||||
|
|
@ -340,8 +341,8 @@ const openFormDetail = (row: Object) => {
|
|||
|
||||
push({ name: 'CrmContractDetail', query: { id: row.id } })
|
||||
}
|
||||
const handleChange = (row: Object) => {
|
||||
push({ name: 'CrmContractChange', query: { id: row.id } })
|
||||
const handleChange = (row) => {
|
||||
router.push({ name: 'CrmContractChange', query: { id: row.id } })
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -382,19 +383,19 @@ const handleSubmit = async (row: ContractApi.ContractVO) => {
|
|||
}
|
||||
|
||||
/** 查看审批 */
|
||||
const handleProcessDetail = (row: ContractApi.ContractVO) => {
|
||||
push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })
|
||||
const handleProcessDetail = (row) => {
|
||||
router.push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })
|
||||
}
|
||||
|
||||
/** 打开合同详情 */
|
||||
const { push } = useRouter()
|
||||
const openDetail = (id: number) => {
|
||||
push({ name: 'CrmContractDetail', params: { id } })
|
||||
const openDetail = (row) => {
|
||||
router.push({ name: 'CrmContractDetail', query: { id: row.id } })
|
||||
}
|
||||
|
||||
/** 打开客户详情 */
|
||||
const openCustomerDetail = (id: number) => {
|
||||
push({ name: 'CrmCustomerDetail', params: { id } })
|
||||
router.push({ name: 'CrmCustomerDetail', query: { id } })
|
||||
}
|
||||
|
||||
/** 打开联系人详情 */
|
||||
|
|
|
|||
|
|
@ -361,6 +361,7 @@ import * as UserApi from '@/api/system/user'
|
|||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as BusinessApi from '@/api/crm/business'
|
||||
import { erpPriceMultiply, erpPriceInputFormatter } from '@/utils'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
|
||||
/** CRM 方案报价 表单 */
|
||||
defineOptions({ name: 'QuotationForm' })
|
||||
|
|
@ -375,7 +376,9 @@ const deptTree = ref() // 部门树形结构
|
|||
const deptList = ref() // 部门
|
||||
|
||||
const invoiceTemplateList = ref([])
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.number.def(undefined)
|
||||
})
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
|
|
@ -590,8 +593,7 @@ const resetForm = () => {
|
|||
|
||||
const route = useRoute();
|
||||
onMounted(async () => {
|
||||
formType.value = route.query.id;
|
||||
|
||||
formType.value = props.id
|
||||
if (formType.value) open(formType.value)
|
||||
|
||||
// 获得客户列表
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
<el-form-item label="合作主体" prop="partnerCompanyId">
|
||||
<el-select v-model="formData.partnerCompanyId" placeholder="请选择合作主体" @change="onPartnerChange">
|
||||
<el-option
|
||||
v-for="dict in deptList"
|
||||
v-for="dict in orgList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
|
|
@ -360,6 +360,7 @@ import { QuotationApi, QuotationVO } from '@/api/crm/quotation'
|
|||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import { BillTemplateApi, BillTemplateVO } from '@/api/crm/billtemplate'
|
||||
import QuotationProductForm from './components/QuotationProductForm.vue'
|
||||
import * as ContractApi from '@/api/crm/contract'
|
||||
import * as CustomerApi from '@/api/crm/customer'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
|
|
@ -376,6 +377,7 @@ const templateOptions = ref([])
|
|||
const businessList = ref([])
|
||||
const deptTree = ref() // 部门树形结构
|
||||
const deptList = ref() // 部门
|
||||
const orgList = ref([])
|
||||
|
||||
const invoiceTemplateList = ref([])
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
|
@ -619,5 +621,10 @@ onMounted(async () => {
|
|||
businessList.value = await BusinessApi.getSimpleBusinessList()
|
||||
// 获得部门树
|
||||
deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
|
||||
const org = await ContractApi.getOrg({
|
||||
pageNo: 1,
|
||||
pageSize: 1000
|
||||
})
|
||||
orgList.value = org.list
|
||||
});
|
||||
</script>
|
||||
|
|
@ -154,6 +154,14 @@
|
|||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasPermi="['crm:customer-suggestion:query']"
|
||||
link
|
||||
type="primary"
|
||||
@click="handleProcessDetail(scope.row)"
|
||||
>
|
||||
进度
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
|
|
@ -246,7 +254,7 @@ const openFormAdd = () => {
|
|||
|
||||
const openFormDetail = (row: Object) => {
|
||||
|
||||
push({ name: 'QuotationDetail', query: { id: row.id, customerId: row.customerId } })
|
||||
router.push({ name: 'QuotationDetail', query: { id: row.id } })
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
|
|
@ -262,6 +270,16 @@ const handleDelete = async (id: number) => {
|
|||
} catch {}
|
||||
}
|
||||
|
||||
/** 审批进度 */
|
||||
const router = useRouter() // 路由
|
||||
const handleProcessDetail = (row) => {
|
||||
router.push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: row.processInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue