示例#1
0
?>
';
var id='<?php 
echo Comm::strencrypt($data['clothes']['id']);
?>
';
var id_sku='<?php 
echo implode(',', $id_to_str_arr);
?>
';
var img_sku='<?php 
echo $data['clothes']['sku'];
?>
';
var istop_id='<?php 
echo Comm::strencrypt($istop_id);
?>
';
var domain='<?php 
echo $domain;
?>
';
$(function(){
	$('.color_page .color_count').html($(".color_scrollable ul>div").length)
	try{
		$(".color_scrollable").scrollable({
			size: 1,
			items:'.color_scrollable ul',
			vertical:false,
			prev:'.color_prev',
			next:'.color_next',
示例#2
0
</div></div></div>
    <div class="fl w140 border_rt" style="height: 100%;"><div class="div_table"><div class="div_table_cell"><?php 
        if (is_array($value['o_addtime'])) {
            $o_name_arr = array();
            foreach ($value['o_addtime'] as $o_value) {
                $o_name_arr[] = substr($o_value, 0, 10);
            }
            echo implode('<br/>', $o_name_arr);
        } else {
            echo substr($value['o_addtime'], 0, 10);
        }
        ?>
</div></div></div>
    <div class="fl w115" style="height: 100%;">
    <div class="div_table"><div class="div_table_cell"><a target="_blank" href="/erp/manageinfo/id/<?php 
        echo Comm::strencrypt($value['id']);
        ?>
" class="button button-primary button-rounded button-small" style=" width:50px; padding:0 5px;">审图</a>
	
	<?php 
        if (Beu_Power::selectAction('/erp/delClothesByclothesid')) {
            ?>
		<br/>
	<a onclick="delClothesByclothesidpop(this)" class="button button-primary button-rounded button-small" style=" width:50px; padding:0 5px;margin-top:15px">删除</a>
	<?php 
        }
        ?>
	</div></div>
    </div>
  </div>
  <?php 
示例#3
0
 /**
  * 图片详情 SKU
  */
 public function manageinfoSKU()
 {
     $ret = array('status' => 0, 'msg' => '');
     try {
         $id = Yii::app()->request->getParam('id');
         $id = Comm::strdecipher($id);
         $sort = Yii::app()->request->getParam("sort");
         if (empty($id)) {
             throw new Exception("ID 为空");
         }
         if (empty($sort)) {
             $sort = 'down';
         }
         //获取SKU对应所有SKC
         $ret_skc = $this->getSKCbySKUid($id);
         $id_arr = array();
         foreach ($ret_skc as $value) {
             $id_arr = array_keys($value);
         }
         //echo $id;exit();
         //获取品牌名
         $brand_ret = Brand::brandSelectById($_SESSION['brandid']);
         if (count($brand_ret) == 0) {
             throw new Exception('');
         }
         $ret['data']['brandname'] = $brand_ret[0]['name'];
         $code_start = $brand_ret[0]['code_start'];
         $code_end = $brand_ret[0]['code_end'];
         $clothesimage = new clothesimageclass();
         //获取单品信息
         $clothes_where_arr = array();
         $clothes_where_arr['id'] = $id;
         $clothesorder = new clothesorderclass();
         $c_ret = $clothesorder->select_Single_clothes($_SESSION['brandid'], $clothes_where_arr, 'SKU');
         if (count($c_ret) == 0) {
             throw new Exception('单品不存在');
         }
         $ret['data']['clothes'] = $c_ret;
         $ret['data']['prev'] = '';
         $ret['data']['next'] = '';
         //获取单品上一条
         $clothes_where_arr['seach_direction'] = 'prev';
         $clothes_where_arr['sku_not'] = $ret['data']['clothes']['sku'];
         $c_ret = $clothesorder->select_Single_clothes($_SESSION['brandid'], $clothes_where_arr, 'SKU');
         if (!empty($c_ret)) {
             $ret['data']['prev'] = $c_ret['id'];
         }
         //获取单品下一条
         $clothes_where_arr['seach_direction'] = 'next';
         $c_ret = $clothesorder->select_Single_clothes($_SESSION['brandid'], $clothes_where_arr, 'SKU');
         if (!empty($c_ret)) {
             $ret['data']['next'] = $c_ret['id'];
         }
         //获取单品不同色
         $clothes_where_arr = array();
         $clothes_where_arr['erp_clothes_order.sku'] = $ret['data']['clothes']['sku'];
         $c_ret = $clothesorder->select_all_clothes($_SESSION['brandid'], 0, $clothes_where_arr);
         $ret['data']['color'] = array();
         if ($c_ret['page_sum'] > 0) {
             foreach ($c_ret['data'] as $value) {
                 $img_all_ret = $clothesimage->select_all_image($value['id'], '-1', array('isshow' => 0), '', 'id asc');
                 $c_img_data = array('id' => $value['id'], 'url' => $value['url'], 'img_type' => -1, 'brandnumber' => $value['brandnumber'], 'img_data' => '2035-12-31 00:00:00');
                 foreach ($img_all_ret as $img_value) {
                     switch ($img_value->type) {
                         case 0:
                             //灰模图
                             if (!empty($img_value->url) && !in_array($c_img_data['img_type'], array(0, 1)) && strtotime($c_img_data['img_data']) > strtotime($img_value->addtime)) {
                                 $c_img_data['img_type'] = $img_value->type;
                                 $c_img_data['url'] = $img_value->url;
                                 $c_img_data['img_data'] = $img_value->addtime;
                             }
                             break;
                         case 1:
                             //立体图
                             if (!empty($img_value->url) && !in_array($c_img_data['img_type'], array(1)) && strtotime($c_img_data['img_data']) > strtotime($img_value->addtime)) {
                                 $c_img_data['img_type'] = $img_value->type;
                                 $c_img_data['url'] = $img_value->url;
                                 $c_img_data['img_data'] = $img_value->addtime;
                             }
                             break;
                         case 2:
                             //静态图
                             if (!empty($img_value->url) && !in_array($c_img_data['img_type'], array(0, 1, 2)) && strtotime($c_img_data['img_data']) > strtotime($img_value->addtime)) {
                                 $c_img_data['img_type'] = $img_value->type;
                                 $c_img_data['url'] = $img_value->url;
                                 $c_img_data['img_data'] = $img_value->addtime;
                             }
                             break;
                         case 3:
                             //模特图
                             if (!empty($img_value->url) && !in_array($c_img_data['img_type'], array(0, 1, 2, 3)) && strtotime($c_img_data['img_data']) > strtotime($img_value->addtime)) {
                                 $c_img_data['img_type'] = $img_value->type;
                                 $c_img_data['url'] = $img_value->url;
                                 $c_img_data['img_data'] = $img_value->addtime;
                             }
                             break;
                         case 4:
                             //细节图
                             if (!empty($img_value->url) && !in_array($c_img_data['img_type'], array(0, 1, 2, 4)) && strtotime($c_img_data['img_data']) > strtotime($img_value->addtime)) {
                                 $c_img_data['img_type'] = $img_value->type;
                                 $c_img_data['url'] = $img_value->url;
                                 $c_img_data['img_data'] = $img_value->addtime;
                             }
                             break;
                     }
                 }
                 $ret['data']['color'][] = $c_img_data;
             }
             $dq_color = array();
             foreach ($ret['data']['color'] as $key => $value) {
                 if ($value['id'] == $ret['data']['clothes']['id']) {
                     $dq_color = $value;
                     array_splice($ret['data']['color'], $key, 1);
                     break;
                 }
             }
             array_unshift($ret['data']['color'], $dq_color);
         }
         $ret['data']['clothes']['brandcategoryname'] = '';
         if (!empty($ret['data']['clothes']['brandcategoryid'])) {
             //单品已设置款号
             //获取品牌的所有分类
             $brandcategory = new brandcategoryclass();
             $category_ret = $brandcategory->select_category($_SESSION['brandid']);
             foreach ($category_ret as $value) {
                 if ($value->id == $ret['data']['clothes']['brandcategoryid']) {
                     $ret['data']['clothes']['brandcategoryname'] = $value->name;
                     break;
                 }
             }
         }
         $param_arr = array();
         $param_arr['isshow'] = 0;
         $date = '';
         $orderdate = 'addtime desc';
         if ($sort == 'down') {
             $orderdate = 'addtime asc';
         }
         $id_to_str_arr = array();
         foreach ($id_arr as $value) {
             $id_to_str_arr[$value] = Comm::strencrypt($value);
         }
         //获取单品的图片
         $img_ret = $clothesimage->select_all_image($id_arr, '-1', $param_arr, $date, $orderdate);
         //print_r($img_ret);
         $date_arr = array();
         foreach ($img_ret as $value) {
             $date_arr[] = substr($value->addtime, 0, 10);
         }
         sort($date_arr);
         $date_arr = array_unique($date_arr);
         $qiniu = new erp_qiniu();
         //七牛的接口类
         $brand_qiniu_account = $qiniu->getAccountByBrand($_SESSION['brandid']);
         //获取品牌的七牛子账号信息
         if (count($brand_qiniu_account) == 0) {
             throw new Exception('品牌暂未绑定七牛帐号');
         }
         $ret['domain'] = $brand_qiniu_account[0]['domain'];
         $ret['data']['img'] = $img_ret;
         $ret['date_arr'] = $date_arr;
         $ret['id_to_str_arr'] = $id_to_str_arr;
         $ret['sort'] = $sort;
         $ret['status'] = 1;
     } catch (Exception $e) {
         $this->render('error', array('msg' => $e->getMessage(), 'status' => 2));
         exit;
     }
     $this->render('manageinfoSKU', $ret);
 }
示例#4
0
?>
';
var img_sku='<?php 
echo $data['clothes']['sku'];
?>
';
var istop_id='<?php 
echo Comm::strencrypt($istop_id);
?>
';
var domain='<?php 
echo $domain;
?>
';
var orderid_str='<?php 
echo Comm::strencrypt($data['clothes']['orderid']);
?>
';
$(function(){
	$('.color_page .color_count').html($(".color_scrollable ul>div").length)
	try{
		$(".color_scrollable").scrollable({
			size: 1,
			items:'.color_scrollable ul',
			vertical:false,
			prev:'.color_prev',
			next:'.color_next',
			onSeek:currentlistbutton
		});
		if($('.color_scrollable ul>div').length>1){
			$('.color_next').removeClass('txt_gray');