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

+ 1 - 1
app/Http/Controllers/CustomerController.php

@@ -97,7 +97,7 @@ class CustomerController extends Controller
         /** @var OwnerService $service */
         $service = app('OwnerService');
         $owners = $service->paginate(request()->input(),['customer',"userOwnerGroup","userWorkGroup",
-            "ownerStoragePriceModels"]);
+            "ownerStoragePriceModels","storageAudit","operationAudit","expressAudit","logisticAudit","directLogisticAudit"]);
         $models = app('OwnerService')->getIntersectPermitting();
         $customers = app('CustomerService')->getSelection();
         $ownerGroups = app('UserOwnerGroupService')->getSelection();

+ 1 - 1
app/Http/Controllers/PriceModelController.php

@@ -1152,7 +1152,6 @@ class PriceModelController extends Controller
     {
         $this->gate("项目管理-项目-录入");
         $params = request()->input();
-
         $params["owner_id"] = [$params["owner_id"]];
         $errors = $this->operationValidator($params,request("id"))->errors();
         if (count($errors)>0)$this->success(["errors"=>$errors]);
@@ -1160,6 +1159,7 @@ class PriceModelController extends Controller
         if (!request("owner_id"))$this->error("参数传递错误");
         $operation = [
             "name"              => request("name"),
+            "max_fee"           => request("max_fee") ?? null,
             "operation_type"    => request("operation_type"),
             "strategy"          => request("strategy"),
             "feature"           => request("feature"),

+ 4 - 5
app/Http/Controllers/TestController.php

@@ -166,28 +166,27 @@ class TestController extends Controller
 
     public function test()
     {
-        $ows = OwnerAreaReport::query()->select("owner_id")->where("counting_month",'like',"2021-03%")->get();
-        $owners = Owner::query()->whereNotIn("id",array_column($ows->toArray(),"owner_id"))->get();
-        dd($owners);
         return view("test");
     }
     public function supplementMarchOwnerReport()
     {
         $ows = OwnerAreaReport::query()->select("owner_id")->where("counting_month",'like',"2021-03%")->get();
         $owners = Owner::query()->whereNotIn("id",array_column($ows->toArray(),"owner_id"))->get();
+        $createOwnerAreaReport = [];
         foreach ($owners as $owner){
             if (!$owner->ownerStoragePriceModels)continue;
             foreach ($owner->ownerStoragePriceModels as $model){
                 $key = $owner->id."_".$model->id;
                 if (!isset($sign[$key])) $createOwnerAreaReport[] = [
                     "owner_id"              => $owner->id,
-                    "counting_month"        => 1,
+                    "counting_month"        => "2021-03-01",
                     "user_owner_group_id"   => $owner->user_owner_group_id,
-                    "created_at"            => 1,
+                    "created_at"            => "2021-04-15 00:00:00",
                     "owner_storage_price_model_id"  => $model->id,
                 ];
             }
         }
+        if ($createOwnerAreaReport)DB::table("owner_area_reports")->insert($createOwnerAreaReport);
     }
 
     public function assignBatch()

+ 1 - 0
app/OwnerPriceOperation.php

@@ -25,6 +25,7 @@ class OwnerPriceOperation extends Model
         "type_mark",        //类型标记
         "surcharge",        //附加费
         "surcharge_unit_id",//附加费单位
+        "max_fee",          //封顶费
     ];
     public static $features = null;
     public static $columnMapping = null;

+ 2 - 2
app/Services/OwnerPriceOperationService.php

@@ -332,12 +332,12 @@ class OwnerPriceOperationService
                 if (app("FeatureService")->matchFeature($rule->feature,$columnMapping,$matchObject)){
                     if ($rule->total_price)return ["id"=>$rule->id,"money"=>$result ? explode(",",$rule->total_discount_price)[key($result)] : $rule->total_price];//按单计价存在,直接返回单总价或减免总价
                     $money = $this->matchItem($rule,$columnMapping,$matchObject,$units,$ownerId,$result);
-                    if ($money>0)return ["id"=>$rule->id,"money"=>$money];
+                    if ($money>0)return ["id"=>$rule->id,"money"=>$rule->max_fee&&$money>$rule->max_fee ? $rule->max_fee : $money];
                 };
             }else{
                 if ($rule->total_price)return ["id"=>$rule->id,"money"=>$result ? explode(",",$rule->total_discount_price)[key($result)] : $rule->total_price]; //按单计价存在,直接返回单总价或减免总价
                 $money = $this->matchItem($rule,$columnMapping,$matchObject,$units,$ownerId,$result);
-                if ($money>0)return ["id"=>$rule->id,"money"=>$money];
+                if ($money>0)return ["id"=>$rule->id,"money"=>$rule->max_fee&&$money>$rule->max_fee ? $rule->max_fee : $money];
             };
         }
         return $money ?? -7;

