|
@@ -7,7 +7,7 @@
|
|
|
import {ElMessage} from 'element-plus'
|
|
|
import {getSellerList,getContractSearchList,getServiceDetail} from '@/api/crm'
|
|
|
import {getServiceList,registerAdd,registerDetail,registerEdit,registerInvoice,
|
|
|
- registerPayment,contractRegisterCheck} from '@/api/financialMana'
|
|
|
+ registerPayment,contractRegisterCheck,preRegistrationDetail} from '@/api/financialMana'
|
|
|
import {getCurrencyList} from '@/api/common'
|
|
|
import scrollableSelect from '@/components/scrollable-select/index.vue'
|
|
|
|
|
@@ -334,9 +334,8 @@
|
|
|
// ------------------ 到款预登记
|
|
|
const supplementary_item=reactive({
|
|
|
id:0,
|
|
|
- placement_amount:"",
|
|
|
- placement_origin_amount:"",
|
|
|
- create_time:""
|
|
|
+ contract_register_id:0,
|
|
|
+ invoice_type:0
|
|
|
})
|
|
|
|
|
|
|
|
@@ -1182,7 +1181,9 @@
|
|
|
// 合规登记Id
|
|
|
contractInfo.form.contract_register_id = parseInt(route.query.complianceId) || ''
|
|
|
// 到款预登记Id
|
|
|
- supplementary_item.id = parseInt(route.query.supplementaryId) || ''
|
|
|
+ supplementary_item.id = parseInt(route.query.supplementaryId) || 0
|
|
|
+ supplementary_item.contract_register_id = parseInt(route.query.contract_register_id) || 0
|
|
|
+ supplementary_item.invoice_type = parseInt(route.query.invoice_type) || 0
|
|
|
// complianceId没有,认为是合规登记
|
|
|
contractInfo.operationtype=contractInfo.form.contract_register_id?(route.query.type || 'view'):'compliance'
|
|
|
|
|
@@ -1428,18 +1429,59 @@
|
|
|
}else if(supplementary_item.id){
|
|
|
// 拿到预登记详情信息
|
|
|
// console.log(supplementary_item.id);
|
|
|
- contractInfo.form.pre_pay_id=supplementary_item.id
|
|
|
- contractInfo.form.supplement =1
|
|
|
- contractInfo.form.company_name = route.query.company_name
|
|
|
- contractInfo.form.currency_unit = route.query.amount_unit
|
|
|
- contractInfo.form.contract_amount = route.query.placement_amount
|
|
|
- contractInfo.form.new_company = parseInt(route.query.new_company)
|
|
|
- contractInfo.form.start_date = route.query.start_date
|
|
|
- contractInfo.form.end_date = route.query.end_date
|
|
|
- contractInfo.form.seller_ids = route.query.seller_id
|
|
|
- contractInfo.form.seller_id = +route.query.seller_id
|
|
|
- contractInfo.contractValidityDate = [contractInfo.form.start_date,contractInfo.form.end_date]
|
|
|
- cascaderSelectSeller.value = [parseInt(route.query.seller_id)]
|
|
|
+ preRegistrationDetail({contract_register_id:supplementary_item.contract_register_id,
|
|
|
+ invoice_type:supplementary_item.invoice_type}).then(res=>{
|
|
|
+ if(!res.data) return
|
|
|
+ console.log(res.data);
|
|
|
+ contractInfo.form.pre_pay_id=supplementary_item.id
|
|
|
+ contractInfo.form.supplement =1
|
|
|
+ contractInfo.form.company_name = res.data.company_name
|
|
|
+ contractInfo.form.currency_unit = res.data.list[0]?.currency_unit
|
|
|
+ contractInfo.form.new_company = parseInt(res.data.new_company)
|
|
|
+ contractInfo.form.start_date = res.data.start_date
|
|
|
+ contractInfo.form.end_date = res.data.end_date
|
|
|
+ contractInfo.contractValidityDate = [contractInfo.form.start_date,contractInfo.form.end_date]
|
|
|
+ res.data.services.map(item =>{
|
|
|
+ if(item.service_template_id==2){
|
|
|
+ // ficc小套餐
|
|
|
+ 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 if(item.service_template_id==11 || item.service_template_id==12){
|
|
|
+ // 权益大套餐
|
|
|
+ contractInfo.checkedPermissionQyBig = [item.service_template_id]
|
|
|
+ contractInfo.form.services.push(item)
|
|
|
+ }else if([19,20,21,22,23,24,25,26,27].includes(item.service_template_id)){
|
|
|
+ // 行业套餐
|
|
|
+ contractInfo.checkedPermissionQySmall.push(item.service_template_id)
|
|
|
+ contractInfo.form.services.push(item)
|
|
|
+ }else{
|
|
|
+ contractInfo.form.services.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // console.log(contractInfo.form.services);
|
|
|
+ contractInfo.checkedService=res.data.services.map(item => {
|
|
|
+ if(item.product_id==1){
|
|
|
+ let serviceId=item.service_template_id
|
|
|
+ // 大套餐或者小套餐
|
|
|
+ if(serviceId==1 || serviceId==2) serciveChange(true,serviceId,'ficc',false)
|
|
|
+ return serviceId
|
|
|
+ }
|
|
|
+ }).filter(Boolean)
|
|
|
+ contractInfo.checkedServiceQy=res.data.services.map(item => {
|
|
|
+ if(item.product_id==2){
|
|
|
+ let serviceId=item.service_template_id
|
|
|
+ // 权益大套餐或者行业套餐
|
|
|
+ if(serviceId==10 || serviceId==13) serciveChange(true,serviceId==10?1:2,'qy',false)
|
|
|
+ return serviceId
|
|
|
+ }
|
|
|
+ }).filter(Boolean)
|
|
|
+ })
|
|
|
}
|
|
|
</script>
|
|
|
|