Commit 8bb6f138 authored by Mac's avatar Mac

物料过期查询

parent 301ed530
......@@ -39,7 +39,7 @@
</el-select>
</li>
<li>
<el-select size="small" filterable clearable v-model="msg.ExpiresDay" placeholder="过期天数" @change="msg.pageIndex=1,getList()">
<el-select size="small" filterable v-model="msg.ExpiresDay" placeholder="过期天数" @change="msg.pageIndex=1,getList()">
<el-option
v-for="item in daylist"
:key="item.Id"
......@@ -82,7 +82,7 @@
</vxe-table-column>
<vxe-table-column field="Number" title="到期数量">
<template v-slot="{ row }">
<span class="underline" >{{row.RecentExpiresNum}}</span>
<span class="underline" @click="gomater(row)">{{row.RecentExpiresNum}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="address" title="操作">
......@@ -326,6 +326,17 @@ export default {
null
);
},
gomater(row){
this.$router.push({
path: "/materielexpire" ,
query: {
SuppliesNum:row.SuppliesId,
WarehouseId:row.WarehouseId,
ExpiresDay:this.msg.ExpiresDay
}
});
}
},
......
<template>
<div class="materielexpire">
<div class="routerTitle">
<span class="pageTitle">现存量查询</span>
<span class="pageTitle">物料到期查询</span>
<span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;" class="f12 cd6">
<span style="margin-right:5px">高级查询</span>
<img v-show="!morequery" style="width:12px;height:12px" src="../../assets/img/more.png" alt="">
......@@ -12,86 +12,69 @@
<!-- <span @click="addSupplier" style="margin-left:20px" class="addSpan">
<img style="width:10px;height:10px;margin-right:6px" src="../../assets/img/add.png" alt="">
新增</span> -->
<span @click="Export('GetInventoryPageListToExcel','库存')" style="margin-left:20px" class="addSpan">导出</span>
<!-- <span @click="Export('GetInventoryPageListToExcel','库存')" style="margin-left:20px" class="addSpan">导出</span>-->
</div>
<div class="padContent">
<ul v-show="morequery" class="queryul">
<li>
<el-select size="small" filterable clearable v-model="msg.WarehouseId" placeholder="仓库1211212" @change="msg.pageIndex=1,getList()">
<el-option
v-for="item in getWareHouseList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<el-input class="w200" size="small" v-model="msg.StockInNum" placeholder="入库单号" @keyup.enter.native="msg.pageIndex=1,getList()"></el-input>
</li>
<li>
<el-select size="small" filterable clearable v-model="msg.SuppliesId" placeholder="物料" @change="msg.pageIndex=1,getList()">
<el-option
v-for="item in wulaioList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<el-input class="w200" size="small" v-model="msg.SuppliesNum" placeholder="物料编码" @keyup.enter.native="msg.pageIndex=1,getList()"></el-input>
</li>
<li>
<el-input class="w200" size="small" v-model="msg.SuppliesName" placeholder="物料名称" @keyup.enter.native="msg.pageIndex=1,getList()"></el-input>
</li>
<li>
<el-select size="small" filterable clearable v-model="msg.ExpiresDay" placeholder="过期天数" @change="msg.pageIndex=1,getList()">
<el-select size="small" filterable clearable v-model="msg.WarehouseId" placeholder="仓库" @change="msg.pageIndex=1,getList()">
<el-option
v-for="item in daylist"
v-for="item in getWareHouseList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</li>
<li>
<el-date-picker
@change="msg.pageIndex=1,getList()"
v-model="dateList"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</li>
</ul>
<vxe-table stripe style="margin-top:15px" :loading="loading"
:data="tableData">
<vxe-table-column field="SuppliesNum" title="耗材编码">
<vxe-table-column field="SuppliesNum" title="物料编码">
<template v-slot="{ row }">
<span class="underline" @click="getCheckDes(row)">{{row.SuppliesNum}}</span>
<span >{{row.SuppliesNum}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="SuppliesName" title="耗材名称" width='300'>
<template v-slot="{ row }">
<span class="underline" @click="getCheckDes(row)">{{row.SuppliesName}}</span>
<span >{{row.SuppliesName}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="SuppliesName" title="规格" width='200'>
<template v-slot="{ row }">
<span v-for="(x,y) in row.GoodsSpecificationList" :key="y">{{x}}{{y+1==row.GoodsSpecificationList.length?'':','}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="CategoryName" title="分类名称"></vxe-table-column>
<vxe-table-column field="SuppliesModel" title="耗材型号"></vxe-table-column>
<vxe-table-column field="WareHouseName" title="仓库名称"></vxe-table-column>
<vxe-table-column field="BrandName" title="品牌"></vxe-table-column>
<vxe-table-column field="Units" title="单位"></vxe-table-column>
<vxe-table-column field="SafetyStock" title="安全库存"></vxe-table-column>
<vxe-table-column field="ReservedStock" title="预留库存"></vxe-table-column>
<vxe-table-column field="SpecificationName" title="规格" width='200'></vxe-table-column>
<vxe-table-column field="WarehouseName" title="仓库"></vxe-table-column>
<vxe-table-column field="UnitPrice" title="单价"></vxe-table-column>
<vxe-table-column field="Number" title="库存数量">
<template v-slot="{ row }">
<span class="bold" v-if="row.Number < row.SafetyStock" style="color:red">{{row.Number}}</span>
<span v-else>{{row.Number}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="Number" title="到期数量">
<template v-slot="{ row }">
<span class="underline" >{{row.RecentExpiresNum}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="address" title="操作">
<vxe-table-column field="StockInNum" title="入库单号"></vxe-table-column>
<vxe-table-column field="ExpirationDate" title="到期时间"></vxe-table-column>
<vxe-table-column field="StockInDate" title="入库时间"></vxe-table-column>
<vxe-table-column field="Number" title="是否已过期">
<template v-slot="{ row }">
<el-tooltip class="item" effect="dark" content="日志" placement="top">
<img @click="Operation(row)" style="width:24px;height:24px" src="../../assets/img/czrz.png" alt="">
</el-tooltip>
<span v-if="row.IsExpire==1"></span>
<span v-if="row.IsExpire==0"></span>
</template>
</vxe-table-column>
</vxe-table>
<el-pagination
@current-change="currentChange"
......@@ -102,76 +85,14 @@
:total="total">
</el-pagination>
</div>
<!-- 操作日志 -->
<el-dialog
title="操作日志"
:visible.sync="caozuoState"
top="0"
width="650px"
>
<div class="f12">
<span>名称:{{ OperationInfo.SuppliesName }}</span>
<span style="margin:0 20px"
>编码:{{ OperationInfo.SuppliesNum }}</span
>
</div>
<table
style="min-width:100%"
class="myTable miniTable"
v-loading="loading"
border="0"
cellspacing="0"
cellpadding="0"
>
<thead>
<th>类型</th>
<th>数量</th>
<th>金额</th>
<th>内容</th>
<th>操作人/时间</th>
</thead>
<tbody>
<tr v-for="(item, index) in OperationList" :key="index">
<td>{{ item.TypeName }}</td>
<td>{{ item.Number }}</td>
<td>{{ item.Money }}</td>
<td>{{ item.Description }}</td>
<td>
<p>{{ item.UpdateBy }}</p>
<p>{{ item.UpdateDate }}</p>
</td>
</tr>
<tr v-show="OperationList.length == 0">
<td colspan="6" align="center">暂无数据</td>
</tr>
</tbody>
</table>
<el-pagination
@current-change="currentChange1"
background
:page-size="msg1.pageSize"
layout="prev, pager, next"
:total="total1"
>
</el-pagination>
</el-dialog>
<el-dialog top="0" title="物料详情" :visible.sync="CheckDetailState" width="970px">
<wlDetails ref="mychild"></wlDetails>
</el-dialog>
</div>
</template>
<script>
import wlDetails from "@/components/global/wlDetails.vue";
export default {
name: 'Supplierman',
components: {
wlDetails
},
data(){
return{
CheckDetailState:false,
......@@ -181,62 +102,46 @@
tableData: [],
loading:false,
total:0,
dateList:[],
msg:{
pageIndex:1,
pageSize:15,
StockInNum:'',
SuppliesNum:'',
SuppliesName:'',
StartTime:'',
EndTime:'',
WarehouseId:'',
SuppliesId:'',
ExpiresDay:90,
},
daylist:[
{Id:10,Name:'过期天数10天'},
{Id:20,Name:'过期天数20天'},
{Id:30,Name:'过期天数30天'},
{Id:40,Name:'过期天数40天'},
{Id:50,Name:'过期天数50天'},
{Id:60,Name:'过期天数60天'},
{Id:70,Name:'过期天数70天'},
{Id:80,Name:'过期天数80天'},
{Id:90,Name:'过期天数90天'},
],
addMsg:{
Id:0,
Name:'',
Contact:'',
Mobile:'',
},
dialogtitle:'新增',
dialogState:false,
getWareHouseList:[],
wuliaomsg:{
pageIndex:1,
pageSize:1000,
Name:'',
SuppliesNum:"",
BrandName:'',
CategoryId:'',
SupplierName:''
},
wulaioList:[],
OperationLoad:false,
OperationList:[],
total1:0,
msg1:{
pageIndex:1,
pageSize:6,
WarehouseId:0,
SuppliesId:0,
},
OperationInfo:{},
}
},
mounted(){
this.getList();
this.getWareHouse();
this.getwuliaoList();
if(this.$route.query.WarehouseId){
this.msg.SuppliesNum = this.$route.query.SuppliesNum;
this.msg.WarehouseId = this.$route.query.WarehouseId;
let myDate = new Date();
this.msg.StartTime = myDate.getFullYear() + '-' + ((myDate.getMonth() + 1)<10?'0'+(myDate.getMonth() + 1):(myDate.getMonth() + 1)) + '-' + (myDate.getDate()<10?'0'+myDate.getDate():myDate.getDate())
let EndTime = new Date(myDate.setDate(myDate.getDate() + this.$route.query.ExpiresDay)) //计算当前时间的未来的n天的时间
this.msg.EndTime = EndTime.getFullYear() + '-' + ((EndTime.getMonth() + 1)<10?'0'+(EndTime.getMonth() + 1):(EndTime.getMonth() + 1)) + '-' + (EndTime.getDate()<10?'0'+EndTime.getDate():EndTime.getDate())
this.morequery = true
this.dateList =[this.msg.StartTime,this.msg.EndTime]
this.getList();
}else{
this.getList();
}
},
methods:{
getCheckDes(item){
......@@ -246,34 +151,8 @@
this.$refs.mychild.InitData(PropertyId);
},10)
},
Operation(item) {
this.OperationInfo = item;
this.caozuoState = true;
this.msg1.WarehouseId = item.WarehouseId;
this.msg1.SuppliesId = item.SuppliesId;
this.getOperation();
},
currentChange1(val) {
this.msg1.pageIndex = val;
this.getOperation();
},
getOperation() {
this.OperationLoad = true;
this.apiJavaPost(
"/api/Supplies/GetInventoryDetailPageList",
this.msg1,
res => {
this.OperationLoad = false;
if (res.data.resultCode === 1) {
this.OperationList = res.data.data.pageData;
this.total1 = res.data.data.count;
} else {
this.Error(res.data.message);
}
},
null
);
},
Export(url,name){
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
......@@ -295,25 +174,22 @@
null
);
},
getwuliaoList(){
this.apiJavaPost("/api/Supplies/GetMaterialPageList",this.wuliaomsg,
res => {
if (res.data.resultCode === 1) {
this.wulaioList=res.data.data.pageData;
} else {
this.Error(res.data.message);
}
},
null
);
},
currentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
if(this.dateList&&this.dateList.length>0){
this.msg.StartTime=this.dateList[0];
this.msg.EndTime=this.dateList[1];
}
else{
this.msg.StartTime='';
this.msg.EndTime='';
}
this.loading=true;
this.apiJavaPost("/api/Supplies/GetInventoryPageList",this.msg,
this.apiJavaPost("/api/Supplies/GetSuppliesValidityPageList",this.msg,
res => {
this.loading=false;
if (res.data.resultCode === 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment