合同变更
parent
7e175e3220
commit
d52a93ab10
|
|
@ -145,6 +145,7 @@ import ContractProductForm from '@/views/crm/contract/components/ContractProduct
|
||||||
import ContractAAuthorizedCompanyForm from './components/ContractAAuthorizedCompanyForm.vue'
|
import ContractAAuthorizedCompanyForm from './components/ContractAAuthorizedCompanyForm.vue'
|
||||||
import ContractBAuthorizedPersonForm from './components/ContractAAuthorizedPersonForm.vue'
|
import ContractBAuthorizedPersonForm from './components/ContractAAuthorizedPersonForm.vue'
|
||||||
import ContractForm from './ContractForm.vue'
|
import ContractForm from './ContractForm.vue'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
@ -288,10 +289,13 @@ const open = async (type: string) => {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
let data = await ContractApi.getContract(type)
|
let data = await ContractApi.getContract(type)
|
||||||
|
data.agreementDeadline = moment(data.endTime).format('YYYY-MM-DD')
|
||||||
|
|
||||||
if(!route.query.id) delete data.customerId
|
if(!route.query.id) delete data.customerId
|
||||||
|
|
||||||
|
console.log('%csrc/views/crm/contract/ContractChange.vue:295 formData.value, data', 'color: #007acc;', formData.value, data);
|
||||||
formData.value = Object.assign(formData.value, data)
|
formData.value = Object.assign(formData.value, data)
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
@ -320,8 +324,8 @@ if(ContractBAuthorizedPersonFormRef.value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(contractAAuthorizedCompanyFormRef1.value) {
|
if(contractAAuthorizedCompanyFormRef1.value) {
|
||||||
const Authalid1 = await contractAAuthorizedCompanyFormRef1.value.validate()
|
const Authalid1 = await contractAAuthorizedCompanyFormRef1.value.getData()
|
||||||
if (!Authalid1) return
|
if (!Authalid1.length) return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(limitFormRef.value) {
|
if(limitFormRef.value) {
|
||||||
|
|
@ -374,7 +378,7 @@ if(contractFormRef.value) {
|
||||||
2: 'contractAAuthorizedPersons',
|
2: 'contractAAuthorizedPersons',
|
||||||
3: 'contractExtensionFormRef',
|
3: 'contractExtensionFormRef',
|
||||||
4: 'contractStopFormRef',
|
4: 'contractStopFormRef',
|
||||||
5: 'contractAAuthorizedCompanyFormRef1',
|
5: 'contractAAuthorizedCompanys',
|
||||||
6: 'contractFormRef'
|
6: 'contractFormRef'
|
||||||
}
|
}
|
||||||
let dataFormList = proChangeObj[formData.value.changeItem].value.getData()
|
let dataFormList = proChangeObj[formData.value.changeItem].value.getData()
|
||||||
|
|
|
||||||
|
|
@ -718,6 +718,8 @@ const formRules = reactive({
|
||||||
customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }],
|
customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }],
|
||||||
quotationId: [{ required: true, message: '报价单编号不能为空', trigger: 'blur' }],
|
quotationId: [{ required: true, message: '报价单编号不能为空', trigger: 'blur' }],
|
||||||
orderDate: [{ required: true, message: '下单日期不能为空', trigger: 'blur' }],
|
orderDate: [{ required: true, message: '下单日期不能为空', trigger: 'blur' }],
|
||||||
|
startTime: [{ required: true, message: '合同签订日期不能为空', trigger: 'change' }],
|
||||||
|
contractTerm: [{ required: true, message: '合同期限不能为空', trigger: 'blur' }],
|
||||||
// ownerUserId: [{ required: true, message: '负责人不能为空', trigger: 'blur' }],
|
// ownerUserId: [{ required: true, message: '负责人不能为空', trigger: 'blur' }],
|
||||||
// statementDate: [{ required: true, message: '账单日不能为空', trigger: 'change' }],
|
// statementDate: [{ required: true, message: '账单日不能为空', trigger: 'change' }],
|
||||||
contractType: [{ required: true, message: '合同类型不能为空', trigger: 'change' }],
|
contractType: [{ required: true, message: '合同类型不能为空', trigger: 'change' }],
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
v-model="formData.extensionDate"
|
v-model="formData.extensionDate"
|
||||||
:disabled="formFields.extensionDate !== 2 || isTrue"
|
:disabled="formFields.extensionDate !== 2 || isTrue"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="x"
|
value-format="YYYY-MM-DD"
|
||||||
placeholder="调整金额截止日期"
|
placeholder="调整金额截止日期"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
|
|
@ -285,6 +285,7 @@ watch(
|
||||||
async (val) => {
|
async (val) => {
|
||||||
// 1. 重置表单
|
// 1. 重置表单
|
||||||
formData.value = val
|
formData.value = val
|
||||||
|
console.log('%csrc/views/crm/contract/components/ContractExtension.vue:288 formData.value', 'color: #007acc;', formData.value);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
@ -386,7 +387,7 @@ const open = async (type: string) => {
|
||||||
}
|
}
|
||||||
/** 表单校验 */
|
/** 表单校验 */
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return formRef.value.validate()
|
return formRef.value.innerFormRef.validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表单值 */
|
/** 表单值 */
|
||||||
|
|
|
||||||
|
|
@ -303,6 +303,9 @@ const open = async (type: string) => {
|
||||||
formData.value.changeAmount = data.changeAmount
|
formData.value.changeAmount = data.changeAmount
|
||||||
formData.value.afterAmount = data.afterAmount
|
formData.value.afterAmount = data.afterAmount
|
||||||
formData.value.changeAmountDeadline = data.changeAmountDeadline
|
formData.value.changeAmountDeadline = data.changeAmountDeadline
|
||||||
|
formData.value.agreementDeadline = data.agreementDeadline
|
||||||
|
formData.value.extensionYears = data.extensionYears
|
||||||
|
formData.value.extensionDate = data.extensionDate
|
||||||
formData.value.note = data.note
|
formData.value.note = data.note
|
||||||
// formData.value.creditAmount = data.creditAmount
|
// formData.value.creditAmount = data.creditAmount
|
||||||
formData.value.creditLimit = data.beforeAmount
|
formData.value.creditLimit = data.beforeAmount
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display:flex">
|
<div style="display:flex">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.auditStatus === 0"
|
v-if="scope.row.auditStatus === 0 || scope.row.auditStatus === 3"
|
||||||
v-hasPermi="['crm:contract:update']"
|
v-hasPermi="['crm:contract:update']"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -237,7 +237,7 @@
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.auditStatus !== 0"
|
v-if="scope.row.auditStatus !== 0 && scope.row.auditStatus !== 3"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleProcessDetail(scope.row)"
|
@click="handleProcessDetail(scope.row)"
|
||||||
|
|
@ -245,7 +245,7 @@
|
||||||
进度
|
进度
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.auditStatus !== 0 && scope.row.auditStatus !== 2 && scope.row.auditStatus !== 10"
|
v-if="scope.row.auditStatus !== 0 && scope.row.auditStatus !== 2 && scope.row.auditStatus !== 10"
|
||||||
v-hasPermi="['crm:contract:delete']"
|
v-hasPermi="['crm:contract:delete']"
|
||||||
link
|
link
|
||||||
|
|
@ -253,9 +253,9 @@
|
||||||
@click="handleDelete(scope.row.id)"
|
@click="handleDelete(scope.row.id)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
v-if="scope.row.auditStatus === 0 || scope.row.auditStatus === 2"
|
v-if="scope.row.auditStatus === 0 || scope.row.auditStatus === 2 || scope.row.auditStatus === 3"
|
||||||
@command="(command) => handleCommand(command, scope.row)"
|
@command="(command) => handleCommand(command, scope.row)"
|
||||||
v-hasPermi="[
|
v-hasPermi="[
|
||||||
'crm:contract:update',
|
'crm:contract:update',
|
||||||
|
|
@ -269,7 +269,7 @@
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleSubmit"
|
command="handleSubmit"
|
||||||
v-if="checkPermi(['crm:contract:update']) && scope.row.auditStatus === 0"
|
v-if="checkPermi(['crm:contract:update']) && (scope.row.auditStatus === 0 || scope.row.auditStatus === 3)"
|
||||||
>
|
>
|
||||||
提交审核
|
提交审核
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
@ -299,7 +299,7 @@
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleDelete"
|
command="handleDelete"
|
||||||
v-if="checkPermi(['crm:contract:delete']) && (scope.row.auditStatus === 0 || scope.row.auditStatus === 2)"
|
v-if="checkPermi(['crm:contract:delete']) && (scope.row.auditStatus === 0 || scope.row.auditStatus === 2 || scope.row.auditStatus == 3)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<ContentWrap class="mt-10px">
|
<ContentWrap class="mt-10px">
|
||||||
<el-table v-loading="loading" :data="formData" class="-mt-10px">
|
<el-table v-loading="loading" :data="formData" class="-mt-10px">
|
||||||
<el-table-column label="序号" type="index" width="100" />
|
<el-table-column label="序号" type="index" width="100" />
|
||||||
<el-table-column label="单位名称" min-width="150" prop="customerName" />
|
<el-table-column label="单位名称" min-width="150" prop="companyName" />
|
||||||
<el-table-column label="统一社会信用代码" min-width="150" prop="unifiedCreditCode" />
|
<el-table-column label="统一社会信用代码" min-width="150" prop="unifiedCreditCode" />
|
||||||
<el-table-column label="开票地址" min-width="150" prop="invoicingAddress" />
|
<el-table-column label="开票地址" min-width="150" prop="invoicingAddress" />
|
||||||
<el-table-column label="开票电话" min-width="150" prop="invoicingTelephone" />
|
<el-table-column label="开票电话" min-width="150" prop="invoicingTelephone" />
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="客户ID" prop="customerId">
|
<el-form-item label="客户" prop="customerId">
|
||||||
<SelectComponent :customerList="customerList" :disabled="!!isbizId" v-model="formData.customerId" />
|
<SelectComponent :customerList="customerList" :disabled="!!isbizId" v-model="formData.customerId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -90,7 +90,7 @@ const formData = ref({
|
||||||
companyAddress: undefined,
|
companyAddress: undefined,
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
customerId: [{ required: true, message: '客户ID不能为空', trigger: 'blur' }],
|
customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }],
|
||||||
companyName: [{ required: true, message: '单位名称不能为空', trigger: 'blur' }],
|
companyName: [{ required: true, message: '单位名称不能为空', trigger: 'blur' }],
|
||||||
unifiedCreditCode: [{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }],
|
unifiedCreditCode: [{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }],
|
||||||
invoicingAddress: [{ required: true, message: '开票地址不能为空', trigger: 'blur' }],
|
invoicingAddress: [{ required: true, message: '开票地址不能为空', trigger: 'blur' }],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue