You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
115
hyhproject/home/view/default/shops/base.html
Executable file
115
hyhproject/home/view/default/shops/base.html
Executable file
@ -0,0 +1,115 @@
|
||||
<!doctype html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>{block name="title"}{:WSTConf('CONF.mallTitle')}{/block}</title>
|
||||
<link href="__STYLE__/css/common.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/shop.css?v={$v}" rel="stylesheet">
|
||||
{block name="css"}{/block}
|
||||
<script type="text/javascript" src="__STATIC__/js/jquery.min.js?v={$v}"></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/layer/layer.js?v={$v}"></script>
|
||||
|
||||
<script type='text/javascript' src='__STATIC__/js/common.js?v={$v}'></script>
|
||||
{block name="depend_common_js"}{/block}
|
||||
<script type='text/javascript' src='__STYLE__/js/common.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__ROOT__/static/plugins/lazyload/jquery.lazyload.min.js?v={$v}'></script>
|
||||
<script>
|
||||
window.conf = {"ROOT":"__ROOT__","IMGURL":"__IMGURL__","APP":"__APP__","STATIC":"__STATIC__","SUFFIX":"{:config('url_html_suffix')}", "SMS_VERFY":"{:WSTConf('CONF.smsVerfy')}","PHONE_VERFY":"{:WSTConf('CONF.phoneVerfy')}","GOODS_LOGO":"{:WSTConf('CONF.goodsLogo')}","SHOP_LOGO":"{:WSTConf('CONF.shopLogo')}","MALL_LOGO":"{:WSTConf('CONF.mallLogo')}","USER_LOGO":"{:WSTConf('CONF.userLogo')}","IS_LOGIN":"{if (int)session('WST_USER.userId')>0 }1{else}0{/if}","TIME_TASK":"1","MESSAGE_BOX":"{:WSTShopMessageBox()}","ROUTES":'{:WSTRoute()}',"IS_CRYPT":"{:WSTConf('CONF.isCryptPwd')}"}
|
||||
{:WSTLoginTarget(1)}
|
||||
$(function() {
|
||||
WST.initShopCenter();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{block name="top"}
|
||||
{include file="default/top" /}
|
||||
{/block}
|
||||
|
||||
{block name="header"}
|
||||
|
||||
<div class='wst-lite-bac'>
|
||||
<div class='wst-lite-container'>
|
||||
<div class='wst-logo'><a href='{$Request.root.true}'><img src="__IMGURL__/{:WSTConf('CONF.mallLogo')}" height="80" width='160'></a></div>
|
||||
<div class="wst-lite-tit"><span>卖家中心</span><a class="wst-lite-in" href='{$Request.root.true}'>返回商城首页</a></div>
|
||||
<div class="wst-lite-sea">
|
||||
<div class='search'>
|
||||
<input type="hidden" id="search-type" value="{:isset($keytype)?1:0}"/>
|
||||
|
||||
<ul class="j-search-box">
|
||||
<li class="j-search-type">
|
||||
搜<span>{if isset($keytype)}店铺{else}商品{/if}</span> <i class="arrow"> </i>
|
||||
</li>
|
||||
<li class="j-type-list">
|
||||
{if isset($keytype)}
|
||||
<div data="0">商品</div>
|
||||
{else}
|
||||
<div data="1">店铺</div>
|
||||
{/if}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<input type="text" id='search-ipt' class='search-ipt' value='{:isset($keyword)?$keyword:""}'/>
|
||||
<div id='search-btn' class="search-btn" onclick='javascript:WST.search(this.value)'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{/block}
|
||||
<div class="wst-wrap">
|
||||
<div class='wst-header'>
|
||||
<div class="wst-shop-nav">
|
||||
<div class="wst-nav-box">
|
||||
{php}$homeMenus = WSTHomeMenus(1);{/php}
|
||||
{volist name="$homeMenus['menus']" id="vo"}
|
||||
<a href="__ROOT__/{$vo['menuUrl']}?homeMenuId={$vo['menuId']}"><li class="liselect wst-lfloat {if($vo['menuId'] == $homeMenus['menuId1'])}wst-nav-boxa{/if}">{$vo['menuName']}</li></a>
|
||||
{/volist}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-nav'></div>
|
||||
<div class='wst-main'>
|
||||
<div class='wst-menu'>
|
||||
{if isset($homeMenus['menus'][$homeMenus['menuId1']]['list']) }
|
||||
{volist name="$homeMenus['menus'][$homeMenus['menuId1']]['list']" id="menus"}
|
||||
<span class='wst-menu-title'>{$menus['menuName']}<img src="__STYLE__/img/user_icon_sider_zhankai.png"></span>
|
||||
<ul>
|
||||
{if isset($menus['list']) }
|
||||
{volist name="menus['list']" id="menu" key='k'}
|
||||
<li class="{if($homeMenus['menuId3']==$menu['menuId'])}wst-menua{/if} wst-menuas" onclick="getMenus('{$menu['menuId']}','{$menu['menuUrl']}')">
|
||||
{$menu['menuName']}
|
||||
<span id="mId_{$menu['menuId']}"></span>
|
||||
</li>
|
||||
{/volist}
|
||||
{/if}
|
||||
</ul>
|
||||
{/volist}
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class='wst-content'>
|
||||
{block name="content"}<div class="result">卖家中心</div>{/block}
|
||||
</div>
|
||||
</div>
|
||||
<div style='clear:both;'></div>
|
||||
<br/>
|
||||
</div>
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}{/block}
|
||||
<script>
|
||||
function getMenus(menuId,menuUrl){
|
||||
$.post(WST.U('home/index/getMenuSession'), {menuId:menuId}, function(data){
|
||||
location.href=WST.U(menuUrl);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
35
hyhproject/home/view/default/shops/cashdraws/box_draw.html
Executable file
35
hyhproject/home/view/default/shops/cashdraws/box_draw.html
Executable file
@ -0,0 +1,35 @@
|
||||
<form id='drawForm' autocomplete='off' >
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<table width='100%' style='margin-top:10px;' class='wst-form' style='dislay:none'>
|
||||
<tr>
|
||||
<th width='120' align='right'>提现账号:</th>
|
||||
<td style='line-height:25px;'>
|
||||
【{$object['bankName']}】{$object['bankNo']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120' align='right'>账号持有人:</th>
|
||||
<td>{$object['bankUserName']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'>提现金额<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='text' id='money' class='j-ipt' style='width:250px' data-rule="提现金额: required;" onkeypress="return WST.isNumberdoteKey(event)" onblur="javascript:WST.limitDecimal(this,2)" onkeyup="javascript:WST.isChinese(this,1)" placeholder="可提现金额:¥{$shop['shopMoney']-$shop['rechargeMoney']}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height='40'>
|
||||
<th align='right'>支付密码<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type="password" style="display:none">
|
||||
<input type='password' id='payPwd' class='j-ipt' style='width:250px' data-rule="支付密码: required;"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='text-align: center;padding-top:5px;'>
|
||||
<a class='s-btn' onclick="drawMoney()">保存</a>
|
||||
<a class='s-btn2' style='margin-left:10px;' onclick='layerclose()'>取消</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
113
hyhproject/home/view/default/shops/cashdraws/cashdraws.js
Executable file
113
hyhproject/home/view/default/shops/cashdraws/cashdraws.js
Executable file
@ -0,0 +1,113 @@
|
||||
$(function () {
|
||||
$('#tab').TabPanel({tab:0,callback:function(tab){
|
||||
switch(tab){
|
||||
case 0:pageQuery(0);break;
|
||||
case 1:pageConfigQuery(0);break;
|
||||
}
|
||||
}})
|
||||
});
|
||||
var isSetPayPwd = 1;
|
||||
function getShopMoney(){
|
||||
$.post(WST.U('home/shops/getShopMoney'),{},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var shopMoney = json.data.shopMoney;
|
||||
var rechargeMoney = json.data.rechargeMoney;
|
||||
$('#shopMoney').html('¥'+shopMoney);
|
||||
$('#lockMoney').html('¥'+json.data.lockMoney);
|
||||
rechargeMoney = parseFloat(shopMoney - rechargeMoney)
|
||||
$('#userCashMoney').html('¥'+rechargeMoney.toFixed(2));
|
||||
if(json.data.isDraw==1){
|
||||
$('#drawBtn').show();
|
||||
}else{
|
||||
$('#drawBtn').hide();
|
||||
}
|
||||
isSetPayPwd = json.data.isSetPayPwd;
|
||||
}
|
||||
});
|
||||
}
|
||||
function pageQuery(p){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
$.post(WST.U('home/cashdraws/pageQueryByShop'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
pageQuery(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('draw-list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#draw-page-list').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'draw-pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageQuery(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
var w;
|
||||
function toDrawMoney(){
|
||||
if(isSetPayPwd==0){
|
||||
WST.msg('您尚未设置支付密码,请先设置支付密码',{icon:2,time:1000},function(){
|
||||
location.href = WST.U('home/users/security');
|
||||
});
|
||||
return;
|
||||
}
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
$.post(WST.U('home/cashdraws/toEditByShop'),{},function(data,textStatus){
|
||||
layer.close(tips);
|
||||
w = WST.open({
|
||||
type: 1,
|
||||
title:"申请提现",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['550px', '250px'],
|
||||
offset: '100px'
|
||||
});
|
||||
});
|
||||
}
|
||||
function drawMoney(){
|
||||
$('#drawForm').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.j-ipt');
|
||||
if(window.conf.IS_CRYPT=='1'){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
params.payPwd = rsa.encrypt(params.payPwd);
|
||||
}
|
||||
var tips = WST.load({msg:'正在提交数据,请稍后...'});
|
||||
$.post(WST.U('home/cashdraws/drawMoneyByShop'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
pageQuery(WSTCurrPage);
|
||||
getShopMoney();
|
||||
layer.close(w);
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function layerclose(){
|
||||
layer.close(w);
|
||||
}
|
91
hyhproject/home/view/default/shops/cashdraws/list.html
Executable file
91
hyhproject/home/view/default/shops/cashdraws/list.html
Executable file
@ -0,0 +1,91 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}提现管理-卖家中心{__block__}{/block}
|
||||
{block name='css'}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='money-head'>
|
||||
<div class='shop-logo'><img height='100' width='100' src='__IMGURL__/{:session("WST_USER.shopImg")}'></div>
|
||||
<div class='shop-info'>
|
||||
<div class='shopName'>{:session('WST_USER.shopName')}</div>
|
||||
<div class='shopMoney'>
|
||||
<div class="usermoney">
|
||||
可用资金:<font color='red' id='shopMoney'>¥0</font>
|
||||
</div>
|
||||
<div class="cashbox">
|
||||
<span style='margin-left:20px;'><a class="cashbtn" id='drawBtn' href="javascript:toDrawMoney();" >申请提现</a></span>
|
||||
<span class='draw-tips'>(至少¥{:WSTConf('CONF.drawCashShopLimit')}方可提现)</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="money-rows">
|
||||
<div class="lockbox">
|
||||
冻结资金:<font color='red' id='lockMoney'>¥0</font>
|
||||
</div>
|
||||
<div class="cashbox">
|
||||
<span class="cashmoney-box">可提现金额:<font color='red' id='userCashMoney'>¥0</font></span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>提现记录</li>
|
||||
</ul>
|
||||
<div class='wst-tab-content'>
|
||||
<div class='wst-tab-item'>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='80'>提现单号</th>
|
||||
<th width='100'>提现银行</th>
|
||||
<th width='130'>开户地区</th>
|
||||
<th width='130'>银行卡号</th>
|
||||
<th width='100'>持卡人</th>
|
||||
<th width='60'>提现金额</th>
|
||||
<th width='250'>提现状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="draw-list" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i].cashNo}}</td>
|
||||
<td>{{d[i].accTargetName}}</td>
|
||||
<td>{{ d[i].accAreaName }}</td>
|
||||
<td>{{ d[i].accNo }}</td>
|
||||
<td>{{ d[i].accUser }}</td>
|
||||
<td>¥{{ d[i].money }}</td>
|
||||
<td {{#if(d[i].cashSatus==-1){}}style='line-height:25px;'{{#}}}>
|
||||
{{#if(d[i].cashSatus==1){}}提现成功
|
||||
{{#}else if(d[i].cashSatus==-1){}}提现失败
|
||||
<br/>【原因】{{d[i].cashRemarks}}
|
||||
{{#}else{}}待处理{{#}}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="draw-page-list"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5' align="center" style='padding:5px 0px 5px 0px'>
|
||||
<div id="draw-pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/cashdraws/cashdraws.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
getShopMoney();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
53
hyhproject/home/view/default/shops/freights/freights.js
Executable file
53
hyhproject/home/view/default/shops/freights/freights.js
Executable file
@ -0,0 +1,53 @@
|
||||
$(function(){
|
||||
areasByList();
|
||||
});
|
||||
//运费列表
|
||||
function areasByList(){
|
||||
$.post(WST.U('home/shopfreights/listProvince'),'',function(data){
|
||||
var json = WST.toJson(data);
|
||||
var gettpl = document.getElementById('list').innerHTML;
|
||||
laytpl(gettpl).render(json, function(html){
|
||||
$('#list-info').html(html);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function treeOpen(obj,id){
|
||||
if( $(obj).attr('class').indexOf('active') > -1 ){
|
||||
$(obj).removeClass('active');
|
||||
$(obj).html('<img class="wst-lfloat" style="margin-top:-3px;" src="'+WST.conf.ROOT+'/wstmart/home/view/default/img/seller_icon_zk.png">');
|
||||
$('.text_'+id).show();
|
||||
$('.tree_'+id).show();
|
||||
}else{
|
||||
$(obj).addClass('active');
|
||||
$(obj).html('<img class="wst-lfloat" style="margin-top:-3px;" src="'+WST.conf.ROOT+'/wstmart/home/view/default/img/seller_icon_sq.png">');
|
||||
$('.text_'+id).hide();
|
||||
$('.tree_'+id).hide();
|
||||
}
|
||||
}
|
||||
|
||||
function freightOnblur(obj,id,v){
|
||||
$postage = $(obj).val();
|
||||
if(v == 0){
|
||||
$('.possort').val($postage);
|
||||
}else{
|
||||
$('.price_'+id).val($postage);
|
||||
}
|
||||
}
|
||||
|
||||
function freightSubmit(){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shopfreights/edit'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
setTimeout(function(){
|
||||
//location.href=WST.U('home/shopfreights/index');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
61
hyhproject/home/view/default/shops/freights/list.html
Executable file
61
hyhproject/home/view/default/shops/freights/list.html
Executable file
@ -0,0 +1,61 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}运费设置 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}{/block}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>运费设置</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<form autocomplete="off">
|
||||
<table id="cat_list_tab" class='wst-list wst-form'>
|
||||
<thead>
|
||||
<tr class="wst-colour">
|
||||
<th class="wst-fre-th">名称</th>
|
||||
<th class="wst-fre-th" width="200">运费</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="wst-fre-hov">
|
||||
<td class="wst-fre-td">
|
||||
<span style='width:400px;height:22px;'>默认运费</span>
|
||||
</td>
|
||||
<td><input type='text' style='width:80px;' value="{$shFreight['freight']}" onblur="javascript:freightOnblur(this,'',0)" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="list-info"></tbody>
|
||||
</table>
|
||||
<div class='wst-tbar-group' style='height:76px;text-align:center;'>
|
||||
<a class='s-btn' style='margin-top:30px;width:100px;height: 30px;' type="button" onclick='javascript:freightSubmit()'>保 存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script id="list" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr isLoad='1' class="wst-fre-hov">
|
||||
<td class="wst-fre-td">
|
||||
<span class='wst-tree-open active' onclick='javascript:treeOpen(this,"{{ d[i].areaId }}")'><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_sq.png"></span>
|
||||
<span style='width:400px;height:22px;'>{{ d[i].areaName }}</span>
|
||||
</td>
|
||||
<td><input class='possort text_{{ d[i].areaId }}' type='text' style='width:80px;display:none;' value="" onblur='javascript:freightOnblur(this,"{{ d[i].areaId }}",2)' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/></td>
|
||||
</tr>
|
||||
{{# for(var j = 0; j < d[i].listProvince.length; j++){ }}
|
||||
<tr class="tree_{{ d[i].listProvince[j].parentId }} hide wst-fre-hov">
|
||||
<td class="wst-fre-td">
|
||||
<span class="wst-tree-second"></span>
|
||||
<span style='width:400px;height:22px;'>{{ d[i].listProvince[j].areaName }}</span>
|
||||
</td>
|
||||
{{#if(typeof(d[i].listProvince[j].freight)=='object'){}}
|
||||
<td><input class='price_{{ d[i].listProvince[j].parentId }} possort ipt' id="{{ d[i].listProvince[j].areaId }}" type='text' style='width:80px;' value="{$shFreight['freight']}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/></td>
|
||||
{{# }else{ }}
|
||||
<td><input class='price_{{ d[i].listProvince[j].parentId }} possort ipt' id="{{ d[i].listProvince[j].areaId }}" type='text' style='width:80px;' value="{{d[i].listProvince[j].freight}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/></td>
|
||||
{{# } }}
|
||||
</tr>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}<script type='text/javascript' src='__STYLE__/shops/freights/freights.js?v={$v}'></script>{/block}
|
46
hyhproject/home/view/default/shops/goods/edit.html
Executable file
46
hyhproject/home/view/default/shops/goods/edit.html
Executable file
@ -0,0 +1,46 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}<?=($object['goodsId']>0)?"编辑":"新增";?>商品-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/batchupload.css?v={$v}" />
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
label{margin-right:10px;}
|
||||
#specsAttrBox .webuploader-container{width:80px;height:25px;line-height:25px;overflow:hidden;}
|
||||
</style>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>商品信息</li>
|
||||
<li>规格属性</li>
|
||||
<li>商品相册</li>
|
||||
</ul>
|
||||
<div class="wst-tab-content" style='width:99%;margin-bottom: 10px;border:0px;'>
|
||||
<form id='editform' autocomplete='off'>
|
||||
<div class="wst-tab-item" style="position: relative;">
|
||||
{include file='default/shops/goods/edit0'/}
|
||||
</div>
|
||||
<div class="wst-tab-item" style="position: relative;display:none">
|
||||
{include file='default/shops/goods/edit1'/}
|
||||
</div>
|
||||
<div class="wst-tab-item" style="position: relative;display:none">
|
||||
{include file='default/shops/goods/edit2'/}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script src="__STATIC__/plugins/kindeditor/kindeditor.js?v={$v}" type="text/javascript" ></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/batchupload.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/goods/goods.js?v={$v}'></script>
|
||||
<script>
|
||||
var initBatchUpload = false,editor1 = null,specNum = 0,src='{$src}';
|
||||
{php}unset($object['goodsDesc']);{/php}
|
||||
var OBJ = <?=json_encode($object)?>;
|
||||
$(function(){initEdit()});
|
||||
</script>
|
||||
{/block}
|
200
hyhproject/home/view/default/shops/goods/edit0.html
Executable file
200
hyhproject/home/view/default/shops/goods/edit0.html
Executable file
@ -0,0 +1,200 @@
|
||||
<style>
|
||||
.webuploader-pick {background: #e45050 none repeat scroll 0 0;}
|
||||
</style>
|
||||
<input type='hidden' id='goodsId' class='j-ipt' value='{$object["goodsId"]}' />
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='150'>商品名称<font color='red'>*</font>:</th>
|
||||
<td width='300'>
|
||||
<input type='text' class='j-ipt' id='goodsName' value='{$object["goodsName"]}' maxLength='100' data-rule='商品名称:required;'/>
|
||||
</td>
|
||||
<td rowspan='6'>
|
||||
<div id='goodsImgBox'>
|
||||
<img src='__IMGURL__/{$object["goodsImg"]}' id='preview' width='150' height='150'>
|
||||
</div>
|
||||
<div id='goodsImgPicker'>请上传商品图片</div><span id='uploadMsg'></span>
|
||||
<input type='hidden' id='goodsImg' class='j-ipt' data-target='#msg_goodsImg' value='{if $object["goodsId"]>0}{$object["goodsImg"]}{/if}' data-rule="商品图片: required;"/>
|
||||
<span class='msg-box' id='msg_goodsImg'></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品类型<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select id='goodsType' class='j-ipt' onchange="changeGoodsType(this.value)" {if $object["goodsId"]>0}disabled{/if}>
|
||||
<option value='0' {if($object["goodsType"]==0)}selected{/if}>实物商品</option>
|
||||
{if($object["goodsType"]==1)} <option value='1' {if($object["goodsType"]==1)}selected{/if}>虚拟商品</option>{/if}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品编号<font color='red'>*</font>:</th>
|
||||
<td><input type='text' class='j-ipt' id='goodsSn' value='{$object["goodsSn"]}' maxLength='20' data-rule='商品编号:required;'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='150'>商品货号<font color='red'>*</font>:</th>
|
||||
<td width='300'>
|
||||
<input type='text' class='j-ipt' id='productNo' value='{$object["productNo"]}' maxLength='20' data-rule='商品货号:required;'/>
|
||||
</td>
|
||||
</tr>
|
||||
{if($object["alone"]==1)}
|
||||
<tr>
|
||||
<th width='150'>商品成本价:</th>
|
||||
<td width='300'>
|
||||
<input type='text' class='j-ipt' id='basicsMoney' value='{$object["basicsMoney"]}' maxLength='20' data-rule=''/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th>市场价格<font color='red'>*</font>:</th>
|
||||
<td><input type='text' class='j-ipt' id='marketPrice' value='{$object["marketPrice"]}' maxLength='10' data-rule='市场价格:required;price' data-rule-price="[/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/, '价格必须大于0']" onblur="javascript:WST.limitDecimal(this,2)" onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><font color='red'>小提示</font>:</th>
|
||||
<td>店铺价格包含惠宝抵现20%;<br />比如店铺价格100元,会员可抵20元,商家实收80元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺价格<font color='red'>*</font>:</th>
|
||||
<td><input type='text' class='j-ipt' id='shopPrice' value='{$object["shopPrice"]}' maxLength='10' data-rule='店铺价格:required;price' data-rule-price="[/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/, '价格必须大于0']" onblur="javascript:WST.limitDecimal(this,2)" onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th>ect支付<font color='red'>*</font>:</th>
|
||||
<td colspan='2'>
|
||||
<div class="radio-box">
|
||||
<label><input type='radio' name='ectPay' id="ectPay-1" class='j-ipt wst-radio' value='1' {if $object['ectPay']==1}checked{/if}/><label for="ectPay-1" class="mt-1"></label>启用</label>
|
||||
<label><input type='radio' name='ectPay' id="ectPay-0" class='j-ipt wst-radio' value='0' {if $object['ectPay']==0}checked{/if}/><label for="ectPay-0" class="mt-1"></label>禁用</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr> -->
|
||||
{if $object["ectPayRatio"] < 1}
|
||||
<tr>
|
||||
<th><font color='red'>小提示</font>:</th>
|
||||
<td>ECT价格为店铺价格的{$object["ectPayRatio"]*10}折;<br />比如店铺价格100元,木吉抵扣20元,付款80元,ECT按{$object["ectPayRatio"]*80}元对应ECT数量结算</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ECT价格<font color='red'>*</font>:</th>
|
||||
<td><input type='text' id='ectPrice' value='{$object["shopPrice"]*$object["ectPayRatio"]}' maxLength='10' data-rule-price="[/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/, '价格必须大于0']" onblur="javascript:WST.limitDecimal(this,2)" onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)" disabled="disabled" /></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
|
||||
<tr id='goodsStockTr' {if($object["goodsType"]==1)}style='display:none'{/if}>
|
||||
<th>商品库存<font color='red'>*</font>:</th>
|
||||
<td><input type='text' class='j-ipt' id='goodsStock' value='{$object["goodsStock"]}' maxLength='10' data-rule='商品库存:required;integer[+0]' onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>预警库存<font color='red'>*</font>:</th>
|
||||
<td colspan='2'><input type='text' class='j-ipt' id='warnStock' value='{$object["warnStock"]}' maxLength='10' data-rule='预警库存:required;integer[+0]' onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品单位<font color='red'>*</font>:</th>
|
||||
<td colspan='2'><input type='text' class='j-ipt' id='goodsUnit' value='{$object["goodsUnit"]}' maxLength='10' data-rule='商品单位:required;'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>SEO关键字:</th>
|
||||
<td colspan='2'><input type='text' class='j-ipt' id='goodsSeoKeywords' maxLength='100' value='{$object["goodsSeoKeywords"]}' style='width:70%'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品促销信息:</th>
|
||||
<td colspan='2'><textarea class='j-ipt' id='goodsTips' maxLength='100' style='width:500px;height:50px'>{$object["goodsTips"]}</textarea></td>
|
||||
</tr>
|
||||
{:hook('homeDocumentShopEditGoods',['goodsId'=>$object["goodsId"]])}
|
||||
<tr>
|
||||
<th>商品状态<font color='red'>*</font>:</th>
|
||||
<td colspan='2'>
|
||||
<div class="radio-box">
|
||||
<label><input type='radio' name='isSale' id="isSale-1" class='j-ipt wst-radio' value='1' {if $object['isSale']==1}checked{/if}/><label for="isSale-1" class="mt-1"></label>上架</label>
|
||||
<label><input type='radio' name='isSale' id="isSale-0" class='j-ipt wst-radio' value='0' {if $object['isSale']==0}checked{/if}/><label for="isSale-0" class="mt-1"></label>下架</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品属性:</th>
|
||||
<td colspan='2'>
|
||||
<div class="checkbox-box">
|
||||
<label>
|
||||
<input id="isRecom" name='isRecom' class="j-ipt wst-checkbox" {if $object['isRecom']==1}checked{/if} value="1" type="checkbox"/><label class="mt-1" for="isRecom"></label>推荐
|
||||
</label>
|
||||
<label>
|
||||
<input id="isBest" name="isBest" class="j-ipt wst-checkbox" {if $object['isBest']==1}checked{/if} value="1" type="checkbox"/><label class="mt-1" for="isBest"></label>精品
|
||||
</label>
|
||||
<label>
|
||||
<input id="isNew" name="isNew" class="j-ipt wst-checkbox" {if $object['isNew']==1}checked{/if} value="1" type="checkbox"/><label class="mt-1" for="isNew"></label>新品
|
||||
</label>
|
||||
<label>
|
||||
<input id="isHot" name="isHot" class="j-ipt wst-checkbox" {if $object['isHot']==1}checked{/if} value="1" type="checkbox"/><label class="mt-1" for="isHot"></label>热销
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否包邮:</th>
|
||||
<td colspan='2'>
|
||||
<div class="radio-box">
|
||||
<label><input type='radio' name='isFreeShipping' id="isFreeShipping-1" class='j-ipt wst-radio' value='1' {if $object['isFreeShipping']==1}checked{/if}/><label for="isFreeShipping-1" class="mt-1"></label>包邮</label>
|
||||
<label><input type='radio' name='isFreeShipping' id="isFreeShipping-0" class='j-ipt wst-radio' value='0' {if $object['isFreeShipping']==0}checked{/if}/><label for="isFreeShipping-0" class="mt-1"></label>不包邮</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>商城分类<font color='red'>*</font>:</th>
|
||||
<td colspan='2'>
|
||||
<select id="cat_0" class='ipt j-goodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:true,className:'j-goodsCats',afterFunc:'lastGoodsCatCallback'});getBrands('brandId',this.value)">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTGoodsCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}">{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>本店分类:</th>
|
||||
<td colspan='2'>
|
||||
<select id="shopCatId1" class='j-ipt' onchange="getShopsCats('shopCatId2',this.value,'');">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" {if $object['shopCatId1']==$vo['catId']}selected{/if}>
|
||||
<!-- {$vo['catName']} -->
|
||||
<!--分类后面添加特产省份mark 20180518 by zl-->
|
||||
{if condition = "$vo['provName'] neq ''"}
|
||||
{$vo['catName'].'('.$vo['provName'].')'}
|
||||
{else/}
|
||||
{$vo['catName']}
|
||||
{/if}
|
||||
<!--end-->
|
||||
</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select id='shopCatId2' class='j-ipt'>
|
||||
<option value=''>请选择</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>品牌:</th>
|
||||
<td colspan='2'>
|
||||
<select id="brandId" class='j-ipt'>
|
||||
<option value="0">-请选择-</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品描述<font color='red'>*</font>:</th>
|
||||
<td colspan='2'>
|
||||
<textarea rows="2" cols="60" id='goodsDesc' class='j-ipt' name='goodsDesc' data-rule='商品描述:required;'>{$object['goodsDesc']}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' align='center' style='text-align:center;padding-top:10px;'>
|
||||
<a class="s-btn" onclick='javascript:save()'>保 存</a>
|
||||
<a class="s-btn2" onclick="javascript:resetForm()">重 置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$("#shopPrice").change(function(){
|
||||
// alert($(this).val());
|
||||
var txtChange = $(this).val();
|
||||
$("#ectPrice").val(txtChange*{$object['ectPayRatio']});
|
||||
});
|
||||
</script>
|
9
hyhproject/home/view/default/shops/goods/edit1.html
Executable file
9
hyhproject/home/view/default/shops/goods/edit1.html
Executable file
@ -0,0 +1,9 @@
|
||||
<div id='specsAttrBox'></div>
|
||||
<div id='specTips' style='display:none'>
|
||||
<div class='wst-tips-box' style='margin-left:0px;'>1.若改动商品规格时,销售规则表将会重新绘制,填写销售规格表前前选择好商品规格
|
||||
</br>2.如果不批发,起批数和批发价保留为空即可</div>
|
||||
</div>
|
||||
<div id='specBtns' style='margin:0px auto;text-align:center;display:none'>
|
||||
<a class="s-btn" onclick='javascript:save()'>保 存</a>
|
||||
<a class="s-btn2" onclick="javascript:resetForm()">重 置</a>
|
||||
</div>
|
45
hyhproject/home/view/default/shops/goods/edit2.html
Executable file
45
hyhproject/home/view/default/shops/goods/edit2.html
Executable file
@ -0,0 +1,45 @@
|
||||
<style>
|
||||
.wst-batchupload .placeholder .webuploader-pick {
|
||||
background: #e45050 none repeat scroll 0 0;
|
||||
}
|
||||
.wst-batchupload .statusBar .btns .uploadBtn {
|
||||
background: #e45050 none repeat scroll 0 0;
|
||||
}
|
||||
.wst-batchupload .statusBar .btns .uploadBtn:hover{
|
||||
background: #e42525;
|
||||
}
|
||||
</style>
|
||||
<div id="batchUpload" class="wst-batchupload">
|
||||
<div class="queueList filled">
|
||||
<div id="dndArea" class="placeholder {if !empty($object['gallery'])}element-invisible{/if}">
|
||||
<div id="filePicker"></div>
|
||||
<p>或将照片拖到这里,单次最多可选50张,每张最大不超过5M</p>
|
||||
</div>
|
||||
<ul class="filelist" >
|
||||
{volist name="$object['gallery']" id="vo"}
|
||||
<li class="state-complete" style="border: 1px solid rgb(59, 114, 165);">
|
||||
<p class="title"></p>
|
||||
<p class="imgWrap">
|
||||
<img src="__IMGURL__/{$vo}">
|
||||
</p>
|
||||
<input type="hidden" v="{$vo}" iv="{$vo}" class="j-gallery-img">
|
||||
<span class="btn-del">删除</span>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="statusBar" {if empty($object['gallery'])}style="display: none;"{/if}>
|
||||
<div class="progress" style="display: none;">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage" style="width: 0%;"></span>
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style='margin:0px auto;text-align:center;border-top:1px solid #cccccc;padding-top:10px;'>
|
||||
<a class="s-btn" onclick='javascript:save()'>保 存</a>
|
||||
<a class="s-btn2" onclick="javascript:resetForm()">重 置</a>
|
||||
</div>
|
1136
hyhproject/home/view/default/shops/goods/goods.js
Executable file
1136
hyhproject/home/view/default/shops/goods/goods.js
Executable file
File diff suppressed because it is too large
Load Diff
138
hyhproject/home/view/default/shops/goods/list_audit.html
Executable file
138
hyhproject/home/view/default/shops/goods/list_audit.html
Executable file
@ -0,0 +1,138 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}审核中的商品-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>审核中商品</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
</label>
|
||||
<label>
|
||||
商品类型:
|
||||
<select id='goodsType' class="s-query">
|
||||
<option value=''>全部</option>
|
||||
<option value='0'>实物商品</option>
|
||||
<!-- <option value='1'>虚拟商品</option> -->
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
商品名称:<input type="text" name="goodsName" id="goodsName" class="s-query" />
|
||||
<a class="s-btn" onclick="auditByPage()">查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-body">
|
||||
<div class="s-menu">
|
||||
<a href='javascript:;' onclick="changeSale(0,'audit')" class="s-sale"><span>下架</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isRecom','audit')" class="s-rec"><span>推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isNew','audit')" class="s-new"><span>新品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isBest','audit')" class="s-best"><span>精品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isHot','audit')" class="s-hot"><span>热销</span></a>
|
||||
<a href='javascript:void(0);' onclick="benchDel('audit')" class="s-del"><span>删除</span></a>
|
||||
<a href='{:url("home/goods/add")}' class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='10'>
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input style="margin-left:2px;" class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk')" type='checkbox' id="all"/>
|
||||
<label for="all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th>商品名称</th>
|
||||
<th>商品编号</th>
|
||||
<th width='50'>价格(¥)</th>
|
||||
<th>推荐</th>
|
||||
<th>精品</th>
|
||||
<th>新品</th>
|
||||
<th>热销</th>
|
||||
<th>销量</th>
|
||||
<th>库存</th>
|
||||
<th width="175">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="margin-top:15px;" id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' id='pager'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='chk wst-checkbox-s' id="chk-{{i}}" value='{{d[i]['goodsId']}}' /><label for="chk-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
|
||||
</td>
|
||||
<td>{{d[i]['goodsSn']}}</td>
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['shopPrice']}}</td>
|
||||
{{# }else{ }}
|
||||
<td ondblclick="javascript:toEditGoodsBase(2,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_2_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event)" onblur="javascript:WST.limitDecimal(this,2);editGoodsBase(2,{{d[i]['goodsId']}})" style="padding:3px;display:none;width:100%;border:1px solid red;width:40px;" maxlength="10"/>
|
||||
<span id="span_2_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['shopPrice']}}</span>
|
||||
</td>
|
||||
{{# } }}
|
||||
|
||||
<td><div status="{{d[i]['isRecom']}}" title='双击可修改' ondblclick='changSaleStatus("r",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isRecom']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isBest']}}" title='双击可修改' ondblclick='changSaleStatus("b",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isBest']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isNew']}}" title='双击可修改' ondblclick='changSaleStatus("n",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isNew']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isHot']}}" title='双击可修改' ondblclick='changSaleStatus("h",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isHot']==1)?'right':'wrong')}}"></div></td>
|
||||
|
||||
<td>{{d[i]['saleNum']}}</td>
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['goodsStock']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(3,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_3_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsBase(3,{{d[i]['goodsId']}})" style="padding:3px;display:none;width:100%;border:1px solid red;width:40px;" maxlength="6"/>
|
||||
<span id="span_3_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['goodsStock']}}</span>
|
||||
</td>
|
||||
{{# } }}
|
||||
<td>
|
||||
<a class="g-handle" target='_blank' href='{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}'>[查看]</a>
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]['goodsId']}},"audit")'>[编辑]</a>
|
||||
{{# if(d[i]['goodsType']==1){}}
|
||||
<a class="g-handle" href='javascript:toStock({{d[i]['goodsId']}},"audit")'>[卡券]</a>
|
||||
{{#}}}
|
||||
<a class="g-handle" href='javascript:del({{d[i]['goodsId']}},"audit")'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
<div id='pager'></div>
|
||||
<div class="s-menu">
|
||||
<a href='javascript:;' onclick="changeSale(0,'audit')" class="s-sale"><span>下架</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isRecom','audit')" class="s-rec"><span>推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isNew','audit')" class="s-new"><span>新品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isBest','audit')" class="s-best"><span>精品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isHot','audit')" class="s-hot"><span>热销</span></a>
|
||||
<a href='javascript:void(0);' onclick="benchDel('audit')" class="s-del"><span>删除</span></a>
|
||||
<a href='{:url("home/goods/add")}' class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/goods/goods.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){auditByPage()})
|
||||
</script>
|
||||
{/block}
|
91
hyhproject/home/view/default/shops/goods/list_illegal.html
Executable file
91
hyhproject/home/view/default/shops/goods/list_illegal.html
Executable file
@ -0,0 +1,91 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}违规商品-会员中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>违规商品</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
</label>
|
||||
<label>
|
||||
商品类型:
|
||||
<select id='goodsType' class="s-query">
|
||||
<option value=''>全部</option>
|
||||
<option value='0'>实物商品</option>
|
||||
<!-- <option value='1'>虚拟商品</option> -->
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
商品名称:<input type="text" name="goodsName" id="goodsName" class="s-query" /><a class="s-btn" id="store-query" onclick="illegalByPage()">查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<form id='editform' autocomplete='off'>
|
||||
<div class="wst-body">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<div class="s-menu">
|
||||
<a href='javascript:void(0);' onclick="benchDel('store',1)" class="s-del"><span>删除</span></a>
|
||||
</div>
|
||||
<tr>
|
||||
<th width='10'>
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input style="margin-left:2px;" class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk1')" type='checkbox' id="all-1"/>
|
||||
<label for="all-1"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th>商品名称</th>
|
||||
<th>商品编号</th>
|
||||
<th>违规原因</th>
|
||||
<th width="150">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list2'></tbody>
|
||||
<tfoot>
|
||||
<tr align="center"><td colspan='5' id='pager2'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist2" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='chk1 wst-checkbox-s' id="chk-1-{{i}}" value='{{d[i]['goodsId']}}' /><label for="chk-1-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{d[i]['goodsSn']}}</td>
|
||||
<td>{{d[i]['illegalRemarks']}}</td>
|
||||
<td>
|
||||
<a class="g-handle" target='_blank' href='{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}'>[查看]</a>
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]['goodsId']}},"illegal")'>[编辑]</a>
|
||||
<a class="g-handle" href='javascript:del({{d[i]['goodsId']}},"illegal")'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/goods/goods.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){illegalByPage(0)})
|
||||
</script>
|
||||
{/block}
|
196
hyhproject/home/view/default/shops/goods/list_limitprice.html
Executable file
196
hyhproject/home/view/default/shops/goods/list_limitprice.html
Executable file
@ -0,0 +1,196 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}出售中的商品-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/layui/css/layui.css" />
|
||||
<!--<link rel="stylesheet" type="text/css" href="__STYLE__/css/common.css" />-->
|
||||
<style>
|
||||
body{
|
||||
color:#333;font:12px/150% "Hiragino Sans GB","Microsoft Yahei",arial,宋体,"Helvetica Neue",Helvetica,STHeiTi,sans-serif
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>限时价格商品</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
</label>
|
||||
<label>
|
||||
商品类型:
|
||||
<select id='goodsType' class="s-query">
|
||||
<option value=''>全部</option>
|
||||
<option value='0'>实物商品</option>
|
||||
<!-- <option value='1'>虚拟商品</option> -->
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
商品名称:<input type="text" name="goodsName" id="goodsName" class="s-query" /><a class="s-btn" onclick="limitPriceByPage()">查询</a>
|
||||
</label>
|
||||
<label>
|
||||
<a class="s-btn" onclick="addLimitGoods(0)">新增限时价格商品</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10" >
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input style="margin-left:2px;" class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk')" type='checkbox' id="all"/>
|
||||
<label for="all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th width="180" >商品名称</th>
|
||||
<th width="100" >商品编号</th>
|
||||
<th width="40" >店铺价格</th>
|
||||
<th width='40'>限时价格</th>
|
||||
<th width="25" >销量</th>
|
||||
<th width="25" >库存</th>
|
||||
<th width="100" >开始时间</th>
|
||||
<th width="100" >结束时间</th>
|
||||
<th width="95">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr align="center"><td colspan='10' id='pager'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='chk wst-checkbox-s' id="chk-{{i}}" value='{{d[i]['goodsId']}}' /><label for="chk-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{d[i]['productNo']}}</td>
|
||||
{{# if(d[i]['specPrice']!=null){ }}
|
||||
<td>{{d[i]['specPrice']}}</td>
|
||||
{{# }else{ }}
|
||||
<td>{{d[i]['shopPrice']}}</td>
|
||||
{{# } }}
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['limitPrice']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(2,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_2_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event)" onblur="javascript:WST.limitDecimal(this,2);editGoodsBase(2,{{d[i]['goodsId']}})" style="padding:3px;display:none;width:100%;border:1px solid red;width:40px;" maxlength="10"/>
|
||||
<span id="span_2_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['limitPrice']}}</span>
|
||||
</td>
|
||||
{{# } }}
|
||||
|
||||
<td>{{d[i]['saleNum']}}</td>
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['goodsStock']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(3,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_3_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsBase(3,{{d[i]['goodsId']}})" style="padding:3px;display:none;width:100%;border:1px solid red;width:40px;" maxlength="6"/>
|
||||
|
||||
<span id="span_3_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['goodsStock']}}</span>
|
||||
|
||||
</td>
|
||||
{{# } }}
|
||||
<td>{{d[i]['startTime']}}</td>
|
||||
<td>{{d[i]['endTime']}}</td>
|
||||
<td>
|
||||
<!--<a class="g-handle" target='_blank' href='{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}'>[查看]</a>-->
|
||||
<a class="g-handle" href='javascript:addLimitGoods({{d[i]['id']}})'>[编辑价格]</a>
|
||||
{{# if(d[i]['goodsType']==1){}}
|
||||
<a class="g-handle" href='javascript:toStock({{d[i]['goodsId']}},"sale")'>[卡券]</a>
|
||||
{{#}}}
|
||||
<a class="g-handle" href="javascript:delLimitGoods({{d[i]['id']}})">[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
<div id='pager'></div>
|
||||
</div>
|
||||
<div id='goodsBox' style='display:none'>
|
||||
<form id="goodsForm">
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='150'>商品分类<font color='red'>*</font>:</th>
|
||||
<td >
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class=" ipt">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat3" id="cat3" class="ipt"><option value="">-请选择-</option></select>
|
||||
<label style="height: 20px;">
|
||||
<a class="s-btn" onclick="limitPriceGoods()" style="height: 20px;line-height: 20px">查询</a>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='150'>商品<font color='red'>*</font>:</th>
|
||||
<td >
|
||||
<select name="goodsId" id="goodsId" class="j-ipt" onchange='changeGoods()'>
|
||||
<option value="">-请选择-</option>
|
||||
{volist name="lists" id="vo"}
|
||||
<option value="{$vo['goodsId']}">{$vo['goodsName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品货号:</th>
|
||||
<td>
|
||||
<select id='productNo' name="productNo" class='j-ipt' onchange='changeSpecs()'>
|
||||
<option value="">请选择商品货号</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品规格:</th>
|
||||
<td>
|
||||
<input type="text" id="specs" value="" disabled="disabled" class="ipt">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品限时价格<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type="text" id="limitPrice" value="" class="j-ipt">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="wst-order-rate" >
|
||||
<th width='120'>有效时间<font color='red'>*</font>:</th>
|
||||
<td colspan='3'>
|
||||
<input type='text' id='startTime' name='startTime' class='j-ipt laydate-icon' value=''/>
|
||||
至
|
||||
<input type='text' id='endTime' name='endTime' class='j-ipt laydate-icon' value=''/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/plugins/layui/layui.all.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/goods/goods.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){limitPriceByPage()})
|
||||
|
||||
</script>
|
||||
{/block}
|
141
hyhproject/home/view/default/shops/goods/list_sale.html
Executable file
141
hyhproject/home/view/default/shops/goods/list_sale.html
Executable file
@ -0,0 +1,141 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}出售中的商品-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>出售中商品</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
</label>
|
||||
<label>
|
||||
商品类型:
|
||||
<select id='goodsType' class="s-query">
|
||||
<option value=''>全部</option>
|
||||
<option value='0'>实物商品</option>
|
||||
<!-- <option value='1'>虚拟商品</option> -->
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
商品名称/ID:<input type="text" name="goodsName" id="goodsName" class="s-query" /><a class="s-btn" onclick="saleByPage()">查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<div class="s-menu">
|
||||
<a href='javascript:;' onclick="changeSale(0,'sale')" class="s-sale"><span>下架</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isRecom','sale')" class="s-rec"><span>推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isNew','sale')" class="s-new"><span>新品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isBest','sale')" class="s-best"><span>精品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isHot','sale')" class="s-hot"><span>热销</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeStoreStatus('storeRecom','sale')" class="s-heart" style="width:70px"><span>店长推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="benchDel('sale')" class="s-del"><span>删除</span></a>
|
||||
<a href='{:url("home/goods/add")}' class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10" >
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input style="margin-left:2px;" class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk')" type='checkbox' id="all"/>
|
||||
<label for="all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th>商品名称</th>
|
||||
<th>商品编号</th>
|
||||
<th width='50'>价格(¥)</th>
|
||||
<th>推荐</th>
|
||||
<th>精品</th>
|
||||
<th>新品</th>
|
||||
<th>热销</th>
|
||||
<th>店长推荐</th>
|
||||
<th>销量</th>
|
||||
<th>库存</th>
|
||||
<th width="175">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr align="center"><td colspan='10' id='pager'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='chk wst-checkbox-s' id="chk-{{i}}" value='{{d[i]['goodsId']}}' /><label for="chk-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{d[i]['goodsSn']}}</td>
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['shopPrice']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(2,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_2_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event)" onblur="javascript:WST.limitDecimal(this,2);editGoodsBase(2,{{d[i]['goodsId']}})" style="padding:3px;display:none;width:100%;border:1px solid red;width:40px;" maxlength="10"/>
|
||||
<span id="span_2_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['shopPrice']}}</span>
|
||||
</td>
|
||||
{{# } }}
|
||||
|
||||
<td><div status="{{d[i]['isRecom']}}" title='双击可修改' ondblclick='changSaleStatus("r",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isRecom']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isBest']}}" title='双击可修改' ondblclick='changSaleStatus("b",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isBest']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isNew']}}" title='双击可修改' ondblclick='changSaleStatus("n",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isNew']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isHot']}}" title='双击可修改' ondblclick='changSaleStatus("h",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isHot']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['storeStatus']}}" title='双击可修改' ondblclick='changStoreRecom("s",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['storeStatus']==1)?'right':'wrong')}}"></div></td>
|
||||
|
||||
<td>{{d[i]['saleNum']}}</td>
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['goodsStock']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(3,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_3_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsBase(3,{{d[i]['goodsId']}})" style="padding:3px;display:none;width:100%;border:1px solid red;width:40px;" maxlength="6"/>
|
||||
|
||||
<span id="span_3_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['goodsStock']}}</span>
|
||||
|
||||
</td>
|
||||
{{# } }}
|
||||
<td>
|
||||
<a class="g-handle" target='_blank' href='{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}'>[查看]</a>
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]['goodsId']}},"sale")'>[编辑]</a>
|
||||
{{# if(d[i]['goodsType']==1){}}
|
||||
<a class="g-handle" href='javascript:toStock({{d[i]['goodsId']}},"sale")'>[卡券]</a>
|
||||
{{#}}}
|
||||
<a class="g-handle" href='javascript:del({{d[i]['goodsId']}},"sale")'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
<div id='pager'></div>
|
||||
<div class="s-menu">
|
||||
<a href='javascript:;' onclick="changeSale(0,'sale')" class="s-sale"><span>下架</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isRecom','sale')" class="s-rec"><span>推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isNew','sale')" class="s-new"><span>新品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isBest','sale')" class="s-best"><span>精品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isHot','sale')" class="s-hot"><span>热销</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeStoreStatus('storeRecom','sale')" class="s-heart" style="width:70px"><span>店长推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="benchDel('sale')" class="s-del"><span>删除</span></a>
|
||||
<a href='{:url("home/goods/add")}' class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/goods/goods.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){saleByPage()})
|
||||
|
||||
</script>
|
||||
{/block}
|
138
hyhproject/home/view/default/shops/goods/list_store.html
Executable file
138
hyhproject/home/view/default/shops/goods/list_store.html
Executable file
@ -0,0 +1,138 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}仓库中的商品-会员中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>仓库中的商品</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
</label>
|
||||
<label>
|
||||
商品类型:
|
||||
<select id='goodsType' class="s-query">
|
||||
<option value=''>全部</option>
|
||||
<option value='0'>实物商品</option>
|
||||
<!-- <option value='1'>虚拟商品</option> -->
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
商品名称:<input type="text" name="goodsName" id="goodsName" class="s-query" /><a class="s-btn" id="store-query" onclick="storeByPage()">查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<form id='editform' autocomplete='off'>
|
||||
<div class="wst-body">
|
||||
<div class="s-menu">
|
||||
<a href='javascript:;' onclick="changeSale(1,'store')" class="s-sale-up"><span>上架</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isRecom','store')" class="s-rec"><span>推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isNew','store')" class="s-new"><span>新品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isBest','store')" class="s-best"><span>精品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isHot','store')" class="s-hot"><span>热销</span></a>
|
||||
<a href='javascript:void(0);' onclick="benchDel('store')" class="s-del"><span>删除</span></a>
|
||||
<a href='{:url("home/goods/add")}' class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='10'>
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input style="margin-left:2px;" class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk')" type='checkbox' id="all"/>
|
||||
<label for="all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th>商品名称</th>
|
||||
<th>商品编号</th>
|
||||
<th width='50'>价格(¥)</th>
|
||||
<th>推荐</th>
|
||||
<th>精品</th>
|
||||
<th>新品</th>
|
||||
<th>热销</th>
|
||||
<th>销量</th>
|
||||
<th>库存</th>
|
||||
<th width="175">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list1'></tbody>
|
||||
<tfoot>
|
||||
<tr align="center"><td colspan='10' id='pager1'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist1" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='chk wst-checkbox-s' id="chk-{{i}}" value='{{d[i]['goodsId']}}' /><label for="chk-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{d[i]['goodsSn']}}</td>
|
||||
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['shopPrice']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(2,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_2_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event)" onblur="javascript:WST.limitDecimal(this,2);editGoodsBase(2,{{d[i]['goodsId']}})" style="display:none;width:100%;border:1px solid red;width:40px;padding:3px;" maxlength="10"/>
|
||||
<span id="span_2_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:green;">{{d[i]['shopPrice']}}</span>
|
||||
</td>
|
||||
{{# } }}
|
||||
|
||||
<td><div status="{{d[i]['isRecom']}}" title='双击可修改' ondblclick='changSaleStatus("r",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isRecom']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isBest']}}" title='双击可修改' ondblclick='changSaleStatus("b",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isBest']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isNew']}}" title='双击可修改' ondblclick='changSaleStatus("n",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isNew']==1)?'right':'wrong')}}"></div></td>
|
||||
<td><div status="{{d[i]['isHot']}}" title='双击可修改' ondblclick='changSaleStatus("h",this,{{d[i]["goodsId"]}})' class="w-r {{((d[i]['isHot']==1)?'right':'wrong')}}"></div></td>
|
||||
|
||||
<td>{{d[i]['saleNum']}}</td>
|
||||
{{# if(d[i]['isSpec']==1 || d[i]['goodsType']==1) { }}
|
||||
<td>{{d[i]['goodsStock']}}</td>
|
||||
{{# }else{ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsBase(3,{{d[i]['goodsId']}},'')">
|
||||
<input id="ipt_3_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsBase(3,{{d[i]['goodsId']}})" style="display:none;width:100%;border:1px solid red;width:40px;padding:3px;" maxlength="6"/>
|
||||
<span id="span_3_{{d[i]['goodsId']}}" style="display: inline;color:green;">{{d[i]['goodsStock']}}</span>
|
||||
</td>
|
||||
{{# } }}
|
||||
<td>
|
||||
<a class="g-handle" target='_blank' href='{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}'>[查看]</a>
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]['goodsId']}},"store")'>[编辑]</a>
|
||||
{{# if(d[i]['goodsType']==1){}}
|
||||
<a class="g-handle" href='javascript:toStock({{d[i]['goodsId']}},"store")'>[卡券]</a>
|
||||
{{#}}}
|
||||
<a class="g-handle" href='javascript:del({{d[i]['goodsId']}},"store")'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
<div class="s-menu">
|
||||
<a href='javascript:;' onclick="changeSale(1,'store')" class="s-sale-up"><span>上架</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isRecom','store')" class="s-rec"><span>推荐</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isNew','store')" class="s-new"><span>新品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isBest','store')" class="s-best"><span>精品</span></a>
|
||||
<a href='javascript:void(0);' onclick="changeGoodsStatus('isHot','store')" class="s-hot"><span>热销</span></a>
|
||||
<a href='javascript:void(0);' onclick="benchDel('store')" class="s-del"><span>删除</span></a>
|
||||
<a href='{:url("home/goods/add")}' class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/goods/goods.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){storeByPage(0);})
|
||||
</script>
|
||||
{/block}
|
94
hyhproject/home/view/default/shops/goodsappraises/goodsappraises.js
Executable file
94
hyhproject/home/view/default/shops/goodsappraises/goodsappraises.js
Executable file
@ -0,0 +1,94 @@
|
||||
/**获取本店分类**/
|
||||
function getShopsCats(objId,pVal,objVal){
|
||||
$('#'+objId).empty();
|
||||
$.post(WST.U('home/shopcats/listQuery'),{parentId:pVal},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
var html = [],cat;
|
||||
html.push("<option value='' >-请选择-</option>");
|
||||
if(json.status==1 && json.list){
|
||||
json = json.list;
|
||||
for(var i=0;i<json.length;i++){
|
||||
cat = json[i];
|
||||
html.push("<option value='"+cat.catId+"' "+((objVal==cat.catId)?"selected":"")+">"+cat.catName+"</option>");
|
||||
}
|
||||
}
|
||||
$('#'+objId).html(html.join(''));
|
||||
});
|
||||
}
|
||||
function getCat(val){
|
||||
if(val==0){
|
||||
$('#cat2').html("<option value='' >-请选择-</option>");
|
||||
return;
|
||||
}
|
||||
$.post(WST.U('home/shopcats/listQuery'),{parentId:val},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
var html = [],cat;
|
||||
html.push("<option value='' >-请选择-</option>");
|
||||
if(json.status==1 && json.list){
|
||||
json = json.list;
|
||||
for(var i=0;i<json.length;i++){
|
||||
cat = json[i];
|
||||
html.push("<option value='"+cat.catId+"'>"+cat.catName+"</option>");
|
||||
}
|
||||
}
|
||||
$('#cat2').html(html.join(''));
|
||||
});
|
||||
}
|
||||
function showImg(id){
|
||||
layer.photos({
|
||||
photos: '#img-file-'+id
|
||||
});
|
||||
}
|
||||
function queryByPage(p){
|
||||
$('#list').html('<img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/goodsappraises/queryByPage'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
$('#list').empty();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
for(var g=0;g<=json.Rows.length;g++){
|
||||
showImg(g);
|
||||
}
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
queryByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function reply(t,id){
|
||||
var params = {};
|
||||
if($('#reply-'+id).val()==''){
|
||||
WST.msg('回复内容不能为空',{icon:2});
|
||||
return false;
|
||||
}
|
||||
params.reply = $('#reply-'+id).val();
|
||||
params.id=id;
|
||||
$.post(WST.U('home/goodsappraises/shopReply'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var today = new Date();
|
||||
today = today.toLocaleDateString();
|
||||
var html = '<p class="reply-content">'+params.reply+'【'+today+'】</p>'
|
||||
$(t).parent().html(html);
|
||||
}
|
||||
});
|
||||
}
|
107
hyhproject/home/view/default/shops/goodsappraises/list.html
Executable file
107
hyhproject/home/view/default/shops/goodsappraises/list.html
Executable file
@ -0,0 +1,107 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}评价列表-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
|
||||
<div class="wst-shop-head"><span>评价列表</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
</label>
|
||||
<label>
|
||||
商品名称:<input type="text" name="goodsName" id="goodsName" class="s-query" /><a class="s-btn" onclick="queryByPage()">查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="40">序号</th>
|
||||
<th width="400">商品</th>
|
||||
<th>商品评分</th>
|
||||
<th>服务评分</th>
|
||||
<th>时效评分</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' style='padding-top:10px;text-align:center;'>
|
||||
<div id='pager'></div>
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td rowspan="2">{{i+1}}</td>
|
||||
<td rowspan="2">
|
||||
<div class="appra-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId'])}}">
|
||||
<img class='gImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="appra-goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['goodsScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['serviceScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['timeScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #ccc;">
|
||||
<td colspan='3'>评价[{{d[i]['loginName']}}]:{{d[i]['content']}}
|
||||
|
||||
{{# if(WST.blank(d[i]['images'])!=''){ var img = d[i]['images'].split(','); var length = img.length; }}
|
||||
<div id="img-file-{{i}}">
|
||||
{{# for(var g=0;g<length;g++){ }}
|
||||
<img src="__IMGURL__/{{img[g]}}/thumb80" layer-src="__IMGURL__/{{img[g]}}" width="30" height="30" />
|
||||
{{# } }}
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="reply-box">
|
||||
{{# if(d[i]['shopReply']==null || d[i]['shopReply']=='') { }}
|
||||
<textarea cols="65" rows="5" id="reply-{{d[i]['gaId']}}" ></textarea>
|
||||
<a class="reply-btn s-btn" onclick="reply(this,{{d[i]['gaId']}})">回复</a>
|
||||
{{# }else{ }}
|
||||
<p class="reply-content">{{d[i]['shopReply']}}【{{d[i]['replyTime']}}】</p>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/goodsappraises/goodsappraises.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
queryByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
50
hyhproject/home/view/default/shops/goodsconsult/goodsconsult.js
Executable file
50
hyhproject/home/view/default/shops/goodsconsult/goodsconsult.js
Executable file
@ -0,0 +1,50 @@
|
||||
function queryByPage(p){
|
||||
$('#list').html('<img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.page = p;
|
||||
$.post(WST.U('home/goodsconsult/pageQuery'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
$('#list').empty();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
queryByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function reply(t,id){
|
||||
var params = {};
|
||||
if($('#reply-'+id).val()==''){
|
||||
WST.msg('回复内容不能为空',{icon:2});
|
||||
return false;
|
||||
}
|
||||
params.reply = $('#reply-'+id).val();
|
||||
params.id=id;
|
||||
$.post(WST.U('home/goodsconsult/reply'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var today = new Date();
|
||||
var Myd = today.toLocaleDateString();
|
||||
var His = today.toLocaleTimeString();
|
||||
var html = '<p class="reply-content">'+params.reply+'【'+Myd+' '+His+'】</p>'
|
||||
$(t).parent().html(html);
|
||||
}
|
||||
});
|
||||
}
|
85
hyhproject/home/view/default/shops/goodsconsult/list.html
Executable file
85
hyhproject/home/view/default/shops/goodsconsult/list.html
Executable file
@ -0,0 +1,85 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}商品咨询-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
.c999{color:#999;}
|
||||
.consult{margin-bottom: 15px;}
|
||||
.consultImg,.consultImg a,.consultImg a img{width: 50px !important;height: 50px !important}
|
||||
</style>
|
||||
<div class="wst-shop-head"><span>商品咨询</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
咨询分类:
|
||||
<select name="consultType" id="consultType" class="s-query">
|
||||
<option value="0">-请选择-</option>
|
||||
{volist name=":WSTDatas('COUSULT_TYPE')" id="vo"}
|
||||
<option value="{$vo['dataVal']}" >{$vo['dataName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
关键词:<input type="text" id="consultKey" class="s-query" /><a class="s-btn" onclick="queryByPage()">查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="40">序号</th>
|
||||
<th width="300">商品</th>
|
||||
<th>咨询内容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' style='padding-top:10px;text-align:center;'>
|
||||
<div id='pager'></div>
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td rowspan="2">{{i+1}}</td>
|
||||
<td rowspan="2">
|
||||
<div class="appra-img consultImg">
|
||||
<a target='_blank' href="{{WST.U("home/goods/detail","id="+d[i]['goodsId'])}}">
|
||||
<img class='gImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="appra-goodsName" style="height:auto;">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #ccc;">
|
||||
<td colspan='3'>
|
||||
<p class='consult'>
|
||||
[{{(WST.blank(d[i]['loginName'])=='')?'游客':d[i]['loginName']}}]:{{d[i]['consultContent']}} <span class="c999">({{d[i]['createTime']}})</span>
|
||||
</p>
|
||||
|
||||
<div class="reply-box">
|
||||
{{# if(d[i]['reply']==null || d[i]['reply']=='') { }}
|
||||
<textarea style="width:98%;height:80px;" id="reply-{{d[i]['id']}}" placeholder='3~200个字符长度' maxlength='200'></textarea>
|
||||
<a class="reply-btn s-btn" style="margin-left:3px;" onclick="reply(this,{{d[i]['id']}})">回复</a>
|
||||
{{# }else{ }}
|
||||
<p class="reply-content">{{d[i]['reply']}}【{{d[i]['replyTime']}}】</p>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/goodsconsult/goodsconsult.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
queryByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
26
hyhproject/home/view/default/shops/goodsvirtuals/edit.html
Executable file
26
hyhproject/home/view/default/shops/goodsvirtuals/edit.html
Executable file
@ -0,0 +1,26 @@
|
||||
<style>
|
||||
.s-btn{margin:0px;}
|
||||
</style>
|
||||
<form id='cardForm' autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th>卡券号<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='text' class='j-ipt' id='cardNo' maxLength='20' value='{$object["cardNo"]}' style='width:250px'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>卡券密码<font color='red'>*</font>:</th>
|
||||
<td><input type='text' class='j-ipt' id='cardPwd' maxLength='20' value='{$object["cardPwd"]}' style='width:250px'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style='text-align: center;padding-top: 15px;'>
|
||||
<a class='s-btn' onclick="addCardFunc({$object['id']})">保存</a>
|
||||
{if $object['id']==0}
|
||||
<a class='s-btn' onclick="addCardFunc({$object['id']},1)" style='width:110px;'>继续新增</a>
|
||||
{/if}
|
||||
<a class='s-btn2' onclick="closeWin()">取消</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
85
hyhproject/home/view/default/shops/goodsvirtuals/list.html
Executable file
85
hyhproject/home/view/default/shops/goodsvirtuals/list.html
Executable file
@ -0,0 +1,85 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}商品卡券-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
.layui-layer-btn .layui-layer-btn0{background:#e45050;border-color:#e45050;}
|
||||
.webuploader-container{width:80px;height:30px;overflow: hidden;float:right;margin:10px 5px 0px 5px;}
|
||||
.webuploader-container .webuploader-pick{padding:5px 10px;}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
<input type='hidden' id='vid' value='{$id}'/>
|
||||
<div class="wst-shop-head"><span>商品卡券</span><a href="{:url('home/goods/'.$src)}">返回</a></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
状态:<select id='isUse' class="s-query">
|
||||
<option value='-1'>全部</option>
|
||||
<option value='0'>未使用</option>
|
||||
<option value='1'>已下单</option>
|
||||
</select>
|
||||
卡券号:<input type="text" name="cardNo" id="cardNo" class="s-query" />
|
||||
<a class="s-btn" onclick="stockByPage()">查询</a>
|
||||
<div id='importBtn' style='float:right;'>导入卡券</div>
|
||||
<a style='float:right;height:30px;line-height:50px;' href='__STATIC__/template/goodsvirtuals.xls' target='_blank'>下载模板</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<div class="s-menu">
|
||||
<a href='javascript:void(0);' onclick="delCard({$id},1)" class="s-del"><span>删除</span></a>
|
||||
<a href='javascript:void(0);' onclick="editCard(0)" class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10" >
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input style="margin-left:2px;" class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.vchk')" type='checkbox' id="all"/>
|
||||
<label for="all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th>卡券号</th>
|
||||
<th>密码</th>
|
||||
<th>状态</th>
|
||||
<th>消费订单</th>
|
||||
<th width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr align="center"><td colspan='10' id='pager'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='vchk wst-checkbox-s' id="chk-{{i}}" value='{{d[i]['id']}}' /><label for="chk-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{d[i]['cardNo']}}</td>
|
||||
<td>{{d[i]['cardPwd']}}</td>
|
||||
<td>{{getUseStatus(d[i]['isUse'])}}</td>
|
||||
<td>{{WST.blank(d[i]['orderNo'],' - ')}}</td>
|
||||
<td>
|
||||
{{# if(d[i]['isUse']==0){ }}
|
||||
<a class="g-handle" href='javascript:editCard({{d[i]['id']}})'>[编辑]</a>
|
||||
{{# } }}
|
||||
<a class="g-handle" href='javascript:delCard({{d[i]['id']}},0)'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
<div id='pager'></div>
|
||||
<div class="s-menu">
|
||||
<a href='javascript:void(0);' onclick="delCard({$id},1)" class="s-del"><span>删除</span></a>
|
||||
<a href='javascript:void(0);' onclick="editCard({$id})" class="s-add"><span>新增</span></a>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/goodsvirtuals/virtuals.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){stockByPage()})
|
||||
</script>
|
||||
{/block}
|
127
hyhproject/home/view/default/shops/goodsvirtuals/virtuals.js
Executable file
127
hyhproject/home/view/default/shops/goodsvirtuals/virtuals.js
Executable file
@ -0,0 +1,127 @@
|
||||
function stockByPage(p){
|
||||
$('#list').html('<tr><td colspan="11"><img src="'+WST.conf.ROOT+'/wstmart/home/view/default/img/loading.gif">正在加载数据...</td></tr>');
|
||||
var params = {};
|
||||
params.isUse = $.trim($('#isUse').val());
|
||||
params.cardNo = $.trim($('#cardNo').val());
|
||||
params.id = $.trim($('#vid').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/goodsvirtuals/stockByPage'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1 && json.Rows){
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
stockByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
$('.j-lazyGoodsImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
stockByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function getUseStatus(v){
|
||||
switch(v){
|
||||
case 0:return '未使用';
|
||||
case 1:return '已下单';
|
||||
}
|
||||
}
|
||||
function closeWin(){
|
||||
layer.close(w);
|
||||
}
|
||||
function addCardFunc(id,isContinue){
|
||||
var params =WST.getParams('.j-ipt');
|
||||
params.id = id;
|
||||
params.goodsId = $('#vid').val();
|
||||
if(params.cardNo=='' || params.cardPwd=='' || params.lastDate==''){
|
||||
WST.msg('请输入完整卡券信息',{icon:2});
|
||||
return;
|
||||
}
|
||||
ll = WST.load({msg:'数据处理中,请稍候...'});
|
||||
$.post(WST.U('home/goodsvirtuals/'+((params.id==0)?"add":"edit")),params,function(data){
|
||||
layer.close(ll);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
stockByPage(WSTCurrPage);
|
||||
if(isContinue){
|
||||
$('#cardForm')[0].reset();
|
||||
}else{
|
||||
closeWin();
|
||||
}
|
||||
WST.msg(json.msg, {icon: 1});
|
||||
}else{
|
||||
WST.msg(json.msg, {icon: 2});
|
||||
}
|
||||
});
|
||||
}
|
||||
var ll,w;
|
||||
function editCard(id,goodsId){
|
||||
ll = WST.load({msg:'正在加载信息,请稍候...'});
|
||||
$.post(WST.U('home/goodsvirtuals/'+((id==0)?'toAdd':'toEdit')),{id:id},function(data){
|
||||
layer.close(ll);
|
||||
w = WST.open({
|
||||
type: 1,
|
||||
title:"新增卡券",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['400px', '180px']
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function delCard(id,v){
|
||||
if(v==1){
|
||||
id = WST.getChks('.vchk');
|
||||
id = id.join(',');
|
||||
}
|
||||
var c = WST.confirm({content:'您确定要删除卡券吗?',yes:function(){
|
||||
layer.close(c);
|
||||
var load = WST.load({msg:'正在删除,请稍后...'});
|
||||
$.post(WST.U('home/goodsvirtuals/del'),{ids:id,id:$('#vid').val()},function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#all').prop('checked',false);
|
||||
stockByPage(WSTCurrPage);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
|
||||
var uploading = null;
|
||||
$(function(){
|
||||
var uploader = WST.upload({
|
||||
server:WST.U('home/goodsvirtuals/importCards'),pick:'#importBtn',
|
||||
formData: {dir:'temp',goodsId:$('#vid').val()},
|
||||
callback:function(f,file){
|
||||
layer.close(uploading);
|
||||
uploader.removeFile(file);
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
uploader.refresh();
|
||||
WST.msg('导入数据成功!已导入数据'+json.importNum+"条", {icon: 1});
|
||||
stockByPage(0);
|
||||
}else{
|
||||
WST.msg('导入数据失败,出错原因:'+json.msg, {icon: 5});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
uploading = WST.msg('正在导入数据,请稍后...');
|
||||
}
|
||||
});
|
||||
});
|
61
hyhproject/home/view/default/shops/import.html
Executable file
61
hyhproject/home/view/default/shops/import.html
Executable file
@ -0,0 +1,61 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}数据导入 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>数据导入</span></div>
|
||||
<table class="table table-hover table-striped table-bordered wst-form">
|
||||
<tr>
|
||||
<td colspan='2' style='color:#707070;padding-left:25px;padding-top:5px;'>
|
||||
<div class='wst-tips-box' style='margin-top:10px;'>
|
||||
<div class='icon'></div>
|
||||
<div class='tips' >
|
||||
1.请确保商品价格必须大于0,否则将自动默认为0.01。<br/>
|
||||
2.请确保商品库存不能为负数,否则将自动默认为0。<br/>
|
||||
3.请勿重复上传, 否则将造成重复商品数据。<br/>
|
||||
4.请保证导入的数据在Excel的第一个工作表(Sheet)。<br/>
|
||||
5.若Excel上某一行第一列为空则代表商品数据导入完毕。<br/>
|
||||
6.若没有数据模板,请点击<a href='__STATIC__/template/goods.xls' style='color:blue;' target='_blank'>下载Excel模板</a>。<br/>
|
||||
7.推荐使用谷歌浏览器或者火狐浏览器Firefox以获得更佳体验。<br/>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right' width='90'>商品数据:</th>
|
||||
<td>
|
||||
<div id="filePicker" style='margin-left:0px;'>导入商品数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script>
|
||||
var uploading = null;
|
||||
$(function(){
|
||||
var uploader = WST.upload({
|
||||
server:"{:url('home/imports/importGoods')}",pick:'#filePicker',
|
||||
formData: {dir:'temp'},
|
||||
callback:function(f,file){
|
||||
layer.close(uploading);
|
||||
uploader.removeFile(file);
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
uploader.refresh();
|
||||
WST.msg('导入数据成功!已导入数据'+json.importNum+"条", {icon: 1});
|
||||
}else{
|
||||
WST.msg('导入数据失败,出错原因:'+json.msg, {icon: 5});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
uploading = WST.msg('正在导入数据,请稍后...');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
295
hyhproject/home/view/default/shops/index.html
Executable file
295
hyhproject/home/view/default/shops/index.html
Executable file
@ -0,0 +1,295 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}卖家中心 - {:WSTConf('CONF.mallName')}{__block__}{/block}
|
||||
{block name="css"}
|
||||
<style>
|
||||
.wst-content{min-height:185px;}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='wst-shop-name'><a href='{:Url("home/shops/home","shopId=".$data["shop"]["shopId"])}'>{$data['shop']['shopName']}</a></div>
|
||||
<div class="wst-shop-info">
|
||||
<span class="wst-shop-img">
|
||||
<a href="{:url('home/shops/home',array('shopId'=>$data['shop']['shopId']))}">
|
||||
<img src="__IMGURL__/{:WSTImg($data['shop']['shopImg'])}" title="{$data['shop']['shopName']}" alt="{$data['shop']['shopName']}">
|
||||
</a>
|
||||
</span>
|
||||
<div class="wst-shop-na">
|
||||
<div class="wst-shop-na2">
|
||||
{volist name="$data['shop']['accreds']" id="sv"}
|
||||
<img src="__IMGURL__/{$sv['accredImg']}" title='{$sv['accredName']}' alt='{$sv['accredName']}'>
|
||||
{/volist}
|
||||
</div>
|
||||
<span class="wst-shop-na3">上次登录:{:session('WST_USER.lastTime')}</span>
|
||||
<span class="wst-shop-na3">店铺地址:{:WSTMSubstr($data['shop']['shopAddress'],0,10)}</span>
|
||||
</div>
|
||||
<div class="wst-shop-eva">
|
||||
<p>商品评分</p>
|
||||
<div class="wst-shop-evai">
|
||||
{for start="0" end="$data['shop']['scores']['goodsScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{/for}
|
||||
{for start="1" end="6-$data['shop']['scores']['goodsScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-off.png">
|
||||
{/for}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-shop-eva">
|
||||
<p>时效评分</p>
|
||||
<div class="wst-shop-evai">
|
||||
{for start="0" end="$data['shop']['scores']['timeScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{/for}
|
||||
{for start="1" end="6-$data['shop']['scores']['timeScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-off.png">
|
||||
{/for}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-shop-eva">
|
||||
<p>服务评分</p>
|
||||
<div class="wst-shop-evai">
|
||||
{for start="0" end="$data['shop']['scores']['serviceScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{/for}
|
||||
{for start="1" end="6-$data['shop']['scores']['serviceScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-off.png">
|
||||
{/for}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-shop-con">
|
||||
<p>电话:{$data['shop']['shopTel']}</p>
|
||||
<p>QQ:{$data['shop']['shopQQ']}</p>
|
||||
<p>服务时间:{php}echo date("H:i",strtotime($data['shop']['serviceStartTime']));{/php}-{php}echo date("H:i",strtotime($data['shop']['serviceEndTime']));{/php}</p>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main">
|
||||
<div class="main_middle">
|
||||
<ul class="main_mid_box">
|
||||
<li class="mid_l">
|
||||
<div class="mid_l_item">
|
||||
<div class="main_title">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">订单提示</span>
|
||||
</div>
|
||||
<div class="wst-rfloat">
|
||||
<span class="complain_num">{$data['stat']['complainNum']}</span>
|
||||
<span class="c16_555">收到投诉信息</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="mid_main">
|
||||
<ul class="order_info">
|
||||
<li>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['waitReceiveCnt']}</p>
|
||||
<span class="c14_555">待收货</span>
|
||||
</div>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['waitDeliveryCnt']}</p>
|
||||
<span class="c14_555">待发货</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item_center">
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['orderNeedpayCnt']}</p>
|
||||
<span class="c14_555">待付款</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['cancel']}</p>
|
||||
<span class="c14_555">取消/拒收</span>
|
||||
</div>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['orderRefundCnt']}</p>
|
||||
<span class="c14_555">待退款</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mid_l_item" style="margin-top:20px;">
|
||||
<div class="main_title">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">商品信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="mid_main">
|
||||
<ul class="order_info">
|
||||
<li>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['unSaleCnt']}</p>
|
||||
<span class="c14_555">仓库中</span>
|
||||
</div>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['stockWarnCnt']}</p>
|
||||
<span class="c14_555">预警库存</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item_center item_sale">
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['onSaleCnt']}</p>
|
||||
<span class="c14_555">出售中</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['waitAuditCnt']}</p>
|
||||
<span class="c14_555">待审核</span>
|
||||
</div>
|
||||
<div class="info_item">
|
||||
<p class="c32_e33">{$data['stat']['illegalCnt']}</p>
|
||||
<span class="c14_555">违规商品</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="mid_c">
|
||||
<div class="index-right">
|
||||
<div class="index-right-item">
|
||||
<div class="main_title" style="padding-left:10px;">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">最近七天销售排行</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<ul class="right-list-tit">
|
||||
<li class="c12_555">序号</li>
|
||||
<li class="c12_555">商品</li>
|
||||
<li class="c12_555">数量</li>
|
||||
</ul>
|
||||
{volist name="$data['stat']['goodsTop']" id="glist" key="gkey" length="10"}
|
||||
<ul class="right-list-tit right-list">
|
||||
<li class="c14_ff66">
|
||||
<div class="gTop{$gkey} top-num">{$gkey}</div>
|
||||
</li>
|
||||
<li class="wst-textover"><a class="c14_ff90" target="_blank" href="{:url('home/goods/detail',['id'=>$glist.goodsId])}">{:WSTMSubstr($glist.goodsName,0,15)}</a></li>
|
||||
<li class="c14_ff66">{$glist.goodsNum?:0}</li>
|
||||
</ul>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="mid_r">
|
||||
<div class="mid_r_rtop">
|
||||
<div class="main_title">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">平台联系方式</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="rtop_main">
|
||||
<p class="rtop_item">电话:{:WSTConf('CONF.serviceTel')}</p>
|
||||
<p class="rtop_item">邮箱:{:WSTConf('CONF.serviceEmail')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='mid_r_rbottom'>
|
||||
<div class="main_title">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">商家公告</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="rbottom_main">
|
||||
<ul class="shop_tips">
|
||||
{wst:article cat="51" id="vo" num="10"}
|
||||
<li class="wst-textover"><a href="{:url('home/news/view',['id'=>$vo['articleId']])}" target="_blank">{$vo.articleTitle}</a></li>
|
||||
{/wst:article}
|
||||
</ul>
|
||||
</div>
|
||||
<div style="margin-top: 130px;">
|
||||
<div class="main_title">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">商家访问量</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rbottom_main">
|
||||
<ul class="shop_tips">
|
||||
{volist name="$data['shop']['view']" id="c"}
|
||||
<p class="rtop_item" style="font-size: 15px;">{if $c['path']==1}PC端:{elseif $c['path']==2}APP端:{else}手机端:{/if}{$c['view']}</p>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="sale_info">
|
||||
<div class="main_title">
|
||||
<div class="wst-lfloat">
|
||||
<span class="tit_label"></span>
|
||||
<span class="c16_555">近30天销售情况</span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div id="saleMain" style="width:100%;height:260px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/* 近30天 */}
|
||||
<input type="hidden" id="startDate" class="ipt" value='{:date("Y-m-d",strtotime("-30 day"))}'/>
|
||||
<input type="hidden" id="endDate" class="ipt" value='{:date("Y-m-d")}'/>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
|
||||
<script>
|
||||
$(function(){saleCount()});
|
||||
// 销售统计
|
||||
function saleCount(){
|
||||
$.post(WST.U('home/reports/getStatSales'),WST.getParams('.ipt'),function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
var myChart = echarts.init(document.getElementById('saleMain'));
|
||||
myChart.clear();
|
||||
$('#mainTable').hide();
|
||||
if(json.status=='1' && json.data){
|
||||
var option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
calculable : true,
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : json.data.days
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'销售额',
|
||||
type:'line',
|
||||
data:json.data.dayVals
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
70
hyhproject/home/view/default/shops/logmoneys/list.html
Executable file
70
hyhproject/home/view/default/shops/logmoneys/list.html
Executable file
@ -0,0 +1,70 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}资金流水-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class='money-head'>
|
||||
<div class='shop-logo'><img height='100' width='100' src='__IMGURL__/{:session("WST_USER.shopImg")}'></div>
|
||||
<div class='shop-info'>
|
||||
<div class='shopName'>{:session('WST_USER.shopName')}</div>
|
||||
<div class='shopMoney'>
|
||||
可用资金:<font color='red'>¥{$object['shopMoney']}</font>
|
||||
冻结资金:<font color='red'>¥{$object['lockMoney']}</font>
|
||||
</div>
|
||||
<div class="money-rows">
|
||||
<div class='shopMoney wst-lfloat'>
|
||||
应缴质保金:<font color='red'>¥{$object['deposit']['payDeposit']}</font>
|
||||
店铺质保金:<font color='red'>¥{$object['deposit']['cashDeposit']}</font>
|
||||
质保金:{if $object['deposit']['isFinish'] ==1} <font color='red'>已交齐</font>{else /}<font color='green'>未交齐</font>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>资金流水</li>
|
||||
<li>资金收入</li>
|
||||
<li>资金支出</li>
|
||||
<li>质保金流水</li>
|
||||
</ul>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='150'>来源/用途</th>
|
||||
<th width='100'>金额</th>
|
||||
<th width='130'>日期</th>
|
||||
<th width='100'>外部流水号</th>
|
||||
<th width='*'>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i].dataSrc}}</td>
|
||||
<td>
|
||||
{{# if(d[i].moneyType==1){ }}
|
||||
<span class="money-add">+ ¥{{ d[i].money }}</span>
|
||||
{{# }else{ }}
|
||||
<span class='money-reduce'> - ¥{{ d[i].money }}</span>
|
||||
{{# } }}
|
||||
</td>
|
||||
<td>{{ d[i].createTime }}</td>
|
||||
<td>{{ WST.blank(d[i].tradeNo,'-')}}</td>
|
||||
<td style='line-height:23px'>{{ d[i].remark }}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="page-list"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5' align="center" style='padding:5px 0px 5px 0px'>
|
||||
<div id="pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/logmoneys/logmoneys.js?v={$v}'></script>
|
||||
{/block}
|
77
hyhproject/home/view/default/shops/logmoneys/logmoneys.js
Executable file
77
hyhproject/home/view/default/shops/logmoneys/logmoneys.js
Executable file
@ -0,0 +1,77 @@
|
||||
$(function () {
|
||||
$('#tab').TabPanel({tab:0,callback:function(tab){
|
||||
switch(tab){
|
||||
case 0:pageQuery(0,-1);break;
|
||||
case 1:pageQuery(0,1);break;
|
||||
case 2:pageQuery(0,0);break;
|
||||
case 3:pageDeposit(0,2);break;
|
||||
}
|
||||
}})
|
||||
});
|
||||
function pageQuery(p,type){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
params.type = type;
|
||||
$.post(WST.U('home/logmoneys/pageShopQuery'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#page-list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageQuery(e.curr,type);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//商家质保金流水
|
||||
function pageDeposit(p,type){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
// params.type = type;
|
||||
$.post(WST.U('home/logmoneys/pageShopDeposit'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#page-list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageQuery(e.curr,type);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
81
hyhproject/home/view/default/shops/messages/list.html
Executable file
81
hyhproject/home/view/default/shops/messages/list.html
Executable file
@ -0,0 +1,81 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}首页-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>用户信息</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class='wst-shop-content' style='margin-top:0px;'>
|
||||
<div class="s-menu">
|
||||
<a href="javascript:void(0)" onclick="batchRead()" style='margin-right:0px;float:none;width:60px;display:inline;'>标记为已读</a> |
|
||||
<a href='javascript:void(0);' onclick="batchDel()" style='float:none;width:60px;display:inline;'>删除</a>
|
||||
</div>
|
||||
<div class='wst-page-content'>
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='25'>
|
||||
<div class="checkbox-box-s checkbox-box-s-all">
|
||||
<input class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk')" type='checkbox' id="all"/>
|
||||
<label for="all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th width='45'>状态</th>
|
||||
<th>消息</th>
|
||||
<th width='130'>时间</th>
|
||||
<th width='100'>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="msg" type="text/html">
|
||||
{{# for(var i = 0, len = d.length; i < len; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox-box-s">
|
||||
<input type='checkbox' class='chk wst-checkbox-s' id="chk-{{i}}" value='{{ d[i].id }}' /><label class='mt-1' for="chk-{{i}}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
{{# if(d[i].msgStatus ==1) { }}
|
||||
<div class='readMsg'></div>
|
||||
{{# }else{ }}
|
||||
<div class='newMsg'></div>
|
||||
{{# } }}
|
||||
</td>
|
||||
<td><div class="wst-hide msg-content">{{ d[i].msgContent }}</td>
|
||||
<td>{{ d[i].createTime }}</td>
|
||||
<td>
|
||||
<a class="s-handle" href="javascript:showMsg({{ d[i].id }})">[查看]</a>
|
||||
<a class="s-handle" href="javascript:delMsg(this,{{ d[i].id }})">[删除]</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="msg_box">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='12' align='center'>
|
||||
|
||||
<div id="wst-page" class='wst-page' style="padding-bottom:10px;">
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/messages/message.js?v={$v}'></script>
|
||||
{/block}
|
106
hyhproject/home/view/default/shops/messages/message.js
Executable file
106
hyhproject/home/view/default/shops/messages/message.js
Executable file
@ -0,0 +1,106 @@
|
||||
$(function(){
|
||||
queryByList();
|
||||
});
|
||||
function queryByList(p){
|
||||
var params = {};
|
||||
params.page = p;
|
||||
var load = WST.load({msg:'正在加载信息,请稍后...'})
|
||||
$.post(WST.U('Home/Messages/pageQuery'),params,function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.data){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
queryByList(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('msg').innerHTML;
|
||||
//复选框为未选中状态
|
||||
$('#all').attr('checked',false);
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#msg_box').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'wst-page',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
queryByList(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showMsg(id){
|
||||
location.href=WST.U('home/messages/showShopMsg','msgId='+id);
|
||||
}
|
||||
|
||||
function delMsg(obj,id){
|
||||
WST.confirm({content:"您确定要删除该消息吗?", yes:function(tips){
|
||||
var ll = WST.load('数据处理中,请稍候...');
|
||||
$.post(WST.U('Home/messages/del'),{id:id},function(data,textStatus){
|
||||
layer.close(ll);
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功!', {icon: 1}, function(){
|
||||
queryByList(WSTCurrPage);
|
||||
});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
function batchDel(){
|
||||
var ids = WST.getChks('.chk');
|
||||
if(ids==''){
|
||||
WST.msg('请选择要删除的消息!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
WST.confirm({content:"您确定要删除该消息吗?", yes:function(tips){
|
||||
var params = {};
|
||||
params.ids = ids;
|
||||
var load = WST.load({msg:'请稍后...'});
|
||||
$.post(WST.U('home/messages/batchDel'),params,function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功',{icon:1},function(){
|
||||
queryByList(WSTCurrPage);
|
||||
});
|
||||
}else{
|
||||
WST.msg('操作失败',{icon:5});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
function batchRead(){
|
||||
var ids = WST.getChks('.chk');
|
||||
if(ids==''){
|
||||
WST.msg('请选择处理的消息!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
WST.confirm({content:"您确定要将这些消息标记为已读吗?", yes:function(tips){
|
||||
var params = {};
|
||||
params.ids = ids;
|
||||
var load = WST.load({msg:'请稍后...'});
|
||||
$.post(WST.U('home/messages/batchRead'),params,function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功',{icon:1},function(){
|
||||
queryByList(WSTCurrPage);
|
||||
});
|
||||
}else{
|
||||
WST.msg('操作失败',{icon:5});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
25
hyhproject/home/view/default/shops/messages/show.html
Executable file
25
hyhproject/home/view/default/shops/messages/show.html
Executable file
@ -0,0 +1,25 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}首页-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<style>
|
||||
.msgContent img{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>查看消息</span><a href="<?=url('home/Messages/shopMessage');?>">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-body">
|
||||
<div class='wst-page-content'>
|
||||
<div class='wst-tbar-group'>
|
||||
|
||||
</div>
|
||||
<div class="msgContent">
|
||||
{$data['msgContent']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
{/block}
|
31
hyhproject/home/view/default/shops/orders/box_refund.html
Executable file
31
hyhproject/home/view/default/shops/orders/box_refund.html
Executable file
@ -0,0 +1,31 @@
|
||||
<table class='wst-form' style='margin-top:10px;width:90%'>
|
||||
<tr>
|
||||
<th width='120'>订单号:</th>
|
||||
<td>{$object['orderNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>实付金额:</th>
|
||||
<td>¥{$object['realTotalMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>退款金额:</th>
|
||||
<td style='color:red'>¥{$object['backMoney']}{if $object['ectNum']!=""}<font color='green'>≈{$object['ectNum']}ECT</font>{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>退款积分:</th>
|
||||
<td style='color:red'>{$object['useScore']}个(积分抵扣¥{$object['scoreMoney']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>商家意见:</th>
|
||||
<td>
|
||||
<label><input type='radio' onclick='WST.showHide(0,"#tr")' name='refundStatus' id='refundStatus1' value='1' checked/>同意</label>
|
||||
<label style='margin-left:15px;'><input type='radio' onclick='WST.showHide(1,"#tr")' name='refundStatus' id='refundStatus0' value='-1'/>不同意</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='tr' style='display:none'>
|
||||
<th width='120'>原因<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<textarea id='shopRejectReason' style='width:90%;height:50px;'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
123
hyhproject/home/view/default/shops/orders/complain_detail.html
Executable file
123
hyhproject/home/view/default/shops/orders/complain_detail.html
Executable file
@ -0,0 +1,123 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}投诉详细 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>投诉详细</span></div>
|
||||
|
||||
<div class='wst-shop-content'>
|
||||
<table border='0' class='wst-complain-detail'>
|
||||
<tr>
|
||||
<td colspan='2' class='head'>投诉信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='80'>订单号:</th>
|
||||
<td>{$data['orderNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>投诉类型:</th>
|
||||
<td>
|
||||
{php}$reason = WSTDatas('ORDER_COMPLAINT',$data['complainType']);{/php}
|
||||
{$reason['dataName']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>投诉内容:</th>
|
||||
<td class='line-break'>{$data['complainContent']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign='top'>附件:</th>
|
||||
|
||||
<td id="photos-complain">
|
||||
{volist name="$data['complainAnnex']" id="annex"}
|
||||
<a href="javascript:void(0)">
|
||||
<img layer-src="__IMGURL__/{$annex}" width="100" height="100" src="__IMGURL__/{$annex}?x-oss-process=image/resize,w_300,h_300" />
|
||||
</a>
|
||||
{/volist}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>投诉时间:</th>
|
||||
<td>{$data['complainTime']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
{if condition="$data['needRespond'] eq 1 AND $data['respondContent'] neq ''"}
|
||||
<table border='0' class='wst-complain-detail'>
|
||||
<tr>
|
||||
<td colspan='2' class='head'>应诉信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='80'>应诉内容:</th>
|
||||
<td class='line-break'>{$data['respondContent']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign='top'>附件:</th>
|
||||
<td>
|
||||
<div id="respondAnnex">
|
||||
{volist name="$data['respondAnnex']" id="annex2"}
|
||||
<a href="javascript:void(0)"><img class='lazyImg' src="__IMGURL__/{$annex2}" layer-src="__IMGURL__/{$annex2}" height="100" width="100"/></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>应诉时间:</th>
|
||||
<td>{$data['respondTime']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<table border='0' class='wst-complain-detail' style='margin-top:15px;'>
|
||||
<tr>
|
||||
<td colspan='2' class='head'>仲裁结果</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='80'>仲裁结果:</th>
|
||||
<td>
|
||||
{if condition="$data['complainStatus'] eq 0"}
|
||||
等待处理
|
||||
{elseif condition="$data['complainStatus'] eq 1"/}
|
||||
等待应诉人回应
|
||||
{elseif condition="$data['complainStatus'] eq 2 OR $data['complainStatus'] eq 3"/}
|
||||
等待仲裁
|
||||
{elseif condition="$data['complainStatus'] eq 4"/}
|
||||
已仲裁
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if condition="$data['complainStatus'] eq 4"}
|
||||
<tr>
|
||||
<th valign='top'>仲裁结果:</th>
|
||||
<td class='line-break'>
|
||||
{$data['finalResult']}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if condition="$data['complainStatus'] eq 4"}
|
||||
<tr>
|
||||
<th>仲裁时间:</th>
|
||||
<td>{$data['finalResultTime']} </td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center;'><a href="javascript:history.go(-1)" class="s-btn">返回</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
// 调用图像层
|
||||
layer.photos({
|
||||
photos: '#photos-complain'
|
||||
});
|
||||
layer.photos({
|
||||
photos: '#respondAnnex'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
71
hyhproject/home/view/default/shops/orders/list_complain.html
Executable file
71
hyhproject/home/view/default/shops/orders/list_complain.html
Executable file
@ -0,0 +1,71 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}查看投诉 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
.wst-order-list tbody td{
|
||||
text-align: center;
|
||||
}
|
||||
.wst-order-list tbody tr{
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
<div class="wst-shop-head"><span>投诉订单</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
订单号:<input type='text' class="s-query" id='orderNo'/>
|
||||
<a class="s-btn" onclick="complainByPage()">查询</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单编号</th>
|
||||
<th>投诉方</th>
|
||||
<th>投诉原因</th>
|
||||
<th>投诉时间</th>
|
||||
<th>投诉状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
{{d[i]['orderNo']}}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>{{WST.blank(d[i]['userName'],d[i]['loginName'])}}</td>
|
||||
|
||||
<td title="{{d[i]['complainContent']}}">{{WST.cutStr(d[i]['complainContent'],50)}}</td>
|
||||
|
||||
<td>{{d[i]['complainTime']}}</td>
|
||||
|
||||
<td>{{d[i]['complainStatus']}}</td>
|
||||
|
||||
<td>
|
||||
<a style="cursor:pointer;" onclick="toView({{d[i]['complainId']}})">查看</a>
|
||||
{{# if(d[i]['needReply']==1){ }}<a style="cursor:pointer;" onclick="toRespond({{d[i]['complainId']}})">应诉</a>{{# } }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
complainByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
161
hyhproject/home/view/default/shops/orders/list_delivered.html
Executable file
161
hyhproject/home/view/default/shops/orders/list_delivered.html
Executable file
@ -0,0 +1,161 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}已发货订单 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<style>
|
||||
.order_p{ float: left;}
|
||||
.order_sl{margin-left: 10px;color: #fff;border: 1px solid red;padding: 2px 4px;border-radius: 10px;background-color: #FF247A;}
|
||||
.order_je{margin-left: 10px;color: #fff;border: 1px solid red;padding: 2px 4px;border-radius: 10px;background-color: #FF247A;}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>已发货订单</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
订单号:<input type='text' class="s-ipt" id='orderNo'/>
|
||||
支付方式:<select name="payType" id="payType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">货到付款</option>
|
||||
<option value="1">在线支付</option>
|
||||
</select>
|
||||
|
||||
配送方式:<select name="deliverType" id="deliverType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">送货上门</option>
|
||||
<option value="1">自提</option>
|
||||
</select>
|
||||
|
||||
<a class="s-btn" onclick="deliveredByPage()">查询</a>
|
||||
<a class="s-btn" style="float: right;line-height:16px;height:16px;margin-top:2px;" onclick="javascript:toExport(2,1,'')">导出</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row {{#if(d[i].payType==1){}}j-warn{{#} }}">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}
|
||||
</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class="order_p">
|
||||
{{# if(d[i].orderEctNum >0){ }}
|
||||
<span class="order_sl">ECT支付数量:{{d[i].orderEctNum}}</span>
|
||||
{{# } }}
|
||||
<!-- ECT支付数量:{{d[i].orderEctNum}} -->
|
||||
{{# if(d[i].ectPrice >0){ }}
|
||||
<span class="order_je">ECT金额:{{d[i].ectPrice}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div>{{d[i].status}} </div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{# if(j==0){ }}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverTypeName}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div><a href='#none' onclick='javascript:updateDeliver({{d[i].orderId}})'>【修改运单号】</a></div>
|
||||
<div><a target='blank' href='{{WST.U("home/orders/orderPrint","id="+d[i].orderId)}}'>【打印订单】</a></div>
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">
|
||||
【用户留言】{{d[i].orderRemarks}}
|
||||
</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id='deliverBox' style='display:none'>
|
||||
<form id='deliverForm' autocomplete='off'>
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='80'>快递公司:</th>
|
||||
<td>
|
||||
<select id='expressId'>
|
||||
<option value=''>请选择</option>
|
||||
{volist name="$express" id='vo'}
|
||||
<option value='{$vo["expressId"]}'>{$vo["expressName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>快递号:</th>
|
||||
<td><input type='text' id='expressNo' name="expressNo" maxLength='20' style='width:80%'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
deliveredByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
135
hyhproject/home/view/default/shops/orders/list_failure.html
Executable file
135
hyhproject/home/view/default/shops/orders/list_failure.html
Executable file
@ -0,0 +1,135 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}取消/拒收订单 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>取消/拒收订单</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
订单号:<input type='text' class="s-ipt" id='orderNo'/>
|
||||
支付方式:<select name="payType" id="payType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">货到付款</option>
|
||||
<option value="1">在线支付</option>
|
||||
</select>
|
||||
|
||||
配送方式:<select name="deliverType" id="deliverType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">送货上门</option>
|
||||
<option value="1">自提</option>
|
||||
</select>
|
||||
|
||||
<a class="s-btn" onclick="failureByPage()">查询</a>
|
||||
<a class="s-btn" style="float: right;line-height:16px;height:16px;margin-top:2px;" onclick="javascript:toExport(2,10000,'')">导出</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row {{#if(d[i].payType==1){}}j-warn{{#} }}">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div>{{d[i].status}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{# if(j==0){ }}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverTypeName}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{# if(WST.blank(d[i].refundId)!=''){ }}
|
||||
<div><a href='javascript:void(0)' onclick='refund({{d[i].refundId}})'>【退款操作】</a></div>
|
||||
{{# } }}
|
||||
<div><a target='blank' href='{{WST.U("home/orders/orderPrint","id="+d[i].orderId)}}'>【打印订单】</a></div>
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">
|
||||
【用户留言】{{d[i].orderRemarks}}
|
||||
</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id='failureBox' style='display:none'>
|
||||
<form id='failureForm' autocomplete='off'>
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='80'>不同意原因:</th>
|
||||
<td>
|
||||
<textarea id='content' style='width:90%;height:100px;' maxLength='200'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){failureByPage();})
|
||||
</script>
|
||||
{/block}
|
144
hyhproject/home/view/default/shops/orders/list_finished.html
Executable file
144
hyhproject/home/view/default/shops/orders/list_finished.html
Executable file
@ -0,0 +1,144 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}已收货订单 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<style>
|
||||
.order_p{ float: left;}
|
||||
.order_sl{margin-left: 10px;color: #fff;border: 1px solid red;padding: 2px 4px;border-radius: 10px;background-color: #FF247A;}
|
||||
.order_je{margin-left: 10px;color: #fff;border: 1px solid red;padding: 2px 4px;border-radius: 10px;background-color: #FF247A;}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>已收货订单</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
订单号:<input type='text' class="s-ipt" id='orderNo'/>
|
||||
支付方式:<select name="payType" id="payType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">货到付款</option>
|
||||
<option value="1">在线支付</option>
|
||||
</select>
|
||||
|
||||
配送方式:<select name="deliverType" id="deliverType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">送货上门</option>
|
||||
<option value="1">自提</option>
|
||||
</select>
|
||||
|
||||
<a class="s-btn" onclick="finisedByPage()">查询</a>
|
||||
<a class="s-btn" style='margin-top:0px;line-height:15px;height:16px;float: right;' onclick="javascript:toExport(2,2,'')">导出</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row {{#if(d[i].isAppraise==0){}}j-warn{{#} }}">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">
|
||||
{{d[i].orderCodeTitle}}
|
||||
</span>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
<div class="order_p">
|
||||
{{# if(d[i].orderEctNum >0){ }}
|
||||
<span class="order_sl">ECT支付数量:{{d[i].orderEctNum}}</span>
|
||||
{{# } }}
|
||||
<!-- ECT支付数量:{{d[i].orderEctNum}} -->
|
||||
{{# if(d[i].ectPrice >0){ }}
|
||||
<span class="order_je">ECT金额:{{d[i].ectPrice}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div>{{d[i].status}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{# if(j==0){ }}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverTypeName}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{#if(d[i].isAppraise==1){}}
|
||||
<div style="text-align:center;">已评价</div>
|
||||
{{#}else{}}
|
||||
<div style="text-align:center;">未评价</div>
|
||||
{{#}}}
|
||||
<div><a target='blank' href='{{WST.U("home/orders/orderPrint","id="+d[i].orderId)}}'>【打印订单】</a></div>
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">
|
||||
【用户留言】{{d[i].orderRemarks}}
|
||||
</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
finisedByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
202
hyhproject/home/view/default/shops/orders/list_wait_delivery.html
Executable file
202
hyhproject/home/view/default/shops/orders/list_wait_delivery.html
Executable file
@ -0,0 +1,202 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}待发货订单 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<style>
|
||||
.notice{padding: 3px 6px;color: #e55454}
|
||||
.notice_icon{vertical-align: text-bottom;}
|
||||
.order_p{ float: left;}
|
||||
.order_sl{margin-left: 10px;color: #fff;border: 1px solid red;padding: 2px 4px;border-radius: 10px;background-color: #FF247A;}
|
||||
.order_je{margin-left: 10px;color: #fff;border: 1px solid red;padding: 2px 4px;border-radius: 10px;background-color: #FF247A;}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>待发货订单</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
订单号:<input type='text' class="s-ipt" id='orderNo'/>
|
||||
支付方式:<select name="payType" id="payType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">货到付款</option>
|
||||
<option value="1">在线支付</option>
|
||||
</select>
|
||||
|
||||
配送方式:<select name="deliverType" id="deliverType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">送货上门</option>
|
||||
<option value="1">自提</option>
|
||||
</select>
|
||||
|
||||
<a class="s-btn" onclick="waitDivleryByPage()">查询</a>
|
||||
<a class="s-btn" style="float: right;line-height:16px;height:16px;margin-top:2px;" onclick="javascript:toExport(2,0,'')">导出</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>
|
||||
订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].noticeDeliver==1){ }}
|
||||
<span class="notice">
|
||||
<img class="notice_icon" src="__STYLE__/img/nocite_deliver.png" alt="发货提醒" width="20" height="20" />
|
||||
尽快发货
|
||||
</span>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}
|
||||
</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class="order_p">
|
||||
{{# if(d[i].orderEctNum > 0){ }}
|
||||
<span class="order_sl">ECT支付数量:{{d[i].orderEctNum}}</span>
|
||||
{{# } }}
|
||||
<!-- ECT支付数量:{{d[i].orderEctNum}} -->
|
||||
{{# if(d[i].ectPrice > 0){ }}
|
||||
<span class="order_je">下单ECT金额:{{d[i].ectPrice}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div>
|
||||
{{d[i].status}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
|
||||
</td>
|
||||
{{# if(j==0){ }}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverTypeName}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div><a href='#none' onclick='javascript:deliver({{d[i].orderId}},{{d[i].deliverType}})'>【发货】</a></div>
|
||||
<div><a target='blank' href='{{WST.U("home/orders/orderPrint","id="+d[i].orderId)}}'>【打印订单】</a></div>
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【用户留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id='deliverBox' style='display:none'>
|
||||
<form id='deliverForm' autocomplete='off'>
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='80'>快递公司:</th>
|
||||
<td>
|
||||
<select id='expressId'>
|
||||
<option value=''>请选择</option>
|
||||
{volist name="$express" id='vo'}
|
||||
<option value='{$vo["expressId"]}'>{$vo["expressName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>快递号:</th>
|
||||
<td><input type='text' id='expressNo' maxLength='20' style='width:80%'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div id='editMoneyBox' style='display:none'>
|
||||
<form id='newOrderForm' autocomplete='off'>
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='120'>订单号:</th>
|
||||
<td><span id='m_orderNo'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品总价格:</th>
|
||||
<td>¥<span id='m_goodsMoney'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>运费:</th>
|
||||
<td>¥<span id='m_deliverMoney'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品总价格:</th>
|
||||
<td>¥<span id='m_totalMoney'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>实际支付价格:</th>
|
||||
<td>¥<span id='m_realTotalMoney' class='j-warn-order-money'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>新价格:</th>
|
||||
<td><input type='text' id='m_newOrderMoney' maxLength='10' style='width:150px' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event,true)" onblur='javascript:WST.limitDecimal(this,2)'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
waitDivleryByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
167
hyhproject/home/view/default/shops/orders/list_wait_pay.html
Executable file
167
hyhproject/home/view/default/shops/orders/list_wait_pay.html
Executable file
@ -0,0 +1,167 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}待付款订单 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>待付款订单</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
订单号:<input type='text' class="s-ipt" id='orderNo'/>
|
||||
支付方式:<select name="payType" id="payType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">货到付款</option>
|
||||
<option value="1">在线支付</option>
|
||||
</select>
|
||||
|
||||
配送方式:<select name="deliverType" id="deliverType" class="s-ipt">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="0">送货上门</option>
|
||||
<option value="1">自提</option>
|
||||
</select>
|
||||
|
||||
<a class="s-btn" onclick="waituserPayByPage()">查询</a>
|
||||
<a class="s-btn" style="float: right;line-height:16px;height:16px;margin-top:2px;" onclick="javascript:toExport(2,-2,'')">导出</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div>
|
||||
{{#if(d[i].payType==1){}}
|
||||
{{# if(d[i].isPay==1){}}已支付
|
||||
{{# }else{ }}
|
||||
等待支付
|
||||
{{# } }}
|
||||
{{#}else{}}
|
||||
等待发货
|
||||
{{#} }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
|
||||
</td>
|
||||
{{# if(j==0){ }}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverTypeName}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{#if(d[i].payType==1 && d[i].isPay==0){}}
|
||||
<div><a href='#none' onclick='editOrderMoney({{d[i].orderId}})'>【修改价格】</a></div>
|
||||
{{#}}}
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<p class="order_remaker">【用户留言】{{d[i].orderRemarks}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id='editMoneyBox' style='display:none'>
|
||||
<form id='newOrderForm' autocomplete='off'>
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='120'>订单号:</th>
|
||||
<td><span id='m_orderNo'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品总价格:</th>
|
||||
<td>¥<span id='m_goodsMoney'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>运费:</th>
|
||||
<td>¥<span id='m_deliverMoney'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>商品总价格:</th>
|
||||
<td>¥<span id='m_totalMoney'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>实际支付价格:</th>
|
||||
<td>¥<span id='m_realTotalMoney' class='j-warn-order-money'></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>新价格:</th>
|
||||
<td><input type='text' id='m_newOrderMoney' maxLength='10' style='width:150px' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event,true)" onblur='javascript:WST.limitDecimal(this,2)'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
waituserPayByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
423
hyhproject/home/view/default/shops/orders/orders.js
Executable file
423
hyhproject/home/view/default/shops/orders/orders.js
Executable file
@ -0,0 +1,423 @@
|
||||
function waituserPayByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-ipt');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/waituserPayByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
waituserPayByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
waituserPayByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function waitDivleryByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-ipt');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/waitDeliveryByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
waitDivleryByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
waitDivleryByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function deliveredByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-ipt');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/deliveredByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
waitDivleryByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
deliveredByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function editOrderMoney(id){
|
||||
var ll = WST.load({msg:'正在加载记录,请稍候...'});
|
||||
$.post(WST.U('home/orders/getMoneyByOrder'),{id:id},function(data){
|
||||
layer.close(ll);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0 && json.data){
|
||||
var tmp = json.data;
|
||||
$('#m_orderNo').html(tmp.orderNo);
|
||||
$('#m_goodsMoney').html(tmp.goodsMoney);
|
||||
$('#m_deliverMoney').html(tmp.deliverMoney);
|
||||
$('#m_totalMoney').html(tmp.totalMoney);
|
||||
$('#m_realTotalMoney').html(tmp.realTotalMoney);
|
||||
WST.open({type: 1,title:"修改订单价格",shade: [0.6, '#000'],border: [0],
|
||||
content: $('#editMoneyBox'),area: ['550px', '320px'],btn: ['确定','取消'],
|
||||
yes:function(index, layero){
|
||||
var newOrderMoney = $('#m_newOrderMoney').val();
|
||||
WST.confirm({content:'您确定修改后的订单价格为¥<span class="j-warn-order-money">'+newOrderMoney+'</span>吗?',yes:function(cf){
|
||||
var ll = WST.load({msg:'正在提交信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/editOrderMoney'),{id:id,orderMoney:newOrderMoney},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
$('#newOrderMoney').val();
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waituserPayByPage(WSTCurrPage);
|
||||
layer.close(cf);
|
||||
layer.close(index);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function deliver(id,deliverType){
|
||||
if(deliverType==1){
|
||||
WST.confirm({content:"您确定用户已提货了吗?", yes:function(tips){
|
||||
var ll = WST.load('数据处理中,请稍候...');
|
||||
$.post(WST.U('home/orders/deliver'),{id:id,expressId:0,expressNo:''},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waitDivleryByPage(WSTCurrPage);
|
||||
layer.close(tips);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}else{
|
||||
WST.open({type: 1,title:"请输入发货快递信息",shade: [0.6, '#000'], border: [0],
|
||||
content: $('#deliverBox'),area: ['350px', '180px'],btn: ['确定发货','取消'],
|
||||
yes:function(index, layero){
|
||||
var ll = WST.load({msg:'正在提交信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/deliver'),{id:id,expressId:$('#expressId').val(),expressNo:$('#expressNo').val()},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
$('#deliverForm')[0].reset();
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waitDivleryByPage(WSTCurrPage);
|
||||
layer.close(index);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateDeliver(orderId){
|
||||
WST.open({type: 1,title:"请输入修改快递信息",shade: [0.6, '#000'], border: [0],
|
||||
content: $('#deliverBox'),area: ['350px', '180px'],btn: ['确定修改','取消'],
|
||||
yes:function(index, layero){
|
||||
var ll = WST.load({msg:'正在提交信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/updateDeliver'),{orderId:orderId,expressId:$('#expressId').val(),expressNo:$('#expressNo').val()},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
$('#deliverForm')[0].reset();
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waitDivleryByPage(WSTCurrPage);
|
||||
layer.close(index);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function finisedByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-ipt');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/finishedByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
$('.order_remaker').remove();
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
finisedByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function failureByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-ipt');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/failureByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
$('.order_remaker').remove();
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
failureByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function refund(id){
|
||||
var ll = WST.load({msg:'正在加载信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/toShopRefund'),{id:id},function(data){
|
||||
layer.close(ll);
|
||||
var w = WST.open({
|
||||
type: 1,
|
||||
title:"退款操作",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['500px', '320px'],
|
||||
btn: ['提交', '关闭窗口'],
|
||||
yes: function(index, layero){
|
||||
var params = {};
|
||||
params.refundStatus = $('#refundStatus1')[0].checked?1:-1;
|
||||
params.content = $.trim($('#shopRejectReason').val());
|
||||
params.id = id;
|
||||
if(params.refundStatus==-1 && params.content==''){
|
||||
WST.msg('请输入不同意原因',{icon:2});
|
||||
return;
|
||||
}
|
||||
ll = WST.load({msg:'数据处理中,请稍候...'});
|
||||
$.post(WST.U('home/orderrefunds/shoprefund'),params,function(data){
|
||||
layer.close(ll);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg, {icon: 1});
|
||||
layer.close(w);
|
||||
failureByPage(WSTCurrPage);
|
||||
}else{
|
||||
WST.msg(json.msg, {icon: 2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function view(id){
|
||||
location.href=WST.U('home/orders/view','id='+id);
|
||||
}
|
||||
|
||||
|
||||
/********** 订单投诉列表 ***********/
|
||||
function toView(id){
|
||||
location.href=WST.U('home/ordercomplains/getShopComplainDetail',{'id':id});
|
||||
}
|
||||
function toRespond(id){
|
||||
location.href=WST.U('home/ordercomplains/respond',{'id':id});
|
||||
}
|
||||
|
||||
function complainByPage(p){
|
||||
$('#list').html('<img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/ordercomplains/queryShopComplainByPage'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1 && json.data){
|
||||
var json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
complainByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/************ 应诉页面 ************/
|
||||
function respondInit(){
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
// 调用图像层
|
||||
layer.photos({
|
||||
photos: '#photos-complain'
|
||||
});
|
||||
|
||||
var uploader =WST.upload({
|
||||
pick:'#filePicker',
|
||||
formData: {dir:'complains',isThumb:1},
|
||||
fileNumLimit:5,
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f,file){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
var tdiv = $("<div style='width:75px;float:left;margin-right:5px;'>"+
|
||||
"<img class='respond_pic"+"' width='75' height='75' src='"+WST.conf.IMGURL+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></div>");
|
||||
var btn = $('<div style="position:relative;top:-80px;left:60px;cursor:pointer;" ><img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_error.png"></div>');
|
||||
tdiv.append(btn);
|
||||
$('#picBox').append(tdiv);
|
||||
btn.on('click','img',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
||||
function saveRespond(historyURL){
|
||||
$('#respondForm').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
var img = [];
|
||||
$('.respond_pic').each(function(){
|
||||
img.push($(this).attr('v'));
|
||||
});
|
||||
params.respondAnnex = img.join(',');
|
||||
$.post(WST.U('home/orderComplains/saveRespond'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('您的应诉已提交,请留意信息回复', {icon: 6},function(){
|
||||
location.href = WST.U('home/ordercomplains/shopComplain');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//导出订单
|
||||
function toExport(typeId,status,type){
|
||||
var params = {};
|
||||
params = WST.getParams('.s-ipt');
|
||||
params.typeId = typeId;
|
||||
params.orderStatus = status;
|
||||
params.type = type;
|
||||
var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
|
||||
layer.close(box);
|
||||
location.href=WST.U('home/orders/toExport',params);
|
||||
}});
|
||||
}
|
110
hyhproject/home/view/default/shops/orders/print.html
Executable file
110
hyhproject/home/view/default/shops/orders/print.html
Executable file
@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>订单打印 - {:WSTConf('CONF.mallName')}</title>
|
||||
</head>
|
||||
<style>
|
||||
body{font-size:13px;}
|
||||
td,th{padding:2px;}
|
||||
</style>
|
||||
<body>
|
||||
<table width='100%' border='0'>
|
||||
<tr>
|
||||
<td colspan='8' style='text-align:center;font-weight:bold;font-size:26px'>订单信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='100' align="right">下单时间:</td>
|
||||
<td width='250'>{$object['createTime']}</td>
|
||||
<td width='100' align="right">支付方式:</td>
|
||||
<td width='250'>{:WSTLangPayType($object['payType'])}</td>
|
||||
<td width='100' align="right">订单编号:</td>
|
||||
<td width='250'>{$object['orderNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='100' align="right">发货时间:</td>
|
||||
<td>{$object['deliveryTime']}</td>
|
||||
<td width='100' align="right">配送方式:</td>
|
||||
<td>{:WSTLangDeliverType($object['deliverType'])}</td>
|
||||
<td width='100' align="right">快递单号:</td>
|
||||
<td>{$object['expressNo']}</td>
|
||||
</tr>
|
||||
{if $object['invoiceClient'] !=''}
|
||||
<tr>
|
||||
<td width='100' align="right">发票抬头:</td>
|
||||
<td colspan="6">{$object['invoiceClient']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if ($object['orderType']==0)}
|
||||
<tr>
|
||||
<td width='100' align="right">收货地址:</td>
|
||||
<td colspan="6">{$object['userName']} | {$object['userPhone']} | {$object['userAddress']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $object['orderRemarks']!=''}
|
||||
<tr>
|
||||
<td width='100' align="right">订单备注:</td>
|
||||
<td colspan="6">{$object['orderRemarks']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
<table width='100%' border='1' style='border-collapse:collapse;border-color:#000;'>
|
||||
<tr style='background:#cccccc;'>
|
||||
<th align="left">商品名称</th>
|
||||
<th align="left">商品规格</th>
|
||||
<th align="left" align="left">商品价格</th>
|
||||
<th align="left">商品数量</th>
|
||||
<th align="left">小计</th>
|
||||
</tr>
|
||||
{volist name='$object["goods"]' id='vo2'}
|
||||
<tr>
|
||||
<td>{$vo2["goodsName"]}</td>
|
||||
<td>
|
||||
{if $vo2['goodsType']==1 && $object['orderStatus']==2}
|
||||
<table width='100%'>
|
||||
{volist name='$vo2["extraJson"]' id='vgcard'}
|
||||
<tr>
|
||||
<td>卡券号:{$vgcard['cardNo']}</td>
|
||||
<td>卡券密码:{$vgcard['cardPwd']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
{else}
|
||||
{:str_replace('@@_@@',';',$vo2["goodsSpecNames"])}
|
||||
{/if}
|
||||
</td>
|
||||
<td>¥{$vo2['goodsPrice']}</td>
|
||||
<td>{$vo2['goodsNum']}</td>
|
||||
<td>¥{$vo2['goodsPrice']*$vo2['goodsNum']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
<table width='100%' border='0'>
|
||||
<tr>
|
||||
<td colspan='6' align="right">商品总金额:¥{$object['goodsMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='6' align="right">运费:¥{$object['deliverMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='6' align="right">应付金额:¥{$object['totalMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='6' align="right">积分抵扣金额:¥-{$object['scoreMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='6' align="right">实付金额:¥{$object['realTotalMoney']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td>商家:{$object['shopName']} 电话:{$object['shopTel']}</td>
|
||||
<td align="right">打印时间:{:date('Y-m-d H:i:s')}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
<script>
|
||||
window.print();
|
||||
</script>
|
||||
</html>
|
113
hyhproject/home/view/default/shops/orders/respond.html
Executable file
113
hyhproject/home/view/default/shops/orders/respond.html
Executable file
@ -0,0 +1,113 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}应诉 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
.webuploader-pick {
|
||||
background: #f7375c;
|
||||
height:30px;
|
||||
}
|
||||
</style>
|
||||
<div class="wst-shop-head"><span>应诉</span></div>
|
||||
|
||||
<div class='wst-shop-content'>
|
||||
<form id="respondForm" method="post" >
|
||||
<div style='width:990px;overflow:hidden;'>
|
||||
<input type='hidden' id='complainId' class='ipt' value="{$data['complainId']}"/>
|
||||
<div class='wst-complain-left'>
|
||||
<div class='wst-complain-order-head'>订单商品</div>
|
||||
<div class='wst-complain-order-goods'>
|
||||
{volist name="$data['goodsList']" id="goods" key='key2'}
|
||||
<a target='_blank' href="{:Url('Home/Goods/Detail',array('id'=>$goods['goodsId']))}" title="{$goods['goodsName']}">
|
||||
<img data-original="__IMGURL__/{$goods['goodsImg']}" height="55" width="55" class='gImg'/>
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
<div class='wst-complain-order-head'>订单信息</div>
|
||||
<div class='wst-complain-order-info'>
|
||||
<dl>
|
||||
<dt>订单编号:</dt>
|
||||
<dd>{$data['orderNo']}</dd>
|
||||
<dt>订单金额:</dt>
|
||||
<dd>¥{$data['realTotalMoney']}</dd>
|
||||
<dt>运 费:</dt>
|
||||
<dd>¥{$data['deliverMoney']}</dd>
|
||||
<dt>下单时间:</dt>
|
||||
<dd>{$data['createTime']}</dd>
|
||||
<dt>商 家:</dt>
|
||||
<dd>{$data['shopName']}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-complain-main'>
|
||||
<div class='wst-complain-order-head' style='width:735px;'>投诉信息</div>
|
||||
<div class='wst-complain-box'>
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td width='70' align='right'>投诉类型:</td>
|
||||
<td>
|
||||
{php}$reason = WSTDatas('ORDER_COMPLAINT',$data['complainType']);{/php}
|
||||
{$reason['dataName']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='right'>详情:</td>
|
||||
<td class='line-break'>{$data['complainContent']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='right'>附件:</td>
|
||||
<td>
|
||||
<div id="photos-complain">
|
||||
{if !empty($data['complainAnnex'])}
|
||||
{volist name="$data['complainAnnex']" id="annex"}
|
||||
<img class='lazyImg' layer-src="__IMGURL__/{$annex}" data-original="__IMGURL__/{$annex}" src="__IMGURL__/{$annex}" height="100" width="100"/>
|
||||
{/volist}
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class='wst-complain-order-head' style='width:735px;'>应诉信息</div>
|
||||
<div class='wst-complain-box'>
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea id='respondContent' name="respondContent" class='ipt' autocomplete="off" style='width:700px;height:162px;' placeholder='请输入应诉内容' data-rule='应诉内容:required;' data-target='#msg_respondContent'></textarea><br/>
|
||||
<div class='msg-box' id='msg_respondContent'></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="filePicker" style='margin-left:0px;overflow:hidden;height:25px;magin-left:5px;'>上传附件(最多5张)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='picBox' style='height:120px;width:710px;padding:5px;'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-complain-footer'>
|
||||
<a href="javascript:saveRespond()" class="s-btn">提交</a>
|
||||
<a href="javascript:location.href='{:url('home/ordercomplains/shopComplain')}'" class="s-btn">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
respondInit();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
247
hyhproject/home/view/default/shops/orders/view.html
Executable file
247
hyhproject/home/view/default/shops/orders/view.html
Executable file
@ -0,0 +1,247 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}订单详情 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>订单详情</span><a href="javascript:history.go(-1)">返回</a></div>
|
||||
<div class='wst-shop-content'>
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>日志信息</div>
|
||||
{if in_array($object['orderStatus'],[-2,0,1,2])}
|
||||
<div class='log-box'>
|
||||
<div class="state">
|
||||
{if $object['payType']==1}
|
||||
<div class="icon">
|
||||
<span class="icons {if condition="($object['orderStatus']==-2)OR($object['orderStatus']==0)OR($object['orderStatus']==1)OR($object['orderStatus']==2)"}icon12 {else}icon11 {/if}{if condition="($object['orderStatus']==-2)"}icon13 {/if}"></span>
|
||||
</div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==0) OR ($object['orderStatus']==1) OR ($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
<div class="icon"><span class="icons {if condition="($object['orderStatus']==0)OR($object['orderStatus']==1)OR($object['orderStatus']==2)"}icon22 {else}icon21{/if}{if condition="($object['orderStatus']==0)"}icon23 {/if}"></span></div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==1) OR ($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
{else}
|
||||
<div class="icon">
|
||||
<span class="icons {if condition="($object['orderStatus']==-2)OR($object['orderStatus']==0)OR($object['orderStatus']==1)OR($object['orderStatus']==2)"}icon12 {else}icon11 {/if}{if condition="($object['orderStatus']==0)"}icon13 {/if}"></span>
|
||||
</div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==1) OR ($object['orderStatus']==2)"}arrow2{/if}">················></div>
|
||||
{/if}
|
||||
<div class="icon">
|
||||
<span class="icons {if condition="($object['orderStatus']==1)OR($object['orderStatus']==2)OR($object['orderStatus']==1)"}icon32 {else}icon31 {/if}{if condition="($object['orderStatus']==1)"}icon33 {/if}"></span>
|
||||
</div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
<div class="icon"><span class="icons {if condition="($object['orderStatus']==2)AND($object['isAppraise']==1)"}icon42 {else}icon41 {/if}{if condition="($object['orderStatus']==2)AND($object['isAppraise']==0)"}icon43 {/if}"></span></div>
|
||||
<div class="arrow {if condition="($object['isAppraise']==1)"}arrow2{/if}">··················></div>
|
||||
<div class="icon"><span class="icons {if condition="($object['isAppraise']==1)"}icon53 {else}icon51 {/if}"></span></div>
|
||||
</div>
|
||||
<div class="state2">
|
||||
<div class="path">
|
||||
{volist name="$object['log']" id="lo"}
|
||||
<span>{$lo['logContent']}<br/>{$lo['logTime']}</span>
|
||||
{/volist}
|
||||
</div>
|
||||
<p>下单</p>{if $object['payType']==1}<p>等待支付</p>{/if}<p>商家发货</p><p>确认收货</p><p>订单结束<br/>双方互评</p>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{else}
|
||||
<div>
|
||||
<table class='log'>
|
||||
{volist name='$object["log"]' id='vo'}
|
||||
<tr>
|
||||
<td>{$vo['logTime']}</td>
|
||||
<td>{$vo['logContent']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- 订单信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>订单信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>订单编号:</th>
|
||||
<td>{$object['orderNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>支付方式:</th>
|
||||
<td>{:WSTLangPayType($object['payType'])}</td>
|
||||
</tr>
|
||||
{if($object['payType']==1 && $object['isPay']==1)}
|
||||
<tr>
|
||||
<th>支付时间:</th>
|
||||
<td>{$object['payTime']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>支付信息:</th>
|
||||
<td>【{:WSTLangPayFrom($object['payFrom'])}】{$object['tradeNo']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th>配送方式:</th>
|
||||
<td>
|
||||
{:WSTLangDeliverType($object['deliverType'])}
|
||||
</td>
|
||||
</tr>
|
||||
{if $object['expressNo']!=''}
|
||||
<tr>
|
||||
<th>快递公司:</th>
|
||||
<td>{$object['expressName']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>快递号:</th>
|
||||
<td>{$object['expressNo']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th>买家留言:</th>
|
||||
<td>{$object['orderRemarks']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{:hook('homeDocumentOrderView',['orderId'=>$object['orderId']])}
|
||||
|
||||
{if $object['isRefund']==1}
|
||||
<!-- 退款信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>退款信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>退款金额:</th>
|
||||
<td>¥{$object['backMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='100'>退款备注:</th>
|
||||
<td>{$object['refundRemark']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>退款时间:</th>
|
||||
<td>{$object['refundTime']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- 发票信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>发票信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>是否需要发票:</th>
|
||||
<td>{if $object['isInvoice']==1}需要{else}不需要{/if}</td>
|
||||
</tr>
|
||||
{if $object['isInvoice']==1}
|
||||
{php}$invoiceArr = json_decode($object['invoiceJson'],true);{/php}
|
||||
<tr>
|
||||
<th>发票抬头:</th>
|
||||
<td>
|
||||
{if $object['isInvoice']==1}
|
||||
{$invoiceArr['invoiceHead']}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if isset($invoiceArr['invoiceCode'])}
|
||||
<tr>
|
||||
<th>发票税号:</th>
|
||||
<td>
|
||||
{$invoiceArr['invoiceCode']}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
<!-- 收货人信息 -->
|
||||
{if ($object['orderType']==0)}
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>收货人信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>收货人:</th>
|
||||
<td>{$object['userName']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>收货地址:</th>
|
||||
<td>{$object['userAddress']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系方式:</th>
|
||||
<td>{$object['userPhone']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- 商品信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>商品清单</div>
|
||||
<div class='goods-head'>
|
||||
<div class='goods'>商品</div>
|
||||
<div class='number'>商品编号</div>
|
||||
<div class='price'>单价</div>
|
||||
<div class='num'>数量</div>
|
||||
<div class='t-price'>总价</div>
|
||||
</div>
|
||||
<div class='goods-item'>
|
||||
<div class='shop'>
|
||||
{$object['shopName']}
|
||||
{if $object['shopQQ'] !=''}
|
||||
<a href="tencent://message/?uin={$object['shopQQ']}&Site=QQ交谈&Menu=yes">
|
||||
<img border="0" style='vertical-align:middle;' src="http://wpa.qq.com/pa?p=1:{$object['shopQQ']}:7" alt="QQ交谈" width="71" height="24" />
|
||||
</a>
|
||||
{/if}
|
||||
{if $object['shopWangWang'] !=''}
|
||||
<a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid={$object['shopWangWang']}&siteid=cntaobao&status=1&charset=utf-8">
|
||||
<img border="0" style='vertical-align:middle;' src="http://amos.alicdn.com/realonline.aw?v=2&uid={$object['shopWangWang']}&site=cntaobao&s=1&charset=utf-8" alt="和我联系" />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class='goods-list'>
|
||||
{volist name='$object["goods"]' id='vo2'}
|
||||
{:hook('homeDocumentOrderViewGoodsPromotion',['goods'=>$vo2])}
|
||||
<div class='item j-g{$vo2['goodsId']}'>
|
||||
<div class='goods'>
|
||||
<div class='img'>
|
||||
<a href='{:Url("home/goods/detail","id=".$vo2["goodsId"])}' target='_blank'>
|
||||
<img src='__IMGURL__/{$vo2["goodsImg"]}' width='80' height='80' title='{$vo2["goodsName"]}'/>
|
||||
</a>
|
||||
</div>
|
||||
<div class='name'>{if $vo2['goodsCode']=='gift'}【赠品】{/if}{$vo2["goodsName"]}</div>
|
||||
<div class='spec'>{:str_replace('@@_@@','<br/>',$vo2["goodsSpecNames"])}</div>
|
||||
</div>
|
||||
<div class="number">{$vo2['goodsSn']}</div>
|
||||
<div class='price'>¥{$vo2['goodsPrice']}</div>
|
||||
<div class='num'>{$vo2['goodsNum']}</div>
|
||||
<div class='t-price'>¥{$vo2['goodsPrice']*$vo2['goodsNum']}</div>
|
||||
<div class='wst-clear'></div>
|
||||
</div>
|
||||
{if $vo2['goodsType']==1 && $object['orderStatus']==2}
|
||||
<table width='100%' style='margin-top:5px;'>
|
||||
{volist name='$vo2["extraJson"]' id='vgcard'}
|
||||
<tr>
|
||||
<td>卡券号:{$vgcard['cardNo']}</td>
|
||||
<td>卡券密码:{$vgcard['cardPwd']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
{/if}
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
<div class='goods-footer'>
|
||||
<div class='goods-summary' style='text-align:right'>
|
||||
<div class='summary'>商品总金额:¥<span>{$object['goodsMoney']}</span></div>
|
||||
<div class='summary'>运费:¥<span>{$object['deliverMoney']}</span></div>
|
||||
<div class='summary line'>应付总金额:¥<span>{$object['totalMoney']}</span></div>
|
||||
<div class='summary'>积分抵扣金额:¥-<span>{$object['scoreMoney']}</span></div>
|
||||
{if condition="$object['useScore'] gt 0"}
|
||||
<div class='summary '>使用积分数:<span>{$object['useScore']}个</span></div>
|
||||
{/if}
|
||||
{:hook('homeDocumentOrderSummaryView',['order'=>$object])}
|
||||
<div class='summary'>实付总金额:¥<span>{$object['realTotalMoney']}</span></div>
|
||||
<div>可获得积分:<span class='orderScore'>{$object["orderScore"]}</span>个</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
{/block}
|
72
hyhproject/home/view/default/shops/recharge/pay_step1.html
Executable file
72
hyhproject/home/view/default/shops/recharge/pay_step1.html
Executable file
@ -0,0 +1,72 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}资金管理-充值{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STYLE__/css/recharge.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>充值</span></div>
|
||||
<div class='wst-shop-content'>
|
||||
<div class='pay-sbox'>
|
||||
<div>
|
||||
<div>
|
||||
<div class='wst-tips-box'>
|
||||
<div class='icon'></div>
|
||||
<div class='tips'>
|
||||
1.充值金额和赠送金额只能用于购买商品,不能提现;<br/>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-form">
|
||||
<div class="pay-type">充值金额
|
||||
<div>
|
||||
<div class="wst-list-box">
|
||||
{volist name="chargeItems" id="item"}
|
||||
<div class="wst-frame2 {$key} " onclick="javascript:changeSelected({$item['id']},'itmeId',this)">
|
||||
{if condition="$item['giveMoney'] gt 0"}
|
||||
<div class='charge-doub'>充值 <span class="charge-money">{$item['chargeMoney']}</span> 元</div>
|
||||
<div>送 {$item['giveMoney']} 元</div>
|
||||
{else/}
|
||||
<div class='charge-alone'>充值 <span class="charge-money">{$item['chargeMoney']}</span> 元</div>
|
||||
{/if}
|
||||
<i></i>
|
||||
</div>
|
||||
{/volist}
|
||||
<div class="wst-frame2 " onclick="javascript:changeSelected(0,'itmeId',this)">
|
||||
<div class='charge-alone'>
|
||||
<span class="j-charge-other">其他金额</span>
|
||||
<span class="j-charge-money"><input class="charge-othermoney j-ipt" id="needPay" value="1" maxlength="10" data-rule="充值金额:required;" onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)" maxlength="8"></span>
|
||||
</div>
|
||||
<i></i>
|
||||
</div>
|
||||
<input type="hidden" value="" id='itmeId' class='j-ipt' />
|
||||
<div class='wst-clear'></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><div></div>
|
||||
<div>
|
||||
|
||||
<div class="pay-type">选择支付方式</div>
|
||||
<div class="pay-list">
|
||||
<input type="hidden" id="payCode" name="payCode" />
|
||||
{volist name="payments" id="payment"}
|
||||
{if condition="$payment['isOnline'] eq 1"}
|
||||
<div class="wst-payCode-{$payment['payCode']}" data="{$payment['payCode']}"></div>
|
||||
{/if}
|
||||
{/volist}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="bnt-box">
|
||||
<div onclick='javascript:getPayUrl();' class="wst-pay-bnt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/recharge/recharge.js?v={$v}'></script>
|
||||
{/block}
|
||||
|
53
hyhproject/home/view/default/shops/recharge/pay_step2.html
Executable file
53
hyhproject/home/view/default/shops/recharge/pay_step2.html
Executable file
@ -0,0 +1,53 @@
|
||||
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}资金管理-充值{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STYLE__/css/recharge.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='wst-user-content'>
|
||||
|
||||
<div class="pay-sbox-head">
|
||||
<div class="wst-shop-head"><span>充值</span></div>
|
||||
</div>
|
||||
<div style="padding-top: 27px;">
|
||||
<div class="pay-tip2"></div>
|
||||
</div>
|
||||
<div class='pay-sbox' >
|
||||
<div class="qrcode-box">
|
||||
<div class="pbox">
|
||||
请您扫描以下二维码,钱包充值金额:<span class="wst-fred">¥{$needPay}</span>
|
||||
</div>
|
||||
<div style="" class="wst-qrcode"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/js/qrcode.js?v={$v}'></script>
|
||||
<script>
|
||||
{if condition="$out_trade_no != '' and $code_url!=''"}
|
||||
var qr = qrcode(10, 'M');
|
||||
qr.addData("{$code_url}");
|
||||
qr.make();
|
||||
$(".wst-qrcode").html(qr.createImgTag());
|
||||
|
||||
{/if}
|
||||
setInterval(function(){
|
||||
var params = {};
|
||||
params.trade_no = "{$out_trade_no}";
|
||||
|
||||
$.ajax({
|
||||
url:"{:url('home/weixinpays/getPayStatus')}",
|
||||
data:params,
|
||||
type:"POST",
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
location.href = "{:url('home/logmoneys/shopmoneys')}";
|
||||
}
|
||||
}
|
||||
});
|
||||
},1500);
|
||||
</script>
|
||||
{/block}
|
58
hyhproject/home/view/default/shops/recharge/recharge.js
Executable file
58
hyhproject/home/view/default/shops/recharge/recharge.js
Executable file
@ -0,0 +1,58 @@
|
||||
|
||||
function getPayUrl(){
|
||||
var params = {};
|
||||
params.payObj = "recharge";
|
||||
params.targetType = 1;
|
||||
params.needPay = $.trim($("#needPay").val());
|
||||
params.payCode = $.trim($("#payCode").val());
|
||||
params.itmeId = $.trim($("#itmeId").val());
|
||||
if(params.itmeId==0 && params.needPay<=0){
|
||||
WST.msg('请输入充值金额', {icon: 5});
|
||||
return;
|
||||
}
|
||||
if(params.payCode==""){
|
||||
WST.msg('请先选择支付方式', {icon: 5});
|
||||
return;
|
||||
}
|
||||
jQuery.post(WST.U('home/'+params.payCode+'/get'+params.payCode+"URL"),params,function(data) {
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
location.href = json.url;
|
||||
}else{
|
||||
WST.msg('充值失败', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function inEffect(obj,n){
|
||||
$(obj).addClass('j-selected').siblings('.wst-frame'+n).removeClass('j-selected');
|
||||
}
|
||||
function changeSelected(n,index,obj){
|
||||
$('#'+index).val(n);
|
||||
if(n==0){
|
||||
$(".j-charge-other").hide();
|
||||
$(".j-charge-money").show();
|
||||
|
||||
}else{
|
||||
$(".j-charge-other").show();
|
||||
$(".j-charge-money").hide();
|
||||
}
|
||||
inEffect(obj,2);
|
||||
}
|
||||
$(function(){
|
||||
$(".wst-frame2:first").click();
|
||||
$("#wst-check-orders").click(function(){
|
||||
$("#wst-orders-box").slideToggle(600);
|
||||
});
|
||||
$("div[class^=wst-payCode]").click(function(){
|
||||
var payCode = $(this).attr("data");
|
||||
$("div[class^=wst-payCode]").each(function(){
|
||||
$(this).removeClass().addClass("wst-payCode-"+$(this).attr("data"));
|
||||
});
|
||||
$(this).removeClass().addClass("wst-payCode-"+payCode+"-curr");
|
||||
$("#payCode").val(payCode);
|
||||
});
|
||||
if($("div[class^=wst-payCode]").length>0){
|
||||
$("div[class^=wst-payCode]")[0].click();
|
||||
}
|
||||
});
|
46
hyhproject/home/view/default/shops/reports/stat_orders.html
Executable file
46
hyhproject/home/view/default/shops/reports/stat_orders.html
Executable file
@ -0,0 +1,46 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}销售订单统计 - 卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
.wst-list tbody tr td {height: 35px;line-height: 35px;}
|
||||
</style>
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>销售订单统计</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
日期:<input type='text' class="laydate-icon j-ipt" id='startDate' onclick="laydate()" value='{$startDate}'/>至
|
||||
<input type='text' class="laydate-icon j-ipt" id='endDate' onclick="laydate()" value='{$endDate}'/>
|
||||
<a class="s-btn" onclick="loadStat()">查询</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<div id='main' style='height:300px;width:99%'></div>
|
||||
<table id='mainTable' class='wst-list hide' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='20'> </th>
|
||||
<th width='100'>日期</th>
|
||||
<th width='100'>取消订单</th>
|
||||
<th width='130'>拒收订单</th>
|
||||
<th width='130'>正常订单</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list-box'></tbody>
|
||||
<script id="stat-tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{(i+1)}}</td>
|
||||
</td>
|
||||
<td>{{ d[i].day }}</td>
|
||||
<td>{{ d[i].o3 }}</td>
|
||||
<td>{{ d[i].o1 }}</td>
|
||||
<td>{{ d[i].ou }}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
|
||||
<script src="__STATIC__/plugins/layer/laydate.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/reports/stat_orders.js?v={$v}'></script>
|
||||
{/block}
|
103
hyhproject/home/view/default/shops/reports/stat_orders.js
Executable file
103
hyhproject/home/view/default/shops/reports/stat_orders.js
Executable file
@ -0,0 +1,103 @@
|
||||
function loadStat(){
|
||||
var loading = WST.load({msg:'正在查询数据,请稍后...'});
|
||||
$.post(WST.U('home/reports/getStatOrders'),WST.getParams('.j-ipt'),function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
var myChart = echarts.init(document.getElementById('main'));
|
||||
myChart.clear();
|
||||
$('#mainTable').hide();
|
||||
if(json.status=='1' && json.data){
|
||||
var option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
y: 'top',
|
||||
feature : {
|
||||
mark : {show: true},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar', 'tiled']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['取消订单','拒收订单','正常订单']
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
splitLine : {show : false},
|
||||
data : json.data.days
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
position: 'right'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'取消订单',
|
||||
type:'line',
|
||||
tooltip : {trigger: 'item'},
|
||||
stack: '类型',
|
||||
data:json.data['-1']
|
||||
},
|
||||
{
|
||||
name:'拒收订单',
|
||||
type:'line',
|
||||
tooltip : {trigger: 'item'},
|
||||
stack: '类型',
|
||||
data:json.data['-3']
|
||||
},
|
||||
{
|
||||
name:'正常订单',
|
||||
type:'line',
|
||||
tooltip : {trigger: 'item'},
|
||||
stack: '类型',
|
||||
data:json.data['1']
|
||||
},
|
||||
{
|
||||
name:'订单总数',
|
||||
type:'line',
|
||||
data:json.data['total']
|
||||
},
|
||||
{
|
||||
name:'订单类型细分',
|
||||
type:'pie',
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
center: [160,130],
|
||||
radius : [0, 50],
|
||||
itemStyle : {
|
||||
normal : {
|
||||
labelLine : {
|
||||
length : 20
|
||||
}
|
||||
}
|
||||
},
|
||||
data:[
|
||||
{value:json.data.map['-3'], name:'取消订单'},
|
||||
{value:json.data.map['-1'], name:'拒收订单'},
|
||||
{value:json.data.map['1'], name:'正常订单'},
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
var gettpl = document.getElementById('stat-tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.data.list, function(html){
|
||||
$('#list-box').html(html);
|
||||
$('#mainTable').show();
|
||||
});
|
||||
}else{
|
||||
WST.msg('没有查询到记录',{icon:5});
|
||||
}
|
||||
});
|
||||
}
|
49
hyhproject/home/view/default/shops/reports/stat_sales.html
Executable file
49
hyhproject/home/view/default/shops/reports/stat_sales.html
Executable file
@ -0,0 +1,49 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}销售额统计 - 卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
.wst-list tbody tr td {height: 35px;line-height: 35px;}
|
||||
</style>
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>销售额统计</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
日期:<input type='text' class="laydate-icon j-ipt" id='startDate' onclick="laydate()" value='{$startDate}'/>至
|
||||
<input type='text' class="laydate-icon j-ipt" id='endDate' onclick="laydate()" value='{$endDate}'/>
|
||||
支付方式:<select id='payType' class='j-ipt'>
|
||||
<option value='-1'>全部</option>
|
||||
<option value='0'>货到付款</option>
|
||||
<option value='1'>在线支付</option>
|
||||
</select>
|
||||
<a class="s-btn" onclick="loadStat()">查询</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<div id='main' style='height:300px;width:99%'></div>
|
||||
<table id='mainTable' class='wst-list hide' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='20'> </th>
|
||||
<th width='100'>日期</th>
|
||||
<th width='100'>订单数</th>
|
||||
<th width='130'>销售额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list-box'></tbody>
|
||||
<script id="stat-tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{(i+1)}}</td>
|
||||
</td>
|
||||
<td>{{ d[i].day }}</td>
|
||||
<td>{{ d[i].num }}</td>
|
||||
<td>¥{{ d[i].val }}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
|
||||
<script src="__STATIC__/plugins/layer/laydate.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/reports/stat_sales.js?v={$v}'></script>
|
||||
{/block}
|
54
hyhproject/home/view/default/shops/reports/stat_sales.js
Executable file
54
hyhproject/home/view/default/shops/reports/stat_sales.js
Executable file
@ -0,0 +1,54 @@
|
||||
function loadStat(){
|
||||
var loading = WST.load({msg:'正在查询数据,请稍后...'});
|
||||
$.post(WST.U('home/reports/getStatSales'),WST.getParams('.j-ipt'),function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
var myChart = echarts.init(document.getElementById('main'));
|
||||
myChart.clear();
|
||||
$('#mainTable').hide();
|
||||
if(json.status=='1' && json.data){
|
||||
var option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: true},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : json.data.days
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'销售额',
|
||||
type:'line',
|
||||
data:json.data.dayVals
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
var gettpl = document.getElementById('stat-tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.data.list, function(html){
|
||||
$('#list-box').html(html);
|
||||
$('#mainTable').show();
|
||||
});
|
||||
}else{
|
||||
WST.msg('没有查询到记录',{icon:5});
|
||||
}
|
||||
});
|
||||
}
|
46
hyhproject/home/view/default/shops/reports/top_sale_goods.html
Executable file
46
hyhproject/home/view/default/shops/reports/top_sale_goods.html
Executable file
@ -0,0 +1,46 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}商品销售排行 - 卖家中心{__block__}{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>商品销售排行</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
日期:<input type='text' class="laydate-icon j-ipt" id='startDate' onclick="laydate()" value='{$startDate}'/>至
|
||||
<input type='text' class="laydate-icon j-ipt" id='endDate' onclick="laydate()" value='{$endDate}'/>
|
||||
<a class="s-btn" onclick="loadStat()">查询</a>
|
||||
</div>
|
||||
<div class='wst-shop-content'>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='20'> </th>
|
||||
<th width='100' colspan="2">商品</th>
|
||||
<th width='130'>商品编号</th>
|
||||
<th width='100'>销量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list-box'></tbody>
|
||||
<script id="top-sale-tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{(i+1)}}</td>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a target='_blank' href='{{WST.U("home/goods/detail","id="+d[i].goodsId)}}'>
|
||||
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div></td>
|
||||
<td>{{ d[i].goodsName }}</td>
|
||||
<td>{{ d[i].goodsSn }}</td>
|
||||
<td>{{ d[i].goodsNum}}</td>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="__STATIC__/plugins/layer/laydate.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/reports/top_sale_goods.js?v={$v}'></script>
|
||||
{/block}
|
16
hyhproject/home/view/default/shops/reports/top_sale_goods.js
Executable file
16
hyhproject/home/view/default/shops/reports/top_sale_goods.js
Executable file
@ -0,0 +1,16 @@
|
||||
function loadStat(){
|
||||
var load = WST.load({msg:'正在加载数据,请稍后...'})
|
||||
$.post(WST.U('home/reports/getTopSaleGoods'),WST.getParams('.j-ipt'),function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1' && json.data){
|
||||
var gettpl = document.getElementById('top-sale-tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.data, function(html){
|
||||
$('#list-box').html(html);
|
||||
$('.j-lazyGoodsImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
||||
});
|
||||
}else{
|
||||
WST.msg('没有查询到记录',{icon:5});
|
||||
}
|
||||
});
|
||||
}
|
166
hyhproject/home/view/default/shops/settlements/list.html
Executable file
166
hyhproject/home/view/default/shops/settlements/list.html
Executable file
@ -0,0 +1,166 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}订单结算 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li id="wst-msg-li-0">结算信息<span style="display:none;"></span></li>
|
||||
<li id="wst-msg-li-1">未结算订单<span style="display:none;"></span></li>
|
||||
<li id="wst-msg-li-2">已结算订单<span style="display:none;"></span></li>
|
||||
</ul>
|
||||
<div class="wst-tab-content" style='width:98%;'>
|
||||
<div class='wst-tab-item'>
|
||||
<div>
|
||||
结算单号:<input type="text" id="settlementNo_0" style='width:120px;' autocomplete="off"/>
|
||||
结算状态:<select id='isFinish_0' autocomplete="off">
|
||||
<option value='-1'>全部</option>
|
||||
<option value='0'>未结算</option>
|
||||
<option value='1'>已结算</option>
|
||||
</select>
|
||||
<a class='s-btn' onclick="getQueryPage(0)">查询</a>
|
||||
</div>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='20'> </th>
|
||||
<th width='100'>结算单号</th>
|
||||
<th width='40'>类型</th>
|
||||
<th width='60'>结算金额</th>
|
||||
<th width='80'>结算佣金</th>
|
||||
<th width='80'>返还金额</th>
|
||||
<th width='130'>创建时间</th>
|
||||
<th width='60'>结算状态</th>
|
||||
<th width='130'>结算时间</th>
|
||||
<th width='*'>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="tblist0" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{i+1}}</td>
|
||||
<td><a style='color:blue' href='javascript:view("{{d[i].settlementId}}")'>{{d[i].settlementNo}}</a></td>
|
||||
<td>{{# if(d[i].settlementType==1){ }}定时{{# }else{ }}手动{{# } }}</td>
|
||||
<td>¥{{d[i].settlementMoney}}</td>
|
||||
<td>¥{{d[i].commissionFee}}</td>
|
||||
<td>¥{{d[i].backMoney}}</td>
|
||||
<td>{{d[i].createTime}}</td>
|
||||
<td>{{# if(d[i].settlementStatus==1){ }}已结算{{# }else{ }}未结算{{# } }}</td>
|
||||
<td>{{WST.blank(d[i].settlementTime,'-')}}</td>
|
||||
<td style='line-height:20px;'>{{WST.blank(d[i].remarks)}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="tbody0"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' align='center' id="pager_0"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{/** 待结算订单 **/}
|
||||
<div class='wst-tab-item hide'>
|
||||
<div>
|
||||
订单号:<input type="text" id="orderNo_1" style='width:120px;' autocomplete="off"/>
|
||||
<a class='s-btn' onclick="getUnSettledOrderPage(0)">查询</a>
|
||||
<!-- <a class='s-btn' style='width:110px;' onclick="settlement()">申请结算</a> -->
|
||||
</div>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th width='20'><input type='checkbox' onclick='WST.checkChks(this,".chk_1")'/></th> -->
|
||||
<th width='100'>订单号</th>
|
||||
<th width='130'>下单时间</th>
|
||||
<th width='80'>支付方式</th>
|
||||
<th width='80'>商品总金额</th>
|
||||
<th width='70'>运费</th>
|
||||
<th width='90'>订单总金额</th>
|
||||
<th width='90'>实付金额</th>
|
||||
<th width='70'>应付佣金</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="tblist1" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<!-- <td><input type='checkbox' class='chk_1' value='{{d[i].orderId}}'/></td> -->
|
||||
<td>{{d[i].orderNo}}</td>
|
||||
<td>{{d[i].createTime}}</td>
|
||||
<td>{{d[i].payTypeNames}}</td>
|
||||
<td>¥{{d[i].goodsMoney}}</td>
|
||||
<td>¥{{d[i].deliverMoney}}</td>
|
||||
<td>¥{{d[i].totalMoney}}</td>
|
||||
<td>¥{{d[i].realTotalMoney}}</td>
|
||||
<td>¥{{d[i].commissionFee}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="tbody1">
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7' align='center' id="pager_1"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class='wst-tab-item hide'>
|
||||
<div>
|
||||
结算单号:<input type="text" id="settlementNo_2" style='width:120px;' class="s-ipt" autocomplete="off"/>
|
||||
订单号:<input type="text" id="orderNo_2" style='width:120px;' class="s-ipt" autocomplete="off"/>
|
||||
结算状态:<select id='isFinish_2' class="s-ipt" autocomplete="off">
|
||||
<option value='-1'>全部</option>
|
||||
<option value='0'>未结算</option>
|
||||
<option value='1'>已结算</option>
|
||||
</select>
|
||||
<a class='s-btn' onclick="getSettleOrderPage(0)">查询</a>
|
||||
<a class="s-btn" style='margin-top:0px;line-height:15px;height:16px;float: right;' onclick="javascript:toExport(0)">导出</a>
|
||||
</div>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='20'> </th>
|
||||
<th width='100'>订单号</th>
|
||||
<th width='80'>支付方式</th>
|
||||
<th width='70'>商品总金额</th>
|
||||
<th width='70'>运费</th>
|
||||
<th width='70'>订单总金额</th>
|
||||
<th width='70'>实付金额</th>
|
||||
<th width='70'>应付佣金</th>
|
||||
<th width='70'>结算方式</th>
|
||||
<th width='130'>结算单号</th>
|
||||
<th width='130'>结算时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="tblist2" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{d[i].orderNo}}</td>
|
||||
<td>{{d[i].payTypeNames}}</td>
|
||||
<td>¥{{d[i].goodsMoney}}</td>
|
||||
<td>¥{{d[i].deliverMoney}}</td>
|
||||
<td>¥{{d[i].totalMoney}}</td>
|
||||
<td>¥{{d[i].realTotalMoney}}</td>
|
||||
<td>¥{{d[i].commissionFee}}</td>
|
||||
<td>{{d[i].payName}}</td>
|
||||
<td>{{d[i].settlementNo}}</td>
|
||||
<td>{{WST.blank(d[i].settlementTime,'-')}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="tbody2"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='9' align='center' id="pager_2"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/settlements/settlements.js?v={$v}'></script>
|
||||
|
||||
{/block}
|
134
hyhproject/home/view/default/shops/settlements/settlements.js
Executable file
134
hyhproject/home/view/default/shops/settlements/settlements.js
Executable file
@ -0,0 +1,134 @@
|
||||
$(function(){
|
||||
$('#tab').TabPanel({tab:0,callback:function(tab){
|
||||
switch(tab){
|
||||
case 0:getQueryPage(0);break;
|
||||
case 1:getUnSettledOrderPage(0);break;
|
||||
case 2:getSettleOrderPage(0);break;
|
||||
}
|
||||
}});
|
||||
});
|
||||
function view(val){
|
||||
location.href=WST.U('home/settlements/view','id='+val);
|
||||
}
|
||||
function getQueryPage(p){
|
||||
var params = {};
|
||||
params.page = p;
|
||||
params.settlementNo = $.trim($('#settlementNo_0').val());
|
||||
params.isFinish = $('#isFinish_0').val();
|
||||
$.post(WST.U('home/settlements/pageQuery'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var json = json.data;
|
||||
var gettpl = document.getElementById('tblist0').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#tbody0').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager_0',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
getQueryPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function settlement(){
|
||||
var ids = WST.getChks('.chk_1');
|
||||
if(ids.length==0){
|
||||
WST.msg('请选择要结算的订单!',{icon:2});
|
||||
return;
|
||||
}
|
||||
var load = WST.load({msg:'正在提交申请,请稍后...'});
|
||||
WST.confirm({content:'您确定要申请结算这些订单吗?',yes:function(){
|
||||
$.post(WST.U('home/settlements/settlement'),{ids:ids.join(',')},function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
getUnSettledOrderPage(WSTCurrPage);
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg);
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
function getUnSettledOrderPage(p){
|
||||
var params = {};
|
||||
params.page = p;
|
||||
params.orderNo = $.trim($('#orderNo_1').val());
|
||||
$('#pager_1').empty();
|
||||
$.post(WST.U('home/settlements/pageUnSettledQuery'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
getUnSettledOrderPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist1').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#tbody1').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager_1',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
getUnSettledOrderPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function getSettleOrderPage(p){
|
||||
var params = {};
|
||||
params.page = p;
|
||||
params.orderNo = $.trim($('#orderNo_2').val());
|
||||
params.settlementNo = $.trim($('#settlementNo_2').val());
|
||||
params.isFinish = $.trim($('#isFinish_2').val());
|
||||
$('#pager_2').empty();
|
||||
$.post(WST.U('home/settlements/pageSettledQuery'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist2').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#tbody2').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager_2',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
getSettleOrderPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//导出订单
|
||||
function toExport(){
|
||||
var params = {};
|
||||
params.orderNo = $.trim($('#orderNo_2').val());
|
||||
params.settlementNo = $.trim($('#settlementNo_2').val());
|
||||
params.isFinish = $.trim($('#isFinish_2').val());
|
||||
var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
|
||||
layer.close(box);
|
||||
location.href=WST.U('home/settlements/toExport',params);
|
||||
}});
|
||||
}
|
91
hyhproject/home/view/default/shops/settlements/view.html
Executable file
91
hyhproject/home/view/default/shops/settlements/view.html
Executable file
@ -0,0 +1,91 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}结算详情-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>结算详情</span><a href="<?=url('home/settlements/index');?>">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-body">
|
||||
<form id='editform' autocomplete='off'>
|
||||
<div class="wst-tab-item" style="position: relative;">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<td class='head-ititle' colspan='2'>结算信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>结算单号:</th>
|
||||
<td>{$object['settlementNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>结算金额:</th>
|
||||
<td>¥{$object['settlementMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>结算佣金:</th>
|
||||
<td>¥{$object['commissionFee']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>返还金额:</th>
|
||||
<td>¥{$object['backMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>申请时间:</th>
|
||||
<td>{$object['createTime']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>结算状态:</th>
|
||||
<td>
|
||||
{if $object['settlementStatus']==1}
|
||||
已结算
|
||||
{else}
|
||||
待结算
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if $object['settlementStatus']==1}
|
||||
<tr>
|
||||
<th>结算时间:</th>
|
||||
<td>{$object['settlementTime']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>结算备注:</th>
|
||||
<td>{$object['remarks']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td colspan='2' align="center">
|
||||
<table class='wst-list' style='margin-left:5px;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>订单号</th>
|
||||
<th>支付方式</th>
|
||||
<th>商品金额</th>
|
||||
<th>运费</th>
|
||||
<th>订单总金额</th>
|
||||
<th>积分抵扣</th>
|
||||
<th>实付金额</th>
|
||||
<th>佣金</th>
|
||||
<th>下单时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{volist name='$object["list"]' id='vo'}
|
||||
<tr>
|
||||
<td>{$key+1}</td>
|
||||
<td>{$vo['orderNo']}</td>
|
||||
<td>{:WSTLangPayType($vo['payType'])}</td>
|
||||
<td>¥{$vo['goodsMoney']}</td>
|
||||
<td>¥{$vo['deliverMoney']}</td>
|
||||
<td>¥{$vo['totalMoney']}</td>
|
||||
<td>¥{$vo['scoreMoney']}</td>
|
||||
<td>¥{$vo['realTotalMoney']}</td>
|
||||
<td>¥{$vo['commissionFee']}</td>
|
||||
<td>{$vo['createTime']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
176
hyhproject/home/view/default/shops/shopcats/list.html
Executable file
176
hyhproject/home/view/default/shops/shopcats/list.html
Executable file
@ -0,0 +1,176 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}商品分类 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<!--mark 20180518 by zl-->
|
||||
<meta http-equiv="Access-Control-Allow-Origin" content="*">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/batchupload.css?v={$v}" />
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<!--end-->
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>商品分类</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div style='text-align:right;height: 36px;'>
|
||||
<span></span>
|
||||
<a href='javascript:addCat(1);' style='float:right;margin:9px 30px 0px 0px;'><img class="wst-lfloat" style="margin:-3px 5px 0px 0px;" src="__STYLE__/img/seller_icon_xz.png">新增</a>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table id="cat_list_tab" class='wst-list wst-form'>
|
||||
<thead>
|
||||
<tr class="wst-colour">
|
||||
<th class="wst-fre-th">名称</th>
|
||||
<th width='60'>排序号</th>
|
||||
<th width='80' style="line-height: normal;">是否显示<br/><span style="font-weight:normal;color:red;">(双击可修改)</span></th>
|
||||
<th width="150">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{volist name="list" id="vo" key='i'}
|
||||
<tbody>
|
||||
<tr id='tr_{$i}' isLoad='1'>
|
||||
<td class="wst-fre-td">
|
||||
<span class='wst-tree-open active' onclick='javascript:treeCatOpen(this,{$vo.catId})'><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_zk.png"></span>
|
||||
<input type='text' style='width:400px;' value='{$vo['catName']}' dataId="{$vo.catId}" onchange='javascript:editCatName(this)'/>
|
||||
</td>
|
||||
<td><input class='catsort' type='text' style='width:35px;' value="{$vo['catSort']}" dataId="{$vo.catId}" onchange='javascript:editCatSort(this)' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/></td>
|
||||
{if condition="$vo['isShow']==0 "}
|
||||
<td style="cursor:pointer;" ondblclick="changeCatStatus(1,{$vo['catId']},0)"><span class='wst-state_no'><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_error.png"></span></td>
|
||||
{else/}
|
||||
<td style="cursor:pointer;" ondblclick="changeCatStatus(0,{$vo['catId']},0)"><span class='wst-state_yes'><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_right.png"></span></td>
|
||||
{/if}
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick='javascript:addCat(this,{$vo["catId"]},{$i});' class='add btn' title='新增'>[新增]</a>
|
||||
<a href="javascript:void(0);" onclick="javascript:delCat({$vo['catId']},0)" class='del btn' title='删除'>[删除]</a>
|
||||
<!--mark 20180518 by zll-->
|
||||
{if condition="$shopId eq 1"}
|
||||
<a href="javascript:void(0);" onclick="javascript:setSpecial('{$vo['catId']}','{$vo['provId']}','{$vo['catImg']}','{$vo['isHot']}')" class='del btn' title='设为特产'>[设为特产]</a>
|
||||
{/if}
|
||||
<!--end-->
|
||||
</td>
|
||||
</tr>
|
||||
{if isset($vo['childNum'])}
|
||||
{if condition="$vo['childNum'] gt 0 "}
|
||||
{volist name="vo['child']" id="vo2" key='i2'}
|
||||
<tr id='tr_{$i}_{$i2}' class="tr_{$i} tree_{$vo.catId}" isLoad='1'>
|
||||
<td class="wst-fre-td">
|
||||
<span class="wst-tree-second"></span>
|
||||
<input type='text' style='width:400px;' value='{$vo2['catName']}' dataId="{$vo2.catId}" onchange='javascript:editCatName(this)'/>
|
||||
</td>
|
||||
<td><input class='catsort' type='text' style='width:35px;' value="{$vo2['catSort']}" dataId="{$vo2.catId}" onchange='javascript:editCatSort(this)' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/></td>
|
||||
{if condition="$vo2['isShow']==0 "}
|
||||
<td style="cursor:pointer;" onclick="changeCatStatus(1,{$vo2['catId']},{$vo['catId']})"><span class='wst-state_no'><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_error.png"></span></td>
|
||||
{else/}
|
||||
<td style="cursor:pointer;" onclick="changeCatStatus(0,{$vo2['catId']},{$vo['catId']})"><span class='wst-state_yes'><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_right.png"></span></td>
|
||||
{/if}
|
||||
<td>
|
||||
<a href="javascript:delCat({$vo2['catId']},0)" class='del btn' title='删除'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{/if}
|
||||
{/if}
|
||||
</tbody>
|
||||
{/volist}
|
||||
</table>
|
||||
</form>
|
||||
<div class='wst-tbar-group' style='height: 76px;text-align: center'>
|
||||
<button class='wst-shop-but hide' style='margin-top:40px;;width:80px;height: 30px;' type="button" onclick='javascript:batchSaveCats()'>保 存</button>
|
||||
<button class='wst-shop-but hide' style='margin-top:40px;margin-left:5px;width:80px;height: 30px;;' type="button" onclick='javascript:location.reload()'>取 消</button>
|
||||
<a style='float:right;margin:30px 30px 0px 0px;' href='javascript:addCat(1);'><img class="wst-lfloat" style="margin:-3px 5px 0px 0px;" src="__STYLE__/img/seller_icon_xz.png">新增</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script id="cat_p_tr" type="text/html">
|
||||
<tbody class='tbody_new'>
|
||||
<tr class="tr_new" isload="1">
|
||||
<td class="wst-fre-td">
|
||||
<span class="wst-tree-open"><img class="wst-lfloat" style="margin-top:-3px;" src="__STYLE__/img/seller_icon_zk.png"></span>
|
||||
<input class="catname" type="text" style="width:400px;height:22px;margin-left:6px;" dataid="">
|
||||
</td>
|
||||
<td>
|
||||
<input class="catsort" type="text" style="width:35px;" value="0" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)">
|
||||
</td>
|
||||
<td style="cursor:pointer;">
|
||||
<input class="catshow" type="checkbox" checked=""/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="addCat(this,0,0);" class="add btn" title="新增">[新增]</a>
|
||||
<a href="javascript:void(0);" class="del btn" title="删除" onclick="delCatObj(this,1)">[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</script>
|
||||
|
||||
<script id="cat_c_tr" type="text/html">
|
||||
<tr class="{{d.className}}" isload="1" catid="{{d.p}}">
|
||||
<td class="wst-fre-td">
|
||||
<span class="wst-tree-second"></span>
|
||||
<input class="catname" type="text" style='width:400px' dataid="">
|
||||
</td>
|
||||
<td>
|
||||
<input class="catsort" type="text" style="width:35px;" value="0" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)">
|
||||
</td>
|
||||
<td style="cursor:pointer;">
|
||||
<input class="catshow" type="checkbox" checked=""/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="del btn" title="删除" onclick="delCatObj(this,2)">[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
|
||||
|
||||
<!--模态框 mark 20180518 zll-->
|
||||
<div id='shopcatsBox' style='display:none' class='layui-form'>
|
||||
<form id='shopcatsForm' autocomplete="off">
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th>特产省份<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select name="provId" id="provId" class="ipt" >
|
||||
<option value ='0'>--请选择--</option>
|
||||
|
||||
{volist name="areas" id="vv"}
|
||||
<option value="{$vv['areaId']}" >{$vv['areaName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>分类图标<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<div id='catFilePicker'>上传图标</div><span id='uploadMsg'></span>
|
||||
<input type='hidden' id='catImg' name="catImg" class="ipt" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>预览图:</th>
|
||||
<td><div style="min-height:75px;" id="preview"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否热门:</th>
|
||||
<td>
|
||||
<input type="checkbox" id="isHot" name="isHot" value="1" class="ipt" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<!--end-->
|
||||
|
||||
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<!--mark 20180518-->
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<!--end-->
|
||||
<script type='text/javascript' src='__STYLE__/shops/shopcats/shopcats.js?v={$v}'></script>
|
||||
{/block}
|
48
hyhproject/home/view/default/shops/shopcats/php/get.php
Executable file
48
hyhproject/home/view/default/shops/shopcats/php/get.php
Executable file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
function gmt_iso8601($time) {
|
||||
$dtStr = date("c", $time);
|
||||
$mydatetime = new DateTime($dtStr);
|
||||
$expiration = $mydatetime->format(DateTime::ISO8601);
|
||||
$pos = strpos($expiration, '+');
|
||||
$expiration = substr($expiration, 0, $pos);
|
||||
return $expiration."Z";
|
||||
}
|
||||
|
||||
$id= 'LTAIOUxnwu01rA9g';
|
||||
$key= 'k0eigaxy8Gnz2V6AwcMNmwMSbQXsCf';
|
||||
$host = 'http://dianshanglian.oss-cn-beijing.aliyuncs.com';
|
||||
|
||||
$now = time();
|
||||
$expire = 30; //设置该policy超时时间是10s. 即这个policy过了这个有效时间,将不能访问
|
||||
$end = $now + $expire;
|
||||
$expiration = gmt_iso8601($end);
|
||||
$save_dir = $_GET['dir'];
|
||||
$dir = 'upload/'.$save_dir."/".date('Y-m').'/';
|
||||
|
||||
//最大文件大小.用户可以自己设置
|
||||
$condition = array(0=>'content-length-range', 1=>0, 2=>1048576000);
|
||||
$conditions[] = $condition;
|
||||
|
||||
//表示用户上传的数据,必须是以$dir开始, 不然上传会失败,这一步不是必须项,只是为了安全起见,防止用户通过policy上传到别人的目录
|
||||
$start = array(0=>'starts-with', 1=>'$key', 2=>$dir);
|
||||
$conditions[] = $start;
|
||||
|
||||
|
||||
$arr = array('expiration'=>$expiration,'conditions'=>$conditions);
|
||||
//echo json_encode($arr);
|
||||
//return;
|
||||
$policy = json_encode($arr);
|
||||
$base64_policy = base64_encode($policy);
|
||||
$string_to_sign = $base64_policy;
|
||||
$signature = base64_encode(hash_hmac('sha1', $string_to_sign, $key, true));
|
||||
|
||||
$response = array();
|
||||
$response['accessid'] = $id;
|
||||
$response['host'] = $host;
|
||||
$response['policy'] = $base64_policy;
|
||||
$response['signature'] = $signature;
|
||||
$response['expire'] = $end;
|
||||
//这个参数是设置用户上传指定的前缀
|
||||
$response['dir'] = $dir;
|
||||
echo json_encode($response);
|
||||
?>
|
401
hyhproject/home/view/default/shops/shopcats/shopcats webuploader╔╧┤лoss.js
Executable file
401
hyhproject/home/view/default/shops/shopcats/shopcats webuploader╔╧┤лoss.js
Executable file
@ -0,0 +1,401 @@
|
||||
function addCat(obj,p,catNo){
|
||||
var html = new Array();
|
||||
if(typeof(obj)=="number"){
|
||||
$("#cat_list_tab").append($("#cat_p_tr").html());
|
||||
}else{
|
||||
var className = (p==0)?"tr_c_new":"tr_"+catNo+" tr_0";
|
||||
var gettpl = $("#cat_c_tr").html();
|
||||
laytpl(gettpl).render({"className":className,"p":p}, function(html){
|
||||
$(obj).parent().parent().parent().append(html);
|
||||
});
|
||||
}
|
||||
$('.wst-shop-but').show();
|
||||
}
|
||||
|
||||
function delCatObj(obj,vk){
|
||||
if(vk==1){
|
||||
$(obj).parent().parent().parent().remove();
|
||||
}else{
|
||||
$(obj).parent().parent().remove();
|
||||
}
|
||||
if($(".tr_0").size()==0 && $(".tbody_new").size()==0)$('.wst-shop-but').hide();
|
||||
}
|
||||
|
||||
function treeCatOpen(obj,id){
|
||||
if( $(obj).attr('class').indexOf('active') > -1 ){
|
||||
$(obj).removeClass('active');
|
||||
$(obj).html('<img class="wst-lfloat" style="margin-top:-3px;" src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_sq.png">');
|
||||
$('.tree_'+id).hide();
|
||||
}else{
|
||||
$(obj).addClass('active');
|
||||
$(obj).html('<img class="wst-lfloat" style="margin-top:-3px;" src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_zk.png">');
|
||||
$('.tree_'+id).show();
|
||||
}
|
||||
}
|
||||
|
||||
function delCat(id){
|
||||
var box = WST.confirm({content:"您确定要删除该商品分类吗?",yes:function(){
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shopcats/del'),{id:id},function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg("操作成功",{icon:1});
|
||||
layer.close(box);
|
||||
location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
|
||||
|
||||
function batchSaveCats(){
|
||||
var params = {};
|
||||
var fristNo = 0;
|
||||
var secondNo = 0;
|
||||
$(".tbody_new").each(function(){
|
||||
secondNo = 0;
|
||||
var pobj = $(this).find(".tr_new");
|
||||
params['catName_'+fristNo] = $.trim(pobj.find(".catname").val());
|
||||
if(params['catName_'+fristNo]==''){
|
||||
WST.msg('请输入商品分类名称!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
params['catSort_'+fristNo] = pobj.find(".catsort").val();
|
||||
params['catShow_'+fristNo] = pobj.find(".catshow").prop("checked")?1:0
|
||||
$(this).find(".tr_c_new").each(function(){
|
||||
params['catId_'+fristNo+'_'+secondNo] = fristNo;
|
||||
params['catName_'+fristNo+'_'+secondNo] = $.trim($(this).find(".catname").val());
|
||||
if(params['catName_'+fristNo+'_'+secondNo]==''){
|
||||
WST.msg('请输入商品分类名称!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
params['catSort_'+fristNo+'_'+secondNo] = $(this).find(".catsort").val();
|
||||
params['catShow_'+fristNo+'_'+secondNo] = $(this).find(".catshow").prop("checked")?1:0
|
||||
params['catSecondNo_'+fristNo] = ++secondNo;
|
||||
});
|
||||
params['fristNo'] = ++fristNo;
|
||||
});
|
||||
var otherNo = 0;
|
||||
$(".tr_0").each(function(){
|
||||
params['catId_o_'+otherNo] = $(this).attr('catId');
|
||||
params['catName_o_'+otherNo] = $.trim($(this).find(".catname").val());
|
||||
if(params['catName_o_'+otherNo]==''){
|
||||
WST.msg('请输入商品分类名称!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
params['catSort_o_'+otherNo] = $(this).find(".catsort").val();
|
||||
params['catShow_o_'+otherNo] = $(this).find(".catshow").prop("checked")?1:0;
|
||||
params['otherNo'] = ++otherNo;
|
||||
});
|
||||
$.post(WST.U('home/shopcats/batchSaveCats'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg('新增成功!', {icon: 1,time:500},function(){
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
WST.msg('新增失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function editCatName(obj){
|
||||
$.post(WST.U('home/shopcats/editName'),{"id":$(obj).attr('dataId'),"catName":obj.value},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功!',{icon: 1,time:500});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
function editCatSort(obj){
|
||||
$.post(WST.U('home/shopcats/editSort'),{"id":$(obj).attr('dataId'),"catSort":obj.value},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功!',{icon: 1,time:500});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeCatStatus(isShow,id,pid){
|
||||
var params = {};
|
||||
params.id = id;
|
||||
params.isShow = isShow;
|
||||
params.pid = pid;
|
||||
$.post(WST.U('home/shopcats/changeCatStatus'),params,function(data,textStatus){
|
||||
location.reload();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//mark 修改特产省份 20180518 by zll
|
||||
var isInitUpload = false;
|
||||
function setSpecial(catId,provId,catImg,isHot){
|
||||
if(provId>0)$('#provId').val(provId);
|
||||
if(catImg !=''){
|
||||
$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+catImg+'" height="75px" />');
|
||||
$('#catImg').val(catImg);
|
||||
}else{
|
||||
$('#preview').html('');
|
||||
$('#catImg').val('');
|
||||
};
|
||||
(isHot==1)?$('#isHot').prop('checked',true):$('#isHot').prop('checked',false);
|
||||
if(!isInitUpload)initUpload();
|
||||
var box = layer.open({
|
||||
type:1,
|
||||
title:'设置特产省份',
|
||||
btn:['设置','消除特产','取消'],
|
||||
content:$('#shopcatsBox'),
|
||||
area:['400px','500px'],
|
||||
|
||||
yes:function(){
|
||||
var params = WST.getParams('.ipt');
|
||||
params.provName = $('#provId option:selected').text();
|
||||
params.catId = catId;
|
||||
if(params.provId == '0'){
|
||||
layer.msg('请选择省份');
|
||||
return false;
|
||||
}
|
||||
if(params.catImg==''){
|
||||
layer.msg('请选择图片');
|
||||
return false;
|
||||
}
|
||||
$.post(WST.U('home/shopcats/setSpecial'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status == '1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
layer.close(box);
|
||||
window.parent.location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2})
|
||||
}
|
||||
});
|
||||
},
|
||||
btn2:function(){
|
||||
var params = {};
|
||||
params.catId = catId;
|
||||
params.provName='';
|
||||
params.provId = '0';
|
||||
params.isHot = '0';
|
||||
params.catImg = '';
|
||||
$.post(WST.U('home/shopcats/setSpecial'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status == '1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
window.location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
}
|
||||
// function initUpload(){
|
||||
// isInitUpload = true;
|
||||
// //文件上传
|
||||
// WST.upload({
|
||||
// pick:'#catFilePicker',
|
||||
// formData: {dir:'shopcats'},
|
||||
// accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
// callback:function(f){
|
||||
// var json = WST.toJson(f);
|
||||
// if(json.status==1){
|
||||
// $('#uploadMsg').empty().hide();
|
||||
// //将上传的图片路径赋给全局变量
|
||||
// $('#catImg').val(json.savePath+json.thumb);
|
||||
// $('#preview').html('<img src="'+WST.conf.ROOT+'/'+json.savePath+json.thumb+'" height="75" />');
|
||||
// }else{
|
||||
// WST.msg(json.msg,{icon:2});
|
||||
// }
|
||||
// },
|
||||
// progress:function(rate){
|
||||
// $('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
accessid = '';
|
||||
accesskey = '';
|
||||
host = '';
|
||||
policyBase64 = '';
|
||||
signature = '';
|
||||
callbackbody = '';
|
||||
filename = '';
|
||||
key = '';
|
||||
expire = 0;
|
||||
g_object_name = '';
|
||||
g_object_name_type = '';
|
||||
now = timestamp = Date.parse(new Date()) / 1000;
|
||||
dir = 'test';
|
||||
|
||||
function send_request()
|
||||
{
|
||||
var xmlhttp = null;
|
||||
if (window.XMLHttpRequest)
|
||||
{
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
|
||||
if (xmlhttp!=null)
|
||||
{
|
||||
// serverUrl = './php/get.php?dir='+dir
|
||||
xmlhttp.open( "GET", "http://localhost/oss/get.php?dir="+dir, false );
|
||||
xmlhttp.send( null );
|
||||
return xmlhttp.responseText
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Your browser does not support XMLHTTP.");
|
||||
}
|
||||
};
|
||||
|
||||
// function check_object_radio() {
|
||||
// var tt = document.getElementsByName('myradio');
|
||||
// for (var i = 0; i < tt.length ; i++ )
|
||||
// {
|
||||
// if(tt[i].checked)
|
||||
// {
|
||||
// g_object_name_type = tt[i].value;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
function get_signature()
|
||||
{
|
||||
//可以判断当前expire是否超过了当前时间,如果超过了当前时间,就重新取一下.3s 做为缓冲
|
||||
now = timestamp = Date.parse(new Date()) / 1000;
|
||||
if (expire < now + 3)
|
||||
{
|
||||
body = send_request();
|
||||
var obj = eval ("(" + body + ")");
|
||||
host = obj['host']
|
||||
policyBase64 = obj['policy']
|
||||
accessid = obj['accessid']
|
||||
signature = obj['signature']
|
||||
expire = parseInt(obj['expire'])
|
||||
callbackbody = obj['callback']
|
||||
key = obj['dir']
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
function random_string(len) {
|
||||
len = len || 32;
|
||||
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
|
||||
var maxPos = chars.length;
|
||||
var pwd = '';
|
||||
for (i = 0; i < len; i++) {
|
||||
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
|
||||
}
|
||||
return pwd;
|
||||
}
|
||||
|
||||
function get_suffix(filename) {
|
||||
pos = filename.lastIndexOf('.')
|
||||
suffix = ''
|
||||
if (pos != -1) {
|
||||
suffix = filename.substring(pos)
|
||||
}
|
||||
return suffix;
|
||||
}
|
||||
|
||||
function calculate_object_name(filename)
|
||||
{
|
||||
|
||||
suffix = get_suffix(filename);
|
||||
g_object_name = key + random_string(10) + suffix;
|
||||
return '';
|
||||
}
|
||||
|
||||
function get_uploaded_object_name(filename)
|
||||
{
|
||||
|
||||
return g_object_name;
|
||||
|
||||
}
|
||||
|
||||
function set_upload_param(up, filename, ret)
|
||||
{
|
||||
if (ret == false)
|
||||
{
|
||||
ret = get_signature();
|
||||
}
|
||||
g_object_name = key;
|
||||
if (filename != '') {
|
||||
suffix = get_suffix(filename)
|
||||
calculate_object_name(filename)
|
||||
}
|
||||
new_multipart_params = {
|
||||
'key' : g_object_name,
|
||||
'policy': policyBase64,
|
||||
'OSSAccessKeyId':accessid ,
|
||||
// 'success_action_status' : '200', //让服务端返回200,不然,默认会返回204
|
||||
'callback' : callbackbody,
|
||||
'signature': signature,
|
||||
};
|
||||
up.option('server',host);
|
||||
up.option('formData',new_multipart_params);
|
||||
console.log(up.option());
|
||||
up.upload();
|
||||
}
|
||||
function initUpload(){
|
||||
|
||||
isInitUpload = true;
|
||||
//文件上传
|
||||
uploader = new WebUploader.create({
|
||||
pick:'#catFilePicker',
|
||||
auto: true,
|
||||
swf: WST.conf.ROOT +'/plugins/webuploader/Uploader.swf',
|
||||
server:'http://heyuanhui.oss-cn-qingdao.aliyuncs.com',
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
|
||||
});
|
||||
uploader.on('beforeFileQueued',function(file){
|
||||
set_upload_param(uploader,'',false);
|
||||
});
|
||||
// uploader.on('uploadBeforeSend', function(obj,data, headers) {
|
||||
// // console.log(obj.file);
|
||||
// set_upload_param(uploader,obj.file.name,true);
|
||||
|
||||
// });
|
||||
uploader.on('uploadStart',function(file){
|
||||
set_upload_param(uploader,file.name,true);
|
||||
});
|
||||
uploader.on('uploadSuccess', function(file,response) {
|
||||
console.log(response);
|
||||
|
||||
pic_name = get_uploaded_object_name(file.name)
|
||||
console.log(pic_name);
|
||||
$('#uploadMsg').empty().hide();
|
||||
//将上传的图片路径赋给全局变量
|
||||
$('#catImg').val(pic_name);
|
||||
$('#preview').html('<img src="http://img.juzi199.com/'+pic_name+'" height="75"/>');
|
||||
|
||||
});
|
||||
uploader.on('uploadError', function( file ) {
|
||||
console.log(2222);
|
||||
});
|
||||
uploader.on( 'uploadProgress', function( file, percentage ) {
|
||||
// console.log(file);
|
||||
rate = percentage.toFixed(2)*100;
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
});
|
||||
}
|
||||
|
||||
//end
|
228
hyhproject/home/view/default/shops/shopcats/shopcats.js
Executable file
228
hyhproject/home/view/default/shops/shopcats/shopcats.js
Executable file
@ -0,0 +1,228 @@
|
||||
function addCat(obj,p,catNo){
|
||||
var html = new Array();
|
||||
if(typeof(obj)=="number"){
|
||||
$("#cat_list_tab").append($("#cat_p_tr").html());
|
||||
}else{
|
||||
var className = (p==0)?"tr_c_new":"tr_"+catNo+" tr_0";
|
||||
var gettpl = $("#cat_c_tr").html();
|
||||
laytpl(gettpl).render({"className":className,"p":p}, function(html){
|
||||
$(obj).parent().parent().parent().append(html);
|
||||
});
|
||||
}
|
||||
$('.wst-shop-but').show();
|
||||
}
|
||||
|
||||
function delCatObj(obj,vk){
|
||||
if(vk==1){
|
||||
$(obj).parent().parent().parent().remove();
|
||||
}else{
|
||||
$(obj).parent().parent().remove();
|
||||
}
|
||||
if($(".tr_0").size()==0 && $(".tbody_new").size()==0)$('.wst-shop-but').hide();
|
||||
}
|
||||
|
||||
function treeCatOpen(obj,id){
|
||||
if( $(obj).attr('class').indexOf('active') > -1 ){
|
||||
$(obj).removeClass('active');
|
||||
$(obj).html('<img class="wst-lfloat" style="margin-top:-3px;" src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_sq.png">');
|
||||
$('.tree_'+id).hide();
|
||||
}else{
|
||||
$(obj).addClass('active');
|
||||
$(obj).html('<img class="wst-lfloat" style="margin-top:-3px;" src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_zk.png">');
|
||||
$('.tree_'+id).show();
|
||||
}
|
||||
}
|
||||
|
||||
function delCat(id){
|
||||
var box = WST.confirm({content:"您确定要删除该商品分类吗?",yes:function(){
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shopcats/del'),{id:id},function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg("操作成功",{icon:1});
|
||||
layer.close(box);
|
||||
location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
|
||||
|
||||
function batchSaveCats(){
|
||||
var params = {};
|
||||
var fristNo = 0;
|
||||
var secondNo = 0;
|
||||
$(".tbody_new").each(function(){
|
||||
secondNo = 0;
|
||||
var pobj = $(this).find(".tr_new");
|
||||
params['catName_'+fristNo] = $.trim(pobj.find(".catname").val());
|
||||
if(params['catName_'+fristNo]==''){
|
||||
WST.msg('请输入商品分类名称!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
params['catSort_'+fristNo] = pobj.find(".catsort").val();
|
||||
params['catShow_'+fristNo] = pobj.find(".catshow").prop("checked")?1:0
|
||||
$(this).find(".tr_c_new").each(function(){
|
||||
params['catId_'+fristNo+'_'+secondNo] = fristNo;
|
||||
params['catName_'+fristNo+'_'+secondNo] = $.trim($(this).find(".catname").val());
|
||||
if(params['catName_'+fristNo+'_'+secondNo]==''){
|
||||
WST.msg('请输入商品分类名称!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
params['catSort_'+fristNo+'_'+secondNo] = $(this).find(".catsort").val();
|
||||
params['catShow_'+fristNo+'_'+secondNo] = $(this).find(".catshow").prop("checked")?1:0
|
||||
params['catSecondNo_'+fristNo] = ++secondNo;
|
||||
});
|
||||
params['fristNo'] = ++fristNo;
|
||||
});
|
||||
var otherNo = 0;
|
||||
$(".tr_0").each(function(){
|
||||
params['catId_o_'+otherNo] = $(this).attr('catId');
|
||||
params['catName_o_'+otherNo] = $.trim($(this).find(".catname").val());
|
||||
if(params['catName_o_'+otherNo]==''){
|
||||
WST.msg('请输入商品分类名称!', {icon: 5});
|
||||
return;
|
||||
}
|
||||
params['catSort_o_'+otherNo] = $(this).find(".catsort").val();
|
||||
params['catShow_o_'+otherNo] = $(this).find(".catshow").prop("checked")?1:0;
|
||||
params['otherNo'] = ++otherNo;
|
||||
});
|
||||
$.post(WST.U('home/shopcats/batchSaveCats'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg('新增成功!', {icon: 1,time:500},function(){
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
WST.msg('新增失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function editCatName(obj){
|
||||
$.post(WST.U('home/shopcats/editName'),{"id":$(obj).attr('dataId'),"catName":obj.value},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功!',{icon: 1,time:500});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
function editCatSort(obj){
|
||||
$.post(WST.U('home/shopcats/editSort'),{"id":$(obj).attr('dataId'),"catSort":obj.value},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('操作成功!',{icon: 1,time:500});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeCatStatus(isShow,id,pid){
|
||||
var params = {};
|
||||
params.id = id;
|
||||
params.isShow = isShow;
|
||||
params.pid = pid;
|
||||
$.post(WST.U('home/shopcats/changeCatStatus'),params,function(data,textStatus){
|
||||
location.reload();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//mark 修改特产省份 20180518 by zll
|
||||
var isInitUpload = false;
|
||||
function setSpecial(catId,provId,catImg,isHot){
|
||||
if(provId>0)$('#provId').val(provId);
|
||||
if(catImg !=''){
|
||||
$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+catImg+'" height="75px" />');
|
||||
$('#catImg').val(catImg);
|
||||
}else{
|
||||
$('#preview').html('');
|
||||
$('#catImg').val('');
|
||||
};
|
||||
(isHot==1)?$('#isHot').prop('checked',true):$('#isHot').prop('checked',false);
|
||||
if(!isInitUpload)initUpload();
|
||||
var box = layer.open({
|
||||
type:1,
|
||||
title:'设置特产省份',
|
||||
btn:['设置','消除特产','取消'],
|
||||
content:$('#shopcatsBox'),
|
||||
area:['400px','500px'],
|
||||
|
||||
yes:function(){
|
||||
var params = WST.getParams('.ipt');
|
||||
params.provName = $('#provId option:selected').text();
|
||||
params.catId = catId;
|
||||
if(params.provId == '0'){
|
||||
layer.msg('请选择省份');
|
||||
return false;
|
||||
}
|
||||
if(params.catImg==''){
|
||||
layer.msg('请选择图片');
|
||||
return false;
|
||||
}
|
||||
$.post(WST.U('home/shopcats/setSpecial'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status == '1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
layer.close(box);
|
||||
window.parent.location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2})
|
||||
}
|
||||
});
|
||||
},
|
||||
btn2:function(){
|
||||
var params = {};
|
||||
params.catId = catId;
|
||||
params.provName='';
|
||||
params.provId = '0';
|
||||
params.isHot = '0';
|
||||
params.catImg = '';
|
||||
$.post(WST.U('home/shopcats/setSpecial'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status == '1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
window.location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
}
|
||||
function initUpload(){
|
||||
isInitUpload = true;
|
||||
//文件上传
|
||||
WST.upload({
|
||||
pick:'#catFilePicker',
|
||||
formData: {dir:'shopcats'},
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
$('#uploadMsg').empty().hide();
|
||||
//将上传的图片路径赋给全局变量
|
||||
$('#catImg').val(json.savePath+json.thumb);
|
||||
$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" height="75" />');
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//end
|
163
hyhproject/home/view/default/shops/shopconfigs/shop_cfg.html
Executable file
163
hyhproject/home/view/default/shops/shopconfigs/shop_cfg.html
Executable file
@ -0,0 +1,163 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}店铺设置-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/batchupload.css?v={$v}" />
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<script>
|
||||
$(function(){
|
||||
$('.state-complete').css('border-color','#ddd');
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.filelist .btn-del,.webuploader-pick,.wst-batchupload .placeholder .webuploader-pick,.wst-batchupload .statusBar .btns .uploadBtn{background: #e45050;}
|
||||
.wst-batchupload .statusBar .btns .uploadBtn:hover {background: #e45525 none repeat scroll 0 0;}
|
||||
.shopbanner{position: relative;}
|
||||
.del-banner{position: absolute;top:0px;right:0px;background: #e45050 none repeat scroll 0 0 z-index: 55;color: #ffffff;cursor: pointer;height: 18px;line-height: 18px;padding: 0 5px;}
|
||||
.wst-batchupload .filelist li{background:#ffffff;}
|
||||
</style>
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>店铺设置</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-shop-content">
|
||||
|
||||
<form name="shopCfg" id="shopCfg" autocomplete="off">
|
||||
|
||||
|
||||
<table class="wst-form">
|
||||
<tr>
|
||||
<th width='120' align='right'>店铺SEO关键字<font color='red'>*</font>:</th>
|
||||
<td><input type='text' id='shopKeywords' name='shopKeywords' class="ipt" value='{$object.shopKeywords}' data-rule='关键字:required;' style='width:350px;' maxLength='25' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>店铺SEO描述:</th>
|
||||
<td colspan='3'>
|
||||
<textarea rows="2" style='width:350px;' class="ipt" id='shopDesc' name='shopDesc' >{$object.shopDesc}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>店铺热搜关键词:</th>
|
||||
<td><input type='text' id='shopHotWords' name='shopHotWords' class="ipt" value='{$object.shopHotWords}' style='width:350px;' placeholder="店铺主页搜索栏下的引导搜索词" maxLength='100'/></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr style="height:80px">
|
||||
<th width='120' align='right' valign='top'>店铺街背景:</th>
|
||||
<td>
|
||||
<div id="shopStreetImgPicker" style='margin-left:0px;margin-top:5px;height:30px;overflow:hidden'>上传(首页)店铺街背景图片</div>
|
||||
<div>图片大小:228 x 138 (px)(格式为 gif, jpg, jpeg, png)</div>
|
||||
<div style="margin-top:5px;">
|
||||
<div class="wst-lfloat shopbanner" {if empty($object.shopStreetImg)}style='display:none'{/if}>
|
||||
<img id="shopStreetImgPreview" class="lazyImg" height="100" style="max-width:500px;" src="__IMGURL__/{$object.shopStreetImg}">
|
||||
<span class="del-banner" onclick="delShopStreetBg(this)">删除</span>
|
||||
</div>
|
||||
<input type="hidden" id="shopStreetImg" class="ipt" value="{$object.shopStreetImg}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr style="height:80px">
|
||||
<th width='120' align='right' valign='top'>顶部广告:</th>
|
||||
<td>
|
||||
<div id="shopBannerPicker" style='margin-left:0px;margin-top:5px;height:30px;overflow:hidden'>上传顶部广告图片</div>
|
||||
<div>图片大小:1920 x 110 (px)(格式为 gif, jpg, jpeg, png)</div>
|
||||
<div style="margin-top:5px;">
|
||||
<div class="wst-lfloat shopbanner" {if empty($object.shopBanner)}style='display:none'{/if}>
|
||||
<img id="shopBannerPreview" class="lazyImg" height="100" style="max-width:500px;" src="__IMGURL__/{$object.shopBanner}">
|
||||
<span class="del-banner" onclick="delbanner(this)">删除</span>
|
||||
</div>
|
||||
<input type="hidden" id="shopBanner" class="ipt" value="{$object.shopBanner}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<th width='120' align='right'>滚动广告<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
|
||||
<div id="batchUpload" class="wst-batchupload" style="border:1px solid #ccc">
|
||||
<div style="border-bottom:1px solid #dadada;padding-left:10px; "> 图片大小:1200 x 400 (px)(格式为 gif, jpg, jpeg, png) </div>
|
||||
<div class="queueList filled">
|
||||
<div id="dndArea" class="placeholder {if !empty($object['shopAds'])}element-invisible{/if}">
|
||||
<div id="filePicker"></div>
|
||||
<p>或将照片拖到这里,单次最多可选5张,每张最大不超过5M</p>
|
||||
</div>
|
||||
<ul class="filelist" >
|
||||
{volist name="$object['shopAds']" id="vo"}
|
||||
<li class="state-complete" style="border: 1px solid #ddd;height:213px;">
|
||||
<p class="title"></p>
|
||||
<p class="imgWrap">
|
||||
<img src="__IMGURL__/{$vo}">
|
||||
</p>
|
||||
<input type="hidden" v="{$vo}" iv="{$vo}" class="j-gallery-img">
|
||||
<span class="btn-del">删除</span>
|
||||
<input class="cfg-img-url" type="text" value="{$object['shopAdsUrl'][$key]}" style="width:170px;" placeholder="广告路径">
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="statusBar" >
|
||||
<div class="progress" style="display: none;">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage" style="width: 0%;"></span>
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style='clear:both;'></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center;padding:20px;'>
|
||||
<a class='s-btn' href="javascript:save()">保 存</a>
|
||||
<a class='s-btn2' href='javascript:location.reload();'>重 置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/shopconfigs/shop_cfg.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/batchupload.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
})
|
||||
function delbanner(obj){
|
||||
var c = WST.confirm({content:'您确定要删除顶部广告图片吗?',yes:function(){
|
||||
$('#shopBannerPreview').attr('src','');
|
||||
$('#shopBanner').val('');
|
||||
$(obj).hide();
|
||||
layer.close(c);
|
||||
}})
|
||||
}
|
||||
function delShopStreetBg(obj){
|
||||
var c = WST.confirm({content:'您确定要删除店铺街背景图片吗?',yes:function(){
|
||||
$('#shopStreetImgPreview').attr('src','');
|
||||
$('#shopStreetImg').val('');
|
||||
$(obj).hide();
|
||||
layer.close(c);
|
||||
}})
|
||||
}
|
||||
</script>
|
||||
|
||||
{/block}
|
124
hyhproject/home/view/default/shops/shopconfigs/shop_cfg.js
Executable file
124
hyhproject/home/view/default/shops/shopconfigs/shop_cfg.js
Executable file
@ -0,0 +1,124 @@
|
||||
function save(){
|
||||
/* 表单验证 */
|
||||
$('#shopCfg').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.ipt');
|
||||
// 图片路径
|
||||
var shopAds = [];
|
||||
$('.j-gallery-img').each(function(){
|
||||
shopAds.push($(this).attr('v'));
|
||||
});
|
||||
params.shopAds = shopAds.join(',');
|
||||
// 图片轮播广告路径
|
||||
var shopAdsUrl = [];
|
||||
$('.cfg-img-url').each(function(){
|
||||
shopAdsUrl.push($(this).val());
|
||||
});
|
||||
params.shopAdsUrl = shopAdsUrl.join(',');
|
||||
|
||||
var loading = WST.load({msg:'正在提交数据,请稍后...'});
|
||||
|
||||
$.post(WST.U('home/shopconfigs/editShopCfg'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg("操作成功",{icon:1});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(function(){
|
||||
//店铺顶部广告图上传
|
||||
WST.upload({
|
||||
pick:'#shopBannerPicker',
|
||||
formData: {dir:'shopconfigs'},
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
$('#uploadMsg').empty().hide();
|
||||
var shopbanner = json.savePath+json.thumb; //保存到数据库的路径
|
||||
$('#shopBanner').val(shopbanner);
|
||||
$('#shopBannerPreview').parent().show();
|
||||
$('.del-banner').show();
|
||||
$('#shopBannerPreview').attr('src',WST.conf.IMGURL+'/'+json.savePath+json.thumb);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
|
||||
// 店铺街背景图上传
|
||||
WST.upload({
|
||||
pick:'#shopStreetImgPicker',
|
||||
formData: {dir:'shopconfigs'},
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
$('#uploadMsg').empty().hide();
|
||||
var shopbanner = json.savePath+json.thumb; //保存到数据库的路径
|
||||
$('#shopStreetImg').val(shopbanner);
|
||||
$('#shopStreetImgPreview').parent().show();
|
||||
$('.del-banner').show();
|
||||
$('#shopStreetImgPreview').attr('src',WST.conf.IMGURL+'/'+json.savePath+json.thumb);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
|
||||
/********** 轮播广告图片上传 **********/
|
||||
var uploader = batchUpload({uploadPicker:'#batchUpload',uploadServer:WST.U('home/index/uploadPic'),formData:{dir:'shopconfigs'},uploadSuccess:function(file,response){
|
||||
var json = WST.toJson(response);
|
||||
if(json.status==1){
|
||||
$li = $('#'+file.id);
|
||||
$li.append('<input type="hidden" class="j-gallery-img" iv="'+json.savePath + json.thumb+'" v="' +json.savePath + json.name+'"/>');
|
||||
var delBtn = $('<span class="btn-del">删除</span>');
|
||||
$li.append(delBtn);
|
||||
$li.append('<input class="cfg-img-url" type="text" value="" style="width:170px;" placeholder="广告路径">' );
|
||||
$li.css('height','212px');
|
||||
$li.find('.success').remove();
|
||||
delBtn.on('click',function(){
|
||||
delBatchUploadImg($(this),function(){
|
||||
uploader.removeFile(file);
|
||||
uploader.refresh();
|
||||
});
|
||||
});
|
||||
$('.filelist li').css('border','1px solid #f7375c');
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
}});
|
||||
// 删除广告图片
|
||||
$('.btn-del').click(function(){
|
||||
delBatchUploadImg($(this),function(){
|
||||
$(this).parent().remove();
|
||||
});
|
||||
})
|
||||
|
||||
function delBatchUploadImg(obj){
|
||||
var c = WST.confirm({content:'您确定要删除广告图片吗?',yes:function(){
|
||||
$(obj).parent().remove("li");
|
||||
layer.close(c);
|
||||
}});
|
||||
}
|
||||
|
||||
|
||||
});
|
86
hyhproject/home/view/default/shops/shoproles/edit.html
Executable file
86
hyhproject/home/view/default/shops/shoproles/edit.html
Executable file
@ -0,0 +1,86 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}角色管理-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>角色管理</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-shop-content">
|
||||
{php}$homeMenus = WSTHomeMenus(1);{/php}
|
||||
<form name="shoprole" id="shoprole" autocomplete="off">
|
||||
<table class="wst-form">
|
||||
<tr>
|
||||
<th width='120' align='right'>角色名称<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='hidden' id='id' name='id' class="ipt" value='{$object.id}' />
|
||||
<input type='text' id='roleName' name='roleName' class="ipt" value='{$object.roleName}' data-rule='请输入角色名称:required;' style='width:350px;' maxLength='25' />
|
||||
<span>设定角色名称,方便区分权限类型。</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>操作权限:</th>
|
||||
<td>
|
||||
<div >
|
||||
{volist name="$homeMenus['menus']" key="k1" id="menus1"}
|
||||
<dl {$k1==count($homeMenus['menus'])?"style='border-bottom:0'":""}>
|
||||
<dt class="dt1">
|
||||
<label><input type="checkbox" id="{$menus1['menuId']}" class="role_{$menus1['menuId']}" value="{$menus1['menuId']}" onclick="javascript:WST.checkChks(this,'.role_{$menus1['menuId']}')"/> {$menus1["menuName"]}</label>
|
||||
</dt>
|
||||
<dd class="dd1">
|
||||
{volist name="$menus1['list']" key="k2" id="menus2"}
|
||||
<dl {$k2==count($menus1['list'])?"style='border-bottom:0'":""}>
|
||||
<dt class="dt2">
|
||||
<label><input type="checkbox" id="{$menus2['menuId']}" class="role_{$menus1['menuId']}" value="{$menus2['menuId']}" onclick="javascript:WST.checkChks(this,'.role_{$menus2['menuId']}')" /> {$menus2["menuName"]}</label>
|
||||
</dt>
|
||||
<dd class="dd2">
|
||||
{if isset($menus2['list'])}
|
||||
{volist name="$menus2['list']" id="menus3"}
|
||||
<label>
|
||||
|
||||
<input type="checkbox" id="{$menus3['menuId']}" name="menuIds" class="role_{$menus1['menuId']} role_{$menus2['menuId']} ipt" value="{$menus3['menuId']}" {if isset($object['menuUrls'])}{:in_array(strtolower($menus3['menuUrl']),$object['menuUrls'])?"checked":""}{/if}/> {$menus3["menuName"]}
|
||||
</label>
|
||||
{/volist}
|
||||
{/if}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
{/volist}
|
||||
</dd>
|
||||
</dl>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>消息接收权限:</th>
|
||||
<td>
|
||||
{volist name=":WSTDatas('SHOP_MESSAGE')" id="vo"}
|
||||
<label>
|
||||
|
||||
<input type="checkbox" name="privilegeMsgs" class="ipt" value="{$vo['dataVal']}" {if $object['privilegeMsgs']}{:in_array($vo['dataVal'],$object['privilegeMsgs'])?"checked":""}{/if}/> {$vo["dataName"]}
|
||||
|
||||
</label>
|
||||
{/volist}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center;padding:20px;'>
|
||||
<a class='s-btn' href="javascript:save()">保 存</a>
|
||||
<a class='s-btn2' href='{:url("home/shoproles/index")}'>返 回</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/shoproles/shoproles.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
{/block}
|
54
hyhproject/home/view/default/shops/shoproles/list.html
Executable file
54
hyhproject/home/view/default/shops/shoproles/list.html
Executable file
@ -0,0 +1,54 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}店铺角色-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>店铺角色管理</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
角色名称:<input type='text' id="roleName" name='roleName' class="s-query" />
|
||||
<a class="s-btn" onclick="queryByPage(0)">查询</a>
|
||||
<a class="s-btn wst-list-add" href='{:url("home/shoproles/add")}'>添加</a>
|
||||
</div>
|
||||
|
||||
<div class="wst-shop-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="40">序号</th>
|
||||
<th width="300">角色名称</th>
|
||||
<th>创建时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loading' style='display:none'>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='4' style='padding-top:10px;text-align:center;'>
|
||||
<div id='pager'></div>
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{d[i]["roleName"]}}</td>
|
||||
<td>{{d[i]["createTime"]}}</td>
|
||||
<td>
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]["id"]}})'>[编辑]</a>
|
||||
<a class="g-handle" href='javascript:del({{d[i]["id"]}})'>[删除]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/shoproles/shoproles.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){queryByPage()})
|
||||
</script>
|
||||
{/block}
|
72
hyhproject/home/view/default/shops/shoproles/shoproles.js
Executable file
72
hyhproject/home/view/default/shops/shoproles/shoproles.js
Executable file
@ -0,0 +1,72 @@
|
||||
|
||||
|
||||
function queryByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.page = p;
|
||||
$.post(WST.U('home/shoproles/pageQuery'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('#list').empty();
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
queryByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function toEdit(id){
|
||||
location.href = WST.U('home/shoproles/edit','id='+id);
|
||||
}
|
||||
|
||||
/**保存角色数据**/
|
||||
function save(){
|
||||
$('#shoprole').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shoproles/'+((params.id==0)?"toAdd":"toEdit")),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
location.href=WST.U('home/shoproles/index');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//删除角色
|
||||
function del(id){
|
||||
var c = WST.confirm({content:'您确定要删除该角色吗?',yes:function(){
|
||||
layer.close(c);
|
||||
var load = WST.load({msg:'正在删除,请稍后...'});
|
||||
$.post(WST.U('home/shoproles/del'),{id:id},function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
queryByPage(0);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
44
hyhproject/home/view/default/shops/shops/notice.html
Executable file
44
hyhproject/home/view/default/shops/shops/notice.html
Executable file
@ -0,0 +1,44 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}首页-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>店铺公告</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class='wst-shop-content' style='margin-top:0px;'>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="7%" style="padding-right:5px;">店铺公告:</td>
|
||||
<td width="93%">
|
||||
<textarea style="width:100%;height:200px;resize:none" placeholder='请保持在150个字以内' class="ipt" id="shopNotice" maxlength='150'>{$notice}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button onclick="toEdits()" class="wst-shop-but" style="margin-left: 45%;padding: 5px 10px;margin-top: 20px;">保 存</button>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
|
||||
<script>
|
||||
function toEdits(id){
|
||||
var params = WST.getParams('.ipt');
|
||||
console.log(params.shopNotice.length);
|
||||
if(params.shopNotice.length>150){
|
||||
WST.msg('店铺公告不能超过150个字',{icon:2});
|
||||
return;
|
||||
}
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shops/editNotice'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{/block}
|
76
hyhproject/home/view/default/shops/shops/shops.js
Executable file
76
hyhproject/home/view/default/shops/shops/shops.js
Executable file
@ -0,0 +1,76 @@
|
||||
var isShopUploadinit = false;
|
||||
function toEdit(type){
|
||||
$('#einfo_'+type).show();
|
||||
$('#vinfo_'+type).hide();
|
||||
if(!isShopUploadinit){
|
||||
isShopUploadinit = true;
|
||||
WST.upload({
|
||||
pick:'#shopImgPicker',
|
||||
formData: {dir:'shops'},
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
$('#uploadMsg').empty().hide();
|
||||
$('#preview').attr('src',WST.conf.IMGURL+"/"+json.savePath+json.thumb);
|
||||
$('#shopImg').val(json.savePath+json.name);
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
initTime('#serviceStartTime',$('#serviceStartTime').attr('v'));
|
||||
initTime('#serviceEndTime',$('#serviceStartTime').attr('v'));
|
||||
}
|
||||
}
|
||||
function initTime($id,val){
|
||||
var html = [],t0,t1;
|
||||
var str = val.split(':');
|
||||
for(var i=0;i<24;i++){
|
||||
t0 = (val.indexOf(':00')>-1 && (parseInt(str[0],10)==i))?'selected':'';
|
||||
t1 = (val.indexOf(':30')>-1 && (parseInt(str[0],10)==i))?'selected':'';
|
||||
html.push('<option value="'+i+':00" '+t0+'>'+i+':00</option>');
|
||||
html.push('<option value="'+i+':30" '+t1+'>'+i+':30</option>');
|
||||
}
|
||||
$($id).append(html.join(''));
|
||||
}
|
||||
function toCancel(type){
|
||||
$('#einfo_'+type).hide();
|
||||
$('#vinfo_'+type).show();
|
||||
}
|
||||
|
||||
function editInfo(){
|
||||
$('#editFrom_1').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.ipt_1');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shops/editInfo'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
$('#v_shopImg').attr('src',WST.conf.IMGURL+"/"+params.shopImg);
|
||||
$('#v_shopQQ').html(params.shopQQ);
|
||||
$('#v_shopWangWang').html(params.shopWangWang);
|
||||
if(params.isInvoice==1){
|
||||
$('#tr_isInvoice').show();
|
||||
$('#v_isInvoice').html("提供发票");
|
||||
}else{
|
||||
$('#tr_isInvoice').hide();
|
||||
$('#v_isInvoice').html("不提供发票");
|
||||
}
|
||||
$('#v_freight').html(params.freight);
|
||||
$('#v_serviceStartTime').html(params.serviceStartTime);
|
||||
$('#v_serviceEndTime').html(params.serviceEndTime);
|
||||
$('#einfo_1').hide();
|
||||
$('#vinfo_1').show();
|
||||
window.location.reload();
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
246
hyhproject/home/view/default/shops/shops/view.html
Executable file
246
hyhproject/home/view/default/shops/shops/view.html
Executable file
@ -0,0 +1,246 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}店铺信息-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<style>
|
||||
label{margin-right:10px;}
|
||||
</style>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>店铺信息</li>
|
||||
<li>银行信息</li>
|
||||
</ul>
|
||||
<div class="wst-tab-content" style='width:99%;margin-bottom: 10px;'>
|
||||
<div class="wst-tab-item" style="position: relative;">
|
||||
<table id='vinfo_1' class='wst-form'>
|
||||
<tr>
|
||||
<th width='150'>店铺编号:</th>
|
||||
<td>{$object['shopSn']}
|
||||
<!--<a href='javascript:toEdit(1)' style='float:right;'>编辑</a>-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺名称:</th>
|
||||
<td>{$object['shopName']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺联系人:</th>
|
||||
<td>{$object['shopkeeper']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺联系电话:</th>
|
||||
<td>{$object['telephone']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>公司名称:</th>
|
||||
<td>{$object['shopCompany']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>公司坐机电话:</th>
|
||||
<td>{$object['shopTel']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>经营类目:</th>
|
||||
<td>{$object['catshopNames']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>认证类型:</th>
|
||||
<td>
|
||||
{php}$accredLen = count($object['accreds']);{/php}
|
||||
{volist name="$object['accreds']" id="vo"}
|
||||
{$vo["accredName"]}{if $i < $accredLen }、{/if}
|
||||
{/volist}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺图标:</th>
|
||||
<td>
|
||||
<img id='v_shopImg' width='150' height='150' src='__IMGURL__/{$object["shopImg"]}'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>客服QQ:</th>
|
||||
<td id='v_shopQQ'>{$object['shopQQ']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>旺旺:</th>
|
||||
<td id='v_shopWangWang'>{$object['shopWangWang']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺地址:</th>
|
||||
<td>
|
||||
{$object['areaName']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>店铺详细地址:</th>
|
||||
<td>{$object['shopAddress']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否提供开发票:</th>
|
||||
<td id='v_isInvoice'>
|
||||
{if $object['isInvoice']==1}提供发票{/if}
|
||||
{if $object['isInvoice']==0}不提供发票{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='tr_isInvoice' {if $object['isInvoice']==0}style='display:none'{/if}>
|
||||
<th>发票说明:</th>
|
||||
<td id='v_invoiceRemarks'>{$object['invoiceRemarks']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>默认运费:</th>
|
||||
<td >¥<span id='v_freight'>{$object['freight']}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>服务时间:</th>
|
||||
<td><span id='v_serviceStartTime'>{$object['serviceStartTime']}</span>至<span id='v_serviceEndTime'>{$object['serviceEndTime']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- mark by cheng 添加更明显的编辑信息按钮-->
|
||||
<tr>
|
||||
<td colspan='2' style="text-align:center">
|
||||
<a class='s-btn' href='javascript:toEdit(1)'>编辑信息</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div></div>
|
||||
<form id='editFrom_1' autocomplete="off">
|
||||
<table id='einfo_1' class='wst-form hide'>
|
||||
<tr>
|
||||
<th width='150'>店铺图标<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<img id='preview' width='150' height='150' src='__IMGURL__/{$object["shopImg"]}'/>
|
||||
<div id='shopImgPicker'>请上传店铺图标</div><span id='uploadMsg'></span>
|
||||
<input type='hidden' id='shopImg' class='ipt_1' value='{$object["shopImg"]}'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>客服QQ:</th>
|
||||
<td>
|
||||
<input class="ipt_1" id="shopQQ" value="{$object['shopQQ']}" type="text" style='width:60%'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<td>
|
||||
<span style='color:gray;'>做为客服接收临时消息的QQ,需开通<a target="_blank" href="http://shang.qq.com/v3/index.html">QQ推广功能</a> -> '首页'-> '推广工具'-> '立即免费开通'</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>旺旺类型<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<label>
|
||||
<input type='radio' value='0' class="ipt_1" name='shopWangWangType'{if $object['shopWangWangType']==0}checked{/if}/>淘宝旺旺
|
||||
</label>
|
||||
<label>
|
||||
<input type='radio' value='1' class="ipt_1" name='shopWangWangType'{if $object['shopWangWangType']==1}checked{/if}/>阿里旺旺(1688诚信通)
|
||||
</label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>旺旺号:</th>
|
||||
<td><input class="ipt_1" id="shopWangWang" value="{$object['shopWangWang']}" type="text" style='width:60%'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否提供开发票<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<label>
|
||||
<input type='radio' value='1' class="ipt_1" name='isInvoice' onclick='javascript:WST.showHide(1,"#trInvoice")' {if $object['isInvoice']==1}checked{/if}/>提供
|
||||
</label>
|
||||
<label>
|
||||
<input type='radio' value='0' class="ipt_1" name='isInvoice' onclick='javascript:WST.showHide(0,"#trInvoice")' {if $object['isInvoice']==0}checked{/if}/>不提供
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='trInvoice' {if $object['isInvoice']==0}style='display:none'{/if}>
|
||||
<th>发票说明<font color='red'>*</font>:</th>
|
||||
<td><input class="ipt_1" id="invoiceRemarks" value="{$object['invoiceRemarks']}" type="text" style='width:60%' data-rule="发票说明:required(#isInvoice1:checked)"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>默认运费<font color='red'>*</font>:</th>
|
||||
<td><input class="ipt_1" id="freight" value="{$object['freight']}" size='5' maxlength="10" data-rule="默认运费:required;" type="text">¥</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>服务时间<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select class='ipt_1' id='serviceStartTime' v="{$object['serviceStartTime']}"></select>
|
||||
至
|
||||
<select class='ipt_1' id='serviceEndTime' v="{$object['serviceEndTime']}"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><font color='red'>小提示*</font>:</th>
|
||||
<td>银行结算信息只能修改一次,除非必要请不要修改,当前修改次数:<font color='red'>({$object['changeNum']})</font>次</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>开户银行名称<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select id='bankId' class='ipt_1' data-rule='结算银行账号:required;'>
|
||||
{foreach $bankList as $v}
|
||||
<option value="{$v['bankId']}" {if $object['bankId']==$v['bankId']}selected{/if}>{$v['bankName']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>卡号<font color='red'>*</font>:</th>
|
||||
<td><input class="ipt_1" id="bankNo" value="{$object['bankNo']}" type="text" style='width:60%'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>持卡人<font color='red'>*</font>:</th>
|
||||
<td><input class="ipt_1" id="bankUserName" value="{$object['bankUserName']}" type="text" style='width:60%'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style="text-align:center">
|
||||
<a class='s-btn' href='javascript:editInfo()'>保存</a>
|
||||
<a class='s-btn2' href='javascript:toCancel(1)'>取消</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="wst-tab-item" style="display:none;">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='150'>开卡银行:</th>
|
||||
<td>{$object['bankName']}</td>
|
||||
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th width='150'>开卡地区:</th>
|
||||
<td>{$object['bankAreaName']}</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th>卡号:</th>
|
||||
<td>{$object['bankNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>持卡人:</th>
|
||||
<td>{$object['bankUserName']}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/shops/shops.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#tab').TabPanel({tab:0,callback:function(no){}});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
61
hyhproject/home/view/default/shops/shopusers/add.html
Executable file
61
hyhproject/home/view/default/shops/shopusers/add.html
Executable file
@ -0,0 +1,61 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}新增帐号-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>新增帐号</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-shop-content">
|
||||
<form name="editForm" id="editForm" autocomplete="off">
|
||||
<table class='wst-form uinfo-form' >
|
||||
<tr>
|
||||
<td width="100"><font color='red'>*</font>用户名</td>
|
||||
<td class="uinfo">
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<input type='hidden' id='id' name='id' class="ipt" value='0' />
|
||||
<input id="loginName" name="loginName" class="ipt wst-regist-input" tabindex="1" maxlength="30" autocomplete="off" onpaste="return false;" style="ime-mode:disabled;" placeholder="邮箱/用户名/手机号" data-rule='请输入用户名:required;' type="text" onkeyup="javascript:WST.isChinese(this,1)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color='red'>*</font>密码</td>
|
||||
<td class="uinfo">
|
||||
<input id="loginPwd" name="loginPwd" class="ipt wst-regist-input" tabindex="2" style="ime-mode:disabled;" autocomplete="off" type="password" placeholder="6-16位字符" data-rule='请输入密码:required;'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color='red'>*</font>确认密码</td>
|
||||
<td class="uinfo">
|
||||
<input id="reUserPwd" name="reUserPwd" class="ipt wst-regist-input" tabindex="3" autocomplete="off" type="password" placeholder="6-16位字符" data-rule="确认密码: required; match(loginPwd)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color='red'>*</font>角色</td>
|
||||
<td>
|
||||
<select id="roleId" data-rule="required" class="ipt">
|
||||
{volist name="roles" id="role"}
|
||||
<option value="{$role['id']}">{$role["roleName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style="text-align:center">
|
||||
<a class='s-btn' href="javascript:add()">保 存</a>
|
||||
<a class='s-btn2' href='{:url("home/shopusers/index")}'>返 回</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/shopusers/shopusers.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
{/block}
|
80
hyhproject/home/view/default/shops/shopusers/edit.html
Executable file
80
hyhproject/home/view/default/shops/shopusers/edit.html
Executable file
@ -0,0 +1,80 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}编辑帐号-卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-body">
|
||||
<div class="wst-shop-head"><span>编辑帐号</span></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-shop-content">
|
||||
<form name="editForm" id="editForm" autocomplete="off">
|
||||
<table class='wst-form uinfo-form' >
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class='wst-tips-box'>
|
||||
<div class='icon'></div>
|
||||
<div class='tips'>
|
||||
1.新密码为空,则不修改帐号密码。<br/>
|
||||
2.店铺管理员不能修改角色。</div>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100"><font color='red'>*</font>帐号名</td>
|
||||
<td class="uinfo">
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<input type='hidden' id='id' name='id' class="ipt" value='{$object["id"]}' />
|
||||
{$object["loginName"]}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>原密码</td>
|
||||
<td class="uinfo">
|
||||
<input id="oldPass" name="oldPass" class="ipt wst-regist-input" tabindex="2" style="ime-mode:disabled;" autocomplete="off" type="password" placeholder="6-16位字符"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>新密码</td>
|
||||
<td class="uinfo">
|
||||
<input id="newPass" name="newPass" class="ipt wst-regist-input" tabindex="2" style="ime-mode:disabled;" autocomplete="off" type="password" placeholder="6-16位字符"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>确认新密码</td>
|
||||
<td class="uinfo">
|
||||
<input id="reNewPass" name="reNewPass" class="ipt wst-regist-input" tabindex="3" autocomplete="off" type="password" placeholder="6-16位字符" data-rule="确认密码: match(newPass)"/>
|
||||
</td>
|
||||
</tr>
|
||||
{if $object["roleId"]>0}
|
||||
<tr>
|
||||
<td><font color='red'>*</font>角色</td>
|
||||
<td>
|
||||
<select id="roleId" data-rule="required" class="ipt">
|
||||
{volist name="roles" id="role"}
|
||||
<option value="{$role['id']}" {if $object["roleId"]==$role['id']}selected{/if}>{$role["roleName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td colspan='2' style="text-align:center">
|
||||
<a class='s-btn' href="javascript:edit()">保 存</a>
|
||||
<a class='s-btn2' href='{:url("home/shopusers/index")}'>返 回</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/shops/shopusers/shopusers.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
{/block}
|
57
hyhproject/home/view/default/shops/shopusers/list.html
Executable file
57
hyhproject/home/view/default/shops/shopusers/list.html
Executable file
@ -0,0 +1,57 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}店铺用户管理-卖家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>店铺帐号管理</span></div>
|
||||
<div class='wst-shop-tbar'>
|
||||
帐号名:<input type='text' id="userName" class="s-query" id='userName'/>
|
||||
<a class="s-btn" onclick="queryByPage(0)">查询</a>
|
||||
<a class="s-btn wst-list-add" href='{:url("home/shopusers/add")}'>添加</a>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="40">序号</th>
|
||||
<th width="200">帐号名</th>
|
||||
<th width="200">角色名称</th>
|
||||
<th>创建时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loading' style='display:none'>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='5'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='5' style='padding-top:10px;text-align:center;'>
|
||||
<div id='pager'></div>
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{d[i]["loginName"]}}</td>
|
||||
<td>{{d[i]["roleId"]?d[i]["roleName"]:"管理员"}}</td>
|
||||
<td>{{d[i]["createTime"]}}</td>
|
||||
<td>
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]["id"]}})'>[编辑]</a>
|
||||
{{# if(d[i]["roleId"]>0){ }}
|
||||
<a class="g-handle" href='javascript:del({{d[i]["id"]}})'>[删除]</a>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/shopusers/shopusers.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){queryByPage()})
|
||||
</script>
|
||||
{/block}
|
110
hyhproject/home/view/default/shops/shopusers/shopusers.js
Executable file
110
hyhproject/home/view/default/shops/shopusers/shopusers.js
Executable file
@ -0,0 +1,110 @@
|
||||
|
||||
|
||||
function queryByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.page = p;
|
||||
$.post(WST.U('home/shopusers/pageQuery'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('#list').empty();
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
queryByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function toEdit(id){
|
||||
location.href = WST.U('home/shopusers/edit','id='+id);
|
||||
}
|
||||
|
||||
/**保存角色数据**/
|
||||
function add(){
|
||||
$('#editForm').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.ipt');
|
||||
if(WST.conf.IS_CRYPT=='1'){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
params.loginPwd = rsa.encrypt(params.loginPwd);
|
||||
params.reUserPwd = rsa.encrypt(params.reUserPwd);
|
||||
}
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shopusers/toAdd'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
location.href=WST.U('home/shopusers/index');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$('#editForm').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.ipt');
|
||||
if(WST.conf.IS_CRYPT=='1' && params.newPass!=""){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
params.oldPass = rsa.encrypt(params.oldPass);
|
||||
params.newPass = rsa.encrypt(params.newPass);
|
||||
params.reNewPass = rsa.encrypt(params.reNewPass);
|
||||
}
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/shopusers/toEdit'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
location.href=WST.U('home/shopusers/index');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//删除角色
|
||||
function del(id){
|
||||
var c = WST.confirm({content:'删除店铺管理帐号,只是删除该帐号与店铺的关系,您确定要删除吗?',yes:function(){
|
||||
layer.close(c);
|
||||
var load = WST.load({msg:'正在删除,请稍后...'});
|
||||
$.post(WST.U('home/shopusers/del'),{id:id},function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
queryByPage(0);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
110
hyhproject/home/view/default/shops/stockwarn/list.html
Executable file
110
hyhproject/home/view/default/shops/stockwarn/list.html
Executable file
@ -0,0 +1,110 @@
|
||||
{extend name="default/shops/base" /}
|
||||
{block name="title"}库存预警 - 卖家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-shop-head"><span>库存预警</span></div>
|
||||
<div class="wst-shop-tbar">
|
||||
<label>
|
||||
商品分类:
|
||||
<select name="cat1" id="cat1" onchange="getCat(this.value)" class="s-query">
|
||||
<option value="">-请选择-</option>
|
||||
{volist name=":WSTShopCats(0)" id="vo"}
|
||||
<option value="{$vo['catId']}" >{$vo['catName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<select name="cat2" id="cat2" class="s-query"><option value="">-请选择-</option></select>
|
||||
<a class="s-btn" onclick="stockByPage()" style='margin-top:5px;'>查询</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="wst-shop-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="220">商品名称</th>
|
||||
<th>货号</th>
|
||||
<th>规格</th>
|
||||
<th width="130">库存<font color='red'>(红色双击编辑)</font></th>
|
||||
<th width="130">预警<font color='red'>(红色双击编辑)</font></th>
|
||||
<th width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr align="center"><td colspan='10' id='pager' align="center" style='padding:5px 0px 5px 0px'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
{{# if(d[i]['isSpec']==1) { }}
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-goodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{d[i]['productNo']}}</td>
|
||||
<td>
|
||||
<span class="spec">
|
||||
{{# for(var s = 0; s < d[i].spec.length; s++){ }}
|
||||
{{d[i].spec[s]['catName']}}:{{d[i].spec[s]['itemName']}};
|
||||
{{# } }}
|
||||
</span>
|
||||
</td>
|
||||
<td width="40" ondblclick="javascript:toEditGoodsStock({{d[i]['id']}},1)">
|
||||
<input id="ipt_1_{{d[i]['id']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsStock({{d[i]['id']}},1,{{d[i]['goodsId']}})" class="stockin" maxlength="6"/>
|
||||
<span id="span_1_{{d[i]['id']}}" style="display: inline;cursor:pointer;color:#f30505;">{{d[i]['goodsStock']}}</span>
|
||||
</td>
|
||||
<td width="40" ondblclick="javascript:toEditGoodsStock({{d[i]['id']}},2)">
|
||||
<input id="ipt_2_{{d[i]['id']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsStock({{d[i]['id']}},2,{{d[i]['goodsId']}})" class="stockin" maxlength="6"/>
|
||||
<span id="span_2_{{d[i]['id']}}" style="display: inline;cursor:pointer;color:#f30505;">{{d[i]['warnStock']}}</span>
|
||||
</td>
|
||||
<td><a class="g-handle" href='javascript:toEdit({{d[i]['goodsId']}},"sale")'>[进入商品编辑]</a></td>
|
||||
{{# }else{ }}
|
||||
<td>
|
||||
<div class="goods-img">
|
||||
<a href="{{WST.U("home/goods/detail","id="+d[i]['goodsId']+"&key="+d[i]['verfiycode'])}}">
|
||||
<img class='j-goodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="goodsName">
|
||||
{{WST.cutStr(d[i]['goodsName'],43)}}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{d[i]['productNo']}}</td>
|
||||
<td>无</td>
|
||||
{{# if(d[i]['goodsType']==0){ }}
|
||||
<td width="40" ondblclick="javascript:toEditGoodsStock({{d[i]['goodsId']}},3)">
|
||||
<input id="ipt_3_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsStock({{d[i]['goodsId']}},3)" class="stockin" maxlength="6"/>
|
||||
<span id="span_3_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:#f30505;">{{d[i]['goodsStock']}}</span>
|
||||
</td>
|
||||
<td width="40" ondblclick="javascript:toEditGoodsStock({{d[i]['goodsId']}},4)">
|
||||
<input id="ipt_4_{{d[i]['goodsId']}}" onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)" onblur="javascript:editGoodsStock({{d[i]['goodsId']}},4)" class="stockin" maxlength="6"/>
|
||||
<span id="span_4_{{d[i]['goodsId']}}" style="display: inline;cursor:pointer;color:#f30505;">{{d[i]['warnStock']}}</span>
|
||||
</td>
|
||||
{{# }else{ }}
|
||||
<td width="40">{{d[i]['goodsStock']}}</td>
|
||||
<td width="40">{{d[i]['warnStock']}}</td>
|
||||
{{#}}}
|
||||
<td>
|
||||
{{#if(d[i]['goodsType']==1){}}
|
||||
<a class="g-handle" href='javascript:toStock({{d[i]['goodsId']}},"stockWarnByPage")'>[进入卡券编辑]</a>
|
||||
{{#}else{}}
|
||||
<a class="g-handle" href='javascript:toEdit({{d[i]['goodsId']}},"sale")'>[进入商品编辑]</a>
|
||||
{{#}}}
|
||||
</td>
|
||||
|
||||
{{# } }}
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/stockwarn/stockwarn.js?v={$v}'></script>
|
||||
{/block}
|
95
hyhproject/home/view/default/shops/stockwarn/stockwarn.js
Executable file
95
hyhproject/home/view/default/shops/stockwarn/stockwarn.js
Executable file
@ -0,0 +1,95 @@
|
||||
$(function(){
|
||||
stockByPage();
|
||||
});
|
||||
function toStock(id,src){
|
||||
location.href=WST.U('home/goodsvirtuals/stock','id='+id+"&src="+src);
|
||||
}
|
||||
function stockByPage(p){
|
||||
$('#list').html('<tr><td colspan="11"><img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...</td></tr>');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.page = p;
|
||||
$.post(WST.U('home/goods/stockByPage'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1 && json.Rows){
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
$('.j-goodsImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
stockByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function toEdit(id,src){
|
||||
location.href = WST.U('home/goods/edit','id='+id+'&src='+src);
|
||||
}
|
||||
//双击修改
|
||||
function toEditGoodsStock(id,type){
|
||||
$("#ipt_"+type+"_"+id).show();
|
||||
$("#span_"+type+"_"+id).hide();
|
||||
$("#ipt_"+type+"_"+id).focus();
|
||||
$("#ipt_"+type+"_"+id).val($("#span_"+type+"_"+id).html());
|
||||
}
|
||||
function endEditGoodsStock(type,id){
|
||||
$('#span_'+type+'_'+id).html($('#ipt_'+type+'_'+id).val());
|
||||
$('#span_'+type+'_'+id).show();
|
||||
$('#ipt_'+type+'_'+id).hide();
|
||||
}
|
||||
function editGoodsStock(id,type,goodsId){
|
||||
var number = $('#ipt_'+type+'_'+id).val();
|
||||
if($.trim(number)==''){
|
||||
WST.msg('库存不能为空', {icon: 5});
|
||||
return;
|
||||
}
|
||||
var params = {};
|
||||
params.id = id;
|
||||
params.type = type;
|
||||
params.goodsId = goodsId;
|
||||
params.number = number;
|
||||
$.post(WST.U('Home/Goods/editwarnStock'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
$('#img_'+type+'_'+id).fadeTo("fast",100);
|
||||
endEditGoodsStock(type,id);
|
||||
$('#img_'+type+'_'+id).fadeTo("slow",0);
|
||||
}else{
|
||||
WST.msg(json.msg, {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getCat(val){
|
||||
if(val==''){
|
||||
$('#cat2').html("<option value='' >-请选择-</option>");
|
||||
return;
|
||||
}
|
||||
$.post(WST.U('home/shopcats/listQuery'),{parentId:val},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
var html = [],cat;
|
||||
html.push("<option value='' >-请选择-</option>");
|
||||
if(json.status==1 && json.list){
|
||||
json = json.list;
|
||||
for(var i=0;i<json.length;i++){
|
||||
cat = json[i];
|
||||
html.push("<option value='"+cat.catId+"'>"+cat.catName+"</option>");
|
||||
}
|
||||
}
|
||||
$('#cat2').html(html.join(''));
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user