277 行
12 KiB
HTML
可执行文件
277 行
12 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;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
.el-range-editor--small .el-range-separator {
|
|
line-height: 32px;
|
|
}
|
|
</style>
|
|
<div class="purchaseBox" id="goodsList" v-cloak>
|
|
<div class="center-content">
|
|
<div>
|
|
<template>
|
|
<el-input placeholder="名称/货号/条码/批次号" type="text" style="width: 200px"
|
|
clearable size="small"
|
|
@keydown.enter.exact.native.prevent="searchData"
|
|
v-model="order_number"></el-input>
|
|
<date-picker-range :date-time.sync="add_time"></date-picker-range>
|
|
|
|
<select-mer-supplier :supplier-id.sync="supplier_id"></select-mer-supplier>
|
|
|
|
<el-select v-model="warehouse_id" placeholder="采购仓库" size="small" clearable>
|
|
<el-option value="">所有仓库</el-option>
|
|
<el-option v-for="item in warehouse" :key="item.id" :label="item.name" :value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</template>
|
|
<el-button type="primary" plain @click="searchData" size="small">搜索</el-button>
|
|
<if condition="$authArr['exportOperation'] eq true">
|
|
<el-button @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="1"
|
|
: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="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="class_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="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 width="100" prop="purchase_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, 'purchaseGoods')"
|
|
v-if="scope.row.serial_number_state == 1 && scope.row.purchase_num > 0">
|
|
{{scope.row.purchase_num}}
|
|
</el-button>
|
|
<span v-else>{{scope.row.purchase_num}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column width="100" prop="warehousing_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, 'purchaseStorageGoods')"
|
|
v-if="scope.row.serial_number_state == 1 && scope.row.warehousing_num > 0">
|
|
{{scope.row.warehousing_num}}
|
|
</el-button>
|
|
<span v-else>{{scope.row.warehousing_num}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column width="100" prop="retreat_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, 'purchaseReturnGoods')"
|
|
v-if="scope.row.serial_number_state == 1 && scope.row.retreat_num > 0">
|
|
{{scope.row.retreat_num}}
|
|
</el-button>
|
|
<span v-else>{{scope.row.retreat_num}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="purchase_price" label="金额" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="subtotal" label="小计" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="supplier_name" label="供货商" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="warehouse_name" label="仓库" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="order_number" label="批次号" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="remarks" 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="serialGoodsData" :get-data-type="serialDataType">
|
|
</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 goodsList = new Vue({
|
|
el: "#goodsList",
|
|
data: function () {
|
|
return {
|
|
order_number: "",
|
|
supplier_id: "",
|
|
warehouse_id: "",
|
|
warehouse: {$warehouse},
|
|
add_time: "",
|
|
goodsClassId1: "",
|
|
goodsClassId2: "",
|
|
goodsClassId3: "",
|
|
goodsList: [],
|
|
currentPage: 1,
|
|
currentLimit: 10,
|
|
currentLen: 0,
|
|
loading: true,
|
|
serialVisible: false, //串号录入窗口开关
|
|
serialGoodsData: {}, //串号录入当前商品数据对象
|
|
serialDataType: '' //弹窗数据获取类型
|
|
}
|
|
},
|
|
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,
|
|
order_number: this.order_number,
|
|
supplier_id: this.supplier_id,
|
|
warehouse_id: this.warehouse_id,
|
|
add_time: this.add_time,
|
|
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 order_number = that.order_number;
|
|
var supplier_id = that.supplier_id;
|
|
var warehouse_id = that.warehouse_id;
|
|
var add_time = that.add_time;
|
|
var person1 = that.goodsClassId1;
|
|
var person2 = that.goodsClassId2;
|
|
var person3 = that.goodsClassId3;
|
|
window.location.href = "{:U('export')}?supplier_id=" + supplier_id + "&order_number=" + order_number + "&warehouse_id=" + warehouse_id + "&add_time=" + add_time + "&person1=" + person1 + "&person2=" + person2 + "&person3=" + person3
|
|
},
|
|
/**
|
|
* @description: 打开串号详情窗口
|
|
* @param {Number} index: 当前商品索引
|
|
* @param {String} type: 串号详情数据类型
|
|
*/
|
|
detailsSerial(index, type) {
|
|
this.serialDataType = type
|
|
this.serialVisible = true
|
|
this.serialGoodsData = this.goodsList[index]
|
|
}
|
|
},
|
|
created: function () {
|
|
this.getData();
|
|
}
|
|
})
|
|
</script> |