|
|
@@ -24,6 +24,44 @@ use Yii;
|
|
|
class CustomController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //生成货位号 ssh 20231215
|
|
|
+ public function actionCreateSeatSn()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($id, true);
|
|
|
+ if ($custom->ownMainId != $this->mainId) {
|
|
|
+ util::fail('不是您的客户');
|
|
|
+ }
|
|
|
+ $seatSn = $custom->seatSn ?? '';
|
|
|
+ if (!empty($seatSn)) {
|
|
|
+ util::fail('已经有货位号了');
|
|
|
+ }
|
|
|
+ $new = CustomClass::createSeatSn($this->mainId);
|
|
|
+ $custom->seatSn = $new;
|
|
|
+ $custom->save();
|
|
|
+ util::complete('已生成');
|
|
|
+ }
|
|
|
+
|
|
|
+ //修改货位号 ssh 20231215
|
|
|
+ public function actionModifySeatSn()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $new = $get['seatSn'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($id, true);
|
|
|
+ if ($custom->ownMainId != $this->mainId) {
|
|
|
+ util::fail('不是您的客户');
|
|
|
+ }
|
|
|
+ $seatSn = $custom->seatSn ?? '';
|
|
|
+ if (empty($seatSn)) {
|
|
|
+ util::fail('没有货位号,请先生成');
|
|
|
+ }
|
|
|
+ $custom->seatSn = $new;
|
|
|
+ $custom->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
//修改客户地址 ssh 20230929
|
|
|
public function actionModifyAddress()
|
|
|
{
|
|
|
@@ -32,7 +70,7 @@ class CustomController extends BaseController
|
|
|
unset($post['id']);
|
|
|
$custom = CustomClass::getById($id, true);
|
|
|
if ($custom->ownMainId != $this->mainId) {
|
|
|
- util::fail('没有权限修改');
|
|
|
+ util::fail('不是您的客户哦');
|
|
|
}
|
|
|
$city = $post['city'] ?? '';
|
|
|
$dist = $post['dist'] ?? '';
|