Commit 301ed530 authored by Mac's avatar Mac

1

parent 99d035b2
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
</div> </div>
<div class="padContent"> <div class="padContent">
<ul v-show="morequery" class="queryul"> <ul v-show="morequery" class="queryul">
<li> <li>
<el-select size="small" filterable clearable v-model="msg.WarehouseId" placeholder="仓库" @change="msg.pageIndex=1,getList()"> <el-select size="small" filterable clearable v-model="msg.WarehouseId" placeholder="仓库" @change="msg.pageIndex=1,getList()">
<el-option <el-option
v-for="item in getWareHouseList" v-for="item in getWareHouseList"
:key="item.Id" :key="item.Id"
:label="item.Name" :label="item.Name"
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<el-select size="small" filterable clearable v-model="msg.SuppliesId" placeholder="物料" @change="msg.pageIndex=1,getList()"> <el-select size="small" filterable clearable v-model="msg.SuppliesId" placeholder="物料" @change="msg.pageIndex=1,getList()">
<el-option <el-option
v-for="item in wulaioList" v-for="item in wulaioList"
:key="item.Id" :key="item.Id"
:label="item.Name" :label="item.Name"
...@@ -38,23 +38,33 @@ ...@@ -38,23 +38,33 @@
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li>
<el-select size="small" filterable clearable v-model="msg.ExpiresDay" placeholder="过期天数" @change="msg.pageIndex=1,getList()">
<el-option
v-for="item in daylist"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</li>
</ul> </ul>
<vxe-table stripe style="margin-top:15px" :loading="loading" <vxe-table stripe style="margin-top:15px" :loading="loading"
:data="tableData"> :data="tableData">
<vxe-table-column field="SuppliesNum" title="耗材编码"> <vxe-table-column field="SuppliesNum" title="耗材编码">
<template v-slot="{ row }"> <template v-slot="{ row }">
<span class="underline" @click="getCheckDes(row)">{{row.SuppliesNum}}</span> <span class="underline" @click="getCheckDes(row)">{{row.SuppliesNum}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="SuppliesName" title="耗材名称" width='300'> <vxe-table-column field="SuppliesName" title="耗材名称" width='300'>
<template v-slot="{ row }"> <template v-slot="{ row }">
<span class="underline" @click="getCheckDes(row)">{{row.SuppliesName}}</span> <span class="underline" @click="getCheckDes(row)">{{row.SuppliesName}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="SuppliesName" title="规格" width='200'> <vxe-table-column field="SuppliesName" title="规格" width='200'>
<template v-slot="{ row }"> <template v-slot="{ row }">
<span v-for="(x,y) in row.GoodsSpecificationList" :key="y">{{x}}{{y+1==row.GoodsSpecificationList.length?'':','}}</span> <span v-for="(x,y) in row.GoodsSpecificationList" :key="y">{{x}}{{y+1==row.GoodsSpecificationList.length?'':','}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="CategoryName" title="分类名称"></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="SuppliesModel" title="耗材型号"></vxe-table-column>
...@@ -70,6 +80,11 @@ ...@@ -70,6 +80,11 @@
<span v-else>{{row.Number}}</span> <span v-else>{{row.Number}}</span>
</template> </template>
</vxe-table-column> </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="address" title="操作">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-tooltip class="item" effect="dark" content="日志" placement="top"> <el-tooltip class="item" effect="dark" content="日志" placement="top">
...@@ -87,7 +102,7 @@ ...@@ -87,7 +102,7 @@
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
<!-- 操作日志 --> <!-- 操作日志 -->
...@@ -171,7 +186,19 @@ export default { ...@@ -171,7 +186,19 @@ export default {
pageSize:15, pageSize:15,
WarehouseId:'', WarehouseId:'',
SuppliesId:'', 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:{ addMsg:{
Id:0, Id:0,
Name:'', Name:'',
...@@ -180,7 +207,7 @@ export default { ...@@ -180,7 +207,7 @@ export default {
}, },
dialogtitle:'新增', dialogtitle:'新增',
dialogState:false, dialogState:false,
getWareHouseList:[], getWareHouseList:[],
wuliaomsg:{ wuliaomsg:{
pageIndex:1, pageIndex:1,
...@@ -255,7 +282,7 @@ export default { ...@@ -255,7 +282,7 @@ export default {
`${name}报表.xls` `${name}报表.xls`
); );
}, },
// 仓库列表 // 仓库列表
getWareHouse(){ getWareHouse(){
this.apiJavaPost("/api/Supplies/GetWareHouseList",{Name:''}, this.apiJavaPost("/api/Supplies/GetWareHouseList",{Name:''},
res => { res => {
...@@ -299,10 +326,10 @@ export default { ...@@ -299,10 +326,10 @@ export default {
null null
); );
}, },
}, },
} }
</script> </script>
......
<template>
<div class="materielexpire">
<div class="routerTitle">
<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="">
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/img/more.png" alt="">
</span>
<span @click="getList" style="margin-left:20px" class="chaxunSpan">查询</span>
<!-- <span @click="chongzhi" style="margin-left:20px" class="addSpan">重置</span> -->
<!-- <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>
</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>
</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>
</li>
<li>
<el-select size="small" filterable clearable v-model="msg.ExpiresDay" placeholder="过期天数" @change="msg.pageIndex=1,getList()">
<el-option
v-for="item in daylist"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</li>
</ul>
<vxe-table stripe style="margin-top:15px" :loading="loading"
:data="tableData">
<vxe-table-column field="SuppliesNum" title="耗材编码">
<template v-slot="{ row }">
<span class="underline" @click="getCheckDes(row)">{{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>
</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="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="操作">
<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>
</template>
</vxe-table-column>
</vxe-table>
<el-pagination
@current-change="currentChange"
background
:page-size="msg.pageSize"
:current-page.sync="msg.pageIndex"
layout="prev, pager, next"
: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,
caozuoState: false,
morequery:false,
currentPage:1,
tableData: [],
loading:false,
total:0,
msg:{
pageIndex:1,
pageSize:15,
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();
},
methods:{
getCheckDes(item){
let PropertyId=item.SuppliesId;
this.CheckDetailState=true;
setTimeout(()=>{
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(
`/api/Supplies/${url}`,
msg,
`${name}报表.xls`
);
},
// 仓库列表
getWareHouse(){
this.apiJavaPost("/api/Supplies/GetWareHouseList",{Name:''},
res => {
if (res.data.resultCode === 1) {
this.getWareHouseList=res.data.data;
} else {
this.Error(res.data.message);
}
},
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(){
this.loading=true;
this.apiJavaPost("/api/Supplies/GetInventoryPageList",this.msg,
res => {
this.loading=false;
if (res.data.resultCode === 1) {
this.tableData=res.data.data.pageData;
this.total=res.data.data.count;
} else {
this.Error(res.data.message);
}
},
null
);
},
},
}
</script>
<style scoped>
.materielexpire{
box-sizing: border-box;
}
</style>
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<vxe-table-column field="Units" title="单位"></vxe-table-column> <vxe-table-column field="Units" title="单位"></vxe-table-column>
<vxe-table-column field="StockInNum" title="入库单号"></vxe-table-column> <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="StockInDate" title="入库时间"></vxe-table-column>
<vxe-table-column field="UnitPrice" title="价格"></vxe-table-column> <vxe-table-column field="UnitPrice" title="价格"></vxe-table-column>
<vxe-table-column title="操作"> <vxe-table-column title="操作">
...@@ -212,6 +213,20 @@ ...@@ -212,6 +213,20 @@
if(myData){ if(myData){
var scanMsg = {}; var scanMsg = {};
var data2 = JSON.parse(JSON.stringify(this.tableData)); var data2 = JSON.parse(JSON.stringify(this.tableData));
// 2021-4-1加的
let goon = true
if(myData.ValidityId>0 && this.scanData.length>0){
this.scanData.map(x=>{
if(x.ValidityId == myData.ValidityId){
this.Error("该商品重复扫码");
goon = false
return
}
})
}
if(goon == false){//如果有相同的id 就不执行下面的内容
return
}
this.orderNum=0; this.orderNum=0;
let isUpdate=false let isUpdate=false
for (let i = 0; i < data2.length; i++) { for (let i = 0; i < data2.length; i++) {
...@@ -230,6 +245,7 @@ ...@@ -230,6 +245,7 @@
scanMsg.SpecificationSort = x.NewSpecificationSort; scanMsg.SpecificationSort = x.NewSpecificationSort;
scanMsg.GoodsId = x.NewGoodsId; scanMsg.GoodsId = x.NewGoodsId;
scanMsg.GoodsName = x.NewGoodsName; scanMsg.GoodsName = x.NewGoodsName;
scanMsg.ValidityId = myData.ValidityId;
scanMsg.StockInId = myData.StockInId; scanMsg.StockInId = myData.StockInId;
this.sureMsg.WarehouseOutGoodsDetailList.push(scanMsg); this.sureMsg.WarehouseOutGoodsDetailList.push(scanMsg);
...@@ -237,7 +253,6 @@ ...@@ -237,7 +253,6 @@
} }
} }
} }
console.log(this.orderNum>0 && !isUpdate)
if(this.orderNum>0 && !isUpdate){ if(this.orderNum>0 && !isUpdate){
this.Error("超过了出库数量"); this.Error("超过了出库数量");
} }
......
...@@ -166,6 +166,12 @@ export default { ...@@ -166,6 +166,12 @@ export default {
name: 'disposalDetails', name: 'disposalDetails',
component: resolve => require(['@/components/assetsman/disposalDetails'], resolve), component: resolve => require(['@/components/assetsman/disposalDetails'], resolve),
}, },
// 物料到期查询
{
path: '/materielexpire',
name: 'materielexpire',
component: resolve => require(['@/components/assetsman/materielexpire'], resolve),
},
// 资产折旧报表 // 资产折旧报表
{ {
......
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