Browse Source

update

master
姜旭之 1 year ago
parent
commit
65e517564f
  1. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
  2. 49
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
  3. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  4. 117
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js

@ -40,11 +40,6 @@ const schema = {
title: "数量",
type: "number",
input: "number",
rules: [
{
required: true,
},
],
},
billTime: {
title: "发运日期",

49
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js

@ -3,6 +3,11 @@ import { billType, codeType, subBillType } from "./inventory.js";
//变动单据号、发生时间、生产码类型、、订单号、库位、变动数、EDI顺序号、备注、变动类型(In、Out标识)、发货类型(JIS\JIT\买单件\备件等)、
//实扣LU零件号、实扣客户零件号、结算LU零件号、结算客户零件号、实扣生产码、结算生产码
//库位、开始结束时间段、发货类型、生产码、生产码类型、LU零件号、订单号
const options = [
{ value: null, label: "" },
{ value: true, label: "是" },
{ value: false, label: "否" },
];
const schema = {
title: "库存事务日志",
type: "object",
@ -88,6 +93,8 @@ const schema = {
isReplenished: {
title: "是否补货",
type: "boolean",
input: "select",
options,
},
configcode: {
title: "配置码",
@ -103,7 +110,7 @@ const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
const exportUrl = `${baseUrl}/export`;
const exportUrl = `${baseUrl}/log-export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
@ -152,30 +159,6 @@ export default function () {
value: null,
readOnly: true,
},
// {
// logic: "and",
// column: "billTime",
// action: "biggerThanOrEqual",
// value: null,
// readOnly: true,
// hidden: true,
// },
// {
// logic: "and",
// column: "billTime",
// action: "smallThanOrEqual",
// value: null,
// readOnly: true,
// hidden: true,
// },
// {
// logic: "and",
// column: "isReplenished",
// action: "equal",
// value: true,
// readOnly: true,
// hidden: true,
// },
{
logic: "and",
column: "billType",
@ -211,6 +194,22 @@ export default function () {
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
hidden: true,
},
{
logic: "and",
column: "billTime",
action: "smallThanOrEqual",
value: null,
readOnly: true,
hidden: true,
},
],
},
skipCount: {

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

@ -3610,14 +3610,6 @@ export default [
pattern: "paged",
},
},
{
path: "reopen",
meta: {
type: "button",
title: "重开",
icon: "file",
},
},
],
},
{

117
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js

@ -2,51 +2,94 @@ import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/log.js";
import { reactive, ref } from "vue";
import request from "../../request/index.js";
import { schemaToModel } from "../../utils/index.js";
import AppForm from "../../../components/form/index.js";
import AppTable from "../../components/table/index.js";
import request, { get, getUrl, post } from "../../request/index.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />
<el-dialog v-model="dialog" width="45%" title="补货数据导出">
<el-form :model="exportModel" style="height:100%;">
<el-form-item label="" label-width="100px">
开始时间<el-date-picker v-model="exportModel.startDatetime" value-format="YYYY-MM-DD" />
<span style="margin:0 .5em;">-</span>
结束时间<el-date-picker v-model="exportModel.endDatetime" value-format="YYYY-MM-DD" />
</el-form-item>
<el-button type="primary" @click="openDialog" style="margin-left: 10px;">确定</el-button>
</el-form>
</el-dialog> `,
components: { AppList, AppTable, AppForm },
template: html`
<app-list :config="config" @command="onCommand" />
<el-dialog v-model="addDialogVisible" align-center destroy-on-close style="width:380px;height:480px;">
<template #header>补货数据导出</template>
<el-scrollbar>
<el-row>
<el-col>
<app-form
ref="addAdjFormRef"
v-if="addDialogVisible && adjModel"
:schema="adjSchema"
v-model="adjModel"
:hideButton="true"
inline
@submit="submitAdj"
/>
</el-col>
</el-row>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submitAdj">确定</el-button>
</span>
</template>
</el-dialog>
`,
setup() {
const defaultExportModel = {
startDatetime: "",
endDatetime: "",
};
const exportModel = ref(defaultExportModel);
const config = useConfig();
const dialog = ref(false);
const prop = ref("");
const queryModel = ref(schemaToModel(config.query.schema));
function buildQuery() {
const postData = JSON.parse(JSON.stringify(queryModel.value));
return postData;
}
const openDialog = async () => {
const url = "settleaccount/vmi/replenished-export";
const method = "POST";
const postData = buildQuery();
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
const addDialogVisible = ref(false);
const addAdjFormRef = ref(null);
const adjList = ref([]);
const submitAdj = async () => {
try {
const url = "settleaccount/vmi/replenished-export";
const method = "POST";
const response = await request(url, null, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} catch (error) {
console.log(error);
}
dialog.value = false;
};
const adjSchema = {
type: "object",
properties: {
startBillTime: {
type: "string",
title: "发运开始日期",
input: "datetime",
rules: [{ required: true }],
},
endBillTime: {
type: "string",
title: "发运结束日期",
input: "datetime",
rules: [{ required: true }],
},
},
};
const defaultAdjModel = schemaToModel(adjSchema);
const addAdj = () => {
adjModel.value = Object.assign({}, defaultAdjModel);
addDialogVisible.value = true;
};
const adjModel = ref(defaultAdjModel);
const config = useConfig();
const onCommand = async (item, rows) => {
prop.value = item.path;
dialog.value = true;
addDialogVisible.value = true;
console.log(item.path, item, rows);
};
return { config, onCommand, dialog, prop, exportModel, openDialog };
return {
config,
onCommand,
submitAdj,
addDialogVisible,
adjSchema,
addAdjFormRef,
defaultAdjModel,
adjModel,
addAdj,
adjList,
};
},
};

Loading…
Cancel
Save