wupengfei před 3 roky
rodič
revize
3c19270dcb

+ 1 - 1
application/store/view/goods/form.html

@@ -220,7 +220,7 @@
                             </div>
                             <div class="layui-form-mid layui-word-aux">不填(或0)表示包邮</div>
                         </div>
-
+                    </div>
                     <div class="layui-form-item" >
                         <label class="layui-form-label">详情</label>
                         <div class="layui-input-block">

+ 50 - 12
application/store/view/integral_goods/form.html

@@ -90,7 +90,7 @@
                                     <th class='text-left nowrap'>货号</th>
                                     <th class='text-left nowrap'>库存</th>
                                     <th class='text-left nowrap'>原价</th>
-                                    <th class='text-left nowrap'>售价</th>
+                                    <th class='text-left nowrap' style="display: none">售价</th>
                                     <th class='text-left nowrap'>积分</th>
                                 </tr>
                                 </thead>
@@ -110,7 +110,7 @@
                                     <td class='text-left nowrap'>
                                         <input class='layui-input' name='price[]' value="{$sv['price']}"/>
                                     </td>
-                                    <td class='text-left nowrap'>
+                                    <td class='text-left nowrap' style="display: none">
                                         <input class='layui-input' name='sell_money[]' value="{$sv['sell_money']}"/>
                                     </td>
                                     <td class='text-left nowrap'>
@@ -147,14 +147,48 @@
                 </div>
                 <!--其他设置-->
                 <div class="layui-tab-item">
-                    <div class="layui-form-item">
+                    <!--  运费设置-->
+                    <div class="freight_box">
+
+                        <div class="layui-form-item">
+                            <label class="layui-form-label">运费模板开关</label>
+                            <div class="layui-input-inline">
+                                {if $vo.freight_type == 1}
+                                <input type="checkbox"  lay-filter="freight_type" checked="checked"  lay-skin="switch" lay-text="ON|OFF">
+                                {else}
+                                <input type="checkbox"  lay-filter="freight_type"  lay-skin="switch" lay-text="ON|OFF">
+                                {/if}
+                                <input type="hidden" name="freight_type"  value="{$vo.freight_type|default='0'}" />
+                            </div>
+                        </div>
+
+                        <div class="layui-form-item freight_mud" {if !$vo.freight_type}style="display:none"{/if}>
+                            <label class="layui-form-label">运费模板</label>
+                            <div class="layui-input-inline">
+                            <select name="freight_id" lay-filter ="freight_id">
+                                <option value="0">请选择</option>
+                                {if !empty($all_temp)}
+                                {foreach $all_temp as $tk=>$tv}
+                                {if $vo.freight_id ==$tv['id'] }
+                                <option selected value="{$tv['id']}">{$tv['name']}</option>
+                                {else}
+                                <option value="{$tv['id']}">{$tv['name']}</option>
+                                {/if}
+                                {/foreach}
+                                {/if}
+                            </select>
+                        </div>
+                        </div>
+
+
+                    <div class="layui-form-item postage"   {if $vo.freight_type}style="display:none"{/if}>
                         <label class="layui-form-label">运费金额</label>
                         <div class="layui-input-inline">
                             <input type="number" step="1" min="0" name="postage"   value="{$vo.postage|default=''}" class="layui-input">
                         </div>
                         <div class="layui-form-mid layui-word-aux">不填(或0)表示包邮</div>
                     </div>
-
+                </div>
 
                     <div class="layui-form-item" >
                         <label class="layui-form-label">详情</label>
@@ -243,16 +277,20 @@
     layui.use('form', function(){
         var form = layui.form,layer = layui.layer;
         //监听指定开关
-        form.on('switch(is_presell)', function(data){
+        form.on('switch(freight_type)', function(data) {
             console.log(this.checked);
-            if(this.checked){
-                $("input[name='is_presell']").val(1);
-                $(".presell_box").show();
-            }else{
-                $("input[name='is_presell']").val(0);
-                $(".presell_box").hide();
+            if (this.checked) {
+                $("input[name='freight_type']").val(1);
+                $(".freight_mud").show();
+                $(".postage").hide();
+                $(".seckill_price").show();
+            } else {
+                $("input[name='freight_type']").val(0);
+                $(".freight_mud").hide();
+                $(".postage").show();
+                $(".seckill_price").hide();
             }
-        });
+        })
     })
 
     // 分类选择监听