+ 32 - 0
database/migrations/2021_04_16_114059_change_owner_operation_model_add_max_fee_column.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class ChangeOwnerOperationModelAddMaxFeeColumn extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table("owner_price_operations",function (Blueprint $table){
+            $table->decimal("max_fee",10,4)->nullable()->comment("封顶费");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table("owner_price_operations",function (Blueprint $table){
+            $table->dropColumn("max_fee");
+        });
+    }
+}

+ 5 - 0
resources/sass/text.scss

@@ -93,6 +93,11 @@
     max-width: 200px;
     white-space: normal;
 }
+//溢出换行无上限,有下限
+.warp-min-200{
+    max-width:100% !important;
+    min-width:200px;
+}
 //输入框font标签图
 .form-font{
     margin-bottom: 1.5px;

+ 2 - 2
resources/views/customer/project/create.blade.php

@@ -210,6 +210,8 @@
             },
             mounted(){
                 let type = "{{$type ?? ''}}";
+                this._resetOperation();
+                this.ownerTemp = JSON.parse(JSON.stringify(this.owner));
                 if (type){
                     this.base = "three";
                     this.type = "";
@@ -219,8 +221,6 @@
                         if (!this.isLoad && !this.ownerTemp.id) this.isLoad = true;
                     },0);
                 }
-                this._resetOperation();
-                this.ownerTemp = JSON.parse(JSON.stringify(this.owner));
                 $('[data-toggle="tooltip"]').tooltip();
                 $("#container").removeClass("d-none");
             },

+ 2 - 1
resources/views/customer/project/index.blade.php

@@ -66,7 +66,7 @@
                     <td><span>@{{ owner.customer_name }}</span></td>
                     <td><span>@{{ owner.user_owner_group_name }}</span></td>
                     <td><span>@{{ owner.user_work_group_name }}</span></td>
-                    <td><span><b>@{{owner.relevance ? owner.relevance.length : 0}}</b>/5</span></td>
+                    <td><span><b>@{{owner.relevance ? owner.relevance.length : 0}}</b>/5&nbsp;<span class="badge badge-success" v-if="owner.audit_count>0">@{{ owner.audit_count }}项待审</span></span></td>
                     <td><span>@{{ owner.created_at }}</span></td>
                     <td><span>@{{ owner.customer_company_name }}</span></td>
                     <td><span>@{{ ownerSubjection[owner.subjection] }}</span></td>
@@ -108,6 +108,7 @@
                         user_work_group_name:"{{$owner->userWorkGroup ? $owner->userWorkGroup->name : ''}}",
                         is_activation : "{{$owner->deleted_at ? '否' : '是'}}",
                         ownerStoragePriceModels : {!! $owner->ownerStoragePriceModels !!},
+                        audit_count:"{{count($owner->storageAudit)+count($owner->operationAudit)+count($owner->expressAudit)+count($owner->logisticAudit)+count($owner->directLogisticAudit)}}",
                     },
                     @endforeach
                 ],

+ 6 - 2
resources/views/customer/project/part/_operation.blade.php

@@ -79,6 +79,10 @@
         <label class="col-4 text-secondary">@{{ value ? (model.operation.discount_count[i+1] ? value+'-'+(model.operation.discount_count[i+1]-1)+' 单' : value+'+ 单') : '' }}</label>
     </div>
 </div>
