Browse Source

添加发票直接重开,跳开UI步骤的按钮和API调用

master
wanggang 1 year ago
parent
commit
cdff776062
  1. 33
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

33
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -49,9 +49,10 @@ export default {
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="show=false"> 返回 </el-button>
<el-button type="primary" @click="showSetupDialog" v-if="isBusiness&&data.invbillNum&&model.adJ_DETAIL.length===0&&row.invoiceState===1&&(row.state===3||row.state===9)">
报废重开
</el-button>
<template v-if="isBusiness&&data.invbillNum&&model.adJ_DETAIL.length===0&&row.invoiceState===1">
<el-button type="primary" @click="showSetupDialog" v-if="row.state===3"> 报废重开</el-button>
<el-button type="primary" @click="directReopen" v-if="row.state===9"> 报废重开(红冲) </el-button>
</template>
</span>
</template>
</el-drawer>
@ -430,6 +431,23 @@ export default {
const setup2table1Ref = ref(null);
const setup2table2Ref = ref(null);
const setup3Model = ref(null);
let service = null;
if (props.businessType === "JisBBAC") {
service = "bbac_ba_service";
} else if (props.businessType === "JisHBPO" || props.businessType === "MaiDanJianHBPO") {
service = "hbpo_ba_service";
} else {
service = "pub_ba_service";
}
const directReopen = async () => {
const url = `settleaccount/${service}/back-reissue-invoice`;
const result = await request(url, props.data.invbillNum, { method: "POST" });
if (result.errors) {
if (result.data?.code === 400 && result.data.fileName) {
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
}
}
};
const showSetupDialog = () => {
//重开发票号
//invBillNum=
@ -576,14 +594,6 @@ export default {
}
};
const next = async () => {
let service = null;
if (props.businessType === "JisBBAC") {
service = "bbac_ba_service";
} else if (props.businessType === "JisHBPO" || props.businessType === "MaiDanJianHBPO") {
service = "hbpo_ba_service";
} else {
service = "pub_ba_service";
}
try {
loading.value = true;
if (setupRef.value === 1) {
@ -703,6 +713,7 @@ export default {
setup3Model,
businessTypes,
drawerClosed,
directReopen,
};
},
};

Loading…
Cancel
Save