文件
mashangyoujiu/Application/Retail/View/SSaleMGoods/warehousing_record.html

263 行
11 KiB
HTML
可执行文件

<!doctype html>
<html>
<!--[1.7.90]-->
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.css">
<link rel="stylesheet" href="/Public/css/component-serial.css?v=1.0.0">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/myscroll.css" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/element-ui.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
}
[v-cloak] {
display: none;
}
th {
background-color: #f5f7fa !important;
}
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;
}
.save {
white-space: nowrap;
background-color: #409EFF;
color: white;
font-size: 12px;
line-height: 30px;
padding: 0 4px;
border-radius: 4px;
margin-left: 3px;
cursor: pointer;
}
.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-top: 15vh;
margin-left: 48vh;
}
.goods_title {
padding: 10px 0;
}
.el-table__row>td:last-child>.cell {
white-space: nowrap;
}
</style>
</head>
<body>
<div id="recordList" v-cloak>
<div style="margin: 10px 0px 10px 10px">
<el-input placeholder="入库单" type="text" size="small" v-model="order_number"></el-input>
<template>
<el-date-picker size="small" v-model="add_time" type="daterange" value-format="yyyy-MM-dd"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</template>
<el-button type="primary" plain @click="search" size="small">搜索</el-button>
<if
condition="$global_store_jurisdiction && ($global_store_jurisdiction['data_export'] eq '2') && $identity eq 2">
<else />
<if condition="$authArr['exportOperation'] eq true">
<el-button type="primary" plain @click="exportOperation" size="small">导出</el-button>
</if>
</if>
</div>
<div style="border: 1px solid rgb(230, 230, 230);">
<el-table border :data="warehouseRecordList"
style="width: calc(100% - 1px); box-sizing: border-box; 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="序号"></el-table-column>
<el-table-column prop="warehouse_order_number" label="入库单号" show-overflow-tooltip></el-table-column>
<el-table-column prop="type_name" label="入库类型" show-overflow-tooltip></el-table-column>
<el-table-column prop="add_time" 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 label="货号" show-overflow-tooltip>
<template slot-scope="scope">
<span type="text" size="small"
v-if="scope.row.attribute_state == 1">{{scope.row.goods_number}}</span>
<span type="text" size="small"
v-if="scope.row.attribute_state == 2">{{scope.row.sku_goods_number}} </span>
</template>
</el-table-column>
<el-table-column label="条码" show-overflow-tooltip>
<template slot-scope="scope">
<span type="text" size="small"
v-if="scope.row.attribute_state == 1">{{scope.row.goods_code}}</span>
<span type="text" size="small" v-if="scope.row.attribute_state == 2">{{scope.row.sku_code}}
</span>
</template>
</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
v-if="showPrice != 2 || identity == 1"></el-table-column>
<el-table-column prop="refund_price" label="退货价" show-overflow-tooltip></el-table-column>
<el-table-column prop="subtotal" label="小计" show-overflow-tooltip
v-if="showPrice != 2 || identity == 1"></el-table-column>
<el-table-column prop="remarks" label="备注" show-overflow-tooltip></el-table-column>
</el-table>
</div>
<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>
<component-serial :visible.sync="serialVisible" :parent-data="serialRecordData"
get-data-type="storeInventoryWarehousingRecord">
</component-serial>
</div>
</body>
<script src="/Public/js/component-serial.js?v=1.0.0"></script>
<script src="/Public/js/common.js"></script>
<script type="text/javascript">
var recordList = new Vue({
el: '#recordList',
data: {
showPrice: "{$showPrice}",
identity: "{$identity}",
goods_id: "{$goods_id}",
attribute_state: "{$attribute_state}",
sku_id: "{$sku_id}",
order_number: "",
add_time: "",
currentPage: 1,
currentLimit: 10,
currentLen: 0,
warehouseRecordList: [],
loading: true,
serialVisible: false, //串号录入窗口开关
serialRecordData: {}, //串号录入当前商品数据对象
},
methods: {
//搜索
search: function () {
this.currentPage = 1;
this.getData();
},
//导出
exportOperation: function () {
var goods_id = this.goods_id;
var attribute_state = this.attribute_state;
var sku_id = this.sku_id;
var order_number = this.order_number;
var add_time = this.add_time;
window.location.href = "{:U('warehousingExport')}?goods_id=" + goods_id + "&attribute_state=" + attribute_state + "&sku_id=" + sku_id + "&order_number=" + order_number + "&add_time=" + add_time
},
//初始化表格信息
getData: function () {
var that = this;
that.loading = true;
var order_number = that.order_number;
var add_time = that.add_time;
$.ajax({
url: "{:U(WarehousingRecordList)}",
type: 'POST',
data: {
page: that.currentPage,
limit: that.currentLimit,
goods_id: that.goods_id,
attribute_state: that.attribute_state,
sku_id: that.sku_id,
order_number: order_number,
add_time: add_time
},
success: function (res) {
if (res.status == 1) {
that.loading = false;
that.warehouseRecordList = [];
that.warehouseRecordList = res.data;
that.$nextTick(function () {
that.currentLen = parseInt(res.count);
})
} else {
that.$message({
type: 'error',
message: res.msg,
duration: 1500,
onClose: function () {
that.loading = false;
}
})
}
}
});
},
handleSizeChange: function (val) {
this.currentLimit = val;//切换每页数量
this.currentPage = 1;
this.getData();
},
handleCurrentChange: function (val) {
this.currentPage = val;
this.getData();//切换页数
},
/**
* @description: 打开串号详情窗口
* @param {Number} index: 当前商品索引
*/
detailsSerial(index) {
this.serialVisible = true
this.serialRecordData = this.warehouseRecordList[index]
},
},
created: function () {
this.getData();
}
})
</script>
</html>