+<div class="row mt-3">
+    <label class="col-2" for="max_fee">封顶费</label>
+    <input type="number" id="max_fee" step="0.01" min="0" class="form-control col-6" v-model="model.operation.max_fee">
+</div>
 <div class="row mt-3" v-if="!model.operation.isSingle">
     <div class="btn-group offset-1 col-9 mb-1">
         <button type="button" class="btn btn-outline-dark" @click="addOperationItem('起步')">新增起步</button>
@@ -123,8 +127,8 @@
                 <label class="col-3 mb-0"><select v-model="item.unit_id" class="form-control" :class="errors['items.'+i+'.unit_id'] ? 'is-invalid' : ''">
                     <option v-for="unit in pool.units" :value="unit.id" v-if="unit.name=='件' || unit.name=='箱'">@{{ unit.name }}</option>
                 </select></label>
-                <label class="col-2 text-right" v-if="model.operation.operation_type=='出库' && poolMapping.units[item.unit_id]=='箱'">零头价</label>
-                <label class="col-3 mb-0" v-if="model.operation.operation_type=='出库' && poolMapping.units[item.unit_id]=='箱'">
+                <label class="col-2 text-right" v-if="poolMapping.units[item.unit_id]=='箱'">零头价</label>
+                <label class="col-3 mb-0" v-if="poolMapping.units[item.unit_id]=='箱'">
                     <input class="form-control" :class="errors['items.'+i+'.odd_price'] ? 'is-invalid' : ''" v-model="item.odd_price" type="number" step="0.01" min="0">
                 </label>
             </div>

+ 8 - 4
resources/views/finance/instantBill.blade.php

@@ -47,8 +47,10 @@
                     <td :rowspan="bill.rowspan"><span>@{{ bill.ownerName }}</span></td>
                     <td :rowspan="bill.rowspan"><span>@{{ bill.workedAt }}</span></td>
                     <td :rowspan="bill.rowspan">
-                        <label v-if="bill.type == '增值服务'">服务<span class="badge badge-primary"><span>@{{ bill.methodName }}</span></span></label>
-                        <label v-else>@{{ bill.type }}</label>
+                        <span>
+                            <label v-if="bill.type == '增值服务'">服务<span class="badge badge-primary"><span>@{{ bill.methodName }}</span></span></label>
+                            <label v-else>@{{ bill.type }}</label>
+                        </span>
                     </td>
                     <td :rowspan="bill.rowspan"><span>@{{ bill.shopName }}</span></td>
                     <td :rowspan="bill.rowspan"><span>@{{ bill.operationBill }}</span></td>
@@ -56,8 +58,10 @@
                     <td :rowspan="bill.rowspan"><span>@{{ bill.consigneePhone }}</span></td>
                     <td><span>@{{ bill.commodityAmount }}</span></td>
                     <td>
-                        <span v-if="bill.rowspan <= 1">@{{ bill.logisticBill }}</span>
-                        <span v-else class="font-weight-bold text-secondary">分箱:</span>
+                        <span>
+                            <span v-if="bill.rowspan <= 1">@{{ bill.logisticBill }}</span>
+                            <span v-else class="font-weight-bold text-secondary">分箱:</span>
+                        </span>
                     </td>
                     <td><span>@{{ bill.volume }}</span></td>
                     <td><span>@{{ bill.weight }}</span></td>

+ 20 - 20
resources/views/maintenance/priceModel/menu.blade.php

@@ -5,26 +5,26 @@
             <li class="nav-item">
                 <a target="maintenance/priceModel/waybillPriceModel" class="nav-link" href="{{url('maintenance/priceModel/waybillPriceModel')}}" :class="{active:isActive('waybillPriceModel',3)}">运输付费</a>
             </li> @endcan
