Changeset 22114


Ignore:
Timestamp:
2012/12/01 17:15:33 (11 years ago)
Author:
Seasoft
Message:

#1973 (対応状況管理画面 SC_Helper_Purchase#sfUpdateOrderStatus の第1引数を空文字で呼んでいる)
#1903 (無駄な処理を改善する)
#1905 (typo修正・ソース整形・ソースコメントの改善)

Location:
branches/version-2_12-dev/data
Files:
2 edited

Legend:

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

    r21867 r22114  
    102102            <!--{/section}--> 
    103103        </table> 
    104         <input type="hidden" name="move[]" value="" /> 
    105104 
    106105        <p><!--{$tpl_strnavi}--></p> 
     
    120119<!-- 
    121120function fnSelectCheckSubmit(){ 
    122  
    123121    var selectflag = 0; 
    124122    var fm = document.form1; 
    125123 
    126     if(fm.change_status.options[document.form1.change_status.selectedIndex].value == ""){ 
    127     selectflag = 1; 
     124    if (fm.change_status.options[document.form1.change_status.selectedIndex].value == "") { 
     125        selectflag = 1; 
    128126    } 
    129127 
    130     if(selectflag == 1){ 
     128    if (selectflag == 1) { 
    131129        alert('セレクトボックスが選択されていません'); 
    132130        return false; 
     
    136134    var max = fm["move[]"].length; 
    137135 
    138     if(max) { 
     136    if (max) { 
    139137        for (i=0;i<max;i++){ 
    140             if(fm["move[]"][i].checked == true){ 
     138            if(fm["move[]"][i].checked == true) { 
    141139                checkflag = 1; 
    142140            } 
    143141        } 
    144142    } else { 
    145         if(fm["move[]"].checked == true) { 
     143        if (fm["move[]"].checked == true) { 
    146144            checkflag = 1; 
    147145        } 
    148146    } 
    149147 
    150     if(checkflag == 0){ 
     148    if (checkflag == 0){ 
    151149        alert('チェックボックスが選択されていません'); 
    152150        return false; 
    153151    } 
    154152 
    155     if(selectflag == 0 && checkflag == 1){ 
    156     document.form1.mode.value = 'update'; 
    157     document.form1.submit(); 
     153    if (selectflag == 0 && checkflag == 1) { 
     154        document.form1.mode.value = 'update'; 
     155        document.form1.submit(); 
    158156    } 
    159157} 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php

    r21867 r22114  
    8383 
    8484        $this->arrForm = $objFormParam->getHashArray(); 
    85         //        $this->arrForm = $_POST; 
    8685 
    8786        //支払方法の取得 
     
    9190            case 'update': 
    9291                switch ($objFormParam->getValue('change_status')) { 
    93                     case '': 
    94                         break; 
    95                         // 削除 
     92                    // 削除 
    9693                    case 'delete': 
    9794                        $this->lfDelete($objFormParam->getValue('move')); 
    9895                        break; 
    99                         // 更新 
     96                    // 更新 
    10097                    default: 
    10198                        $this->lfStatusMove($objFormParam->getValue('change_status'), $objFormParam->getValue('move')); 
    10299                        break; 
    103100                } 
    104  
    105                 // 対応状況 
    106                 $status = !is_null($objFormParam->getValue('status')) ? $objFormParam->getValue('status') : ''; 
    107101                break; 
    108102 
    109103            case 'search': 
    110                 // 対応状況 
    111                 $status = !is_null($_POST['status']) ? $objFormParam->getValue('status') : ''; 
     104            default: 
    112105                break; 
    113  
    114             default: 
    115                 // 対応状況 
     106        } 
     107 
     108        // 対応状況 
     109        $status = $objFormParam->getValue('status'); 
     110        if (strlen($status) === 0) { 
    116111                //デフォルトで新規受付一覧表示 
    117112                $status = ORDER_NEW; 
    118                 break; 
    119         } 
    120  
    121         // 対応状況 
     113        } 
    122114        $this->SelectedStatus = $status; 
    123115        //検索結果の表示 
     
    133125        $objFormParam->addParam('注文番号', 'order_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
    134126        $objFormParam->addParam('変更前対応状況', 'status', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
    135         $objFormParam->addParam('変更後対応状況', 'change_status', STEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
    136127        $objFormParam->addParam('ページ番号', 'search_pageno', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
    137         $objFormParam->addParam('移動注文番号', 'move', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     128        if ($this->getMode() == 'update') { 
     129            $objFormParam->addParam('変更後対応状況', 'change_status', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     130            $objFormParam->addParam('移動注文番号', 'move', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     131        } 
    138132    } 
    139133 
     
    149143            $objFormParam->setValue('search_pageno', 1); 
    150144        } 
    151  
    152         if ($this->getMode() == 'change') { 
    153             if (is_null($objFormParam->getValue('change_status'))) { 
    154                 $objFormParam->setValue('change_status',''); 
    155             } 
    156         } 
    157  
    158145    } 
    159146 
Note: See TracChangeset for help on using the changeset viewer.