|
@@ -84,6 +84,16 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$goodscommon_info['mb_body'] = unserialize($goodscommon_info['mobile_body']);
|
|
|
$goodscommon_info['mobile_body'] = json_encode($goodscommon_info['mb_body']);
|
|
|
}
|
|
|
+ //附加条款
|
|
|
+ $goods_plus_list = Model('goods_plus')->goodsPlusList();
|
|
|
+ Tpl::output('gp_list', $goods_plus_list);
|
|
|
+
|
|
|
+ if(isset($goodscommon_info['goods_plus'])) {
|
|
|
+ $goodscommon_info['goods_plus'] = unserialize($goodscommon_info['goods_plus']);
|
|
|
+ }
|
|
|
+ if(isset($goodscommon_info['plate_number_region'])) {
|
|
|
+ $goodscommon_info['plate_number_region'] = unserialize($goodscommon_info['plate_number_region']);
|
|
|
+ }
|
|
|
Tpl::output('goods', $goodscommon_info);
|
|
|
|
|
|
if (intval($_GET['class_id']) > 0) {
|
|
@@ -103,7 +113,7 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
Tpl::output('brand_list', $brand_list);
|
|
|
|
|
|
// 取得商品规格的输入值
|
|
|
- $goods_array = $model_goods->getGoodsList($where, 'goods_id,goods_marketprice,goods_price,goods_storage,goods_serial,goods_storage_alarm,goods_spec,oms_id,first_pay,month_pay,final_pay,storage_exp_date');
|
|
|
+ $goods_array = $model_goods->getGoodsList($where, 'goods_id,goods_marketprice,goods_price,goods_storage,goods_serial,goods_storage_alarm,goods_spec,oms_id,first_pay,month_pay,final_pay,storage_exp_date,final_pay_solution');
|
|
|
$sp_value = array();
|
|
|
if (is_array($goods_array) && !empty($goods_array)) {
|
|
|
|
|
@@ -141,6 +151,12 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$sp_value ['i_' . $id . '|month_pay'] = $v['month_pay'];
|
|
|
$sp_value ['i_' . $id . '|final_pay'] = $v['final_pay'];
|
|
|
$sp_value ['i_' . $id . '|expdate'] = date("Y-m-d",$v['storage_exp_date']);
|
|
|
+ $final_pay_solution = unserialize($v['final_pay_solution']);
|
|
|
+ if(is_array($final_pay_solution)) {
|
|
|
+ $sp_value ['i_' . $id . '|surplus_payment'] = $final_pay_solution['surplus_payment'];
|
|
|
+ $sp_value ['i_' . $id . '|surplus_periods'] = $final_pay_solution['surplus_periods'];
|
|
|
+ $sp_value ['i_' . $id . '|terminally_price'] = $final_pay_solution['terminally_price'];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
Tpl::output('spec_checked', $spec_checked);
|
|
@@ -327,7 +343,12 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$update_common['goods_attr'] = serialize($_POST['attr']);
|
|
|
$update_common['goods_body'] = $_POST['g_body'];
|
|
|
$update_common['car_id'] = intval($_POST['car_id']); //车型id
|
|
|
- $update_common['insurance_fee'] = floatval($_POST['insurance_fee']);//保险费用
|
|
|
+ $update_common['deposit'] = floatval($_POST['deposit']); //订金
|
|
|
+ $update_common['goods_plus'] = serialize($_POST['goods_plus']); //附加条款
|
|
|
+ $update_common['purchase_tax'] = intval($_POST['purchase_tax']); //是否赠送购置税
|
|
|
+ $update_common['auto_insurance'] = intval($_POST['auto_insurance']); //是否赠送保险
|
|
|
+ $update_common['plate_number'] = intval($_POST['plate_number']); //是否赠送车牌
|
|
|
+ $update_common['plate_number_region']= serialize($_POST['plate_number_region']); //赠送车牌所属省份数组
|
|
|
// 序列化保存手机端商品描述数据
|
|
|
if ($_POST['m_body'] != '') {
|
|
|
$_POST['m_body'] = str_replace('"', '"', $_POST['m_body']);
|
|
@@ -433,7 +454,12 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$update['month_pay'] = floatval($value['month_pay']); //月供
|
|
|
$update['final_pay'] = floatval($value['final_pay']); //尾款
|
|
|
$update['storage_exp_date'] = strtotime($value['expdate']); //库存有效期
|
|
|
- $update['final_pay_solution']= serialize($value['final_pay_solution']); //尾款支付方案序列化
|
|
|
+ $final_pay_solution = [
|
|
|
+ 'surplus_payment' => $value['surplus_payment'],
|
|
|
+ 'surplus_periods' => $value['surplus_periods'],
|
|
|
+ 'terminally_price'=> $value['terminally_price'],
|
|
|
+ ];
|
|
|
+ $update['final_pay_solution']= serialize($final_pay_solution); //尾款支付方案序列化
|
|
|
|
|
|
$specs = array_values($value['sp_value']);
|
|
|
$split_num = 0;
|
|
@@ -500,7 +526,12 @@ class store_goods_onlineControl extends BaseSellerControl {
|
|
|
$insert['month_pay'] = floatval($value['month_pay']); //月供
|
|
|
$insert['final_pay'] = floatval($value['final_pay']); //尾款
|
|
|
$insert['storage_exp_date'] = strtotime($value['expdate']); //库存有效期
|
|
|
- $insert['final_pay_solution']= serialize($value['final_pay_solution']); //尾款支付方案序列化
|
|
|
+ $final_pay_solution = [
|
|
|
+ 'surplus_payment' => $value['surplus_payment'],
|
|
|
+ 'surplus_periods' => $value['surplus_periods'],
|
|
|
+ 'terminally_price'=> $value['terminally_price'],
|
|
|
+ ];
|
|
|
+ $insert['final_pay_solution']= serialize($final_pay_solution); //尾款支付方案序列化
|
|
|
|
|
|
$specs = array_values($value['sp_value']);
|
|
|
$split_num = 0;
|