|
|
@@ -17,6 +17,24 @@ use bizGhs\order\classes\PurchaseOrderClass;
|
|
|
class GhsController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //修改供货商类型 ssh 20240727
|
|
|
+ public function actionChangeLocation()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $ghs = GhsClass::getById($id, true);
|
|
|
+ if (empty($ghs)) {
|
|
|
+ util::fail('没有找到供货商');
|
|
|
+ }
|
|
|
+ if ($ghs->ownMainId != $this->mainId) {
|
|
|
+ util::fail('不是你的供货商');
|
|
|
+ }
|
|
|
+ $newLocation = $ghs->location == 0 ? 1 :0;
|
|
|
+ $ghs->location = $newLocation;
|
|
|
+ $ghs->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
public function actionModifyName()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|