示例#1
0
session_cache_expire(30);
//session有效时间为30分钟
$fileName = "/data/htdocs/zhuqingting.dev.com/pc.valsun.cn/html/excel/noCZCatetroy" . date("Y-m-d_H_i_s") . ".xls";
$propertyName = '材质';
$tName = 'pc_archive_property';
$select = 'categoryPath';
$where = "WHERE propertyName='{$propertyName}' group by categoryPath";
$ppList = OmAvailableModel::getTNameList($tName, $select, $where);
$haveCZArr = array();
foreach ($ppList as $value) {
    $haveCZArr[] = $value['categoryPath'];
}
$tName = 'pc_goods_category';
$select = 'path';
$where = "WHERE is_delete=0";
$pathList = OmAvailableModel::getTNameList($tName, $select, $where);
$excel = new ExportDataExcel('file');
$excel->filename = $fileName;
$excel->initialize();
$excel->addRow(array('无材质属性类别'));
foreach ($pathList as $value) {
    $tName = 'pc_goods_category';
    $where = "WHERE path like'{$value['path']}-%' and is_delete=0";
    $count = OmAvailableModel::getTNameCount($tName, $where);
    if (!in_array($value['path'], $haveCZArr) && !$count) {
        $categoryName = getAllCateNameByPath($value['path']);
        $excel->addRow(array($categoryName));
        //echo $value['path']."\n";
    }
}
$excel->finalize();
    function content_526616c12e7fe9_50900572($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/fancyBox/source/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="./js/fancyBox/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<script type="text/javascript" src="./js/property.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                <?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

                </div>
            </div>
			<div class="servar products-servar">
								  <span>属性名:
								   <input name="inputName" type="text" id="inputName" value="<?php 
        echo $_GET['inputName'];
        ?>
"/>
								   </span>
								<span>类别&nbsp;&nbsp;
									<select name="sku_category" id="pid_one" onchange="select_one();">
										<option value="0">请选择</option>
										<?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = CategoryModel::getCategoryList('*', "where is_delete=0 and pid=0");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
										<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
"/><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['name'];
            ?>
</option>
										<?php 
        }
        ?>
									</select>
									<span align="left" id="div_two" style="width:auto; display:none"></span>
									<span align="left" id="div_three" style="width:auto; display:none"></span>
									<span align="left" id="div_four" style="width:auto; display:none"></span>
								</span>
                                   <span><button id='seachInput'/>搜索</button></span>
                                   &nbsp;
                                   <?php 
        if ($_smarty_tpl->tpl_vars['categorySearch']->value != '') {
            ?>
                                   <span style="color: green;">上次您搜索的类别为:<?php 
            echo $_smarty_tpl->tpl_vars['categorySearch']->value;
            ?>
</span>
                                   <?php 
        }
        ?>
                                   <span style="color: red;"><?php 
        echo $_smarty_tpl->tpl_vars['status']->value;
        ?>
</span>
            </div>
            <div class="servar products-servar">
                <span>
                	<a href="index.php?mod=property&act=addInput">新增属性</a>
                </span>
            </div>
            <div class="main">
            	<table cellspacing="0" width="100%">
                	<tr class="title">
                    	<td>属性名</td>
						<td>录入方式</td>
						<td>关联类型</td>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['inputList']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                    <tr>
                        <input name="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" id="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" type="hidden"/>
                    	<td><a href="index.php?mod=property&act=updateInput&id=<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['inputName'];
            ?>
</a></td>
                        <td>文本</td>
                        <td><?php 
            echo getAllCateNameByPath($_smarty_tpl->tpl_vars['value']->value['categoryPath']);
            ?>
