EcShop充值卡功能插件(5)

这段是最有意思的部分,写后台模板

admin/templates
创建文件
ks_card_goods_list.htm

<!-- $Id: goods_list.htm 15908 2009-05-05 09:22:04Z liuhui $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}

<!-- 商品搜索 -->
<div class="form-div">
  <form action="javascript:searchGoods()" name="searchForm">
      <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
      {if $smarty.get.act neq "trash"}
      <!-- 分类 -->
      <select name="cat_id"><option value="0">所有分类</option>{$cat_list}</select>
      <!-- 品牌 -->
      <select name="brand_id"><option value="0">所有品牌</option>{html_options options=$brand_list}</select>
      <!-- 推荐 -->
      <select name="intro_type"><option value="0">全部</option>{html_options options=$intro_list selected=$smarty.get.intro_type}</select>
      {/if}
      <!-- 关键字 -->
      关键字 <input type="text" name="keyword" size="15" />
      <input type="hidden" name="tid" value="{$type_id}" />
      <input type="submit" value="搜索" class="button" />
  </form>
</div>

{literal}
<script language="JavaScript">
      function searchGoods()
      {
{/literal}
              {if $smarty.get.act neq "trash"}
              listTable.filter['cat_id'] = document.forms['searchForm'].elements['cat_id'].value;
              listTable.filter['brand_id'] = document.forms['searchForm'].elements['brand_id'].value;
              listTable.filter['intro_type'] = document.forms['searchForm'].elements['intro_type'].value;
              {/if}
{literal}
              listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
              listTable.filter['page'] = 1;
              listTable.filter['tid'] = document.forms['searchForm'].elements['tid'].value;
              listTable.loadList();
      }
</script>
{/literal}
<!-- 商品列表 -->
<form method="post" action="" name="listForm" οnsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
      <th>
        编号
      </th>
      <th>商品名称</th>
      <th>货号</th>
      <th>价格</th>
      {if $use_storage}
      <th>库存</th>
      {/if}
      <th>操作</th>
  <tr>
  {foreach from=$goods_list item=goods}
  <tr>
      <td>{$goods.goods_id}</td>
      <td class="first-cell" style="{if $goods.is_promote}color:red;{/if}"><a href="/goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name|escape:html}</a></td>
      <td>{$goods.goods_sn}</td>
      <td align="right">{$goods.shop_price}</td>
      {if $use_storage}
      <td align="right">{if $code eq 'virtual_card'}{$goods.goods_number}{else}{$goods.goods_number}{/if}</td>
      {/if}
      <td align="center">
          <a href="ks_card_goods.php?act=addgood&id={$goods.goods_id}&tid={$type_id}">设置关联</a>
      </td>
  </tr>
  {foreachelse}
  <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
  {/foreach}
</table>
<!-- end goods list -->

<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
      <td align="right" nowrap="true">
      {include file="page.htm"}
      </td>
  </tr>
</table>

{if $full_page}
</div>

</form>

<script type="text/javascript">
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
      startCheckOrder(); // 开始检查订单
      document.forms['listForm'].reset();
  }

 
  function confirmSubmit(frm, ext)
  {
          if (frm.elements['type'].value == 'trash')
          {
                  return confirm(batch_trash_confirm);
          }
          else if (frm.elements['type'].value == 'not_on_sale')
          {
                  return confirm(batch_no_on_sale);
          }
          else if (frm.elements['type'].value == 'move_to')
          {
                  ext = (ext == undefined) ? true : ext;
                  return ext && frm.elements['target_cat'].value != 0;
          }
          else if (frm.elements['type'].value == '')
          {
                  return false;
          }
          else
          {
                  return true;
          }
  }

  function changeAction()
  {
          var frm = document.forms['listForm'];

          // 切换分类列表的显示
          frm.elements['target_cat'].style.display = frm.elements['type'].value == 'move_to' ? '' : 'none';

          if (!document.getElementByIdx_x_x('btnSubmit').disabled &&
                  confirmSubmit(frm, false))
          {
                  frm.submit();
          }
  }
{/literal}
</script>
{include file="pagefooter.htm"}
{/if}

