<?php
/****************************************/
/*                                      */
/*  百信卡盟平台联系QQ:84945491         */
/*  淘宝店 http://shop70674652.taobao.com  */
/*  百信卡盟 http://www.caipiaobus.com  */
/*                                      */
/****************************************/

if ( $vd['table'] == 0 )
{
				widget( "head" );
				include( $path_cache.DS."mod_b2b_Shared_head.php" );
				echo "<s";
				echo "tyle>\r\n.search_select {\r\n  width: 154px;\r\n  color: #555;\r\n  height:24px;\r\n  margin: -1px;\r\n  border: 0px solid #B5B8C8;\r\n  font-size: 14px;\r\n  background: #FFF;\r\n}\r\n.search_s {\r\n   width: 152px;\r\n   height:20px;\r\n   float:left;\r\n   padding: 2px;\r\n   margin: 6px 0 0 0px;\r\n   overflow: hidden;\r\n   border: 1px solid #80CCFF;\r\n   background: #fff;\r\n}\r\n.search_s1 {\r\n   width: 152px;\r\n   height:20px;\r\n ";
				echo "  float:left;\r\n   margin: 0;\r\n   overflow: hidden;\r\n   background: #fff;\r\n}\r\n</style>\r\n\r\n<body>\r\n<div class=\"titleDiv\" id=\"titleList\">\r\n<div style=\"float:left\"><a href=\"index.php?a=Home\"><img src=\"";
				echo $vd['sc'];
				echo "images/home.png\" style=\"vertical-align:middle\" border=\"0\"/></a></div><div style=\"float:left;padding-top:8px;padding-left:3px;\"><a href=\"index.php?a=Home\" title=\"回到后台首页\"><font color=\"#000\">桌面</font></a> ";
				echo "<s";
				echo "pan style=\"font-size:7px;\">>></span> <font color=\"#000\">";
				echo $vd['ubzpname'];
				echo "</font> (共对接 <b>";
				echo "<s";
				echo "pan id=\"tol1\">";
				echo $vd['totlerow'];
				echo "</span></b> 个/最多可以对接 ";
				echo "<s";
				echo "pan class=\"dollars\">";
				echo $vd['spnum'];
				echo "</span> 个)\r\n  ";
				echo "<s";
				echo "trong onmouseover=\"showhide(this);\" onmouseout=\"showhide(this);\" style=\"cursor:pointer\">[?]</strong><p style=\"display:none\">\r\n    最多可以对接:<br/>\r\n    也叫同时供货数，就是一个商品可以同时对接的个数，理论上来讲，这个数越大，您的货源越稳定<br/>\r\n  </p>\r\n</div>\r\n<div id=\"contentTip\" style=\"display:none;\"></div>\r\n<div style=\"float:right\"><a href=\"index.php?m=mod_home&a=Help&t=admin_b2b_Category_index\" onFocu";
				echo "s=\"this.blur()\" title=\"查看分类相关帮助\"><img src=\"";
				echo $vd['sc'];
				echo "images/help.gif\" style=\"vertical-align:middle\" border=\"0\"/></a></div>\r\n</div>\r\n<div class=\"mytitle\" id=\"mytitle\">\r\n  <div class=\"titleOp4\" onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"disp('helpdiv')\">";
				echo "<s";
				echo "amp title=\"点击刷新本页刷新数据,并保持原来勾选状态\">\r\n    <div class=\"tipicon\" style=\"padding-top:10px;padding-left:26px;\">帮助</div></samp>\r\n  </div>\r\n  <div class=\"titleOp4\" onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"disp('adddiv')\">";
				echo "<s";
				echo "amp title=\"点击刷新本页刷新数据,并保持原来勾选状态\">\r\n    <div class=\"addicon1\" style=\"padding-top:10px;padding-left:17px;\">添加对接</div></samp>\r\n  </div>\r\n  <div style=\"float:right;padding-top:4px;\">\r\n    <form action=\"index.php?m=mod_b2b&c=sup&optype=pidsearch\" method=\"post\" style=\"margin:0px 0px 0px 0px;\" onsubmit=\"return searchSubmit()\">\r\n    <input type=\"text\" name=\"keywords\" size=\"16\" value=\"\" sty";
				echo "le=\"vertical-align:middle;\" class=\"custsearch\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />\r\n    价格从<input id=\"begsupprice\" size=\"5\" name=\"begsupprice\" style=\"vertical-align:middle;\" />到<input id=\"endsupprice\" size=\"5\" name=\"endsupprice\" style=\"vertical-align:middle;\" /> ";
				echo "<s";
				echo "elect name=\"ptype\" style=\"font-size:14px;vertical-align:middle;\"><option value=\"\">所有商品</option><option value=\"0\">卡密商品</option><option value=\"1\">自动商品</option><option value=\"2\">手动代充</option></select>\r\n    <input type=\"submit\" value=\"货源搜索 &gt;&gt;\" style=\"vertical-align:middle;\" class=\"button\"/>\r\n    </form>\r\n  </div>\r\n</div>\r\n<div id=\"adddiv\" style=\"position:absolute;top:120px;left:230px;;widt";
				echo "h:320px;display:none\">\r\n  <div style=\"padding:20px;background:#F1F5FA;border:5px #75BCD7 solid\">\r\n  <div style=\"font-size:14px;font-weight:bold;padding:5px;padding-top:0px;float:left\">当前商品添加对接</div>\r\n  <div style=\"float:right;\"><img src=\"";
				echo $vd['sc'];
				echo "images/destroy.gif\" onclick=\"disp('adddiv')\" style=\"cursor:pointer\"/></div>\r\n  <form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=sup&a=save\" id=\"cform\">\r\n  <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n    <tr>\r\n      <td width=\"35%\">商品编号</td>\r\n      <td width=\"65%\"><input type=\"text\" name=\"ubzspid\" size=\"20\"/></td>\r\n    </tr>\r\n    <tr>\r\n      <td width=\"35%\">进货优先级</td>";
				echo "\r\n      <td width=\"65%\"><input type=\"text\" name=\"ubzspri\" size=\"20\"/></td>\r\n    </tr>\r\n    <tr>\r\n      <td width=\"35%\"></td>\r\n      <td width=\"65%\">\r\n        <input type=\"hidden\" name=\"ubzpid\" value=\"";
				echo $vd['ubzpid'];
				echo "\"/>\r\n        <input type=\"submit\" name=\"Submit\" value=\"添 加\" class=\"button\"/>\r\n        <input type=\"button\" name=\"Submit\" value=\"取 消\" onclick=\"disp('adddiv')\" class=\"button\"/>\r\n      </td>\r\n    </tr>\r\n  </table>\r\n  </form>\r\n  </div>\r\n</div>\r\n\r\n<div id=\"helpdiv\" style=\"position:absolute;top:5px;left:30px;;width:800px;display:none\">\r\n  <div style=\"padding:20px;background:#F1F5FA;border:5px #75BCD7 solid\">\r";
				echo "\n  <div style=\"font-size:14px;font-weight:bold;padding:5px;float:left\">给商品添加对接</div>\r\n  <div style=\"float:right;\"><img src=\"";
				echo $vd['sc'];
				echo "images/destroy.gif\" onclick=\"disp('helpdiv')\" style=\"cursor:pointer\"/></div>\r\n  <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n    <tr> \r\n      <td style=\"font-size:12px;line-height:19px\">\r\n        <b>操作注意事项及说明(<font color=\"#ff0000\">请确保您的百信卡盟商户有足够的余额进货,否则只能从自己的库存提卡</font>)</b>\r\n        <font color=\"#FF6600\"><br/>\r\n        [1]商品进货管理主要负责商品从?;
				echo "稳私?何处进货以及进货优先秩序的.<br/>\r\n        [2]每一个商品默认最多一个供货商品,如果一个商品需要多个供货商同时供货,您可以购买百信卡盟的增值服务.<br/>\r\n        [3]如果自己库存充足,则优先从自己库存提取,当不足以满足客户总提取量时,才会从供货商品处提取.<br/>\r\n        [4]供货商品优先级对应数字越低,则优先级越高,表示提取库存的时候商品更优先从此供货商品进货.<br/>\r\n        比如您目前有供货商品3个,其编号为888,";
				echo "666,688,您给它们设定的优先级分别为3,1,2.那么系统就会从优先级最高的商品进货,<br/>\r\n        也就是1对应的商品,即编号为666的商品,如果666编号商品库存不足以发货,则会从下一个优先级进货,即编号为688的商品,依此类推<br/>\r\n      </font>\r\n      <b>操作步骤</b>\r\n        <font color=\"#FF6600\"><br/>\r\n        第一步：点击<a href=\"index.php?m=mod_b2b&c=Sup&a=Search\">联售系统</a>,输入您要搜索的关键词,供货系统会列举出当前可?;
				echo "┠≡竦墓┗跎唐?br/>\r\n        第二步：复制对应供货商品的<b>商品编号</b><br/>\r\n        第三步：回到本页面，点击添加对接，把您复制的<b>商品编号</b>填入上边的<b>商品编号框</b>,填写好进货优先级,然后点击“添加“按钮即可<br/>\r\n      </font>\r\n      <b>商品进货列表说明</b>\r\n        <font color=\"#FF6600\"><br/>\r\n        商品编号：供货商品的商品编号<br/>\r\n        商品名称：供货商品的商品名称<br/>\r\n        供 货 商：商品的";
				echo "供货商<br/>\r\n        最低售价：供货商允许的最低销售价,就是说您的一级会员售价不能低于此价售出,否则供货商将授权系统停止给您供卡,直至您调整价格<br/>\r\n        进货审核：供货商是否允许您使用这个供货商品,<b>审核通过</b>表示供货商已经允许您使用,否则表示供货商还在审核您的进货权限<br/>\r\n        进货优先级：供货商品的进货优先级<br/>\r\n        进 货 价：供货商给您的进货价<br/>\r\n        商品最近修改:供货商最近修改商?;
				echo "返氖奔?方便您对它们价格的跟进,以决定是否进货以及进货优先级<br/>\r\n        是否删除：点击删除链接,即可删除供货商品,删除后,您的商品不再从此供货商品进货,除非重新添加<br/>\r\n        编辑：即时修改当前的列表项,修改供货商品编号或者优先级后,点击编辑即可完成修改\r\n      </font>\r\n      </td>\r\n    </tr>\r\n  </table>\r\n  </div>\r\n</div>\r\n\r\n<div id=\"menuMask\" class=\"menuMask\" style=\"display:none\">\r\n  <form action=\"?m=mod_b2";
				echo "b&c=Tpl&tpl=Sup&v=Sup\" method=\"post\" style=\"margin:0px\">\r\n  <div class=\"menuContent\">\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tid\" id=\"tid\" class=\"checkbox\" onFocus='this.blur()'/> 商品编号<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tordering\" id=\"tordering\" class=\"checkbox\" onFocus='this.blur()'/> 商品名称<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tpics\" id=\"tpics\" class=\"checkbox\" ";
				echo "onFocus='this.blur()'/> 供货商<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tname\" id=\"tname\" class=\"checkbox\" onFocus='this.blur()'/> 进货审核<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tabst\" id=\"tabst\" class=\"checkbox\" onFocus='this.blur()'/> 进货优先级<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tfee\" id=\"tfee\" class=\"checkbox\" onFocus='this.blur()'/> 进货价<br/>\r\n  <input type=\"chec";
				echo "kbox\" name=\"id[]\" value=\"tcode\" id=\"tcode\" class=\"checkbox\" onFocus='this.blur()'/> 最低售价<br/>\r\n  </div>\r\n  <div class=\"menuOp\">\r\n  <input type=\"submit\" value=\"保存\" class=\"button\" disabled />\r\n  <input type=\"button\" value=\"重置\" class=\"button\" disabled onclick=\"tInfoReset()\"/>\r\n  <input type=\"button\" value=\"取消\" class=\"button\" onclick=\"setMenuMask()\"/>\r\n  </div>\r\n  </form>\r\n</div>\r\n\r\n<table id=\"thead\" ";
				echo "border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td width=\"30px\">\r\n      <input name=\"chkall\" id=\"chkall\" type=\"checkbox\" class=\"checkbox\" onclick=\"CheckAll(this)\" onFocus='this.blur()' disabled /></td>\r\n";
				echo "<td width=\"70px\"><b>商品编号</b></td>\r\n<td width=\"200px\"><b>商品名称</b></td>\r\n<td width=\"80px\"><b>供货商</b></td>\r\n<td width=\"60px\"><b>进货审核</b></td>\r\n<td width=\"80px\"><b>进货优先级</b></td>\r\n<td width=\"70px\"><b>进货价</b></td>\r\n<td width=\"70px\"><b>最低售价</b></td>\r\n<td width=\"80px\"><b>删除</b></td>\r\n<td width=\"50px\"><b>编辑</b></td>\n";
				echo "    <td class=\"endtd\">\r\n      <div class=\"infoicon\" style=\"color:#ccc\"><b><u>>></u></b></div>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<div id=\"tip\" style=\"display:none\">\r\n  ";
				echo "<s";
				echo "pan id=\"tiptable\">此页中所有 <b>";
				echo "<s";
				echo "pan id=\"ncheck\">";
				echo $vd['nrows'] < $vd['totlerow'] ? $vd['nrows'] : $vd['totlerow'];
				echo "</span></b> 条记录已选中 </span> \r\n  ";
				echo "<s";
				echo "pan id=\"tipspan\">\r\n    <a href=\"javascript:CheckTotle(";
				echo $vd['totlerow'];
				echo ",0)\">点此选择当前列表中所有 <b>";
				echo $vd['totlerow'];
				echo "</b> 条记录>></a>\r\n  </span>\r\n</div>\r\n<div id=\"content\">\r\n";
}
echo "  ";
if ( $vd['totlerow'] == 0 )
{
				echo "  <table  width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td align=\"right\" colspan=\"20\">无任何记录</td>\r\n  </tr>\r\n  </table>\r\n  ";
}
echo "  <table id=\"tbody\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  \r\n  ";
foreach ( $vd['items'] as $item )
{
				echo "  <form name=\"form1\" method=\"post\" action=\"";
				if ( $vd['noack'] == 0 )
				{
								echo "index.php?m=mod_b2b&c=sup&a=save";
				}
				else
				{
								echo "#";
				}
				echo "\">\r\n  <tr>\r\n    <td width=\"30px\">\r\n      <input type=\"checkbox\" name=\"id[]\" id=\"idchk_";
				echo $item['ubzepid'];
				echo "\" class=\"checkbox\" value=\"";
				echo $item['id'];
				echo "\" onclick=\"CheckThis(this)\" onFocus='this.blur()'  disabled ></input>\r\n    </td>\r\n    ";
				echo "    <td width=\"70px\">\r\n    <input type=\"text\" name=\"ubzspid\" size=\"5\" value=\"";
				echo $item['ubzspid'];
				echo "\" />\r\n    </td>\r\n    <td width=\"200px\" style=\"font-size:12px;\">";
				echo $item['ubzspname'];
				echo " </td>\r\n    <td width=\"80px\"  style=\"font-size:12px;\">";
				echo $item['ubzsuid'];
				echo "          (<a href=\"javascript:openScript('index.php?m=mod_b2b&c=sup&a=GetSupplier&ubzpid=";
				echo $vd['ubzpid'];
				echo "&ubzuuid=";
				echo $item['ubzsuid'];
				echo "','',692,390);\"><font color=\"#00875A\">查看</font></a>)</td>\r\n    <td width=\"60px\">";
				echo $item['ubzspok'];
				echo "</td>\r\n    <td width=\"80px\">\r\n    <input type=\"text\" name=\"ubzspri\" size=\"5\" value=\"";
				echo $item['ubzspri'];
				echo "\" />\r\n    </td>\r\n    <td width=\"70px\">";
				echo $item['ubzsupprice'];
				echo "</td>\r\n    <td width=\"70px\">";
				echo $item['ubzctrlprice'];
				echo "</td>\r\n    <td width=\"80px\">\r\n      ";
				if ( $vd['noack'] == 0 )
				{
								echo "    <a href=\"index.php?m=mod_b2b&c=sup&a=del&ubzepid=";
								echo $item['ubzepid'];
								echo "&ubzpid=";
								echo $vd['ubzpid'];
								echo "\">\r\n          删除此供货\r\n          </a>\r\n      ";
				}
				else
				{
								echo "      --\r\n      ";
				}
				echo "    </td>\r\n    <td width=\"50px\">\r\n    <input type=\"hidden\" name=\"ubzepid\" value=\"";
				echo $item['ubzepid'];
				echo "\" />\r\n    <input type=\"hidden\" name=\"ubzpid\" value=\"";
				echo $vd['ubzpid'];
				echo "\" />\r\n    <input value=\"修改\" type=\"submit\" class=\"button\" ";
				if ( $vd['noack'] == 0 )
				{
				}
				else
				{
								echo "disabled";
				}
				echo "/>\r\n    </td>\r\n    ";
				echo "    <td class=\"endtd\"></td>\r\n  </tr>\r\n  </form>\r\n  ";
}
echo "  \r\n</table>\r\n<input type=\"hidden\" value=\"";
echo $vd['totlepage'];
echo "\" id=\"totlePage\"/>\r\n<input type=\"hidden\" value=\"";
echo $vd['thispage'];
echo "\" id=\"thisPage\"/>\r\n";
if ( $vd['table'] == 0 )
{
				echo "</div>\r\n\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=sup&a=Deals&";
				echo $vd['op'];
				echo "\" id=\"op\"/>\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=sup&a=sup&istable=1&";
				echo $vd['op'];
				echo "\" id=\"url\"/>\r\n<input type=\"hidden\" value=\"";
				echo $vd['op'];
				echo "\" id=\"params\"/>\r\n<div style=\"position:absolute;bottom:0px\">\r\n  <div class=\"tbBottom\" id=\"tbBottom\">\r\n    <div style=\"float:left;padding-top:8px;\">\r\n      ";
				echo "<s";
				echo "trong> 总计 <font color=\"#ff0000\">";
				echo "<s";
				echo "pan id=\"tol2\">";
				echo $vd['totlerow'];
				echo "</span></font> 条</strong>\r\n    </div>\r\n    <div style=\"float:right;text-align:right;\">\r\n    <form id=\"actionform\" method=\"post\" action=\"index.php?m=mod_b2b&c=sup&a=sup&";
				echo $vd['op'];
				echo "\" style=\"margin:0px;\" onsubmit=\"loadDisp(1)\">\r\n    <div id=\"page\"></div>\r\n    <div style=\"float:left;margin-top:3px\">\r\n      每页显示<input type=\"text\" name=\"nrows\" size=\"2\" value=\"";
				echo $vd['nrows'];
				echo "\" class=\"pagetxt\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" /> 个 \r\n      到第<input type=\"text\" name=\"page\" size=\"2\" value=\"";
				echo $vd['thispage'];
				echo "\" class=\"pagetxt\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />页<input type=\"submit\" value=\" 确 定 &gt;&gt;\" class=\"pagesub\" />\r\n    </div>\r\n    </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n<div id=\"load\" style=\"display:none;\">\r\n  <div id=\"loadcontent\" >页面加载中请稍等...</div>\r\n</div>\r\n</body>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//第一参数，后边保留显示的列数\r\n//第二参数，除最后一个参数外的保留参数的总宽度\r\ntRows   = ";
				echo $vd['nrows'] < $vd['totlerow'] ? $vd['nrows'] : $vd['totlerow'];
				echo ";\r\ntInfoA  = Array(0,0);\r\ntotleRows = ";
				echo $vd['totlerow'];
				echo ";\r\ndeltxt  = \"销毁分类后,是无法恢复的,只能重新添加,您确定进行销毁操作吗？\";\r\nthisaction = \"销毁\";\r\nthisdel = 0;\r\nstatistics = 0;\r\nvar resizeidx = 2;\r\n</script>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//当前表格配置\r\n";
				echo " tInfo = Array('tid','tordering','tpics','tname','tabst','tfee','tcode');\n";
				echo "function pickcolor(id) \r\n{\r\n  var color = showModalDialog(\"";
				echo $vd['sc'];
				echo "tools/colorselect.htm\", \"\", \"font-family:Verdana; font-size:12; status:no; dialogWidth:21em; dialogHeight:21em\");\r\n  if (color != null) \r\n  {\r\n    \$(\"colorexample\"+id).style.backgroundColor = color;\r\n    \$(\"textcolor\"+id).value = color;\r\n  }\r\n}\r\n\r\n</script>\r\n";
				echo "<s";
				echo "cript src=\"";
				echo $vd['sc'];
				echo "js/tools.js\" type=\"text/javascript\"></script>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\nfunction setct(val)\r\n{\r\n  \$(\"cttr\").style.display = val == 3 ? \"\" : \"none\";\r\n}\r\n";
				if ( 0 < $vd['noack'] )
				{
								echo "alert('您在供货系统中有订单正在交易处理中，交易结束后方可操作对接');";
				}
				echo "</script>\r\n</html>\r\n";
}
?>
