zxhxx 3 years ago
parent
commit
df038b613f

+ 1 - 0
application/admin/controller/Lave.php

@@ -46,6 +46,7 @@ class Lave extends Backend
             /**
              * 获取企业信息
              */
+            $where1 = null;
             if(is_array(is_sys_admin()))
             {
                 $where1['cid'] = is_sys_admin()['cid'];

+ 4 - 1
application/admin/lang/zh-cn/project/project_donation_order.php

@@ -13,7 +13,10 @@ return [
     'Order_status 1'      => '审核通过',
     'Order_status -1'     => '不通过',
     'Order_status 2'      => '已发货',
-    'Order_status 3'      => '完成',
+    'Order_status 3'      => '捐赠品入库',
+    'Order_status 4'      => '捐赠品出库',
+    'Order_status 5'      => '发受捐者',
+    'Order_status 6'      => '受捐者反馈',
     'Add_time'            => '创建时间',
     'Delivery_name'       => '快递',
     'Delivery_id'         => '快递单号',

+ 1 - 1
application/admin/model/project/ProjectDonationOrder.php

@@ -38,7 +38,7 @@ class ProjectDonationOrder extends Model
     
     public function getOrderStatusList()
     {
-        return ['0' => __('Order_status 0'), '1' => __('Order_status 1'), '-1' => __('Order_status -1'), '2' => __('Order_status 2'), '3' => __('Order_status 3')];
+        return ['0' => __('Order_status 0'), '1' => __('Order_status 1'), '-1' => __('Order_status -1'), '2' => __('Order_status 2'), '3' => __('Order_status 3'), '4' => __('Order_status 4'), '5' => __('Order_status 5'), '6' => __('Order_status 6')];
     }
 
 

+ 2 - 6
application/admin/view/project/project_donation_order/add.html

@@ -1,15 +1,11 @@
 <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
 
-    {eq name="admin.cid" value="0"}
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Cid')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-cid" data-rule="required" data-source="Company" data-field="company_name" class="form-control selectpage" name="row[cid]" type="text" >
+            <input id="c-cid" class="form-control" name="row[cid]" type="number">
         </div>
     </div>
-    {else/}
-    <input id="c-cid"  name="row[cid]" type="hidden" value="{$admin.cid}">
-    {/eq}
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Uid')}:</label>
         <div class="col-xs-12 col-sm-8">
@@ -145,7 +141,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Logistics')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-logistics" class="form-control" name="row[logistics]" type="number" value="0">
+            <input id="c-logistics" class="form-control" name="row[logistics]" type="text" value="0">
         </div>
     </div>
     <div class="form-group">

+ 3 - 3
application/admin/view/project/project_donation_order/edit.html

@@ -13,7 +13,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Uid')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-uid" class="form-control" name="row[uid]" type="number" value="{$row.uid|htmlentities}">
+           <input id="c-uid" class="form-control" name="row[uid]" data-source="user/user" type="text" data-field="nickname" value="{$row.uid|htmlentities}">
         </div>
     </div>
     <div class="form-group">
@@ -25,7 +25,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Project_id')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-project_id" data-rule="required" data-source="project/index" class="form-control selectpage" name="row[project_id]" type="text" value="{$row.project_id|htmlentities}">
+            <input id="c-project_id" data-rule="required" data-source="project/project_donation" data-field="title" class="form-control selectpage" name="row[project_id]" type="text" value="{$row.project_id|htmlentities}">
         </div>
     </div>
     <div class="form-group">
@@ -145,7 +145,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Logistics')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-logistics" class="form-control" name="row[logistics]" type="number" value="{$row.logistics|htmlentities}">
+            <input id="c-logistics" class="form-control" name="row[logistics]" type="text" value="{$row.logistics|htmlentities}">
         </div>
     </div>
     <div class="form-group">

+ 1 - 0
application/api/controller/Index.php

@@ -38,6 +38,7 @@ class Index extends Api
      */
     public function company()
     {
+
         $rs = Company::where('id',$this->cid)->field('company_name,company_tel,sys_appid,wechat_appid,wechat_share_image,wechat_qrcode_image,routine_appid,share_title,share_info,wx_open_appid')->find();
         if($rs) {
             $this->success('获取成功', $rs->toArray());

+ 1 - 0
application/api/controller/Lave.php

@@ -8,6 +8,7 @@ use think\Request;
 
 class Lave extends Api
 {
+    protected $noNeedLogin = ['*'];
     protected $noNeedRight = ['*'];
     public function lst(Request $request)
     {

+ 9 - 12
application/common/model/project/ProjectDonationOrder.php

@@ -14,10 +14,6 @@ use think\Exception;
 class ProjectDonationOrder extends BaseModel
 {
 
-    
-
-    
-
     // 表名
     protected $name = 'project_donation_order';
     
@@ -137,27 +133,28 @@ class ProjectDonationOrder extends BaseModel
     public static function lst($where)
     {
         $model = new self;
+        $xwhere = null;
         if($where['all'] == 0)
         {
-            if (isset($where['status']) && $where['status']>-2) $model = $model->where('order_status',$where['status']);
+            if (isset($where['status']) && $where['status']>-2) $xwhere['order_status'] = $where['status'];
         }
         else
         {
             if($where['status']==1)
             {
-                $model = $model->where('order_status','>',0);
+                $xwhere['order_status'] = ['>',0];
+
             }
             elseif($where['status']==-1)
             {
-                $model = $model->where('order_status',-1);
+                $xwhere['order_status'] = -1;
             }
         }
 
-        if (isset($where['uid']) && $where['uid']>0) $model = $model->where('uid',$where['uid']);
-        if (isset($where['cid']) && $where['cid']>0) $model = $model->where('cid',$where['cid']);
-        $count = $model->count();
-        $list = $model->page($where['page'],$where['limit'])->order('id desc')->select();
-
+        if (isset($where['uid']) && $where['uid']>0) $xwhere['uid'] = $where['uid'];
+        if (isset($where['cid']) && $where['cid']>0) $xwhere['cid'] = $where['cid'];
+        $count = $model->where($xwhere)->count();
+        $list = $model->where($xwhere)->page($where['page'],$where['limit'])->order('id desc')->select();
         foreach ($list as &$v)
         {
             $v['item'] = ProjectDonationOrderInfo::where('order_id',$v['id'])->select();

+ 2 - 2
public/assets/js/backend/project/project_donation_order.js

@@ -33,7 +33,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'project_user_id', title: __('Project_user_id')},
                         {field: 'total_num', title: __('Total_num')},
                         {field: 'order_sn', title: __('Order_sn'), operate: 'LIKE'},
-                        {field: 'order_status', title: __('Order_status'), searchList: {"0":__('Order_status 0'),"1":__('Order_status 1'),"-1":__('Order_status -1'),"2":__('Order_status 2'),"3":__('Order_status 3')}, formatter: Table.api.formatter.status},
+                        {field: 'order_status', title: __('Order_status'), searchList: {"0":__('Order_status 0'),"1":__('Order_status 1'),"-1":__('Order_status -1'),"2":__('Order_status 2'),"3":__('Order_status 3'),"4":__('Order_status 4'),"5":__('Order_status 5'),"6":__('Order_status 6')}, formatter: Table.api.formatter.status},
                         {field: 'add_time', title: __('Add_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {field: 'delivery_name', title: __('Delivery_name'), operate: 'LIKE'},
                         {field: 'delivery_id', title: __('Delivery_id'), operate: 'LIKE'},
@@ -48,7 +48,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'qc', title: __('Qc'), operate: 'LIKE'},
                         {field: 'worth', title: __('Worth'), operate: 'LIKE'},
                         {field: 'total_amount', title: __('Total_amount'), operate:'BETWEEN'},
-                        {field: 'logistics', title: __('Logistics')},
+                        {field: 'logistics', title: __('Logistics'), operate: 'LIKE'},
                         {field: 'feedback', title: __('Feedback'), operate: 'LIKE'},
                         {field: 'feedback_admin', title: __('Feedback_admin')},
                         {field: 'feedback_time', title: __('Feedback_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},