Browse Source

Reapply "[智价云] 移除店铺名称采用公司信息"

This reverts commit ab2f893e59a3e597134bbf386ac7570041c2e70c.
tangyuanwang 5 days ago
parent
commit
d3238f1b63

+ 2 - 2
app/Http/Controllers/Manager/WashConfig/ViolationStore.php

@@ -125,7 +125,7 @@ class ViolationStore extends Controller
         $store_scope = request('store_scope', '');
         $all_data['store_scope'] = $store_scope;
         //查询是否存在
-        $map = ['store_name' => $all_data['store_name'], 'company_name' => $all_data['company_name']];
+        $map = ['company_name' => $all_data['company_name']];
         $data = $ViolationStoreModel->where($map)->first();
         if ($data)     return json_send(['code' => 'error', 'msg' => '记录已存在']);
         // 写入数据表
@@ -153,7 +153,7 @@ class ViolationStore extends Controller
         $store_scope = request('store_scope','');
         $all_data['store_scope'] = $store_scope;
                 //查询是否存在
-         $map = ['store_name' => $all_data['store_name'], 'company_name' => $all_data['company_name']];
+        $map = ['company_name' => $all_data['company_name']];
         $data = $ViolationStoreModel->where($map)->where('id', '!=', $id)->first();
         if ($data)     return json_send(['code' => 'error', 'msg' => '记录已存在']);
         // 更新数据表

+ 2 - 2
app/Http/Requests/Manager/WashConfig/ViolationStore.php

@@ -42,8 +42,8 @@ class ViolationStore extends BaseRequest
     protected   $scenes         = [
         'detail'             => ['id'],
         'list'               => ['page', 'limit'],
-        'add'                      => ['store_name', 'company_name', 'social_credit_code', 'store_type'],
-        'edit'                  => ['id', 'store_name', 'company_name', 'social_credit_code', 'store_type'],
+        'add'                      => ['company_name', 'social_credit_code', 'store_type'],
+        'edit'                  => ['id','company_name', 'social_credit_code', 'store_type'],
         'set_status'              => ['id', 'status'],
         'delete'                  => ['id'],
         'all'                    => [''],

+ 0 - 2
app/Models/Manager/WashConfig/ViolationStore.php

@@ -35,7 +35,6 @@ class ViolationStore extends Model
     public function addViolationStore_content($data)
     {
         $insert_data = [
-            'store_name' => $data['store_name'],
             'company_name' => $data['company_name'],
             'social_credit_code'    => $data['social_credit_code'],
             'store_type'    => $data['store_type'],
@@ -84,7 +83,6 @@ class ViolationStore extends Model
         if (!$ViolationStore) {
             return false;
         }
-        $ViolationStore->store_name = $data['store_name'];
         $ViolationStore->company_name = $data['company_name'];
         $ViolationStore->social_credit_code = $data['social_credit_code'];
         $ViolationStore->store_type = $data['store_type'];

+ 7 - 7
routes/manager.php

@@ -86,19 +86,19 @@ Route::any('violation_goods/set_status', [App\Http\Controllers\Manager\WashConfi
 // 违规商品-删除
 Route::any('violation_goods/delete', [App\Http\Controllers\Manager\WashConfig\ViolationProduct::class, 'delete']);
 
-// 违规店铺-列表
+// 违规店铺公司-列表
 Route::any('violation_store/list', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'list']);
-// 违规店铺-详情
+// 违规店铺公司-详情
 Route::any('violation_store/detail', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'detail']);
-// 违规店铺-添加
+// 违规店铺公司-添加
 Route::any('violation_store/add', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'add']);
-// 违规店铺-修改
+// 违规店铺公司-修改
 Route::any('violation_store/edit', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'edit']);
-// 违规店铺-状态
+// 违规店铺公司-状态
 Route::any('violation_store/set_status', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'set_status']);
-// 违规店铺-删除
+// 违规店铺公司-删除
 Route::any('violation_store/delete', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'delete']);
-// 违规店铺-全部
+// 违规店铺公司-全部
 Route::any('violation_store/all', [App\Http\Controllers\Manager\WashConfig\ViolationStore::class, 'all']);
 
 // ------人员信息管理------