|
@@ -53,7 +53,8 @@ const store = useStore()
|
|
|
validityDate:[]
|
|
|
})
|
|
|
// 开票/到款预登记删除的id
|
|
|
- let hasDeleteIds=[]
|
|
|
+ let hasDeleteContractInvoiceIds=[]
|
|
|
+ let hasDeletePreRegisterIds=[]
|
|
|
// 监听
|
|
|
|
|
|
watch(()=>dialog.validityDate,(newVal)=>{
|
|
@@ -232,14 +233,14 @@ const addRegistrationPreRow=()=>{
|
|
|
ElMessage.error('请填写完整!')
|
|
|
return
|
|
|
}
|
|
|
- if(dialog.registrationType=='开票'&&!(lastItem.service_product_id&&lastItem.seller_id)){
|
|
|
+ if(dialog.registrationType=='开票' && !(lastItem.service_product_id&&lastItem.seller_id)){
|
|
|
ElMessage.error('请填写完整!')
|
|
|
return
|
|
|
}
|
|
|
dialog.registrationPreForm.IorPInfo.push({
|
|
|
service_product_id:serviceType.value==3?'':serviceType.value,
|
|
|
amount:'',
|
|
|
- currency_unit:'CNY',
|
|
|
+ currency_unit:lastItem.currency_unit || 'CNY',
|
|
|
register_date:'',
|
|
|
seller_id:'',
|
|
|
remark:''
|
|
@@ -254,7 +255,8 @@ const deleteRegistrationPreRow=(index,row)=>{
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
}).then(res=>{
|
|
|
- row.contract_invoice_id && hasDeleteIds.push(row.contract_invoice_id)
|
|
|
+ row.contract_invoice_id && hasDeleteContractInvoiceIds.push(row.contract_invoice_id)
|
|
|
+ row.pre_register_id && hasDeletePreRegisterIds.push(row.pre_register_id)
|
|
|
dialog.registrationPreForm.IorPInfo.splice(index,1)
|
|
|
}).catch(()=>{})
|
|
|
}
|
|
@@ -264,7 +266,6 @@ const editRegistrationPre=(row)=>{
|
|
|
invoice_type:row.invoice_type}).then(res=>{
|
|
|
if(!res.data) return
|
|
|
dialog.registrationPreForm.contract_register_id = res.data.contract_register_id
|
|
|
- dialog.registrationPreForm.pre_register_id = row.pre_register_id
|
|
|
dialog.registrationPreForm.company_name = res.data.company_name
|
|
|
dialog.registrationPreForm.invoice_type = row.invoice_type
|
|
|
dialog.registrationPreForm.IorPInfo=res.data.list
|
|
@@ -286,10 +287,10 @@ const editRegistrationPre=(row)=>{
|
|
|
|
|
|
//弹窗关闭动画 回调
|
|
|
const dialogClosed=()=>{
|
|
|
- hasDeleteIds=[]
|
|
|
+ hasDeleteContractInvoiceIds=[]
|
|
|
+ hasDeletePreRegisterIds=[]
|
|
|
dialog.registrationPreForm.company_name=''
|
|
|
dialog.registrationPreForm.contract_register_id=''
|
|
|
- dialog.registrationPreForm.pre_register_id=''
|
|
|
dialog.registrationPreForm.services=[]
|
|
|
dialog.registrationPreForm.IorPInfo=[
|
|
|
{
|
|
@@ -316,14 +317,14 @@ const submitForm=()=>{
|
|
|
const serviceData=serivcesDataHandler(selectServicesRef.value)
|
|
|
let params={
|
|
|
contract_register_id:dialog.registrationPreForm.contract_register_id||0,
|
|
|
- pre_register_id:dialog.registrationPreForm.pre_register_id||0,
|
|
|
company_name:dialog.registrationPreForm.company_name,
|
|
|
register_type:dialog.registrationType=='开票'?3:4,
|
|
|
start_date:dialog.registrationPreForm.start_date,
|
|
|
end_date:dialog.registrationPreForm.end_date,
|
|
|
list:dialog.registrationPreForm.IorPInfo,
|
|
|
services:serviceData,
|
|
|
- del_invoice_ids:hasDeleteIds
|
|
|
+ del_invoice_ids:hasDeleteContractInvoiceIds,
|
|
|
+ del_pre_register_ids:hasDeletePreRegisterIds
|
|
|
}
|
|
|
// 化''为0
|
|
|
params.list.forEach(item =>{
|