Procházet zdrojové kódy

客户管理-即时费用,订单操作费按订单,分箱按物流费按箱
列表,查看费用按钮,链接不要到基础设置
出库,1级特征,增加“波次类型”

Zhouzhendong před 5 roky
rodič
revize
6acdde3113

+ 8 - 0
app/Feature.php

@@ -15,4 +15,12 @@ class Feature extends Model
         "logic",    //逻辑
         "describe", //特征
     ];
+
+    const type = [
+        0 => "商品名称",
+        1 => "订单类型",
+        2 => "承运商",
+        3 => "店铺类型",
+        4 => "波次类型",
+    ];
 }

+ 4 - 2
app/Http/Controllers/CustomerController.php

@@ -204,6 +204,7 @@ class CustomerController extends Controller
         $owner = app('OwnerService')->find($id);
         $owner->loadCount(["ownerStoragePriceModels","ownerPriceOperations","ownerPriceExpresses","ownerPriceLogistics","ownerPriceDirectLogistics"]);
         $isExist = false;
+        /** @var \stdClass $owner */
         if($owner->owner_storage_price_models_count ||
             $owner->owner_price_operations_count ||
             $owner->owner_price_expresses_count ||
@@ -212,7 +213,8 @@ class CustomerController extends Controller
         $customers = app('CustomerService')->getSelection();
         $ownerGroups = app('UserOwnerGroupService')->getSelection();
         $warehouses = app('WarehouseService')->getSelection();
-        return response()->view('customer.project.create',compact("customers","ownerGroups","warehouses",'owner',"isExist"));
+        $type = request("type");
+        return response()->view('customer.project.create',compact("customers","ownerGroups","warehouses",'owner',"isExist", "type"));
     }
 
     public function projectArea(Request $request)
@@ -294,7 +296,7 @@ class CustomerController extends Controller
         $shops = app('ShopService')->getSelection();
         $customers = app('CustomerService')->getSelection();
         $owners = app('OwnerService')->getIntersectPermitting();
-        $details = app('OwnerFeeDetailService')->paginate($params,["owner"=>function($query){$query->with("customer");},"shop","processMethod","logistic"]);
+        $details = app('OwnerFeeDetailService')->paginate($params,["owner.customer","shop","processMethod","logistic","items"]);
         return response()->view('customer.finance.instantBill',compact("details","params","shops","customers","owners"));
     }
 

+ 16 - 14
app/Http/Controllers/PriceModelController.php

@@ -323,21 +323,23 @@ class PriceModelController extends Controller
             "total_discount_price"=> request("total_discount_price") ?? null,
         ]);
         $service->destroyItem($id);
-        //录入子表
-        $insert = [];
-        foreach ($request->input("items") as $rule){
-            $insert[] = [
-                "owner_price_operation_id" => $model->id,
-                "amount" => $rule["amount"],
-                "unit_id" => $rule["unit_id"],
-                "unit_price" => $rule["unit_price"],
-                "strategy" => $rule["strategy"],
-                "feature" => $rule["feature"],
-                "priority" => $rule["priority"],
-                "discount_price" => $rule["discount_price"] ?? null,
-            ];
+        if ($request->input("items")){
+            //录入子表
+            $insert = [];
+            foreach ($request->input("items") as $rule){
+                $insert[] = [
+                    "owner_price_operation_id" => $model->id,
+                    "amount" => $rule["amount"],
+                    "unit_id" => $rule["unit_id"],
+                    "unit_price" => $rule["unit_price"],
+                    "strategy" => $rule["strategy"],
+                    "feature" => $rule["feature"],
+                    "priority" => $rule["priority"],
+                    "discount_price" => $rule["discount_price"] ?? null,
+                ];
+            }
+            $service->insertItem($insert);
         }
-        $service->insertItem($insert);
         //录入中间表
         /** @var OwnerPriceOperation $model */
         if ($request->input("owner_id"))$model->ownerPriceOperationOwners()->sync($request->input("owner_id"));

+ 4 - 0
app/OwnerFeeDetail.php

@@ -53,4 +53,8 @@ class OwnerFeeDetail extends Model
     {   //出库单
         return $this->belongsTo(Order::class,"outer_id","id");
     }
+    public function items()
+    {   //快递费子项
+        return $this->hasMany(OwnerFeeDetailLogistic::class,"owner_fee_detail_id","id");
+    }
 }

