pull/781/head
zy 2025-05-12 12:02:13 +08:00
parent a8f67f4b4a
commit f407837155
7 changed files with 31 additions and 10 deletions

View File

@ -151,7 +151,7 @@ const submitForm = async () => {
const setSelections = async () => {
const selections = multipleSelection.value.map(item => {
return {
id: item.id
id: item.customerContactId
}
})
console.log('%csrc/components/product/index.vue:153 list.value', 'color: #007acc;', multipleSelection);

View File

@ -214,8 +214,9 @@ const handleProcessDetail = (row: ContractApi.ContractVO) => {
/** 打开合同详情 */
const { push } = useRouter()
const router = useRouter()
const openDetail = (id: number) => {
push({ name: 'CrmContractDetail', params: { id } })
router.push({ name: 'CrmContractDetail', query: { id: id } })
}
/** 打开客户详情 */

View File

@ -179,12 +179,13 @@ const handleAdd = () => {
}
const getList = (val: []) => {
console.log('%csrc/views/crm/contract/components/ContractAAuthorizedPersonForm.vue:182 val', 'color: #007acc;', val);
for(let i = val.length - 1; i >= 0; i--) {
let obj = val[i]
if(formData.value.some(v => v.id === obj.id)) val.splice(i, 1)
if(formData.value.some(v => v.customerContactId === obj.id)) val.splice(i, 1)
}
val.forEach(item => {
if(!formData.value.some(v => v.id === item.id)) {
if(!formData.value.some(v => v.customerContactId === item.id)) {
val.forEach(item => {
formData.value.push({
"customerContactId": item.id,

View File

@ -118,7 +118,7 @@
<el-col :span="8">
<el-form-item label="初始额度" prop="creditLimit">
<el-input v-model="formData.creditLimit" placeholder="请输入初始额度" disabled />
<el-input v-model="formData.creditAmount" placeholder="请输入初始额度" disabled />
</el-form-item>
</el-col>
<el-col :span="8">

View File

@ -124,7 +124,8 @@
<el-date-picker
:disabled="!!type"
v-model="formData.endTime"
type="date"
type="date"
@change="changeYear"
value-format="x"
placeholder="请选择协议截止日"
style="width: 100%"
@ -133,7 +134,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="顺延年限" prop="extensionYears">
<el-input v-model="formData.extensionYears" :disabled="!!type" placeholder="请输入顺延年限" />
<el-input v-model="formData.extensionYears" :disabled="!!type" placeholder="请输入顺延年限" @change="changeYear" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -142,7 +143,7 @@
v-model="formData.extensionDate"
:disabled="!!type"
type="date"
value-format="YYYY-MM-DD"
value-format="x"
placeholder="调整金额截止日期"
style="width: 100%"
/>
@ -169,6 +170,7 @@ import * as UserApi from '@/api/system/user'
import * as DeptApi from '@/api/system/dept'
import * as BusinessApi from '@/api/crm/business'
import { propTypes } from '@/utils/propTypes'
import { number } from 'vue-types'
/** CRM 方案报价 表单 */
defineOptions({ name: 'QuotationForm' })
@ -333,6 +335,17 @@ const onPartnerChange = async (id: string) => {
}
}
const changeYear = (val) => {
if (formData.value.extensionYears && formData.value.endTime) {
console.log('%csrc/views/crm/contract/components/ContractExtension.vue:339 formData.value.endTime', 'color: #007acc;', formData.value.endTime);
let time = new Date(formData.value.endTime)
let year = time.getFullYear()
let month = time.getMonth() + 1
let day = time.getDate()
formData.value.extensionDate = Number(year) + Number(formData.value.extensionYears) + '-' + month + '-' + day
}
}
/** 打开弹窗 */
const open = async (type: string) => {
formType.value = type

View File

@ -118,8 +118,9 @@ const openForm = () => {
/** 打开合同详情 */
const { push } = useRouter()
const router = useRouter()
const openDetail = (id: number) => {
push({ name: 'CrmContractDetail', params: { id } })
router.push({ name: 'CrmContractDetail', query: { id: id } })
}
/** 监听打开的 bizId + bizType从而加载最新的列表 */

View File

@ -102,7 +102,10 @@
ref="personDataRef"
:products="formData.contractAAuthorizedPersons"
/>
<ContentWrap style="border: none">
甲方授权人
</ContentWrap>
<ContractBAuthorizedPersonForm :type="1" ref="ContractBAuthorizedPersonFormRef" :customerId="formData.customerId" :contract-id="formData.id" />
</div>
<ContracExtension ref="contractExtensionFormRef" v-if="formData.changeItem == 3" :disabled="true" :data="formData" />
<ContractStop ref="contractStopFormRef" :formData="formData" :disabled="true" v-if="formData.changeItem == 4" />
@ -230,6 +233,8 @@ const open = async (type: string) => {
formData.value.afterAmount = data.afterAmount
formData.value.changeAmountDeadline = data.changeAmountDeadline
formData.value.note = data.note
// formData.value.creditAmount = data.creditAmount
formData.value.creditLimit = data.beforeAmount
} finally {
formLoading.value = false
}