|
@@ -5,7 +5,7 @@
|
|
import {useRouter,useRoute} from 'vue-router'
|
|
import {useRouter,useRoute} from 'vue-router'
|
|
import {useStore} from 'vuex'
|
|
import {useStore} from 'vuex'
|
|
import {ElMessage} from 'element-plus'
|
|
import {ElMessage} from 'element-plus'
|
|
- import {getSellerList,getContractSearchList} from '@/api/crm'
|
|
|
|
|
|
+ import {getSellerList,getContractSearchList,getServiceDetail} from '@/api/crm'
|
|
import {getServiceList,registerAdd,registerDetail,registerEdit,registerInvoice,registerPayment} from '@/api/financialMana'
|
|
import {getServiceList,registerAdd,registerDetail,registerEdit,registerInvoice,registerPayment} from '@/api/financialMana'
|
|
import scrollableSelect from '@/components/scrollable-select/index.vue'
|
|
import scrollableSelect from '@/components/scrollable-select/index.vue'
|
|
|
|
|
|
@@ -21,7 +21,7 @@
|
|
|
|
|
|
const contractSourceArray=['非CRM合同导入','CRM合同导入']
|
|
const contractSourceArray=['非CRM合同导入','CRM合同导入']
|
|
const contractStatusArray=[{id:1,label:"已审批"},{id:2,label:"单章寄回"},{id:3,label:"已签回"}]
|
|
const contractStatusArray=[{id:1,label:"已审批"},{id:2,label:"单章寄回"},{id:3,label:"已签回"}]
|
|
- const contractTypeArray=[{id:1,label:"新签"},{id:2,label:"续约"},{id:3,label:"代付"},{id:4,label:"补充协议"}]
|
|
|
|
|
|
+ const contractTypeArray=[{id:1,label:"新签合同"},{id:2,label:"续约合同"},{id:3,label:"代付合同"},{id:4,label:"补充协议"}]
|
|
const operationType=[{op_type:1,label:"合规登记"},{op_type:2,label:"开票登记"},{op_type:3,label:"到款登记"},
|
|
const operationType=[{op_type:1,label:"合规登记"},{op_type:2,label:"开票登记"},{op_type:3,label:"到款登记"},
|
|
{op_type:4,label:"修改合同状态"},{op_type:5,label:"删除合同登记"},{op_type:6,label:"合规编辑"}]
|
|
{op_type:4,label:"修改合同状态"},{op_type:5,label:"删除合同登记"},{op_type:6,label:"合规编辑"}]
|
|
|
|
|
|
@@ -53,13 +53,12 @@
|
|
end_date:'',
|
|
end_date:'',
|
|
contract_amount:'',
|
|
contract_amount:'',
|
|
contract_type:'',
|
|
contract_type:'',
|
|
- daifufang:'',
|
|
|
|
- guanlianhetong:'',
|
|
|
|
|
|
+ pay_contract_code:'',
|
|
|
|
+ pay_company_name:'',
|
|
sign_date:'',
|
|
sign_date:'',
|
|
agreed_pay_time:'',
|
|
agreed_pay_time:'',
|
|
services:[],
|
|
services:[],
|
|
- register_status:'',
|
|
|
|
- serviceRemark:'',
|
|
|
|
|
|
+ service_remark:'',
|
|
remark:""
|
|
remark:""
|
|
},
|
|
},
|
|
rules:{
|
|
rules:{
|
|
@@ -83,8 +82,8 @@
|
|
contract_type:{required:true,message:'合同类型不能为空',trigger:'change'},
|
|
contract_type:{required:true,message:'合同类型不能为空',trigger:'change'},
|
|
// sign_date:{required:true,message:'签订日不能为空',trigger:'change'},
|
|
// sign_date:{required:true,message:'签订日不能为空',trigger:'change'},
|
|
// agreed_pay_time:{required:true,message:'约定付款时间不能为空',trigger:'blur'}
|
|
// agreed_pay_time:{required:true,message:'约定付款时间不能为空',trigger:'blur'}
|
|
- daifufang:{required:true,message:'代付方不能为空',trigger:'blur'},
|
|
|
|
- guanlianhetong:{required:true,message:'关联合同不能为空',trigger:'blur'}
|
|
|
|
|
|
+ pay_contract_code:{required:true,message:'代付方不能为空',trigger:'blur'},
|
|
|
|
+ pay_company_name:{required:true,message:'关联合同不能为空',trigger:'blur'}
|
|
|
|
|
|
},
|
|
},
|
|
moneyData:{
|
|
moneyData:{
|
|
@@ -237,12 +236,12 @@
|
|
end_date:'',
|
|
end_date:'',
|
|
contract_amount:'',
|
|
contract_amount:'',
|
|
contract_type:'',
|
|
contract_type:'',
|
|
- daifufang:'',
|
|
|
|
- guanlianhetong:'',
|
|
|
|
|
|
+ pay_contract_code:'',
|
|
|
|
+ pay_company_name:'',
|
|
sign_date:'',
|
|
sign_date:'',
|
|
agreed_pay_time:'',
|
|
agreed_pay_time:'',
|
|
services:[],
|
|
services:[],
|
|
- serviceRemark:'',
|
|
|
|
|
|
+ service_remark:'',
|
|
remark:""
|
|
remark:""
|
|
}
|
|
}
|
|
contractInfo.checkedService=[]
|
|
contractInfo.checkedService=[]
|
|
@@ -260,12 +259,12 @@
|
|
}
|
|
}
|
|
// 合同类型改变
|
|
// 合同类型改变
|
|
const contractTypeChange=(value)=>{
|
|
const contractTypeChange=(value)=>{
|
|
- console.log(value);
|
|
|
|
|
|
+ // console.log(value);
|
|
if(value!=3){
|
|
if(value!=3){
|
|
- contractInfo.form.daifufang=''
|
|
|
|
|
|
+ contractInfo.form.pay_contract_code=''
|
|
}
|
|
}
|
|
if(value!=4 && value!=3){
|
|
if(value!=4 && value!=3){
|
|
- contractInfo.form.guanlianhetong=''
|
|
|
|
|
|
+ contractInfo.form.pay_company_name=''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -316,6 +315,21 @@
|
|
const selectContractNo=(value)=>{
|
|
const selectContractNo=(value)=>{
|
|
let selectItem=contractInfo.contractNoArray.find(item=>item.contract_code == value)
|
|
let selectItem=contractInfo.contractNoArray.find(item=>item.contract_code == value)
|
|
// console.log(selectItem);
|
|
// console.log(selectItem);
|
|
|
|
+ // 获取套餐详情
|
|
|
|
+ getServiceDetail({contract_id:selectItem.contract_id}).then(res=>{
|
|
|
|
+ // console.log(res);
|
|
|
|
+ contractInfo.form.services = res.data?res.data.Service||[]:[]
|
|
|
|
+ // 小套餐
|
|
|
|
+ let smallService = contractInfo.form.services.find(item => item.ServiceTemplateId==2)
|
|
|
|
+ // 是否有大套餐
|
|
|
|
+ let hasBigService = contractInfo.form.services.some(item => item.ServiceTemplateId==1)
|
|
|
|
+
|
|
|
|
+ contractInfo.serviceVarietyShow=!!smallService
|
|
|
|
+ contractInfo.varietyDiaType='edit'
|
|
|
|
+ contractInfo.serviceType = !!smallService?2:hasBigService?1:0
|
|
|
|
+ contractInfo.checkedService=contractInfo.form.services.map(item => item.ServiceTemplateId)
|
|
|
|
+ contractInfo.checkedPermission=smallService?smallService.ChartPermissionIds:[]
|
|
|
|
+ })
|
|
contractInfo.form.company_name=selectItem.company_name
|
|
contractInfo.form.company_name=selectItem.company_name
|
|
contractInfo.form.crm_contract_id=selectItem.contract_id
|
|
contractInfo.form.crm_contract_id=selectItem.contract_id
|
|
contractInfo.form.start_date=selectItem.start_date
|
|
contractInfo.form.start_date=selectItem.start_date
|
|
@@ -325,12 +339,12 @@
|
|
contractInfo.form.seller_name=selectItem.seller_name
|
|
contractInfo.form.seller_name=selectItem.seller_name
|
|
contractInfo.form.seller_id=selectItem.seller_id
|
|
contractInfo.form.seller_id=selectItem.seller_id
|
|
contractInfo.form.contract_type=selectItem.contract_type_key
|
|
contractInfo.form.contract_type=selectItem.contract_type_key
|
|
- contractInfo.form.daifufang=selectItem.daifufang
|
|
|
|
- contractInfo.form.guanlianhetong=selectItem.guanlianhetong
|
|
|
|
|
|
+ contractInfo.form.pay_contract_code=selectItem.pay_contract_code
|
|
|
|
+ contractInfo.form.pay_company_name=selectItem.pay_company_name
|
|
contractInfoForm.value &&
|
|
contractInfoForm.value &&
|
|
contractInfoForm.value.validateField([
|
|
contractInfoForm.value.validateField([
|
|
'contract_code','company_name','contract_type','seller_id',
|
|
'contract_code','company_name','contract_type','seller_id',
|
|
- 'start_date','contract_amount','daifufang','guanlianhetong'
|
|
|
|
|
|
+ 'start_date','contract_amount','pay_contract_code','pay_company_name'
|
|
])
|
|
])
|
|
}
|
|
}
|
|
// 销售选中
|
|
// 销售选中
|
|
@@ -359,7 +373,7 @@
|
|
// 表格删除行
|
|
// 表格删除行
|
|
const deleteRow=(type,index)=>{
|
|
const deleteRow=(type,index)=>{
|
|
let tempArr=[]
|
|
let tempArr=[]
|
|
- if(type=='invoice'){
|
|
|
|
|
|
+ if(type=='invoice'){
|
|
tempArr=invoiceForm.invoiceData
|
|
tempArr=invoiceForm.invoiceData
|
|
}else{
|
|
}else{
|
|
tempArr=placementForm.placementData
|
|
tempArr=placementForm.placementData
|
|
@@ -378,7 +392,7 @@
|
|
// 有金额才进行删除后的运算
|
|
// 有金额才进行删除后的运算
|
|
if(tempArr[index].amount!=''){
|
|
if(tempArr[index].amount!=''){
|
|
tempArr.splice(index,1)
|
|
tempArr.splice(index,1)
|
|
- let money=0
|
|
|
|
|
|
+ let money=0
|
|
tempArr.map(item =>{
|
|
tempArr.map(item =>{
|
|
money+=parseFloat(item.amount) || 0
|
|
money+=parseFloat(item.amount) || 0
|
|
// console.log(money);
|
|
// console.log(money);
|
|
@@ -463,12 +477,10 @@
|
|
// 小套餐
|
|
// 小套餐
|
|
if(serviceId==2){
|
|
if(serviceId==2){
|
|
contractInfo.form.services.push({
|
|
contractInfo.form.services.push({
|
|
- // service_template_id:contractInfo.currentSmallService.service_template_id,
|
|
|
|
- // value:contractInfo.currentSmallService.Value,
|
|
|
|
- // chart_permission_ids:contractInfo.currentSmallService.chart_permission_ids,
|
|
|
|
- // detail:[contractInfo.currentSmallService.tableHeadData,...contractInfo.currentSmallService.tableData],
|
|
|
|
- // chart_permission_id:serviceItem.chart_permission_id,
|
|
|
|
- check_list:contractInfo.checkedPermission,
|
|
|
|
|
|
+ service_template_id:serviceItem.service_template_id,
|
|
|
|
+ value:'',
|
|
|
|
+ chart_permission_ids:contractInfo.checkedPermission?contractInfo.checkedPermission.join(','):'',
|
|
|
|
+ chart_permission_id:serviceItem.chart_permission_id,
|
|
title:serviceItem.title
|
|
title:serviceItem.title
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
@@ -477,25 +489,25 @@
|
|
})
|
|
})
|
|
contractInfo.form.contract_amount = parseFloat(contractInfo.form.contract_amount)
|
|
contractInfo.form.contract_amount = parseFloat(contractInfo.form.contract_amount)
|
|
console.log(contractInfo.form);
|
|
console.log(contractInfo.form);
|
|
- // if(contractInfo.form.contract_register_id){
|
|
|
|
- // // 编辑
|
|
|
|
- // registerEdit(contractInfo.form).then(res=>{
|
|
|
|
- // let messageHint=ElMessage.success('合规登记编辑成功')
|
|
|
|
- // setTimeout(()=>{
|
|
|
|
- // messageHint.close()
|
|
|
|
- // router.back()
|
|
|
|
- // },1000)
|
|
|
|
- // })
|
|
|
|
- // }else{
|
|
|
|
- // // 新增
|
|
|
|
- // registerAdd(contractInfo.form).then(res=>{
|
|
|
|
- // let messageHint=ElMessage.success('合规登记成功')
|
|
|
|
- // setTimeout(()=>{
|
|
|
|
- // messageHint.close()
|
|
|
|
- // router.back()
|
|
|
|
- // },1000)
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
|
|
+ if(contractInfo.form.contract_register_id){
|
|
|
|
+ // 编辑
|
|
|
|
+ registerEdit(contractInfo.form).then(res=>{
|
|
|
|
+ let messageHint=ElMessage.success('合规登记编辑成功')
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ messageHint.close()
|
|
|
|
+ router.back()
|
|
|
|
+ },1000)
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ // 新增
|
|
|
|
+ registerAdd(contractInfo.form).then(res=>{
|
|
|
|
+ let messageHint=ElMessage.success('合规登记成功')
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ messageHint.close()
|
|
|
|
+ router.back()
|
|
|
|
+ },1000)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -592,16 +604,30 @@
|
|
end_date:res.data.end_date,
|
|
end_date:res.data.end_date,
|
|
contract_amount:res.data.contract_amount,
|
|
contract_amount:res.data.contract_amount,
|
|
contract_type:res.data.contract_type,
|
|
contract_type:res.data.contract_type,
|
|
- daifufang:res.data.daifufang,
|
|
|
|
- guanlianhetong:res.data.guanlianhetong,
|
|
|
|
|
|
+ pay_contract_code:res.data.pay_contract_code,
|
|
|
|
+ pay_company_name:res.data.pay_company_name,
|
|
sign_date:res.data.sign_date,
|
|
sign_date:res.data.sign_date,
|
|
agreed_pay_time:res.data.agreed_pay_time,
|
|
agreed_pay_time:res.data.agreed_pay_time,
|
|
- serviceRemark:res.serviceRemark,
|
|
|
|
|
|
+ service_remark:res.data.service_remark,
|
|
remark:res.data.remark,
|
|
remark:res.data.remark,
|
|
- register_status:res.data.register_status,
|
|
|
|
contract_source:res.data.contract_source,
|
|
contract_source:res.data.contract_source,
|
|
- services:res.data.service_list
|
|
|
|
}
|
|
}
|
|
|
|
+ res.data.service_list.map(item =>{
|
|
|
|
+ // 小套餐
|
|
|
|
+ if(item.service_template_id==2){
|
|
|
|
+ contractInfo.form.services.push({
|
|
|
|
+ service_template_id:item.service_template_id,
|
|
|
|
+ value:item.value,
|
|
|
|
+ chart_permission_ids:item.chart_permission_ids,
|
|
|
|
+ chart_permission_id:item.chart_permission_id,
|
|
|
|
+ title:item.title
|
|
|
|
+ })
|
|
|
|
+ contractInfo.checkedPermission=item.chart_permission_ids.split(',')
|
|
|
|
+ }else{
|
|
|
|
+ contractInfo.form.services.push(item)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ console.log(contractInfo.form.services);
|
|
contractInfo.contractValidityDate=[res.data.start_date,res.data.end_date]
|
|
contractInfo.contractValidityDate=[res.data.start_date,res.data.end_date]
|
|
contractInfo.checkedService=res.data.service_list.map(item => {
|
|
contractInfo.checkedService=res.data.service_list.map(item => {
|
|
let serviceId=item.service_template_id
|
|
let serviceId=item.service_template_id
|
|
@@ -653,39 +679,40 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// let samllService=contractInfo.form.services.find(item => item.service_template_id==2)
|
|
// let samllService=contractInfo.form.services.find(item => item.service_template_id==2)
|
|
|
|
+
|
|
// if(contractInfo.operationtype=='compliance' && samllService){
|
|
// if(contractInfo.operationtype=='compliance' && samllService){
|
|
- // // 合规编辑
|
|
|
|
- // /**
|
|
|
|
- // * 有可能服务模板的接口数据还没返回
|
|
|
|
- // * 这时更改contractInfo.currentSmallService会触发子组件的监听函数,导致空指针错误
|
|
|
|
- // * 创建一个 setInterval 询问contractInfo.serviceArray数据是否返回,已返回就更新contractInfo.currentSmallService
|
|
|
|
- // */
|
|
|
|
- // let temarr = samllService.detail.map((rowItem) => {
|
|
|
|
- // let rowArr = [];
|
|
|
|
- // for (let key in rowItem) {
|
|
|
|
- // if (key.substr(0, 3) === "col" && rowItem[key] !== "") {
|
|
|
|
- // rowArr.push(JSON.parse(rowItem[key]));
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // return rowArr;
|
|
|
|
- // });
|
|
|
|
- // let paramsTemp={
|
|
|
|
- // tableHeadData:temarr[0],
|
|
|
|
- // tableData:temarr.slice(1),
|
|
|
|
- // service_template_id:samllService.service_template_id,
|
|
|
|
- // Value:samllService.value,
|
|
|
|
- // chart_permission_ids:samllService.chart_permission_ids
|
|
|
|
- // }
|
|
|
|
- // if(contractInfo.serviceArray.length==0){
|
|
|
|
- // let timer=setInterval(()=>{
|
|
|
|
- // if(contractInfo.serviceArray.length>0){
|
|
|
|
- // contractInfo.currentSmallService=paramsTemp
|
|
|
|
- // clearInterval(timer)
|
|
|
|
- // }
|
|
|
|
- // },10)
|
|
|
|
- // }else{
|
|
|
|
- // contractInfo.currentSmallService=paramsTemp
|
|
|
|
- // }
|
|
|
|
|
|
+ // 合规编辑
|
|
|
|
+ /**
|
|
|
|
+ * 有可能服务模板的接口数据还没返回
|
|
|
|
+ * 这时更改contractInfo.currentSmallService会触发子组件的监听函数,导致空指针错误
|
|
|
|
+ * 创建一个 setInterval 询问contractInfo.serviceArray数据是否返回,已返回就更新contractInfo.currentSmallService
|
|
|
|
+ */
|
|
|
|
+ // let temarr = samllService.detail.map((rowItem) => {
|
|
|
|
+ // let rowArr = [];
|
|
|
|
+ // for (let key in rowItem) {
|
|
|
|
+ // if (key.substr(0, 3) === "col" && rowItem[key] !== "") {
|
|
|
|
+ // rowArr.push(JSON.parse(rowItem[key]));
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // return rowArr;
|
|
|
|
+ // });
|
|
|
|
+ // let paramsTemp={
|
|
|
|
+ // tableHeadData:temarr[0],
|
|
|
|
+ // tableData:temarr.slice(1),
|
|
|
|
+ // service_template_id:samllService.service_template_id,
|
|
|
|
+ // Value:samllService.value,
|
|
|
|
+ // chart_permission_ids:samllService.chart_permission_ids
|
|
|
|
+ // }
|
|
|
|
+ // if(contractInfo.serviceArray.length==0){
|
|
|
|
+ // let timer=setInterval(()=>{
|
|
|
|
+ // if(contractInfo.serviceArray.length>0){
|
|
|
|
+ // contractInfo.currentSmallService=paramsTemp
|
|
|
|
+ // clearInterval(timer)
|
|
|
|
+ // }
|
|
|
|
+ // },10)
|
|
|
|
+ // }else{
|
|
|
|
+ // contractInfo.currentSmallService=paramsTemp
|
|
|
|
+ // }
|
|
// }
|
|
// }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -746,12 +773,12 @@
|
|
<el-option :label="item.label" :value="item.id" v-for="item in contractTypeArray" :key="item.id"></el-option>
|
|
<el-option :label="item.label" :value="item.id" v-for="item in contractTypeArray" :key="item.id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="代付方" prop="daifufang" v-if="contractInfo.form.contract_type==3">
|
|
|
|
- <el-input v-model="contractInfo.form.daifufang"
|
|
|
|
|
|
+ <el-form-item label="代付方" prop="pay_contract_code" v-if="contractInfo.form.contract_type==3">
|
|
|
|
+ <el-input v-model="contractInfo.form.pay_contract_code"
|
|
placeholder="请输入代付方" />
|
|
placeholder="请输入代付方" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="关联合同" prop="guanlianhetong" v-if="contractInfo.form.contract_type==3 || contractInfo.form.contract_type==4">
|
|
|
|
- <el-input v-model="contractInfo.form.guanlianhetong"
|
|
|
|
|
|
+ <el-form-item label="关联合同" prop="pay_company_name" v-if="contractInfo.form.contract_type==3 || contractInfo.form.contract_type==4">
|
|
|
|
+ <el-input v-model="contractInfo.form.pay_company_name"
|
|
placeholder="请输入关联合同" />
|
|
placeholder="请输入关联合同" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="合同状态" prop="contract_status">
|
|
<el-form-item label="合同状态" prop="contract_status">
|
|
@@ -807,7 +834,7 @@
|
|
<div class="info-service-remark">
|
|
<div class="info-service-remark">
|
|
<span style="white-space: nowrap;font-size: 14px;margin-right: 20px;">套餐备注</span>
|
|
<span style="white-space: nowrap;font-size: 14px;margin-right: 20px;">套餐备注</span>
|
|
<el-input style="flex-grow: 1;" :disabled="contractInfo.operationtype!='compliance'"
|
|
<el-input style="flex-grow: 1;" :disabled="contractInfo.operationtype!='compliance'"
|
|
- v-model="contractInfo.form.serviceRemark" placeholder="请输入备注"
|
|
|
|
|
|
+ v-model="contractInfo.form.service_remark" placeholder="请输入备注"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -971,7 +998,12 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<div class="progress-item-title">{{operationType[item.op_type-1]?.label}}</div>
|
|
<div class="progress-item-title">{{operationType[item.op_type-1]?.label}}</div>
|
|
- <div class="progress-item-info">{{item.admin_name}}</div>
|
|
|
|
|
|
+ <div class="progress-item-info">
|
|
|
|
+ <span>{{item.admin_name}}</span>
|
|
|
|
+ <span style="margin-left: 6px;" v-permission="['financial:list:invoice','financial:list:placement','financial:list:viewIandP','or']">
|
|
|
|
+ {{item.amount_remark}}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
<div class="progress-item-info">{{item.create_time}}</div>
|
|
<div class="progress-item-info">{{item.create_time}}</div>
|
|
<div class="progress-item-info" v-show="item.remark">备注:{{item.remark}}</div>
|
|
<div class="progress-item-info" v-show="item.remark">备注:{{item.remark}}</div>
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|