xiaoyu преди 3 години
родител
ревизия
b308f0aad8
променени са 3 файла, в които са добавени 12 реда и са изтрити 10 реда
  1. 2 2
      admin/control/refill_third.php
  2. 10 7
      admin/templates/default/third.proprice.edit.php
  3. 0 1
      admin/templates/default/third.proprice.list.php

+ 2 - 2
admin/control/refill_third.php

@@ -172,8 +172,8 @@ class refill_thirdControl extends SystemControl
         if(empty($third_product)) {
             showMessage('产品不存在');
         }
-        $store_id = $_GET['store_id'];
-        $goods_id = $_GET['goods_id'];
+        $store_id = $_GET['store_id'] ?? $_POST['store_id'];
+        $goods_id = $_GET['goods_id'] ?? $_POST['goods_id'];
         $channel_product = Model('thrid_refill')->getProviderProduct($store_id,$goods_id,$system_code);
         if(empty($channel_product)) {
             showMessage('此通道关联产品不存在');

+ 10 - 7
admin/templates/default/third.proprice.edit.php

@@ -34,6 +34,9 @@
     <div class="fixed-empty"></div>
     <form id="user_form" enctype="multipart/form-data" method="post"  class="layui-form">
         <input type="hidden" name="form_submit" value="ok"/>
+        <input type="hidden" name="system_code" value="<?php echo $_GET['system_code'];?>"/>
+        <input type="hidden" name="store_id" value="<?php echo $output['channel_product']['store_id'];?>"/>
+        <input type="hidden" name="goods_id" value="<?php echo $output['channel_product']['goods_id'];?>"/>
         <table class="table tb-type2">
             <tbody>
             <tr class="noborder">
@@ -62,28 +65,28 @@
                 <td colspan="2" class="required"><label class="validation" for="goods_id">商品ID:</label></td>
             </tr>
             <tr class="noborder">
-                <td class="vatop rowform"><input type="text" value="" name="goods_id" id="goods_id" class="txt"></td>
+                <td class="vatop rowform"><?php echo $output['channel_product']['goods_id'];?></td>
                 <td class="vatop tips"></td>
             </tr>
             <tr class="noborder">
                 <td colspan="2" class="required"><label class="validation" for="channel_product_name">通道产品名称:</label></td>
             </tr>
             <tr class="noborder">
-                <td class="vatop rowform"><input type="text" value="" name="channel_product_name" id="channel_product_name" class="txt"></td>
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['channel_product']['channel_product_name'];?>" name="channel_product_name" id="channel_product_name" class="txt"></td>
                 <td class="vatop tips"></td>
             </tr>
             <tr class="noborder">
                 <td colspan="2" class="required"><label class="validation" for="channel_code">通道code:</label></td>
             </tr>
             <tr class="noborder">
-                <td class="vatop rowform"><input type="text" value="" name="channel_code" id="channel_code" class="txt"></td>
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['channel_product']['channel_code'];?>" name="channel_code" id="channel_code" class="txt"></td>
                 <td class="vatop tips"></td>
             </tr>
             <tr>
                 <td colspan="2" class="required"><label class="validation" for="channel_amount">折扣价格:</label></td>
             </tr>
             <tr class="noborder">
-                <td class="vatop rowform"><input type="text" id="channel_amount" name="channel_amount" class="txt"></td>
+                <td class="vatop rowform"><input type="text" id="channel_amount" value="<?php echo $output['channel_product']['channel_amount'];?>" name="channel_amount" class="txt"></td>
                 <td class="vatop tips"></td>
             </tr>
 
@@ -94,9 +97,9 @@
                 <td>
                     <select name="recharge_type" id="recharge_type">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
-                        <option value="1">直充</option>
-                        <option value="2">卡密</option>
-                        <option value="3">直充+卡密</option>
+                        <option value="1" <?php if($output['channel_product']['recharge_type'] == 1) echo 'selected';?>>直充</option>
+                        <option value="2" <?php if($output['channel_product']['recharge_type'] == 2) echo 'selected';?>>卡密</option>
+                        <option value="3" <?php if($output['channel_product']['recharge_type'] == 3) echo 'selected';?>>直充+卡密</option>
                     </select>
                 </td>
             </tr>

+ 0 - 1
admin/templates/default/third.proprice.list.php

@@ -91,7 +91,6 @@
                         <td><?php echo $output['recharge_type_text'][$v['recharge_type']-1]; ?></td>
                         <td class="align-center w200">
 <!--                            <a href="index.php?act=refill_third&op=third_proprice_edit&system_code=--><?php //echo $v['system_code'] ?><!--&store_id=--><?php //echo $v['store_id'];?><!--&goods_id=--><?php //echo $v['goods_id'];?><!--">编辑</a>-->
-<!--                           | <a href="index.php?act=refill_third&op=third_proprice&system_code=--><?php //echo $v['system_code'] ?><!--">编辑上游产品</a>-->
                         </td>
                     </tr>
                 <?php } ?>