+ 21 - 0
app/OwnerFeeDetailLogistic.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+use App\Traits\ModelLogChanging;
+
+class OwnerFeeDetailLogistic extends Model
+{
+    use ModelLogChanging;
+
+    protected $fillable=[
+      "owner_fee_detail_id","amount","logistic_bill","volume","weight","logistic_fee"
+    ];
+
+    public function logistic()
+    {   //快递
+        return $this->belongsTo(Logistic::class);
+    }
+}

+ 8 - 7
app/Services/FeatureService.php

@@ -73,7 +73,7 @@ class FeatureService
             foreach ($m as $string){
                 if (is_numeric($string)){//填入特征信息
                     if (isset($featureMap[$string])){
-                        $arr["type"] = $features[$featureMap[$string]]->type;
+                        $arr["type"] = Feature::type[$features[$featureMap[$string]]->type];
                         $arr["id"] = $features[$featureMap[$string]]->id;
                         $arr["logic"] = $features[$featureMap[$string]]->logic;
                         $arr["describe"] = $features[$featureMap[$string]]->describe;
@@ -128,8 +128,9 @@ class FeatureService
         $map = [];
         foreach ($features as &$feature){
             if (!$feature["type"] || !$feature["logic"] || !$feature["describe"])continue;
+            $typeMap = array_flip(Feature::type);
             $f = Feature::query()->firstOrCreate([
-                "type"=>$feature["type"],  //特征类型
+                "type"=>$typeMap[$feature["type"]],  //特征类型
                 "logic"=>$feature["logic"],  //特征逻辑
                 "describe"=>$feature["describe"],  //特征信息
             ]);
@@ -161,10 +162,10 @@ class FeatureService
         if (!$features)return $value;
         preg_match_all('/\d+|[\&\|\(\)]/',$value,$result);
         foreach ($result[0] as &$str){
+            $column = Feature::type[$features[$str]["type"]];
+            $logic = $features[$str]["logic"];
+            $describe = $features[$str]["describe"];
             if (is_numeric($str) && isset($features[$str])){
-                $column = $features[$str]["type"];
-                $logic = $features[$str]["logic"];
-                $describe = $features[$str]["describe"];
                 if ($columnMapping){
                     $column = $columnMapping[$column] ?? $column;
                     switch ($logic){
@@ -181,7 +182,7 @@ class FeatureService
                             break;
                     }
                     $str = $column.$logic."'".$describe."'";
-                }else $str = $features[$str]["type"].' '.$features[$str]["logic"].' '.$features[$str]["describe"];
+                }else $str = $column.' '.$logic.' '.$describe;
             }
             if ($str == "&"){
                 if ($columnMapping) $str = " and ";
@@ -227,7 +228,7 @@ class FeatureService
 
         foreach ($result[0] as &$str) {
             if (is_numeric($str) && isset($features[$str])) {
-                $column = $features[$str]["type"];
+                $column = array_flip(Feature::type)[$features[$str]["type"]];
                 $logic = $features[$str]["logic"];
                 $describe = $features[$str]["describe"];
                 if ($column == '商品名称' && $isMultiMatching){

+ 31 - 12
app/Services/OrderService.php

@@ -13,6 +13,7 @@ use App\Order;
 use App\OrderIssue;
 use App\Owner;
 use App\OwnerFeeDetail;
+use App\OwnerFeeDetailLogistic;
 use App\Province;
 use App\RejectedBill;
 use App\Services\common\BatchUpdateService;
@@ -1008,7 +1009,7 @@ class OrderService
         if (Cache::has($key))Cache::increment($key);
         else Cache::put($key,1,2678400);
 
-        $order->loadMissing(["logistic","shop","packages.commodities.commodity"]);
+        $order->loadMissing(["logistic","shop","packages.commodities.commodity","batch"]);
 
         /** @var OwnerPriceExpressService $service */
         $service = app("OwnerPriceExpressService");
@@ -1021,27 +1022,37 @@ class OrderService
 
         if (!$order->logistic || $order->logistic->type != "快递")$logistic_fee = null;
 
+        $items = [];
         foreach ($order->packages as &$package){
             $logistic_bill .= $package->logistic_number.",";
             $volume += $package->bulk;
             $weight += $package->weight;
 
             // 四维转二维
+            $partAmount = 0;
             foreach($package->commodities as &$commodity){
                 $commodity["commodity_name"] = $commodity->commodity ? $commodity->commodity->name : '';
                 $commodity["sku"] = $commodity->commodity ? $commodity->commodity->sku : '';
-                $amount += $commodity->amount;
+                $partAmount += $commodity->amount;
             }
+            $amount += $partAmount;
             $commodities = array_merge($commodities,$package->commodities->toArray());
 
+            $provinceName = mb_substr($order->province,0,2);
+            $province = app(CacheService::class)->getOrExecute("province_".$provinceName,function ()use($provinceName){
+                return Province::query()->where("name","like",$provinceName."%")->first();
+            },86400);
+            if (!$province)$logistic_fee = null;
+
+            $fee = $service->matching($package->weight, $order->owner_id, $order->logistic_id, $province->id);
+            $items[] = [
+                "amount" => $partAmount,
+                "logistic_bill" => $package->logistic_number,
+                "volume"=>$package->bulk,
+                "weight"=>$package->weight,
+                "logistic_fee" => $fee>0 ? $fee : null,
+            ];
             if ($logistic_fee!==null){
-                $provinceName = mb_substr($order->province,0,2);
-                $province = app(CacheService::class)->getOrExecute("province_".$provinceName,function ()use($provinceName){
-                    return Province::query()->where("name","like",$provinceName."%")->first();
-                },86400);
-                if (!$province)$logistic_fee = null;
-
-                $fee = $service->matching($package->weight, $order->owner_id, $order->logistic_id, $province->id);
                 if ($fee<0)$logistic_fee = null;
                 else $logistic_fee += $fee;
             }
@@ -1052,14 +1063,17 @@ class OrderService
             "logistic_name"=>($order->logistic ? $order->logistic->name : ''),
             "shop_name"=>($order->shop ? $order->shop->name : ''),
             "order_type"=>$order->order_type,
+            "batch_type" => $order->batch ? $order->batch->wms_type : '',
             "owner_id"=>$order->owner_id];
-        $mapping = ["packages"=>"commodities","商品名称"=>"commodity_name","承运商"=>"logistic_name","店铺类型"=>"shop_name","订单类型"=>"order_type","订单数"=>"amount"];
+        $mapping = ["packages"=>"commodities","商品名称"=>"commodity_name",
+            "承运商"=>"logistic_name","店铺类型"=>"shop_name","订单类型"=>"order_type",
+            "波次类型"=>"batch_type"];
 
         /** @var OwnerPriceOperationService $service */
         $service = app("OwnerPriceOperationService");
         $result = $service->matching($object,$mapping,$order->owner_id,"出库");
 
-       if (app("OwnerFeeDetailService")->create([
+        $detail = app("OwnerFeeDetailService")->create([
             "owner_id"          => $order->owner_id,
             "worked_at"         => $order->wms_edittime ?? $order->updated_at,
             "type"              => "发货",
@@ -1078,7 +1092,12 @@ class OrderService
             "created_at"        => date('Y-m-d H:i:s'),
             "outer_id"          => $order->id,
             "outer_table_name"  => "orders",
-        ]))return true;
+       ]);
+       if ($detail){
+            foreach ($items as &$item)$item["owner_fee_detail_id"] = $detail->id;
+            if (count($items)>1)OwnerFeeDetailLogistic::query()->insert($items);
+            return true;
+       }
        return false;
     }
 

+ 3 - 2
app/Services/OwnerPriceOperationService.php

@@ -133,7 +133,7 @@ class OwnerPriceOperationService
                     DB::beginTransaction();
                     $month = date("Y-m");
                     $day = date("t",strtotime($month));
-                    foreach (OwnerFeeDetail::query()->with(["order.logistic","order.shop","order.packages.commodities.commodity"])
+                    foreach (OwnerFeeDetail::query()->with(["order.logistic","order.shop","order.packages.commodities.commodity","order.batch"])
                                  ->where("owner_id",$owner_id)
                                  ->whereBetween("worked_at",[$month."-01",$month."-".$day])->get() as $detail){
                         $order = $detail->order;
@@ -154,10 +154,11 @@ class OwnerPriceOperationService
                             "logistic_name"=>($order->logistic ? $order->logistic->name : ''),
                             "shop_name"=>($order->shop ? $order->shop->name : ''),
                             "order_type"=>$order->order_type,
+                            "batch_type" => $order->batch ? $order->batch->wms_type : '',
                             "owner_id"=>$order->owner_id];
                         $mapping = ["packages"=>"commodities","商品名称"=>"commodity_name",
                             "承运商"=>"logistic_name", "店铺类型"=>"shop_name",
-                            "订单类型"=>"order_type","订单数"=>"amount"];
+                            "订单类型"=>"order_type","波次类型"=>"batch_type"];
                         $money = $this->matchItem($rule->items,$mapping,$object,$units,$owner_id,'出库',$isDiscount);
                         if ($money>0)$detail->update(["work_fee"=>$money]);
                         else LogService::log(__CLASS__,"处理历史即时账单时发生匹配错误","账单主键:".$detail->id."; 错误代码".$money);

+ 1 - 1
database/factories/FeatureFactory.php

@@ -6,7 +6,7 @@ use App\Feature;
 use Faker\Generator as Faker;
 
 $factory->define(Feature::class, function (Faker $faker) {
-    $type = ['商品名称','订单类型','承运商','店铺类型'];
+    $type = [0,1,2,3,4,5];
     $logic = ['包含','不包含','等于'];
     return [
         "type" => $type[array_rand($type)],     //类型

+ 48 - 0
database/migrations/2021_02_04_112223_create_owner_fee_detail_logistics_table.php

@@ -0,0 +1,48 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerFeeDetailLogisticsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_fee_detail_logistics', function (Blueprint $table) {
+            $table->id();
+            $table->bigInteger("owner_fee_detail_id")->index()->comment("外键即时账单");
+            $table->integer("amount")->comment("商品数量");
+            $table->string('logistic_bill')->nullable()->comment('快递单号');
+            $table->decimal('volume',8,3)->nullable()->comment('体积');
+            $table->decimal('weight',8,3)->nullable()->comment('重量');
+            $table->decimal('logistic_fee',8,4)->nullable()->comment('物流费');
+        });
+        Schema::table("features",function(Blueprint $table){
+            $table->dropColumn("type");
+        });
+        Schema::table("features",function(Blueprint $table){
+            $table->tinyInteger("type")->default(0)->index()->comment("特征类型");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table("features",function(Blueprint $table){
+            $table->dropColumn("type");
+        });
+        Schema::table("features",function(Blueprint $table){
+            $table->enum("type",["商品名称","订单类型","承运商","店铺类型"])->index()->comment("特征类型");
+        });
+        Schema::dropIfExists('owner_fee_detail_logistics');
+    }
+}

+ 3 - 0
resources/sass/color.scss

@@ -13,4 +13,7 @@
 }
 .bg-cyanogen{
   background-color:RGB(170,220,205);
+}
+.bg-light-gray{
+  background-color:RGB(236,236,236);
 }

+ 30 - 16
resources/views/customer/finance/instantBill.blade.php

@@ -20,7 +20,7 @@
                 <input id="all" type="checkbox" @click="checkAll($event)">全选
             </label>
             <table class="d-none" id="headerRoll"></table>
-            <table class="table table-sm text-nowrap table-striped table-hover" id="headerParent">
+            <table class="table table-sm text-nowrap" id="headerParent">
                 <tr class="text-center">
                     <td colspan="2"></td>
                     <td colspan="9" class="bg-light-info">单据信息</td>
@@ -28,31 +28,43 @@
                     <td colspan="4" class="bg-light-cyanogen">费用信息</td>
                 </tr>
                 <tr id="header"></tr>
-                <tr v-for="(bill,i) in bills">
-                    <td>
+                <tbody v-for="(bill,i) in bills" :class="i%2==0 ? 'bg-light-gray' : 'bg-white'">
+                <tr>
+                    <td :rowspan="bill.rowspan">
                         <label><input type="checkbox" :value="bill.id" v-model="checkData"></label>
                     </td>
-                    <td>@{{ i+1 }}</td>
-                    <td>@{{ bill.customerName }}</td>
-                    <td>@{{ bill.ownerName }}</td>
-                    <td>@{{ bill.workedAt }}</td>
-                    <td>
+                    <td :rowspan="bill.rowspan">@{{ i+1 }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.customerName }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.ownerName }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.workedAt }}</td>
+                    <td :rowspan="bill.rowspan">
                         <label v-if="bill.type == '增值服务'">服务<span class="badge badge-primary">@{{ bill.methodName }}</span></label>
                         <label v-else>@{{ bill.type }}</label>
                     </td>
-                    <td>@{{ bill.shopName }}</td>
-                    <td>@{{ bill.operationBill }}</td>
-                    <td>@{{ bill.consigneeName }}</td>
-                    <td>@{{ bill.consigneePhone }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.shopName }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.operationBill }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.consigneeName }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.consigneePhone }}</td>
                     <td>@{{ bill.commodityAmount }}</td>
