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

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

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

109
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 html from "html";
import useConfig from "../../../models/inventory/log.js"; import useConfig from "../../../models/inventory/log.js";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import request from "../../request/index.js";
import { schemaToModel } from "../../utils/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 { export default {
components: { AppList }, components: { AppList, AppTable, AppForm },
template: html`<app-list :config="config" @command="onCommand" /> template: html`
<el-dialog v-model="dialog" width="45%" title="补货数据导出"> <app-list :config="config" @command="onCommand" />
<el-form :model="exportModel" style="height:100%;"> <el-dialog v-model="addDialogVisible" align-center destroy-on-close style="width:380px;height:480px;">
<el-form-item label="" label-width="100px"> <template #header>补货数据导出</template>
开始时间<el-date-picker v-model="exportModel.startDatetime" value-format="YYYY-MM-DD" /> <el-scrollbar>
<span style="margin:0 .5em;">-</span> <el-row>
结束时间<el-date-picker v-model="exportModel.endDatetime" value-format="YYYY-MM-DD" /> <el-col>
</el-form-item> <app-form
<el-button type="primary" @click="openDialog" style="margin-left: 10px;">确定</el-button> ref="addAdjFormRef"
</el-form> v-if="addDialogVisible && adjModel"
</el-dialog> `, :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() { setup() {
const defaultExportModel = { const addDialogVisible = ref(false);
startDatetime: "", const addAdjFormRef = ref(null);
endDatetime: "", const adjList = ref([]);
}; const submitAdj = async () => {
const exportModel = ref(defaultExportModel); try {
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 url = "settleaccount/vmi/replenished-export";
const method = "POST"; const method = "POST";
const postData = buildQuery(); const response = await request(url, null, { method });
const response = await request(url, postData, { method });
if (!response.errors) { if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`)); window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
} }
dialog.value = false; } catch (error) {
console.log(error);
}
}; };
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) => { const onCommand = async (item, rows) => {
prop.value = item.path; addDialogVisible.value = true;
dialog.value = true;
console.log(item.path, item, rows); 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