@@ -9,6 +9,13 @@ class Act extends Core
# 采购
public function buy()
{
- # 获取这个
+ $shop = $this->shop;
+ # 获取门店分配的仓库和工厂
+
+ $sql = 'select *,round((st_distance(point(lng, lat), point('.$shop['lng'].', '.$shop['lat'].'))*111195)/1000, 2) as distance from {table} where '.$where.' order by distance asc';
+ $data = Dever::db('shop/info')->$method($sql, array(), $page);
+ $store = Dever::db('shop/store')->select();
}
@@ -461,6 +461,16 @@ return array
'option' => $act,
),
+ 'pdesc' => array
+ (
+ 'type' => 'text-255',
+ 'name' => '配送与自提说明',
+ 'default' => '',
+ 'desc' => '配送与自提说明',
+ 'match' => 'is_string',
+ 'update' => 'textarea',
+ ),
'status' => array
(
'type' => 'int-11',