Browse Source

update

master
姜旭之 1 year ago
parent
commit
b9cdc95c48
  1. 11
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  2. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js
  3. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js
  4. 18
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  5. 171
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js

11
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -421,7 +421,7 @@ export default {
downLineEndDateTime: "",
ln: "",
pn: "",
enumBusinessType: route.meta.enumBusinessType,
businessType: route.meta.businessType,
};
const exportModel = ref(defaultExportModel);
const defaultImportModel = config.import?.schema ? schemaToModel(config.import.schema) : {};
@ -690,7 +690,7 @@ export default {
}
});
if (config.query.schema.properties.businessType.default) {
formData.append("businessType", config.query.schema.properties.businessType.default);
formData.append("businessType", config.query.schema.properties.businessType?.default);
}
for (let i = 0; i < fileList.value.length; i++) {
formData.append(`files`, fileList.value[i].raw);
@ -836,9 +836,10 @@ export default {
}
function isNotJit() {
return (
route.meta.enumBusinessType !== "ZhiGongJian" ||
route.meta.enumBusinessType !== "BeiJian" ||
route.meta.enumBusinessType !== "YingDuJian"
route.meta.businessType !== 3 ||
route.meta.businessType !== 4 ||
route.meta.businessType !== 7 ||
route.meta.businessType !== 8
);
}
onMounted(async () => {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js

@ -40,11 +40,13 @@ const exportUrl = "settleaccount/invoice_service/export";
const rejectUrl = "settleaccount/invoice_service/reject";
const passedUrl = "settleaccount/invoice_service/approval-passed";
const sync_qadUrl = "settleaccount/invoice_service/sync_qad";
const importJsonUrl = "settleaccount/vmi/excel-to-json";
const queryMethod = "POST";
const exportMethod = "POST";
const rejectMethod = "POST";
const passedMethod = "POST";
const sync_qadMethod = "POST";
const importJsonMethod = "POST";
export default function () {
return {
@ -109,10 +111,12 @@ export default function () {
rejectUrl,
passedUrl,
sync_qadUrl,
importJsonUrl,
exportMethod,
rejectMethod,
passedMethod,
sync_qadMethod,
importJsonMethod,
schema: schema,
},
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js

@ -29,7 +29,8 @@ const schema = {
},
createdAt: {
title: "创建时间",
type: "DateTime",
type: "string",
input: "datetime",
},
remark: {
title: "说明",

18
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

@ -1211,7 +1211,7 @@ export default [
path: "hbpo_jit_pub_sa_detail_service",
meta: {
type: "page",
title: "HBPO结算数据明细",
title: "4",
icon: "file",
isHidden: true,
},
@ -1291,7 +1291,7 @@ export default [
type: "page",
title: "BBAC发运与结算比对",
icon: "file",
enumBusinessType: "ZhiGongJian",
businessType: 3,
},
children: [
{
@ -1346,7 +1346,7 @@ export default [
type: "page",
title: "HBPO发运与结算比对",
icon: "file",
enumBusinessType: "ZhiGongJian",
businessType: 4,
},
children: [
{
@ -1778,7 +1778,7 @@ export default [
type: "page",
title: "发运与结算比对",
icon: "file",
enumBusinessType: "BeiJian",
businessType: 7,
},
children: [
{
@ -2210,7 +2210,7 @@ export default [
type: "page",
title: "发运与结算比对",
icon: "file",
enumBusinessType: "YingDuJian",
businessType: 8,
},
children: [
{
@ -2551,14 +2551,6 @@ export default [
pattern: "paged",
},
},
{
path: "reopen",
meta: {
type: "button",
title: "重开",
icon: "file",
},
},
],
},
{

171
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js

@ -1,43 +1,123 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import { ref } from "vue";
import { reactive, ref } from "vue";
import useConfig from "../../../models/invoice/invoice_map_group.js";
import request from "../../../request/index.js";
import AppTable from "../../components/table/index.js";
import { ElMessageBox } from "element-plus";
export default {
components: { AppList, AppTable },
template: html`<app-list :config="config" @command="onCommand" />
<el-drawer v-model="drawer" destroy-on-close size="50%" class="page-drawer">
<template #header> <span class="el-dialog__title"> INVOICE_GRP_DETAIL_DTO </span> </template>
<template #header> <span class="el-dialog__title"> 结算明细 </span> </template>
<el-row style="height:calc(100vh - 160px);" v-loading="loading">
<el-col>
<el-tabs>
<el-tab-pane label="invoicE_WAIT_DETAIL" v-if="model.invoicE_WAIT_DETAIL.length">
<el-tab-pane label="发票和结算分组对应关系" v-if="model.invoicE_WAIT_DETAIL.length">
<el-scrollbar>
<app-table :data="model.invoicE_WAIT_DETAIL" :columns="columns1" />
</el-scrollbar>
</el-tab-pane>
<el-tab-pane label="invoicE_MAP_GROUP" v-if="model.invoicE_MAP_GROUP.length">
<el-auto-resizer>
<template #default="{ height, width }">
<el-table-v2 :data="model.invoicE_MAP_GROUP" :columns="columns2" :width="width" :height="height" />
</template>
</el-auto-resizer>
<el-tab-pane label="已结分组包含不可结算零件" v-if="model.invoicE_MAP_GROUP.length">
<el-scrollbar>
<app-table :data="model.invoicE_MAP_GROUP" :columns="columns2" />
</el-scrollbar>
</el-tab-pane>
<el-tab-pane label="invoicE_NOT_SETTLE" v-if="model.invoicE_NOT_SETTLE.length">
<el-auto-resizer>
<template #default="{ height, width }">
<el-table-v2 :data="model.invoicE_NOT_SETTLE" :columns="columns3" :width="width" :height="height" />
</template>
</el-auto-resizer>
<el-scrollbar>
<app-table :data="model.invoicE_NOT_SETTLE" :columns="columns3" />
</el-scrollbar>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="drawer=false"> {{$t('confirm')}} </el-button>
<el-button type="primary" @click="drawer=false"> 返回 </el-button>
<el-button
type="primary"
@click="dialogVisible = true"
v-if="model.adJ_DETAIL.length===0&&prop==='invbillNum'"
>
重开
</el-button>
<el-dialog v-model="dialogVisible" title="发票调整明细" width="50%" :before-close="handleClose">
<template #title>
<div style="display: flex; justify-content: space-between; align-items: center;">
<span>发票调整明细</span>
<span>
<el-button type="primary" @click="innerVisible = true" style="margin-left: auto;">新建</el-button>
<el-button type="primary" @click="openImport = true" style="margin-left: 10px;">导入 </el-button>
<el-button type="primary" @click="deleteRow" style="margin-left: 10px;">删除</el-button>
<el-button type="primary" @click="dialogVisible = false" style="margin-left: 10px;">关闭</el-button>
</span>
</div>
</template>
<el-table :data="invoiceValue">
<el-table-column type="selection" width="50">
<el-checkbox v-model="selectedRows"></el-checkbox>
</el-table-column>
<el-table-column property="oldInvBillNum" label="作废发票号" />
<el-table-column property="invBillNum" label="发票号" />
<el-table-column property="settleDate" label="下线日期" />
<el-table-column property="invGroupNum" label="发票分组号" />
<el-table-column property="lu" label="零件号" />
<el-table-column property="pn" label="标识号" />
<el-table-column property="qty" label="数量" />
<el-table-column property="groupNum" label="结算分组" />
</el-table>
<el-dialog v-model="innerVisible" width="45%" title="新建数据">
<el-form :inline="true" :model="formInline" label-width="100px">
<span>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button type="primary" @click="">下一页</el-button>
</span>
<el-form-item label="作废发票号">
<el-input v-model="formInline.oldInvBillNum"></el-input>
</el-form-item>
<el-form-item label="发票号">
<el-input v-model.number="formInline.invBillNum " type="string"></el-input>
</el-form-item>
<el-form-item label="下线日期">
<el-input v-model.number="formInline.settleDate " type="string"></el-input>
</el-form-item>
<el-form-item label="发票分组号">
<el-input v-model.number="formInline.invGroupNum " type="string"></el-input>
</el-form-item>
<el-form-item label="零件号">
<el-input v-model.number="formInline.lu" type="string"></el-input>
</el-form-item>
<el-form-item label="标识号">
<el-input v-model.number="formInline.pn" type="string"></el-input>
</el-form-item>
<el-form-item label="数量">
<el-input v-model.number="formInline.qty" type="number"></el-input>
</el-form-item>
<el-form-item label="结算分组">
<el-input v-model.number="formInline.groupNum " type="string"></el-input>
</el-form-item>
</el-form>
</el-dialog>
<el-dialog v-model="openImport" width="30%">
<app-form>
<el-form-item :label="$t('文件')" label-width="80px">
<el-upload
ref="uploadRef"
class="upload"
drag
accept=".xlsx"
:auto-upload="false"
:on-change="handleChange"
>
<el-icon class="el-icon--upload"><ep-upload-filled /></el-icon>
</el-upload>
<el-button type="primary" @click="openImportHandler" style="margin-left: 10px;">确定</el-button>
</el-form-item>
</app-form>
</el-dialog>
<el-button type="primary" @click="dialogVisible = false" style="margin-left: 10px;">下一页</el-button>
</el-dialog>
</span>
</template>
</el-drawer>`,
@ -53,6 +133,51 @@ export default {
}
</style>`,
setup() {
const openImportHandler = async () => {
const data = {};
const response = await request("settleaccount/vmi/excel-to-json", data, { method: "POST" });
console.log(response.data);
};
const formInline = reactive({
oldInvBillNum: "",
invBillNum: "",
settleDate: "",
invGroupNum: "",
lu: "",
pn: "",
qty: null,
groupNum: "",
});
//create
const submitForm = () => {
const newFormInline = { ...formInline };
invoiceValue.value.push(newFormInline);
Object.keys(formInline).forEach((key) => {
delete formInline[key];
});
innerVisible.value = false;
};
//delete
const selectedRows = ref([]);
const invoiceValue = ref([]);
const deleteRow = () => {
const indexes = selectedRows.value.map((row) => invoiceValue.value.indexOf(row));
indexes.sort((a, b) => b - a);
indexes.forEach((index) => {
invoiceValue.value.splice(index, 1);
});
selectedRows.value = [];
};
const innerVisible = ref(false);
const openImport = ref(false);
const dialogVisible = ref(false);
const handleClose = (done) => {
ElMessageBox.confirm("确认关闭")
.then(() => {
done();
})
.catch(() => {});
};
const config = useConfig();
const drawer = ref(false);
const loading = ref(false);
@ -60,8 +185,11 @@ export default {
invoicE_WAIT_DETAIL: [],
invoicE_MAP_GROUP: [],
invoicE_NOT_SETTLE: [],
adJ_DETAIL: [],
});
const prop = ref("");
const onCommand = async (item, rows) => {
prop.value = item.path;
drawer.value = true;
loading.value = true;
const data = { [item.path]: rows[0][item.path] };
@ -114,7 +242,7 @@ export default {
title: "发票号",
},
{
dataKey: "inGroupNum",
dataKey: "invGroupNum",
title: "发票分组号",
},
{
@ -157,6 +285,17 @@ export default {
columns1,
columns2,
columns3,
innerVisible,
dialogVisible,
handleClose,
prop,
formInline,
submitForm,
invoiceValue,
deleteRow,
selectedRows,
openImport,
openImportHandler,
};
},
};

Loading…
Cancel
Save