hrjy 2 лет назад
Родитель
Сommit
9dc470d693

+ 227 - 0
app/admin/controller/water/WaterCardOrder.php

@@ -0,0 +1,227 @@
+<?php
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\controller\water;
+
+use app\admin\controller\AuthController;
+use crmeb\services\{ExpressService,
+    JsonService,
+    JsonService as Json,
+    MiniProgramService,
+    WechatService,
+    FormBuilder as Form,
+    CacheService,
+    UtilService as Util};
+use think\facade\Route as Url;
+use think\facade\Validate;
+Use app\admin\model\water\WaterCardOrder as model;
+
+/**
+ * 订单管理控制器 同一个订单表放在一个控制器
+ * Class StoreOrder
+ * @package app\admin\controller\store
+ */
+class WaterCardOrder extends AuthController
+{
+    /**
+     * @return mixed
+     */
+    public function index()
+    {
+        return $this->fetch();
+    }
+
+
+    public function list()
+    {
+        $where = Util::getMore([
+            ['page', 1],
+            ['limit', 20],
+            ['name', ''],
+            ['card', ''],
+            ['order_id', ''],
+        ]);
+
+        return Json::successlayui(model::list($where));
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create($id = 0)
+    {
+        $f = [];
+        $f[] = Form::input('name', '名称')->col(12);
+        $f[] = Form::select('type', '选择分类', '')->options([
+            ['value' => 0, 'label' => '请选择分类'],
+            ['value' => 1, 'label' => '顶板'],
+            ['value' => 2, 'label' => '侧板'],
+            ['value' => 3, 'label' => '拉筋'],
+            ['value' => 4, 'label' => '底板'],
+        ])->filterable(true);
+        $f[] = Form::select('th_id', '选择厚度', '')->options(
+            array_merge([['value' => 0, 'label' => '请选择分类']], \app\admin\model\water\WaterThickness::order('id DESC')->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::input('weight', '重量(kg)');
+        $f[] = Form::input('unit_price', '单价');
+        $f[] = Form::input('company', '单位');
+        $f[] = Form::input('long', '长');
+        $f[] = Form::input('wide', '宽');
+        $form = Form::make_post_form('添加', $f, Url::buildUrl('save'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+
+
+    }
+
+    public function save()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'name',
+            'type',
+            'th_id',
+            'weight',
+            'unit_price',
+            'company',
+            'long',
+            'wide',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'type' => 'require',
+            'th_id' => 'require',
+            'weight' => 'require',
+            'unit_price' => 'require',
+            'company' => 'require',
+            'long' => 'require',
+            'wide' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'type.require' => '请选择分类',
+            'th_id.require' => '请选择厚度',
+            'weight.require' => '请填写重量',
+            'unit_price.require' => '请填写单价',
+            'company.require' => '请填写单位',
+            'long.require' => '请填写长度',
+            'wide.require' => '请填写宽度',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $res = $model->save($data);
+        if ($res) return Json::successful('添加成功');
+        return Json::fail('添加失败');
+    }
+
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function edit($id = 0)
+    {
+        $data = model::find($id);
+        $f = [];
+        $f[] = Form::input('name', '名称', $data['name'])->col(12);
+        $f[] = Form::select('type', '选择分类', (string)$data['type'])->options([
+            ['value' => 0, 'label' => '请选择分类'],
+            ['value' => 1, 'label' => '顶板'],
+            ['value' => 2, 'label' => '侧板'],
+            ['value' => 3, 'label' => '拉筋'],
+            ['value' => 4, 'label' => '底板'],
+        ])->filterable(true);
+        $f[] = Form::select('th_id', '选择厚度', (string)$data['th_id'])->options(
+            array_merge([['value' => 0, 'label' => '请选择分类']], \app\admin\model\water\WaterThickness::order('id DESC')->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::input('weight', '重量(kg)', $data['weight']);
+        $f[] = Form::input('unit_price', '单价', $data['unit_price']);
+        $f[] = Form::input('company', '单位', $data['company']);
+        $f[] = Form::input('long', '长', $data['long']);
+        $f[] = Form::input('wide', '宽', $data['wide']);
+        $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('修改', $f, Url::buildUrl('update'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+    }
+
+
+    /**
+     * 修改
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function update()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'name',
+            'type',
+            'th_id',
+            'weight',
+            'unit_price',
+            'company',
+            'long',
+            'wide',
+            'id',
+        ]);
+        $validate = Validate::rule('name', 'require')->rule([
+            'name' => 'require',
+            'type' => 'require',
+            'th_id' => 'require',
+            'weight' => 'require',
+            'unit_price' => 'require',
+            'company' => 'require',
+            'long' => 'require',
+            'wide' => 'require',
+        ]);
+        $validate->message([
+            'name.require' => '名称不能为空',
+            'type.require' => '请选择分类',
+            'th_id.require' => '请选择厚度',
+            'weight.require' => '请填写重量',
+            'unit_price.require' => '请填写单价',
+            'company.require' => '请填写单位',
+            'long.require' => '请填写长度',
+            'wide.require' => '请填写宽度',
+        ]);
+        $details = $model->find($data['id']);
+        $details['name'] = $data['name'];
+        $details['thickness'] = $data['thickness'];
+        $res = $details->save();
+        if ($res) return Json::successful('修改成功');
+        return Json::fail('修改失败');
+    }
+
+
+    /**
+     * 删除
+     * @param $id
+     * @return void
+     * @throws \Exception
+     */
+    public function delete($id)
+    {
+        if (!$id) Json::fail('删除失败');
+        $model = new model;
+
+        $res = model::destroy($id);
+        if ($res){
+            return Json::success('删除成功!');
+        }else{
+            return Json::fail($model->getErrorInfo());
+        }
+
+    }
+
+}

+ 109 - 70
app/admin/controller/water/WaterMaterialScience.php

@@ -30,9 +30,39 @@ class WaterMaterialScience extends AuthController
     /**
      * @return mixed
      */
-    public function index()
+    public function roof()
     {
+        $this->assign('role', 'roof');
+        return $this->fetch();
+    }
+
+    public function side_plate()
+    {
+        $this->assign('role', 'side_plate');
+        return $this->fetch();
+    }
+
+    public function lacing()
+    {
+        $this->assign('role', 'lacing');
+        return $this->fetch();
+    }
 
+    public function floor()
+    {
+        $this->assign('role', 'floor');
+        return $this->fetch();
+    }
+
+    public function column()
+    {
+        $this->assign('role', 'column');
+        return $this->fetch();
+    }
+
+    public function fula()
+    {
+        $this->assign('role', 'fula');
         return $this->fetch();
     }
 
@@ -42,7 +72,8 @@ class WaterMaterialScience extends AuthController
         $where = Util::getMore([
             ['page', 1],
             ['limit', 20],
-            ['name', '']
+            ['name', ''],
+            ['role', '']
         ]);
 
         return Json::successlayui(model::list($where));
@@ -57,8 +88,21 @@ class WaterMaterialScience extends AuthController
     {
         $f = [];
         $f[] = Form::input('name', '名称')->col(12);
-        $f[] = Form::input('weight', '重量');
-        if ($id) $f[] = Form::hidden('id', $id);
+        $f[] = Form::select('type', '选择分类', '')->options([
+            ['value' => 0, 'label' => '请选择分类'],
+            ['value' => 1, 'label' => '顶板'],
+            ['value' => 2, 'label' => '侧板'],
+            ['value' => 3, 'label' => '拉筋'],
+            ['value' => 4, 'label' => '底板'],
+        ])->filterable(true);
+        $f[] = Form::select('th_id', '选择厚度', '')->options(
+            array_merge([['value' => 0, 'label' => '请选择分类']], \app\admin\model\water\WaterThickness::order('id DESC')->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::input('weight', '重量(kg)');
+        $f[] = Form::input('unit_price', '单价');
+        $f[] = Form::input('company', '单位');
+        $f[] = Form::input('long', '长');
+        $f[] = Form::input('wide', '宽');
         $form = Form::make_post_form('添加', $f, Url::buildUrl('save'));
         $this->assign(compact('form'));
         return $this->fetch('public/form-builder');
@@ -71,15 +115,33 @@ class WaterMaterialScience extends AuthController
         $model = new model;
         $data = Util::postMore([
             'name',
-            'thickness',
+            'type',
+            'th_id',
+            'weight',
+            'unit_price',
+            'company',
+            'long',
+            'wide',
         ]);
         $validate = Validate::rule('name', 'require')->rule([
             'name' => 'require',
-            'thickness' => 'require',
+            'type' => 'require',
+            'th_id' => 'require',
+            'weight' => 'require',
+            'unit_price' => 'require',
+            'company' => 'require',
+            'long' => 'require',
+            'wide' => 'require',
         ]);
         $validate->message([
             'name.require' => '名称不能为空',
-            'thickness.require' => '厚度不能为空',
+            'type.require' => '请选择分类',
+            'th_id.require' => '请选择厚度',
+            'weight.require' => '请填写重量',
+            'unit_price.require' => '请填写单价',
+            'company.require' => '请填写单位',
+            'long.require' => '请填写长度',
+            'wide.require' => '请填写宽度',
         ]);
         if (!$validate->check($data)) {
             return Json::fail($validate->getError());
@@ -99,8 +161,24 @@ class WaterMaterialScience extends AuthController
     {
         $data = model::find($id);
         $f = [];
-        $f[] = Form::input('name', '名称',$data->getData('name'))->col(12);
-        $f[] = Form::input('thickness', '额度', $data->getData('thickness'));
+        $f[] = Form::input('name', '名称', $data['name'])->col(12);
+        $f[] = Form::select('type', '选择分类', (string)$data['type'])->options([
+            ['value' => 0, 'label' => '请选择分类'],
+            ['value' => 1, 'label' => '顶板'],
+            ['value' => 2, 'label' => '侧板'],
+            ['value' => 3, 'label' => '拉筋'],
+            ['value' => 4, 'label' => '底板'],
+            ['value' => 5, 'label' => '立柱'],
+            ['value' => 6, 'label' => '辅拉'],
+        ])->filterable(true);
+        $f[] = Form::select('th_id', '选择厚度', (string)$data['th_id'])->options(
+            array_merge([['value' => 0, 'label' => '请选择分类']], \app\admin\model\water\WaterThickness::order('id DESC')->field('id as value,name as label')->select()->toArray())
+        )->filterable(true);
+        $f[] = Form::input('weight', '重量(kg)', $data['weight']);
+        $f[] = Form::input('unit_price', '单价', $data['unit_price']);
+        $f[] = Form::input('company', '单位', $data['company']);
+        $f[] = Form::input('long', '长', $data['long']);
+        $f[] = Form::input('wide', '宽', $data['wide']);
         $f[] = Form::hidden('id', $id);
         $form = Form::make_post_form('修改', $f, Url::buildUrl('update'));
         $this->assign(compact('form'));
@@ -119,21 +197,36 @@ class WaterMaterialScience extends AuthController
     {
         $model = new model;
         $data = Util::postMore([
-            'id',
             'name',
-            'thickness',
+            'type',
+            'th_id',
+            'weight',
+            'unit_price',
+            'company',
+            'long',
+            'wide',
+            'id',
         ]);
         $validate = Validate::rule('name', 'require')->rule([
             'name' => 'require',
-            'thickness' => 'require',
+            'type' => 'require',
+            'th_id' => 'require',
+            'weight' => 'require',
+            'unit_price' => 'require',
+            'company' => 'require',
+            'long' => 'require',
+            'wide' => 'require',
         ]);
         $validate->message([
             'name.require' => '名称不能为空',
-            'thickness.require' => '额度不能为空',
+            'type.require' => '请选择分类',
+            'th_id.require' => '请选择厚度',
+            'weight.require' => '请填写重量',
+            'unit_price.require' => '请填写单价',
+            'company.require' => '请填写单位',
+            'long.require' => '请填写长度',
+            'wide.require' => '请填写宽度',
         ]);
-        if (!$validate->check($data)) {
-            return Json::fail($validate->getError());
-        }
         $details = $model->find($data['id']);
         $details['name'] = $data['name'];
         $details['thickness'] = $data['thickness'];
@@ -142,60 +235,6 @@ class WaterMaterialScience extends AuthController
         return Json::fail('修改失败');
     }
 
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return \think\Response
-     */
-    public function next($id = 0)
-    {
-        $f = [];
-        $f[] = Form::dateTime('add_time', '开启时间');
-        $f[] = Form::dateTime('end_time', '结束时间');
-        $f[] = Form::hidden('id', $id);
-        $form = Form::make_post_form('添加', $f, Url::buildUrl('next_save'));
-        $this->assign(compact('form'));
-        return $this->fetch('public/form-builder');
-    }
-
-    public function next_save()
-    {
-        $model = new model;
-        $data = Util::postMore([
-            'id',
-            'add_time',
-            'end_time',
-        ]);
-        $validate = Validate::rule([
-            'add_time' => 'require',
-            'end_time' => 'require',
-        ]);
-        $validate->message([
-            'add_time.require' => '请选择开启时间',
-            'end_time.require' => '请选择结束时间',
-        ]);
-        if (!$validate->check($data)) {
-            return Json::fail($validate->getError());
-        }
-        $details = $model->find($data['id']);
-        if ($details['status'] == 1) return Json::fail('未结束不能进行下一场');
-        if ($details['suc'] == 2) return Json::fail('已众筹失败无法就行下一场');
-        if (strtotime($data['end_time']) < strtotime($data['add_time'])) return Json::fail('结束时间不能小于开启时间');
-        $details['stage'] += 1;
-        $details['status'] = 1;
-        $details['number'] = 0;//重置额度
-        $details['money'] = intval($details['money'] * 1.3);//提搞额度130%
-        $details['suc'] = 0;
-        $details['add_time'] = strtotime($data['add_time']);
-        $details['end_time'] = strtotime($data['end_time']);
-        $res = $details->save();
-        if ($res) return Json::successful('成功');
-        return Json::fail('失败');
-
-
-    }
-
-
 
     /**
      * 删除

+ 178 - 0
app/admin/controller/water/WaterMembershioCard.php

@@ -0,0 +1,178 @@
+<?php
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/11
+ */
+
+namespace app\admin\controller\water;
+
+use app\admin\controller\AuthController;
+use crmeb\services\{ExpressService,
+    JsonService,
+    JsonService as Json,
+    MiniProgramService,
+    WechatService,
+    FormBuilder as Form,
+    CacheService,
+    UtilService as Util};
+use think\facade\Route as Url;
+use think\facade\Validate;
+Use app\admin\model\water\WaterMembershioCard as model;
+
+/**
+ * 订单管理控制器 同一个订单表放在一个控制器
+ * Class StoreOrder
+ * @package app\admin\controller\store
+ */
+class WaterMembershioCard extends AuthController
+{
+    /**
+     * @return mixed
+     */
+    public function index()
+    {
+        return $this->fetch();
+    }
+
+
+    public function list()
+    {
+        $where = Util::getMore([
+            ['page', 1],
+            ['limit', 20],
+            ['name', ''],
+            ['role', '']
+        ]);
+
+        return Json::successlayui(model::list($where));
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create($id = 0)
+    {
+        $f = [];
+        $f[] = Form::input('title', '名称')->col(12);
+        $f[] = Form::input('price', '价格');
+        $f[] = Form::input('ot_price', '原价');
+        $f[] = Form::input('time', '天数');
+        $form = Form::make_post_form('添加', $f, Url::buildUrl('save'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+
+
+    }
+
+    public function save()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'title',
+            'price',
+            'ot_price',
+            'time',
+        ]);
+        $validate = Validate::rule([
+            'title' => 'require',
+            'price' => 'require',
+            'ot_price' => 'require',
+            'time' => 'require',
+        ]);
+        $validate->message([
+            'title.require' => '名称不能为空',
+            'price.require' => '请填写价格',
+            'ot_price.require' => '请填写原价',
+            'time.require' => '请填写时间',
+        ]);
+        if (!$validate->check($data)) {
+            return Json::fail($validate->getError());
+        }
+        $res = $model->save($data);
+        if ($res) return Json::successful('添加成功');
+        return Json::fail('添加失败');
+    }
+
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function edit($id = 0)
+    {
+        $data = model::find($id);
+        $f = [];
+        $f[] = Form::input('title', '名称', $data['title'])->col(12);
+        $f[] = Form::input('price', '价格', $data['price']);
+        $f[] = Form::input('ot_price', '原价', $data['ot_price']);
+        $f[] = Form::input('time', '天数', $data['time']);
+        $f[] = Form::hidden('id', $id);
+        $form = Form::make_post_form('修改', $f, Url::buildUrl('update'));
+        $this->assign(compact('form'));
+        return $this->fetch('public/form-builder');
+    }
+
+
+    /**
+     * 修改
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function update()
+    {
+        $model = new model;
+        $data = Util::postMore([
+            'title',
+            'price',
+            'ot_price',
+            'time',
+            'id'
+        ]);
+        $validate = Validate::rule([
+            'title' => 'require',
+            'price' => 'require',
+            'ot_price' => 'require',
+            'time' => 'require',
+        ]);
+        $validate->message([
+            'title.require' => '名称不能为空',
+            'price.require' => '请填写价格',
+            'ot_price.require' => '请填写原价',
+            'time.require' => '请填写时间',
+        ]);
+        $details = $model->find($data['id']);
+        $details['name'] = $data['name'];
+        $details['thickness'] = $data['thickness'];
+        $res = $details->save();
+        if ($res) return Json::successful('修改成功');
+        return Json::fail('修改失败');
+    }
+
+
+    /**
+     * 删除
+     * @param $id
+     * @return void
+     * @throws \Exception
+     */
+    public function delete($id)
+    {
+        if (!$id) Json::fail('删除失败');
+        $model = new model;
+
+        $res = model::destroy($id);
+        if ($res){
+            return Json::success('删除成功!');
+        }else{
+            return Json::fail($model->getErrorInfo());
+        }
+
+    }
+
+}

+ 1 - 2
app/admin/controller/water/WaterThickness.php

@@ -57,7 +57,7 @@ class WaterThickness extends AuthController
     {
         $f = [];
         $f[] = Form::input('name', '名称')->col(12);
-        $f[] = Form::input('thickness', '厚度(毫米)');
+        $f[] = Form::input('weight', '重量');
         if ($id) $f[] = Form::hidden('id', $id);
         $form = Form::make_post_form('添加', $f, Url::buildUrl('save'));
         $this->assign(compact('form'));
@@ -89,7 +89,6 @@ class WaterThickness extends AuthController
         return Json::fail('添加失败');
     }
 
-
     /**
      * 显示创建资源表单页.
      *

+ 17 - 2
app/admin/model/water/WaterCardOrder.php

@@ -36,9 +36,13 @@ class WaterCardOrder extends BaseModel
 
     public static function list($where)
     {
-        $model = self::field('*')->order('id DESC');
+        $model = self::alias('a')->field('a.*,b.nickname,c.title')->order('a.id DESC')
+        ->leftJoin('user b', 'a.uid = b.uid')
+        ->leftJoin('water_membershio_card c', 'a.card_id = c.id');
 
-        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        if ($where['name'])$model->where('b.nickname|b.uid' , 'like', '%'.$where['name'],'%');
+        if ($where['card'])$model->where('c.title' , 'like', '%'.$where['card'],'%');
+        if ($where['order_id'])$model->where('a.order_id' , 'like', '%'.$where['order_id'],'%');
         $data['count'] = $model->count();
         if ($where['page'] && $where['limit']){
             $model->page($where['page'], $where['limit']);
@@ -46,6 +50,17 @@ class WaterCardOrder extends BaseModel
             $model->page(20, 1);
         }
         $list = $model->select()->toArray();
+        foreach ($list as &$item){
+            if ($item['pay_type'] == 'yue'){
+                $item['pay_type'] = '余额';
+            }elseif ($item['pay_type'] == 'weixin'){
+                $item['pay_type'] = '微信';
+            }elseif ($item['pay_type'] == 'alipay'){
+                $item['pay_type'] = '支付宝';
+            }else{
+                $item['pay_type'] = '其他支付';
+            }
+        }
         $data['data'] = $list;
         return $data;
 

+ 16 - 2
app/admin/model/water/WaterMaterialScience.php

@@ -36,9 +36,23 @@ class WaterMaterialScience extends BaseModel
 
     public static function list($where)
     {
-        $model = self::field('*')->order('id DESC');
+        $model = self::alias('a')->field('a.*,b.name as th_name')->order('a.id DESC')
+        ->leftJoin('water_thickness b', 'a.th_id = b.id');
 
-        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        if ($where['name'])$model->where('a.name' , 'like', '%'.$where['name'],'%');
+        if ($where['role'] == 'roof'){
+            $model->where('a.type', 1);
+        }elseif ($where['role'] == 'side_plate'){
+            $model->where('a.type', 2);
+        }elseif ($where['role'] == 'lacing'){
+            $model->where('a.type', 3);
+        }elseif ($where['role'] == 'floor'){
+            $model->where('a.type', 4);
+        }elseif ($where['role'] == 'column'){
+            $model->where('a.type', 5);
+        }elseif ($where['role'] == 'fula'){
+            $model->where('a.type', 6);
+        }
         $data['count'] = $model->count();
         if ($where['page'] && $where['limit']){
             $model->page($where['page'], $where['limit']);

+ 1 - 1
app/admin/model/water/WaterMembershioCard.php

@@ -38,7 +38,7 @@ class WaterMembershioCard extends BaseModel
     {
         $model = self::field('*')->order('id DESC');
 
-        if ($where['name'])$model->where('name' , 'like', '%'.$where['name'],'%');
+        if ($where['name'])$model->where('title' , 'like', '%'.$where['name'],'%');
         $data['count'] = $model->count();
         if ($where['page'] && $where['limit']){
             $model->page($where['page'], $where['limit']);

+ 200 - 0
app/admin/view/water/water_card_order/index.php

@@ -0,0 +1,200 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索用户</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="输入用户UID,昵称">
+                                    </div>
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索会员卡</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="title" name="title" class="layui-input" placeholder="输入会员卡名称">
+                                    </div>
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索订单号</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="order_id" name="order_id" class="layui-input" placeholder="输入订单号">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">会员卡订单</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+<!--                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:500,w:500})">添加厚度分类</a>-->
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="status">
+                        {{#  if(d.status == 0){ }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs" id="">
+                            关闭
+                        </button>
+                        {{#  } else if(d.status == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            开启
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="suc">
+                        {{#  if(d.suc == 0){ }}
+                        <button type="button" name="suc" class="layui-btn layui-btn-xs" id="">
+                            正常
+                        </button>
+                        {{#  } else if(d.suc == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            种植成功
+                        </button>
+                        {{#  } else if(d.suc == 2) { }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs layui-btn-danger" id="">
+                            种植失败
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:500,w:500})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    layList.tableList('List', "{:Url('list')}", function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'uid', title: 'UID',  align: 'center'},
+            {field: 'nickname', title: '用户昵称',  align: 'center'},
+            {field: 'order_id', title: '订单号',  align: 'center'},
+            {field: 'title', title: '会员卡',  align: 'center'},
+            {field: 'time', title: '购买天数',  align: 'center'},
+            {field: 'price', title: '价格',  align: 'center'},
+            {field: 'pay_type', title: '支付类型',  align: 'center'},
+            {field: 'create_time', title: '时间', align: 'center', width: '8%'},
+            // {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 177 - 0
app/admin/view/water/water_material_science/column.php

@@ -0,0 +1,177 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">材料列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:900,w:700})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:900,w:700})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    var role = '{$role}';
+    layList.tableList('List', "{:Url('list')}?role="+role, function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_name', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 177 - 0
app/admin/view/water/water_material_science/floor.php

@@ -0,0 +1,177 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">材料列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:900,w:900})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('create')}?id={{d.id}}',{h:900,w:900})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    var role = '{$role}';
+    layList.tableList('List', "{:Url('list')}?role="+role, function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_name', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 177 - 0
app/admin/view/water/water_material_science/fula.php

@@ -0,0 +1,177 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">材料列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:900,w:700})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:900,w:700})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    var role = '{$role}';
+    layList.tableList('List', "{:Url('list')}?role="+role, function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_name', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 19 - 30
app/admin/view/water/water_material_science/index.php

@@ -64,45 +64,29 @@
     <div class="layui-row layui-col-space15">
         <div class="layui-col-md12">
             <div class="layui-card">
-                <div class="layui-card-header">场次列表</div>
+                <div class="layui-card-header">材料列表</div>
                 <div class="layui-card-body">
 
                     <div class="layui-btn-container" id="container-action">
-                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:500,w:500})">添加材料</a>
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:1100,w:700})">添加材料</a>
 <!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
                     </div>
                     <table class="layui-hide" id="List" lay-filter="List"></table>
-
-
                     <script type="text/html" id="image">
                         <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
                     </script>
-                    <script type="text/html" id="status">
-                        {{#  if(d.status == 0){ }}
-                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs" id="">
-                            关闭
-                        </button>
-                        {{#  } else if(d.status == 1) { }}
-                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
-                            开启
-                        </button>
-                        {{#  } }}
-                    </script>
-                    <script type="text/html" id="suc">
-                        {{#  if(d.suc == 0){ }}
-                        <button type="button" name="suc" class="layui-btn layui-btn-xs" id="">
-                            正常
-                        </button>
-                        {{#  } else if(d.suc == 1) { }}
-                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
-                            种植成功
-                        </button>
-                        {{#  } else if(d.suc == 2) { }}
-                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs layui-btn-danger" id="">
-                            种植失败
-                        </button>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
                         {{#  } }}
                     </script>
+
                     <script type="text/html" id="act">
                         <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:500,w:500})">
                             编辑
@@ -127,8 +111,13 @@
             {type: 'checkbox'},
             {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
             {field: 'name', title: '名称', templet: '#name',  align: 'center'},
-            {field: 'thickness', title: '厚度(毫米)', align: 'center'},
-            {field: 'create_time', title: '时间', align: 'center', width: '8%'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_id', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
             {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
         ];
     });

+ 177 - 0
app/admin/view/water/water_material_science/lacing.php

@@ -0,0 +1,177 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">材料列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:900,w:700})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:900,w:700})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    var role = '{$role}';
+    layList.tableList('List', "{:Url('list')}?role="+role, function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_name', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 177 - 0
app/admin/view/water/water_material_science/roof.php

@@ -0,0 +1,177 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">材料列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:900,w:900})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:900,w:900})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    var role = '{$role}';
+    layList.tableList('List', "{:Url('list')}?role="+role, function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_name', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 177 - 0
app/admin/view/water/water_material_science/side_plate.php

@@ -0,0 +1,177 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">材料列表</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:900,w:700})">添加材料</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="type">
+                        {{#  if(d.type == 1){ }}
+                        顶板
+                        {{#  } else if(d.type == 2) { }}
+                        侧板
+                        {{#  } else if(d.type == 3) { }}
+                        拉筋
+                        {{#  } else if(d.type == 4) { }}
+                        底板
+                        {{#  } }}
+                    </script>
+
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:900,w:700})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    var role = '{$role}';
+    layList.tableList('List', "{:Url('list')}?role="+role, function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'name', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'type', title: '材料分类', align: 'center',templet: '#type',},
+            {field: 'th_name', title: '厚度', align: 'center'},
+            {field: 'weight', title: '重量', align: 'center'},
+            {field: 'unit_price', title: '单价', align: 'center'},
+            {field: 'company', title: '单位', align: 'center'},
+            {field: 'long', title: '长度', align: 'center'},
+            {field: 'wide', title: '宽度', align: 'center'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 189 - 0
app/admin/view/water/water_membershio_card/index.php

@@ -0,0 +1,189 @@
+{extend name="public/container"}
+{block name="head_top"}
+
+{/block}
+{block name="content"}
+<style>
+    .btn-outline{
+        border:none;
+    }
+    .btn-outline:hover{
+        background-color: #0e9aef;
+        color: #fff;
+    }
+    .layui-form-item .layui-btn {
+        margin-top: 5px;
+        margin-right: 10px;
+    }
+    .layui-btn-primary{
+        margin-right: 10px;
+        margin-left: 0!important;
+    }
+    label{
+        margin-bottom: 0!important;
+        margin-top: 4px;
+    }
+</style>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15" id="app">
+        <!--搜索条件-->
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
+                        <form class="layui-form layui-form-pane" action="">
+                            <div class="layui-form-item">
+
+                                <div class="layui-col-lg12">
+                                    <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="name" name="name" class="layui-input" placeholder="请输入名称">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <div class="layui-input-inline">
+                                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                            <i class="layui-icon layui-icon-search"></i>搜索</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 中间详细信息-->
+        <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
+             v-for="item in badge" v-cloak="" v-if="item.count > 0">
+        </div>
+        <!--enb-->
+    </div>
+    <!--列表-->
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">会员卡</div>
+                <div class="layui-card-body">
+
+                    <div class="layui-btn-container" id="container-action">
+                        <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:500,w:650})">添加会员卡</a>
+<!--                        <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
+                    </div>
+                    <table class="layui-hide" id="List" lay-filter="List"></table>
+
+
+                    <script type="text/html" id="image">
+                        <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
+                    </script>
+                    <script type="text/html" id="status">
+                        {{#  if(d.status == 0){ }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs" id="">
+                            关闭
+                        </button>
+                        {{#  } else if(d.status == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            开启
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="suc">
+                        {{#  if(d.suc == 0){ }}
+                        <button type="button" name="suc" class="layui-btn layui-btn-xs" id="">
+                            正常
+                        </button>
+                        {{#  } else if(d.suc == 1) { }}
+                        <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
+                            种植成功
+                        </button>
+                        {{#  } else if(d.suc == 2) { }}
+                        <button type="button" name="suc" class="layui-btn-disabled layui-btn-xs layui-btn-danger" id="">
+                            种植失败
+                        </button>
+                        {{#  } }}
+                    </script>
+                    <script type="text/html" id="act">
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}',{h:500,w:500})">
+                            编辑
+                        </button>
+                        <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
+                            删除
+                        </button>
+
+                    </script>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--end-->
+</div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
+{/block}
+{block name="script"}
+<script>
+    layList.tableList('List', "{:Url('list')}", function () {
+        return [
+            {type: 'checkbox'},
+            {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
+            {field: 'title', title: '名称', templet: '#name',  align: 'center'},
+            {field: 'price', title: '价格', align: 'center'},
+            {field: 'ot_price', title: '原价', align: 'center'},
+            {field: 'time', title: '天数', align: 'center'},
+            {field: 'create_time', title: '时间', align: 'center', width: '8%'},
+            {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
+        ];
+    });
+
+    //查询
+    layList.search('search',function(where){
+        layList.reload(where,true);
+    });
+
+    //点击事件绑定
+    layList.tool(function (event,data,obj) {
+        switch (event) {
+            case 'delete':
+                var url=layList.U({c:'many.many',a:'delete',q:{id:data.id}});
+                var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
+                $eb.$swal('delete',function(){
+                    $eb.axios.get(url).then(function(res){
+                        if(res.status == 200 && res.data.code == 200) {
+                            $eb.$swal('success',res.data.msg);
+                            obj.del();
+                            location.reload();
+                        }else
+                            return Promise.reject(res.data.msg || '删除失败')
+                    }).catch(function(err){
+                        $eb.$swal('error',err);
+                    });
+                },code)
+                break;
+            case 'open_image':
+                $eb.openImage(data.image);
+                break;
+            case 'edit':
+                location.href = layList.U({a:'edit',q:{id:data.id}});
+                break;
+        }
+    })
+
+
+    //改状态
+    layList.switch('status',function (odj,value) {
+        if(odj.elem.checked==true){
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }else{
+            layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
+                layList.msg(res.msg, function () {
+                    layList.reload();
+                });
+            });
+        }
+    });
+</script>
+{/block}

+ 1 - 1
app/admin/view/water/water_thickness/index.php

@@ -64,7 +64,7 @@
     <div class="layui-row layui-col-space15">
         <div class="layui-col-md12">
             <div class="layui-card">
-                <div class="layui-card-header">场次列表</div>
+                <div class="layui-card-header">厚度列表</div>
                 <div class="layui-card-body">
 
                     <div class="layui-btn-container" id="container-action">