创建
ks_card_list.htm

<!-- $Id: bonus_type.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
<h1>页码:  {$pages}</h1>
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- start bonus_type list -->
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}

  <table cellpadding="3" cellspacing="1">
      <tr>
          <th>编号</th>
          <th>礼品卡类型</th>
          <th>礼品卡序号</th>
          <th>礼品卡密码</th>
          <th>创建时间</th>
          <th>使用时间</th>
          <th>操作</th>
      </tr>
      {foreach from=$type_list item=type}
      <tr>
          <td align="center" class="first-cell"><span>{$type.id}</span></td>
          <td align="center">{$type.type_name}</td>
          <td align="center">{$type.card_sn}</td>
          <td align="center">{$type.card_pwd}</td>
          <td align="center">{$type.add_time}</td>
          <td align="center">{if $type.used_time eq '0'}未使用{else}{$type.used_time}{/if}</td>
          <td align="center">
                {if $type.order_id neq '0'}
              <a href="ks_card.php?act=order&id={$type.order_id}">订单</a> |
              {/if}
              <a href="ks_card.php?act=edit_card_type&cid={$type.id}&tid={$type.type_id}">编辑</a> |
              <a href="ks_card.php?act=delsn&amp;id={$type.id}&tid={$type.type_id}">作废</a></span></td>
      </tr>
          {foreachelse}
      <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
          {/foreach}

  </table>

{if $full_page}
</div>
</form>
<!-- end bonus_type list -->

<script type="text/javascript" language="JavaScript">
<!--
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
        // 开始检查订单
        startCheckOrder();
  }
  {/literal}
//-->
</script>
{include file="pagefooter.htm"}
{/if}

创建
ks_card_type.htm

<!-- $Id: bonus_type.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- start bonus_type list -->
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}

  <table cellpadding="3" cellspacing="1">
      <tr>
          <th>礼品卡类型</th>
          <th>类型标识</th>
          <th>描述</th>
          <th>可选择数</th>
          <th>发放数量</th>
          <th>使用数量</th>
          <th>操作</th>
      </tr>
      {foreach from=$type_list item=type}
      <tr>
          <td class="first-cell"><span>{$type.cat_name|escape:html}</span></td>
          <td>{$type.cat_mark}</td>
          <td>{$type.cat_desc}</td>
          <td align="right"><span>{$type.cat_sgn}</span></td>
          <td align="right"><span>{$type.all_num}</span></td>
          <td align="right">{$type.ok_num}</td>
          <td align="center">
                <a href="ks_card.php?act=excel&tid={$type.cat_id}">发放</a> |
              <a href="ks_card_goods.php?act=goods&tid={$type.cat_id}">添加</a> |
              <a href="ks_card_goods.php?act=vgoods&tid={$type.cat_id}">商品</a> |
              <a href="ks_card.php?act=list&amp;tid={$type.cat_id}">卡号</a> |
              <a href="ks_card.php?act=edit&amp;tid={$type.cat_id}">编辑</a> |
              <a href="ks_card.php?act=remove&amp;tid={$type.cat_id}">移除</a></span></td>
      </tr>
          {foreachelse}
      <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
          {/foreach}

  </table>

{if $full_page}
</div>
</form>
<!-- end bonus_type list -->

<script type="text/javascript" language="JavaScript">
<!--
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
        // 开始检查订单
        startCheckOrder();
  }
  {/literal}
//-->
</script>
{include file="pagefooter.htm"}
{/if}

创建
ks_card_type_info.htm

<!-- $Id: bonus_type_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->

<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />

