|
@@ -373,8 +373,8 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
} else {
|
|
|
$update_common['goods_stcids'] = ','.implode(',',$goods_stcids_arr).',';
|
|
|
}
|
|
|
- $update_common['plateid_top'] = intval($_POST['plate_top']) > 0 ? intval($_POST['plate_top']) : '';
|
|
|
- $update_common['plateid_bottom'] = intval($_POST['plate_bottom']) > 0 ? intval($_POST['plate_bottom']) : '';
|
|
|
+ $update_common['plateid_top'] = intval($_POST['plate_top']) > 0 ? intval($_POST['plate_top']) : 0;
|
|
|
+ $update_common['plateid_bottom'] = intval($_POST['plate_bottom']) > 0 ? intval($_POST['plate_bottom']) : 0;
|
|
|
$update_common['is_virtual'] = intval($_POST['is_gv']);
|
|
|
$update_common['virtual_indate'] = $_POST['g_vindate'] != '' ? (strtotime($_POST['g_vindate']) + 24*60*60 -1) : 0; // 当天的最后一秒结束
|
|
|
$update_common['virtual_limit'] = intval($_POST['g_vlimit']) > 10 || intval($_POST['g_vlimit']) < 0 ? 10 : intval($_POST['g_vlimit']);
|
|
@@ -420,11 +420,25 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$update['gc_id_2'] = $update_common['gc_id_2'];
|
|
|
$update['gc_id_3'] = $update_common['gc_id_3'];
|
|
|
$update['brand_id'] = $update_common['brand_id'];
|
|
|
- $update['goods_price'] = $value['price'];
|
|
|
- $update['goods_marketprice'] = $value['marketprice'] == 0 ? $update_common['goods_marketprice'] : $value['marketprice'];
|
|
|
- $update['goods_serial'] = $value['sku'];
|
|
|
+ //$update['goods_price'] = $value['price'];
|
|
|
+ //$update['goods_marketprice'] = $value['marketprice'] == 0 ? $update_common['goods_marketprice'] : $value['marketprice'];
|
|
|
+ //$update['goods_storage_alarm']= intval($value['alarm']);
|
|
|
+ $update['first_pay'] = floatval($value['first_pay']); //首付
|
|
|
+ $update['month_pay'] = floatval($value['month_pay']); //月供
|
|
|
+ $update['final_pay'] = floatval($value['final_pay']); //尾款
|
|
|
+ $update['storage_exp_date'] = strtotime($value['expdate']); //库存有效期
|
|
|
+
|
|
|
+ $specs = array_values($value['sp_value']);
|
|
|
+ $split_num = 0;
|
|
|
+ preg_match_all('/\d+(\.\d+)?/',$specs[1], $matches);
|
|
|
+ if(isset($matches[0][0])) {
|
|
|
+ $split_num = intval($matches[0][0]);
|
|
|
+ }
|
|
|
+
|
|
|
+ $update['goods_price'] = round(($update['first_pay'] + $update['month_pay'] * $split_num + $update['final_pay']), 2);
|
|
|
+
|
|
|
+ $update['goods_serial'] = $_POST['g_serial'];
|
|
|
$update['oms_id'] = intval($value['oms_id']);
|
|
|
- $update['goods_storage_alarm']= intval($value['alarm']);
|
|
|
$update['goods_spec'] = serialize($value['sp_value']);
|
|
|
$update['goods_storage'] = $value['stock'];
|
|
|
$update['goods_state'] = $update_common['goods_state'];
|
|
@@ -471,12 +485,26 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$insert['gc_id_2'] = $update_common['gc_id_2'];
|
|
|
$insert['gc_id_3'] = $update_common['gc_id_3'];
|
|
|
$insert['brand_id'] = $update_common['brand_id'];
|
|
|
- $insert['goods_price'] = $value['price'];
|
|
|
$insert['goods_promotion_price']=$value['price'];
|
|
|
- $insert['goods_marketprice'] = $value['marketprice'] == 0 ? $update_common['goods_marketprice'] : $value['marketprice'];
|
|
|
- $insert['goods_serial'] = $value['sku'];
|
|
|
+ //$insert['goods_price'] = $value['price'];
|
|
|
+ //$insert['goods_marketprice'] = $value['marketprice'] == 0 ? $update_common['goods_marketprice'] : $value['marketprice'];
|
|
|
+ //$insert['goods_storage_alarm']= intval($value['alarm']);
|
|
|
+ $insert['first_pay'] = floatval($value['first_pay']); //首付
|
|
|
+ $insert['month_pay'] = floatval($value['month_pay']); //月供
|
|
|
+ $insert['final_pay'] = floatval($value['final_pay']); //尾款
|
|
|
+ $insert['storage_exp_date'] = strtotime($value['expdate']); //库存有效期
|
|
|
+
|
|
|
+ $specs = array_values($value['sp_value']);
|
|
|
+ $split_num = 0;
|
|
|
+ preg_match_all('/\d+(\.\d+)?/',$specs[1], $matches);
|
|
|
+ if(isset($matches[0][0])) {
|
|
|
+ $split_num = intval($matches[0][0]);
|
|
|
+ }
|
|
|
+
|
|
|
+ $insert['goods_price'] = round(($insert['first_pay'] + $insert['month_pay'] * $split_num + $insert['final_pay']), 2);
|
|
|
+
|
|
|
+ $insert['goods_serial'] = $_POST['g_serial'];
|
|
|
$insert['oms_id'] = intval($value['oms_id']);
|
|
|
- $insert['goods_storage_alarm']= intval($value['alarm']);
|
|
|
$insert['goods_spec'] = serialize($value['sp_value']);
|
|
|
$insert['goods_storage'] = $value['stock'];
|
|
|
$insert['goods_image'] = $update_common['goods_image'];
|
|
@@ -531,8 +559,8 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$update['brand_id'] = $update_common['brand_id'];
|
|
|
$update['goods_price'] = $update_common['goods_price'];
|
|
|
$update['goods_marketprice'] = $update_common['goods_marketprice'];
|
|
|
- $update['goods_serial'] = $update_common['goods_serial'];
|
|
|
$update['goods_storage_alarm']= $update_common['goods_storage_alarm'];
|
|
|
+ $update['goods_serial'] = $update_common['goods_serial'];
|
|
|
$update['goods_spec'] = serialize(null);
|
|
|
$update['goods_storage'] = intval($_POST['g_storage']);
|
|
|
$update['goods_state'] = $update_common['goods_state'];
|