Browse Source

update

master
wanggang 1 year ago
parent
commit
a36f813cf0
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
  2. 240
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js

@ -39,7 +39,7 @@ export default {
</template> </template>
<div class="cell el-table__cell" :class="key" v-else-if="!item.hidden"> <div class="cell el-table__cell" :class="key" v-else-if="!item.hidden">
<div class="cell"> <div class="cell">
<template v-if="item.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template> <template v-if="item.input==='datetime'">{{dayjs(model[key]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else>{{row[key]}}</template> <template v-else>{{row[key]}}</template>
</div> </div>
</div> </div>

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

@ -8,6 +8,7 @@ import extraProperties from "../../models/_extraProperties.js";
import { getUrl } from "../../request/index.js"; import { getUrl } from "../../request/index.js";
import businessTypes from "../../models/_options.js"; import businessTypes from "../../models/_options.js";
import { required, trim } from "../../utils/validation.js"; import { required, trim } from "../../utils/validation.js";
import { delay } from "../../utils/index.js";
export default { export default {
components: { AppForm, AppTable }, components: { AppForm, AppTable },
@ -51,6 +52,7 @@ export default {
<el-button type="primary" @click="showSetupDialog" v-if="isBusiness&&data.invbillNum&&model.adJ_DETAIL.length===0&&row.invoiceState===1&&(row.state===3||row.state===4)"> <el-button type="primary" @click="showSetupDialog" v-if="isBusiness&&data.invbillNum&&model.adJ_DETAIL.length===0&&row.invoiceState===1&&(row.state===3||row.state===4)">
报废重开 报废重开
</el-button> </el-button>
<el-button type="primary" @click="showSetupDialog"> 报废重开 </el-button>
</span> </span>
</template> </template>
</el-drawer> </el-drawer>
@ -62,78 +64,80 @@ export default {
<el-step title="发票预览" /> <el-step title="发票预览" />
<el-step title="重开成功" /> <el-step title="重开成功" />
</el-steps> </el-steps>
<div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);"> <div v-loading="loading">
<el-row style="padding:14px 0;height:60px;"> <div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);">
<el-col> <el-row style="padding:14px 0;height:60px;">
<el-button type="primary" @click="showAddAdjDialog">新建</el-button> <el-col>
<el-button type="primary" @click="showImportAdjDialog">导入</el-button> <el-button type="primary" @click="showAddAdjDialog">新建</el-button>
<el-button type="primary" @click="deleteAdj">删除</el-button> <el-button type="primary" @click="showImportAdjDialog">导入</el-button>
</el-col> <el-button type="primary" @click="deleteAdj">删除</el-button>
</el-row>
<el-scrollbar ref="scrollRef">
<el-row style="height:100%;">
<el-col style="height:calc(100% - 60px);">
<app-table ref="adjListRef" :data="adjList" :columns="columns5" />
</el-col> </el-col>
</el-row> </el-row>
</el-scrollbar> <el-scrollbar ref="scrollRef">
</div> <el-row style="height:100%;">
<div class="setup2" v-show="setupRef===2" style="height:calc(100% - 60px);background:#ebeef5;"> <el-col style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;"> <app-table ref="adjListRef" :data="adjList" :columns="columns5" />
<el-col :span="12" style="height:100%;padding:0 5px 0 0;"> </el-col>
<el-scrollbar> </el-row>
<app-table ref="setup2table1Ref" :data="model.invoicE_WAIT_DETAIL??model.invoicE_WAIT_DETAIL_BBAC??model.invoicE_WAIT_DETAIL_BJ" :columns="setup2columns" /> </el-scrollbar>
</el-scrollbar> </div>
</el-col> <div class="setup2" v-show="setupRef===2" style="height:calc(100% - 60px);background:#ebeef5;">
<el-col :span="12" style="height:100%;padding:0 0 0 5px;"> <el-row style="width:100%;height:100%;padding:10px;">
<el-scrollbar> <el-col :span="12" style="height:100%;padding:0 5px 0 0;">
<app-table ref="setup2table2Ref" :data="adjList2" :columns="setup2columns" /> <el-scrollbar>
</el-scrollbar> <app-table ref="setup2table1Ref" :data="model.invoicE_WAIT_DETAIL??model.invoicE_WAIT_DETAIL_BBAC??model.invoicE_WAIT_DETAIL_BJ" :columns="setup2columns" />
</el-col> </el-scrollbar>
</el-row> </el-col>
</div> <el-col :span="12" style="height:100%;padding:0 0 0 5px;">
<div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);"> <el-scrollbar>
<el-row style="width:100%;height:100%;padding:10px;"> <app-table ref="setup2table2Ref" :data="adjList2" :columns="setup2columns" />
<el-col style="height:100%;padding:0 5px 0 0;"> </el-scrollbar>
<el-scrollbar> </el-col>
<el-tabs style="height:100%;"> </el-row>
<template v-for="item in setup3Model"> </div>
<el-tab-pane :label="item.invbillNum??'null'"> <div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);">
<el-descriptions border> <el-row style="width:100%;height:100%;padding:10px;">
<el-descriptions-item label="发票号">{{item.invbillNum}}</el-descriptions-item> <el-col style="height:100%;padding:0 5px 0 0;">
<el-descriptions-item label="业务类型">{{businessTypes.options.find(o=>o.value===item.businesType)?.label}}</el-descriptions-item> <el-scrollbar>
<el-descriptions-item label="未税金额">{{item.amt}}</el-descriptions-item> <el-tabs style="height:100%;">
<el-descriptions-item label="税后金额">{{item.taxAmt}}</el-descriptions-item> <template v-for="(item,index) in setup3Model">
<el-descriptions-item label="税额">{{item.realAmt }}</el-descriptions-item> <el-tab-pane :label="item.invbillNum??('发票'+(index+1))">
<el-descriptions-item label="税率">{{item.tax}}</el-descriptions-item> <el-descriptions border>
</el-descriptions> <el-descriptions-item label="发票号">{{item.invbillNum}}</el-descriptions-item>
<app-table :data="item.detail" :columns="setup2columns" /> <el-descriptions-item label="业务类型">{{businessTypes.options.find(o=>o.value===item.businessType)?.label}}</el-descriptions-item>
</el-tab-pane> <el-descriptions-item label="未税金额">{{item.amt}}</el-descriptions-item>
</template> <el-descriptions-item label="税后金额">{{item.taxAmt}}</el-descriptions-item>
</el-tabs> <el-descriptions-item label="税额">{{item.realAmt }}</el-descriptions-item>
</el-scrollbar> <el-descriptions-item label="税率">{{item.tax}}</el-descriptions-item>
</el-col> </el-descriptions>
</el-row> <app-table :data="item.detail" :columns="setup2columns" />
</div> </el-tab-pane>
<div class="setup4" v-show="setupRef===4" style="height:calc(100% - 60px);"> </template>
<el-row style="width:100%;height:100%;padding:10px;"> </el-tabs>
<el-col style="height:100%;padding:0 5px 0 0;"> </el-scrollbar>
<el-scrollbar> </el-col>
<el-result icon="success" title="重开完成"> </el-row>
<template #extra> </div>
<el-button type="primary" @click="drawerClosed">返回</el-button> <div class="setup4" v-show="setupRef===4" style="height:calc(100% - 60px);">
</template> <el-row style="width:100%;height:100%;padding:10px;">
</el-result> <el-col style="height:100%;padding:0 5px 0 0;">
</el-scrollbar> <el-scrollbar>
</el-col> <el-result icon="success" title="重开完成">
</el-row> <template #extra>
<el-button type="primary" @click="drawerClosed">返回</el-button>
</template>
</el-result>
</el-scrollbar>
</el-col>
</el-row>
</div>
</div> </div>
<template #footer v-if="setupRef!==4"> <template #footer v-if="setupRef!==4">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="setupRef-=1" v-if="setupRef>1&&setupRef<4">上一步</el-button> <el-button type="primary" @click="setupRef-=1" :disabled="loading" v-if="setupRef>1&&setupRef<4">上一步</el-button>
</span> </span>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="next" v-if="setupRef<4">下一步</el-button> <el-button type="primary" @click="next" :disabled="loading" v-if="setupRef<4">下一步</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -155,7 +159,7 @@ export default {
<el-dialog style="width:480px;height:480px;" align-center destroy-on-close :close-on-click-modal="false" v-model="importDialogVisible"> <el-dialog style="width:480px;height:480px;" align-center destroy-on-close :close-on-click-modal="false" v-model="importDialogVisible">
<template #header>导入调整明细</template> <template #header>导入调整明细</template>
<el-scrollbar> <el-scrollbar>
<el-row v-loading="loading"> <el-row>
<el-col> <el-col>
<app-form ref="importAdjFromRef" v-if="importDialogVisible&&importAdjModel" :schema="importAdjSchema" v-model="importAdjModel" :hideButton="true" inline /> <app-form ref="importAdjFromRef" v-if="importDialogVisible&&importAdjModel" :schema="importAdjSchema" v-model="importAdjModel" :hideButton="true" inline />
</el-col> </el-col>
@ -581,62 +585,64 @@ export default {
} else { } else {
service = "pub_ba_service"; service = "pub_ba_service";
} }
if (setupRef.value === 1) { try {
try { loading.value = true;
// setupRef.value += 1; if (setupRef.value === 1) {
// return; //临时 try {
//发到服务的校验 // setupRef.value += 1;
const result = await request(`settleaccount/${service}/reissue-invoice-list`, adjList.value, { method: "POST" }); // return; //临时
//发到服务的校验
const result = await request(`settleaccount/${service}/reissue-invoice-list`, adjList.value, { method: "POST" });
if (!result.errors) {
adjList2.value = result.data.data;
setupRef.value += 1;
//处理高亮
nextTick(() => {
const list1 = setup2table1Ref.value.tableRef.querySelectorAll(".row.data");
const list2 = setup2table2Ref.value.tableRef.querySelectorAll(".row.data");
list1.forEach((o) => {
addDiff(o, list2, ".qty");
addDiff(o, list2, ".amt");
});
list2.forEach((o) => {
addDiff(o, list1, ".qty");
addDiff(o, list1, ".amt");
});
});
} else if (result.data?.code === 400 && result.data.fileName) {
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
}
} catch (e) {
console.log(e);
}
} else if (setupRef.value === 2) {
const url = `settleaccount/${service}/reissue-invoice-list-ext`;
const result = await request(url, adjList.value, { method: "POST" });
if (!result.errors) { if (!result.errors) {
adjList2.value = result.data.data; //setup3的数据来源
setup3Model.value = result.data.data;
setupRef.value += 1; setupRef.value += 1;
//处理高亮 } else if (result.data?.code === 400 && result.data.fileName) {
nextTick(() => {
const list1 = setup2table1Ref.value.tableRef.querySelectorAll(".row.data");
const list2 = setup2table2Ref.value.tableRef.querySelectorAll(".row.data");
list1.forEach((o) => {
addDiff(o, list2, ".qty");
addDiff(o, list2, ".amt");
});
list2.forEach((o) => {
addDiff(o, list1, ".qty");
addDiff(o, list1, ".amt");
});
});
} else if (result.data?.code === 400) {
// ElMessage({
// type: "error",
// message: "操作失败",
// });
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`)); window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
} }
} catch (e) { } else if (setupRef.value === 3) {
console.log(e); const url = `settleaccount/${service}/reissue-invoice-extend`;
} const result = await request(url, adjList.value, { method: "POST" });
} else if (setupRef.value === 2) { if (!result.errors) {
const url = `settleaccount/${service}/reissue-invoice-list-ext`; setupRef.value += 1;
const result = await request(url, adjList.value, { method: "POST" }); } else if (result.data?.code === 400 && result.data.fileName) {
if (!result.errors) { window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
//setup3的数据来源 }
setup3Model.value = result.data.data; } else if (setupRef.value === 4) {
setupRef.value += 1; setupDialogVisable.value = false;
} else if (result.data?.code === 400 && result.data.fileName) { refreshRef.value = false;
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`)); nextTick(() => {
} refreshRef.value = true;
} else if (setupRef.value === 3) { });
const url = `settleaccount/${service}/reissue-invoice-extend`;
const result = await request(url, adjList.value, { method: "POST" });
if (!result.errors) {
setupRef.value += 1;
} else if (result.data?.code === 400 && result.data.fileName) {
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
} }
} else if (setupRef.value === 4) { } finally {
setupDialogVisable.value = false; await delay(5000);
refreshRef.value = false; loading.value = false;
nextTick(() => {
refreshRef.value = true;
});
} }
}; };
const drawerClosed = () => { const drawerClosed = () => {

Loading…
Cancel
Save