{include file="pageheader.htm"}
<div class="main-div">
<form action="ks_card.php" method="post" name="theForm" enctype="multipart/form-data" οnsubmit="return validate()">
<table width="100%">
  <tr>
      <td class="label">类型名称</td>
      <td>
          <input type='text' name='type_name' maxlength="30" value="{$bonus_arr.cat_name}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">
          <a href="javascript:showNotice('Type_money_a');" title="{$lang.form_notice}">
          <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>类型标识</td>
      <td>
      <input type="text" name="type_mark" value="{$bonus_arr.cat_mark}" size="20" />
      <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="Type_money_a">类型标识是礼品卡序号前缀.例:某个礼品卡序号为:PPOK332255,那么PPOK可能是类型标识.用来通过标识直观获取礼品卡类型,方便使用与管理.</span>      </td>
  </tr>
  <tr>
      <td class="label"><a href="javascript:showNotice('NoticeMinGoodsAmount');" title="{$lang.form_notice}"> <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}" /></a>类型描述</td>
      <td><textarea name="type_desc" type="text" rows="3" cols="20">{$bonus_arr.cat_desc}</textarea>
      <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="NoticeMinGoodsAmount">礼品卡类型注释,便于记忆.</span> </td>
  </tr>
  <tr>
      <td class="label"><a href="javascript:showNotice('SelNum');" title="{$lang.form_notice}"> <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}" /></a>可选择量</td>
      <td><input name="type_num" type="text" value="{$bonus_arr.cat_sgn}" maxlength="2" size="20" />
      <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="SelNum">礼品5选几,4选几.</span> </td>
  </tr>
  <tr>
      <td class="label">&nbsp;</td>
      <td>
          <input type="submit" value="{$lang.button_submit}" class="button" />
          <input type="reset" value="{$lang.button_reset}" class="button" />
          <input type="hidden" name="act" value="{$form_act}" />
          <input type="hidden" name="type_id" value="{$bonus_arr.cat_id}" />      </td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="javascript">
<!--
document.forms['theForm'].elements['type_name'].focus();

function validate()
{
  validator = new Validator("theForm");
  validator.required("type_name",          "类型名为空");
  validator.required("type_mark",          "标识为空");
  validator.required("type_num",            "可选量为空");
  validator.isNumber("type_num",            "可选量必须是数字", true);

  return validator.passed();
}
onload = function()
{
  {/literal}
  get_value = '{$bonus_arr.send_type}';
  {literal}

  showunit(get_value)
  // 开始检查订单
  startCheckOrder();
}

function gObj(obj)
{
  var theObj;
  if (document.getElementByIdx_x_x)
  {
      if (typeof obj=="string") {
          return document.getElementByIdx_x_x(obj);
      } else {
          return obj.style;
      }
  }
  return null;
}

function showunit(get_value)
{
  gObj("1").style.display =  (get_value == 2) ? "" : "none";
  document.forms['theForm'].elements['selbtn1'].disabled  = (get_value != 1 && get_value != 2);
  document.forms['theForm'].elements['selbtn2'].disabled  = (get_value != 1 && get_value != 2);

  return;
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}

创建
ks_card_vgoods_list.htm

<!-- $Id: goods_list.htm 15908 2009-05-05 09:22:04Z liuhui $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}

<form method="post" action="" name="listForm" οnsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
      <th>
        编号
      </th>
      <th>商品名称</th>
      <th>货号</th>
      <th>价格</th>
      {if $use_storage}
      <th>库存</th>
      {/if}
      <th>操作</th>
  <tr>
  {foreach from=$goods_list item=goods}
  <tr>
      <td>{$goods.goods_id}</td>
      <td class="first-cell" style="{if $goods.is_promote}color:red;{/if}"><a href="/goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name|escape:html}</a></td>
      <td>{$goods.goods_sn}</td>
      <td align="right">{$goods.shop_price}</td>
      {if $use_storage}
      <td align="right">{if $code eq 'virtual_card'}{$goods.goods_number}{else}{$goods.goods_number}{/if}</td>
      {/if}
      <td align="center">
          <a href="ks_card_goods.php?act=delgood&id={$goods.id}&tid={$type_id}">删除关联</a>
      </td>
  </tr>
  {foreachelse}
  <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
  {/foreach}
