...
|
...
|
@@ -40,9 +40,11 @@ class Add extends Api |
|
|
$this->error('您不是门店拥有者');
|
|
|
}
|
|
|
$params = $this->request->param();
|
|
|
$battery_type_id=Db::name('battery_code')->where('BatteryCode', $params['battery_code'])->value('battery_type_id');
|
|
|
if(empty($battery_type_id))$this->error('未在产品库找到给电池类型');
|
|
|
$data = [
|
|
|
'battery_code' => $params['battery_code'],
|
|
|
'battery_type_id' => Db::name('battery_code')->where('BatteryCode', $params['battery_code'])->value('battery_type_id'),
|
|
|
'battery_type_id' => $battery_type_id,
|
|
|
'stor_id' => $StorID,
|
|
|
'battery' => 0,
|
|
|
'status' => 1
|
...
|
...
|
|