修复后台导入价格

This commit is contained in:
2024-11-01 11:26:52 +08:00
parent 977a3f90a9
commit 92bc43c63d

View File

@@ -645,12 +645,7 @@ class WareController extends BaseAdminController
public function actionExcelUpdatePrice()
{
try {
$admin = \Yii::$app->user->identity;
$request = \Yii::$app->request;
$storeId = $admin->store_id;
if (empty($storeId)) {
throw new Exception('店铺账号获取失败-'. $storeId);
}
if ($request->isPost) {
$post = \Yii::$app->request->post();
@@ -675,6 +670,11 @@ class WareController extends BaseAdminController
$ImportForm = new ImportForm();
$ImportForm->attributes = $post;
if ($request->post('is_store') == true) {
$admin = \Yii::$app->user->identity;
$storeId = $admin->store_id;
if (empty($storeId)) {
throw new Exception('店铺账号获取失败-'. $storeId);
}
return $ImportForm->ExportUpdateDrugPriceByStore($data, $storeId);
}
return $ImportForm->ExportUpdateDrugPrice($data);