crm 报价 商机 合同 三块整改
parent
ae5519d9c4
commit
aed2bc38ec
|
|
@ -89,7 +89,7 @@
|
|||
<ContractChangeLimit
|
||||
v-if="formData.changeItem == 1"
|
||||
ref="limitFormRef"
|
||||
:formData="formData"
|
||||
:data="formData"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
<div v-if="formData.changeItem == 2">
|
||||
|
|
@ -105,9 +105,9 @@
|
|||
</ContentWrap>
|
||||
<ContractBAuthorizedPersonForm ref="ContractBAuthorizedPersonFormRef" :customerId="formData.customerId" :contract-id="formData.id" />
|
||||
</div>
|
||||
<ContracExtension ref="contractExtensionFormRef" v-if="formData.changeItem == 3" :formData="formData" />
|
||||
<ContracExtension ref="contractExtensionFormRef" v-if="formData.changeItem == 3" :data="formData" />
|
||||
<ContractStop ref="contractStopFormRef" :formData="formData" v-if="formData.changeItem == 4" />
|
||||
<ContractAAuthorizedCompanyForm ref="contractAAuthorizedCompanyFormRef1" v-if="formData.changeItem == 5" :contract-id="formData.id" />
|
||||
<ContractAAuthorizedCompanyForm ref="contractAAuthorizedCompanyFormRef1" v-if="formData.changeItem == 5" :data="formData.contractAAuthorizedCompanys" />
|
||||
<ContractForm ref="contractFormRef" :type="1" :formData="formData" v-if="formData.changeItem == 6" />
|
||||
</ContentWrap>
|
||||
</el-form>
|
||||
|
|
|
|||
|
|
@ -65,9 +65,7 @@ const businessList = ref([])
|
|||
const deptTree = ref() // 部门树形结构
|
||||
const deptList = ref() // 部门
|
||||
const orgList = ref([])
|
||||
const props = defineProps({
|
||||
type: propTypes.string.def('')
|
||||
})
|
||||
|
||||
const invoiceTemplateList = ref([])
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
|
|
|
|||
|
|
@ -76,11 +76,6 @@ import * as ContractApi from '@/api/crm/contract'
|
|||
import { propTypes } from '@/utils/propTypes'
|
||||
import ContactForm from '@/components/contact/index.vue'
|
||||
|
||||
const props = defineProps({
|
||||
contractId: undefined, // 合同ID(主表的关联字段)
|
||||
type: propTypes.string.def('')
|
||||
|
||||
})
|
||||
const formLoading = ref(false) // 表单的加载中
|
||||
const formData = ref([])
|
||||
const formRules = reactive({
|
||||
|
|
@ -124,27 +119,21 @@ const getList = (val: []) => {
|
|||
|
||||
|
||||
}
|
||||
const props = defineProps<{
|
||||
data: undefined
|
||||
}>()
|
||||
|
||||
/** 监听主表的关联字段的变化,加载对应的子表数据 */
|
||||
watch(
|
||||
() => props.contractId,
|
||||
() => props.data,
|
||||
async (val) => {
|
||||
// 1. 重置表单
|
||||
formData.value = []
|
||||
// 2. val 非空,则加载数据
|
||||
if (!val) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
formLoading.value = true
|
||||
formData.value = await ContractApi.getContractAAuthorizedCompanyListByContractId(val)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
formData.value = val
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = (index) => {
|
||||
formData.value.splice(index, 1)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ watch(
|
|||
async (val) => {
|
||||
// 1. 重置表单
|
||||
formData.value = val
|
||||
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="签约主体" prop="signWechat">
|
||||
<el-form-item label="合作主体" prop="partnerCompanyId">
|
||||
<el-select v-model="formData.partnerCompanyId" disabled placeholder="请选择签约主体" @change="onPartnerChange">
|
||||
<el-option
|
||||
v-for="dict in orgList"
|
||||
|
|
@ -261,9 +261,19 @@ const formRef = ref() // 表单 Ref
|
|||
const subTabsName = ref('quotationProduct')
|
||||
const quotationProductFormRef = ref()
|
||||
|
||||
const props = defineProps({
|
||||
type: propTypes.string.def('')
|
||||
})
|
||||
const props = defineProps<{
|
||||
data: undefined
|
||||
}>()
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
async (val) => {
|
||||
// 1. 重置表单
|
||||
formData.value = val
|
||||
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
const onChangeAmount = async (amount: number) => {
|
||||
formData.value.afterAmount = Number(formData.value.creditLimit) + Number(amount);
|
||||
|
|
|
|||
|
|
@ -182,9 +182,8 @@ const businessList = ref([])
|
|||
const deptTree = ref() // 部门树形结构
|
||||
const deptList = ref() // 部门
|
||||
const orgList = ref([])
|
||||
const props = defineProps({
|
||||
type: propTypes.string.def('')
|
||||
})
|
||||
|
||||
|
||||
const invoiceTemplateList = ref([])
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
|
|
@ -252,6 +251,21 @@ const formRef = ref() // 表单 Ref
|
|||
const subTabsName = ref('quotationProduct')
|
||||
const quotationProductFormRef = ref()
|
||||
|
||||
const props = defineProps<{
|
||||
data: undefined
|
||||
}>()
|
||||
|
||||
/** 监听主表的关联字段的变化,加载对应的子表数据 */
|
||||
watch(
|
||||
() => props.data,
|
||||
async (val) => {
|
||||
// 1. 重置表单
|
||||
formData.value = val
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
|
||||
const onBusinessChange = async (businessId: string) => {
|
||||
if (!businessId) return
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue