|
|
@@ -873,30 +873,10 @@ class CustomController extends BaseController
|
|
|
$get = Yii::$app->request->get();
|
|
|
$homeAmount = $get['homeAmount'] ?? 0;
|
|
|
$homeType = $get['homeType'] ?? 0;
|
|
|
-
|
|
|
// 批量更新客户信息
|
|
|
- CustomClass::updateByCondition(
|
|
|
- ['ownMainId' => $this->mainId],
|
|
|
- ['homeAmount' => $homeAmount, 'homeType' => $homeType]
|
|
|
- );
|
|
|
-
|
|
|
- // 获取需要更新的供货商 ID
|
|
|
- $customs = CustomClass::getAllList('ghsId', ['ownMainId' => $this->mainId]);
|
|
|
- $ghsIds = [];
|
|
|
- foreach ($customs as $custom) {
|
|
|
- if (!empty($custom['ghsId'])) {
|
|
|
- $ghsIds[] = $custom['ghsId'];
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 批量更新供货商信息
|
|
|
- if (!empty($ghsIds)) {
|
|
|
- GhsClass::updateByIds(
|
|
|
- array_unique($ghsIds),
|
|
|
- ['homeAmount' => $homeAmount, 'homeType' => $homeType]
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
+ CustomClass::updateByCondition(['ownMainId' => $this->mainId], ['homeAmount' => $homeAmount, 'homeType' => $homeType]);
|
|
|
+ //批量更新供货商信息
|
|
|
+ GhsClass::updateByIds(['shopId' => $this->shopId], ['homeAmount' => $homeAmount, 'homeType' => $homeType]);
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|