WIN-2308041133\Administrator 1 year ago
parent
commit
40cb924340

+ 1 - 1
application/admin/lang/zh-cn/wechat/plan.php

@@ -3,7 +3,7 @@
 return [
 return [
     'Cid'        => '单位编号',
     'Cid'        => '单位编号',
     'Plan_id'    => '模板编号',
     'Plan_id'    => '模板编号',
-    'Price'      => '价格',
+//    'Price'      => '价格',
     'Image'      => '文章图片',
     'Image'      => '文章图片',
     'Title'      => '文章标题',
     'Title'      => '文章标题',
     'Num'        => '参与人数',
     'Num'        => '参与人数',

+ 1 - 1
application/admin/model/WechatPlan.php

@@ -29,7 +29,7 @@ class WechatPlan extends Model
         $order = "id desc";
         $order = "id desc";
         if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
         if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
         if (isset($where['plan_id']) && $where['plan_id'] > 0) $xwhere['plan_id'] = $where['plan_id'];
         if (isset($where['plan_id']) && $where['plan_id'] > 0) $xwhere['plan_id'] = $where['plan_id'];
-        if (isset($where['price']) && $where['price'] > 0) $xwhere['price'] = $where['price'];
+//        if (isset($where['price']) && $where['price'] > 0) $xwhere['price'] = $where['price'];
 //        if (isset($where['paid']) && $where['paid'] > -1) $xwhere['paid'] = $where['paid'];
 //        if (isset($where['paid']) && $where['paid'] > -1) $xwhere['paid'] = $where['paid'];
 //        if (isset($where['help_id']) && $where['help_id'] > -1) $xwhere['help_id'] = $where['help_id'];
 //        if (isset($where['help_id']) && $where['help_id'] > -1) $xwhere['help_id'] = $where['help_id'];
 //        if (isset($where['order']) && $where['order'] != '') $order = $where['order'];
 //        if (isset($where['order']) && $where['order'] != '') $order = $where['order'];

+ 4 - 0
application/admin/model/WechatPlanRecord.php

@@ -48,6 +48,10 @@ class WechatPlanRecord extends Model
         if (isset($where['uid']) && $where['uid'] > 0) $xwhere['uid'] = $where['uid'];
         if (isset($where['uid']) && $where['uid'] > 0) $xwhere['uid'] = $where['uid'];
         if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
         if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
         $data = $model->where($xwhere)->order($order)->select();
         $data = $model->where($xwhere)->order($order)->select();
+        $wechatPlan = new WechatPlan();
+        foreach ($data as $k => $v){
+            $data[$k]['image'] = $wechatPlan->where('plan_id', $v['plan_id'])->value('image');
+        }
         $count = $model->where($xwhere)->count();
         $count = $model->where($xwhere)->count();
         return compact('count', 'data');
         return compact('count', 'data');
     }
     }

+ 6 - 6
application/admin/view/wechat/plan/add.html

@@ -18,12 +18,12 @@
             <input id="c-plan_id" class="form-control" name="row[plan_id]" type="text" data-rule="required; remote(wechat/autoreply/check_text_unique)" >
             <input id="c-plan_id" class="form-control" name="row[plan_id]" type="text" data-rule="required; remote(wechat/autoreply/check_text_unique)" >
         </div>
         </div>
     </div>
     </div>
-    <div class="form-group">
-        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
-        <div class="col-xs-12 col-sm-8">
-            <input id="c-price" class="form-control" name="row[price]" type="text">
-        </div>
-    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-price" class="form-control" name="row[price]" type="text">-->
+<!--        </div>-->
+<!--    </div>-->
     <div class="form-group">
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Hidedata')}:</label>
         <label class="control-label col-xs-12 col-sm-2">{:__('Hidedata')}:</label>
         <div class="col-xs-12 col-sm-8">
         <div class="col-xs-12 col-sm-8">

+ 6 - 6
application/admin/view/wechat/plan/edit.html

@@ -19,12 +19,12 @@
             <input type="text" name="row[plan_id]" value="{$row.plan_id}"  id="c-plan_id" class="form-control" data-rule="required" />
             <input type="text" name="row[plan_id]" value="{$row.plan_id}"  id="c-plan_id" class="form-control" data-rule="required" />
         </div>
         </div>
     </div>
     </div>
-    <div class="form-group">
-        <label for="c-price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
-        <div class="col-xs-12 col-sm-8">
-            <input type="text" name="row[price]" value="{$row.price}"  id="c-price" class="form-control" data-rule="required" />
-        </div>
-    </div>
+<!--    <div class="form-group">-->
+<!--        <label for="c-price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input type="text" name="row[price]" value="{$row.price}"  id="c-price" class="form-control" data-rule="required" />-->
+<!--        </div>-->
+<!--    </div>-->
     <div class="form-group">
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Hidedata')}:</label>
         <label class="control-label col-xs-12 col-sm-2">{:__('Hidedata')}:</label>
         <div class="col-xs-12 col-sm-8">
         <div class="col-xs-12 col-sm-8">

+ 2 - 2
public/assets/js/backend/wechat/plan.js

@@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
                         {field: 'plan_id', title: __('Plan_id')},
                         {field: 'plan_id', title: __('Plan_id')},
                         {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'title', title: __('Title')},
                         {field: 'title', title: __('Title')},
-                        {field: 'price', title: __('Price')},
+                        // {field: 'price', title: __('Price')},
                         {field: 'num', title: __('Num')},
                         {field: 'num', title: __('Num')},
                         {field: 'createtime', title: __('Create time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                         {field: 'createtime', title: __('Create time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                         // {field: 'updatetime', title: __('Update time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                         // {field: 'updatetime', title: __('Update time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
@@ -53,7 +53,7 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
                 Form.api.bindevent($("form[role=form]"));
                 Form.api.bindevent($("form[role=form]"));
 
 
                 var refreshkey = function (data) {
                 var refreshkey = function (data) {
-                    $("input[name='row[price]']").val(data.eventkey).trigger("change");
+                    // $("input[name='row[price]']").val(data.eventkey).trigger("change");
                     Layer.closeAll();
                     Layer.closeAll();
                     var keytitle = data.text;
                     var keytitle = data.text;
                     var cont = $(".clickbox .create-click:first");
                     var cont = $(".clickbox .create-click:first");