diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php
index 9a50e64d0..a0971e61d 100644
--- a/Application/Admin/Common/extend.php
+++ b/Application/Admin/Common/extend.php
@@ -2878,3 +2878,27 @@ function getCpCompanySelect($type = 1){
 
     return $data;
 }
+
+/**
+ * 回去商户列表
+ * @return mixed
+ */
+function getMerchantList($type = 1){
+
+    $data = M("payment_merchant","tab_")->field("id,name")->select();
+
+    return $data;
+}
+
+
+/**
+ * 回去商户列表
+ * @param $type 1 渠道 2 包名获取
+ * @return mixed
+ */
+function getMerchantName($id = 1){
+
+    $data = M("payment_merchant","tab_")->field("name")->where(['id'=>$id])->find();
+
+    return $data['name']?$data['name']:'无';
+}
\ No newline at end of file
diff --git a/Application/Admin/Controller/PayMerchantController.class.php b/Application/Admin/Controller/PayMerchantController.class.php
index 885c6ad46..912c76ddb 100644
--- a/Application/Admin/Controller/PayMerchantController.class.php
+++ b/Application/Admin/Controller/PayMerchantController.class.php
@@ -157,9 +157,6 @@ class PayMerchantController extends ThinkController
                 ->select();
         }
 
-//        var_dump($data);die();
-
-
         $count = M()->table("({$sql})a")
             ->field("merchant_id")
             ->page($p, $row)
@@ -183,6 +180,15 @@ class PayMerchantController extends ThinkController
 //            ->where($map)
             ->find();
 
+        $sum['cash_amount'] = round ($sum['cash_amount'],2);
+        $sum['test_amount'] = round ($sum['test_amount'],2);
+        $sum['coin_amount'] = round ($sum['coin_amount'],2);
+        $sum['offcial_amount'] = round ($sum['offcial_amount'],2);
+        $sum['spread_amount'] = round ($sum['spread_amount'],2);
+        $sum['offcial_amount'] = round ($sum['supersign_amount'],2);
+        $sum['spread_amount'] = round ($sum['test_order_amount'],2);
+
+
         $sum['sum'] = $sum['cash_amount']+$sum['test_amount']+$sum['coin_amount']+$sum['offcial_amount']
             +$sum['spread_amount']+$sum['supersign_amount']+$sum['test_order_amount'];
 
diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php
index fc537e30a..46ca35e49 100644
--- a/Application/Admin/Controller/SpendController.class.php
+++ b/Application/Admin/Controller/SpendController.class.php
@@ -72,6 +72,11 @@ class SpendController extends ThinkController
             unset($_REQUEST['pay_game_status']);
         }
 
+        if (isset($_REQUEST['merchant_id'])) {
+            $map['merchant_id'] = $_REQUEST['merchant_id'];
+            unset($_REQUEST['merchant_id']);
+        }
+
         $marketAdminId = 0;
         $isMarketAdmin = isMarketAdmin();
         if ($isMarketAdmin) {
diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php
index 0141a6507..f8fc41845 100644
--- a/Application/Admin/Controller/TestOrderController.class.php
+++ b/Application/Admin/Controller/TestOrderController.class.php
@@ -91,6 +91,14 @@ class TestOrderController extends ThinkController
             $this->ajaxReturn(['status'=>0,'msg'=>'订单重复录入']);
         }
 
+        if ($data['pay_way'] == 1) {
+            $data['merchant_way'] = 1;
+        } else if($data['pay_way'] == 2||$data['pay_way'] == 3) {
+            $data['merchant_way'] = 2;
+        } else {
+            $data['merchant_way'] = 4;
+        }
+
         $isSuccess = M('test_order','tab_')->add($data);
 
         if ($isSuccess) {
diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html
index d2a73e5be..9eb4df397 100644
--- a/Application/Admin/View/Spend/lists.html
+++ b/Application/Admin/View/Spend/lists.html
@@ -131,7 +131,16 @@
                     <?php endforeach;?>
                 </select>
             </div>
+
             <?php endif;?>
+            <div class="input-list search_item input-list-gamenoticestatus">
+                <select id="merchant_id" name="merchant_id" class="select_gallery">
+                    <option value="0">请选择商户</option>
+                    <volist name=":getMerchantList()" id="vo">
+                        <option value="{$vo.id}">{$vo.name}</option>
+                    </volist>
+                </select>
+            </div>
             <input type="hidden" name="" value="" class="sortBy">
 
             <div class="input-list search_item">
@@ -162,6 +171,7 @@
                     <th>游戏名称</th>
                     <th>所属推广员</th>
                     <th>所属市场专员</th>
+                    <th>所属商户</th>
                     <th>充值ip</th>
                     <th>区服ID</th>
                     <th>游戏区服</th>
@@ -227,6 +237,7 @@
                                 </eq>
                             </td>
                             <td >{$data.market_admin_username}</td>
+                            <td >{:getMerchantName($data['merchant_id'])}</td>
                             <td>{$data.spend_ip}</td>
                             <empty name='data.server_name'>
                                 <td>— —</td>
diff --git a/Application/Admin/View/TestOrder/addOrder.html b/Application/Admin/View/TestOrder/addOrder.html
index 0f523d22e..5d717716f 100644
--- a/Application/Admin/View/TestOrder/addOrder.html
+++ b/Application/Admin/View/TestOrder/addOrder.html
@@ -151,6 +151,17 @@
                     </select>
                 </td>
             </tr>
+            <tr>
+                <td class="l">充值方式:</td>
+                <td class="r">
+                    <select id="merchant_id" name="merchant_id" class="select_gallery">
+                        <volist name=":getMerchantList()" id="vo">
+                            <option value="{$vo.id}">{$vo.name}</option>
+                        </volist>
+                    </select>
+                </td>
+            </tr>
+
             <tr>
                 <td class="l">充值时间:</td>
                 <td class="r">