Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mu committed Jul 17, 2024
1 parent ffe6205 commit 92add1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Binary file added 出入库管理/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 出入库管理/inbound.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>小元小学入库管理系统</title>
<link rel="Shortcut Icon" href="./icon.png" type="image/x-icon" />

<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script src="https://cdn.sheetjs.com/xlsx-0.20.0/package/dist/xlsx.full.min.js"></script>
Expand Down
25 changes: 12 additions & 13 deletions 出入库管理/outbound.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>小元小学出库管理系统</title>
<link rel="Shortcut Icon" href="./icon.png" type="image/x-icon"/>

<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script src="https://cdn.sheetjs.com/xlsx-0.20.0/package/dist/xlsx.full.min.js"></script>
Expand All @@ -16,7 +17,6 @@

<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="./util.js"></script>

</head>
<style>
.el-col {
Expand All @@ -30,7 +30,6 @@
<body>
<div id="vue2">
<h2>出库管理系统 - [{{fileName}}]
<el-link href="./inbound.html" target="_blank" type="primary"> 入库管理</el-link>
</h2>
<el-row>
<h3 id="l0"> 目录 </h3>
Expand All @@ -39,6 +38,7 @@ <h3 id="l0"> 目录 </h3>
<a href="#l2">仓库库存列表</a>
<!--<a href="#l3">出库流水</a>-->
<!--<a href="#l4">出库统计数据</a>-->
<el-link href="./inbound.html" target="_blank" type="primary"> 入库管理</el-link>
</el-row>
<el-row>
<el-button type="primary">导入出库台账
Expand All @@ -51,7 +51,7 @@ <h3 id="l0"> 目录 </h3>

<el-row>
<hr/>
<h3 id="l1">出库流水</h3><a href="#l0">回到顶部</a>
<h3 id="l1">出库流水 总【{{outboundFlow.length}}】条</h3><a href="#l0">回到顶部</a>
<el-table :data="tableData3" border style="width: 100%" id="outTable" :key="updateFlag+1">
<el-table-column v-for="(e) in ['序号','出库时间','品类','品名','前库存','出库数量','库存余量','入库序号','入库时间','数量','金额(元)','单价(元)',]"
:prop="e" :label="e" :key="e" sortable :formatter="formatter"></el-table-column>
Expand Down Expand Up @@ -95,7 +95,7 @@ <h3 id="l1">出库流水</h3><a href="#l0">回到顶部</a>
</el-col>
</el-col>
<el-col :span="19">
<h3 id="l2">仓库库存列表</h3><a href="#l0">回到顶部</a>
<h3 id="l2">仓库库存列表 总【{{inboundFlow.length}}】条</h3><a href="#l0">回到顶部</a>
<template>
<el-table border :data="inventoryList" border :key="updateFlag">
<el-table-column sortable prop="序号" label="序号" width="60"></el-table-column>
Expand All @@ -111,15 +111,15 @@ <h3 id="l2">仓库库存列表</h3><a href="#l0">回到顶部</a>

<template slot-scope="scope">
<el-button :disabled="!outBoundDate" :loading="loading" type="success"
@click="outBoundLogFn(scope.row,scope.row.库存余量)">全部出库
@click="addOutBoundLogFn(scope.row,scope.row.库存余量)">全部出库
</el-button>

<el-input placeholder="出库数量" v-model.number="scope.row.出库数量" :max="scope.row.库存余量" :min='0' type="number"
clearable style="width: 180px" :disabled="!outBoundDate"
@keyup="outBoundLogFn(scope.row,scope.row.出库数量 || 0)"
@keyup.enter="addOutBoundLogFn(scope.row,scope.row.出库数量 || 0)"
></el-input>
<el-button :disabled="!outBoundDate" :loading="loading" type="primary"
@click="outBoundLogFn(scope.row,scope.row.出库数量 || 0)">部分出库
@click="addOutBoundLogFn(scope.row,scope.row.出库数量 || 0)">部分出库
</el-button>

</template>
Expand All @@ -140,13 +140,13 @@ <h3 id="l2">仓库库存列表</h3><a href="#l0">回到顶部</a>
data: {
loading: false, updateFlag: 0, fileName: '',
pinLei: [], pinMing: '',
outBoundDate: new Date(), nowDate: new Date(),
outBoundDate: '', nowDate: new Date(),
inventoryList: [],
inboundFlow: [], outboundFlow: [],
tableData3: [], tableCols3: []
},
methods: {
outBoundLogFn(inFlow, outNo) {
addOutBoundLogFn(inFlow, outNo) {
if (!inFlow) return this.$message({type: 'warning', message: `出库数据异常`});
if (outNo <= 0) return this.$message({type: 'warning', message: `出库数据异常,数量为:{ ${outNo} }`});
if (outNo > inFlow.库存余量) return this.$message({type: 'warning', message: `出库数据超出,出库:{ ${outNo} } ,库存:{ ${inFlow.库存余量} } ,`});
Expand Down Expand Up @@ -209,14 +209,13 @@ <h3 id="l2">仓库库存列表</h3><a href="#l0">回到顶部</a>
return inFlow;
})
.filter(flow => flow.库存余量 > 0);
this.updateFlag = new Date().getTime();
this.tableData3 = this.outboundFlow
.filter(out => !this.outBoundDate || util.isSameDay(this.outBoundDate, out.出库时间))
.filter(e => !this.pinLei.length || this.pinLei.includes(e.品类))
.filter(e => !this.pinMing || e.品名.includes(this.pinMing))
.sort((a, b) => util.compareFn(a, b, '出库时间', '品类', '品名'));

this.tableCols3 = util.getKeys(this.tableData3);
// this.tableCols3 = util.getKeys(this.tableData3);
this.updateFlag = new Date().getTime();

},
exportOutFlow() {
Expand Down Expand Up @@ -273,7 +272,7 @@ <h3 id="l2">仓库库存列表</h3><a href="#l0">回到顶部</a>
this.outBoundDate = inboundFlow[0].入库时间;
this.fileName = util.localGet("fileName", "");
const outboundFlow = util.localGetParseDate("out_bound_xlsx_arr", []);
this.inboundFlow = inboundFlow.sort((a, b) => util.compareFn(a, b, '品类', '品名', '入库时间'));
this.inboundFlow = inboundFlow.sort((a, b) => util.compareFn(a, b, '入库时间', '品类', '品名'));
this.outboundFlow = outboundFlow;
this.analysis_in_out();
}
Expand Down

0 comments on commit 92add1a

Please sign in to comment.