</table>
<!-- end goods list -->

{if $full_page}
</div>

</form>

<script type="text/javascript">
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
      startCheckOrder(); // 开始检查订单
      document.forms['listForm'].reset();
  }

 
  function confirmSubmit(frm, ext)
  {
          if (frm.elements['type'].value == 'trash')
          {
                  return confirm(batch_trash_confirm);
          }
          else if (frm.elements['type'].value == 'not_on_sale')
          {
                  return confirm(batch_no_on_sale);
          }
          else if (frm.elements['type'].value == 'move_to')
          {
                  ext = (ext == undefined) ? true : ext;
                  return ext && frm.elements['target_cat'].value != 0;
          }
          else if (frm.elements['type'].value == '')
          {
                  return false;
          }
          else
          {
                  return true;
          }
  }

  function changeAction()
  {
          var frm = document.forms['listForm'];

          // 切换分类列表的显示
          frm.elements['target_cat'].style.display = frm.elements['type'].value == 'move_to' ? '' : 'none';

          if (!document.getElementByIdx_x_x('btnSubmit').disabled &&
                  confirmSubmit(frm, false))
          {
                  frm.submit();
          }
  }
{/literal}
</script>
{include file="pagefooter.htm"}
{/if}

创建

ks_edit_card.htm

<!-- $Id: bonus_type_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->

<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />

{include file="pageheader.htm"}
<div class="main-div">
<form action="ks_card.php" method="post" name="theForm" enctype="multipart/form-data" οnsubmit="return validate()">
<table width="100%">
  <tr>
      <td class="label">初始序号</td>
      <td>
          <input type='text' name='bnum' maxlength="30" value="0" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">生成数量</td>
      <td>
          <input type='text' name='cnum' maxlength="30" value="10" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">&nbsp;</td>
      <td>
          <input type="submit" value="生成" class="button" />
          <input type="hidden" name="act" value="{$form_act}" />
          <input type="hidden" name="tid" value="{$type_id}" />
      </td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="javascript">
<!--
document.forms['theForm'].elements['type_name'].focus();

function validate()
{
  validator = new Validator("theForm");
  validator.required("bnum",                "序号为空");
  validator.required("cnum",          "数量为空");

  return validator.passed();
}
onload = function()
{
  {/literal}
  get_value = '{$bonus_arr.send_type}';
  {literal}

  showunit(get_value)
  // 开始检查订单
  startCheckOrder();
}

function gObj(obj)
{
  var theObj;
  if (document.getElementByIdx_x_x)
  {
      if (typeof obj=="string") {
          return document.getElementByIdx_x_x(obj);
      } else {
          return obj.style;
      }
  }
  return null;
}

function showunit(get_value)
{
  gObj("1").style.display =  (get_value == 2) ? "" : "none";
  document.forms['theForm'].elements['selbtn1'].disabled  = (get_value != 1 && get_value != 2);
  document.forms['theForm'].elements['selbtn2'].disabled  = (get_value != 1 && get_value != 2);

  return;
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}


创建

ks_edit_card_type.htm

<!-- $Id: bonus_type_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->

<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />

{include file="pageheader.htm"}
<div class="main-div">
<form action="ks_card.php" method="post" name="theForm" enctype="multipart/form-data" οnsubmit="return validate()">
<table width="100%">
  <tr>
      <td class="label">礼品卡类别</td>
      <td>
          <select name='card_type'>
                <option value='{$card_type}' selected>{$card_name}</option>
                {foreach from=$type_list item=type}
<option value='{$type.cat_id}'>{$type.cat_name}</option>
  {/foreach}
