|
@@ -2,9 +2,9 @@
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
import {useRouter} from 'vue-router'
|
|
|
import {useStore} from 'vuex'
|
|
|
-import {getSellerList} from '@/api/crm'
|
|
|
+import {getSellerList,getSellerListNoG} from '@/api/crm'
|
|
|
import {getCurrencyList} from '@/api/common'
|
|
|
-import {getServiceList,getPreRegistrationList,preRegistrationAdd,
|
|
|
+import {getServiceList,getPreRegistrationList,preRegistrationAdd,preRegistrationCheck,
|
|
|
preRegistrationDetail,preRegistrationEdit,preRegistrationDelete,preRegistrationSave} from '@/api/financialMana'
|
|
|
import serviceCascader from './composition/serivceCascader.js'
|
|
|
// 套餐的composition
|
|
@@ -24,7 +24,7 @@ const store = useStore()
|
|
|
total:0,
|
|
|
})
|
|
|
// -----------------弹窗
|
|
|
- const registrationPreForm=ref(null)
|
|
|
+ const registrationPreFormRef=ref(null)
|
|
|
|
|
|
// 新增/编辑 开票/到款 预登记弹窗
|
|
|
const dialog=reactive({
|
|
@@ -48,6 +48,11 @@ const store = useStore()
|
|
|
}
|
|
|
],
|
|
|
},
|
|
|
+ // 当前编辑的项
|
|
|
+ currentEditPreId:0,
|
|
|
+ // 套餐是否改变
|
|
|
+ hasServiceChange:false,
|
|
|
+
|
|
|
//选中的套餐ID - 级联选择器绑定值
|
|
|
selectServices:[],
|
|
|
validityDate:[]
|
|
@@ -143,6 +148,7 @@ const productIdChange=(item)=>{
|
|
|
}
|
|
|
// 级联选择器套餐改变
|
|
|
const servicesChange=(value,type)=>{
|
|
|
+ dialog.hasServiceChange=true
|
|
|
let cascaderRef = type==1?selectServicesRef.value:selectServicesPreRef.value
|
|
|
let returnItem=serviceComposition.servicesChange(servicesList.value,value,cascaderRef)
|
|
|
if(type == 1){
|
|
@@ -152,7 +158,7 @@ const servicesChange=(value,type)=>{
|
|
|
serviceTypePre.value = returnItem.typeValue
|
|
|
preDialog.preForm.services=preDialog.selectServices=returnItem.backValue
|
|
|
}
|
|
|
- console.log(value,returnItem.backValue);
|
|
|
+ // console.log(value,returnItem.backValue);
|
|
|
}
|
|
|
|
|
|
watch(serviceType,(newVal)=>{
|
|
@@ -184,17 +190,25 @@ watch(serviceTypePre,(newVal)=>{
|
|
|
})
|
|
|
// -----------------------------------------套餐部分 - 结束
|
|
|
// -----------------------------------------销售部分 - 开始
|
|
|
-//FICC的销售列表
|
|
|
-let sellerInvoiceListF=[]
|
|
|
+//FICC&权益销售列表
|
|
|
+let sellerInvoiceListFandQ=[]
|
|
|
//权益的销售列表
|
|
|
let sellerInvoiceListQ=[]
|
|
|
|
|
|
//获取销售列表
|
|
|
const getSellerListFun=()=>{
|
|
|
- getSellerList().then(res=>{
|
|
|
- sellerInvoiceListF = res.data.ficc_list || []
|
|
|
- sellerInvoiceListQ = res.data.rai_list || []
|
|
|
+ getSellerListNoG().then(res=>{
|
|
|
+ if(!res.data) return
|
|
|
+ sellerInvoiceListQ = res.data.RaiSeller
|
|
|
+ sellerInvoiceListFandQ=[
|
|
|
+ {seller_id: 2,seller_name: "FICC销售",child:res.data.FiccSeller},
|
|
|
+ {seller_id: 5,seller_name: "权益销售",child:res.data.RaiSeller}
|
|
|
+ ]
|
|
|
})
|
|
|
+ // getSellerList().then(res=>{
|
|
|
+ // sellerInvoiceListF = res.data.ficc_list || []
|
|
|
+ // sellerInvoiceListQ = res.data.rai_list || []
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
let elMessageDom=null
|
|
@@ -261,19 +275,24 @@ const deleteRegistrationPreRow=(index,row)=>{
|
|
|
}
|
|
|
//编辑预登记
|
|
|
const editRegistrationPre=(row)=>{
|
|
|
+ dialog.hasServiceChange=false
|
|
|
preRegistrationDetail({contract_register_id:row.contract_register_id,
|
|
|
- invoice_type:row.invoice_type}).then(res=>{
|
|
|
+ invoice_type:row.invoice_type,detail_type:1}).then(res=>{
|
|
|
if(!res.data) return
|
|
|
dialog.registrationPreForm.contract_register_id = res.data.contract_register_id
|
|
|
dialog.registrationPreForm.company_name = res.data.company_name
|
|
|
dialog.registrationPreForm.invoice_type = row.invoice_type
|
|
|
- dialog.registrationPreForm.IorPInfo=res.data.list
|
|
|
+ // 排序 将编辑入口对应的记录提到第一位
|
|
|
+ dialog.registrationPreForm.IorPInfo=res.data.list.sort((a,b)=>a.pre_register_id == row.pre_register_id?-1:1)
|
|
|
+ dialog.currentEditPreId = row.pre_register_id
|
|
|
+
|
|
|
dialog.registrationPreForm.services=res.data.services || []
|
|
|
dialog.validityDate=[res.data.start_date,res.data.end_date]
|
|
|
dialog.selectServices = [...res.data.services.map(item => item.service_template_id),...res.data.serviceTemplateIds]
|
|
|
dialog.registrationPreForm.IorPInfo.forEach(item =>{
|
|
|
// 不能为零,为零会回显
|
|
|
item.service_product_id=item.service_product_id==0?'':item.service_product_id
|
|
|
+ item.seller_id=item.seller_id==0?'':item.seller_id
|
|
|
})
|
|
|
dialog.registrationType=row.invoice_type==3?'开票':'到款'
|
|
|
dialog.title=`编辑${dialog.registrationType}预登记`
|
|
@@ -306,15 +325,19 @@ const dialogClosed=()=>{
|
|
|
serviceType.value=0
|
|
|
serviceComposition.resetDisable(servicesList.value)
|
|
|
setTimeout(()=>{
|
|
|
- registrationPreForm.value.clearValidate()
|
|
|
+ registrationPreFormRef.value.clearValidate()
|
|
|
},0)
|
|
|
}
|
|
|
|
|
|
// 提交
|
|
|
const submitForm=()=>{
|
|
|
- registrationPreForm.value.validate((valid)=>{
|
|
|
+ registrationPreFormRef.value.validate(async (valid)=>{
|
|
|
if(valid){
|
|
|
- const serviceData=serivcesDataHandler(selectServicesRef.value)
|
|
|
+ let serviceData=[]
|
|
|
+ if(dialog.hasServiceChange){
|
|
|
+ // 套餐改变了,重组数据格式
|
|
|
+ serviceData=serivcesDataHandler(selectServicesRef.value)
|
|
|
+ }
|
|
|
let params={
|
|
|
contract_register_id:dialog.registrationPreForm.contract_register_id||0,
|
|
|
company_name:dialog.registrationPreForm.company_name,
|
|
@@ -322,7 +345,7 @@ const submitForm=()=>{
|
|
|
start_date:dialog.registrationPreForm.start_date,
|
|
|
end_date:dialog.registrationPreForm.end_date,
|
|
|
list:dialog.registrationPreForm.IorPInfo,
|
|
|
- services:serviceData,
|
|
|
+ services:dialog.hasServiceChange?serviceData:dialog.registrationPreForm.services,
|
|
|
del_invoice_ids:hasDeleteContractInvoiceIds,
|
|
|
del_pre_register_ids:hasDeletePreRegisterIds
|
|
|
}
|
|
@@ -332,17 +355,50 @@ const submitForm=()=>{
|
|
|
item.seller_id=item.seller_id||0
|
|
|
item.service_product_id=item.service_product_id||0
|
|
|
})
|
|
|
- console.log(params);
|
|
|
- let prePlacementProp=preRegistrationAdd
|
|
|
+
|
|
|
+ // console.log(params);
|
|
|
if(params.contract_register_id){
|
|
|
// 编辑
|
|
|
- prePlacementProp=preRegistrationEdit
|
|
|
+ preRegistrationEdit(params).then(res=>{
|
|
|
+ dialog.registrationPreShow=false
|
|
|
+ ElMessage.success(`${dialog.title}成功`)
|
|
|
+ placementPreList()
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ // 新增
|
|
|
+ // 校验合同信息是否存在
|
|
|
+ let checkRes = await preRegistrationCheck(
|
|
|
+ {company_name:params.company_name,
|
|
|
+ start_date:params.start_date,
|
|
|
+ end_date:params.end_date,
|
|
|
+ services:params.services})
|
|
|
+ if(!checkRes.data) return
|
|
|
+ if(checkRes.data.exist!==0){
|
|
|
+ ElMessageBox.confirm(`合规信息已存在,是否继续${dialog.registrationType}登记?`,
|
|
|
+ '操作提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(resp=>{
|
|
|
+ preRegistrationAdd(params).then(res=>{
|
|
|
+ dialog.registrationPreShow=false
|
|
|
+ ElMessage.success(`${dialog.title}成功`)
|
|
|
+ placementPreList()
|
|
|
+ })
|
|
|
+ }).catch((err)=>{
|
|
|
+ if(err=='cancel'){
|
|
|
+ dialog.registrationPreShow=false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ preRegistrationAdd(params).then(res=>{
|
|
|
+ dialog.registrationPreShow=false
|
|
|
+ ElMessage.success(`${dialog.title}成功`)
|
|
|
+ placementPreList()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- prePlacementProp(params).then(res=>{
|
|
|
- dialog.registrationPreShow=false
|
|
|
- ElMessage.success(`${dialog.title}成功`)
|
|
|
- placementPreList()
|
|
|
- })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -398,7 +454,7 @@ watch(()=>preDialog.validityDate,(newVal)=>{
|
|
|
const preIorP=(row)=>{
|
|
|
preRegistrationDetail({contract_register_id:row.contract_register_id,
|
|
|
invoice_type:row.invoice_type==3?4:3,pre_register_id:row.pre_register_id,arrive_id:row.arrive_id,
|
|
|
- invoice_id:row.invoice_id}).then(res=>{
|
|
|
+ invoice_id:row.invoice_id,detail_type:2}).then(res=>{
|
|
|
if(!res.data) return
|
|
|
preDialog.preForm.contract_register_id = res.data.contract_register_id
|
|
|
preDialog.preForm.company_name = res.data.company_name
|
|
@@ -406,10 +462,15 @@ const preIorP=(row)=>{
|
|
|
preDialog.preForm.service_product_id=row.service_product_id==0?'':row.service_product_id
|
|
|
preDialog.preForm.pre_register_id = row.pre_register_id || 0
|
|
|
preDialog.preForm.currency_unit=row.currency_unit
|
|
|
+ // 从列表取销售
|
|
|
+ preDialog.preForm.seller_id=preDialog.preForm.invoice_type==3?row.payment_seller_id || '' : row.seller_id || ''
|
|
|
+
|
|
|
if(res.data.list.length>0){
|
|
|
preDialog.preForm.contract_invoice_id = res.data.list[0].contract_invoice_id || 0
|
|
|
preDialog.preForm.amount=res.data.list[0].amount
|
|
|
- preDialog.preForm.seller_id=res.data.list[0].seller_id
|
|
|
+ if(res.data.list[0].seller_id!=0){
|
|
|
+ preDialog.preForm.seller_id=res.data.list[0].seller_id
|
|
|
+ }
|
|
|
preDialog.preForm.invoice_type=res.data.list[0].invoice_type
|
|
|
preDialog.preForm.register_date=res.data.list[0].register_date
|
|
|
preDialog.preForm.remark=res.data.list[0].remark
|
|
@@ -421,24 +482,8 @@ const preIorP=(row)=>{
|
|
|
preDialog.show=true
|
|
|
|
|
|
nextTick(()=>{
|
|
|
- if(preDialog.title=='预开票'){
|
|
|
- // 预开票需要回显套餐信息
|
|
|
- serviceTypePre.value=serviceComposition.servicesChange(servicesList.value,preDialog.selectServices,selectServicesPreRef.value).typeValue
|
|
|
- }else{
|
|
|
- // 预到款不用回显套餐信息
|
|
|
- let checkedNodes=selectServicesPreRef.value.getCheckedNodes()
|
|
|
-
|
|
|
- // 套餐类型
|
|
|
- let hasFICCService = checkedNodes.some(Node => Node.data.product_id == 1)
|
|
|
- let hasQYService = checkedNodes.some(Node => Node.data.product_id == 2)
|
|
|
- if(hasFICCService&&hasQYService){
|
|
|
- serviceTypePre.value=3
|
|
|
- }else if(hasFICCService){
|
|
|
- serviceTypePre.value=1
|
|
|
- }else{
|
|
|
- serviceTypePre.value=2
|
|
|
- }
|
|
|
- }
|
|
|
+ // 回显套餐信息
|
|
|
+ serviceTypePre.value=serviceComposition.servicesChange(servicesList.value,preDialog.selectServices,selectServicesPreRef.value).typeValue
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -446,19 +491,11 @@ const preIorP=(row)=>{
|
|
|
const submitPreForm=()=>{
|
|
|
preFormRef.value.validate((valid)=>{
|
|
|
if(valid){
|
|
|
- let serviceData;
|
|
|
- if(preDialog.title=='预开票'){
|
|
|
- // 预开票可能会修改套餐,需要重组套餐数据
|
|
|
- serviceData=serivcesDataHandler(selectServicesPreRef.value)
|
|
|
- }else{
|
|
|
- // 预到款不需要重组套餐数据
|
|
|
- serviceData=preDialog.preForm.services
|
|
|
- }
|
|
|
preDialog.preForm.amount = parseFloat(preDialog.preForm.amount)
|
|
|
let params={
|
|
|
contract_register_id:preDialog.preForm.contract_register_id,
|
|
|
company_name:preDialog.preForm.company_name,
|
|
|
- register_type:preDialog.preForm.invoice_type,
|
|
|
+ register_type:preDialog.title=='预到款'?4:3,
|
|
|
start_date:preDialog.preForm.start_date,
|
|
|
end_date:preDialog.preForm.end_date,
|
|
|
list:[{
|
|
@@ -471,9 +508,9 @@ const submitPreForm=()=>{
|
|
|
seller_id:preDialog.preForm.seller_id||0,
|
|
|
service_product_id:preDialog.preForm.service_product_id,
|
|
|
}],
|
|
|
- services:serviceData
|
|
|
+ services:preDialog.preForm.services
|
|
|
}
|
|
|
- console.log(params);
|
|
|
+ // console.log(params);
|
|
|
preRegistrationSave(params).then(res=>{
|
|
|
preDialog.show=false
|
|
|
ElMessage.success(`${preDialog.title}成功`)
|
|
@@ -619,15 +656,12 @@ placementPreList()
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="套餐" prop="services" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="开票日" prop="invoice_time" width="110">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="开票金额" prop="origin_amount" width="120">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="开票日" prop="invoice_time" width="110"></el-table-column>
|
|
|
+ <el-table-column label="开票金额" prop="origin_amount" width="120"></el-table-column>
|
|
|
<el-table-column label="开票销售" width="100" prop="seller_name"></el-table-column>
|
|
|
- <el-table-column label="到款日" prop="arrive_time" width="110">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="到款金额" prop="arrive_origin_amount" width="120">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="到款日" prop="arrive_time" width="110"></el-table-column>
|
|
|
+ <el-table-column label="到款金额" prop="arrive_origin_amount" width="120"></el-table-column>
|
|
|
+ <el-table-column label="到款销售" width="100" prop="payment_seller_name"></el-table-column>
|
|
|
<el-table-column label="操作" fixed="right" min-width="100">
|
|
|
<template #default="{row}">
|
|
|
<div class="table-options" style="padding-right: 20px;">
|
|
@@ -699,14 +733,14 @@ placementPreList()
|
|
|
<el-dialog v-model="dialog.registrationPreShow" :title="dialog.title" top="5vh"
|
|
|
width="942px" @closed="dialogClosed"
|
|
|
:close-on-click-modal="false">
|
|
|
- <el-form :model="dialog.registrationPreForm" inline ref="registrationPreForm" style="margin:0 10px;">
|
|
|
+ <el-form :model="dialog.registrationPreForm" inline ref="registrationPreFormRef" style="margin:0 10px;">
|
|
|
<el-form-item label="客户名称" prop="company_name" label-width="90" style="margin-right: 30px;"
|
|
|
:rules="{required:true,message:'客户名称不能为空',trigger:'blur'}">
|
|
|
<el-input v-model="dialog.registrationPreForm.company_name"
|
|
|
placeholder="请输入客户名称" style="width:320px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="约定有效期" prop="end_date" label-width="102" style="margin-right: 20px;"
|
|
|
- :rules="dialog.registrationType=='开票'?{required:true,message:'约定有效期不能为空',trigger:'change'}:{required:false}">
|
|
|
+ :rules="{required:true,message:'约定有效期不能为空',trigger:'change'}">
|
|
|
<el-date-picker type="daterange"
|
|
|
v-model="dialog.validityDate" style="max-width: 320px;"
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD"
|
|
@@ -714,7 +748,7 @@ placementPreList()
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="套餐" prop="services" label-width="90" style="margin-right: 20px;"
|
|
|
- :rules="dialog.registrationType=='开票'?{required:true,message:'套餐不能为空',trigger:'change'}:{required:false}">
|
|
|
+ :rules="{required:true,message:'套餐不能为空',trigger:'change'}">
|
|
|
<el-cascader filterable :options="servicesList" placeholder="请选择套餐" @change="(value)=>servicesChange(value,1)"
|
|
|
:show-all-levels="true" v-model="dialog.selectServices" :clearable="false" ref="selectServicesRef"
|
|
|
:props="{multiple:true,label:'title',value:'service_template_id',emitPath:false}" collapse-tags collapse-tags-tooltip
|
|
@@ -722,10 +756,13 @@ placementPreList()
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
<el-scrollbar max-height="470px" noresize style="margin: 0 -10px;padding: 0 10px;" >
|
|
|
- <div class="invoice-payment-row" v-for="(item,index) in dialog.registrationPreForm.IorPInfo" :key="index">
|
|
|
+ <div class="invoice-payment-row"
|
|
|
+ :style="{backgroundColor:dialog.currentEditPreId==item.pre_register_id?'#FBF9F4':'#F5F7FA',
|
|
|
+ border:dialog.currentEditPreId==item.pre_register_id?'1px solid #E9DDA2':'none'}"
|
|
|
+ v-for="(item,index) in dialog.registrationPreForm.IorPInfo" :key="index">
|
|
|
<el-form-item label="套餐类型" :prop="`IorPInfo.${index}.service_product_id`" v-if="serviceType==3"
|
|
|
label-width="90" style="margin-right: 20px;"
|
|
|
- :rules="dialog.registrationType=='开票'?{required:true,message:'套餐类型不能为空',trigger:'change'}:{required:false}">
|
|
|
+ :rules="{required:true,message:'套餐类型不能为空',trigger:'change'}">
|
|
|
<el-select v-model="item.service_product_id" style="width: 176px;" @change="productIdChange(item)"
|
|
|
placeholder="请选择套餐">
|
|
|
<el-option label="FICC套餐" :value="1"></el-option>
|
|
@@ -749,28 +786,33 @@ placementPreList()
|
|
|
:placeholder="`请选择${dialog.registrationType}日`" value-format="YYYY-MM-DD" :clearable="false">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="开票销售" :prop="`IorPInfo.${index}.seller_id`" label-width="90" style="margin-right: 0;"
|
|
|
- :rules="{required:true,message:'销售不能为空',trigger:'change'}" v-if="dialog.registrationType=='开票'">
|
|
|
- <el-select v-model="item.seller_id" style="width: 176px;"
|
|
|
+ <el-form-item :label="dialog.registrationType+'销售'" :prop="`IorPInfo.${index}.seller_id`" label-width="90" style="margin-right: 0;"
|
|
|
+ :rules="{required:true,message:'销售不能为空',trigger:'change'}">
|
|
|
+ <!-- <el-select v-model="item.seller_id" style="width: 176px;"
|
|
|
placeholder="请选择销售" filterable v-if="item.service_product_id==1">
|
|
|
<el-option :label="seller.seller_name" :value="seller.seller_id"
|
|
|
v-for="seller in sellerInvoiceListF" :key="seller.seller_id">
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="item.seller_id" style="width: 176px;"
|
|
|
- placeholder="请选择销售" filterable v-else-if="item.service_product_id==2">
|
|
|
+ </el-select> -->
|
|
|
+ <el-cascader :options="sellerInvoiceListFandQ" :disabled="dialog.registrationType=='到款' && item.contract_invoice_id"
|
|
|
+ v-model="item.seller_id" v-if="item.service_product_id==1"
|
|
|
+ placeholder="请选择销售" :props="{label:'seller_name',value:'seller_id',children:'child',emitPath:false}"
|
|
|
+ :show-all-levels="false" filterable style="max-width: 176px;"></el-cascader>
|
|
|
+ <el-select v-model="item.seller_id" style="width: 176px;"
|
|
|
+ :disabled="dialog.registrationType=='到款' && item.contract_invoice_id"
|
|
|
+ placeholder="请选择权益销售" filterable v-else-if="item.service_product_id==2">
|
|
|
<el-option :label="seller.seller_name" :value="seller.seller_id"
|
|
|
v-for="seller in sellerInvoiceListQ" :key="seller.seller_id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-select v-model="item.seller_id" style="width: 176px;"
|
|
|
- placeholder="请选择销售" v-else
|
|
|
+ placeholder="请选择销售" :disabled="dialog.registrationType=='到款' && item.contract_invoice_id" v-else
|
|
|
@visible-change="selectVisible">
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" :prop="`IorPInfo.${index}.remark`" label-width="90"
|
|
|
- style="margin-right: 0;" :style="{marginLeft:serviceType==3 && dialog.registrationType=='开票'?'20px':'0'}">
|
|
|
- <el-input v-model="item.remark" placeholder="请输入备注" :style="{width:serviceType==3&&dialog.registrationType=='开票'?'486px':'772px'}" />
|
|
|
+ style="margin-right: 0;" :style="{marginLeft:serviceType==3 ?'20px':'0'}">
|
|
|
+ <el-input v-model="item.remark" placeholder="请输入备注" :style="{width:serviceType==3?'486px':'772px'}" />
|
|
|
</el-form-item>
|
|
|
<el-icon color="#D0D2D5" class="deleteIcon" size="16px" @click="deleteRegistrationPreRow(index,item)"
|
|
|
v-show="dialog.registrationPreForm.IorPInfo.length>1"><CircleCloseFilled /></el-icon>
|
|
@@ -792,27 +834,31 @@ placementPreList()
|
|
|
</el-dialog>
|
|
|
<!--预开票/到款 弹窗 -->
|
|
|
<el-dialog v-model="preDialog.show" :title="preDialog.title"
|
|
|
- width="450px" @closed="preDialogClosed"
|
|
|
+ width="500px" @closed="preDialogClosed"
|
|
|
:close-on-click-modal="false">
|
|
|
<el-form :model="preDialog.preForm" :rules="preDialog.rules" id="preFormRef"
|
|
|
- ref="preFormRef" style="margin-left:10px;" label-width="101px">
|
|
|
- <el-form-item label="约定有效期" prop="end_date" v-if="preDialog.title=='预开票'">
|
|
|
- <el-date-picker type="daterange" key="pre"
|
|
|
+ ref="preFormRef" style="margin-left:37px;" label-width="101px">
|
|
|
+ <el-form-item label="客户名称" prop="company_name">
|
|
|
+ <el-input v-model="preDialog.preForm.company_name"
|
|
|
+ placeholder="请输入客户名称" style="width:286px" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="约定有效期" prop="end_date">
|
|
|
+ <el-date-picker type="daterange" key="pre" disabled
|
|
|
v-model="preDialog.validityDate" style="max-width: 286px;"
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD"
|
|
|
:clearable="false">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="套餐" prop="services" v-show="preDialog.title=='预开票'">
|
|
|
+ <el-form-item label="套餐" prop="services">
|
|
|
<el-cascader filterable :options="servicesList" placeholder="请选择套餐"
|
|
|
- @change="(value)=>servicesChange(value,2)"
|
|
|
+ @change="(value)=>servicesChange(value,2)" disabled
|
|
|
:show-all-levels="true" v-model="preDialog.selectServices" :clearable="false" ref="selectServicesPreRef"
|
|
|
:props="{multiple:true,label:'title',value:'service_template_id',emitPath:false}" collapse-tags collapse-tags-tooltip
|
|
|
key="preSeriveces" style="min-width: 286px;z-index: 100;">
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="套餐类型" prop="service_product_id" v-if="serviceTypePre==3"
|
|
|
- :rules="preDialog.title=='预开票'?{required:true,message:'套餐类型不能为空',trigger:'change'}:{required:false}">
|
|
|
+ :rules="{required:true,message:'套餐类型不能为空',trigger:'change'}">
|
|
|
<el-select v-model="preDialog.preForm.service_product_id"
|
|
|
style="width: 286px;" @change="productIdChange(preDialog.preForm)"
|
|
|
placeholder="请选择套餐">
|
|
@@ -828,14 +874,18 @@ placementPreList()
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="开票销售" prop="seller_id" v-if="preDialog.title=='预开票'">
|
|
|
- <el-select v-model="preDialog.preForm.seller_id" style="width: 286px;"
|
|
|
+ <el-form-item :label="preDialog.title=='预开票'?'开票销售':'到款销售'" prop="seller_id">
|
|
|
+ <!-- <el-select v-model="preDialog.preForm.seller_id" style="width: 286px;"
|
|
|
placeholder="请选择销售" filterable v-if="preDialog.preForm.service_product_id==1">
|
|
|
<el-option :label="seller.seller_name" :value="seller.seller_id"
|
|
|
v-for="seller in sellerInvoiceListF" :key="seller.seller_id">
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="preDialog.preForm.seller_id" style="width: 286px;"
|
|
|
+ </el-select> -->
|
|
|
+ <el-cascader :options="sellerInvoiceListFandQ" v-model="preDialog.preForm.seller_id"
|
|
|
+ v-if="preDialog.preForm.service_product_id==1" placeholder="请选择销售"
|
|
|
+ :props="{label:'seller_name',value:'seller_id',children:'child',emitPath:false}"
|
|
|
+ :show-all-levels="false" filterable style="min-width: 286px;" :disabled="preDialog.title=='预到款'"></el-cascader>
|
|
|
+ <el-select v-model="preDialog.preForm.seller_id" style="width: 286px;" :disabled="preDialog.title=='预到款'"
|
|
|
placeholder="请选择销售" filterable v-else-if="preDialog.preForm.service_product_id==2">
|
|
|
<el-option :label="seller.seller_name" :value="seller.seller_id"
|
|
|
v-for="seller in sellerInvoiceListQ" :key="seller.seller_id">
|
|
@@ -886,8 +936,8 @@ placementPreList()
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
.invoice-payment-row{
|
|
|
- padding: 20px 10px 0;
|
|
|
- background-color: #FBF9F4;
|
|
|
+ padding: 20px 8px 0;
|
|
|
+ // background-color: #F5F7FA;
|
|
|
margin-bottom: 20px;
|
|
|
position: relative;
|
|
|
&:last-child{
|