Browse Source

完善出库开票--增加生成合同、下载合同

master
yunuo970428 1 year ago
parent
commit
e60e3e3430
  1. 12
      anrui-buscenter/anrui-buscenter-ui/src/api/chukuguanli/chukubanli.js
  2. 54
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/relation/billingapplicationAdd.vue
  3. 54
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/relation/kaipiaoAdd.vue

12
anrui-buscenter/anrui-buscenter-ui/src/api/chukuguanli/chukubanli.js

@ -253,6 +253,18 @@ export function save(data) {
})
}
// 生成附件并保存数据
export function saveInvoicedApplyInfo2Pdf(data) {
return request({
url: '/buscenter/v1/busbillapplication/saveInvoicedApplyInfo2Pdf',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 维护开票信息(企业) --出库申请开票申请合并
export function saveQiYe(data) {
return request({

54
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/relation/billingapplicationAdd.vue

@ -158,6 +158,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">
@ -187,7 +194,7 @@
</template>
<script>
import { fetchDetailByCkSid, save, fetchByContractNo } from '@/api/chukuguanli/chukubanli'
import { fetchDetailByCkSid, save, fetchByContractNo, saveInvoicedApplyInfo2Pdf } from '@/api/chukuguanli/chukubanli'
import { selectAllDisList2, typeValues } from '@/api/dictcommons/dictcommons'
import upload from '@/components/uploadFile/uploadImg'
import xiaoshoudingdanInfo from '@/components/publicPage/dingdanInfo'
@ -216,6 +223,7 @@ export default {
image_list2: [],
image_list4: [],
formobj: {
allDownloadUrl: '',
applyDate: '',
arrearsMoney: '',
arrearsOpenYYKey: '',
@ -423,6 +431,40 @@ 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)'
})
saveInvoicedApplyInfo2Pdf(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: '单台开票金额不能为空' })
@ -446,14 +488,23 @@ export default {
return
}
this.submitdisabled = true
const loading = this.$loading({
lock: true,
text: '附件信息正在生成中,请稍等',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
save(this.formobj).then((res) => {
if (res.success) {
loading.close()
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn()
} else {
loading.close()
this.submitdisabled = false
}
}).catch(() => {
loading.close()
this.submitdisabled = false
})
}
@ -528,6 +579,7 @@ export default {
},
handleReturn() {
this.formobj = {
allDownloadUrl: '',
applyDate: '',
arrearsMoney: '',
arrearsOpenYYKey: '',

54
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/relation/kaipiaoAdd.vue

@ -158,6 +158,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">
@ -187,7 +194,7 @@
</template>
<script>
import { fetchDetailByCkSid, save, fetchByContractNo } from '@/api/chukuguanli/chukubanli'
import { fetchDetailByCkSid, save, fetchByContractNo, saveInvoicedApplyInfo2Pdf } from '@/api/chukuguanli/chukubanli'
import { selectAllDisList2, typeValues } from '@/api/dictcommons/dictcommons'
import upload from '@/components/uploadFile/uploadImg'
import xiaoshoudingdanInfo from '../../../publicPage/dingdanInfo'
@ -216,6 +223,7 @@ export default {
image_list2: [],
image_list4: [],
formobj: {
allDownloadUrl: '',
applyDate: '',
arrearsMoney: '',
arrearsOpenYYKey: '',
@ -423,6 +431,40 @@ 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)'
})
saveInvoicedApplyInfo2Pdf(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: '单台开票金额不能为空' })
@ -446,14 +488,23 @@ export default {
return
}
this.submitdisabled = true
const loading = this.$loading({
lock: true,
text: '附件信息正在生成中,请稍等',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
save(this.formobj).then((res) => {
if (res.success) {
loading.close()
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn()
} else {
loading.close()
this.submitdisabled = false
}
}).catch(() => {
loading.close()
this.submitdisabled = false
})
}
@ -528,6 +579,7 @@ export default {
},
handleReturn() {
this.formobj = {
allDownloadUrl: '',
applyDate: '',
arrearsMoney: '',
arrearsOpenYYKey: '',

Loading…
Cancel
Save