|
|
@@ -0,0 +1,165 @@
|
|
|
+{extend name="layout:home" /}
|
|
|
+{block name="container"}
|
|
|
+<div class="layui-tab layui-tab-card">
|
|
|
+ <div class="layui-layer-shade recharge-layui-layer-shade4" id="layui-layer-shade4" times="4" style="display: none;"></div>
|
|
|
+ <div style="display: none;" class="layui-layer layui-layer-dialog recharge-layui-layer2" id="layui-layer3" type="dialog" times="2" showtime="0" contype="string">
|
|
|
+ <div id="layui-layer-content2" class="layui-layer-content"></div>
|
|
|
+ <span class="layui-layer-setwin" onclick="hiddenTips2()"><a class="layui-layer-ico layui-layer-close layui-layer-close2"
|
|
|
+ href="javascript:;"></a></span>
|
|
|
+ <div class="layui-layer-btn layui-layer-btn-" onclick="hiddenTips2()"><a class="layui-layer-btn0">确定</a></div>
|
|
|
+ <span class="layui-layer-resize"></span>
|
|
|
+ </div>
|
|
|
+ <div style="display: none;" class="layui-layer layui-layer-dialog recharge-layui-layer2" id="layui-layer2" type="dialog" times="2" showtime="0" contype="string">
|
|
|
+ <div class="layui-tab">
|
|
|
+ <div class="layui-tab-content page-tab-content">
|
|
|
+ <div class="layui-tab-item layui-show" style="width: 300px; height: 150px">
|
|
|
+ <div class="layui-form-item" id="oajax">
|
|
|
+ <label class="layui-form-label" style="width: 100px">选择续费时间:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <select id="selectTime" onchange="onchangeSelect()" class="layui-select layui-unselect layui-form-select" name="type"
|
|
|
+ lay-filter="groups" style="width: 120px">
|
|
|
+ <option value="">选择续费时间</option>
|
|
|
+ {volist name="renewalType" id="value"}
|
|
|
+ <option id="option_{$value.renewal_identity}" value="{$value.renewal_identity}" name="">{$value.renewal_name}</option>
|
|
|
+ {/volist}
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="layui-layer-content" style="text-align: center; font-size: 18px; height: 24px;"></div>
|
|
|
+ <input name="renewal_id" id="renewal_id" style="display: none">
|
|
|
+ <input name="product_id" id="product_id" style="display: none">
|
|
|
+ <div class="layui-form-item" style="margin-top: 25px">
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input type="submit" class="layui-btn layui-btn-normal" lay-submit onclick="submit()"
|
|
|
+ value="{:lang('ds_submit')}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span class="layui-layer-setwin" onclick="hiddenTips()">
|
|
|
+ <a class="layui-layer-ico layui-layer-close layui-layer-close2" href="javascript:;"></a>
|
|
|
+ </span>
|
|
|
+ <span class="layui-layer-resize"></span>
|
|
|
+ </div>
|
|
|
+ <div class="layui-tab-content page-tab-content">
|
|
|
+ <!-- 搜索框开始 -->
|
|
|
+ <div class="search-form">
|
|
|
+ <div class="layui-form-item">
|
|
|
+ <div class="layui-inline">
|
|
|
+ <select name="type" id="type" lay-verify="" class="layui-select layui-unselect layui-form-select">
|
|
|
+ <option value="">全部</option>
|
|
|
+ <option value="30">30天内到期</option>
|
|
|
+ <option value="7">7天内到期</option>
|
|
|
+ <option value="0">已过期</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <button type="submit" class="layui-btn search-subBtn" onclick="showCurrent()">搜索</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <table class="layui-table lay-even">
|
|
|
+ <colgroup>
|
|
|
+ <col width="150">
|
|
|
+ <col width="200">
|
|
|
+ <col>
|
|
|
+ </colgroup>
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>产品名称</th>
|
|
|
+ <th>所属类别</th>
|
|
|
+ <th>产品报价</th>
|
|
|
+ <th>到期时间</th>
|
|
|
+ <th>状态</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {if count($userProduct)}
|
|
|
+ {volist name="userProduct" id="product"}
|
|
|
+ <tr>
|
|
|
+ <td>{$product.product_name}</td>
|
|
|
+ <td>{$product.fatherProduct}</td>
|
|
|
+ <td>{$product.product_money}</td>
|
|
|
+ <td>{$product.userProduct_maturityTime}</td>
|
|
|
+ <td>{$product.status}</td>
|
|
|
+ <td>
|
|
|
+ <a onclick="renewal({$product.userProduct_id}, {$product.product_id}, {$product.product_TypeOne}, {$product.product_TypeTwo}, {$product.product_TypeThree}, {$product.product_TypeFour})" class="layui-btn layui-btn-xs">续费</a>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ {/volist}
|
|
|
+ {else}
|
|
|
+ <td colspan="7" style="text-align: center">无数据</td>
|
|
|
+ {/if}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ {$show_page}
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script>
|
|
|
+ const myHost = "http://" + window.location.host;
|
|
|
+ function renewal(userProduct_id, product_id, money1, money2, money3, money4) {
|
|
|
+ $("#layui-layer2").attr("style","display: block")
|
|
|
+ $("#layui-layer-shade4").attr("style","display: block")
|
|
|
+ $("#renewal_id").val(userProduct_id);
|
|
|
+ $("#product_id").val(product_id);
|
|
|
+ $("#option_1").attr("name","需支付"+money1+"元");
|
|
|
+ $("#option_2").attr("name","需支付"+money2+"元");
|
|
|
+ $("#option_3").attr("name","需支付"+money3+"元");
|
|
|
+ $("#option_4").attr("name","需支付"+money4+"元");
|
|
|
+ }
|
|
|
+ function hiddenTips() {
|
|
|
+ $("#layui-layer2").attr("style","display: none")
|
|
|
+ $("#layui-layer-shade4").attr("style","display: none")
|
|
|
+ }
|
|
|
+ function hiddenTips2() {
|
|
|
+ $("#layui-layer3").attr("style","display: none")
|
|
|
+ $("#layui-layer-shade4").attr("style","display: none")
|
|
|
+ }
|
|
|
+ function onchangeSelect() {
|
|
|
+ let name = $("#selectTime").find("option:selected").attr("name");
|
|
|
+ $("#layui-layer-content").html(name)
|
|
|
+ }
|
|
|
+ function submit() {
|
|
|
+ let url = myHost + "/User/renewal/renewal.html";
|
|
|
+ let renewal_id = $("#renewal_id").val();
|
|
|
+ let product_id = $("#product_id").val();
|
|
|
+ let type = $("#selectTime").find("option:selected").attr("value");
|
|
|
+ hiddenTips();
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: url,
|
|
|
+ data: {type: type, product_id: product_id, renewal_id: renewal_id},
|
|
|
+ dataType: "json",
|
|
|
+ success: function (msg) {
|
|
|
+ $("#layui-layer-content2").html(msg['msg'])
|
|
|
+ $("#layui-layer3").attr("style","display: block")
|
|
|
+ $("#layui-layer-shade4").attr("style","display: block")
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ $("#layui-layer-content2").html("错误:链接不到服务器")
|
|
|
+ $("#layui-layer3").attr("style","display: block")
|
|
|
+ $("#layui-layer-shade4").attr("style","display: block")
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ layui.use('laydate', function(){
|
|
|
+ var laydate = layui.laydate;
|
|
|
+
|
|
|
+ //执行一个laydate实例
|
|
|
+ laydate.render({
|
|
|
+ elem: '#creatTime' //指定元素
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem:'#timeRang',
|
|
|
+ range:true,
|
|
|
+ format: 'yyyy/MM/dd',
|
|
|
+ done: function(value, date){
|
|
|
+ /* 时间选择完成后的回调 */
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+</script>
|
|
|
+{/block}
|
|
|
+
|