</select>
          </td>
  </tr>
  <tr>
      <td class="label">&nbsp;</td>
      <td>
          <input type="submit" value="修改" class="button" />
          <input type="hidden" name="act" value="{$form_act}" />
          <input type="hidden" name="cid" value="{$card_id}" />
      </td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="javascript">
<!--
document.forms['theForm'].elements['type_name'].focus();

function validate()
{
  validator = new Validator("theForm");
  validator.required("card_type",                "礼品卡分类为空");

  return validator.passed();
}
onload = function()
{
  {/literal}
  get_value = '{$bonus_arr.send_type}';
  {literal}

  showunit(get_value)
  // 开始检查订单
  startCheckOrder();
}

function gObj(obj)
{
  var theObj;
  if (document.getElementByIdx_x_x)
  {
      if (typeof obj=="string") {
          return document.getElementByIdx_x_x(obj);
      } else {
          return obj.style;
      }
  }
  return null;
}

function showunit(get_value)
{
  gObj("1").style.display =  (get_value == 2) ? "" : "none";
  document.forms['theForm'].elements['selbtn1'].disabled  = (get_value != 1 && get_value != 2);
  document.forms['theForm'].elements['selbtn2'].disabled  = (get_value != 1 && get_value != 2);

  return;
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}

创建
ks_order_goods.htm

<!-- $Id: bonus_type.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- start bonus_type list -->
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}

  <table cellpadding="3" cellspacing="1">
      <tr>
          <th>编号</th>
          <th>货号</th>
          <th>名字</th>
      </tr>
      {foreach from=$type_list item=type}
      <tr>
          <td align="center" class="first-cell"><span>{$type.goods_id}</span></td>
          <td align="center">{$type.goods_sn}</td>
          <td align="center"><a href="/goods.php?id={$type.goods_id}" target="_blank">{$type.goods_name}</a></td>
      </tr>
          {foreachelse}
      <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
          {/foreach}

  </table>

{if $full_page}
</div>
</form>
<!-- end bonus_type list -->

<script type="text/javascript" language="JavaScript">
<!--
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
        // 开始检查订单
        startCheckOrder();
  }
  {/literal}
//-->
</script>
{include file="pagefooter.htm"}
{/if}

创建

ks_order_info.htm

<!-- $Id: bonus_type_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->

<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />

{include file="pageheader.htm"}
<div class="main-div">
<form action="ks_card.php" method="post" name="theForm" enctype="multipart/form-data" οnsubmit="return validate()">
<table width="100%">
      <tr>
      <td class="label">编号</td>
      <td>
          <input disabled="true" readOnly="true" type='text' name='order_id' maxlength="30" value="{$order.order_id}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">订单号</td>
      <td>
          <input disabled="true" readOnly="true" type='text' name='order_sn' maxlength="30" value="{$order.order_sn}" size='20' />      </td>
  </tr>
    <tr>
      <td class="label">礼品卡分类</td>
      <td>
          <input disabled="true" readOnly="true" type='text' name='order_goodcatid' maxlength="30" value="{$order.order_goodcatid}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">联系人</td>
      <td>
          <input type='text' name='order_user' maxlength="30" value="{$order.order_user}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">联系地址</td>
      <td>
          <input type='text' name='order_address' maxlength="30" value="{$order.order_address}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">联系电话</td>
      <td>
          <input type='text' name='order_tel' maxlength="30" value="{$order.order_tel}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">移动电话</td>
      <td>
          <input type='text' name='order_phone' maxlength="30" value="{$order.order_phone}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">特殊要求备注</td>
      <td>
          <input type='text' name='order_bak' maxlength="30" value="{$order.order_bak}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">配送时间</td>
      <td>
          <input type='text' name='shipping_time' maxlength="30" value="{$order.shipping_time}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">订单创建时间</td>
      <td>
          <input disabled="true" readOnly="true" type='text' name='order_time' maxlength="30" value="{$order.order_time}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">订单状态</td>
      <td>
          <input disabled="true" readOnly="true" type='text' name='order_status' maxlength="30" value="{$order.order_status}" size='20' />      </td>
  </tr>
  <tr>
      <td class="label">&nbsp;</td>
      <td>
          <input type="submit" value="修改" class="button" />
          <input type="hidden" name="act" value="{$form_act}" />
          <input type="hidden" name="id" value="{$order.order_id}" />
      </td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="javascript">
