本文整理汇总了PHP中OmAvailableModel::getParterNameBySku方法的典型用法代码示例。如果您正苦于以下问题:PHP OmAvailableModel::getParterNameBySku方法的具体用法?PHP OmAvailableModel::getParterNameBySku怎么用?PHP OmAvailableModel::getParterNameBySku使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OmAvailableModel
的用法示例。
在下文中一共展示了OmAvailableModel::getParterNameBySku方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content_526616b983b8b3_14494234
//.........这里部分代码省略.........
-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
}
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:6389f3c33c3dbade980a246257c1b0d8286c94f1.file.goodsList.htm.php
示例2: view_getGoodsList
public function view_getGoodsList()
{
//调用action层, 获取列表数据
$GoodsAct = new GoodsAct();
$flag = false;
$userId = $_SESSION['userId'];
$seachdata = isset($_GET['seachdata']) ? post_check($_GET['seachdata']) : '';
$searchs = isset($_GET['searchs']) ? $_GET['searchs'] : '';
$isNew = isset($_GET['isNew']) ? $_GET['isNew'] : '';
$pid = isset($_GET['pid']) ? $_GET['pid'] : '';
$purchaseId = isset($_GET['purchaseId']) ? $_GET['purchaseId'] : '';
$goodsStatus = intval(isset($_GET['goodsStatus']) ? $_GET['goodsStatus'] : '');
$where = 'where is_delete=0 ';
if (intval($searchs) != 0 && !empty($seachdata)) {
if ($searchs == 1) {
$where .= "and spu='{$seachdata}' ";
$flag = true;
} elseif ($searchs == 2) {
$where .= "and sku='{$seachdata}' ";
$flag = true;
}
}
if ($isNew) {
if ($isNew == 1) {
$where .= "and isNew='1' ";
$flag = true;
} elseif ($isNew == 2) {
$where .= "and isNew='0' ";
$flag = true;
}
}
if ($pid) {
//$where .= "and goodsCategory like'$pid%' ";//有bug
$where .= "AND goodsCategory REGEXP '^{$pid}(-[0-9]+)*\$' ";
$flag = true;
}
if (intval($purchaseId) > 0) {
$where .= "and purchaseId='{$purchaseId}' ";
$flag = true;
}
if ($goodsStatus > 0) {
$where .= "and goodsStatus='{$goodsStatus}' ";
$flag = true;
}
$total = $GoodsAct->act_getGoodsListNum($where);
$num = 50;
//每页显示的个数
$page = new Page($total, $num, '', 'CN');
$select = '*';
$where .= "order by sku desc " . $page->limit;
if ($flag == false) {
$productList = $GoodsAct->act_getGoodsListNum('WHERE 1=0');
} else {
$productList = $GoodsAct->act_getGoodsList($select, $where);
}
if (!empty($productList)) {
$countPro = count($productList);
for ($i = 0; $i < $countPro; $i++) {
if ($productList[$i]['purchaseId'] == $userId) {
//登陆人员和采购是同一个人的时候,才显示供应商
$productList[$i]['supplier'] = OmAvailableModel::getParterNameBySku($productList[$i]['sku']);
}
if ($i > 0 && $productList[$i]['spu'] == $productList[$i - 1]['spu']) {
$productList[$i]['visibleSpu'] = '';
} else {
$productList[$i]['visibleSpu'] = $productList[$i]['spu'];
}
}
}
if (!empty($_GET['page'])) {
if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
$n = 1;
} else {
$n = (intval($_GET['page']) - 1) * $num + 1;
}
} else {
$n = 1;
}
if ($total > $num) {
//输出分页显示
$show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
} else {
$show_page = $page->fpage(array(0, 2, 3));
}
$pidArr = explode('-', $pid);
$navlist = array(array('url' => 'index.php?mod=goods&act=getGoodsList', 'title' => '产品信息'), array('url' => 'index.php?mod=goods&act=getGoodsList', 'title' => '产品信息列表'));
$this->smarty->assign('navlist', $navlist);
$this->smarty->assign('onevar', 1);
$this->smarty->assign('twovar', 11);
$this->smarty->assign('show_page', $show_page);
$this->smarty->assign('title', '产品列表');
$this->smarty->assign('pidArr', $pidArr);
$this->smarty->assign('productList', empty($productList) ? array() : $productList);
$this->smarty->display("goodsList.htm");
}