diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js index 6ea67113..7b76c12f 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js +++ b/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: "发运日期", diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js index 3e38b21a..6a36303c 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js +++ b/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: { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js index f174d981..dbd985b0 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js +++ b/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", - }, - }, ], }, { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js index 6bd46998..eee29220 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js +++ b/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` - - - - 开始时间 - - - 结束时间 - - 确定 - - `, + components: { AppList, AppTable, AppForm }, + template: html` + + + + + + + + + + + + + `, 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, + }; }, };