init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,221 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!--[1.4.13]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<link rel="stylesheet" href="__PUBLIC__/vue/element-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/myscroll.css"/>
|
||||
<link rel="stylesheet" href="__PUBLIC__/css/common-upload.css">
|
||||
<title>中奖详情</title>
|
||||
</head>
|
||||
<body>
|
||||
<include file="./Application/Admin/View/Upload/index.html"/>
|
||||
<div id="app">
|
||||
<el-form :inline="true" size="small" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
placeholder="请输入姓名/手机号码"
|
||||
v-model="searchData.title"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchData.grant_status" clearable placeholder="发放状态">
|
||||
<el-option
|
||||
v-for="item in grantStates"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchData.prize_type" clearable placeholder="奖品类型">
|
||||
<el-option
|
||||
v-for="item in prizeTypes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item label="中奖日期">
|
||||
<el-date-picker
|
||||
v-model="searchData.dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item><el-button type="primary" @click="search" v-loading="loading">查询</el-button></el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column prop="id" label="id"></el-table-column>
|
||||
<el-table-column prop="username" label="姓名"></el-table-column>
|
||||
<el-table-column prop="id" label="昵称"></el-table-column>
|
||||
<el-table-column prop="phone" label="手机号码"></el-table-column>
|
||||
<el-table-column prop="add_time" label="中奖日期">
|
||||
<template slot-scope="scope">{{scope.row.add_time|normalTime}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="prize_name" label="奖品"></el-table-column>
|
||||
<el-table-column prop="delivery_type" label="发放方式">
|
||||
<template slot-scope="scope">{{scope.row.delivery_type|grant_types}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="delivery_status" label="发放状态">
|
||||
<template slot-scope="scope">{{scope.row.delivery_status|grant_statuss}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="receive_time" label="领取日期">
|
||||
<template slot-scope="scope">{{scope.row.receive_time|normalTime}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="storetag" label="领取门店"></el-table-column>
|
||||
</el-table>
|
||||
<br>
|
||||
<div style="text-align: center" v-if="searchData.data_total>0">
|
||||
<el-pagination
|
||||
v-loading="loading"
|
||||
background
|
||||
@size-change="sizeChange"
|
||||
@current-change="currentChange"
|
||||
:current-page="searchData.page"
|
||||
:page-sizes="[10, 50, 100, 300]"
|
||||
:page-size="searchData.page_size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="searchData.data_total">
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function getQueryVariable(variable)
|
||||
{
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i=0;i<vars.length;i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if(pair[0] == variable){return pair[1];}
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
var filters={
|
||||
normalTime : value => {
|
||||
if(!value) return '';
|
||||
let date = new Date(parseInt(value) * 1000);
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
|
||||
},
|
||||
grant_statuss:status=>{
|
||||
return ['','待配送','已发放'][status];
|
||||
},
|
||||
grant_types:type=>{
|
||||
return ['','配送','自提','自动发放'][type];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Object.keys(filters).forEach(key => {
|
||||
Vue.filter(key, filters[key]);
|
||||
});
|
||||
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: function () {
|
||||
return {
|
||||
loading: false,
|
||||
grantStates:[
|
||||
{value:1,label:'待配送'},
|
||||
{value:2,label:'已发放'},
|
||||
],
|
||||
prizeTypes:[
|
||||
{value:1,label:'实物'},
|
||||
{value:2,label:'门店商品'},
|
||||
{value:3,label:'积分'},
|
||||
{value:4,label:'余额'},
|
||||
{value:5,label:'谢谢惠顾'},
|
||||
],
|
||||
searchData:{
|
||||
title:'',
|
||||
turntable_id:'',
|
||||
grant_status:'',
|
||||
prize_type:'',
|
||||
dateRange:['',''],
|
||||
page_size:10,
|
||||
page:1,
|
||||
data_total: 1
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
var id=getQueryVariable('id');
|
||||
if (id) this.searchData.turntable_id=id;
|
||||
this.search();
|
||||
console.log(getQueryVariable('id'));
|
||||
},
|
||||
methods: {
|
||||
search:function () {
|
||||
this.loading=true;
|
||||
var t=this;
|
||||
if (this.searchData.dateRange.length===2){
|
||||
this.searchData.start_time=this.searchData.dateRange[0];
|
||||
this.searchData.end_time=this.searchData.dateRange[1];
|
||||
} else{
|
||||
this.searchData.start_time='';
|
||||
this.searchData.end_time='';
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/index.php/Retail/Turntable/winTurntableDetail",
|
||||
data: this.searchData,
|
||||
success: function(msg){
|
||||
if (msg.code===0){
|
||||
t.tableData=msg.data.data;
|
||||
t.searchData.data_total= parseInt(msg.data.page_info.data_total);
|
||||
} else {
|
||||
t.$message({
|
||||
showClose: true,
|
||||
message: '查询失败:'+msg.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
t.loading=false;
|
||||
}
|
||||
});
|
||||
},
|
||||
currentChange:function (index) {
|
||||
this.searchData.page=index;
|
||||
this.search();
|
||||
},
|
||||
sizeChange:function (size) {
|
||||
this.searchData.page_size=size;
|
||||
this.searchData.page=1;
|
||||
this.search();
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
在新工单中引用
屏蔽一个用户