</td>
                    </tr>
                    <?php 
        }
        ?>
                </table>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
					<?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
    function content_526616b983b8b3_14494234($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/fancyBox/source/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="./js/fancyBox/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<script type="text/javascript" src="./js/goodslist.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                <?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

                </div>
            </div>
			<div class="servar products-servar">
								  <span>查找:
								   <input name="seachdata" type="text" id="seachdata" value="<?php 
        echo $_GET['seachdata'];
        ?>
"/>
								   <select name="searchs" id="searchs" >
									<option value="1" <?php 
        if ($_GET['searchs'] == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>SPU</option>
									<option value="2" <?php 
        if ($_GET['searchs'] == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>SKU</option>
								  </select>
								   </span>
								   <span>新/老品:
								   <select name="isNew" id="isNew" >
								    <option value="0" ></option>
									<option value="1" <?php 
        if ($_GET['isNew'] == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>新品</option>
									<option value="2" <?php 
        if ($_GET['isNew'] == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>老品</option>
								  </select>
								   </span>
                                   <span>采购员:
								   <select name="purchaseId" id="purchaseId" >
								    <option value="0" > </option>
								    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = Auth::getApiPurchaseUsers();
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
									<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['userId'];
            ?>
" <?php 
            if ($_GET['purchaseId'] == $_smarty_tpl->tpl_vars['value']->value['userId']) {
                ?>
selected='selected'<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['userName'];
            ?>
</option>
									<?php 
        }
        ?>
								  </select>
								   </span>
								<span>类别&nbsp;&nbsp;
									<select name="sku_category" id="pid_one" onchange="select_one();">
										<option value="0"></option>
										<?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = CategoryModel::getCategoryList('*', "where is_delete=0 and pid=0");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
										<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['name'];
            ?>
</option>
										<?php 
        }
        ?>
									</select>
									<span align="left" id="div_two" style="width:auto; display:none"></span>
									<span align="left" id="div_three" style="width:auto; display:none"></span>
									<span align="left" id="div_four" style="width:auto; display:none"></span>
								</span>
                                   <span><button id='seachGoods'/>搜索</button></span>
                                   &nbsp;
                                   <?php 
        if ($_smarty_tpl->tpl_vars['categorySearch']->value != '') {
            ?>
                                   <span style="color: green;">上次您搜索的类别为:<?php 
            echo $_smarty_tpl->tpl_vars['categorySearch']->value;
            ?>
</span>
                                   <?php 
        }
        ?>
                                   <span style="color: red;" id="error"><?php 
        echo $_GET['status'];
        ?>
</span>
            </div>
            <div class="main feedback-main">
            	<table class="products-action" cellspacing="0" width="100%">
                   <tr class="title">
					    <td>产品图片</td>
                        <td width="25%">产品名称</td>
                        <td>SPU</td>
                        <td>SKU</td>
						<td>产品类别</td>
						<td>产品成本</td>
						<td>包材</td>
						<td>重量</td>
						<td>采购负责人</td>
						<td>新/老品</td>
                        <td>供应商</td>
						<td>操作</td>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['productList']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                                <tr id="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
">
									<td>
									<a class="fancybox" href="http://192.168.200.200:9998/imgs/<?php 
            echo get_sku_imgName($_smarty_tpl->tpl_vars['value']->value['sku']);
            ?>
-G.jpg" target="_blank">
									<img  src="http://192.168.200.200:9998/imgs/<?php 
            echo get_sku_imgName($_smarty_tpl->tpl_vars['value']->value['sku']);
            ?>
-G_thumnail.jpg" width="50" height="50" style="border-style:solid;border-width:0" />
									</a>
									</td>
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['goodsName'];
            ?>
</td>
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['spu'];
            ?>
</td>
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['sku'];
            ?>
</td>
									<td><?php 
            echo getAllCateNameByPath($_smarty_tpl->tpl_vars['value']->value['goodsCategory']);
            ?>
</td>
									<td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['goodsCost'];
            ?>
</td>
									<td><?php 
            echo PackingMaterialsModel::getPmNameById($_smarty_tpl->tpl_vars['value']->value['pmId']);
            ?>
</td>
									<td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['goodsWeight'];
            ?>
</td>
									<td><?php 
            echo getPersonNameById($_smarty_tpl->tpl_vars['value']->value['purchaseId']);
            ?>
</td>
									<td><?php 
            if ($_smarty_tpl->tpl_vars['value']->value['isNew'] == 0) {
                ?>
老品<?php 
            } else {
                ?>
新品<?php 
            }
            ?>
</td>
                                    <td><?php 
            echo OmAvailableModel::getParterNameBySku($_smarty_tpl->tpl_vars['value']->value['sku']);
            ?>
</td>
									<td>
									<input type="button" value="修改" tid="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" class="mod"/>
									<input type="button" value="删除" tid="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" class="del"/>
									</td>
                                </tr>
                                <?php 
        }
        ?>
                </table>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
					<?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript">
		$(document).ready(function() {
			$(".fancybox").fancybox({
				helpers: {
					title : {
						type : 'outside'
					},
					overlay : {
						speedOut : 0
					}
				}
			});

		});
</script><?php 
    }
示例#4
0
 public function view_getProductsCategoryList()
 {
     $tName = 'pc_products_large_category';
     $select = '*';
     $where = "WHERE is_delete=0 ";
     $productsCategoryList = OmAvailableModel::getTNameList($tName, $select, $where);
     foreach ($productsCategoryList as $k1 => $v1) {
         $tmpCategoryArr = explode(',', $v1['relateERPCategory']);
         $tmpCategoryNameArr = array();
         foreach ($tmpCategoryArr as $v2) {
             $tmpCategoryNameArr[] = getAllCateNameByPath($v2);
         }
         $productsCategoryList[$k1]['categoryNames'] = implode(',', $tmpCategoryNameArr);
     }
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('onevar', 5);
     $this->smarty->assign('twovar', 517);
     $this->smarty->assign('title', '服装/电子大类维护');
     $this->smarty->assign('productsCategoryList', empty($productsCategoryList) ? array() : $productsCategoryList);
     $this->smarty->display("productsLargeCategoryList.htm");
 }
    function content_52661634228078_50365984($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/cate.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                <?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

                </div>
            </div>
<div class="servar products-servar">
            	<span>
                	<a href="index.php?mod=category&act=addCategory">增加类别</a>
                </span>
                <span style="color: red;" id="error"><?php 
        echo $_GET['status'];
        ?>
</span>
            </div>
            <div class="main feedback-main">
            	<table class="products-action" cellspacing="0" width="100%">
                   <tr class="title">
                        <td>编号</td>
                        <td>名称</td>
                        <td>所属类级</td>
						<td>父类</td>
						<td>操作</td>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['categoryList']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                                <tr class="odd" id="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
">
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
</td>
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['name'];
            ?>
</td>
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['file'];
            ?>
</td>
									<td><?php 
            echo getAllCateNameByPath(CategoryModel::getCategoryPathById($_smarty_tpl->tpl_vars['value']->value['pid']));
            ?>
</td>
									<td>
									<input type="button" value="修改" tid="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" class="mod"/>
									<input type="button" value="删除" tid="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" class="del"/>
									</td>
                                </tr>
                                <?php 
        }
        ?>
                </table>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
					<?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
 $excelOutWebMaker = '';
 if (!empty($spuWebMakerList) && isset($spuWebMakerList[0]['isAgree']) && $spuWebMakerList[0]['isAgree'] == 2) {
     $excelOutWebMaker = getPersonNameById($spuWebMakerList[0]['webMakerId']);
     //对应网页制作人
 }
 $tName = 'pc_goods';
 $select = 'sku,goodsCategory,goodsStatus,purchaseId';
 $where = "WHERE is_delete=0 AND spu='{$spu}'";
 $skuList = OmAvailableModel::getTNameList($tName, $select, $where);
 foreach ($skuList as $k => $value2) {
     $row = array();
     $excelOutSpu = $k == 0 ? $spu : '';
     //输出在表中的spu
     $excelOutSku = $value2['sku'];
     //SKU
     $excelOutCategoryName = getAllCateNameByPath($value2['goodsCategory']);
     $excelOutStatusName = '';
     if ($value2['goodsStatus'] == 1) {
         $excelOutStatusName = '在线';
     } elseif ($value2['goodsStatus'] == 2) {
         $excelOutStatusName = '停售';
     } elseif ($value2['goodsStatus'] == 3) {
         $excelOutStatusName = '暂时停售';
     } elseif ($value2['goodsStatus'] == 51) {
         $excelOutStatusName = 'PK';
     }
     $excelOutPurchase = getPersonNameById($value2['purchaseId']);
     //对应采购
     $ebaySaler = '';
     //ebay销售
     $ebayHanderTime = '';
    } else {
        $tName = 'pc_packing_material';
        $select = 'pmName';
        $where = "WHERE id='{$pmId}'";
        $pmList = OmAvailableModel::getTNameList($tName, $select, $where);
        $pmId = $pmList[0]['pmName'];
    }
    if (empty($purchaseId)) {
        $purchaseId = "<span style='color:red'>无</span>";
    } else {
        $purchaseId = getPersonNameById($purchaseId);
    }
    if (empty($goodsCategory)) {
        $goodsCategory = "<span style='color:red'>无</span>";
    } else {
        $goodsCategory = getAllCateNameByPath($goodsCategory);
    }
    $tdIndex = $index + 1;
    $table .= "<tr><td>{$tdIndex}</td><td>{$sku}</td><td>{$goodsWeight}</td><td>{$pmId}</td><td>{$purchaseId}</td><td>{$goodsCategory}</td></tr>";
}
$table .= "</table>";
$table .= '<p style="' . $css_height . '">欲知所有问题料号,请联系产品中心负责人。详情请登录:<a href="' . $system_url . '" target="_blank">' . $system_name . '</a><br/></br>' . date('Y-m-d', $endTime) . '<br/>' . $system_name . '</p>';
//$table = '1111111';
echo $table . "\n";
echo 'table length = ' . strlen($table) . "\n";
echo 'table urlencode length = ' . strlen(urlencode($table)) . "\n";
$paramArr = array("sysName" => 'ProductCenter', "from" => $from, "to" => $to, "cc" => $cc, "type" => $type, "title" => $title, "content" => $table);
$message = UserCacheModel::getOpenSysApiPost('notice.send.message', $paramArr, '');
//get
//$message = UserCacheModel :: getOpenSysApiPost('notice.send.message', $paramArr,'gw88');//post
echo 'message = ';
    function content_5266437338ea64_63491062($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/goodslist.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                </div>
            </div>
			<div class="servar products-servar">
			<span style="color: red;" id="error"></span>
            </div>
            <form action="index.php?mod=autoCreateSpu&act=updateSpuArchiveOn" method="post" id="SpuArchiveValidation">
            <div class="main products-main basic-main">
            	<table cellspacing="0" width="100%" id="tableBas">
                	<tr class="title">
                    	<td align="left" colspan="5" style="font-size:16px; font-weight:bold; padding-left:15px;">基本信息</td>
                    </tr>
                    <tr>
                    	<td class="products-action" rowspan="100" style="width:450px;">

                    	</td>
                        <td width="8%"><span style="color:#F00;">*</span>SPU</td>
                        <td width="15%">
                            <input value="<?php 
        echo $_smarty_tpl->tpl_vars['spu']->value;
        ?>
" disabled="disabled"/>
							<input name="spu" id="spu" value="<?php 
        echo $_smarty_tpl->tpl_vars['spu']->value;
        ?>
" type="hidden"/>
                        </td>
                        <td style="width:90px;"><span style="color:#F00;">*</span>产品类别</td>
                        <td>
                            <input value="<?php 
        echo getAllCateNameByPath($_smarty_tpl->tpl_vars['pid']->value);
        ?>
" disabled="disabled"/>
							<input name="pid" id="pid" value="<?php 
        echo $_smarty_tpl->tpl_vars['pid']->value;
        ?>
" type="hidden"/>
                        </td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;">*</span>描述</td>
                        <td colspan="3"><textarea class="validate[required]" cols="50" rows="3" name="spuName"><?php 
        echo $_smarty_tpl->tpl_vars['spuName']->value;
        ?>
</textarea></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;">*</span>参考月销量</td>
                        <td><input class="validate[required,custom[integer],min[1]] text-input" name="referMonthSales" id="referMonthSales" value="<?php 
        echo $_smarty_tpl->tpl_vars['referMonthSales']->value;
        ?>
"/></td>
                        <td><span style="color:#F00;">*</span>估算重量</td>
                        <td><input class="validate[required,custom[number],min[0.001]] text-input" name="spuCalWeight" id="spuCalWeight" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuCalWeight']->value;
        ?>
"/></td>
                    </tr>
                    <tr>

                        <td><span style="color:#F00;">*</span>采购价</td>
                        <td><input class="validate[required,custom[number],min[0.001]] text-input" name="spuPurchasePrice" id="spuPurchasePrice" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuPurchasePrice']->value;
        ?>
"/></td>
                        <td><span style="color:#F00;">*</span>市场最低价</td>
                        <td><input class="validate[required,custom[number],min[0.001]] text-input" name="spuLowestPrice" id="spuLowestPrice" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuLowestPrice']->value;
        ?>
"/></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>是否带包装</td>
                        <td>
                            <select name="isPacking" id="isPacking">
                            	<option value="1" <?php 
        if ($_smarty_tpl->tpl_vars['isPacking']->value == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>不带包装</option>
                            	<option value="2" <?php 
        if ($_smarty_tpl->tpl_vars['isPacking']->value == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>带包装</option>
                            </select>
                        </td>
                        <td><span style="color:#F00;"></span>包材</td>
                        <td>
                            <select name="pmId" id="pmId">
                                <option value="0"></option>
                                <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = OmAvailableModel::getTNameList('pc_packing_material', 'id,pmName', "WHERE is_delete=0");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                            	<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['pmId']->value == $_smarty_tpl->tpl_vars['value']->value['id']) {
                ?>
selected='selected'<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['pmName'];
            ?>
</option>
                                <?php 
        }
        ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>备注</td>
                        <td><input name="spuNote" id="spuNote" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuNote']->value;
        ?>
"/></td>
                        <td><span style="color:#F00;"></span>状态</td>
                        <td>
                            <select name="spuStatus" id="spuStatus">
                            	<option value="1" <?php 
        if ($_smarty_tpl->tpl_vars['spuStatus']->value == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>下线</option>
                            	<option value="2" <?php 
        if ($_smarty_tpl->tpl_vars['spuStatus']->value == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>上线</option>
                            	<option value="3" <?php 
        if ($_smarty_tpl->tpl_vars['spuStatus']->value == 3) {
            ?>
selected='selected'<?php 
        }
        ?>
>部分停售</option>
                            	<option value="4" <?php 
        if ($_smarty_tpl->tpl_vars['spuStatus']->value == 4) {
            ?>
selected='selected'<?php 
        }
        ?>
>停售</option>
                            	<option value="5" <?php 
        if ($_smarty_tpl->tpl_vars['spuStatus']->value == 5) {
            ?>
selected='selected'<?php 
        }
        ?>
>部分下线</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>长</td>
                        <td><input class="validate[option,custom[number],min[0]]" name="spuLength" id="spuLength" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuLength']->value;
        ?>
"/></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>宽</td>
                        <td><input class="validate[option,custom[number],min[0]]" name="spuWidth" id="spuWidth" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuWidth']->value;
        ?>
"/></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>高</td>
                        <td><input class="validate[option,custom[number],min[0]]" name="spuHeight" id="spuHeight" value="<?php 
        echo $_smarty_tpl->tpl_vars['spuHeight']->value;
        ?>
"/></td>
                    </tr>
                    <tr><td colspan="4"><input type="button" id="addElement" value="添加网址"/></td></tr>
                    <tr><td><span style='color:#F00;'>*</span>参考网页:</td><td><input class="validate[required]" name='lowestUrl' id='lowestUrl' value="<?php 
        echo $_smarty_tpl->tpl_vars['lowestUrl']->value;
        ?>
"/></td> <td>说明:</td><td><input value="最低价" disabled="disabled"/></td></tr>
                    <tr><td><span style='color:#F00;'>*</span>参考网页:</td><td><input class="validate[required]" name='bidUrl' id='bidUrl' value="<?php 
        echo $_smarty_tpl->tpl_vars['bidUrl']->value;
        ?>
"/></td> <td>说明:</td><td><input value="竞价listing" disabled="disabled"/></td></tr>
                    <?php 
        $_smarty_tpl->tpl_vars['link'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['link']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['Link']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['link']->key => $_smarty_tpl->tpl_vars['link']->value) {
            $_smarty_tpl->tpl_vars['link']->_loop = true;
            ?>
                    <tr><td><span style='color:#F00;'>&nbsp;</span>参考网页:</td><td><input name='linkUrl[]' id='linkUrl' value="<?php 
            echo $_smarty_tpl->tpl_vars['link']->value['linkUrl'];
            ?>
"/></td> <td>说明:</td><td><input name='linkNote[]' id='linkNote' value="<?php 
            echo $_smarty_tpl->tpl_vars['link']->value['linkNote'];
            ?>
"/></td></tr>
                    <?php 
        }
        ?>
                </table>
                <table cellspacing="0" width="100%">
                	<tr class="title">
                    	<td align="left" colspan="8" style="font-size:16px; font-weight:bold; padding-left:15px;">档案信息</td>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['valuePP'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['valuePP']->_loop = false;
        $_from = OmAvailableModel::getTNameList('pc_archive_property', '*', "WHERE categoryPath IN (" . (string) $_smarty_tpl->tpl_vars['pathImplodeStr']->value . ")");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['valuePP']->key => $_smarty_tpl->tpl_vars['valuePP']->value) {
            $_smarty_tpl->tpl_vars['valuePP']->_loop = true;
            ?>
						<tr>
                            <td style="width: 40px; padding-left:20px;">
                            <?php 
            echo $_smarty_tpl->tpl_vars['valuePP']->value['propertyName'];
            ?>

                            </td>
                            <?php 
            if ($_smarty_tpl->tpl_vars['valuePP']->value['isRadio'] == 1) {
                ?>
                                <td>
                                <select name="pro<?php 
                echo $_smarty_tpl->tpl_vars['valuePP']->value['id'];
                ?>
" id="pro<?php 
                echo $_smarty_tpl->tpl_vars['valuePP']->value['id'];
                ?>
">
                                    <option value="0"></option>
                                    <?php 
                $_smarty_tpl->tpl_vars['valuePPV1'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['valuePPV1']->_loop = false;
                $_from = OmAvailableModel::getTNameList('pc_archive_property_value', '*', "WHERE propertyId='" . (string) $_smarty_tpl->tpl_vars['valuePP']->value['id'] . "'");
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['valuePPV1']->key => $_smarty_tpl->tpl_vars['valuePPV1']->value) {
                    $_smarty_tpl->tpl_vars['valuePPV1']->_loop = true;
                    ?>
                                    <option value="<?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV1']->value['id'];
                    ?>
" <?php 
                    $_smarty_tpl->tpl_vars['ppv'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['ppv']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['PPV']->value;
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['ppv']->key => $_smarty_tpl->tpl_vars['ppv']->value) {
                        $_smarty_tpl->tpl_vars['ppv']->_loop = true;
                        if ($_smarty_tpl->tpl_vars['ppv']->value['propertyId'] == $_smarty_tpl->tpl_vars['valuePP']->value['id'] && $_smarty_tpl->tpl_vars['ppv']->value['propertyValueId'] == $_smarty_tpl->tpl_vars['valuePPV1']->value['id']) {
                            ?>
selected='selected'<?php 
                        }
                    }
                    ?>
><?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV1']->value['propertyValue'];
                    ?>
</option>
                                    <?php 
                }
                ?>
                                </select>
                                </td>
                            <?php 
            } else {
                ?>
                                <td>
                                <?php 
                $_smarty_tpl->tpl_vars['valuePPV2'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['valuePPV2']->_loop = false;
                $_from = OmAvailableModel::getTNameList('pc_archive_property_value', '*', "WHERE propertyId='" . (string) $_smarty_tpl->tpl_vars['valuePP']->value['id'] . "'");
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['valuePPV2']->key => $_smarty_tpl->tpl_vars['valuePPV2']->value) {
                    $_smarty_tpl->tpl_vars['valuePPV2']->_loop = true;
                    ?>
                                    <input style="width: 12px;" value="<?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV2']->value['id'];
                    ?>
" name="pro<?php 
                    echo $_smarty_tpl->tpl_vars['valuePP']->value['id'];
                    ?>
[]" type="checkbox" id="pro<?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV2']->value['id'];
                    ?>
" <?php 
                    $_smarty_tpl->tpl_vars['ppv'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['ppv']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['PPV']->value;
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['ppv']->key => $_smarty_tpl->tpl_vars['ppv']->value) {
                        $_smarty_tpl->tpl_vars['ppv']->_loop = true;
                        if ($_smarty_tpl->tpl_vars['ppv']->value['propertyId'] == $_smarty_tpl->tpl_vars['valuePP']->value['id'] && $_smarty_tpl->tpl_vars['ppv']->value['propertyValueId'] == $_smarty_tpl->tpl_vars['valuePPV2']->value['id']) {
                            ?>
checked='checked'<?php 
                        }
                    }
                    ?>
/>

                                    <label for="pro<?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV2']->value['id'];
                    ?>
"><?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV2']->value['propertyValue'];
                    ?>
(<?php 
                    echo $_smarty_tpl->tpl_vars['valuePPV2']->value['propertyValueShort'];
                    ?>
</label>

                                <?php 
                }
                ?>
                                </td>
                            <?php 
            }
            ?>

						</tr>
                    <?php 
        }
        ?>
                </table>
                <table cellspacing="0" width="100%">
                	<tr class="title">
                    	<td align="left" colspan="2" style="font-size:16px; font-weight:bold; padding-left:15px;">主观描述</td>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['valueIN'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['valueIN']->_loop = false;
        $_from = OmAvailableModel::getTNameList('pc_archive_input', '*', "WHERE categoryPath IN (" . (string) $_smarty_tpl->tpl_vars['pathImplodeStr']->value . ")");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['valueIN']->key => $_smarty_tpl->tpl_vars['valueIN']->value) {
            $_smarty_tpl->tpl_vars['valueIN']->_loop = true;
            ?>
						<tr>
                            <td valign="top" width="6%" style="padding-left:20px;">
                                <?php 
            echo $_smarty_tpl->tpl_vars['valueIN']->value['inputName'];
            ?>

                            </td>
                            <td>
                                <textarea cols="120" rows="2" name="inp<?php 
            echo $_smarty_tpl->tpl_vars['valueIN']->value['id'];
            ?>
"><?php 
            $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['inv']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['INV']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value) {
                $_smarty_tpl->tpl_vars['inv']->_loop = true;
                if ($_smarty_tpl->tpl_vars['inv']->value['inputId'] == $_smarty_tpl->tpl_vars['valueIN']->value['id']) {
                    echo $_smarty_tpl->tpl_vars['inv']->value['inputValue'];
                }
            }
            ?>
</textarea>
							</td>
						</tr>
                    <?php 
        }
        ?>

                </table>
                <div align="center" class="products-action">
                	<input type="submit" value="保存"/>
                    <input type="button" value="返回" id="back"/>
                </div>
            </div>
            </form>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
    function content_52664c5a1dade7_75103504($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/goodslist.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                </div>
            </div>
			<div class="servar products-servar">
			<span style="color: red;" id="error"></span>
            </div>
            <form action="index.php?mod=goods&act=updateSkuSingOn" method="post" id="SpuArchiveValidation">
            <div class="main feedback-main">
            	<table class="products-action" cellspacing="0" width="100%" id="tableBas">
                	<tr class="title">
                    	<td align="left" colspan="5" style="font-size:16px; font-weight:bold; padding-left:15px;">基本信息</td>
                    </tr>
                    <tr>
                    	<td class="products-action" rowspan="100" style="width:450px;">

                    	</td>
                        <td width="8%"><span style="color:#F00;">*</span>SPU</td>
                        <td width="15%">
                            <input value="<?php 
        echo $_smarty_tpl->tpl_vars['spu']->value;
        ?>
" disabled="disabled"/>
							<input name="spu" id="spu" value="<?php 
        echo $_smarty_tpl->tpl_vars['spu']->value;
        ?>
" type="hidden"/>
                        </td>
                        <td style="width:90px;"><span style="color:#F00;">*</span>产品类别</td>
                        <td>
                            <input value="<?php 
        echo getAllCateNameByPath($_smarty_tpl->tpl_vars['pid']->value);
        ?>
" disabled="disabled"/>
							<input name="pid" id="pid" value="<?php 
        echo $_smarty_tpl->tpl_vars['pid']->value;
        ?>
" type="hidden"/>
                        </td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;">*</span>SKU</td>
                        <td><input class="validate[required]" name="sku" id="sku" value="<?php 
        echo $_smarty_tpl->tpl_vars['sku']->value;
        ?>
"/></td>
                        <input name="id" id="id" value="<?php 
        echo $_smarty_tpl->tpl_vars['id']->value;
        ?>
" type="hidden"/>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;">*</span>描述</td>
                        <td colspan="3"><textarea class="validate[required]" cols="50" rows="3" name="goodsName"><?php 
        echo $_smarty_tpl->tpl_vars['goodsName']->value;
        ?>
</textarea></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;">*</span>成本</td>
                        <td><input class="validate[required,custom[number],min[0.001]]" name="goodsCost" id="goodsCost" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsCost']->value;
        ?>
"/></td>
                        <td><span style="color:#F00;"></span>操作重量</td>
                        <td><input class="validate[option,custom[number],min[0.001]]" name="goodsWeight" id="goodsWeight" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsWeight']->value;
        ?>
"/></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>包材</td>
                        <td>
                            <select name="pmId" id="pmId">
                                <option value="0"></option>
                                <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = OmAvailableModel::getTNameList('pc_packing_material', 'id,pmName', "WHERE is_delete=0");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                            	<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['pmId']->value == $_smarty_tpl->tpl_vars['value']->value['id']) {
                ?>
selected='selected'<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['pmName'];
            ?>
</option>
                                <?php 
        }
        ?>
                            </select>
                        </td>
                        <td><span style="color:#F00;"></span>对应包材容量</td>
                        <td><input class="validate[option,custom[integer],min[1]]" name="pmCapacity" id="pmCapacity" value="<?php 
        echo $_smarty_tpl->tpl_vars['pmCapacity']->value;
        ?>
"/></td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>备注</td>
                        <td><input name="goodsNote" id="goodsNote" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsNote']->value;
        ?>
"/></td>
                        <td><span style="color:#F00;"></span>状态</td>
                        <td>
                            <select name="goodsStatus" id="goodsStatus">
                            	<option value="1" <?php 
        if ($_smarty_tpl->tpl_vars['goodsStatus']->value == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>零库存</option>
                            	<option value="2" <?php 
        if ($_smarty_tpl->tpl_vars['goodsStatus']->value == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>停售</option>
                            	<option value="3" <?php 
        if ($_smarty_tpl->tpl_vars['goodsStatus']->value == 3) {
            ?>
selected='selected'<?php 
        }
        ?>
>部分平台在线</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                    <td><span style="color:#F00;">*</span>新/老品</td>
                        <td>
                            <select name="isNew" id="isNew">
                            	<option value="1" <?php 
        if ($_smarty_tpl->tpl_vars['isNew']->value == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>新品</option>
                            	<option value="0" <?php 
        if ($_smarty_tpl->tpl_vars['isNew']->value == 0) {
            ?>
selected='selected'<?php 
        }
        ?>
>老品</option>
                            </select>
                        </td>
                    <td><span style="color:#F00;">*</span>是否带包装</td>
                        <td>
                            <select name="isPacking" id="isPacking">
                            	<option value="1" <?php 
        if ($_smarty_tpl->tpl_vars['isPacking']->value == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>不带包装</option>
                            	<option value="2" <?php 
        if ($_smarty_tpl->tpl_vars['isPacking']->value == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>带包装</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;">*</span>供应商</td>
                        <td>
                            <select name="partnerId" id="partnerId" class="validate[required]">
                            <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = getParterInfoByPurchaseId($_smarty_tpl->tpl_vars['purchaseId']->value);
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                            	<?php 
            if (!empty($_smarty_tpl->tpl_vars['value']->value)) {
                ?>
                            	<option value="<?php 
                echo $_smarty_tpl->tpl_vars['value']->value['id'];
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['value']->value['company_name'];
                ?>
</option>
                            	<?php 
            }
            ?>
                            </select>
                            <?php 
        }
        ?>
                        </td>
                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>颜色</td>
                        <td><input name="goodsColor" id="goodsColor" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsColor']->value;
        ?>
"/></td>
                        <td><span style="color:#F00;"></span>尺码</td>
                        <td><input name="goodsSize" id="goodsSize" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsSize']->value;
        ?>
"/></td>

                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>长</td>
                        <td><input class="validate[option,custom[number],min[0]]" name="goodsLength" id="goodsLength" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsLength']->value;
        ?>
"/></td>

                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>宽</td>
                        <td><input class="validate[option,custom[number],min[0]]" name="goodsWidth" id="goodsWidth" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsWidth']->value;
        ?>
"/></td>

                    </tr>
                    <tr>
                        <td><span style="color:#F00;"></span>高</td>
                        <td><input class="validate[option,custom[number],min[0]]" name="goodsHeight" id="goodsHeight" value="<?php 
        echo $_smarty_tpl->tpl_vars['goodsHeight']->value;
        ?>
"/></td>

                    </tr>
                </table>
                <table cellspacing="0" width="100%">
                	<tr class="title">
                    	<td align="left" colspan="8" style="font-size:16px; font-weight:bold; padding-left:15px;">档案信息</td>
                    </tr>
                  <?php 
        if ($_smarty_tpl->tpl_vars['pathImplodeStr']->value != '') {
            ?>
                    <?php 
            $_smarty_tpl->tpl_vars['valuePP'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['valuePP']->_loop = false;
            $_from = OmAvailableModel::getTNameList('pc_archive_property', '*', "WHERE categoryPath IN (" . (string) $_smarty_tpl->tpl_vars['pathImplodeStr']->value . ")");
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['valuePP']->key => $_smarty_tpl->tpl_vars['valuePP']->value) {
                $_smarty_tpl->tpl_vars['valuePP']->_loop = true;
                ?>
						<tr>
                            <td style="width: 40px; padding-left:20px;">
                            <?php 
                echo $_smarty_tpl->tpl_vars['valuePP']->value['propertyName'];
                ?>

                            </td>
                            <?php 
                if ($_smarty_tpl->tpl_vars['valuePP']->value['isRadio'] == 1) {
                    ?>
                                <td>
                                <select name="pro<?php 
                    echo $_smarty_tpl->tpl_vars['valuePP']->value['id'];
                    ?>
" id="pro<?php 
                    echo $_smarty_tpl->tpl_vars['valuePP']->value['id'];
                    ?>
"  disabled="disabled">
                                    <option value="0"></option>
                                    <?php 
                    $_smarty_tpl->tpl_vars['valuePPV1'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['valuePPV1']->_loop = false;
                    $_from = OmAvailableModel::getTNameList('pc_archive_property_value', '*', "WHERE propertyId='" . (string) $_smarty_tpl->tpl_vars['valuePP']->value['id'] . "'");
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['valuePPV1']->key => $_smarty_tpl->tpl_vars['valuePPV1']->value) {
                        $_smarty_tpl->tpl_vars['valuePPV1']->_loop = true;
                        ?>
                                    <option value="<?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV1']->value['id'];
                        ?>
" <?php 
                        $_smarty_tpl->tpl_vars['ppv'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['ppv']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['PPV']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['ppv']->key => $_smarty_tpl->tpl_vars['ppv']->value) {
                            $_smarty_tpl->tpl_vars['ppv']->_loop = true;
                            if ($_smarty_tpl->tpl_vars['ppv']->value['propertyId'] == $_smarty_tpl->tpl_vars['valuePP']->value['id'] && $_smarty_tpl->tpl_vars['ppv']->value['propertyValueId'] == $_smarty_tpl->tpl_vars['valuePPV1']->value['id']) {
                                ?>
selected='selected'<?php 
                            }
                        }
                        ?>
><?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV1']->value['propertyValue'];
                        ?>
</option>
                                    <?php 
                    }
                    ?>
                                </select>
                                </td>
                            <?php 
                } else {
                    ?>
                                <td>
                                <?php 
                    $_smarty_tpl->tpl_vars['valuePPV2'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['valuePPV2']->_loop = false;
                    $_from = OmAvailableModel::getTNameList('pc_archive_property_value', '*', "WHERE propertyId='" . (string) $_smarty_tpl->tpl_vars['valuePP']->value['id'] . "'");
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['valuePPV2']->key => $_smarty_tpl->tpl_vars['valuePPV2']->value) {
                        $_smarty_tpl->tpl_vars['valuePPV2']->_loop = true;
                        ?>
                                    <input disabled="disabled" style="width: 12px;" value="<?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV2']->value['id'];
                        ?>
" name="pro<?php 
                        echo $_smarty_tpl->tpl_vars['valuePP']->value['id'];
                        ?>
[]" type="checkbox" id="pro<?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV2']->value['id'];
                        ?>
" <?php 
                        $_smarty_tpl->tpl_vars['ppv'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['ppv']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['PPV']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['ppv']->key => $_smarty_tpl->tpl_vars['ppv']->value) {
                            $_smarty_tpl->tpl_vars['ppv']->_loop = true;
                            if ($_smarty_tpl->tpl_vars['ppv']->value['propertyId'] == $_smarty_tpl->tpl_vars['valuePP']->value['id'] && $_smarty_tpl->tpl_vars['ppv']->value['propertyValueId'] == $_smarty_tpl->tpl_vars['valuePPV2']->value['id']) {
                                ?>
checked='checked'<?php 
                            }
                        }
                        ?>
/>

                                    <label for="pro<?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV2']->value['id'];
                        ?>
"><?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV2']->value['propertyValue'];
                        ?>
(<?php 
                        echo $_smarty_tpl->tpl_vars['valuePPV2']->value['propertyValueShort'];
                        ?>
</label>

                                <?php 
                    }
                    ?>
                                </td>
                            <?php 
                }
                ?>

						</tr>
                    <?php 
            }
            ?>
                    <?php 
        }
        ?>
                </table>
                <table cellspacing="0" width="100%">
                	<tr class="title">
                    	<td align="left" colspan="2" style="font-size:16px; font-weight:bold; padding-left:15px;">主观描述</td>
                    </tr>
                    <?php 
        if ($_smarty_tpl->tpl_vars['pathImplodeStr']->value != '') {
            ?>
                    <?php 
            $_smarty_tpl->tpl_vars['valueIN'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['valueIN']->_loop = false;
            $_from = OmAvailableModel::getTNameList('pc_archive_input', '*', "WHERE categoryPath IN (" . (string) $_smarty_tpl->tpl_vars['pathImplodeStr']->value . ")");
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['valueIN']->key => $_smarty_tpl->tpl_vars['valueIN']->value) {
                $_smarty_tpl->tpl_vars['valueIN']->_loop = true;
                ?>
						<tr>
                            <td valign="top" width="6%" style="padding-left:20px;">
                                <?php 
                echo $_smarty_tpl->tpl_vars['valueIN']->value['inputName'];
                ?>

                            </td>
                            <td>
                                <textarea disabled="disabled" cols="120" rows="2" name="inp<?php 
                echo $_smarty_tpl->tpl_vars['valueIN']->value['id'];
                ?>
"><?php 
                $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['inv']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['INV']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value) {
                    $_smarty_tpl->tpl_vars['inv']->_loop = true;
                    if ($_smarty_tpl->tpl_vars['inv']->value['inputId'] == $_smarty_tpl->tpl_vars['valueIN']->value['id']) {
                        echo $_smarty_tpl->tpl_vars['inv']->value['inputValue'];
                    }
                }
                ?>
</textarea>
							</td>
						</tr>
                    <?php 
            }
            ?>
                    <?php 
        }
        ?>
                </table>
                <div align="center" class="feedback-main">
                	<input type="submit" value="保存"/>
                    <input type="button" value="返回" id="back"/>
                </div>
            </div>
            </form>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
示例#10
0
 public function view_addInputOn()
 {
     $inputName = $_GET['inputName'] ? post_check(trim($_GET['inputName'])) : '';
     $pid = $_GET['pid'] ? post_check(trim($_GET['pid'])) : '';
     if (empty($inputName)) {
         $status = "属性名不能为空";
         header("Location:index.php?mod=property&act=addInput&status={$status}");
         exit;
     }
     if (empty($pid)) {
         $status = "类别不能为空";
         header("Location:index.php?mod=property&act=addInput&status={$status}");
         exit;
     }
     $categoryName = getAllCateNameByPath($pid);
     $pathImplodeStr = getAllPathBypid($pid);
     $tName = 'pc_archive_input';
     $where = "WHERE inputName='{$inputName}' and categoryPath IN ({$pathImplodeStr})";
     $count = OmAvailableModel::getTNameCount($tName, $where);
     if ($count) {
         $status = "{$categoryName} 或其父类下已经存在 {$inputName} 属性";
         header("Location:index.php?mod=property&act=addInput&status={$status}");
         exit;
     }
     $set = "SET inputName='{$inputName}',categoryPath='{$pid}'";
     $insertId = OmAvailableModel::addTNameRow($tName, $set);
     if (!$insertId) {
         $status = "系统插入数据错误";
         header("Location:index.php?mod=property&act=addInput&status={$status}");
         exit;
     }
     $status = "{$categoryName} 中添加 {$inputName} 文本属性成功";
     header("Location:index.php?mod=property&act=addInput&status={$status}");
 }
    function content_526616c5806164_72182535($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/fancyBox/source/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="./js/fancyBox/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<script type="text/javascript" src="./js/property.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                <?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

                </div>
            </div>
			<div class="servar products-servar">
								  <span>属性名:
								   <input name="propertyName" type="text" id="propertyName" value="<?php 
        echo $_GET['propertyName'];
        ?>
"/>
								   </span>
								   <span>录入方式:
								   <select name="isRadio" id="isRadio" >
								    <option value="0" >==请选择==</option>
									<option value="1" <?php 
        if ($_GET['isRadio'] == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>单选</option>
									<option value="2" <?php 
        if ($_GET['isRadio'] == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>多选</option>
								  </select>
								   </span>
								<span>类别&nbsp;&nbsp;
									<select name="sku_category" id="pid_one" onchange="select_one();">
										<option value="0">请选择</option>
										<?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = CategoryModel::getCategoryList('*', "where is_delete=0 and pid=0");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
										<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
"/><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['name'];
            ?>
</option>
										<?php 
        }
        ?>
									</select>
									<span align="left" id="div_two" style="width:auto; display:none"></span>
									<span align="left" id="div_three" style="width:auto; display:none"></span>
									<span align="left" id="div_four" style="width:auto; display:none"></span>
								</span>
                                   <span><button id='seachProperty'/>搜索</button></span>
                                   &nbsp;
                                   <?php 
        if ($_smarty_tpl->tpl_vars['categorySearch']->value != '') {
            ?>
                                   <span style="color: green;">上次您搜索的类别为:<?php 
            echo $_smarty_tpl->tpl_vars['categorySearch']->value;
            ?>
</span>
                                   <?php 
        }
        ?>
                                   <span style="color: red;"><?php 
        echo $_smarty_tpl->tpl_vars['status']->value;
        ?>
</span>
            </div>
            <div class="servar products-servar">
                <span>
                	<a href="index.php?mod=property&act=addProperty">新增属性</a>
                </span>
            </div>
            <div class="main feedback-main">
            	<table class="products-action" cellspacing="0" width="100%">
                	<tr class="title">
                    	<td width="10%">属性名</td>
                        <td width="50%">属性值</td>
						<td width="5%">录入方式</td>
						<td width="15%">关联类型</td>
                        <td width="20%">操作</td>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['propertyList']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                    <tr>
                        <input name="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" id="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" type="hidden"/>
                    	<td><a href="index.php?mod=property&act=updateProperty&id=<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['propertyName'];
            ?>
</a></td>
                        <td><?php 
            echo OmAvailableModel::getProValStrByProId($_smarty_tpl->tpl_vars['value']->value['id']);
            ?>
</td>
                        <td><?php 
            if ($_smarty_tpl->tpl_vars['value']->value['isRadio'] == 1) {
                ?>
单选<?php 
            } else {
                ?>
多选<?php 
            }
            ?>
</td>
                        <td><?php 
            echo getAllCateNameByPath($_smarty_tpl->tpl_vars['value']->value['categoryPath']);
            ?>
</td>
                        <td>
                            <input type="button" onclick="window.location.href = 'index.php?mod=property&act=updatePropertyValue&id=<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
'" value="修改属性值"/>
                            <input type="button" onclick="window.location.href = 'index.php?mod=property&act=addPropertyValue&id=<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
'" value="添加属性值"/>
                        </td>
                    </tr>
                    <?php 
        }
        ?>
                </table>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
					<?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
    function content_526616d124ef17_38368080($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date_format')) {
            include 'D:\\wamp\\www\\ftpPc.valsun.cn\\lib\\template\\smarty\\plugins\\modifier.date_format.php';
        }
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/goodslist.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                <?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

                </div>
            </div>
			<div class="servar products-servar">
            					  <span>SPU:
								   <input name="spu" type="text" id="spu" value="<?php 
        echo $_GET['spu'];
        ?>
"/>
								   </span>
								   <span>审核状态:
								   <select name="auditStatus" id="auditStatus" >
								    <option value="0" > </option>
									<option value="1" <?php 
        if ($_GET['auditStatus'] == 1) {
            ?>
selected='selected'<?php 
        }
        ?>
>待审核</option>
									<option value="2" <?php 
        if ($_GET['auditStatus'] == 2) {
            ?>
selected='selected'<?php 
        }
        ?>
>审核通过</option>
								  	<option value="3" <?php 
        if ($_GET['auditStatus'] == 3) {
            ?>
selected='selected'<?php 
        }
        ?>
>审核不通过</option>
								  </select>
                                  <span>采购员:
								   <select name="purchaseId" id="purchaseId" >
								    <option value="0" > </option>
								    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = Auth::getApiPurchaseUsers();
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
									<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['userId'];
            ?>
" <?php 
            if ($_GET['purchaseId'] == $_smarty_tpl->tpl_vars['value']->value['userId']) {
                ?>
selected='selected'<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['userName'];
            ?>
</option>
									<?php 
        }
        ?>
								  </select>
								   </span>
								   </span>
								   <span>类别&nbsp;&nbsp;
									<select name="sku_category" id="pid_one" onchange="select_one();">
										<option value="0">请选择</option>
										<?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = CategoryModel::getCategoryList('*', "where is_delete=0 and pid=0");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
										<option value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['name'];
            ?>
</option>
										<?php 
        }
        ?>
									</select>
									<span align="left" id="div_two" style="width:auto; display:none"></span>
									<span align="left" id="div_three" style="width:auto; display:none"></span>
									<span align="left" id="div_four" style="width:auto; display:none"></span>
								</span>
                                   <span><button id='seachSpuArchive'>搜索</button></span>
                                   <?php 
        if ($_smarty_tpl->tpl_vars['categorySearch']->value != '') {
            ?>
                                   <span style="color: green;">上次您搜索的类别为:<?php 
            echo $_smarty_tpl->tpl_vars['categorySearch']->value;
            ?>
</span>
                                   <?php 
        }
        ?>
            &nbsp;
			<span style="color: red;"><?php 
        echo $_smarty_tpl->tpl_vars['status']->value;
        ?>
</span>
            </div>
            <div class="main feedback-main">
            	<table class="products-action" cellspacing="0" width="100%">
                   <tr class="title">
                        <tr>
                            <td>SPU</td>
							<td>采购员</td>
							<td>类型</td>
							<td>在线状态</td>
							<td>审核状态</td>
							<td>添加时间</td>
							<td>单/虚拟料号</td>
							<td>操作</td>
                        </tr>
                    </tr>
                    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['spuArchiveList']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
                                <tr>
                                    <td><?php 
            echo $_smarty_tpl->tpl_vars['value']->value['spu'];
            ?>
</td>
                                    <td><?php 
            echo getPersonNameById($_smarty_tpl->tpl_vars['value']->value['purchaseId']);
            ?>
</td>
									<td><?php 
            echo getAllCateNameByPath($_smarty_tpl->tpl_vars['value']->value['categoryPath']);
            ?>
</td>
                                    <td>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['spuStatus'] == 1) {
                ?>
下线<?php 
            }
            ?>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['spuStatus'] == 2) {
                ?>
上线<?php 
            }
            ?>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['spuStatus'] == 3) {
                ?>
部分停售<?php 
            }
            ?>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['spuStatus'] == 4) {
                ?>
停售<?php 
            }
            ?>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['spuStatus'] == 5) {
                ?>
部分下线<?php 
            }
            ?>
                                    </td>
                                    <td>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['auditStatus'] == 1) {
                ?>
待审核<?php 
            }
            ?>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['auditStatus'] == 2) {
                ?>
<img alt="审核通过" src="http://misc.erp.valsun.cn/img/right.png"/><?php 
            }
            ?>
                                    <?php 
            if ($_smarty_tpl->tpl_vars['value']->value['auditStatus'] == 3) {
                ?>
<img alt="审核不通过" src="http://misc.erp.valsun.cn/img/wrong.png"/><?php 
            }
            ?>
                                    </td>
                                    <td><?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['value']->value['spuCreatedTime'], "Y-m-d H:i");
            ?>
</td>
                                    <td><?php 
            if ($_smarty_tpl->tpl_vars['value']->value['isSingSpu'] == 1) {
                ?>
单料号<?php 
            } else {
                ?>
虚拟料号<?php 
            }
            ?>
</td>
                                    <td>
										<input type="button" onclick="window.location.href = 'index.php?mod=autoCreateSpu&act=scanSpuArchive&spu=<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['spu'];
            ?>
'" value="查看"/>
                                        <input type="button" onclick="window.location.href = 'index.php?mod=autoCreateSpu&act=updateSpuArchive&spu=<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['spu'];
            ?>
'" value="编辑"/>

                                    </td>
                                </tr>
                     <?php 
        }
        ?>
                </table>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
					<?php 
        echo $_smarty_tpl->tpl_vars['show_page']->value;
        ?>

            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
