dever пре 3 година
родитељ
комит
b5dcbef875
2 измењених фајлова са 15 додато и 13 уклоњено
  1. 4 4
      app/factory/assets/pc/html/set.html
  2. 11 9
      app/mshop/lib/Buy.php

+ 4 - 4
app/factory/assets/pc/html/set.html

@@ -35,7 +35,7 @@
         <img src="" style="display:none;" class="update_value" id="show_update_license_license" width="150" />
 
     	</div>
-        <input type="text" class="update_value form-control layui-input validate[required]" name="update_license" id="update_license_license" value=""></div></div></div><div class="layui-form-item "><div classs="layui-col-lg6"><div ><label style="font-size:14px;font-weight:bold;" class="">身份证正面</label></div><div><input type="button" style="width:100px;display:inline;padding-left:0px;" class="form-control layui-input image_upload"  v="update_idcard_front_idcard_front" i="update_idcard_front_info_value" id="file_update_idcard_front_idcard_front" key="1" upload_search_value="factory-info.idcard_front" place="660*660" value="本地上传"/>
+        <input type="text" class="update_value form-control layui-input validate[required]" name="update_license" id="update_license_license" value="" style="display: none;"></div></div></div><div class="layui-form-item "><div classs="layui-col-lg6"><div ><label style="font-size:14px;font-weight:bold;" class="">身份证正面</label></div><div><input type="button" style="width:100px;display:inline;padding-left:0px;" class="form-control layui-input image_upload"  v="update_idcard_front_idcard_front" i="update_idcard_front_info_value" id="file_update_idcard_front_idcard_front" key="1" upload_search_value="factory-info.idcard_front" place="660*660" value="本地上传"/>
 
        
         <div style="margin-top:10px;display:none;" class="layui-progress layui-progress-big" id="file_update_idcard_front_idcard_front_progress" lay-filter="file_update_idcard_front_idcard_front_progress" lay-showPercent="true">
@@ -46,7 +46,7 @@
         
         <img src="" style="display:none;" class="update_value" id="show_update_idcard_front_idcard_front" width="150" />
     	</div>
-        <input type="text" class="update_value form-control layui-input validate[required]" name="update_idcard_front" id="update_idcard_front_idcard_front" value=""></div></div></div><div class="layui-form-item "><div classs="layui-col-lg6"><div ><label style="font-size:14px;font-weight:bold;" class="">身份证背面</label></div><div><input type="button" style="width:100px;display:inline;padding-left:0px;" class="form-control layui-input image_upload"  v="update_idcard_back_idcard_back" i="update_idcard_back_info_value" id="file_update_idcard_back_idcard_back" key="1" upload_search_value="factory-info.idcard_back" place="660*660" value="本地上传"/>
+        <input type="text" class="update_value form-control layui-input validate[required]" name="update_idcard_front" id="update_idcard_front_idcard_front" value="" style="display: none;"></div></div></div><div class="layui-form-item "><div classs="layui-col-lg6"><div ><label style="font-size:14px;font-weight:bold;" class="">身份证背面</label></div><div><input type="button" style="width:100px;display:inline;padding-left:0px;" class="form-control layui-input image_upload"  v="update_idcard_back_idcard_back" i="update_idcard_back_info_value" id="file_update_idcard_back_idcard_back" key="1" upload_search_value="factory-info.idcard_back" place="660*660" value="本地上传"/>
 
         
         <div style="margin-top:10px;display:none;" class="layui-progress layui-progress-big" id="file_update_idcard_back_idcard_back_progress" lay-filter="file_update_idcard_back_idcard_back_progress" lay-showPercent="true">
@@ -56,7 +56,7 @@
         <div style="margin-top: 10px;margin-bottom: 10px;">
         
        <img src="" style="display:none;" class="update_value" id="show_update_idcard_back_idcard_back" width="150" /></div>