-            @can('计费模型-仓储')
-            <li class="nav-item">
-                <a target="maintenance/priceModel/storage" class="nav-link" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('storage',3)}">仓储计费</a>
-            </li> @endcan
-            @can('计费模型-作业')
-            <li class="nav-item">
-                <a target="maintenance/priceModel/operation" class="nav-link" href="{{url('maintenance/priceModel/operation')}}" :class="{active:isActive('operation',3)}">作业计费</a>
-            </li> @endcan
-            @can('计费模型-快递')
-            <li class="nav-item">
-                <a target="maintenance/priceModel/express" class="nav-link" href="{{url('maintenance/priceModel/express')}}" :class="{active:isActive('express',3)}">快递计费</a>
-            </li> @endcan
-            @can('计费模型-物流')
-            <li class="nav-item">
-                <a target="maintenance/priceModel/logistic" class="nav-link" href="{{url('maintenance/priceModel/logistic')}}" :class="{active:isActive('logistic',3)}">物流计费</a>
-            </li> @endcan
-            @can('计费模型-直发')
-            <li class="nav-item">
-                <a target="maintenance/priceModel/directLogistic" class="nav-link" href="{{url('maintenance/priceModel/directLogistic')}}" :class="{active:isActive('directLogistic',3)}">直发车计费</a>
-            </li> @endcan
+                {{--@can('计费模型-仓储')
+                <li class="nav-item">
+                    <a target="maintenance/priceModel/storage" class="nav-link" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('storage',3)}">仓储计费</a>
+                </li> @endcan
+                @can('计费模型-作业')
+                <li class="nav-item">
+                    <a target="maintenance/priceModel/operation" class="nav-link" href="{{url('maintenance/priceModel/operation')}}" :class="{active:isActive('operation',3)}">作业计费</a>
+                </li> @endcan
+                @can('计费模型-快递')
+                <li class="nav-item">
+                    <a target="maintenance/priceModel/express" class="nav-link" href="{{url('maintenance/priceModel/express')}}" :class="{active:isActive('express',3)}">快递计费</a>
+                </li> @endcan
+                @can('计费模型-物流')
+                <li class="nav-item">
+                    <a target="maintenance/priceModel/logistic" class="nav-link" href="{{url('maintenance/priceModel/logistic')}}" :class="{active:isActive('logistic',3)}">物流计费</a>
+                </li> @endcan
+                @can('计费模型-直发')
+                <li class="nav-item">
+                    <a target="maintenance/priceModel/directLogistic" class="nav-link" href="{{url('maintenance/priceModel/directLogistic')}}" :class="{active:isActive('directLogistic',3)}">直发车计费</a>
+                </li> @endcan--}}
         </ul>
     </div>
 </div>

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

@@ -46,7 +46,7 @@
                     <span v-else>/</span>
                 </td>
                 <td>@{{ model.feature }}</td>
-                <td><div class="text-overflow-warp-200">@{{ model.remark }}</div></td>
+                <td><div class="text-overflow-warp-200 warp-min-200">@{{ model.remark }}</div></td>
                 <td>@{{ model.createdAt }}</td>
                 <td>
                     @can("计费模型-作业-编辑")<button type="button" class="btn btn-sm btn-outline-info" @click="edit(model.id)">编辑</button>@endcan

+ 4 - 4
resources/views/order/index/delivering.blade.php

@@ -80,15 +80,15 @@
                             <span v-else>@{{ order.soreference5 }}</span>
                         </td>
                         <td class="text-muted text-wrap text-letter">
-                            <div class="text-overflow-warp-200">@{{ order.c_contact }}</div>
+                            <div class="text-overflow-warp-200 warp-min-200">@{{ order.c_contact }}</div>
                         </td>
                         <td class="text-muted text-wrap text-letter">
-                            <div class="text-overflow-warp-200 w-100">@{{ order.c_tel2?order.c_tel2:order.c_tel1 }}</div>
+                            <div class="text-overflow-warp-200 warp-min-200">@{{ order.c_tel2?order.c_tel2:order.c_tel1 }}</div>
                         </td>
                         <td class="text-nowrap"><span> @{{ order.c_province }}</span></td>
                         <td class="text-nowrap"><span> @{{ order.c_city }}</span></td>