示例#13
0
 public function view_spuHscodeTaxExcelOutPutOn()
 {
     $type = intval($_POST['type']);
     $isOrNot = intval($_POST['isOrNot']);
     if ($type <= 0 || $isOrNot <= 0) {
         //修改为全表导出
         $fileName = "spuAllExcel_" . date('Y-m-d_H:i') . ".xls";
         $excel = new ExportDataExcel('browser', $fileName);
         $excel->initialize();
         $tableHeader = array('SPU', '描述', '类别', '采购材质', '供应商链接', '中文名称', '中文材质', '英文名称', '英文材质', '海关编码', '出口退税率', '进口最惠国税率', '一般税率', '监管条件');
         $excel->addRow($tableHeader);
         $tName = 'pc_goods';
         $select = 'spu,goodsName,goodsCategory';
         $where = "WHERE is_delete=0 group by spu";
         $spuList = OmAvailableModel::getTNameList($tName, $select, $where);
         foreach ($spuList as $value) {
             $tName = 'pc_spu_tax_hscode';
             $select = '*';
             $where = "WHERE spu='{$value['spu']}'";
             $spuHscodeList = OmAvailableModel::getTNameList($tName, $select, $where);
             $purchaseMaterialCNList = isExistForSpuPPV($value['spu'], '材质');
             //采购填写的材质
             $tmpArr = array();
             foreach ($purchaseMaterialCNList as $v) {
                 $tName = 'pc_archive_property_value';
                 $select = 'propertyValue';
                 $where = "WHERE id='{$v['propertyValueId']}'";
                 $tmpArr2 = OmAvailableModel::getTNameList($tName, $select, $where);
                 $tmpArr[] = $tmpArr2[0]['propertyValue'];
             }
             $tName = 'pc_archive_spu_link';
             $select = 'linkUrl';
             $where = "WHERE spu='{$value['spu']}' and linkNote like'供应商%' order by id desc limit 1";
             $paslList = OmAvailableModel::getTNameList($tName, $select, $where);
             $tbodyArray = array();
             $tbodyArray[] = $value['spu'];
             $tbodyArray[] = $value['goodsName'];
             $tbodyArray[] = getAllCateNameByPath($value['goodsCategory']);
             $tbodyArray[] = implode(',', $tmpArr);
             //采购材质
             $tbodyArray[] = $paslList[0]['linkUrl'];
             //供应商链接
             $tbodyArray[] = $spuHscodeList[0]['customsName'];
             $tbodyArray[] = $spuHscodeList[0]['materialCN'];
             $tbodyArray[] = $spuHscodeList[0]['customsNameEN'];
             $tbodyArray[] = $spuHscodeList[0]['materialEN'];
             $tbodyArray[] = $spuHscodeList[0]['hsCode'];
             $tbodyArray[] = $spuHscodeList[0]['exportRebateRate'];
             $tbodyArray[] = $spuHscodeList[0]['importMFNRates'];
             $tbodyArray[] = $spuHscodeList[0]['generalRate'];
             $tbodyArray[] = $spuHscodeList[0]['RegulatoryConditions'];
             $excel->addRow($tbodyArray);
         }
         $excel->finalize();
         exit;
     }
     try {
         if ($isOrNot == 1) {
             //导出有记录的SPU
             $fileName = "spuHscodeTaxExcel_" . date('Y-m-d_H:i') . ".xls";
             $excel = new ExportDataExcel('browser', $fileName);
             $excel->initialize();
             $tableHeader = array('SPU', '中文名称', '中文材质', '英文名称', '英文材质', '海关编码', '出口退税率', '进口最惠国税率', '一般税率', '监管条件');
             $excel->addRow($tableHeader);
             $tName = 'pc_spu_tax_hscode';
             $select = '*';
             if ($type == 1) {
                 //1.中文品名/材质 2.海关编码 3.英文品名/材质
                 $where = "WHERE customsName<>'' and materialCN<>''";
             } elseif ($type == 2) {
                 $where = "WHERE hsCode<>''";
             } elseif ($type == 3) {
                 $where = "WHERE customsNameEN<>'' and materialEN<>''";
             } elseif ($type == 4) {
                 $where = "WHERE customsName<>''";
             }
             $spuHsInfoList = OmAvailableModel::getTNameList($tName, $select, $where);
             foreach ($spuHsInfoList as $value) {
                 $tbodyArray = array();
                 $tbodyArray[] = $value['spu'];
                 $tbodyArray[] = $value['customsName'];
                 $tbodyArray[] = $value['materialCN'];
                 $tbodyArray[] = $value['customsNameEN'];
                 $tbodyArray[] = $value['materialEN'];
                 $tbodyArray[] = $value['hsCode'];
                 $tbodyArray[] = $value['exportRebateRate'];
                 $tbodyArray[] = $value['importMFNRates'];
                 $tbodyArray[] = $value['generalRate'];
                 $tbodyArray[] = $value['RegulatoryConditions'];
                 $excel->addRow($tbodyArray);
             }
             $excel->finalize();
             exit;
         } elseif ($isOrNot == 2) {
             //没记录的SPU
             $fileName = "noExsitspuHscodeTaxExcel_" . date('Y-m-d_H:i') . ".xls";
             $excel = new ExportDataExcel('browser', $fileName);
             $excel->initialize();
             $tableHeader = array('SPU', '描述', '类别');
             $excel->addRow($tableHeader);
             $tName = 'pc_spu_tax_hscode';
             $select = 'spu';
             if ($type == 1) {
                 //1.中文品名/材质 2.海关编码 3.英文品名/材质
                 $where = "WHERE customsName<>'' and materialCN<>''";
             } elseif ($type == 2) {
                 $where = "WHERE hsCode<>''";
             } elseif ($type == 3) {
                 $where = "WHERE customsNameEN<>'' and materialEN<>''";
             } elseif ($type == 4) {
                 $where = "WHERE customsName<>''";
             }
             $spuList = OmAvailableModel::getTNameList($tName, $select, $where);
             $existSpuArr = array();
             foreach ($spuList as $value) {
                 $existSpuArr[] = "'" . $value['spu'] . "'";
             }
             $existSpuStr = implode(',', $existSpuArr);
             $tName = 'pc_spu_archive';
             $select = 'spu,spuName,categoryPath';
             $where = "WHERE is_delete=0 AND auditStatus=2 ";
             if (!empty($existSpuStr)) {
                 $where .= "AND spu not in({$existSpuStr})";
             }
             $spuArchiveList = OmAvailableModel::getTNameList($tName, $select, $where);
             $totalRows = array();
             foreach ($spuArchiveList as $value) {
                 $tbodyArray = array();
                 $tbodyArray[] = $value['spu'];
                 $tbodyArray[] = $value['spuName'];
                 $tbodyArray[] = getAllCateNameByPath($value['categoryPath']);
                 $excel->addRow($tbodyArray);
             }
             $excel->finalize();
             exit;
         } else {
             echo '参数有误!';
             exit;
         }
     } catch (Exception $e) {
         $errorMsg = $e->getMessage();
         error_log(date('Y-m-d_H:i') . "—— {$errorMsg} \r\n", 3, WEB_PATH . "log/spuHsCodeOutPut.txt");
     }
 }
