|
@@ -1,6 +1,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
- import serviceVarietyDia from './components/serviceVarietyDia.vue'
|
|
|
|
|
|
+ // import serviceVarietyDia from './components/serviceVarietyDia.vue'
|
|
|
|
+ import permissionDia from './components/permissionDia.vue'
|
|
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'
|
|
@@ -20,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:"续约"}]
|
|
|
|
|
|
+ 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:"合规编辑"}]
|
|
|
|
|
|
@@ -52,10 +53,13 @@
|
|
end_date:'',
|
|
end_date:'',
|
|
contract_amount:'',
|
|
contract_amount:'',
|
|
contract_type:'',
|
|
contract_type:'',
|
|
|
|
+ daifufang:'',
|
|
|
|
+ guanlianhetong:'',
|
|
sign_date:'',
|
|
sign_date:'',
|
|
agreed_pay_time:'',
|
|
agreed_pay_time:'',
|
|
services:[],
|
|
services:[],
|
|
register_status:'',
|
|
register_status:'',
|
|
|
|
+ serviceRemark:'',
|
|
remark:""
|
|
remark:""
|
|
},
|
|
},
|
|
rules:{
|
|
rules:{
|
|
@@ -77,8 +81,10 @@
|
|
trigger:'blur'
|
|
trigger:'blur'
|
|
}],
|
|
}],
|
|
contract_type:{required:true,message:'合同类型不能为空',trigger:'change'},
|
|
contract_type:{required:true,message:'合同类型不能为空',trigger:'change'},
|
|
- sign_date:{required:true,message:'签订日不能为空',trigger:'change'},
|
|
|
|
- agreed_pay_time:{required:true,message:'约定付款时间不能为空',trigger:'blur'}
|
|
|
|
|
|
+ // sign_date:{required:true,message:'签订日不能为空',trigger:'change'},
|
|
|
|
+ // agreed_pay_time:{required:true,message:'约定付款时间不能为空',trigger:'blur'}
|
|
|
|
+ daifufang:{required:true,message:'代付方不能为空',trigger:'blur'},
|
|
|
|
+ guanlianhetong:{required:true,message:'关联合同不能为空',trigger:'blur'}
|
|
|
|
|
|
},
|
|
},
|
|
moneyData:{
|
|
moneyData:{
|
|
@@ -107,13 +113,12 @@
|
|
contractNoTotal:0,
|
|
contractNoTotal:0,
|
|
contractNoLoading:false,
|
|
contractNoLoading:false,
|
|
// --------------套餐信息
|
|
// --------------套餐信息
|
|
- // 选中的套餐
|
|
|
|
|
|
+ // // 选中的套餐
|
|
checkedService:[],
|
|
checkedService:[],
|
|
- //套餐列表
|
|
|
|
|
|
+ // //套餐列表
|
|
serviceArray:[],
|
|
serviceArray:[],
|
|
- // 当前小套餐选中的品种
|
|
|
|
- currentSmallService:{},
|
|
|
|
- // checkedServiceDetail:{},
|
|
|
|
|
|
+ // 小套餐选中的品种
|
|
|
|
+ checkedPermission:[],
|
|
// 查看套餐弹窗
|
|
// 查看套餐弹窗
|
|
serviceShow:false,
|
|
serviceShow:false,
|
|
// 显示选择品种 - FICC小套餐
|
|
// 显示选择品种 - FICC小套餐
|
|
@@ -122,6 +127,7 @@
|
|
serviceType:0,
|
|
serviceType:0,
|
|
// 品种选择
|
|
// 品种选择
|
|
varietyDiaShow:false,
|
|
varietyDiaShow:false,
|
|
|
|
+ varietyDiaType:'view',
|
|
// -----------------登记进度
|
|
// -----------------登记进度
|
|
progressList:[],
|
|
progressList:[],
|
|
})
|
|
})
|
|
@@ -130,20 +136,20 @@
|
|
invoiceData:[
|
|
invoiceData:[
|
|
{
|
|
{
|
|
amount:'',
|
|
amount:'',
|
|
- invoice_date:''
|
|
|
|
|
|
+ invoice_date:'',
|
|
|
|
+ remark:''
|
|
}
|
|
}
|
|
- ],
|
|
|
|
- rowErrorShow:''
|
|
|
|
|
|
+ ]
|
|
})
|
|
})
|
|
// ---------------到款信息
|
|
// ---------------到款信息
|
|
const placementForm=reactive({
|
|
const placementForm=reactive({
|
|
placementData:[
|
|
placementData:[
|
|
{
|
|
{
|
|
amount:'',
|
|
amount:'',
|
|
- invoice_date:''
|
|
|
|
|
|
+ invoice_date:'',
|
|
|
|
+ remark:''
|
|
}
|
|
}
|
|
- ],
|
|
|
|
- rowErrorShow:''
|
|
|
|
|
|
+ ]
|
|
})
|
|
})
|
|
// 查看套餐报价单 图片
|
|
// 查看套餐报价单 图片
|
|
const previewImage=ref('')
|
|
const previewImage=ref('')
|
|
@@ -231,34 +237,57 @@
|
|
end_date:'',
|
|
end_date:'',
|
|
contract_amount:'',
|
|
contract_amount:'',
|
|
contract_type:'',
|
|
contract_type:'',
|
|
|
|
+ daifufang:'',
|
|
|
|
+ guanlianhetong:'',
|
|
sign_date:'',
|
|
sign_date:'',
|
|
agreed_pay_time:'',
|
|
agreed_pay_time:'',
|
|
|
|
+ services:[],
|
|
|
|
+ serviceRemark:'',
|
|
remark:""
|
|
remark:""
|
|
}
|
|
}
|
|
|
|
+ contractInfo.checkedService=[]
|
|
|
|
+ // 小套餐选中的品种
|
|
|
|
+ contractInfo.checkedPermission=[]
|
|
|
|
+ // 1-大套餐 2-小套餐
|
|
|
|
+ contractInfo.serviceType=0,
|
|
|
|
+ // 品种选择
|
|
|
|
+ contractInfo.serviceVarietyShow=false
|
|
contractInfo.contractValidityDate=[]
|
|
contractInfo.contractValidityDate=[]
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
// 去除错误信息
|
|
// 去除错误信息
|
|
contractInfoForm.value && contractInfoForm.value.clearValidate()
|
|
contractInfoForm.value && contractInfoForm.value.clearValidate()
|
|
},0)
|
|
},0)
|
|
}
|
|
}
|
|
|
|
+ // 合同类型改变
|
|
|
|
+ const contractTypeChange=(value)=>{
|
|
|
|
+ console.log(value);
|
|
|
|
+ if(value!=3){
|
|
|
|
+ contractInfo.form.daifufang=''
|
|
|
|
+ }
|
|
|
|
+ if(value!=4 && value!=3){
|
|
|
|
+ contractInfo.form.guanlianhetong=''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
// 服务改变
|
|
// 服务改变
|
|
const serciveChange=(value,type,openDia=true)=>{
|
|
const serciveChange=(value,type,openDia=true)=>{
|
|
// console.log(value,type);
|
|
// console.log(value,type);
|
|
if(type==2){
|
|
if(type==2){
|
|
contractInfo.serviceVarietyShow=value
|
|
contractInfo.serviceVarietyShow=value
|
|
|
|
+ contractInfo.varietyDiaType='edit'
|
|
contractInfo.varietyDiaShow=openDia&&value
|
|
contractInfo.varietyDiaShow=openDia&&value
|
|
}
|
|
}
|
|
contractInfo.serviceType = value?type:0
|
|
contractInfo.serviceType = value?type:0
|
|
}
|
|
}
|
|
- const getVarieties=(item)=>{
|
|
|
|
- contractInfo.currentSmallService= {
|
|
|
|
- service_template_id: item.service_template_id,
|
|
|
|
- Value: item.Value,
|
|
|
|
- tableData: item.tableData,
|
|
|
|
- chart_permission_ids:item.chart_permission_ids,
|
|
|
|
- tableHeadData: item.tableHeadData
|
|
|
|
- }
|
|
|
|
- // console.log(item);
|
|
|
|
|
|
+ // 选择品种
|
|
|
|
+ const selectVariety=()=>{
|
|
|
|
+ contractInfo.varietyDiaType='edit'
|
|
|
|
+ contractInfo.varietyDiaShow=true
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const getPermissionChecked=(list)=>{
|
|
|
|
+ console.log(list);
|
|
|
|
+ contractInfo.checkedPermission=list
|
|
}
|
|
}
|
|
// 合同编号远程搜索
|
|
// 合同编号远程搜索
|
|
const contractNoSearch=(value)=>{
|
|
const contractNoSearch=(value)=>{
|
|
@@ -296,10 +325,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
|
|
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','contract_type'
|
|
|
|
|
|
+ 'start_date','contract_amount','daifufang','guanlianhetong'
|
|
])
|
|
])
|
|
}
|
|
}
|
|
// 销售选中
|
|
// 销售选中
|
|
@@ -320,9 +351,9 @@
|
|
// 表格添加行
|
|
// 表格添加行
|
|
const addRow=(type,index)=>{
|
|
const addRow=(type,index)=>{
|
|
if(type=='invoice'){
|
|
if(type=='invoice'){
|
|
- invoiceForm.invoiceData.splice((index+1),0,{amount:'',invoice_date:''})
|
|
|
|
|
|
+ invoiceForm.invoiceData.splice((index+1),0,{amount:'',invoice_date:'',remark:''})
|
|
}else{
|
|
}else{
|
|
- placementForm.placementData.splice((index+1),0,{amount:'',invoice_date:''})
|
|
|
|
|
|
+ placementForm.placementData.splice((index+1),0,{amount:'',invoice_date:'',remark:''})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 表格删除行
|
|
// 表格删除行
|
|
@@ -414,14 +445,15 @@
|
|
}
|
|
}
|
|
// 合规登记-提交
|
|
// 合规登记-提交
|
|
const complianceSubmit=()=>{
|
|
const complianceSubmit=()=>{
|
|
- console.log(contractInfo.checkedService);
|
|
|
|
|
|
+ // console.log(contractInfo.checkedService);
|
|
contractInfoForm.value.validate(valid=>{
|
|
contractInfoForm.value.validate(valid=>{
|
|
if(valid){
|
|
if(valid){
|
|
if(contractInfo.checkedService.length==0){
|
|
if(contractInfo.checkedService.length==0){
|
|
ElMessage.warning('请选择套餐')
|
|
ElMessage.warning('请选择套餐')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(!contractInfo.currentSmallService.Value && contractInfo.checkedService.some(serviceId =>serviceId==2)){
|
|
|
|
|
|
+ if((!contractInfo.checkedPermission || contractInfo.checkedPermission.length==0)
|
|
|
|
+ && contractInfo.checkedService.some(serviceId =>serviceId==2)){
|
|
ElMessage.warning('请保存FICC小套餐品种')
|
|
ElMessage.warning('请保存FICC小套餐品种')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -431,11 +463,12 @@
|
|
// 小套餐
|
|
// 小套餐
|
|
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,
|
|
|
|
|
|
+ // 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,
|
|
title:serviceItem.title
|
|
title:serviceItem.title
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
@@ -443,25 +476,26 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
contractInfo.form.contract_amount = parseFloat(contractInfo.form.contract_amount)
|
|
contractInfo.form.contract_amount = parseFloat(contractInfo.form.contract_amount)
|
|
- 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)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ 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)
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -470,13 +504,6 @@
|
|
const invoiceSubmit=()=>{
|
|
const invoiceSubmit=()=>{
|
|
invoiceFormRef.value.validate(valid=>{
|
|
invoiceFormRef.value.validate(valid=>{
|
|
if(valid){
|
|
if(valid){
|
|
- invoiceForm.rowErrorShow=''
|
|
|
|
- if(contractInfo.moneyData.waitInvoiceMoney<0){
|
|
|
|
- ElMessage.error('总开票金额大于合同金额,请检查')
|
|
|
|
- // 让金额这一列标红
|
|
|
|
- invoiceForm.rowErrorShow='true'
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
// 转化
|
|
// 转化
|
|
invoiceForm.invoiceData.forEach(element => {
|
|
invoiceForm.invoiceData.forEach(element => {
|
|
element.amount = parseFloat(element.amount)
|
|
element.amount = parseFloat(element.amount)
|
|
@@ -484,7 +511,7 @@
|
|
let param={
|
|
let param={
|
|
contract_register_id:contractInfo.form.contract_register_id,
|
|
contract_register_id:contractInfo.form.contract_register_id,
|
|
invoice_type:1,
|
|
invoice_type:1,
|
|
- amount_list:invoiceForm.invoiceData
|
|
|
|
|
|
+ amount_list:invoiceForm.invoiceData,
|
|
}
|
|
}
|
|
registerInvoice(param).then(res=>{
|
|
registerInvoice(param).then(res=>{
|
|
let messageHint=ElMessage.success('开票登记成功')
|
|
let messageHint=ElMessage.success('开票登记成功')
|
|
@@ -498,15 +525,8 @@
|
|
}
|
|
}
|
|
// 到款登记保存
|
|
// 到款登记保存
|
|
const placementSubmit=()=>{
|
|
const placementSubmit=()=>{
|
|
- placementForm.rowErrorShow=''
|
|
|
|
placementFormRef.value.validate(valid=>{
|
|
placementFormRef.value.validate(valid=>{
|
|
if(valid){
|
|
if(valid){
|
|
- if(contractInfo.moneyData.waitPlacementMoney<0){
|
|
|
|
- ElMessage.error('总开票金额大于合同金额,请检查')
|
|
|
|
- // 让金额这一列标红
|
|
|
|
- placementForm.rowErrorShow='true'
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
// 转化
|
|
// 转化
|
|
placementForm.placementData.forEach(element => {
|
|
placementForm.placementData.forEach(element => {
|
|
element.amount = parseFloat(element.amount)
|
|
element.amount = parseFloat(element.amount)
|
|
@@ -536,6 +556,11 @@
|
|
// 查看套餐
|
|
// 查看套餐
|
|
const viewService=(serviceTemplateId)=>{
|
|
const viewService=(serviceTemplateId)=>{
|
|
if(!canServiceShow(serviceTemplateId)) return
|
|
if(!canServiceShow(serviceTemplateId)) return
|
|
|
|
+ if(serviceTemplateId==2){
|
|
|
|
+ contractInfo.varietyDiaShow=true
|
|
|
|
+ contractInfo.varietyDiaType='view'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
let viewItem=contractInfo.form.services.find(item => item.service_template_id == serviceTemplateId)
|
|
let viewItem=contractInfo.form.services.find(item => item.service_template_id == serviceTemplateId)
|
|
previewImageTitle.value = viewItem.title
|
|
previewImageTitle.value = viewItem.title
|
|
previewImage.value=viewItem.value
|
|
previewImage.value=viewItem.value
|
|
@@ -567,8 +592,11 @@
|
|
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,
|
|
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,
|
|
remark:res.data.remark,
|
|
remark:res.data.remark,
|
|
register_status:res.data.register_status,
|
|
register_status:res.data.register_status,
|
|
contract_source:res.data.contract_source,
|
|
contract_source:res.data.contract_source,
|
|
@@ -589,58 +617,76 @@
|
|
invoiceForm.invoiceData=[]
|
|
invoiceForm.invoiceData=[]
|
|
res.data.invoice_list.map(item=>{
|
|
res.data.invoice_list.map(item=>{
|
|
invoiceForm.invoiceData.push({
|
|
invoiceForm.invoiceData.push({
|
|
- invoice_id:item.invoice_id,
|
|
|
|
|
|
+ invoice_id:item.contract_invoice_id,
|
|
amount:item.amount,
|
|
amount:item.amount,
|
|
- invoice_date:item.invoice_time
|
|
|
|
|
|
+ invoice_date:item.invoice_time,
|
|
|
|
+ remark:item.remark
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
+ // 添加一行空的
|
|
|
|
+ if(contractInfo.operationtype=='invoice'){
|
|
|
|
+ invoiceForm.invoiceData.push({
|
|
|
|
+ amount:'',
|
|
|
|
+ invoice_date:'',
|
|
|
|
+ remark:''
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 到款
|
|
// 到款
|
|
if(res.data.payment_list.length>0){
|
|
if(res.data.payment_list.length>0){
|
|
placementForm.placementData=[]
|
|
placementForm.placementData=[]
|
|
res.data.payment_list.map(item=>{
|
|
res.data.payment_list.map(item=>{
|
|
placementForm.placementData.push({
|
|
placementForm.placementData.push({
|
|
- invoice_id:item.invoice_id,
|
|
|
|
|
|
+ invoice_id:item.contract_invoice_id,
|
|
amount:item.amount,
|
|
amount:item.amount,
|
|
- invoice_date:item.invoice_time
|
|
|
|
|
|
+ invoice_date:item.invoice_time,
|
|
|
|
+ remark:item.remark
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- }
|
|
|
|
- let samllService=contractInfo.form.services.find(item => item.service_template_id==2)
|
|
|
|
- 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)
|
|
|
|
- }
|
|
|
|
- },100)
|
|
|
|
- }else{
|
|
|
|
- contractInfo.currentSmallService=paramsTemp
|
|
|
|
|
|
+ // 添加一行空的
|
|
|
|
+ if(contractInfo.operationtype=='placement'){
|
|
|
|
+ placementForm.placementData.push({
|
|
|
|
+ amount:'',
|
|
|
|
+ invoice_date:'',
|
|
|
|
+ remark:''
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // let samllService=contractInfo.form.services.find(item => item.service_template_id==2)
|
|
|
|
+ // 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
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -681,11 +727,10 @@
|
|
<el-option :label="item.real_name" :value="item.admin_id" v-for="item in contractInfo.sellerList" :key="item.admin_id"></el-option>
|
|
<el-option :label="item.real_name" :value="item.admin_id" v-for="item in contractInfo.sellerList" :key="item.admin_id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="合同状态" prop="contract_status">
|
|
|
|
- <el-select v-model="contractInfo.form.contract_status"
|
|
|
|
- placeholder="请选择合同状态" >
|
|
|
|
- <el-option :label="item.label" :value="item.id" v-for="item in contractStatusArray" :key="item.id"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-form-item label="合同金额"
|
|
|
|
+ prop="contract_amount">
|
|
|
|
+ <el-input v-model.trim="contractInfo.form.contract_amount"
|
|
|
|
+ placeholder="请输入合同金额" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="合同有效期"
|
|
<el-form-item label="合同有效期"
|
|
prop="start_date">
|
|
prop="start_date">
|
|
@@ -695,17 +740,26 @@
|
|
:clearable="false">
|
|
:clearable="false">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="合同金额"
|
|
|
|
- prop="contract_amount">
|
|
|
|
- <el-input v-model.trim="contractInfo.form.contract_amount"
|
|
|
|
- placeholder="请输入合同金额" />
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="合同类型" prop="contract_type">
|
|
<el-form-item label="合同类型" prop="contract_type">
|
|
<el-select v-model="contractInfo.form.contract_type"
|
|
<el-select v-model="contractInfo.form.contract_type"
|
|
- placeholder="请选择合同类型" >
|
|
|
|
|
|
+ placeholder="请选择合同类型" @change="contractTypeChange">
|
|
<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"
|
|
|
|
+ placeholder="请输入代付方" />
|
|
|
|
+ </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"
|
|
|
|
+ placeholder="请输入关联合同" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="合同状态" prop="contract_status">
|
|
|
|
+ <el-select v-model="contractInfo.form.contract_status"
|
|
|
|
+ placeholder="请选择合同状态" >
|
|
|
|
+ <el-option :label="item.label" :value="item.id" v-for="item in contractStatusArray" :key="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="签订日" prop="sign_date">
|
|
<el-form-item label="签订日" prop="sign_date">
|
|
<el-date-picker v-model="contractInfo.form.sign_date"
|
|
<el-date-picker v-model="contractInfo.form.sign_date"
|
|
placeholder="请选择签订日" value-format="YYYY-MM-DD"
|
|
placeholder="请选择签订日" value-format="YYYY-MM-DD"
|
|
@@ -737,7 +791,7 @@
|
|
{{contractInfo.serviceArray[1]?.title}}
|
|
{{contractInfo.serviceArray[1]?.title}}
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
<span v-if="(contractInfo.serviceVarietyShow&&contractInfo.operationtype=='compliance')"
|
|
<span v-if="(contractInfo.serviceVarietyShow&&contractInfo.operationtype=='compliance')"
|
|
- @click="contractInfo.varietyDiaShow=true">选择品种</span>
|
|
|
|
|
|
+ @click="selectVariety">选择品种</span>
|
|
</div>
|
|
</div>
|
|
<!-- 市场策略 -->
|
|
<!-- 市场策略 -->
|
|
<el-checkbox :label="contractInfo.serviceArray[2]?.service_template_id" style="margin-right: 0;"
|
|
<el-checkbox :label="contractInfo.serviceArray[2]?.service_template_id" style="margin-right: 0;"
|
|
@@ -750,14 +804,19 @@
|
|
{{contractInfo.serviceArray[3]?.title}}
|
|
{{contractInfo.serviceArray[3]?.title}}
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
|
|
+ <div class="info-service-remark">
|
|
|
|
+ <span style="white-space: nowrap;font-size: 14px;margin-right: 20px;">套餐备注</span>
|
|
|
|
+ <el-input style="flex-grow: 1;" :disabled="contractInfo.operationtype!='compliance'"
|
|
|
|
+ v-model="contractInfo.form.serviceRemark" placeholder="请输入备注"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="info-row">
|
|
<div class="info-row">
|
|
<div class="info-row-title">备注</div>
|
|
<div class="info-row-title">备注</div>
|
|
<div class="info-row-remark">
|
|
<div class="info-row-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.remark"
|
|
|
|
- placeholder="请输入备注"
|
|
|
|
|
|
+ v-model="contractInfo.form.remark" placeholder="请输入备注"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -767,7 +826,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 开票登记 -->
|
|
<!-- 开票登记 -->
|
|
- <div class="info-box" v-if="contractInfo.operationtype!='compliance'" style="margin-top:20px ;" id="info-invoice-box">
|
|
|
|
|
|
+ <div class="info-box" v-if="contractInfo.operationtype!='compliance'"
|
|
|
|
+ style="margin-top:20px ;" id="info-invoice-box" v-permission="['financial:list:invoice','financial:list:placement','financial:list:viewIandP','or']">
|
|
<div class="info-box-head">开票登记{{contractInfo.moneyData.waitInvoiceMoney==0?'':'(待开票)'}}</div>
|
|
<div class="info-box-head">开票登记{{contractInfo.moneyData.waitInvoiceMoney==0?'':'(待开票)'}}</div>
|
|
<div class="info-row" >
|
|
<div class="info-row" >
|
|
<div class="info-row-title">开票信息</div>
|
|
<div class="info-row-title">开票信息</div>
|
|
@@ -789,9 +849,8 @@
|
|
</template>
|
|
</template>
|
|
<template #default="{row,$index}">
|
|
<template #default="{row,$index}">
|
|
<el-form-item :prop="`invoiceData.${$index}.amount`" :show-message="false"
|
|
<el-form-item :prop="`invoiceData.${$index}.amount`" :show-message="false"
|
|
- :error="invoiceForm.rowErrorShow"
|
|
|
|
:rules="{required:true,message:()=>{ ElMessage.error('开票金额不能为空')},trigger:'blur'}">
|
|
:rules="{required:true,message:()=>{ ElMessage.error('开票金额不能为空')},trigger:'blur'}">
|
|
- <el-input v-model.trim="row.amount" style="width: 124px;"
|
|
|
|
|
|
+ <el-input v-model.trim="row.amount" style="width: 124px;" :disabled="row.invoice_id?true:false"
|
|
placeholder="请输入金额" @input="(e)=>moneyChange('invoice',e,$index)"></el-input>
|
|
placeholder="请输入金额" @input="(e)=>moneyChange('invoice',e,$index)"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
@@ -800,13 +859,21 @@
|
|
<template #header>
|
|
<template #header>
|
|
<span style="color: #FF3400;">*</span>开票日期
|
|
<span style="color: #FF3400;">*</span>开票日期
|
|
</template>
|
|
</template>
|
|
- <template #default="{row,$index}">
|
|
|
|
|
|
+ <template #default="{row,$index}" >
|
|
<el-form-item :prop="`invoiceData.${$index}.invoice_date`" :show-message="false"
|
|
<el-form-item :prop="`invoiceData.${$index}.invoice_date`" :show-message="false"
|
|
:rules="{required:true,message:()=>{ ElMessage.error('请选择开票日期')},trigger:'change'}">
|
|
:rules="{required:true,message:()=>{ ElMessage.error('请选择开票日期')},trigger:'change'}">
|
|
- <el-date-picker v-model="row.invoice_date" style="width: 124px;"
|
|
|
|
|
|
+ <el-date-picker v-model="row.invoice_date" style="width: 124px;" :disabled="row.invoice_id?true:false"
|
|
placeholder="请选择日期" value-format="YYYY-MM-DD" :clearable="false" ></el-date-picker>
|
|
placeholder="请选择日期" value-format="YYYY-MM-DD" :clearable="false" ></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
|
|
+ </el-table-column >
|
|
|
|
+ <el-table-column label="备注" width="180" align="center" prop="remark" show-overflow-tooltip >
|
|
|
|
+ <template #default="{row}">
|
|
|
|
+ <el-form-item v-if="row.invoice_id?false:true">
|
|
|
|
+ <el-input v-model="row.remark" style="width: 124px;" placeholder="请输入备注" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <span v-else>{{row.remark || '--'}}</span>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="180" align="center" v-if="contractInfo.operationtype=='invoice'">
|
|
<el-table-column label="操作" width="180" align="center" v-if="contractInfo.operationtype=='invoice'">
|
|
<template #default="{row,$index}" >
|
|
<template #default="{row,$index}" >
|
|
@@ -821,7 +888,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 到款登记 -->
|
|
<!-- 到款登记 -->
|
|
- <div class="info-box" v-if="contractInfo.operationtype!='compliance'" style="margin-top:20px ;" id="info-invoice-box">
|
|
|
|
|
|
+ <div class="info-box" v-if="contractInfo.operationtype!='compliance'" v-permission="['financial:list:invoice','financial:list:placement','financial:list:viewIandP','or']"
|
|
|
|
+ style="margin-top:20px ;" id="info-invoice-box">
|
|
<div class="info-box-head">到款登记{{contractInfo.moneyData.waitPlacementMoney==0?'':'(待到款)'}}</div>
|
|
<div class="info-box-head">到款登记{{contractInfo.moneyData.waitPlacementMoney==0?'':'(待到款)'}}</div>
|
|
<div class="info-row" >
|
|
<div class="info-row" >
|
|
<div class="info-row-title">到款信息</div>
|
|
<div class="info-row-title">到款信息</div>
|
|
@@ -843,9 +911,8 @@
|
|
</template>
|
|
</template>
|
|
<template #default="{row,$index}">
|
|
<template #default="{row,$index}">
|
|
<el-form-item :prop="`placementData.${$index}.amount`" :show-message="false"
|
|
<el-form-item :prop="`placementData.${$index}.amount`" :show-message="false"
|
|
- :error="placementForm.rowErrorShow"
|
|
|
|
:rules="{required:true,message:()=>{ ElMessage.error('到款金额不能为空')},trigger:'blur'}">
|
|
:rules="{required:true,message:()=>{ ElMessage.error('到款金额不能为空')},trigger:'blur'}">
|
|
- <el-input v-model="row.amount" style="width: 124px;"
|
|
|
|
|
|
+ <el-input v-model="row.amount" style="width: 124px;" :disabled="row.invoice_id?true:false"
|
|
placeholder="请输入金额" @input="(e)=>moneyChange('placement',e,$index)"></el-input>
|
|
placeholder="请输入金额" @input="(e)=>moneyChange('placement',e,$index)"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
@@ -857,11 +924,20 @@
|
|
<template #default="{row,$index}">
|
|
<template #default="{row,$index}">
|
|
<el-form-item :prop="`placementData.${$index}.invoice_date`" :show-message="false"
|
|
<el-form-item :prop="`placementData.${$index}.invoice_date`" :show-message="false"
|
|
:rules="{required:true,message:()=>{ ElMessage.error('请选择到款日期')},trigger:'change'}">
|
|
:rules="{required:true,message:()=>{ ElMessage.error('请选择到款日期')},trigger:'change'}">
|
|
- <el-date-picker v-model="row.invoice_date" style="width: 124px;" :clearable="false"
|
|
|
|
|
|
+ <el-date-picker v-model="row.invoice_date" style="width: 124px;" :clearable="false"
|
|
|
|
+ :disabled="row.invoice_id?true:false"
|
|
placeholder="请选择日期" value-format="YYYY-MM-DD" format="YYYY-MM-DD"></el-date-picker>
|
|
placeholder="请选择日期" value-format="YYYY-MM-DD" format="YYYY-MM-DD"></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="备注" width="180" align="center" prop="remark" show-overflow-tooltip >
|
|
|
|
+ <template #default="{row}">
|
|
|
|
+ <el-form-item v-if="row.invoice_id?false:true">
|
|
|
|
+ <el-input v-model="row.remark" style="width: 124px;" placeholder="请输入备注"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <span v-else>{{row.remark || '--'}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作" width="180" align="center" v-if="contractInfo.operationtype=='placement'">
|
|
<el-table-column label="操作" width="180" align="center" v-if="contractInfo.operationtype=='placement'">
|
|
<template #default="{row,$index}">
|
|
<template #default="{row,$index}">
|
|
<span class="table-operation-button" @click="deleteRow('placement',$index)"
|
|
<span class="table-operation-button" @click="deleteRow('placement',$index)"
|
|
@@ -904,8 +980,10 @@
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
<!-- 小套餐选择品种弹窗 -->
|
|
<!-- 小套餐选择品种弹窗 -->
|
|
- <service-variety-dia v-model:visible="contractInfo.varietyDiaShow" @selectFinish="getVarieties"
|
|
|
|
- :service="contractInfo.serviceArray.find(item=>item.service_template_id==2)" :currentService="contractInfo.currentSmallService" ></service-variety-dia>
|
|
|
|
|
|
+ <permission-dia v-model:visible="contractInfo.varietyDiaShow" :type="contractInfo.varietyDiaType"
|
|
|
|
+ @selectFinish="getPermissionChecked" :hasCheckedPermission="contractInfo.checkedPermission"></permission-dia>
|
|
|
|
+ <!-- <service-variety-dia v-model:visible="contractInfo.varietyDiaShow" @selectFinish="getVarieties"
|
|
|
|
+ :service="contractInfo.serviceArray.find(item=>item.service_template_id==2)" :currentService="contractInfo.currentSmallService" ></service-variety-dia> -->
|
|
<!-- 查看套餐弹窗 -->
|
|
<!-- 查看套餐弹窗 -->
|
|
<el-dialog v-model="contractInfo.serviceShow" style="min-width: 800px;" title="" width="70vw" top="5vh">
|
|
<el-dialog v-model="contractInfo.serviceShow" style="min-width: 800px;" title="" width="70vw" top="5vh">
|
|
<template #header>
|
|
<template #header>
|
|
@@ -991,6 +1069,12 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .info-service-remark{
|
|
|
|
+ display: flex;
|
|
|
|
+ padding-left: 50px;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ }
|
|
// 备注
|
|
// 备注
|
|
.info-row-remark{
|
|
.info-row-remark{
|
|
display: flex;
|
|
display: flex;
|