wesmiler 6 лет назад
Родитель
Сommit
1b5d6a15b0

+ 2 - 1
public/static/weixin/js/shop-map.js

@@ -236,9 +236,10 @@ var app = new Vue({
                     var colorType = data.color_type==1? '黑白打印机': (data.color_type==2? '彩印打印机' : '黑白/彩色打印机');
                     var address = data.d_address ? data.d_address : (data.address? data.address : '无');
                     var shop_name = data.shop_name ? '('+data.shop_name+')' : '';
+                    var device_code = data.show_device_code? "<div class='item address'>设备号:" + data.device_code + "</div>" : '';
                     $.modal({
                         title: '设备[' + data.device_name + ']',
-                        text: "<div class='item address'>设备号:" + data.device_code + "</div><div class='item'>打印机类型:"+colorType+"</div><div class='item mobile'>联系方式:<a href='tel:" + mobile + "'>联系店家"+shop_name+"</a></div><div class='item address'>店铺地址:" + address + "</div><div class='intro'>店铺介绍:" + intro + "</div>",
+                        text: device_code+"<div class='item'>打印机类型:"+colorType+"</div><div class='item mobile'>联系方式:<a href='tel:" + mobile + "'>联系店家"+shop_name+"</a></div><div class='item address'>店铺地址:" + address + "</div><div class='intro'>店铺介绍:" + intro + "</div>",
                         buttons: [
                             {
                                 text: "取消",

+ 1 - 1
public/themes/admin_simpleboot3/admin/business/device_add.html

@@ -44,7 +44,7 @@
             <div class="col-md-6 col-sm-6">
                 <input type="text" class="form-control" id="input-device_code" name="device_code" placeholder="唯一序列号">
             </div>
-            <label for="show_device_code"><input id="show_device_code" type="checkbox" value="" checked>显示设备号</label>
+            <label style="height: 30px; line-height: 30px;" for="show_device_code"><input id="show_device_code" type="checkbox" value="" checked>显示设备号</label>
         </div>
         <div class="form-group">
             <label for="input-number" class="col-sm-2 control-label"><span class="form-required">*</span>编号</label>

+ 1 - 1
public/themes/admin_simpleboot3/admin/business/device_edit.html

@@ -44,7 +44,7 @@
             <div class="col-md-6 col-sm-6">
                 <input type="text" class="form-control" id="input-device_code" name="device_code" placeholder="唯一序列号" value="{$info.device_code|default=''}">
             </div>
-            <label
+            <label style="height: 30px; line-height: 30px;"
                     for="show_device_code"><input id="show_device_code" type="checkbox" value="" <if condition="$info.show_device_code == 1">checked</if>>显示设备号</label>
         </div>
         <div class="form-group">

+ 1 - 0
public/themes/admin_simpleboot3/admin/shop/device_add.html

@@ -44,6 +44,7 @@
             <div class="col-md-6 col-sm-6">
                 <input type="text" class="form-control" id="input-device_code" name="device_code" placeholder="唯一序列号">
             </div>
+            <label style="height: 30px; line-height: 30px;" for="show_device_code"><input id="show_device_code" type="checkbox" value="" checked>显示设备号</label>
         </div>
         <div class="form-group">
             <label for="input-number" class="col-sm-2 control-label"><span class="form-required">*</span>编号</label>

+ 2 - 0
public/themes/admin_simpleboot3/admin/shop/device_edit.html

@@ -44,6 +44,8 @@
             <div class="col-md-6 col-sm-6">
                 <input type="text" class="form-control" id="input-device_code" name="device_code" placeholder="唯一序列号" value="{$info.device_code|default=''}">
             </div>
+            <label style="height: 30px; line-height: 30px;"
+                   for="show_device_code"><input id="show_device_code" type="checkbox" value="" <if condition="$info.show_device_code == 1">checked</if>>显示设备号</label>
         </div>
         <div class="form-group">
             <label for="input-number" class="col-sm-2 control-label"><span class="form-required">*</span>编号</label>

+ 1 - 0
public/themes/admin_simpleboot3/shop/devices/add.html

@@ -28,6 +28,7 @@
             <div class="col-md-6 col-sm-6">
                 <input type="text" class="form-control" id="input-api-key" name="api_key" placeholder="32位密钥">
             </div>
+            <label style="height: 30px; line-height: 30px;" for="show_device_code"><input id="show_device_code" type="checkbox" value="" checked>显示设备号</label>
         </div>
         <div class="form-group">
             <label for="input-device_code" class="col-sm-2 control-label"><span class="form-required">*</span>序列号</label>

+ 2 - 0
public/themes/admin_simpleboot3/shop/devices/edit.html

@@ -34,6 +34,8 @@
             <div class="col-md-6 col-sm-6">
                 <input type="text" class="form-control" id="input-device_code" name="device_code" placeholder="唯一序列号" value="{$info.device_code|default=''}">
             </div>
+            <label style="height: 30px; line-height: 30px;"
+                   for="show_device_code"><input id="show_device_code" type="checkbox" value="" <if condition="$info.show_device_code == 1">checked</if>>显示设备号</label>
         </div>
         <div class="form-group">
             <label for="input-number" class="col-sm-2 control-label"><span class="form-required">*</span>编号</label>

+ 1 - 0
vendor/thinkcmf/cmf-app/src/admin/controller/ShopController.php

@@ -940,6 +940,7 @@ class ShopController extends AdminBaseController
             'color_price'=> input('color_price',0.00),
             'collage_num'=> input('collage_num',0),
             'collage_price'=> input('collage_price',0.00),
+            'show_device_code'=> input('show_device_code',0),
             'collage_color_price'=> input('collage_color_price',0.00),
         ];
 

+ 2 - 0
vendor/thinkcmf/cmf-app/src/shop/controller/DevicesController.php

@@ -98,6 +98,7 @@ class DevicesController extends ShopBaseController
                 'color_price' => input('color_price', 0.00),
                 'collage_num' => input('collage_num', 0),
                 'collage_price' => input('collage_price', 0.00),
+                'show_device_code'=> input('show_device_code',0),
                 'collage_color_price' => input('collage_color_price', 0.00),
                 'created_at' => date('Y-m-d H:i:s'),
             ];
@@ -160,6 +161,7 @@ class DevicesController extends ShopBaseController
                 'color_price' => input('color_price', 0.00),
                 'collage_num' => input('collage_num', 0),
                 'collage_price' => input('collage_price', 0.00),
+                'show_device_code'=> input('show_device_code',0),
                 'collage_color_price' => input('collage_color_price', 0.00),
                 'updated_at' => date('Y-m-d H:i:s'),
             ];

+ 1 - 1
vendor/thinkcmf/cmf-app/src/weixin/model/Devices.php

@@ -31,7 +31,7 @@ class Devices extends Model
         $dataList = Devices::alias('d')
             ->join('user m', 'm.id=d.shop_uid', 'left')
             ->join('shop s', 's.user_id=d.shop_uid', 'left')
-            ->field("m.id,s.name as shop_name,d.name as device_name,d.device_code,s.business_project,s.intro,s.contact_name,s.mobile,s.logo as thumb,d.lng,d.color_type,d.lat,distance('{$lng}','{$lat}',d.`lng`,d.`lat`) as dists, d.address as d_address, s.address")
+            ->field("m.id,s.name as shop_name,d.name as device_name,d.device_code,s.business_project,s.intro,s.contact_name,s.mobile,s.logo as thumb,d.show_device_code,d.lng,d.color_type,d.lat,distance('{$lng}','{$lat}',d.`lng`,d.`lat`) as dists, d.address as d_address, s.address")
             ->where(function ($query) use ($lng, $lat, $distance) {
                 if ($lng && $lat && $distance) {
                     return $query->where('', 'exp', db()->raw("{$distance} >= distance('{$lng}','{$lat}',d.`lng`,d.`lat`)  "));