小程序用户改用门店登录

This commit is contained in:
liu
2026-08-20 13:46:04 +08:00
parent 6d9f02d831
commit c1d490134e
251 changed files with 689 additions and 2727 deletions
+3 -4
View File
@@ -12,7 +12,6 @@ use App\Models\PurchaseOrderModel;
use App\Models\StoreModel;
use App\Models\StoreOrderModel;
use App\Models\SupplierModel;
use App\Models\UserModel;
use Maatwebsite\Excel\Facades\Excel;
/**
@@ -34,7 +33,7 @@ class ExportTest extends ProcurementTestCase
$veg = ProductModel::factory()->create(['status' => ProductModel::STATUS_ON, 'category_id' => $vegRoot->id, 'cost_price' => '5.00']);
$meat = ProductModel::factory()->create(['status' => ProductModel::STATUS_ON, 'category_id' => $meatRoot->id, 'cost_price' => '20.00']);
$this->actingAsMiniUser(UserModel::factory()->forStore($store->id)->create());
$this->actingAsMiniStore($store);
$this->postJson('/mini/order', ['items' => [
['product_id' => $veg->id, 'quantity' => 2],
['product_id' => $meat->id, 'quantity' => 1],
@@ -117,12 +116,12 @@ class ExportTest extends ProcurementTestCase
'supplier_id' => $supplierB->id,
]);
$this->actingAsMiniUser(UserModel::factory()->forStore($storeA->id)->create());
$this->actingAsMiniStore($storeA);
$this->postJson('/mini/order', ['items' => [
['product_id' => $veg->id, 'quantity' => 2],
['product_id' => $meat->id, 'quantity' => 1],
]])->assertJsonPath('success', true);
$this->actingAsMiniUser(UserModel::factory()->forStore($storeB->id)->create());
$this->actingAsMiniStore($storeB);
$this->postJson('/mini/order', ['items' => [
['product_id' => $veg->id, 'quantity' => 3],
]])->assertJsonPath('success', true);