lizhen_gitee 11 ay önce
ebeveyn
işleme
936624e5b3

+ 1 - 1
application/admin/lang/zh-cn/unishop/order.php

@@ -47,7 +47,7 @@ return [
     'Consignee mobile'           => '收货人电话',
     'Refund status'           => '售后状态',
     'Apply'           => '申请中',
-    'Pass'           => '通过',
+    'Pass'           => '同意',
     'Pass and left User delivery'           => '通过(让用户发货)',
     'Waiting for shipment'           => '等待发货',
     'Refuse'           => '拒绝',

+ 56 - 55
application/admin/view/unishop/order/refund.html

@@ -1,4 +1,4 @@
-<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
 
     <input type="hidden" name="updatetime" value="{$row.updatetime}" />
 
@@ -7,7 +7,7 @@
             订单金额:¥{$row.order_price}
         </li>
         <li class="list-group-item">
-            实付金额:¥{$row.total_price}元 (包含优惠¥{$row.discount_price},物流费用¥{$row.delivery_price})
+            实付金额:¥{$row.total_price}元 (包含:<!--优惠¥{$row.discount_price},-->物流费用¥{$row.delivery_price})
         </li>
         {if $row.had_refund}
         <li class="list-group-item">
@@ -21,11 +21,11 @@
             已退款:{:__('No')}
         </li>
         {/if}
-        {if $refund.service_type > 0}
+        <!--{if $refund.service_type > 0}
         <li class="list-group-item">
             客户退货物流单号:{$refund.express_number}
         </li>
-        {/if}
+        {/if}-->
     </ul>
 
     <style>
@@ -63,81 +63,82 @@
     {/foreach}
 
     <ul class="list-group" style="margin-top: 20px; margin-bottom: 50px">
-        <li class="list-group-item">
+        <!--<li class="list-group-item">
             货物状态:{$refund.receiving_status_text[$refund.receiving_status]}
         </li>
         <li class="list-group-item">
             服务类型:{$refund.service_type_text[$refund.service_type]}
-        </li>
-        <li class="list-group-item">
-            退款金额:¥{$refund.amount}
-        </li>
+        </li>-->
+
         <li class="list-group-item">
             换货原因:{$refund.reason_type}
         </li>
         <li class="list-group-item">
             退货说明:{$refund.refund_explain}
         </li>
+        <li class="list-group-item">
+            退货图片:
+            <div class="form-group">
+                <div class="col-xs-12 col-sm-8">
+                    <ul class="row list-inline faupload-preview" data-listidx="0">
+
+
+            <?php
+            if(!empty($refund['images']))
+            {
+                $images = explode(',',$refund['images']);
+                if(!empty($images)){
+                    foreach($images as $key => $val){
+            ?>
+                        <li class="col-xs-3">
+                            <a href="{$val}" data-url="{$val}" target="_blank" class="thumbnail">
+                                <img src="{$val}" style="width:100px;" onerror="this.src='/admin.php/ajax/icon?suffix=jpg';this.onerror=null;" class="img-responsive">
+                            </a>
+                        </li>
+            <?php
+                    }
+                }
+            }
+            ?>
+                    </ul>
+                </div>
+            </div>
+        </li>
     </ul>
 
-    <style>
-        .footer{
-            background: #ecf0f1;
-            height: auto;
-            position: fixed;
-            bottom: 0;
-            padding: 10px !important;
-            overflow: hidden;
-            width: 100%;
-            margin-bottom: 0px;
-        }
-    </style>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">退款金额:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-remark" class="form-control" name="refund_amount" type="text" value="{$refund.amount}">
+            <font color="red">选择【同意】后:如果是余额支付,将退款到余额;如果是在线支付的,将原路退回。选择【同意】或【拒绝】之后即退款结束,无法再次退款</font>
+        </div>
+    </div>
 
-    <div class="form-group footer">
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Refund status')}:</label>
         <div class="col-xs-12 col-sm-8">
+
             <div class="radio">
-                {:__('Refund status')}:
                 {foreach name="refundStatusList" item="vo"}
                 {if $key > 0}
-                <label for="row[refund_status]-{$key}">
-                    <input id="row[refund_status]-{$key}" name="row[refund_status]" type="radio"
-                           value="{$key}" {in name="key" value="$row.refund_status" }checked{/in} /> {$vo}
-                </label>
+                <label for="row[refund_status]-{$key}"><input id="row[refund_status]-{$key}" name="row[refund_status]" type="radio" value="{$key}" {in name="key" value="$row.refund_status"}checked{/in} /> {$vo}</label>
                 {/if}
                 {/foreach}
             </div>
-        </div>
-        <div class="col-xs-12 col-sm-4">
-            <button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">{:__('OK')}</button>
-            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
+
         </div>
     </div>
 
-    <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
-        <div class="modal-dialog modal-sm" role="document">
-            <div class="modal-content">
-                <div class="modal-header">
-                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-                    <h4 class="modal-title" id="myModalLabel">{:__('Choose')}</h4>
-                </div>
-                <div class="alert alert-warning" role="alert">如果是货到付款的,请联系用户</div>
-                <div class="alert alert-warning" role="alert">如果是在线支付的,请确认收到货再退钱</div>
-                <div class="modal-body">
-                    <label for="row[refund_action]-0">
-                        <input id="row[refund_action]-0" name="row[refund_action]" type="radio" value="0" checked />
-                        {:__('Not withdraw money')}
-                    </label>
-                    <label for="row[refund_action]-1">
-                        <input id="row[refund_action]-1" name="row[refund_action]" type="radio" value="1" />
-                        {:__('Withdraw money')}
-                    </label>
-                </div>
-                <div class="modal-footer">
-                    <button type="button" class="btn btn-default" data-dismiss="modal">{:__('Close')}</button>
-                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
-                </div>
-            </div>
+    <?php if($row['refund_status'] != 3 && $row['refund_status'] != 4){ ?>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
+            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
         </div>
     </div>
+    <?php } ?>
+
+
 </form>
 

+ 5 - 1
public/assets/js/backend/unishop/order.js

@@ -164,7 +164,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             ]
                         }
                     ]
-                ]
+                ],
+                onLoadSuccess:function(){
+                    // 这里就是数据渲染结束后的回调函数
+                    $(".btn-refund").data("area", ['80%','80%']);
+                }
             });
 
             // 为表格绑定事件