Преглед на файлове

修改表字段为 nullable

ANG YU преди 4 години
родител
ревизия
40b005a336

+ 1 - 1
app/OwnerStoreOutFeeDetail.php

@@ -23,7 +23,7 @@ class OwnerStoreOutFeeDetail extends Model
         'price_remark',//价格描述
         'tax_fee',//税费
         'sku',//商家编码
-        'packingMaterialFee',//耗材费
+        'packing_material_fee',//耗材费
         'barcode',//商品条码
         'work_name',//作业名称
         'fee',//费用

+ 1 - 1
database/factories/OwnerStoreOutFeeDetailFactory.php

@@ -33,7 +33,7 @@ $factory->define(OwnerStoreOutFeeDetail::class, function (Faker $faker) {
         'step' => $faker->randomElement($step),
         'tax_fee' => random_int(1, 100),//税费
         'sku' => $faker->uuid,//商家编码
-        'packingMaterialFee' => random_int(1, 100),//耗材费
+        'packing_material_fee' => random_int(1, 100),//耗材费
         'barcode' => $faker->uuid,//商品条码
         'work_name' => $faker->randomElement($work_names),//作业名称
         'fee' => $price * $amount,//费用

+ 38 - 0
database/migrations/2021_08_05_165443_add_nullable_to_owner_logistic_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 AddNullableToOwnerLogisticFeeDetailsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('owner_logistic_fee_details', function (Blueprint $table) {
+            $table->decimal('initial_weight')->nullable()->change();
+            $table->decimal('initial_weight_price')->nullable()->change();
+            $table->decimal('additional_weight')->nullable()->change();
+            $table->decimal('additional_price')->nullable()->change();
+            $table->decimal('additional_weigh_weight')->nullable()->change();
+            $table->decimal('tax_fee')->nullable()->change();
+            $table->decimal('fee')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('owner_logistic_fee_details', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 0
database/migrations/2021_08_05_165736_add_nullable_to_owner_store_fee_details_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddNullableToOwnerStoreFeeDetailsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('owner_store_fee_details', function (Blueprint $table) {
+            $table->decimal('unit_price')->nullable()->change();
+            $table->decimal('fee')->nullable()->change();
+            $table->decimal('packing_material_fee')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('owner_store_fee_details', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 39 - 0
database/migrations/2021_08_05_170012_add_nullable_to_owner_store_out_fee_details_table.php

@@ -0,0 +1,39 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddNullableToOwnerStoreOutFeeDetailsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('owner_store_out_fee_details', function (Blueprint $table) {
+            $table->renameColumn('packingMaterialFee', 'packing_material_fee');
+        });
+        Schema::table('owner_store_out_fee_details', function (Blueprint $table) {
+            $table->decimal('unit_price')->nullable()->change();
+            $table->string('price_remark')->nullable()->change();
+            $table->decimal('tax_fee')->nullable()->change();
+            $table->decimal('packing_material_fee')->nullable()->change();
+            $table->decimal('fee')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('owner_store_out_fee_details', function (Blueprint $table) {
+            $table->renameColumn('packing_material_fee', 'packingMaterialFee');
+        });
+    }
+}

+ 36 - 0
database/migrations/2021_08_05_171128_add_nullable_to_owner_way_bill_fee_details_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddNullableToOwnerWayBillFeeDetailsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('owner_way_bill_fee_details', function (Blueprint $table) {
+            $table->decimal('fuel_fee')->nullable()->change();
+            $table->decimal('service_fee')->nullable()->change();
+            $table->decimal('originate_fee')->nullable()->change();
+            $table->decimal('price')->nullable()->change();
+            $table->decimal('delivery_fee')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('owner_way_bill_fee_details', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 30
resources/views/requirement/index.blade.php

@@ -54,7 +54,10 @@
                             </button>
                         </form>
                         <button type="submit" class="btn btn-outline-info btn-sm">
-                            <i class="far fa-trash-alt"></i> <a :href="targetUrl(requirement.id)">查</a>
+                            <i class="far fa-trash-alt"></i> <a :href="targetUrl(requirement.id)">
+                                <span v-if="requirement.status ==='待验收'">验</span>
+                                <span v-else>查</span>
+                            </a>
                         </button>
                     </td>
                 </tr>
@@ -93,6 +96,25 @@
                 $(".up").slideUp();
                 let data = [
                     [
+                        {
+                            name: 'requirement_id',
+                            type: 'input',
+                            tip: '输入任务号',
+                            placeholder: '任务号',
+                        },
+                        {
+                            name: 'status',
+                            type: 'select',
+                            tip: '选择状态',
+                            placeholder: '状态',
+                            data:[
+                                {name:'待接收',value:'待接收'},
+                                {name:'开发中',value:'开发中'},
+                                {name:'待验收',value:'待验收'},
+                                {name:'验收通过',value:'验收通过'},
+                                {name:'验收未通过',value:'验收未通过'},
+                            ]
+                        },
                         {
                             name: 'creator_id',
                             type: 'select',
@@ -113,23 +135,6 @@
                             placeholder: ['执行人', '定位或多选'],
                             data: this.workers
                         },
-                        {
-                            name: 'began_at_start',
-                            type: 'dateTime',
-                            tip: '选择任务开始的起始时间'
-                        },
-                        {
-                            name: 'began_at_end',
-                            type: 'dateTime',
-                            tip: '选择任务开始的截止时间'
-                        },
-                        {
-                            name: 'requirement_id',
-                            type: 'input',
-                            tip: '输入任务号',
-                            placeholder: '任务号',
-                        },
-
                     ],
                     [
                         {
@@ -153,18 +158,17 @@
                             tip: '选择任务创建的截止时间'
                         },
                         {
-                            name: 'status',
-                            type: 'select',
-                            tip: '选择状态',
-                            placeholder: '状态',
-                            data:[
-                                {name:'待接收',value:'待接收'},
-                                {name:'开发中',value:'开发中'},
-                                {name:'待验收',value:'待验收'},
-                                {name:'验收通过',value:'验收通过'},
-                                {name:'验收未通过',value:'验收未通过'},
-                            ]
-                        }
+                            name: 'began_at_start',
+                            type: 'dateTime',
+                            tip: '选择任务开始的起始时间'
+                        },
+                        {
+                            name: 'began_at_end',
+                            type: 'dateTime',
+                            tip: '选择任务开始的截止时间'
+                        },
+
+
                     ]
                 ];
                 _this.form = new query({