|
|
@@ -57,6 +57,23 @@ class Table_stock extends Table {
|
|
|
return $this->pdo->sqlinsert($this->table_fullname, $param);
|
|
|
}
|
|
|
|
|
|
+ public function getStockCodeList($filter = array(), $count = 0, $page = 0, $pagesize = 0){
|
|
|
+
|
|
|
+ $where="where 1=1";
|
|
|
+ $sql = "select "."`stock_code`". "from ". $this->table_fullname ." $where order by ".$this->table_id." desc";
|
|
|
+ $rs = $this->pdo->sqlQuery($sql);
|
|
|
+ $r = array();
|
|
|
+ if($rs){
|
|
|
+ foreach($rs as $key => $val){
|
|
|
+ $r[$key] = $this->dataToAttr($val);
|
|
|
+ }
|
|
|
+ return $r;
|
|
|
+ }else{
|
|
|
+ return $r;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public function addCodeAndName($attr){
|
|
|
$param = array (
|
|
|
'stock_code' => array('string', $attr['code']),
|