-                    <td>@{{ bill.logisticBill }}</td>
+                    <td>
+                        <span v-if="bill.rowspan < 1">@{{ bill.logisticBill }}</span>
+                        <span v-else class="font-weight-bold text-secondary">分箱:</span>
+                    </td>
                     <td>@{{ bill.volume }}</td>
                     <td>@{{ bill.weight }}</td>
-                    <td>@{{ bill.logisticName }}</td>
-                    <td>@{{ bill.workFee }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.logisticName }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.workFee }}</td>
                     <td>@{{ bill.logisticFee }}</td>
-                    <td>@{{ bill.total }}</td>
+                    <td :rowspan="bill.rowspan">@{{ bill.total }}</td>
+                </tr>
+                <tr v-for="item in bill.items">
+                    <td>@{{ item.amount }}</td>
+                    <td>@{{ item.logistic_bill }}</td>
+                    <td>@{{ item.volume }}</td>
+                    <td>@{{ item.weight }}</td>
+                    <td>@{{ item.logistic_fee }}</td>
                 </tr>
+                </tbody>
             </table>
             {{$details->appends($params)->links()}}
         </div>
@@ -89,6 +101,8 @@
                         logisticFee : "{{$detail->logistic_fee}}",
                         createdAt : "{{$detail->created_at}}",
                         total : "{{$detail->work_fee + $detail->logistic_fee}}",
