story#7062,供应商培训和财务发票修改,上传发票问题查找
This commit is contained in:
@ -170,8 +170,9 @@ export default {
|
|||||||
let res = await this.getJumpHandler();
|
let res = await this.getJumpHandler();
|
||||||
if(res?.data?.jump) {
|
if(res?.data?.jump) {
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
message: '您有没有完成的培训,请在中道调度APP上完成培训,再进行发票上传',
|
message: '您有暂未完成的培训,请在中道调度APP上完成培训,再进行发票上传',
|
||||||
confirmButtonText: '去培训',
|
confirmButtonText: '去培训',
|
||||||
|
confirmButtonColor: '#0E76F4',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
}).then(async() => {
|
}).then(async() => {
|
||||||
this.goPage('newTrainingList', { supplierId : this.supplierId })
|
this.goPage('newTrainingList', { supplierId : this.supplierId })
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="upload_btn_wrap">
|
<div class="upload_btn_wrap">
|
||||||
<div class="btn_save" @click="createInvoiceHandler">保存</div>
|
<div class="btn_save" @click="createInvoiceHandler">保存</div>
|
||||||
<van-uploader :before-read="beforeRead" :after-read="afterRead" accept=".png,.jpg,.jpeg,.pdf,.ofd">
|
<van-uploader :before-read="beforeRead" use-before-read :after-read="afterRead" accept=".png,.jpg,.jpeg,.pdf,.ofd">
|
||||||
<div class="btn_upload">
|
<div class="btn_upload">
|
||||||
<img class="icon_upload" src="@/assets/icon_upload.png" alt="">
|
<img class="icon_upload" src="@/assets/icon_upload.png" alt="">
|
||||||
上传发票
|
上传发票
|
||||||
@ -83,6 +83,7 @@
|
|||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
|
fileObj: '',
|
||||||
invoiceMoneyTotal: 0,
|
invoiceMoneyTotal: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
activeObj: {},
|
activeObj: {},
|
||||||
@ -235,18 +236,12 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async beforeRead (file) {
|
async beforeRead (file) {
|
||||||
/*let res = await this.getJumpHandler();
|
|
||||||
if(res?.data?.jump) {
|
|
||||||
this.$message.warning("您有没有完成的培训,请在中道调度APP上完成培训,再进行发票上传")
|
|
||||||
return false
|
|
||||||
}*/
|
|
||||||
const FileExt = file.name.replace(/.+\./, "");
|
const FileExt = file.name.replace(/.+\./, "");
|
||||||
if (['jpg', 'png', 'jpeg', 'pdf', 'ofd'].indexOf(FileExt.toLowerCase()) === -1) {
|
if (['jpg', 'png', 'jpeg', 'pdf', 'ofd'].indexOf(FileExt.toLowerCase()) === -1) {
|
||||||
this.$toast('请上传后缀名为jpg、jpeg、png、pdf、ofd的文件!')
|
this.$toast('请上传后缀名为jpg、jpeg、png、pdf、ofd的文件!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
this.$set(this.activeObj, 'fileType', FileExt)
|
this.$set(this.activeObj, 'fileType', FileExt)
|
||||||
return true
|
|
||||||
},
|
},
|
||||||
async afterRead (file) {
|
async afterRead (file) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user