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> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="show=false"> 返回 </el-button> <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)"> <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> <el-button type="primary" @click="directReopen" v-if="row.state===9"> 报废重开(红冲) </el-button>
</template>
</span> </span>
</template> </template>
</el-drawer> </el-drawer>
@ -430,6 +431,23 @@ export default {
const setup2table1Ref = ref(null); const setup2table1Ref = ref(null);
const setup2table2Ref = ref(null); const setup2table2Ref = ref(null);
const setup3Model = 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 = () => { const showSetupDialog = () => {
//重开发票号 //重开发票号
//invBillNum= //invBillNum=
@ -576,14 +594,6 @@ export default {
} }
}; };
const next = async () => { 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 { try {
loading.value = true; loading.value = true;
if (setupRef.value === 1) { if (setupRef.value === 1) {
@ -703,6 +713,7 @@ export default {
setup3Model, setup3Model,
businessTypes, businessTypes,
drawerClosed, drawerClosed,
directReopen,
}; };
}, },
}; };

Loading…
Cancel
Save