示例#14
0
require_once "/data/htdocs/zhuqingting.dev.com/pc.valsun.cn/framework.php";
require_once "/data/htdocs/zhuqingting.dev.com/pc.valsun.cn/lib/php-export-data.class.php";
Core::getInstance();
session_start();
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set("Asia/Shanghai");
session_cache_expire(30);
//session有效时间为30分钟
$fileName = "/data/htdocs/zhuqingting.dev.com/pc.valsun.cn/html/excel/illSku" . date("Y-m-d_H_i_s") . ".xls";
$tName = 'pc_goods';
$select = 'sku,goodsName,goodsCategory,purchaseId';
$where = "where is_delete=0 and sku not like'MT%'";
$goodsList = OmAvailableModel::getTNameList($tName, $select, $where);
//print_r($goodsList);
//exit;
$excel = new ExportDataExcel('file');
$excel->filename = $fileName;
$excel->initialize();
$excel->addRow(array('sku', '描述', '类别', '采购'));
foreach ($goodsList as $value) {
    $tName = 'pc_goods_category';
    $where = "WHERE path like'{$value['goodsCategory']}-%' and is_delete=0";
    $count = OmAvailableModel::getTNameCount($tName, $where);
    if ($count || empty($value['goodsCategory'])) {
        //不是最小分类,或者无分类
        $personName = getPersonNameById($value['purchaseId']);
        $row = array($value['sku'], $value['goodsName'], empty($value['goodsCategory']) ? '' : getAllCateNameByPath($value['goodsCategory']), $personName);
        $excel->addRow($row);
    }
}
$excel->finalize();