-                        <td class="text-nowrap"><div class="text-overflow-warp-200">@{{ order.c_district }}</div></td>
-                        <td class="text-muted text-wrap text-letter"><div class="text-overflow-warp-200"><span>@{{ order.c_address1 }}</span></div></td>
+                        <td class="text-nowrap"><div class="text-overflow-warp-200 warp-min-200">@{{ order.c_district }}</div></td>
+                        <td class="text-muted text-wrap text-letter"><div class="text-overflow-warp-200 warp-min-200"><span>@{{ order.c_address1 }}</span></div></td>
                         <td class="text-nowrap"><span>@{{ order.waveno }}</span></td>
                         <td class="text-nowrap"><span> @{{ order.warehouseid }}</span></td>
                         <td class="text-nowrap"><span v-if="order.edisendflag2=='Y'">是</span><span v-if="order.edisendflag2=='N'">否</span><span v-if="order.edisendflag2=='W'">错误</span></td>

+ 2 - 2
resources/views/rejected/search/general.blade.php

@@ -87,10 +87,10 @@
                             <div class="w-100" :class="rejectedBill.items.length>1 ? 'up' : ''" :id="'rejected-'+rejectedBill.id">
                                 <div class="row" v-for="item in rejectedBill.items">
                                     <div class="col-2 border border-1">
-                                        <div class="w-100 text-overflow-warp-200">@{{item.barcode_goods}}</div>
+                                        <div class="w-100 text-overflow-warp-200 warp-min-200">@{{item.barcode_goods}}</div>
                                     </div>
                                     <div class="col-2 border border-1">
-                                        <div class="w-100 text-overflow-warp-200">@{{item.name_goods}}</div>
+                                        <div class="w-100 text-overflow-warp-200 warp-min-200">@{{item.name_goods}}</div>
                                     </div>
                                     <div class="col-1 border border-1">@{{item.amount}}</div>
                                     <div class="col-1 border border-1">@{{item.quality_label}}</div>

+ 71 - 8
resources/views/test.blade.php

@@ -16,7 +16,7 @@
     </style>
     <link href="{{ mix('css/app.css') }}" rel="stylesheet">
 </head>
-<body>
+<body onload="a()">
 <button></button>
 <table id="table" cellspacing="0" cellpadding="2" width="100%" border="1">
     <tr id="test" style="white-space: nowrap !important;">
@@ -36,12 +36,75 @@
         <td>162</td>
     </tr>
 </table>
-    <script type="text/javascript">
-        document.oncopy = () => { // 监听浏览器复制事件
-            event.preventDefault();
-            let content = window.getSelection().toString();
-            event.clipboardData.setData("text", content.replace(/[\n\r]/g,' '));
-        };
-    </script>
+<div class="modal fade" tabindex="-1" role="dialog" id="auditOrRecover">
+    <div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal">&times;</button>
+            </div>
+            <div class="modal-body">
+                <div v-for="s in auditList.storage" class="row">
+                    <label class="col-3 text-right">@{{ s.name }}</label>
+                    <label class="col-1 h3" style="bottom: 0.25rem">
+                        <span class="fa fa-long-arrow-right"></span>
+                    </label>
+                    <div class="col-8 h4">
+                        <div v-if="s.operation == 'C'" class="row">
+                            <div class="col-2">
+                                <span class="badge badge-success">新增</span>
+                            </div>
+                            <div class="col-10">
+                                <div v-for="(val,key) in s" v-if="key!='name'">
+
+                                </div>
+                            </div>
+                        </div>
+                        <div v-if="s.operation == 'U'" class="row">
+                            <div class="row">
+                                <div class="col-2">
+                                    <span class="badge badge-primary">修改</span>
+                                </div>
+                                <div class="col-10">
+
+                                </div>
+                            </div>
+                        </div>
+                        <div v-if="s.operation == 'D'" class="row">
+                            <span class="badge badge-danger">删除</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="modal-footer">
+
+            </div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" src="{{mix("js/app.js")}}"></script>
+<script type="text/javascript">
+    function a(){
+        $("#auditOrRecover").modal("show");
+    }
+    new Vue({
+        el:"#auditOrRecover",
+        data:{
+            auditList:{
+                storage:[
+                    {name:"笕尚退货",operation:"C"},
+                    {name:"笕尚退货",operation:"U"},
+                    {name:"笕尚退货",operation:"D"}
+                ],
+                operation:[],
+                express:[],
+                logistic:[],
+                directLogistic:{},
+                mapping:{
+                    "storage.name":"名称",
+                },
+            },
+        },
+    });
+</script>
 </body>
 </html>