-        <input type="text" class="update_value form-control layui-input validate[required]" name="update_idcard_back" id="update_idcard_back_idcard_back" value=""></div></div></div><div class="layui-form-item "><div classs="layui-col-lg6"><div ><label style="font-size:14px;font-weight:bold;" class="">开户许可证</label></div><div><input type="button" style="width:100px;display:inline;padding-left:0px;" class="form-control layui-input image_upload"  v="update_kh_license_kh_license" i="update_kh_license_info_value" id="file_update_kh_license_kh_license" key="1" upload_search_value="factory-info.kh_license" place="660*660" value="本地上传"/>
+        <input type="text" class="update_value form-control layui-input validate[required]" name="update_idcard_back" id="update_idcard_back_idcard_back" value="" style="display: none;"></div></div></div><div class="layui-form-item "><div classs="layui-col-lg6"><div ><label style="font-size:14px;font-weight:bold;" class="">开户许可证</label></div><div><input type="button" style="width:100px;display:inline;padding-left:0px;" class="form-control layui-input image_upload"  v="update_kh_license_kh_license" i="update_kh_license_info_value" id="file_update_kh_license_kh_license" key="1" upload_search_value="factory-info.kh_license" place="660*660" value="本地上传"/>
 
         
         <div style="margin-top:10px;display:none;" class="layui-progress layui-progress-big" id="file_update_kh_license_kh_license_progress" lay-filter="file_update_kh_license_kh_license_progress" lay-showPercent="true">
@@ -66,7 +66,7 @@
         <div style="margin-top: 10px;margin-bottom: 10px;">
         
         <img src="" style="display:none;" class="update_value" id="show_update_kh_license_kh_license" width="150" /></div>
-        <input type="text" class="update_value form-control layui-input validate[required]" name="update_kh_license" id="update_kh_license_kh_license" value=""></div></div></div></div>
+        <input type="text" class="update_value form-control layui-input validate[required]" name="update_kh_license" id="update_kh_license_kh_license" value="" style="display: none;"></div></div></div></div>
           <div class="layui-card-body">
             <div class="layui-form-item">
 

+ 11 - 9
app/mshop/lib/Buy.php

@@ -541,7 +541,7 @@ class Buy
 
         $type = Dever::input('type', 1);
 
-        $cash_type = Dever::input('cash_type', 1);
+        $cash_type = Dever::input('cash', 1);
 
         $config = Dever::db('shop/buy_order')->config;
 
@@ -1083,10 +1083,12 @@ class Buy
             }
         }
 
-        if ($this->order_num > 0) {
-            if ($this->order_num == 1) {
-                Dever::db('shop/buy_order')->delete($find[2][0]);
-                $goods = Dever::db('shop/buy_order_goods')->select(array('order_id' => $find[2][0]));
+        $num = count($this->order_id);
+        if ($num > 0) {
+            if ($num == 1) {
+                $key = array_keys($this->order_id);
+                Dever::db('shop/buy_order')->delete($key[0]);
+                $goods = Dever::db('shop/buy_order_goods')->select(array('order_id' => $key[0]));
 
                 $p_price = 0;
                 foreach ($goods as $k => $v) {
@@ -1099,12 +1101,12 @@ class Buy
                     }
                 }
 
-                Dever::db('shop/buy_order')->update(array('where_id' => $order['id'], 'status' => 3, 'source_type' => $find[0], 'source_id' =>  $find[1][0], 'p_price' => $p_price, 'operdate' => time()));
+                Dever::db('shop/buy_order')->update(array('where_id' => $order['id'], 'status' => 3, 'source_type' => $this->order_id[$key][0], 'source_id' =>  $this->order_id[$key][1], 'p_price' => $p_price, 'operdate' => time()));
 
-                Dever::db('shop/buy_order_goods')->delete(array('order_id' => $find[2][0]));
+                Dever::db('shop/buy_order_goods')->delete(array('order_id' => $key[0]));
 
-                unset($this->order_id[$find[2][0]]);
-                $this->order_id[$order['id']] = array($find[0], $find[1][0]);
+                unset($this->order_id[$key[0]);
+                $this->order_id[$order['id']] = array($this->order_id[$key][0], $this->order_id[$key][1]);
 
             } else {
                 if (!$yes) {