文件

283 行
13 KiB
HTML
可执行文件

<!--[1.7.90]-->
<link rel="stylesheet" href="/Public/css/component-serial.css?v=1.0.0">
<style>
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-table__row>td:last-child>.cell {
white-space: nowrap;
}
.center-content {
margin: 0 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.center-content .el-input__inner {
padding: 0 15px;
text-align: left;
}
.el-input {
margin-bottom: 10px;
}
.el-range-editor--small .el-range-separator {
line-height: 32px;
}
</style>
<div class="purchaseBox" id="sWarehouseRecordApp" v-cloak>
<div class="center-content">
<div>
<el-input v-model="goods_query" placeholder="请输入内容" style="width: 200px"
@keydown.enter.exact.native.prevent="search"
clearable size="small"></el-input>
<template>
<el-select v-model="type" placeholder="入库类型" clearable size="small">
<el-option label="采购入库" value="1"></el-option>
<el-option label="补货入库" value="2"></el-option>
<el-option label="盘盈入库" value="3"></el-option>
<el-option label="商户调拨入库" value="4" v-if="supplier_type != 2"></el-option>
<el-option label="其他门店调拨入库" value="5" v-if="supplier_type != 2"></el-option>
<el-option label="该门店申请调拨入库" value="6" v-if="supplier_type != 2"></el-option>
<el-option label="调拨出库拒收入库" value="21" v-if="supplier_type != 2"></el-option>
<el-option label="初始化商品档案入库" value="7"></el-option>
<el-option label="收银退货入库" value="11"></el-option>
<el-option label="商城退货入库" value="12"></el-option>
<el-option label="拼团退货入库" value="8"></el-option>
<el-option label="秒杀退货入库" value="9"></el-option>
<el-option label="预售退货入库" value="17"></el-option>
<el-option label="拆分入库" value="10"></el-option>
<el-option label="组合入库" value="13"></el-option>
<el-option label="普通换货入库" value="16"></el-option>
<el-option label="拼团换货入库" value="14"></el-option>
<el-option label="秒杀换货入库" value="15"></el-option>
<el-option label="预售换货入库" value="18"></el-option>
<el-option label="其他入库" value="0"></el-option>
<el-option label="收银赠品退货入库" value="19"></el-option>
<el-option label="商城赠品退货入库" value="20"></el-option>
</el-select>
</template>
<template>
<select-store-supplier :supplier-id.sync="supplier_id"></select-store-supplier>
</template>
<template>
<date-picker-range :date-time.sync="add_time"></date-picker-range>
</template>
<el-button type="primary" plain @click="search" size="small">搜索</el-button>
<if condition="$data_export neq 2 && $authArr['exportOperation'] eq true || $identity eq 1">
<el-button @click="exportOperation(1,1)" 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>
</div>
<div style="border: 1px solid #e6e6e6;max-width: calc(100vw - 208px);">
<el-table border :data="recordList" 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="type_name" label="入库类型" show-overflow-tooltip></el-table-column>
<el-table-column prop="supplier_name" 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="sku_num" label="规格基数" show-overflow-tooltip></el-table-column>
<el-table-column prop="company" label="单位" show-overflow-tooltip></el-table-column>
<el-table-column prop="build_date" label="生产日期" show-overflow-tooltip></el-table-column>
<el-table-column prop="quality_guarantee_period" label="保质期" show-overflow-tooltip></el-table-column>
<el-table-column prop="warehouse_num" label="入库数量" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" size="mini" @click="detailsSerial(scope.$index)"
v-if="scope.row.serial_number_state == 1 && scope.row.warehouse_num > 0">
{{scope.row.warehouse_num}}
</el-button>
<span v-else>{{scope.row.warehouse_num}}</span>
</template>
</el-table-column>
<el-table-column prop="warehouse_price" 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="subtotal" label="合计" show-overflow-tooltip></el-table-column>
<el-table-column prop="remarks" label="备注" show-overflow-tooltip></el-table-column>
<el-table-column prop="add_time" label="入库时间" show-overflow-tooltip></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="serialRecordData"
get-data-type="storeInventoryWarehousingRecord">
</component-serial>
</div>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Retail/common/js/select-supplier.js"></script>
<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 sWarehouseRecordApp = new Vue({
el: "#sWarehouseRecordApp",
data: function () {
return {
store_id: localStorage.store_id,
supplier_id: '',
supplier_type: "{$supplier_type}",
goods_query: "",
type: "",
add_time: "",
goodsClassId1: "",
goodsClassId2: "",
goodsClassId3: "",
recordList: [],
currentPage: 1,
currentLimit: 10,
currentLen: 0,
loading: true,
serialVisible: false, //串号录入窗口开关
serialRecordData: {}, //串号录入当前商品数据对象
}
},
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();//切换页数
},
//搜索
search: function () {
this.currentPage = 1;
this.getData();
},
//查询
getData: function () {
this.loading = true;
$.ajax({
url: "{:U('recordList')}",
type: "post",
data: {
goods_query: this.goods_query,
type: this.type,
add_time: this.add_time,
person1: this.goodsClassId1,
person2: this.goodsClassId2,
person3: this.goodsClassId3,
supplier_id: this.supplier_id,
page: this.currentPage,
limit: this.currentLimit,
},
success: (res) => {
this.recordList = res.data.list;
this.loading = false;
this.$nextTick(function () {
this.currentLen = parseInt(res.data.count);
})
}
})
},
exportOperation: function (page = 1, type = 1, directory_name = '') {
this.loading = true;
this.loadingText = '文件生成中,请耐心等待';
if (type == 1) {
$.ajax({
url: "{:U('export')}",
type: 'POST',
data: {
page: page,
limit: 300,
supplier_id: this.supplier_id,
goods_query: this.goods_query,
type: this.type,
add_time: this.add_time,
person1: this.goodsClassId1,
person2: this.goodsClassId2,
person3: this.goodsClassId3,
directory_name: directory_name
},
success: (res) => {
this.loading = false;
if (res.status == 1) {
this.exportOperation(++page, res.data.type, res.data.directory_name);
} else {
this.$confirm(res.msg, '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
}).catch(() => {
});
}
},
});
} else {
this.loading = false;
window.open(`{:U('exportFile')}?file_path=${directory_name}`);
}
},
/**
* @description: 打开串号详情窗口
* @param {Number} index: 当前商品索引
*/
detailsSerial(index) {
this.serialVisible = true
this.serialRecordData = this.recordList[index]
},
},
created: function () {
this.getData();
}
})
</script>