init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,219 @@
|
||||
<!--[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="purchase" v-cloak>
|
||||
<div class="center-content">
|
||||
<div>
|
||||
<el-input v-model="goods_query" style="width: 200px"
|
||||
@keydown.enter.exact.native.prevent="search"
|
||||
placeholder="请输入名称/货号/条码" size="small" clearable>
|
||||
</el-input>
|
||||
<template>
|
||||
<el-select v-model="type" placeholder="请选择类型" size="small" clearable>
|
||||
<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"></el-option>
|
||||
<el-option label="其他出库" value="0"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<date-picker-range :date-time.sync="add_time"></date-picker-range>
|
||||
|
||||
<el-button type="primary" plain @click="search" 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="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="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="stock_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.stock_num > 0">
|
||||
{{scope.row.stock_num}}
|
||||
</el-button>
|
||||
<span v-else>{{scope.row.stock_num}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stock_price" label="出库价" show-overflow-tooltip></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="inventoryDeliveryRecord">
|
||||
</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 purchase = new Vue({
|
||||
el: "#purchase",
|
||||
data: function () {
|
||||
return {
|
||||
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,
|
||||
person1: this.goodsClassId1,
|
||||
person2: this.goodsClassId2,
|
||||
person3: this.goodsClassId3,
|
||||
add_time: this.add_time,
|
||||
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 () {
|
||||
var that = this;
|
||||
var goods_query = that.goods_query;
|
||||
var type = that.type;
|
||||
var person1 = that.goodsClassId1;
|
||||
var person2 = that.goodsClassId2;
|
||||
var person3 = that.goodsClassId3;
|
||||
var add_time = that.add_time;
|
||||
window.location.href = "{:U('export')}?goods_query=" + goods_query + "&type=" + type + "&person1=" + person1 + "&person2=" + person2 + "&person3=" + person3 + "&add_time=" + add_time;
|
||||
},
|
||||
/**
|
||||
* @description: 打开串号详情窗口
|
||||
* @param {Number} index: 当前商品索引
|
||||
*/
|
||||
detailsSerial(index) {
|
||||
this.serialVisible = true
|
||||
this.serialRecordData = this.recordList[index]
|
||||
},
|
||||
},
|
||||
created: function () {
|
||||
this.getData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
在新工单中引用
屏蔽一个用户