Changeset 18068 for branches/comu-ver2/data
- Timestamp:
- 2009/06/09 15:10:02 (15 years ago)
- Location:
- branches/comu-ver2/data
- Files:
-
- 2 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/Smarty/templates/default/admin/customer/search_customer.tpl
r17876 r18068 22 22 */ 23 23 *}--> 24 <!-- -->25 24 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 26 25 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> … … 29 28 <meta http-equiv="content-script-type" content="text/javascript"> 30 29 <meta http-equiv="content-style-type" content="text/css"> 31 .<link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->admin/css/contents.css" type="text/css" media="all" />30 <link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->admin/css/contents.css" type="text/css" media="all" /> 32 31 <script type="text/javascript" src="<!--{$TPL_DIR}-->js/css.js"></script> 33 32 <script type="text/javascript" src="<!--{$TPL_DIR}-->js/navi.js"></script> … … 48 47 </script> 49 48 50 <title> EC CUBE 管理者画面</title>49 <title>管理機能</title> 51 50 </head> 52 51 -
branches/comu-ver2/data/Smarty/templates/default/admin/order/edit.tpl
r18054 r18068 54 54 <input type="hidden" name="mode" value="<!--{$tpl_mode|default:"edit"}-->" /> 55 55 <input type="hidden" name="order_id" value="<!--{$tpl_order_id}-->" /> 56 <input type="hidden" name="edit_customer_id" value=" <!--{$tpl_order_id}-->" />56 <input type="hidden" name="edit_customer_id" value="" /> 57 57 <input type="hidden" name="anchor_key" value="" /> 58 58 <input type="hidden" id="add_product_id" name="add_product_id" value="" /> … … 93 93 <tr> 94 94 <th>発送日</th> 95 <td><!--{$arrForm.commit_date |sfDispDBDate|default:"未発送"}--></td>95 <td><!--{$arrForm.commit_date.value|sfDispDBDate|default:"未発送"}--></td> 96 96 </tr> 97 97 </table> … … 118 118 <input type="hidden" name="<!--{$key}-->" value="<!--{$item|escape}-->" /> 119 119 <!--{/foreach}--> 120 <h2>お客様情報</h2> 120 <h2>お客様情報 121 <!--{if $tpl_mode == 'add'}--> 122 <input type="button" name="address_input" value="顧客検索" onclick="fnOpenWindow('<!--{$smarty.const.SITE_URL}-->admin/customer/search_customer.php','search','500','650'); return false;" /> 123 <!--{/if}--> 124 </h2> 121 125 <table class="form"> 122 <!--{if $tpl_mode != 'add'}-->123 126 <tr> 124 127 <th>注文番号</th> … … 128 131 <th>受注日</th> 129 132 <td><!--{$arrForm.create_date.value|sfDispDBDate}--></td> 133 <input type="hidden" name="create_date" value="<!--{$arrForm.create_date.value}-->" /> 130 134 </tr> 131 135 <tr> … … 134 138 <!--{if $arrForm.customer_id.value > 0}--> 135 139 <!--{$arrForm.customer_id.value}--> 140 <input type="hidden" name="customer_id" value="<!--{$arrForm.customer_id.value}-->" /> 136 141 <!--{else}--> 137 142 (非会員) … … 139 144 </td> 140 145 </tr> 141 <!--{/if}-->142 146 <tr> 143 147 <th>顧客名</th> -
branches/comu-ver2/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
r18055 r18068 154 154 155 155 if(count($this->arrErr) == 0) { 156 #if(count($this->arrErr) == 0) { 157 if ($_POST['mode'] == 'add') { 158 $this->lfRegistNewData(); 159 $text = "'新規受注を登録しました。'"; 160 } else { 161 $this->lfRegistData($_POST['order_id']); 162 $text = "'受注履歴を編集しました。'"; 163 } 164 // DBから受注情報を再読込 165 $this->lfGetOrderData($order_id); 166 $this->tpl_onload = "window.alert(".$text.");"; 167 #} 156 if ($_POST['mode'] == 'add') { 157 $order_id = $this->lfRegistNewData(); 158 159 $this->tpl_order_id = $order_id; 160 $this->tpl_mode = 'edit'; 161 162 $arrData['order_id'] = $order_id; 163 $this->objFormParam->setParam($arrData); 164 165 $text = "'新規受注を登録しました。'"; 166 } else { 167 $this->lfRegistData($_POST['order_id']); 168 $text = "'受注履歴を編集しました。'"; 169 } 170 // DBから受注情報を再読込 171 $this->lfGetOrderData($order_id); 172 $this->tpl_onload = "window.alert(".$text.");"; 168 173 } 169 174 break; … … 223 228 // 入力値の変換 224 229 $this->objFormParam->convParam(); 230 break; 231 /* 顧客検索ポップアップより顧客指定後、顧客情報取得*/ 232 case 'search_customer': 233 // POST情報で上書き 234 $this->objFormParam->setParam($_POST); 235 236 // 検索結果から顧客IDを指定された場合、顧客情報をフォームに代入する 237 $this->lfSetCustomerInfo($_POST['edit_customer_id']); 238 225 239 break; 226 240 /* F-REGI決済モジュール連携用 */ … … 388 402 $this->objFormParam->addParam("注文番号", "order_id"); 389 403 $this->objFormParam->addParam("受注日", "create_date"); 404 $this->objFormParam->addParam("発送日", "commit_date"); 390 405 } 391 406 … … 679 694 } 680 695 $objQuery->commit(); 696 697 return $order_id; 681 698 } 682 699 … … 742 759 return $arrProduct; 743 760 } 761 762 /** 763 * 検索結果から顧客IDを指定された場合、顧客情報をフォームに代入する 764 * @param int $edit_customer_id 顧客ID 765 */ 766 function lfSetCustomerInfo($edit_customer_id = ""){ 767 // 顧客IDが指定されている場合のみ、処理を実行する 768 if( $edit_customer_id === "" ) return ; 769 770 // 検索で選択された顧客IDが入力されている場合 771 if( is_null($edit_customer_id) === false && 0 < strlen($edit_customer_id) && SC_Utils_Ex::sfIsInt($edit_customer_id) ){ 772 $objQuery = new SC_Query(); 773 774 // 顧客情報を取得する 775 $arrCustomerInfo = $objQuery->select('*', 'dtb_customer', 'customer_id = ? AND del_flg = 0', array($edit_customer_id)); 776 777 // 顧客情報を取得する事が出来たら、テンプレートに値を渡す 778 if( 0 < count($arrCustomerInfo) && is_array($arrCustomerInfo) === true){ 779 // カラム名にorder_を付ける(テンプレート側でorder_がついている為 780 foreach($arrCustomerInfo[0] as $index=>$customer_info){ 781 // customer_idにはorder_を付けないようにする 782 $order_index = ($index == 'customer_id') ? $index : 'order_'.$index; 783 $arrCustomer[$order_index] = $customer_info; 784 } 785 } 786 787 // hiddenに渡す 788 $this->edit_customer_id = $edit_customer_id; 789 790 // 受注日に現在の時刻を取得し、表示させる 791 $create_date = $objQuery->getall('SELECT now() as create_date;'); 792 $arrCustomer['create_date'] = $create_date[0]['create_date']; 793 794 // 情報上書き 795 $this->objFormParam->setParam($arrCustomer); 796 // 入力値の変換 797 $this->objFormParam->convParam(); 798 } 799 } 744 800 } 745 801 ?>
Note: See TracChangeset
for help on using the changeset viewer.