Exemplo n.º 1
0
 public function getColumns($filter, $from = null)
 {
     $ret = parent::getcolumns();
     $ret['_cmd'] = array("label" => __("操作"), "width" => 75, "html" => "product/finder_command.html");
     if ($from == "from") {
         $ret['keyword'] = array("type" => "longtext", "label" => __("商品关键字"), "width" => 30, "editable" => false, "hidden" => true, "filtertype" => "bool");
         $ret['bn']['type'] = "longtext";
         $ret['bn']['label'] = __("货号");
         $ret['bn']['width'] = 30;
         $ret['bn']['editable'] = false;
         $ret['bn']['filtertype'] = "email";
         $ret['spec_desc']['type'] = "bool";
         $ret['spec_desc']['editable'] = true;
         $ret['spec_desc']['filtertype'] = "yes";
         $ret['spec_desc']['label'] = __("是否多规格");
         $ret['spec_desc']['required'] = false;
         $ret['spec_desc']['hidden'] = true;
         $ret['spec_desc']['filterdefalut'] = false;
         $ret['price']['default'] = "";
         $ret['cat_id']['type'] = "object:goods/productCat";
         $ret['cat_id']['required'] = true;
         $ret['cat_id']['default'] = "";
         $ret['cat_id']['width'] = 75;
         $ret['cat_id']['label'] = __("分类");
         $ret['cat_id']['editable'] = true;
         $ret['cat_id']['filtertype'] = "yes";
         $ret['cat_id']['filterdefalut'] = true;
         if ($this->system->getConf("certificate.distribute")) {
             $ret['supplier_id']['type'] = "object:distribution/supplier";
             $ret['supplier_id']['requited'] = false;
             $ret['supplier_id']['default'] = "";
             $ret['supplier_id']['filtertype'] = "yes";
             $ret['supplier_id']['filterdefalut'] = true;
         }
     }
     return $ret;
 }