252 行
11 KiB
HTML
可执行文件
252 行
11 KiB
HTML
可执行文件
<!--[1.8.13]-->
|
|
<link rel="stylesheet" href="/Public/css/component-serial.css?v=1.0.0">
|
|
<style>
|
|
[v-cloak] {
|
|
display: none;
|
|
}
|
|
|
|
.content-table {
|
|
width: 100%;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
border-bottom: 1px solid #e5e5e5;
|
|
color: #409EFF;
|
|
font-weight: bold;
|
|
font-size: 15px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.time {
|
|
font-size: 13px;
|
|
color: #999;
|
|
margin: auto 1px;
|
|
}
|
|
|
|
.seek {
|
|
margin-right: 10px;
|
|
margin-top: 10px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.demo-table-expand {
|
|
font-size: 0;
|
|
}
|
|
|
|
.demo-table-expand label {
|
|
width: 90px;
|
|
color: #99a9bf;
|
|
}
|
|
|
|
.demo-table-expand .el-form-item {
|
|
margin-right: 0;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<div id="particulars" v-cloak style="width: 100%">
|
|
<el-form :inline="true" size="small">
|
|
<el-form-item>
|
|
<el-date-picker v-model="seek_data.start_time" type="datetime" :editable="false"
|
|
placeholder="交易时间(起)" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-date-picker v-model="seek_data.end_time" type="datetime" :editable="false"
|
|
placeholder="交易时间(止)" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
<el-input v-model="seek_data.keyword"
|
|
:placeholder="'请输入'+(seek_data.keyword_type==1?'货号':(seek_data.keyword_type==2?'条码':'名称'))"
|
|
@keydown.enter.exact.native.prevent="sellCurrentChange(1)"
|
|
clearable style="width: 280px;">
|
|
<template slot="prepend">
|
|
<el-select v-model="seek_data.keyword_type"
|
|
style="width: 80px"
|
|
background
|
|
slot="prepend">
|
|
<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-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<select-goods-category :user-type="2"
|
|
:store-id="store_id"
|
|
:category-id1.sync="seek_data.person1"
|
|
:category-id2.sync="seek_data.person2"
|
|
:category-id3.sync="seek_data.person3"></select-goods-category>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" @click="sellCurrentChange(1)">查询</el-button>
|
|
<el-button type="primary" @click="reset" plain>重置</el-button>
|
|
<el-button @click="exportExcel()">导出</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div v-loading="loading" element-loading-text="数据加载中,请等待" element-loading-spinner="el-icon-loading">
|
|
<el-table :data="sell_list" :highlight-current-row="true" border size="mini" max-height="500">
|
|
<el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
|
|
<el-table-column prop="type_name" label="类型" width="80" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="order_no" label="订单号" width="150" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="goods_name" label="商品名称" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="class_name" label="商品分类" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="goods_number" label="货号" width="120"></el-table-column>
|
|
<el-table-column prop="goods_code" label="条码" width="150" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="company" label="单位" width="80"></el-table-column>
|
|
<el-table-column prop="purchase_price" label="进价" width="100"></el-table-column>
|
|
<el-table-column prop="original_price" label="原单价" width="120" align="center"></el-table-column>
|
|
<el-table-column label="数量" width="120" align="center">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" size="mini" @click="detailsSerial(scope.$index)"
|
|
v-if="scope.row.serial_number_state == 1 && scope.row.num > 0">
|
|
{{scope.row.num}}
|
|
</el-button>
|
|
<span v-else>{{scope.row.num}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="cashier_dis_money" label="收银员打折金额" width="120" align="center"></el-table-column>
|
|
<el-table-column prop="coupon_money" label="优惠券优惠金额" width="120" align="center"></el-table-column>
|
|
<el-table-column prop="integral_dis_money" label="积分抵扣金额" width="120" align="center"></el-table-column>
|
|
<el-table-column prop="small_changes_money" label="抹零优惠金额" width="120" align="center"></el-table-column>
|
|
<el-table-column prop="subtotal" label="实售总价" width="80"></el-table-column>
|
|
<el-table-column prop="use_integral" label="使用积分" width="80"></el-table-column>
|
|
<el-table-column prop="sell_mold" label="订单类型" width="100"></el-table-column>
|
|
<el-table-column prop="refund_num" label="退货" width="100"></el-table-column>
|
|
<el-table-column prop="add_time" label="交易时间" width="160"></el-table-column>
|
|
<el-table-column v-if="supplier_type == 2" prop="supplier_name" label="供货商" width="160"></el-table-column>
|
|
</el-table>
|
|
<el-pagination @size-change="sellSizeChange" @current-change="sellCurrentChange"
|
|
layout="total, sizes, prev, pager, next, jumper" :pager-count="5"
|
|
:page-sizes="[10,20,30,40,50,60,70,80,90]"
|
|
:page-size="10" :total="total">
|
|
</el-pagination>
|
|
</div>
|
|
<component-serial :visible.sync="serialVisible" :parent-data="serialGoodsData"
|
|
get-data-type="storeGoodsSalesDetails">
|
|
</component-serial>
|
|
</div>
|
|
<script src="/Public/js/component-serial.js?v=1.0.0"></script>
|
|
<script src="/Public/js/common.js"></script>
|
|
<script src="/Public/Retail/common/js/select-goods-category.js"></script>
|
|
<script>
|
|
var particulars = new Vue({
|
|
el: '#particulars',
|
|
data: function () {
|
|
return {
|
|
store_id: localStorage.store_id,
|
|
class_data: [], // 分类
|
|
seek_data: { // 搜索数据
|
|
start_time: '', // 销售起始时间
|
|
end_time: '', // 销售截止时间
|
|
keyword_type: 1, //货号,条码,名称
|
|
keyword: '', // 货号、条码
|
|
person1:'', // 分类一
|
|
person2:'', // 分类二
|
|
person3:'', // 分类三
|
|
},
|
|
sell_list: [], // 销售记录
|
|
page: 1, // 分页
|
|
limit: 10, // 每页显示条数
|
|
total: 0, // 总数 int类型
|
|
loading: false, // 加载
|
|
props: { // 定义层级选择器
|
|
'value': 'id',
|
|
'label': 'class_name',
|
|
},
|
|
supplier_type: "{$supplier_type}", //2寄售门店
|
|
serialVisible: false, //串号录入窗口开关
|
|
serialGoodsData: {}, //串号录入当前商品数据对象
|
|
};
|
|
},
|
|
|
|
methods: {
|
|
// 获取分类
|
|
getClassList() {
|
|
var that = this;
|
|
$.ajax({
|
|
url: "{:U('getClassList')}",
|
|
type: "post",
|
|
success: function (res) {
|
|
that.class_data = res.status == 1 ? res.class_data : [];
|
|
}
|
|
})
|
|
},
|
|
|
|
// 获取销售记录
|
|
getSellList() {
|
|
var that = this;
|
|
// that.loading = true;
|
|
$.ajax({
|
|
url: "{:U('getSellList')}",
|
|
type: "post",
|
|
data: {seek_data: that.seek_data, page: that.page, limit: that.limit},
|
|
success: function (res) {
|
|
that.loading = false;
|
|
if (res.status == 1) {
|
|
that.sell_list = res.sell_list;
|
|
that.total = res.total;
|
|
} else {
|
|
that.sell_list = [];
|
|
that.total = 0;
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
// 重置表单
|
|
reset() {
|
|
var seek_data = {
|
|
start_time: '',
|
|
end_time: '',
|
|
keyword: '',
|
|
keyword_type: 1,
|
|
person1:'',
|
|
person2:'',
|
|
person3:'',
|
|
};
|
|
this.seek_data = seek_data;
|
|
this.page = 1;
|
|
this.getSellList();
|
|
},
|
|
|
|
// 分页
|
|
sellCurrentChange(val) {
|
|
this.page = val;
|
|
this.getSellList();
|
|
},
|
|
|
|
// 显示数量
|
|
sellSizeChange(val) {
|
|
this.limit = val;
|
|
this.page = 1;
|
|
this.getSellList();
|
|
},
|
|
exportExcel() {
|
|
if (!this.seek_data.start_time && !this.seek_data.end_time && !this.seek_data.keyword && this.seek_data.person1 == '') {
|
|
this.$confirm('确定导出所有销售数据吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
window.location.href = "{:U('sellListExport')}"
|
|
});
|
|
} else {
|
|
window.location.href = "{:U('sellListExport')}?seek_data=" + JSON.stringify(this.seek_data);
|
|
}
|
|
},
|
|
/**
|
|
* @description: 打开串号详情窗口
|
|
* @param {Number} index: 当前商品索引
|
|
*/
|
|
detailsSerial(index) {
|
|
this.serialVisible = true
|
|
this.serialGoodsData = this.sell_list[index]
|
|
},
|
|
},
|
|
created: function () {
|
|
this.getClassList();
|
|
this.getSellList();
|
|
},
|
|
})
|
|
</script> |