|
|
@ -171,6 +171,13 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="padding-bottom: 1px;border: 1px solid #E0E3EB" class="titleOne"> |
|
|
|
<div style="color: red;font-weight: bold">注:若开票信息需要修改时,请在修改后点击生成合同按钮重新生成相关附件</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="mini" class="btntopblueline" style="padding-right: 10px" @click="handleCreate()">生成合同</el-button> |
|
|
|
<el-button type="primary" size="mini" class="btntopblueline" @click="handleDownLoad(formobj.allDownloadUrl)">下载合同</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="title">证件(营业执照或身份证)</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
@ -201,7 +208,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { fetchDetailsBySid, saveOrUpdate, submit, fetchByContractNo } from '@/api/anruifinmanagement/finwaitinvoiceapply' |
|
|
|
import { fetchDetailsBySid, saveOrUpdate, submit, fetchByContractNo, saveInvoicedApplyInfoPdf } from '@/api/anruifinmanagement/finwaitinvoiceapply' |
|
|
|
import { selectAllDisList2, typeValues } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import upload from '@/components/uploadFile/upload' |
|
|
|
import salesOrder from '@/components/publicPage/salesOrder' |
|
|
@ -232,6 +239,7 @@ export default { |
|
|
|
image_list2: [], |
|
|
|
image_list4: [], |
|
|
|
formobj: { |
|
|
|
allDownloadUrl: '', |
|
|
|
applyDate: '', |
|
|
|
arrearsMoney: '', |
|
|
|
arrearsOpenYYKey: '', |
|
|
@ -526,23 +534,76 @@ export default { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divAdd'].showEdit(this.formobj.openTickName, this.formobj.useOrgSid, this.openTick_list, '开票申请') |
|
|
|
}, |
|
|
|
handleCreate() { |
|
|
|
if (this.formobj.oneBillMoney === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '单台开票金额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|
|
|
if (this.formobj.finBillVehicles[i].openTickName === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: this.formobj.finBillVehicles[i].vinNo + '的开票名称不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '附件信息正在生成中,请稍等', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
saveInvoicedApplyInfoPdf(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
loading.close() |
|
|
|
this.formobj.sid = res.data.sid |
|
|
|
this.formobj.allDownloadUrl = res.data.allDownloadUrl |
|
|
|
this.$message({ showClose: true, type: 'success', message: res.msg }) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleDownLoad(val) { |
|
|
|
if (val !== null && val !== '' && val !== undefined) { |
|
|
|
window.open(val, '_blank') |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请生成附件后再下载' }) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSave() { |
|
|
|
if (this.formobj.oneBillMoney === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '单条开票金额不能为空' }) |
|
|
|
this.$message({ showClose: true, type: 'error', message: '单台开票金额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|
|
|
if (this.formobj.finBillVehicles[i].openTickName === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: this.formobj.finBillVehicles[i].vinNo + '的开票名称不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.finBillVehicles[i].openTickRemarks === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: this.formobj.finBillVehicles[i].vinNo + '的开票信息为空,请完善经销商信息或客户信息' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.getUrl() |
|
|
|
this.submitdisabled = true |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '附件信息正在生成中,请稍等', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
saveOrUpdate(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
loading.close() |
|
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
loading.close() |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} |
|
|
@ -567,14 +628,23 @@ export default { |
|
|
|
if (valid) { |
|
|
|
this.getUrl() |
|
|
|
this.submitdisabled = true |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '附件信息正在生成中,请稍等', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
submit(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
loading.close() |
|
|
|
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
loading.close() |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} |
|
|
@ -650,6 +720,7 @@ export default { |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.formobj = { |
|
|
|
allDownloadUrl: '', |
|
|
|
applyDate: '', |
|
|
|
arrearsMoney: '', |
|
|
|
arrearsOpenYYKey: '', |
|
|
|