You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
152
hyhproject/wechat2/view/default/users/orders/list_complains.html
Executable file
152
hyhproject/wechat2/view/default/users/orders/list_complains.html
Executable file
@ -0,0 +1,152 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的投诉 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/list_complains.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}
|
||||
$we = WSTWechat();
|
||||
$datawx = $we->getJsSignature(request()->scheme()."://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
{/php}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>我的投诉</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<script type="text/html" id="complainList">
|
||||
<ul class="ui-row">
|
||||
{{# for(var i=0;i<d.length;i++){ }}
|
||||
<div class="complain-box">
|
||||
<li class="ui-col ui-col-50" onclick="javascript:WST.intoShops({{d[i].shopId}});">{{d[i].shopName}}</li>
|
||||
<li class="ui-col ui-col-50 c-tr">{{d[i].complainTime}}</li>
|
||||
<div class="c-item" onclick="complainDetail({{d[i].complainId}})">
|
||||
<li class="ui-col ui-col-75">订单号:{{d[i].orderNo}}</li>
|
||||
<li class="ui-col ui-col-25 c-tr wst-co-status">{{d[i].complainStatus}}</li>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="c-line"></div>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
<div id="complain-list"></div>
|
||||
</section>
|
||||
<script type="text/html" id="complainDetail">
|
||||
<ul class="ui-row com-detail-box">
|
||||
<li class="ui-col ui-col-100 com-detail-big-title">投诉信息</li>
|
||||
<li class="ui-col ui-col-25 com-detail-title">订单编号:</li>
|
||||
<li class="ui-col ui-col-75">{{d.orderNo}}</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">投诉内容:</li>
|
||||
<li class="ui-col ui-col-75">{{d.complainContent}}</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">投诉类型:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{# if (d.complainType==1){ }}
|
||||
承诺的没有做到
|
||||
{{# } else if (d.complainType==2) { }}
|
||||
未按约定时间发货
|
||||
{{# } else if (d.complainType==3) { }}
|
||||
未按成交价格进行交易
|
||||
{{# } else if (d.complainType==4) { }}
|
||||
恶意骚扰
|
||||
{{# } }}
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">附件:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{# if(d.complainAnnex){ }}
|
||||
{{# for(var c=0;c<d.complainAnnex.length;c++){ }}
|
||||
<img src="__ROOT__/{{d.complainAnnex[c]}}" style="width:60px;height:60px;" class="imgurl" onclick="javascript:getImg(this);">
|
||||
{{# } }}
|
||||
{{# }else{ }}
|
||||
无
|
||||
{{# } }}
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">投诉时间:</li>
|
||||
<li class="ui-col ui-col-75">{{d.complainTime}}</li>
|
||||
</ul>
|
||||
|
||||
|
||||
{{# if (d.needRespond==1 && WST.blank(d.respondContent)!=''){ }}
|
||||
|
||||
<ul class="ui-row com-detail-box">
|
||||
<li class="ui-col ui-col-100 com-detail-big-title">应诉信息</li>
|
||||
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">应诉内容:</li>
|
||||
<li class="ui-col ui-col-75">{{d.respondContent}}</li>
|
||||
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">附件:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{# if(d.respondAnnex){ }}
|
||||
{{# for(var r=0;r<d.respondAnnex.length;r++){ }}
|
||||
<img src="__ROOT__/{{d.respondAnnex[r]}}" class="annex">
|
||||
{{# } }}
|
||||
{{# }else{ }}
|
||||
无
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 com-detail-title">应诉时间:</li>
|
||||
<li class="ui-col ui-col-75">{{d.respondTime}}</li>
|
||||
</ul>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<ul class="ui-row com-detail-box">
|
||||
<li class="ui-col ui-col-100 com-detail-big-title">仲裁信息【
|
||||
{{# if(d.complainStatus==0){ }}
|
||||
等待处理
|
||||
{{# }else if(d.complainStatus==1){ }}
|
||||
等待应诉人回应
|
||||
{{# }else if(d.complainStatus==2 || d.complainStatus==3){ }}
|
||||
等待仲裁
|
||||
{{# }else if(d.complainStatus==4){ }}
|
||||
已仲裁
|
||||
{{# } }}
|
||||
】</li>
|
||||
|
||||
{{# if(d.complainStatus==4){ }}
|
||||
<li class="ui-col ui-col-25 com-detail-title">仲裁结果:</li>
|
||||
<li class="ui-col ui-col-75">{{d.finalResult}}</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">仲裁时间:</li>
|
||||
<li class="ui-col ui-col-75">{{d.finalResultTime}}</li>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 分类层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title"><span>投诉详情</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="complainDetailBox">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/list_complains.js?v={$v}'></script>
|
||||
{php}if($datawx['status']==1){ {/php}
|
||||
<script src="{:request()->scheme()}://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
||||
<script>
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: '<?php echo $we->appId;?>', //公众号的唯一标识
|
||||
timestamp: '<?php echo $datawx['timestamp'];?>', //生成签名的时间戳
|
||||
nonceStr: '<?php echo $datawx['noncestr'];?>', //生成签名的随机串
|
||||
signature: '<?php echo $datawx['signature'];?>',//签名
|
||||
jsApiList: [ //需要使用的JS接口
|
||||
'previewImage',
|
||||
]
|
||||
});
|
||||
</script>
|
||||
{php} } {/php}
|
||||
{/block}
|
102
hyhproject/wechat2/view/default/users/orders/list_complains.js
Executable file
102
hyhproject/wechat2/view/default/users/orders/list_complains.js
Executable file
@ -0,0 +1,102 @@
|
||||
jQuery.noConflict();
|
||||
// 获取订单列表
|
||||
function getComplainList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/orderComplains/complainByPage'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('complainList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#complain-list').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-complaint.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无投诉信息</p>';
|
||||
html += '</div>';
|
||||
$('#complain-list').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getComplainList();
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
$("#frame").css('top',0);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getComplainList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
function complainDetail(cId){
|
||||
$.post(WST.U('wechat/orderComplains/getComplainDetail'),{'id':cId},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json){
|
||||
var gettpl = document.getElementById('complainDetail').innerHTML;
|
||||
laytpl(gettpl).render(json, function(html){
|
||||
// 写入数据
|
||||
$('#complainDetailBox').html(html);
|
||||
// 设置滚动条
|
||||
var screenH = WST.pageHeight();
|
||||
var titleH = $('#frame').find('.title').height();
|
||||
var contentH = $('#complainDetailBox').height();
|
||||
|
||||
if(screenH-titleH < contentH){
|
||||
$('#complainDetailBox').css('height',screenH-titleH);
|
||||
}
|
||||
// 展示弹出层
|
||||
dataShow();
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
function getImg(obj){
|
||||
var url = 'http://'+window.location.host+$(obj).attr('src');
|
||||
var imgUrls = '';
|
||||
$('.imgurl').each(function(){
|
||||
imgUrls += "'http://"+window.location.host+$(this).attr('src') + "',";
|
||||
});
|
||||
//图片预览
|
||||
wx.previewImage({
|
||||
current: url,
|
||||
urls: [
|
||||
url
|
||||
]
|
||||
});
|
||||
}
|
172
hyhproject/wechat2/view/default/users/orders/orders_appraises.html
Executable file
172
hyhproject/wechat2/view/default/users/orders/orders_appraises.html
Executable file
@ -0,0 +1,172 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}商品评价 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders_appraises.css?v={$v}">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title='商品评价'{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$oId}" id="oId" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="ui-row-flex item-head">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex shop"><i></i>{$data['shopName']}</div>
|
||||
</div>
|
||||
{volist name="data['Rows']" id="g"}
|
||||
<div class="ui-row-flex border-b g-item">
|
||||
<div class="ui-col">
|
||||
<div class="g-Img j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="javascript:WST.intoGoods({$g['goodsId']});">
|
||||
<img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{:WSTImg($g['goodsImg'],3)}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 g-gInfo">
|
||||
<p class="g-gName ui-nowrap-multi">{$g['goodsName']}</p>
|
||||
<p class="g-gSpec ui-nowrap-flex">{if($g['goodsSpecNames'])}规格:{$g['goodsSpecNames']}{/if}</p>
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;">
|
||||
{if ($g['appraise']!='')}
|
||||
<span class="appraise" onclick="appraise({$g.goodsId},{$g['goodsSpecId'] ?? 0},{$g.id},this)"></span>
|
||||
{else /}
|
||||
<span class="appraise" onclick="appraise({$g.goodsId},{$g['goodsSpecId'] ?? 0},{$g.id},this)"></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div id="appBox_{$g.id}"></div>
|
||||
{/volist}
|
||||
<script id="appraises-box" type="text/html">
|
||||
<ul class="ui-row appraise-box">
|
||||
<li class="ui-col ui-col-25 appraise-title">商品名称</li>
|
||||
<li class="ui-col ui-col-75 ui-nowrap-multi appraise-name">
|
||||
{{d.goodsName}}
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 appraise-title" style="height: 25px;line-height:25px;">商品评分</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-80">
|
||||
{{# if(d.goodsScore!=''){ }}
|
||||
{{# for(var i=0;i<d.goodsScore;i++){ }}
|
||||
<span class="start-on"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# for(var j=0;j<5-d.goodsScore;j++){ }}
|
||||
<span class="start-not"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# }else{ }}
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-20 score" id="goodsScore" score="{{(d.timeScore!='')?d.timeScore:'0'}}" style="height: 25px;line-height:25px;">{{(d.goodsScore!='')?d.goodsScore:'0'}}分</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 appraise-title" style="height: 25px;line-height:25px;">服务评分</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-80">
|
||||
{{# if(d.serviceScore!=''){ }}
|
||||
{{# for(var i=0;i<d.serviceScore;i++){ }}
|
||||
<span class="start-on"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# for(var j=0;j<5-d.serviceScore;j++){ }}
|
||||
<span class="start-not"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# }else{ }}
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-20 score" id="serviceScore" score="{{(d.timeScore!='')?d.timeScore:'0'}}" style="height: 25px;line-height:25px;">{{(d.serviceScore!='')?d.serviceScore:'0'}}分</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 appraise-title" style="height: 25px;line-height:25px;">时效评分</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-80">
|
||||
{{# if(d.timeScore!=''){ }}
|
||||
{{# for(var i=0;i<d.timeScore;i++){ }}
|
||||
<span class="start-on"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# for(var j=0;j<5-d.timeScore;j++){ }}
|
||||
<span class="start-not"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# }else{ }}
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-20 score" id="timeScore" score="{{(d.timeScore!='')?d.timeScore:'0'}}" style="height: 25px;line-height:25px;">{{(d.timeScore!='')?d.timeScore:'0'}}分</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{{# if(d.content==''){ }}
|
||||
<li class="ui-col" style="padding:10px">
|
||||
<textarea class="appraisesContent" id="content"></textarea>
|
||||
</li>
|
||||
<div class="ui-col uploadfile-box">
|
||||
<ul class="complainFileBox" id="edit_chart">
|
||||
</ul>
|
||||
<div id="filePicker" style='margin-left:10px;width:250px;overflow:hidden;height:35px;font-size:.13rem;'>上传附件(最多5张)</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="ui-btn-wrap post-btn">
|
||||
<button class="ui-btn-lg ui-btn-danger" onclick="javascript:saveAppr({{d.goodsId}},{{d.goodsSpecId}},{{d.orderGoodsId}});">提交</button>
|
||||
</div>
|
||||
{{# }else{ }}
|
||||
<li class="ui-col ui-col-25 appraise-title">点评内容</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{d.content}}
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 appraise-title" style="padding-top:15px;">评价附件</li>
|
||||
<li class="ui-col ui-col-75" style="margin-top:10px;margin-left:-10px;">
|
||||
{{# if(WST.blank(d.images)!=''){
|
||||
var img = d.images;
|
||||
}}
|
||||
<ul class="complainFileBox">
|
||||
{{# for(var g=0;g<img.length;++g){ }}
|
||||
<li><img src="__ROOT__/{{img[g]}}"> </li>
|
||||
{{# } }}
|
||||
</ul>
|
||||
{{# } }}
|
||||
</li>
|
||||
|
||||
{{# } }}
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div id="appraisesBox">
|
||||
</div>
|
||||
|
||||
</section>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_appraises.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
{/block}
|
115
hyhproject/wechat2/view/default/users/orders/orders_appraises.js
Executable file
115
hyhproject/wechat2/view/default/users/orders/orders_appraises.js
Executable file
@ -0,0 +1,115 @@
|
||||
jQuery.noConflict();
|
||||
//商品评价
|
||||
function clickStar(obj){
|
||||
var index = $(obj).index(); // 当前选中的分数
|
||||
$(obj).parent().find('span').each(function(k,v){
|
||||
if(k<=index){
|
||||
$(this).removeClass('start-not').addClass('start-on');
|
||||
}else{
|
||||
$(this).removeClass('start-on').addClass('start-not');
|
||||
}
|
||||
})
|
||||
$(obj).parent().siblings().html(index+1+'分');
|
||||
$(obj).parent().siblings().attr('score',index+1);
|
||||
}
|
||||
|
||||
function appraise(gId,sId,ogId,obj){
|
||||
|
||||
$('.appraise').removeClass('score');
|
||||
$(obj).addClass('score');
|
||||
var gName = $(obj).parent().parent().find('.g-gName').html();
|
||||
|
||||
var param = {};
|
||||
param.gId = gId;
|
||||
param.sId = sId;
|
||||
param.oId = $('#oId').val();
|
||||
param.orderGoodsId = ogId;
|
||||
$.post(WST.U('wechat/goodsappraises/getAppr'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var gettpl = document.getElementById('appraises-box').innerHTML;
|
||||
json.data.goodsName = gName;
|
||||
json.data.goodsId = gId;
|
||||
json.data.goodsSpecId = sId;
|
||||
json.data.orderGoodsId = ogId;
|
||||
laytpl(gettpl).render(json.data, function(html){
|
||||
$('div[id^="appBox_"]').html(' ');
|
||||
$('#appBox_'+ogId).html(html);
|
||||
});
|
||||
if(json.data.serviceScore=='')userAppraiseInit();
|
||||
}else{
|
||||
WST.msg('请求出错','info');
|
||||
}
|
||||
})
|
||||
}
|
||||
function saveAppr(gId,sId,ogId){
|
||||
var content = $.trim($('#content').val());
|
||||
if(content==''){
|
||||
WST.msg('评价内容不能为空','info');
|
||||
return
|
||||
}
|
||||
var param = {};
|
||||
param.content = content;
|
||||
param.goodsId = gId;
|
||||
param.goodsSpecId = sId;
|
||||
param.orderId = $('#oId').val();
|
||||
param.timeScore = $('#timeScore').attr('score');
|
||||
param.goodsScore = $('#goodsScore').attr('score');
|
||||
param.serviceScore = $('#serviceScore').attr('score');
|
||||
param.orderGoodsId = ogId;
|
||||
|
||||
var imgs = [];
|
||||
// 是否有上传附件
|
||||
$('.imgSrc').each(function(k,v){
|
||||
imgs.push($(this).attr('v'));
|
||||
})
|
||||
imgs = imgs.join(',');
|
||||
if(imgs!='')
|
||||
param.images = imgs;
|
||||
|
||||
$.post(WST.U('wechat/goodsappraises/add'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){history.go(0);},1000);
|
||||
}else{
|
||||
WST.msg(json.msg);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
$(function(){
|
||||
WST.initFooter('user');
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
})
|
||||
|
||||
|
||||
/*************** 上传图片 *****************/
|
||||
function userAppraiseInit(){
|
||||
var uploader =WST.upload({
|
||||
pick:'#filePicker',
|
||||
formData: {dir:'appraises',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 = $("<li>"+
|
||||
"<img class='imgSrc' src='"+WST.conf.ROOT+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></li>");
|
||||
var btn = $('<div class="del-btn"><span class="ui-icon-delete"></span></div>');
|
||||
tdiv.append(btn);
|
||||
$('#edit_chart').append(tdiv);
|
||||
btn.on('click','span',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
185
hyhproject/wechat2/view/default/users/orders/orders_complains.html
Executable file
185
hyhproject/wechat2/view/default/users/orders/orders_complains.html
Executable file
@ -0,0 +1,185 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}订单投诉 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders_complains.css?v={$v}">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="useri_infos">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<a href="{:url('wechat/users/index')}"><i class="ui-icon-return"></i></a><h1 class="useri_info">订单投诉</h1>
|
||||
<i onclick="javascript:closeUploadArea()" style="display:none;font-size: 0.15rem;" id="upload_close">关闭</i>
|
||||
<a href="javascript:void(0);" style="display:none;float:right;font-size: 0.15rem;" id="upload_button">上传</a>
|
||||
</header>
|
||||
{/block}
|
||||
|
||||
{block name="main"}
|
||||
<sction class="ui-container" id="upload_modal">
|
||||
<div class="upload-modal">
|
||||
<div id="clipArea" class="clipArea"></div>
|
||||
<input type="hidden" id="imgData" autocomplete="off">
|
||||
</div>
|
||||
</sction>
|
||||
<input type="hidden" name="" value="" id="complainType" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$oId}" id="oId" autocomplete="off">
|
||||
<section class="ui-container" id="Ccontrainer">
|
||||
<script type="text/html" id="detailBox">
|
||||
<div id="detailBox">
|
||||
<div class="ui-row-flex ui-whitespace detail-head">
|
||||
<div class="ui-col ui-col ">订单号:{{d.orderNo}}</div>
|
||||
<div class="ui-col order-tr o-status">
|
||||
{{d.status}}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d.isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-row-flex-ver d-uInfo">
|
||||
<div class="ui-col">{{d.shopName}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{# for(var i=0;i<d.goods.length;i++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b d-goodsitme">
|
||||
<div class="ui-col">
|
||||
<div class="o-Img j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="javascript:WST.intoGoods({{d.goods[i]['goodsId']}});">
|
||||
<img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{{d.goods[i].goodsImg}}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi">{{d.goods[i].goodsName}}</p>
|
||||
|
||||
|
||||
<p class="o-gSpec d-gSpec">
|
||||
{{# if(d.goods[i].goodsSpecNames){ }}
|
||||
{{d.goods[i].goodsSpecNames.replace(/@@_@@/g,'<br />')}}
|
||||
{{# } }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;"><p class="price">¥ {{d.goods[i].goodsPrice}}</p><p> x {{d.goods[i].goodsNum}}</p></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<div class="ui-row-flex ui-whitespace d-item">
|
||||
<div class="ui-col ui-col">下单时间</div>
|
||||
<div class="ui-col ui-col order-tr">{{d.createTime}}</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace d-item" style="min-height:80px;">
|
||||
<div class="ui-col ui-col">商品总额</div>
|
||||
<div class="ui-col ui-col-4 order-tr">
|
||||
<p class="price">¥ {{d.goodsMoney}}</p>
|
||||
<p class="price"><span class="title">运费:</span>¥ {{d.deliverMoney}}</p>
|
||||
<p>实付款:<span class="price">¥ {{d.needPay}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<div id="orderDetail">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace d-item c-item">
|
||||
<div class="ui-col ui-col">投诉类型</div>
|
||||
<div class="ui-col ui-col-3 order-tr" onclick="dataShow(0)" id="complainText" >请选择投诉类型 > </div>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace ui-row-flex-ver c-box">
|
||||
<div class="ui-col c-title">投诉内容</div>
|
||||
<div class="ui-col c-content">
|
||||
<textarea id="complain"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="ui-col uploadfile-box">
|
||||
<ul class="complainFileBox" id="edit_chart">
|
||||
|
||||
</ul>
|
||||
|
||||
<div id="filePicker" style='margin-left:5px;width:250px;overflow:hidden;height:35px;font-size:.13rem;'>上传附件(最多5张)</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-btn-wrap" style="padding:5px;padding-bottom:5px;">
|
||||
<button class="ui-btn-lg ui-btn-danger c-btn" onclick="saveCom({$oId})">
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 订单详情层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title" id="boxTitle"><span>投诉类型</span><i class="ui-icon-close-page" onclick="javascript:dataHide(0);"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">承诺的没有做到</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='1' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">未按约定时间发货</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='2' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">未按成交价格进行交易</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='3' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">恶意骚扰</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='4' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="ui-btn-wrap">
|
||||
<button class="ui-btn-lg ui-btn-danger c-btn" onclick="dataHide(1)">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_complains.js?v={$v}'></script>
|
||||
|
||||
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
{/block}
|
122
hyhproject/wechat2/view/default/users/orders/orders_complains.js
Executable file
122
hyhproject/wechat2/view/default/users/orders/orders_complains.js
Executable file
@ -0,0 +1,122 @@
|
||||
jQuery.noConflict();
|
||||
$(function(){
|
||||
getOrderDetail();
|
||||
userComplainInit();
|
||||
})
|
||||
function getOrderDetail(){
|
||||
var oid = $('#oId').val();
|
||||
$.post(WST.U('wechat/orders/getDetail'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status!=-1){
|
||||
var gettpl1 = document.getElementById('detailBox').innerHTML;
|
||||
laytpl(gettpl1).render(json, function(html){
|
||||
$('#orderDetail').html(html);
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/*********************** 投诉类型 ****************************/
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide(0);").show();
|
||||
jQuery('#frame').animate({"bottom": 0}, 500);
|
||||
}
|
||||
function dataHide(type){
|
||||
if(type==1){
|
||||
var flag=false,chk;
|
||||
$('.active').each(function(k,v){
|
||||
if($(this).prop('checked')){
|
||||
flag = true
|
||||
$('#complainType').val($(this).val());
|
||||
chk = $(this).parent().parent().siblings().html();
|
||||
}
|
||||
});
|
||||
if(!flag){
|
||||
WST.msg('请选择投诉类型');
|
||||
return;
|
||||
}
|
||||
$('#complainText').html(chk+' >');
|
||||
}
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'bottom': '-'+dataHeight}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
function uploadFile(){
|
||||
$('#filePicker').trigger("click");
|
||||
}
|
||||
|
||||
|
||||
function saveCom(oId){
|
||||
// 验证投诉类型
|
||||
var type = $('#complainType').val();
|
||||
if(type==''){
|
||||
dataShow();
|
||||
WST.msg('请选择投诉类型','info');
|
||||
return;
|
||||
}
|
||||
var complainContent = $.trim($('#complain').val());
|
||||
if(complainContent==''){
|
||||
WST.msg('投诉内容不能为空','info');
|
||||
return;
|
||||
}
|
||||
var param = {};
|
||||
param.orderId = oId;
|
||||
param.complainType = type;
|
||||
param.complainContent = complainContent;
|
||||
|
||||
var imgs = [];
|
||||
// 是否有上传附件
|
||||
$('.imgSrc').each(function(k,v){
|
||||
imgs.push($(this).attr('v'));
|
||||
})
|
||||
imgs = imgs.join(',');
|
||||
if(imgs!='')
|
||||
param.complainAnnex = imgs;
|
||||
|
||||
$.post(WST.U('wechat/ordercomplains/saveComplain'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(data.status){
|
||||
WST.msg('投诉成功请留意商城消息','success');
|
||||
setTimeout(function(){location.href=WST.U('wechat/ordercomplains/index')},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/*************** 上传图片 *****************/
|
||||
function userComplainInit(){
|
||||
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 = $("<li>"+
|
||||
"<img class='imgSrc' src='"+WST.conf.ROOT+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></li>");
|
||||
var btn = $('<div class="del-btn"><span class="ui-icon-delete"></span></div>');
|
||||
tdiv.append(btn);
|
||||
$('#edit_chart').append(tdiv);
|
||||
btn.on('click','span',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
485
hyhproject/wechat2/view/default/users/orders/orders_list.html
Executable file
485
hyhproject/wechat2/view/default/users/orders/orders_list.html
Executable file
@ -0,0 +1,485 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的订单 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive wst-header wst-headero">
|
||||
<i class="ui-icon-return" onclick="location.href='{:url('wechat/users/index')}'"></i><h1>我的订单</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$type}" id="type" autocomplete="off">
|
||||
<script id="shopList" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex ui-whitespace item-head">
|
||||
<div class="ui-col ui-col-2" onclick="javascript:WST.intoShops({{d[i].shopId}});"><p class="ui-nowrap-flex"><i class="shopicon"></i>{{d[i].shopName}}</p></div>
|
||||
<div class="ui-col order-tr o-status">
|
||||
{{ d[i].status }}
|
||||
{{# if($.inArray(d[i].orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d[i].payType==1 && d[i].isPay==1) { }}
|
||||
{{# if(d[i].isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# for(var g=0;g<d[i].list.length;g++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b" onclick="getOrderDetail({{d[i].orderId}})">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{{d[i].list[g].goodsImg}}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi ui-whitespace">{{d[i].list[g].goodsName}}</p>
|
||||
|
||||
{{# if(d[i].list[g].goodsSpecNames){ }}
|
||||
<p class="o-gSpec ui-nowrap-flex ui-whitespace">规格:{{d[i].list[g].goodsSpecNames}}</p>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;">
|
||||
{{# if(d[i].list[g].goodsCode=='gift'){ }}
|
||||
【赠品】
|
||||
{{# }else{ }}
|
||||
<p>¥ {{d[i].list[g].goodsPrice}}</p><p>x {{d[i].list[g].goodsNum}}</p>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
<div class="ui-btn-wrap" style="padding:5px 0px;">
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
<div class="o-oListMoney">
|
||||
订单总价:<span>¥ {{d[i].realTotalMoney}}</span>
|
||||
</div>
|
||||
{{# if(d[i].orderStatus==-2){ }}
|
||||
<button class="ui-btn o-btn" onclick="choicePay({{d[i].orderNo}},0);">
|
||||
立即付款
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==0 && d[i].noticeDeliver==0 ){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="WST.dialog('您确定要提醒发货吗?','noticeDeliver({{d[i].orderId}})')">
|
||||
提醒发货
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==-2 || d[i].orderStatus==0){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="showCancelBox('cancelOrder({{d[i].orderId}})')">
|
||||
取消订单
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if((d[i].orderStatus!=-1 || d[i].orderStatus==1) && d[i].orderStatus!=-2 && d[i].isComplain==0 ){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="complain({{d[i].orderId}})">
|
||||
投诉
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==2 && d[i].isAppraise==0) { }}
|
||||
<button class="ui-btn o-btn" onclick="toAppr({{d[i].orderId}})">
|
||||
评价
|
||||
</button>
|
||||
{{# } }}
|
||||
{{# if(d[i].isAppraise==1){ }}
|
||||
<button class="ui-btn o-btn" onclick="toAppr({{d[i].orderId}})">
|
||||
查看评价
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
|
||||
{{# if((d[i].allowRefund==1) && (d[i].orderStatus==-1 || d[i].orderStatus==-3)){ }}
|
||||
<button class="ui-btn o-btn" onclick="showRefundBox({{d[i].orderId}})">
|
||||
申请退款
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
|
||||
{{# if(d[i].orderStatus==1){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="showRejectBox('rejectOrder({{d[i].orderId}})')">
|
||||
拒收
|
||||
</button>
|
||||
<button class="ui-btn o-btn" onclick="WST.dialog('你确定已收货吗?','receive({{d[i].orderId}})')">
|
||||
确认收货
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{ d[i]['hook']?d[i]['hook']:"" }}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<section class="ui-container" id="shopBox">
|
||||
<div class="ui-tab">
|
||||
<ul class="ui-tab-nav order-tab">
|
||||
<li class="tab-item {if $type==''}tab-curr{/if}" type="" >全部</li>
|
||||
<li class="tab-item {if $type=='waitPay'}tab-curr{/if}" type="waitPay" >待付款</li>
|
||||
<li class="tab-item {if $type=='waitDeliver'}tab-curr{/if}" type="waitDeliver" >待发货</li>
|
||||
<li class="tab-item {if $type=='waitReceive'}tab-curr{/if}" type="waitReceive" >待收货</li>
|
||||
<li class="tab-item {if $type=='waitAppraise'}tab-curr{/if}" type="waitAppraise" >待评价</li>
|
||||
<li class="tab-item {if $type=='finish'}tab-curr{/if}" type="finish" >已完成</li>
|
||||
<li class="tab-item {if $type=='abnormal'}tab-curr{/if}" type="abnormal" >取消拒收</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="order-box">
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{:hook('wechatDocumentOrderList')}
|
||||
<script type="text/html" id="detailBox">
|
||||
<div id="detailBox">
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
{{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex">
|
||||
{{# if(d.payType==1) { }}
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>待付款</p></div>
|
||||
{{# } }}
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>待发货</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>已发货</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.orderStatus==2){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>已收货</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1 && d.payType==1 && d.isPay==1){ }}
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>卖家申请退款</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.refundStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>商家申请退款处理</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.refundStatus==2) { }} class="active"{{# } }}></span>
|
||||
<span {{# if(d.refundStatus==2) { }} class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.refundStatus==2) { }} active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>退款完成</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单状态:</span>
|
||||
<span class="o-status">{{d.status}}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d.payType==1 && d.isPay==1) { }}
|
||||
{{# if(d.isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单编号:</span>{{d.orderNo}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">下单时间:</span>{{d.createTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-head">
|
||||
{{# if(d.userName){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">收货人:</span>{{d.userName}} <span class="d-utel">{{d.userPhone}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">收货地址:</span><span class="d-uaddr">{{d.userAddress}}<i></i></span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">支付信息:</span>{{d.payInfo}}</div>
|
||||
</div>
|
||||
{{# if(d.payTime){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">支付时间:</span>{{d.payTime}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">配送信息:</span>{{d.deliverInfo}}</div>
|
||||
</div>
|
||||
{{# if(WST.blank(d.expressNo)!=''){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">快递公司:</span>{{d.expressName}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">快递号:</span>{{d.expressNo}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票信息:</span>{{# if(d.isInvoice==1) { }}需要{{# } else{ }}不需要{{# } }}</div>
|
||||
</div>
|
||||
{{# if(d.isInvoice==1) { }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票抬头:</span>{{d.invoiceClient}}</div>
|
||||
</div>
|
||||
{{#
|
||||
var inv_json = JSON.parse(d.invoiceJson);
|
||||
var inv_code = (inv_json!=null && inv_json.invoiceCode!=undefined)?inv_json.invoiceCode:'';
|
||||
if(inv_json!=null && inv_json.type!=undefined && inv_json.type==0){
|
||||
}}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票税号:</span>{{inv_code}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单备注:</span>{{d.orderRemarks}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# if(d.isRefund==1){ }}
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款金额:</span>¥ {{d.backMoney}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款备注:</span>{{d.refundRemark}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款时间:</span>{{d.refundTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex o-shops">
|
||||
<div class="ui-col ui-col wst-or-term"><p class="shops" onclick="javascript:WST.intoShops({{d.shopId}});"><i></i>{{d.shopName}}<p></div>
|
||||
</div>
|
||||
{{# for(var i=0;i<d.goods.length;i++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b d-goodsitme" onclick="javascript:WST.intoGoods({{d.goods[i].goodsId}})">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{{d.goods[i].goodsImg}}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi ui-whitespace">{{d.goods[i].goodsName}}</p>
|
||||
<p class="o-gSpec d-gSpec">
|
||||
{{# if(d.goods[i].goodsSpecNames){ }}
|
||||
{{d.goods[i].goodsSpecNames.replace(/@@_@@/g,'<br />')}}
|
||||
{{# } }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;">
|
||||
{{# if(d.goods[i].goodsCode=='gift'){ }}
|
||||
【赠品】
|
||||
{{# }else{ }}
|
||||
<p>¥ {{d.goods[i].goodsPrice}}</p><p>x {{d.goods[i].goodsNum}}</p>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
{{# if(d.goods[i].goodsType==1 && d.orderStatus==2){ }}
|
||||
{{# for(var e=0;e<d.goods[i].extraJson.length;e++){ }}
|
||||
<div class="ui-row-flex ui-row-flex-ver d-uInfo">
|
||||
<div class="ui-col">
|
||||
<p>卡券号:{{d.goods[i].extraJson[e].cardNo}}</p>
|
||||
<p>卡券密码:{{d.goods[i].extraJson[e].cardPwd}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">获得积分</span><span class="o-status2">{{d.orderScore}} 个</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">商品总额</span><span class="o-status2">¥ {{d.goodsMoney}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">运费</span><span class="o-status2">¥ {{d.deliverMoney}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">积分抵扣金额</span><span class="o-status2">¥ -{{d.scoreMoney}}</span></div>
|
||||
</div>
|
||||
{{# if(d.useScore>0){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">使用积分数</span><span class="o-status2">{{d.useScore}} 个</span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{ d['hook']?d['hook']:"" }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term2"><span class="wst-or-describe2">实付款</span><span class="o-status2"><span style="font-size:0.13rem;">¥ </span>{{d.realTotalMoney}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 订单详情层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title" id="boxTitle"><span id="wordTitle">订单详情</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/* 退款层 */}
|
||||
<div class="wst-fr-box" id="refundFrame">
|
||||
<div class="title"><span>申请退款</span><i class="ui-icon-close-page" onclick="javascript:reFundDataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="refund-content">
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex" style="padding:10px;border-bottom:RGB(242,242,242) 2px dashed;">
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>买家申请退款</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block"></i></p>
|
||||
<div class="wst-clear"></div></p><p>商家申请退款处理</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block"></i></p>
|
||||
<div class="wst-clear"></div></p><p>退款完成</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-or-refund">
|
||||
<p class="prompt">请选择取消订单申请退款的原因,以便我们能更好的为您服务。</p>
|
||||
<div class="term">
|
||||
<span class="sign">*</span>退款原因:
|
||||
<select id='refundReason' onchange='javascript:changeRefundType(this.value)'>
|
||||
{volist name=":WSTDatas('REFUND_TYPE')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="term">
|
||||
<span class="sign">*</span>退款金额: <input type='number' id='money' maxLength='10' onkeyup="javascript:WST.isChinese(this,1)" autocomplete="off">
|
||||
</div>
|
||||
<p class="prompt">(金额不能超过<font color='red' id="realTotalMoney">0</font>,<span id="useScore">0</span>个积分抵扣<font color='red' id="scoreMoney">¥ 0</font>)</p>
|
||||
<div class="term">
|
||||
<div id='refundTr' style="width:99%;display:none;" >
|
||||
<span class="sign">*</span>其他原因
|
||||
<textarea id='refundContent' style='width:100%;height:80px;padding: 5px;' maxLength='200'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<p class="cancel-btn-box ui-flex ui-flex-pack-center">
|
||||
<button id="wst-event8" type="button" class="ui-btn-s wst-dialog-b2">提交申请退款</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
<div class="ui-dialog" id="cancelBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
<div class="ui-dialog-bd-title">请选择您取消订单的原因:</div>
|
||||
<select id='reason'>
|
||||
{volist name=":WSTDatas('ORDER_CANCEL')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
|
||||
<p class="cancel-btn-box">
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event0" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-dialog" id="rejectBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
<div class="ui-dialog-bd-title">请选择您拒收订单的原因:</div>
|
||||
|
||||
<select id='reject' onchange='javascript:changeRejectType(this.value)'>
|
||||
{volist name=":WSTDatas('ORDER_REJECT')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<br />
|
||||
<div id='rejectTr' style='display:none'>
|
||||
原因<font color='red'>*</font>:
|
||||
<textarea id='content' style='width:99%;height:80px;' maxLength='200'></textarea>
|
||||
</div>
|
||||
|
||||
<p class="cancel-btn-box">
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event3" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
<script>
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getOrderList();
|
||||
WST.initFooter('user');
|
||||
backPrevPage(WST.U('wechat/users/index'));
|
||||
// Tab切换卡
|
||||
$('.tab-item').click(function(){
|
||||
$(this).addClass('tab-curr').siblings().removeClass('tab-curr');
|
||||
var type = $(this).attr('type');
|
||||
$('#type').val(type);
|
||||
reFlashList();
|
||||
});
|
||||
// 弹出层
|
||||
var w = WST.pageWidth();
|
||||
$("#frame").css('top',0);
|
||||
$("#frame").css('right',-w);
|
||||
$("#refundFrame").css('top',0);
|
||||
$("#refundFrame").css('right',-w);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getOrderList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
321
hyhproject/wechat2/view/default/users/orders/orders_list.js
Executable file
321
hyhproject/wechat2/view/default/users/orders/orders_list.js
Executable file
@ -0,0 +1,321 @@
|
||||
jQuery.noConflict();
|
||||
// 提醒发货
|
||||
function noticeDeliver(id){
|
||||
hideDialog('#wst-di-prompt');
|
||||
$.post(WST.U('wechat/orders/noticeDeliver'),{id:id},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
reFlashList();// 刷新列表
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取订单列表
|
||||
function getOrderList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.type = $('#type').val();
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/orders/getOrderList'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('shopList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#order-box').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-order.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关订单</p>';
|
||||
html += '<button class="ui-btn-s" onclick="javascript:WST.intoIndex();">去逛逛</button>';
|
||||
html += '</div>';
|
||||
$('#order-box').html(html);
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
|
||||
// 刷新列表页
|
||||
function reFlashList(){
|
||||
$('#currPage').val('0');
|
||||
$('#order-box').html(' ');
|
||||
getOrderList();
|
||||
}
|
||||
|
||||
function showCancelBox(event){
|
||||
$("#wst-event0").attr("onclick","javascript:"+event);
|
||||
$("#cancelBox").dialog("show");
|
||||
}
|
||||
// 取消订单
|
||||
function cancelOrder(oid){
|
||||
hideDialog('#cancelBox');
|
||||
$.post(WST.U('wechat/orders/cancellation'),{id:oid,reason:$('#reason').val()},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#order-box').html(' ');
|
||||
reFlashList();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 拒收
|
||||
function showRejectBox(event){
|
||||
$("#wst-event3").attr("onclick","javascript:"+event);
|
||||
$("#rejectBox").dialog("show");
|
||||
}
|
||||
|
||||
function rejectOrder(oid){
|
||||
var param = {};
|
||||
param.id=oid;
|
||||
param.reason=$('#reject').val();
|
||||
param.content=$('#content').val();
|
||||
if($('reject').val()==10000){
|
||||
var content = $.trim($('#content').val());
|
||||
if(content == '')
|
||||
WST.msg('请输入拒收原因','info');
|
||||
return;
|
||||
}
|
||||
|
||||
$.post(WST.U('wechat/orders/reject'),param,function(data){
|
||||
|
||||
hideDialog('#rejectBox');
|
||||
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#content').val(' ');
|
||||
reFlashList();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 退款
|
||||
function showRefundBox(id){
|
||||
// 重置表单
|
||||
$('#refundReason').val(1);
|
||||
$('#refundContent').html(' ');
|
||||
$('#money').val(' ');
|
||||
$('#refundTr').hide();
|
||||
$.post(WST.U('wechat/orders/getRefund'),{id:id},function(data){
|
||||
$('#realTotalMoney').html('¥'+data.realTotalMoney);
|
||||
$('#useScore').html(data.useScore);
|
||||
$('#scoreMoney').html('¥ '+data.scoreMoney);
|
||||
// 弹出层滚动条
|
||||
var clientH = WST.pageHeight();// 屏幕高度
|
||||
var boxheadH = $('#refund-boxTitle').height();// 弹出层标题高度
|
||||
var contentH = $('#refund-content').height(); // 弹出层内容高度
|
||||
$('#refund-content').css('height',clientH-boxheadH+'px');
|
||||
$("#wst-event8").attr("onclick","javascript:refund("+id+")");
|
||||
reFundDataShow();
|
||||
})
|
||||
}
|
||||
function changeRefundType(v){
|
||||
if(v==10000){
|
||||
$('#refundTr').show();
|
||||
}else{
|
||||
$('#refundTr').hide();
|
||||
}
|
||||
}
|
||||
//弹框
|
||||
function reFundDataHide(){
|
||||
$('#shopBox').show();
|
||||
var dataHeight = $("#refundFrame").css('height');
|
||||
var dataWidth = $("#refundFrame").css('width');
|
||||
jQuery('#refundFrame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
function reFundDataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:reFundDataHide();").show();
|
||||
jQuery('#refundFrame').animate({"right": 0}, 500);
|
||||
setTimeout(function(){$('#shopBox').hide();},600)
|
||||
}
|
||||
// 退款
|
||||
function refund(id){
|
||||
var params = {};
|
||||
params.reason = $.trim($('#refundReason').val());
|
||||
params.content = $.trim($('#refundContent').val());
|
||||
params.money = $.trim($('#money').val());
|
||||
params.id = id;
|
||||
if(params.money<0 || params.money==''){
|
||||
WST.msg('无效的退款金额','info');
|
||||
return;
|
||||
}
|
||||
if(params.reason==10000){
|
||||
var content = $.trim($('#refundContent').val());
|
||||
if(content == ''){
|
||||
WST.msg('请输入原因','info');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$.post(WST.U('wechat/orderrefunds/refund'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg('申请退款成功','success');
|
||||
history.go(0);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function changeRejectType(v){
|
||||
if(v==10000){
|
||||
$('#rejectTr').show();
|
||||
}else{
|
||||
$('#rejectTr').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 隐藏对话框
|
||||
function hideDialog(id){
|
||||
$(id).dialog("hide");
|
||||
}
|
||||
|
||||
// 确认收货
|
||||
function receive(oid){
|
||||
hideDialog('#wst-di-prompt');
|
||||
$.post(WST.U('wechat/orders/receive'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
reFlashList();// 刷新列表
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*********************** 订单详情 ****************************/
|
||||
//弹框
|
||||
function dataShow(title){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
setTimeout(function(){$('#shopBox').hide();},600)
|
||||
$('#wordTitle').html(title);
|
||||
}
|
||||
function dataHide(){
|
||||
$('#shopBox').show();
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getOrderDetail(oid){
|
||||
$.post(WST.U('wechat/orders/getDetail'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status!=-1){
|
||||
var gettpl1 = document.getElementById('detailBox').innerHTML;
|
||||
laytpl(gettpl1).render(json, function(html){
|
||||
$('#content').html(html);
|
||||
// 弹出层滚动条
|
||||
var clientH = WST.pageHeight();// 屏幕高度
|
||||
var boxheadH = $('#boxTitle').height();// 弹出层标题高度
|
||||
var contentH = $('#content').height(); // 弹出层内容高度
|
||||
$('#content').css('height',clientH-boxheadH+'px');
|
||||
dataShow('订单详情');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
// 跳转到评价页
|
||||
function toAppr(oid){
|
||||
location.href=WST.U('wechat/orders/orderappraise',{'oId':oid});
|
||||
}
|
||||
// 投诉
|
||||
function complain(oid){
|
||||
location.href=WST.U('wechat/ordercomplains/complain',{'oId':oid});
|
||||
}
|
||||
|
||||
//余额支付
|
||||
function walletPay(type){
|
||||
var payPwd = $('#payPwd').val();
|
||||
if(!payPwd){
|
||||
WST.msg('请输入支付密码','info');
|
||||
return;
|
||||
}
|
||||
if(type==0){
|
||||
var payPwd2 = $('#payPwd2').val();
|
||||
if(payPwd2==''){
|
||||
WST.msg('确认密码不能为空','info');
|
||||
return false;
|
||||
}
|
||||
if(payPwd!=payPwd2){
|
||||
WST.msg('确认密码不一致','info');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
var payPwd = rsa.encrypt(payPwd);
|
||||
}
|
||||
var params = {};
|
||||
if(type==0){
|
||||
params.newPass = payPwd;
|
||||
$.post(WST.U('wechat/users/editpayPwd'),params,function(data,textStatus){
|
||||
WST.noload();
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.load('成功设置密码,<br>订单支付中···');
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
WST.load('正在核对密码···');
|
||||
}
|
||||
params.payPwd = payPwd;
|
||||
params.orderNo = $('#orderNo').val();
|
||||
params.isBatch = $('#isBatch').val();
|
||||
$('.wst-btn-dangerlo').attr('disabled', 'disabled');
|
||||
setTimeout(function(){
|
||||
$.post(WST.U('wechat/wallets/payByWallet'),params,function(data,textStatus){
|
||||
WST.noload();
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/orders/index');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
setTimeout(function(){
|
||||
$('.wst-btn-dangerlo').removeAttr('disabled');
|
||||
},2000);
|
||||
}
|
||||
});
|
||||
},1000);
|
||||
}
|
||||
//选择支付方式
|
||||
function choicePay(orderNo,isBatch){
|
||||
location.href=WST.U('wechat/orders/succeed',{'orderNo':orderNo,'isBatch':isBatch});
|
||||
}
|
||||
//跳转支付
|
||||
function toPay(orderNo,isBatch,n){
|
||||
if(n=='weixinpays'){
|
||||
location.href=WST.U('wechat/weixinpays/toPay',{'orderNo':orderNo,'isBatch':isBatch});
|
||||
}else if(n=='wallets'){
|
||||
location.href = WST.U('wechat/wallets/payment',{"orderNo":orderNo,'isBatch':isBatch});
|
||||
}
|
||||
}
|
115
hyhproject/wechat2/view/default/users/orders/orders_pay.html
Executable file
115
hyhproject/wechat2/view/default/users/orders/orders_pay.html
Executable file
@ -0,0 +1,115 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}
|
||||
{$payObj=='recharge'?"在线充值":"支付订单"}
|
||||
- {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header class="ui-header ui-header-positive wst-header">
|
||||
{if($payObj=='recharge')}
|
||||
<a class="ui-icon-return" href='{:Url('wechat/logmoneys/usermoneys')}'></a><h1>在线充值</h1>
|
||||
{else}
|
||||
<a class="ui-icon-return" href='{:Url('wechat/orders/index')}'></a><h1>支付订单</h1>
|
||||
{/if}
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container" id="shopBox">
|
||||
{if(empty($message))}
|
||||
{if($payObj=='recharge')}
|
||||
<div class="recharge-box">
|
||||
<div>钱包充值</div>
|
||||
<div class="paybox"><span class="wst-orders_prices">¥ {$needPay}</span></div>
|
||||
</div>
|
||||
{else}
|
||||
{volist name="$rs['list']" id="order"}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex item-head" onclick="getOrderDetail({{d[i].orderId}})">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex">订单号:{$order['orderNo']}<span style="float : right;">邮费:{$order['deliverMoney']}</span></div>
|
||||
</div>
|
||||
{volist name="$rs['goods'][$order['orderId']]" id="vo"}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{$vo['goodsImg']}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi">{$vo['goodsName']}</p>
|
||||
{if condition="count($vo['goodsSpecNames']) gt 0"}
|
||||
<p class="o-gSpec ui-nowrap-flex">规格:
|
||||
{volist name="$vo['goodsSpecNames']" id="spec"}
|
||||
{$spec}
|
||||
{/volist}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0"><p>¥ {$vo['goodsPrice']}</p><p>x {$vo['goodsNum']}</p></div>
|
||||
</div>
|
||||
{/volist}
|
||||
|
||||
<div class="ui-btn-wrap" style="text-align: right;padding:10px 0">
|
||||
<span class="wst-orders_pricet">总金额:<span class="wst-orders_prices">¥ <?php echo sprintf("%.2f", $rs['totalMoney']);?></span></span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/if}
|
||||
<div style="text-align: center;padding-top: 20px;">
|
||||
<button type="button" class="wst-btn-dangerlo" onclick="javascript:callpay();" style="width: 80%; display: inline-block;">确认支付</button>
|
||||
</div>
|
||||
</section>
|
||||
{else}
|
||||
<ul class="ui-row-flex wst-flexslp">
|
||||
<li class="ui-col ui-flex ui-flex-pack-center">
|
||||
<p>{$message}</p>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
{if(empty($message))}
|
||||
<script type="text/javascript">
|
||||
//调用微信JS api 支付
|
||||
function jsApiCall(){
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest',
|
||||
<?php echo $jsApiParameters; ?>,
|
||||
function(res){
|
||||
if(res.err_msg=="get_brand_wcpay_request:ok"){
|
||||
location.href = "{$returnUrl}";
|
||||
}
|
||||
}
|
||||
);
|
||||
setTimeout(function(){
|
||||
$('.wst-btn-dangerlo').removeAttr('disabled');
|
||||
},2000);
|
||||
}
|
||||
function callpay(){
|
||||
$('.wst-btn-dangerlo').attr('disabled', 'disabled');
|
||||
if (typeof WeixinJSBridge == "undefined"){
|
||||
if( document.addEventListener ){
|
||||
document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
|
||||
}else if (document.attachEvent){
|
||||
document.attachEvent('WeixinJSBridgeReady', jsApiCall);
|
||||
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
|
||||
}
|
||||
}else{
|
||||
jsApiCall();
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
{if($payObj=='recharge')}
|
||||
backPrevPage(WST.U('wechat/logmoneys/usermoneys'));
|
||||
{else}
|
||||
backPrevPage(WST.U('wechat/orders/index'));
|
||||
{/if}
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
27
hyhproject/wechat2/view/default/users/orders/orders_pay_list.html
Executable file
27
hyhproject/wechat2/view/default/users/orders/orders_pay_list.html
Executable file
@ -0,0 +1,27 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}选择支付方式 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>选择支付方式</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
<ul class="ui-list ui-list-text ui-list-link wst-pa-l">
|
||||
{volist name="$payments[1]" id="pa"}
|
||||
<li class="line" onclick="javascript:toPay({$orderNo},{$isBatch},'{$pa['payCode']}');">
|
||||
<span class="{$pa['payCode']}"></span><h5 class="ui-nowrap">{$pa['payName']}</h5>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
{/block}
|
87
hyhproject/wechat2/view/default/users/orders/orders_pay_wallets.html
Executable file
87
hyhproject/wechat2/view/default/users/orders/orders_pay_wallets.html
Executable file
@ -0,0 +1,87 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}支付订单 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<header class="ui-header ui-header-positive wst-header">
|
||||
<a class="ui-icon-return" href='{:Url('wechat/orders/index')}'></a><h1>支付订单</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
|
||||
{/* 大加载 */}
|
||||
<div class="ui-loading-block" id="Loadl">
|
||||
<div class="ui-loading-cnt">
|
||||
<i class="ui-loading-bright"></i>
|
||||
<p id="j-Loadl">正在加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
<section class="ui-container">
|
||||
{if(empty($message))}
|
||||
<input type="hidden" name="" value="{$data['orderNo']}" id="orderNo" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$data['isBatch']}" id="isBatch" autocomplete="off">
|
||||
{volist name="$rs['list']" id="order"}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex item-head">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex">订单号:{$order['orderNo']}<span style="float : right;">邮费:{$order['deliverMoney']}</span></div>
|
||||
</div>
|
||||
{volist name="$rs['goods'][$order['orderId']]" id="vo"}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{$vo['goodsImg']}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi">{$vo['goodsName']}</p>
|
||||
{if condition="count($vo['goodsSpecNames']) gt 0"}
|
||||
<p class="o-gSpec ui-nowrap-flex">规格:
|
||||
{volist name="$vo['goodsSpecNames']" id="spec"}
|
||||
{$spec}
|
||||
{/volist}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0"><p>¥ {$vo['goodsPrice']}</p><p>x {$vo['goodsNum']}</p></div>
|
||||
</div>
|
||||
{/volist}
|
||||
|
||||
<div class="ui-btn-wrap" style="text-align: right;padding:10px 0">
|
||||
<span class="wst-orders_pricet">总金额:<span class="wst-orders_prices">¥ <?php echo sprintf("%.2f", $rs['totalMoney']);?></span></span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{/volist}
|
||||
<div class="wst-wa-info">
|
||||
<p class="info">钱包余额:<span>¥ {$userMoney}</span>,待支付订单总额:<span>¥ {$needPay}</span></p>
|
||||
{if($payPwd==0)}
|
||||
<p class="pay-info">您尚未设置支付密码,请设置支付密码</p>
|
||||
<div class="pay">设置密码:<input type="password" id="payPwd" maxlength="6" autocomplete="off"></div>
|
||||
<div class="pay">确认密码:<input type="password" id="payPwd2" maxlength="6" autocomplete="off"></div>
|
||||
{else}
|
||||
<div class="pay">支付密码:<input type="password" id="payPwd" maxlength="6" autocomplete="off"></div>
|
||||
{/if}
|
||||
</div>
|
||||
{if($payPwd==1)}<div class="wst-wa-forget ui-whitespace"><a href="{:url('wechat/users/backPayPass')}">忘记密码?</a></div>{/if}
|
||||
<div style="text-align: center;">
|
||||
<button type="button" class="wst-btn-dangerlo" onclick="javascript:walletPay({$payPwd});" style="width: 80%; display: inline-block;">确认支付</button>
|
||||
</div>
|
||||
{else}
|
||||
<ul class="ui-row-flex wst-flexslp">
|
||||
<li class="ui-col ui-flex ui-flex-pack-center">
|
||||
<p>{$message}</p>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</section>
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
backPrevPage(WST.U('wechat/orders/index'));
|
||||
});
|
||||
</script>
|
||||
{/block}
|
Reference in New Issue
Block a user