Zhouzhendong 5 лет назад
Родитель
Сommit
ff93416567

+ 2 - 2
app/Http/Controllers/StoreCheckingReceiveController.php

@@ -398,8 +398,8 @@ class StoreCheckingReceiveController extends Controller
         //修改差异状态
         if ($item->imported_amount || $item->asn_amount){
             $withs = ['storeCheckingReceiveItems'];
-            $storeCheckingReceive = app('storeCheckingReceiveService')->find($id,$withs);
-            $this->updateDiffStatus($storeCheckingReceive);
+            $storeCheckingReceive = app('storeCheckingReceiveService')->find($item->store_checking_receive_id,$withs);
+            if ($storeCheckingReceive)$this->updateDiffStatus($storeCheckingReceive);
         }
         app('storeCheckingReceiveItemService')->updateFind($item,$params);
         LogService::log(__METHOD__,"盘点修改实盘数",'item:'.json_encode($item)."update:",$counted_amount);

+ 38 - 0
database/migrations/2020_10_26_165012_create_owner_fee_details_table.php

@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerFeeDetailsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_fee_details', function (Blueprint $table) {
+            $table->id();
+            $table->bigInteger('owner_id')->index()->comment('外键货主');
+            $table->date('counting_month')->index()->comment('结算月');
+            $table->dateTime('worked_at')->index()->comment('作业时间');
+            $table->enum('type',["发货","收货","增值服务"])->index()->comment('类型');
+            $table->bigInteger('shop_id')->nullable()->index()->comment('外键店铺');
+            $table->string('operation_bill')->nullable()->comment('发/收/退货单号');
+            //TODO 字段与来源渠道无法确认 暂时搁置
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('owner_fee_details');
+    }
+}