+                        items:{!! $detail->items !!},
+                        rowspan:Number("{{count($detail->items)}}")+1
                     },
                     @endforeach
                 ],

+ 10 - 1
resources/views/customer/project/create.blade.php

@@ -176,7 +176,7 @@
                     discount_type:[
                         "无减免","按单减免","固定减免"
                     ],
-                    feature_type:['商品名称','订单类型','承运商','店铺类型'],
+                    feature_type:{!! json_encode(\App\Feature::type,JSON_UNESCAPED_UNICODE) !!},
                     logic : ['包含','不包含','等于'],
                 },
                 poolMapping:{},//基础数据选择池的映射对象 供展示使用
@@ -203,6 +203,15 @@
                 hover:{},
             },
             mounted(){
+                let type = "{{$type}}";
+                if (type){
+                    this.base = "three";
+                    setTimeout(()=>{
+                        this.switchType(type);
+                        if (!this.isLoad && this.ownerTemp.id)this._loadPriceModel();//计费模型未被加载且项目ID存在时
+                        if (!this.isLoad && !this.ownerTemp.id) this.isLoad = true;
+                    },0);
+                }
                 this.ownerTemp = JSON.parse(JSON.stringify(this.owner));
                 $('[data-toggle="tooltip"]').tooltip();
                 $("#container").removeClass("d-none");

+ 5 - 5
resources/views/customer/project/index.blade.php

@@ -12,27 +12,27 @@
                         <div class="container-fluid" v-if="priceModel[thisClickIndex]">
                             <div class="row" v-for="(model,i) in priceModel[thisClickIndex]['ownerStoragePriceModels']">
                                 <label class="text-dark font-weight-bold col-3"><span v-if="i==0">仓储:</span></label>
-                                <a target="_blank" :href="'{{url('maintenance/priceModel/storage')}}?id='+model.id" class="text-decoration-none">@{{ model.counting_type }}-@{{ model.using_type }}</a>
+                                <a target="_blank" :href="'{{url('customer/project')}}/'+thisClickIndex+'/edit?type=storage'" class="text-decoration-none">@{{ model.counting_type }}-@{{ model.using_type }}</a>
                             </div>
                             <hr class="m-1">
                             <div class="row" v-for="(model,i) in priceModel[thisClickIndex]['ownerPriceOperations']">
                                 <label class="text-dark font-weight-bold col-3"><span v-if="i==0">作业:</span></label>
-                                <a target="_blank" :href="'{{url('maintenance/priceModel/operation')}}?id='+model.id" class="text-decoration-none">@{{ model.name }}</a>
+                                <a target="_blank" :href="'{{url('customer/project')}}/'+thisClickIndex+'/edit?type=operation'" class="text-decoration-none">@{{ model.name }}</a>
                             </div>
                             <hr class="m-1">
                             <div class="row" v-for="(model,i) in priceModel[thisClickIndex]['ownerPriceExpresses']">
                                 <label class="text-dark font-weight-bold col-3"><span v-if="i==0">快递:</span></label>
-                                <a target="_blank" :href="'{{url('maintenance/priceModel/express')}}?id='+model.id" class="text-decoration-none">@{{ model.name }}</a>
+                                <a target="_blank" :href="'{{url('customer/project')}}/'+thisClickIndex+'/edit?type=expresses'" class="text-decoration-none">@{{ model.name }}</a>
                             </div>
                             <hr class="m-1">
                             <div class="row" v-for="(model,i) in priceModel[thisClickIndex]['ownerPriceLogistics']">
                                 <label class="text-dark font-weight-bold col-3"><span v-if="i==0">物流:</span></label>
-                                <a target="_blank" :href="'{{url('maintenance/priceModel/logistic')}}?id='+model.id" class="text-decoration-none">@{{ model.name }}</a>
+                                <a target="_blank" :href="'{{url('customer/project')}}/'+thisClickIndex+'/edit?type=logistic'" class="text-decoration-none">@{{ model.name }}</a>
                             </div>
                             <hr class="m-1">
                             <div class="row" v-for="(model,i) in priceModel[thisClickIndex]['ownerPriceDirectLogistics']">
                                 <label class="text-dark font-weight-bold col-3"><span v-if="i==0">直发车:</span></label>
-                                <a target="_blank" :href="'{{url('maintenance/priceModel/directLogistic')}}?id='+model.id" class="text-decoration-none">@{{ model.name }}</a>
+                                <a target="_blank" :href="'{{url('customer/project')}}/'+thisClickIndex+'/edit?type=directLogistic'" class="text-decoration-none">@{{ model.name }}</a>
                             </div>
                         </div>
                     </div>

+ 4 - 1
resources/views/customer/project/part/_addFeature.blade.php

@@ -25,7 +25,10 @@
                         </label>
                         <label class="col-2">
                             <select class="form-control form-control-sm" v-model="feature.type">
-                                <option v-for="t in pool.feature_type" :value="t" v-if="(thisOperationItemIndex===-1 && t !== '商品名称') || (thisOperationItemIndex!==-1 && t==='商品名称')">@{{ t }}</option>
+                                <option v-for="t in pool.feature_type" :value="t"
+                                        v-if="((thisOperationItemIndex===-1 && t !== '商品名称') || (thisOperationItemIndex!==-1 && t==='商品名称')) &&
+                                        ((model.operation.operation_type=='入库' && t!=='波次类型') || model.operation.operation_type=='出库')">
+                                    @{{ t }}</option>
                             </select>
                         </label>
                         <label class="col-2">

+ 1 - 1
resources/views/maintenance/priceModel/operation/create.blade.php

@@ -210,7 +210,7 @@
                     {id:"{{$unit->id}}",name:"{{$unit->name}}"},
                     @endforeach
                 ],
-                type : ['商品名称','订单类型','承运商','店铺类型'],
+                type : {!! json_encode(\App\Feature::type,JSON_UNESCAPED_UNICODE) !!},
                 logic : ['包含','不包含','等于'],
                 features : [],
                 thisIndex : "",

+ 1 - 1
resources/views/maintenance/priceModel/operation/index.blade.php

@@ -161,7 +161,7 @@
                 items : [],
                 updateDetailId : '',
                 units : null,
-                type : ['商品名称','订单类型','承运商','店铺类型'],
+                type : {!! json_encode(\App\Feature::type,JSON_UNESCAPED_UNICODE) !!},
                 logic : ['包含','不包含','等于'],
                 item : {
                     "strategy" : '特征',