优化开票功能

This commit is contained in:
wuxw 2024-04-03 00:23:50 +08:00
parent 0ba0f3e2a5
commit 634c2398e5
3 changed files with 34 additions and 7 deletions

View File

@ -141,15 +141,22 @@
<vc:i18n name='审核'></vc:i18n>
</button>
</div>
<div class="btn-group" v-if="invoiceApply.state == 'U' || invoiceApply.state == 'G' || invoiceApply.state == 'C'">
<button class="btn-white btn btn-xs" v-on:click="_openUploadInvoicePhoto(invoiceApply)">
{{invoiceApply.state == 'U'?'上传发票':'重新上传'}}
<div class="btn-group" v-if="vc.hasPlugin('invoice') && invoiceApply.state != 'W'">
<button class="btn-white btn btn-xs" v-on:click="_toOpenInvoicePlugin(invoiceApply)">
开票
</button>
</div>
<div class="btn-group" v-if="invoiceApply.state == 'U' || invoiceApply.state == 'G' || invoiceApply.state == 'C'">
<button class="btn-white btn btn-xs" v-on:click="_openUserGetInvoice(invoiceApply)">
{{invoiceApply.state == 'G'?'核销':'登记'}}
</button>
<div v-else>
<div class="btn-group" v-if="invoiceApply.state == 'U' || invoiceApply.state == 'G' || invoiceApply.state == 'C'">
<button class="btn-white btn btn-xs" v-on:click="_openUploadInvoicePhoto(invoiceApply)">
{{invoiceApply.state == 'U'?'上传发票':'重新上传'}}
</button>
</div>
<div class="btn-group" v-if="invoiceApply.state == 'U' || invoiceApply.state == 'G' || invoiceApply.state == 'C'">
<button class="btn-white btn btn-xs" v-on:click="_openUserGetInvoice(invoiceApply)">
{{invoiceApply.state == 'G'?'核销':'登记'}}
</button>
</div>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openDeleteInvoiceApplyModel(invoiceApply)">

View File

@ -136,6 +136,9 @@
},
_openUserGetInvoice:function(_apply){
vc.emit('wirteInvoiceEvent', 'openWirteInvoiceModal',_apply);
},
_toOpenInvoicePlugin:function(_apply){
vc.jumpToPlugin('/#/pages/index/plugin?pluginType=invoice&orderNo='+_apply.applyId+"&staffName="+vc.getData('/nav/getUserInfo').name+"&communityId="+vc.getCurrentCommunity().communityId)
}

View File

@ -1344,6 +1344,7 @@
}
);
};
//跳转至插件
vcFramework.jumpToPlugin = function (url) {
let param = {
@ -1370,6 +1371,22 @@
);
};
vcFramework.hasPlugin = function (_pluginType) {
let _sysInfo = vc.getData('java110SystemInfo');
if(!_sysInfo || !_sysInfo.hasOwnProperty("plugins")){
return false;
}
let _plugins = _sysInfo.plugins;
let _hasPlugin = false;
_plugins.forEach(_p=>{
if(_pluginType == p.pluginType){
_hasPlugin = true;
}
})
return _hasPlugin;
};
refreshVcFramework = function () {
$that.$destroy();
let _vmOptions = {