Changeset 19934


Ignore:
Timestamp:
2011/01/17 02:33:57 (10 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19933
bzr:committer:
Kentaro Ohkouchi <nanasess@fsm.ne.jp>
bzr:file-ids:

data/Smarty/templates/admin/order/edit.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Forder%2Fedit.tpl
data/Smarty/templates/admin/order/multiple.tpl multiple.tpl-20110116173102-7dtlp9lt15miha2l-1
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php 15594@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Forder%2FLC_Page_Admin_Order_Edit.php
data/class/pages/admin/order/LC_Page_Admin_Order_Multiple.php lc_page_admin_order_-20110116173102-7dtlp9lt15miha2l-2
data/class_extends/page_extends/admin/order/LC_Page_Admin_Order_Multiple_Ex.php lc_page_admin_order_-20110116173102-7dtlp9lt15miha2l-3
html/admin/order/multiple.php multiple.php-20110116173102-7dtlp9lt15miha2l-4
bzr:mapping-version:
v4
bzr:merge:

nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
nanasess@fsm.ne.jp-20110116173352-gpc9zo8bwrcezo8a
bzr:revno:
2663
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/admin/order/edit.tpl nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
data/Smarty/templates/admin/order/multiple.tpl nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
data/class/pages/admin/order/LC_Page_Admin_Order_Multiple.php nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
data/class_extends/page_extends/admin/order/LC_Page_Admin_Order_Multiple_Ex.php nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
html/admin/order/multiple.php nanasess@fsm.ne.jp-20110116173238-61zmsrmqyxqs8h9r
bzr:timestamp:
2011-01-17 02:33:52.825000048 +0900
bzr:user-agent:
bzr2.2.2+bzr-svn1.0.4
svn:original-date:
2011-01-16T17:33:52.825000Z
Message:

#843(複数配送先の指定)

  • 受注管理での複数配送設定に対応
Location:
branches/version-2_5-dev
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/admin/order/edit.tpl

    r19923 r19934  
    5454        } 
    5555    } 
     56 
     57    function fnMultiple() { 
     58        document.form1.mode.value = "multiple"; 
     59        document.form1.submit(); 
     60        return false; 
     61    } 
    5662//--> 
    5763</script> 
     
    217223 
    218224    <!--▼受注商品情報ここから--> 
     225    <a name="order_products"></a> 
    219226    <h2 id="order_products"> 
    220         <a name="order_products">受注商品情報</a> 
     227        受注商品情報 
    221228        <a class="btn-normal" href="javascript:;" name="cheek" onclick="fnModeSubmit('cheek','anchor_key','order_products');">計算結果の確認</a> 
    222229        <a class="btn-normal" href="javascript:;" name="add_product" onclick="win03('<!--{$smarty.const.URL_PATH}--><!--{$smarty.const.ADMIN_DIR}-->order/product_select.php<!--{if $tpl_order_id}-->?order_id=<!--{$tpl_order_id}--><!--{/if}-->', 'search', '600', '500'); ">商品の追加</a> 
     
    259266            </td> 
    260267            <td align="center"><input type="text" name="price[<!--{$key}-->]" value="<!--{$arrForm.price.value[$key]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm.price.length}-->" id="price_<!--{$key}-->"/> 円</td> 
    261             <td align="center"><input type="text" name="quantity[<!--{$key}-->]" value="<!--{$arrForm.quantity.value[$key]|h}-->" size="3" class="box3" maxlength="<!--{$arrForm.quantity.length}-->"/></td> 
     268            <td align="center"><input type="text" name="quantity[<!--{$key}-->]" value="<!--{$arrForm.quantity.value[$key]|h}-->" size="3" class="box3" maxlength="<!--{$arrForm.quantity.length}-->" id="quantity_<!--{$key}-->" /></td> 
    262269            <!--{assign var=price value=`$arrForm.price.value[$key]`}--> 
    263270            <!--{assign var=quantity value=`$arrForm.quantity.value[$key]`}--> 
     
    342349 
    343350    <!--▼お届け先情報ここから--> 
     351    <a name="shipping"></a> 
    344352    <h2>お届け先情報 
    345353        <a class="btn-normal" href="javascript:;" name="input_from_order_data" onclick="fnCopyFromOrderData();">お客様情報へお届けする</a> 
    346354        <a class="btn-normal" href="javascript:;" name="input_from_order_data" onclick="fnCopyFromOrderData();">お届け先を新規追加</a> 
    347         <a class="btn-normal" href="javascript:;" name="input_from_order_data" onclick="fnCopyFromOrderData();">複数のお届け先を指定する</a> 
     355        <a class="btn-normal" href="javascript:;" name="input_from_order_data" onclick="fnModeSubmit('multiple','anchor_key','shipping');">複数のお届け先を指定する</a> 
    348356    </h2> 
    349357 
     
    356364    <!--{assign var=shipping_id value=$arrShippingIds[$shipping_index]}--> 
    357365    <!--{if $arrForm.shipping_quantity.value > 1}--> 
    358     <h3>お届け先<!--{$smarty.section.shipping.iteration}--></h3 
     366    <h3>お届け先<!--{$smarty.section.shipping.iteration}--></h3> 
    359367    <!--{/if}--> 
    360368 
     
    362370    <!--{assign var=product_quantity value="shipping_product_quantity_`$shipping_id`"}--> 
    363371    <input type="hidden" name="<!--{$product_quantity}-->" value="<!--{$arrForm[$product_quantity].value|h}-->" /> 
     372    <input type="hidden" name="shipping_id_<!--{$shipping_id}-->" value="<!--{$shipping_id}-->" id="shipping_id_<!--{$shipping_id}-->" /> 
    364373    <table class="list" id="order-edit-products"> 
    365374      <tr> 
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r19928 r19934  
    216216            break; 
    217217 
     218        // 複数配送設定表示 
     219        case 'multiple': 
     220            $this->objFormParam->setParam($_POST); 
     221            $this->tpl_onload = "win03('" . URL_PATH . ADMIN_DIR . "order/multiple.php', 'multiple', '600', '500');"; 
     222            break; 
     223 
     224        // 複数配送設定を反映 
     225        case 'multiple_set_to': 
     226            $multipleSize = $_POST['multiple_size']; 
     227            $this->lfInitMultipleParam($multipleSize); 
     228            $this->objFormParam->setParam($_POST); 
     229            $this->setMultipleItemTo($multipleSize); 
     230            break; 
    218231        default: 
    219232            break; 
     
    357370    } 
    358371 
     372    /** 
     373     * 複数配送用フォームの初期化 
     374     */ 
     375    function lfInitMultipleParam($size) { 
     376        for ($i = 0; $i < $size; $i++) { 
     377            $this->objFormParam->addParam("商品規格ID", "multiple_product_class_id" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     378            $this->objFormParam->addParam("商品コード", "multiple_product_code" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     379            $this->objFormParam->addParam("商品名", "multiple_product_name" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     380            $this->objFormParam->addParam("規格1", "multiple_classcategory_name1" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     381            $this->objFormParam->addParam("規格2", "multiple_classcategory_name2" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     382            $this->objFormParam->addParam("単価", "multiple_price" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     383            $this->objFormParam->addParam("数量", "multiple_quantity" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), 1); 
     384            $this->objFormParam->addParam("配送先住所", "multiple_shipping" . $i, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     385        } 
     386    } 
     387 
     388 
     389    function setMultipleItemTo($size) { 
     390        $arrShipmentItem = array(); 
     391        for ($i = 0; $i < $size; $i++) { 
     392            $shippingId = $this->objFormParam->getValue('multiple_shipping' . $i); 
     393            $productClassId = $this->objFormParam->getValue('multiple_product_class_id' . $i); 
     394 
     395            $name = $this->objFormParam->getValue('multiple_product_name' . $i); 
     396            $code = $this->objFormParam->getValue('multiple_product_code' . $i); 
     397            $class1 = $this->objFormParam->getValue('multiple_classcategory_name1' . $i); 
     398            $class2 = $this->objFormParam->getValue('multiple_classcategory_name2' . $i); 
     399            $price = $this->objFormParam->getValue('multiple_price' . $i); 
     400            $quantity = $this->objFormParam->getValue('multiple_quantity' . $i); 
     401 
     402            $arrShipmentItem[$shippingId][$productClassId]['shipping_id'] = $shippingId; 
     403            $arrShipmentItem[$shippingId][$productClassId]['product_class_id'] = $productClassId; 
     404            $arrShipmentItem[$shippingId][$productClassId]['classcategory_name1'] = $class1; 
     405            $arrShipmentItem[$shippingId][$productClassId]['classcategory_name2'] = $class2; 
     406            $arrShipmentItem[$shippingId][$productClassId]['price'] = $price; 
     407            $arrShipmentItem[$shippingId][$productClassId]['quantity'] += $quantity; 
     408        } 
     409 
     410        $this->arrShippingIds = array(); 
     411        $this->arrProductClassIds = array(); 
     412        foreach ($arrShipmentItem as $shippingId => $items) { 
     413 
     414            $this->arrForm['shipping_product_quantity' . '_' . $shippingId] = count($items); 
     415            $this->objFormParam->setValue('shipping_product_quantity' . '_' . $shippingId, 
     416                                          $this->arrForm['shipping_product_quantity' . '_' . $shippingId]); 
     417 
     418            $this->arrShippingIds[] = $shippingId; 
     419            $this->arrProductClassIds[] = array_keys($items); 
     420 
     421            foreach ($items as $productClassId => $item) { 
     422                foreach ($item as $itemKey => $itemVal) { 
     423                    $this->arrForm[$itemKey . '_' . $shippingId . '_' . $productClassId] = $itemVal; 
     424                    $this->objFormParam->setValue($itemKey . '_' . $shippingId . '_' . $productClassId, $itemVal); 
     425                } 
     426            } 
     427        } 
     428    } 
    359429 
    360430    function lfGetOrderData($order_id) { 
Note: See TracChangeset for help on using the changeset viewer.