文件

445 行
19 KiB
HTML
可执行文件

<!--[1.7.90]-->
<link rel="stylesheet" href="/Public/css/component-serial.css?v=1.0.0">
<style>
* {
margin: 0;
padding: 0;
}
[v-cloak] {
display: none;
}
th {
background-color: #f5f7fa !important;
}
th>.cell {
white-space: nowrap !important;
text-align: center;
}
th,
td {
text-align: center;
line-height: 30px;
padding: 0;
}
th>.cell,
td>.cell {
text-align: center;
}
.el-pagination {
padding: 8px;
}
.el-input {
width: 200px;
}
.el-table__row>td:last-child>.cell {
white-space: nowrap;
}
.center-content {
margin: 20px 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.center-content .el-input__inner {
padding: 0 15px;
text-align: left;
}
.small-dialog-content {
margin-left: calc(7% + 40px);
}
.goods_title {
padding: 10px 0;
}
.el-input {
margin-bottom: 10px;
}
.max-dialog-content {
position: absolute;
bottom: 0;
right: 0;
height: calc(100vh - 65px);
overflow-y: auto;
margin: 0;
}
.center-content-moreEditBox {
margin: 20px 0;
display: flex;
align-items: center;
}
.center-content-moreEditBox .el-input__inner {
padding: 0 15px;
text-align: left;
}
#moreEditBox {
display: none;
}
#goodsList .el-select .el-input {
margin: 0;
width: 140px;
}
#goodsList .goods_number {
width: 300px;
}
</style>
<div class="purchaseBox" id="goodsList" v-cloak>
<div class="goods_title">
<div class="goods_title_inner">
库存状况
</div>
</div>
<div style="margin:20px;">
<el-collapse accordion>
<el-collapse-item>
<template slot="title">
库存状况须知>>></i>
</template>
<div>1.补货某商品需该商品已被采购,且采购库仍有多余库存,否则无法进行补货操作</div>
<div>2.入库记录包含初始化入库,采购单入库,补货入库,盘点入库的入库记录 (注:初始化入库即初次添加商品档案或商品导入时添加的库存)</div>
<div>3.出库记录包含盘点出库,调拨出库的出库记录</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="center-content">
<div>
<template>
<el-input class="goods_number" :placeholder="type == 1 ? '请输入名称/货号/条码' : '请输入串号'" type="text"
size="small" clearable v-model="goods_number">
<el-select v-model="type" size="small" slot="prepend" placeholder="请选择">
<el-option label="名称/货号/条码" value="1"></el-option>
<el-option label="串号" value="2"></el-option>
</el-select>
</el-input>
<el-select v-model="status" placeholder="所有商品" size="small">
<el-option value="">所有商品</el-option>
<el-option label="上架" value="0"></el-option>
<el-option label="下架" value="1"></el-option>
</el-select>
<el-select v-model="stock_status" placeholder="状态" size="small">
<el-option value="">所有商品</el-option>
<el-option label="预警" value="1"></el-option>
<el-option label="超量" value="2"></el-option>
<el-option label="售罄" value="3"></el-option>
</el-select>
</template>
<el-button type="primary" plain @click="searchData" size="small">搜索</el-button>
<if condition="$authArr['exportOperation'] eq true">
<el-button v-if="storeAuth.data_export == 1" type="primary" plain @click="exportOperation" size="small">
导出
</el-button>
</if>
<el-button type="primary" plain @click="moreEdit" size="small">>>>更多搜索</el-button>
</div>
</div>
<div id="moreEditBox" style="height:0;padding-left: 0" class="center-content-moreEditBox">
<select-goods-category :user-type="2" :store-id="store_id" :category-id1.sync="goodsClassId1"
:category-id2.sync="goodsClassId2" :category-id3.sync="goodsClassId3"></select-goods-category>
<if condition="$jiuban eq 1">
<el-button type="primary" plain @click="jiuban1" size="small">旧版盘点单据</el-button>
<el-button type="primary" plain @click="jiuban2" size="small">旧版商品出入库明细</el-button>
<el-button type="primary" plain @click="jiuban3" size="small">旧版单品出入库明细</el-button>
<el-button type="primary" plain @click="jiuban4" size="small">旧版进货单列表</el-button>
<el-button type="primary" plain @click="jiuban5" size="small">旧版退货单列表</el-button>
<el-button type="primary" plain @click="jiuban6" size="small">旧版报损单列表</el-button>
<el-button type="primary" plain @click="jiuban7" size="small">旧版调拨单列表</el-button>
<el-button type="primary" plain @click="jiuban8" size="small">旧版商户调拨列表</el-button>
<el-button type="primary" plain @click="jiuban9" size="small">旧版货流金额明细</el-button>
</if>
</div>
<div style="border: 1px solid #e6e6e6;max-width: calc(100vw - 208px);">
<el-table border :data="goodsList" style="width: calc(100vw - 208px);border: none;" size="mini" max-height="500"
v-loading="loading" element-loading-text="数据获取中" element-loading-spinner="el-icon-loading">
<el-table-column prop="index" label="序号" show-overflow-tooltip></el-table-column>
<el-table-column prop="goods_name" label="名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="sku_name" label="规格" show-overflow-tooltip></el-table-column>
<el-table-column prop="goods_number" label="货号" show-overflow-tooltip></el-table-column>
<el-table-column prop="goods_code" label="条码" show-overflow-tooltip></el-table-column>
<el-table-column prop="company" label="单位"></el-table-column>
<el-table-column prop="sku_num" label="规格基数" show-overflow-tooltip></el-table-column>
<el-table-column width="100" prop="goods_num" label="供应库存" show-overflow-tooltip>
<template slot-scope="scope" slot="header">
<el-popover placement="bottom" title="详解" width="100" trigger="hover" content="供给仓的实际库存用于出库的库存数量">
<span slot="reference" size="mini">供应库存 <i class="el-icon-question"></i></span>
</el-popover>
</template>
<template slot-scope="scope">
<el-button type="text" size="mini" @click="detailsSerial(scope.$index)"
v-if="scope.row.serial_number_state == 1 && scope.row.goods_num > 0">
{{scope.row.goods_num}}
</el-button>
<span v-else>{{scope.row.goods_num}}</span>
</template>
</el-table-column>
<el-table-column width="100" prop="actual_num" label="实际库存" show-overflow-tooltip>
<template slot-scope="scope" slot="header">
<el-popover placement="bottom" title="详解" width="100" trigger="hover"
content="供给仓的实际库存数量与采购仓的实际库存数量总和">
<span slot="reference" size="mini">实际库存 <i class="el-icon-question"></i></span>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="more_num" label="库存上限" show-overflow-tooltip></el-table-column>
<el-table-column prop="less_num" label="库存下限" show-overflow-tooltip></el-table-column>
<el-table-column label="成本价" v-if="storeAuth.showpurch_price == 1">
<template slot-scope="scope" slot="header">
<el-popover placement="bottom" title="详解" width="100" trigger="hover"
content="移动加权平均值(供给仓的当前总入库价除以当前总数量的平均值)">
<span slot="reference" size="mini">成本价 <i class="el-icon-question"></i></span>
</el-popover>
</template>
<template slot-scope="scope">
<el-button
@click.native.prevent="cost_price_record(scope.row.goods_id,scope.row.attribute_state,scope.row.sku_id)"
type="text" size="small">{{scope.row.cost_price}}
</el-button>
</template>
</el-table-column>
<el-table-column prop="amount_total" label="库存金额" show-overflow-tooltip
v-if="storeAuth.showpurch_price == 1"></el-table-column>
<el-table-column prop="warning_name" label="库存状态"></el-table-column>
<el-table-column prop="status_name" label="上下架状态"></el-table-column>
<el-table-column label="操作" width="200px">
<template slot-scope="scope">
<if condition="$authArr['replenishment'] eq true">
<el-button
@click.native.prevent="replenishment(scope.row.goods_id,scope.row.attribute_state,scope.row.sku_id)"
type="text" size="small">补货
</el-button>
</if>
<if condition="$authArr['warehousing_record'] eq true">
<el-button
@click.native.prevent="warehousing_record(scope.row.goods_id,scope.row.attribute_state,scope.row.sku_id)"
type="text" size="small">入库记录
</el-button>
</if>
<if condition="$authArr['deposit_record'] eq true">
<el-button
@click.native.prevent="deposit_record(scope.row.goods_id,scope.row.attribute_state,scope.row.sku_id)"
type="text" size="small">出库记录
</el-button>
</if>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]" :page-size="100"
layout="total, sizes, prev, pager, next, jumper" :total="currentLen">
</el-pagination>
</div>
<component-serial :visible.sync="serialVisible" :parent-data="serialGoodsData" get-data-type="storeSupplyInventory">
</component-serial>
</div>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Retail/common/js/select-goods-category.js"></script>
<script src="/Public/js/component-serial.js?v=1.0.0"></script>
<script src="/Public/js/common.js"></script>
<script type="text/javascript">
var goodsList = new Vue({
el: "#goodsList",
data: function () {
return {
store_id: localStorage.store_id,
stock_status: "{$stock_status}",
warehouse_id: "",
warehouse: {$warehouse},
goodsClassId1: "",
goodsClassId2: "",
goodsClassId3: "",
goods_number: "",
type: "1",
status: "",
goodsList: [],
currentPage: 1,
currentLimit: 10,
currentLen: 0,
loading: true,
showSetChild: false,
dialogTitle: '',
serialVisible: false, //串号录入窗口开关
serialGoodsData: {}, //串号录入当前商品数据对象
}
},
methods: {
//更多搜索
moreEdit: function () {
this.showEditMore = !this.showEditMore;
if (this.showEditMore) {
$("#moreEditBox").animate({"height": "60px"}, 300, function () {
$("#moreEditBox").show();
});
} else {
$("#moreEditBox").animate({"height": "0px"}, 300, function () {
$("#moreEditBox").hide();
});
}
},
handleSizeChange: function (val) {
this.currentLimit = val;//切换每页数量
this.currentPage = 1;
this.getData();
},
handleCurrentChange: function (val) {
this.currentPage = val;
this.getData();//切换页数
},
//搜索
searchData: function () {
this.currentPage = 1;
this.getData();
},
//列表
getData: function () {
this.loading = true;
$.ajax({
url: "{:U('goodsList')}",
type: "post",
data: {
page: this.currentPage,
limit: this.currentLimit,
stock_status: this.stock_status,
warehouse_id: this.warehouse_id,
search_info: this.goods_number,
type: this.type,
status: this.status,
person1: this.goodsClassId1,
person2: this.goodsClassId2,
person3: this.goodsClassId3
},
success: (res) => {
this.loading = false;
this.goodsList = res.data.list;
this.$nextTick(function () {
this.currentLen = parseInt(res.data.count);
})
}
})
},
//导出
exportOperation: function () {
var that = this;
var warehouse_id = that.warehouse_id;
var goods_number = that.goods_number;
var person1 = that.goodsClassId1;
var person2 = that.goodsClassId2;
var person3 = that.goodsClassId3;
var status = that.status;
var stock_status = that.stock_status;
window.location.href = "{:U('export')}?warehouse_id=" + warehouse_id + "&goods_number=" + goods_number + "&status=" + status + "&stock_status=" + stock_status + "&person1=" + person1 + "&person2=" + person2 + "&person3=" + person3
},
//成本价记录
cost_price_record: function (goods_id, attribute_state, sku_id) {
var that = this;
layer.open({
type: 2,
content: "{:U('cost_price_record')}?goods_id=" + goods_id + '&attribute_state=' + attribute_state + '&sku_id=' + sku_id,
title: "成本价趋势",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
btnAlign: 'c',
})
},
//补货
replenishment: function (goods_id, attribute_state, sku_id) {
var that = this;
layer.open({
type: 2,
content: "{:U('replenishment')}?goods_id=" + goods_id + '&attribute_state=' + attribute_state + '&sku_id=' + sku_id,
title: "补货",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
btnAlign: 'c',
end: function () {
that.getData();
}
})
},
//入库记录
warehousing_record: function (goods_id, attribute_state, sku_id) {
var that = this;
layer.open({
type: 2,
content: "{:U('warehousing_record')}?goods_id=" + goods_id + '&attribute_state=' + attribute_state + '&sku_id=' + sku_id,
title: "入库记录",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
btnAlign: 'c',
})
},
//出库记录
deposit_record: function (goods_id, attribute_state, sku_id) {
var that = this;
layer.open({
type: 2,
content: "{:U('deposit_record')}?goods_id=" + goods_id + '&attribute_state=' + attribute_state + '&sku_id=' + sku_id,
title: "出库记录",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
btnAlign: 'c',
})
},
//旧版进销存
jiuban1: function () {
window.open("{:U('Check/order')}");
},
jiuban2: function () {
window.open("{:U('Goods/quantity')}");
},
jiuban3: function () {
window.open("{:U('Exporttable/goodsquantity')}");
},
jiuban4: function () {
window.open("{:U('Flow/order')}");
},
jiuban5: function () {
window.open("{:U('Flow/refund')}");
},
jiuban6: function () {
window.open("{:U('Flow/damage')}");
},
jiuban7: function () {
window.open("{:U('Flow/allocating')}");
},
jiuban8: function () {
window.open("{:U('Flow/purchase')}");
},
jiuban9: function () {
window.open("{:U('Flow/flowmoneylist')}");
},
/**
* @description: 打开串号详情窗口
* @param {Number} index: 当前商品索引
*/
detailsSerial(index) {
this.serialVisible = true
this.serialGoodsData = this.goodsList[index]
},
},
created: function () {
this.getData();
}
})
</script>