afa 9 months ago
parent
commit
4545bca495

+ 1 - 2
application/admin/view/product/areas/index.html

@@ -10,8 +10,7 @@
                         <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('product/areas/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                         <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('product/areas/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                         <a href="javascript:;" class="btn btn-info btn-exports {:$auth->check('product/areas/exports')?'':'hide'}" title="{:__('import')}" id="btn-export-file"><i class="fa fa-download"></i> {:__('import')}</a>
-
-                        
+                        <a href="javascript:;" class="btn btn-primary btn-importlog  {:$auth->check('ledger/importlog/index')?'':'hide'}" title="{:__('导入日志')}" id="btn-export-file"><i class="fa fa-bars"></i> {:__('导入日志')}</a>
                     </div>
                     <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                            data-operate-edit="{:$auth->check('product/areas/edit')}"

+ 1 - 1
application/api/controller/Order.php

@@ -172,9 +172,9 @@ class Order extends Api
         //启动事务
         Db::startTrans();
         try {
-
             $order_info = $productTransfer->where('id', $params['order_id'])->where('status', $productTransfer::NORMAL)->find();
             if(empty($order_info)) throw new Exception(__("订单不存在"));
+            if($order_info['user_id'] == $this->auth->id) throw new Exception(__("不能购买自己寄售的商品"));
             $chabao = $ledgerWalletModel::getWalletChaBao($this->auth->id);
             if(bccomp($order_info['price'], $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
 

+ 5 - 5
application/api/lang/en.php

@@ -11,8 +11,8 @@ return [
     'Withdrawal failed, please contact customer service.'                        => 'Withdrawal failed, please contact customer service.',
     'Signature verification failed'                                              => 'ignature verification failed',
     '热销支付'                               => 'Hot-selling payment',
-    '转让支付'                               => 'Transfer payment',
-    '转让收款'                               => 'Transfer receipt',
+    '转让支付'                               => 'Consignment Payment',
+    '转让收款'                               => 'Consignment receipt',
     '充值'                                   => 'Recharge',
     '提现'                                   => 'Withdraw',
     '分享'                                   => 'Share',
@@ -26,11 +26,11 @@ return [
     '赠送支出'                               => 'Gift Expenses',
     '赠送收款'                                                                    => 'Gift Receipt',
     '抢购未开始'                                                                  => 'The flash sale has not started yet',
-    '当前订单最低转让金额为'                                                       => 'The current minimum transfer amount for an order is',
+    '当前订单最低转让金额为'                                                       => 'The current minimum consignment amount for an order is',
     '已购买'                                                                      => 'Purchased',
-    '转让中'                                                                      => 'Transferring',
+    '转让中'                                                                      => 'On consignment',
     '已赠送'                                                                      => 'Gifted',
-    '已转让'                                                                      => 'Transferred',
+    '已转让'                                                                      => 'Consigned',
     '已提货'                                                                      => 'Gifted',
     '已取消'                                                                      => 'Cancelled',
     '物流运费'                                                                    => 'Logistics freight'

+ 1 - 1
application/api/lang/en/order.php

@@ -9,7 +9,7 @@ return [
       '交易Hash不能为空'       => 'transaction hash cannot be empty.',
       '已下单'                                => 'Ordered',
       '已付款'                                => 'Paid',
-      '已转让'                                => 'Transferred',
+      '已转让'                                => 'Consigned',
       '已发货'                                => 'Shipped',
       '已取消'                                => 'Cancelled',
       '赠送'                                  => 'Giveaway',

+ 2 - 2
application/api/lang/en/user.php

@@ -37,8 +37,8 @@ return [
     'Change password successful'            => '修改密码成功',
     'Reset password successful'             => '重置密码成功',
     '热销支付'                               => 'Hot-selling payment',
-    '转让支付'                               => 'Transfer payment',
-    '转让收款'                               => 'Transfer receipt',
+    '转让支付'                               => 'Consignment Payment',
+    '转让收款'                               => 'Consignment receipt',
     '充值'                                   => 'Recharge',
     '提现'                                   => 'Withdraw',
     '分享'                                   => 'Share',

+ 5 - 4
application/api/lang/zh-cn.php

@@ -115,14 +115,15 @@ return [
     '社区津贴'                                                                    => '社区津贴',
     '服务津贴'                                                                    => '服务津贴',
     '共创津贴'                                                                    => '共创津贴',
-    '当前订单最低转让金额为'                                                       => '当前订单最低转让金额为',
+    '当前订单最低转让金额为'                                                       => '当前订单最低寄售金额为',
     '已购买'                                                                      => '已购买',
-    '转让中'                                                                      => '转让中',
+    '转让中'                                                                      => '寄售中',
     '已赠送'                                                                      => '已赠送',
-    '已转让'                                                                      => '已转让',
+    '已转让'                                                                      => '已寄售',
     '已提货'                                                                      => '已提货',
     '已取消'                                                                      => '已取消',
-    '物流运费'                                                                    => '物流运费'
+    '物流运费'                                                                    => '物流运费',
+    '不能购买自己寄售的商品'                                                       => '不能购买自己寄售的商品' 
 
 
 ];

+ 1 - 1
application/api/lang/zh-cn/order.php

@@ -9,7 +9,7 @@ return [
       '交易Hash不能为空'       => '交易Hash不能为空',
       '已下单'                => '已下单',
       '已付款'                => '已付款',
-      '已转让'                => '已转让',
+      '已转让'                => '已寄售',
       '提货'                  => '提货',
       '已取消'                => '已取消',
       '赠送'                  => '赠送',

+ 2 - 2
application/api/lang/zh-cn/user.php

@@ -37,8 +37,8 @@ return [
     'Change password successful'            => '修改密码成功',
     'Reset password successful'             => '重置密码成功',
     '热销支付'                               => '热销支付',
-    '转让支付'                               => '转让支付',
-    '转让收款'                               => '转让收款',
+    '转让支付'                               => '寄售支付',
+    '转让收款'                               => '寄售收款',
     '充值'                                  => '充值',
     '提现'                                  => '提现',
     '分享'                                  => '分享',

+ 8 - 20
public/assets/js/backend/product/areas.js

@@ -35,22 +35,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'address', title: __('Address'), operate: 'LIKE'},
                         {field: 'status', title: __('状态'), searchList: { "1": __('正常'), "0": __('已出售')}, formatter: Table.api.formatter.status },
                         {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
-                        { field: 'operate', title: __('Operate'),
-                            buttons:[
-                                {
-                                   name:'importlog',//名称开始按钮 classname: 'btn btn-xs btn-primary btn-dialog',
-                                   text:'导入日志',//文本
-                                   classname:'btn btn-xs btn-info btn-primary btn-dialog',//按钮样式
-                                   icon:'fa fa-cog',//图标
-                                   url:'ledger/importlog/index',//请求的方法
-                                   extend:'data-area=["80%","85%"]',
-                                   refresh:true,//一开始界面需要刷新
-                                 },
-                              ],
-                            table: table, events: Table.api.events.operate,
-                            formatter: Table.api.formatter.operate 
-                        }
-
+                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]
             });
@@ -58,13 +43,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             // 为表格绑定事件
             Table.api.bindevent(table);
             $(".btn-add").data("area", ["60%", "50%"]);
+            $(".btn-importlog").data("area", ["70%", "80%"]);
             //导入地区
             $(document).on("click",".btn-exports",function(){
                 Fast.api.open('product/areas/exports?ids='+Config.ids, '导入地区',{
-                    //接收产品弹窗Fast.api.close传过来的参数
-                    callback:function(data){
-                    
-                    }
+                });
+            })
+            //导入日志
+            $(document).on("click",".btn-importlog",function(){
+                Fast.api.open('ledger/importlog/index?ids='+Config.ids, '导入日志', {
+                    area:["70%", "80%"]
                 });
             })
         },