<!--
document.forms['theForm'].elements['type_name'].focus();

function validate()
{
  validator = new Validator("theForm");
  validator.required("order_user",                "联系人为空");
  validator.required("order_address",          "联系地址为空");
  validator.required("order_tel",                  "联系电话为空");

  return validator.passed();
}
onload = function()
{
  {/literal}
  get_value = '{$bonus_arr.send_type}';
  {literal}

  showunit(get_value)
  // 开始检查订单
  startCheckOrder();
}

function gObj(obj)
{
  var theObj;
  if (document.getElementByIdx_x_x)
  {
      if (typeof obj=="string") {
          return document.getElementByIdx_x_x(obj);
      } else {
          return obj.style;
      }
  }
  return null;
}

function showunit(get_value)
{
  gObj("1").style.display =  (get_value == 2) ? "" : "none";
  document.forms['theForm'].elements['selbtn1'].disabled  = (get_value != 1 && get_value != 2);
  document.forms['theForm'].elements['selbtn2'].disabled  = (get_value != 1 && get_value != 2);

  return;
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}

创建
ks_order_list.htm

<!-- $Id: bonus_type.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
<form action="ks_card.php" method="post" name="theForm" enctype="multipart/form-data">
<h1>礼品卡序号:<input type='text' name='keywords' maxlength="30" value="" size='20' /><input type="submit" value="查询" class="button" /></h1>
<input type="hidden" name="act" value="order" />
</form>
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- start bonus_type list -->
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}
 
  <table cellpadding="3" cellspacing="1">
      <tr>
          <th>编号</th>
          <th>订单号</th>
          <th>礼品卡分类</th>
          <th>联系人</th>
          <th>特殊要求备注</th>
          <th>创建时间</th>
          <th>订单状态</th>
          <th>操作</th>
      </tr>
      {foreach from=$type_list item=type}
      <tr>
          <td align="center" class="first-cell"><span>{$type.order_id}</span></td>
          <td align="center">{$type.order_sn}</td>
          <td align="center">{$type.order_goodcatname}</td>
          <td align="center">联系人:{$type.order_user}&nbsp电话:{$type.order_tel}&nbsp{$type.order_phone}<br />地址:{$type.order_address}&nbsp配送时间:{$type.shipping_time}</td>
          <td align="center">{$type.order_bak}</td>
          <td align="center">{$type.order_time}</td>
          <td align="center">
              <a href="ks_card.php?act=order_status&id={$type.order_id}&stat={$type.order_status}">{if $type.order_status eq 0}正常{elseif $type.order_status eq 1}确认{elseif $type.order_status eq 2}配送{elseif $type.order_status eq 3}完成{/if}</a></td>
          <td align="center">
              <a href="ks_card.php?act=order_info&id={$type.order_id}">订单详情</a> |
              <a href="ks_card.php?act=goods&gid={$type.order_goods}">配送商品</a> |
              <a href="ks_card.php?act=list&id={$type.card_id}">礼品卡</a></td>
      </tr>
          {foreachelse}
      <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
          {/foreach}
        <tr>
          <td align="right" nowrap="true" colspan="8">{include file="page.htm"}</td>
      </tr>
  </table>

{if $full_page}
</div>
</form>
<!-- end bonus_type list -->

<script type="text/javascript" language="JavaScript">
<!--
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
        // 开始检查订单
        startCheckOrder();
  }
  {/literal}
//-->
</script>
{include file="pagefooter.htm"}
{/if}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值