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>
<div class="cell el-table__cell" :class="key" v-else-if="!item.hidden">
<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>
</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 businessTypes from "../../models/_options.js";
import { required, trim } from "../../utils/validation.js";
import { delay } from "../../utils/index.js";
export default {
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>
<el-button type="primary" @click="showSetupDialog"> 报废重开 </el-button>
</span>
</template>
</el-drawer>
@ -62,78 +64,80 @@ export default {
<el-step title="发票预览" />
<el-step title="重开成功" />
</el-steps>
<div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);">
<el-row style="padding:14px 0;height:60px;">
<el-col>
<el-button type="primary" @click="showAddAdjDialog">新建</el-button>
<el-button type="primary" @click="showImportAdjDialog">导入</el-button>
<el-button type="primary" @click="deleteAdj">删除</el-button>
</el-col>
</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" />
<div v-loading="loading">
<div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);">
<el-row style="padding:14px 0;height:60px;">
<el-col>
<el-button type="primary" @click="showAddAdjDialog">新建</el-button>
<el-button type="primary" @click="showImportAdjDialog">导入</el-button>
<el-button type="primary" @click="deleteAdj">删除</el-button>
</el-col>
</el-row>
</el-scrollbar>
</div>
<div class="setup2" v-show="setupRef===2" style="height:calc(100% - 60px);background:#ebeef5;">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col :span="12" style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<app-table ref="setup2table1Ref" :data="model.invoicE_WAIT_DETAIL??model.invoicE_WAIT_DETAIL_BBAC??model.invoicE_WAIT_DETAIL_BJ" :columns="setup2columns" />
</el-scrollbar>
</el-col>
<el-col :span="12" style="height:100%;padding:0 0 0 5px;">
<el-scrollbar>
<app-table ref="setup2table2Ref" :data="adjList2" :columns="setup2columns" />
</el-scrollbar>
</el-col>
</el-row>
</div>
<div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<el-tabs style="height:100%;">
<template v-for="item in setup3Model">
<el-tab-pane :label="item.invbillNum??'null'">
<el-descriptions border>
<el-descriptions-item label="发票号">{{item.invbillNum}}</el-descriptions-item>
<el-descriptions-item label="业务类型">{{businessTypes.options.find(o=>o.value===item.businesType)?.label}}</el-descriptions-item>
<el-descriptions-item label="未税金额">{{item.amt}}</el-descriptions-item>
<el-descriptions-item label="税后金额">{{item.taxAmt}}</el-descriptions-item>
<el-descriptions-item label="税额">{{item.realAmt }}</el-descriptions-item>
<el-descriptions-item label="税率">{{item.tax}}</el-descriptions-item>
</el-descriptions>
<app-table :data="item.detail" :columns="setup2columns" />
</el-tab-pane>
</template>
</el-tabs>
</el-scrollbar>
</el-col>
</el-row>
</div>
<div class="setup4" v-show="setupRef===4" style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<el-result icon="success" title="重开完成">
<template #extra>
<el-button type="primary" @click="drawerClosed">返回</el-button>
</template>
</el-result>
</el-scrollbar>
</el-col>
</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-row>
</el-scrollbar>
</div>
<div class="setup2" v-show="setupRef===2" style="height:calc(100% - 60px);background:#ebeef5;">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col :span="12" style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<app-table ref="setup2table1Ref" :data="model.invoicE_WAIT_DETAIL??model.invoicE_WAIT_DETAIL_BBAC??model.invoicE_WAIT_DETAIL_BJ" :columns="setup2columns" />
</el-scrollbar>
</el-col>
<el-col :span="12" style="height:100%;padding:0 0 0 5px;">
<el-scrollbar>
<app-table ref="setup2table2Ref" :data="adjList2" :columns="setup2columns" />
</el-scrollbar>
</el-col>
</el-row>
</div>
<div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<el-tabs style="height:100%;">
<template v-for="(item,index) in setup3Model">
<el-tab-pane :label="item.invbillNum??('发票'+(index+1))">
<el-descriptions border>
<el-descriptions-item label="发票号">{{item.invbillNum}}</el-descriptions-item>
<el-descriptions-item label="业务类型">{{businessTypes.options.find(o=>o.value===item.businessType)?.label}}</el-descriptions-item>
<el-descriptions-item label="未税金额">{{item.amt}}</el-descriptions-item>
<el-descriptions-item label="税后金额">{{item.taxAmt}}</el-descriptions-item>
<el-descriptions-item label="税额">{{item.realAmt }}</el-descriptions-item>
<el-descriptions-item label="税率">{{item.tax}}</el-descriptions-item>
</el-descriptions>
<app-table :data="item.detail" :columns="setup2columns" />
</el-tab-pane>
</template>
</el-tabs>
</el-scrollbar>
</el-col>
</el-row>
</div>
<div class="setup4" v-show="setupRef===4" style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<el-result icon="success" title="重开完成">
<template #extra>
<el-button type="primary" @click="drawerClosed">返回</el-button>
</template>
</el-result>
</el-scrollbar>
</el-col>
</el-row>
</div>
</div>
<template #footer v-if="setupRef!==4">
<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 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>
</template>
</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">
<template #header>导入调整明细</template>
<el-scrollbar>
<el-row v-loading="loading">
<el-row>
<el-col>
<app-form ref="importAdjFromRef" v-if="importDialogVisible&&importAdjModel" :schema="importAdjSchema" v-model="importAdjModel" :hideButton="true" inline />
</el-col>
@ -581,62 +585,64 @@ export default {
} else {
service = "pub_ba_service";
}
if (setupRef.value === 1) {
try {
// setupRef.value += 1;
// return; //临时
//发到服务的校验
const result = await request(`settleaccount/${service}/reissue-invoice-list`, adjList.value, { method: "POST" });
try {
loading.value = true;
if (setupRef.value === 1) {
try {
// setupRef.value += 1;
// 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) {
adjList2.value = result.data.data;
//setup3的数据来源
setup3Model.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) {
// ElMessage({
// type: "error",
// message: "操作失败",
// });
} 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) {
//setup3的数据来源
setup3Model.value = result.data.data;
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 === 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 === 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) {
setupDialogVisable.value = false;
refreshRef.value = false;
nextTick(() => {
refreshRef.value = true;
});
}
} else if (setupRef.value === 4) {
setupDialogVisable.value = false;
refreshRef.value = false;
nextTick(() => {
refreshRef.value = true;
});
} finally {
await delay(5000);
loading.value = false;
}
};
const drawerClosed = () => {

Loading…
Cancel
Save