소스 검색

Merge branch 'zzd' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 5 년 전
부모
커밋
25ef2bdedd

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

@@ -432,7 +432,7 @@ class CustomerController extends Controller
             'customer_id'=>['required'],
             'owner_group_id'=>['required'],
             'warehouse_id'=>['required'],
-            'tax_rate_id' => ["required",'integer'],
+            'tax_rate_id' => ["nullable",'integer'],
             'waring_line_on' => ["nullable",'integer'],
         ],[
             'required'=>':attribute 为必填项',

+ 3 - 18
app/Http/Controllers/TestController.php

@@ -178,24 +178,9 @@ class TestController extends Controller
 
     public function test()
     {
-    }
-    public function restoreBillReport()
-    {
-        $areas = OwnerAreaReport::query()->where("counting_month",'like','2021-04%')->whereNotNull("accounting_area")->where("owner_id",22)->get();
-        foreach ($areas as $area){
-            $report = OwnerBillReport::query()->lockForUpdate()->where("owner_id",$area->owner_id)
-                ->where("counting_month",'like',$area->counting_month."%")->first();
-            if ($report){
-                if (!$area->ownerStoragePriceModel)return false;
-                $storeFee = app("OwnerStoragePriceModelService")->calculationAmount($area->ownerStoragePriceModel, $area->accounting_area, $area->owner_id, $area->counting_month);
-                $up = ["storage_fee"=>$storeFee];
-                if ($report->confirm_fee !== null || $report->confirmed == '是'){
-                    $initial = $report->work_fee + $report->logistic_fee + $storeFee;
-                    $up["difference"] = $initial - $report->confirm_fee;
-                }
-                $report->update($up);
-            }
-        }
+        $order = Order::query()->find(2734474);
+        $ser = new OrderService();
+        $ser->createInstantBill($order);
     }
     public function restoreResetInstantBill()
     {

+ 4 - 3
resources/views/customer/project/create.blade.php

@@ -97,13 +97,13 @@
                     owner_group_id : "{{$owner->user_owner_group_id ?? ''}}",
                     user_workgroup_id : "{{$owner->user_workgroup_id ?? ''}}",
                     warehouse_id : "{{ $owner->warehouse_id ?? ''}}",
-                    tax_rate_id : "{{$owner->tax_rate_id ?? ''}}",
+                    tax_rate_id : "{{$owner->is_tax_exist}}"==='Y' ? '0' : "{{$owner->tax_rate_id ?? ''}}",
                     linkman : "{{$owner->linkman ?? ''}}",
                     phone_number : "{{$owner->phone_number ?? ''}}",
                     description : "{{$owner->description ?? ''}}",
                     waring_line_on : "{{$owner->waring_line_on ?? ''}}",
                     subjection : "{{$owner->subjection ?? ''}}",
-                    is_tax_exist : "{{$owner->is_tax_exist}}"=='Y',
+                    is_tax_exist : "{{$owner->is_tax_exist}}"==='Y',
                 },
                 ownerTemp : {},
                 customers : [
@@ -493,8 +493,9 @@
                     //if (!this.owner.tax_rate_id) error["tax_rate_id"] = ["必须选择税率"];
                     if (JSON.stringify(error) !== "{}"){
                         this.errors = error;
-                        return;
+                        return false;
                     }
+                    this.owner.is_tax_exist = this.owner.tax_rate_id==='0';
                     let url = "{{url('customer/project/projectUpdate')}}";
                     let params = this.owner;
                     let old = this.ownerTemp;

+ 2 - 0
resources/views/customer/project/part/_three.blade.php

@@ -78,6 +78,7 @@
                                     <label>@{{ operation.name }}</label><span class="badge badge-pill badge-danger" v-if="operation.isRejected">退</span>
                                     <label v-if="operation.remark" class="text-secondary">&nbsp;&nbsp;(@{{ operation.remark }})</label>
                                     <label v-if="operation.surcharge">耗材附加费:<b>@{{ operation.surcharge }}</b>/@{{ poolMapping.units ? poolMapping.units[operation.surcharge_unit_id] : '' }}</label>
+                                    <label v-if="operation.max_fee">封顶费:<b>@{{ operation.max_fee }}</b></label>
                                     <label v-if="operation.tax_rate_id">税率:@{{ poolMapping.taxRates ? poolMapping.taxRates[operation.tax_rate_id] : '' }}</label>
                                 </div>
                                 <div class="col-1">
@@ -126,6 +127,7 @@
                                     <label>@{{ operation.name }}</label>
                                     <label v-if="operation.remark" class="text-secondary">&nbsp;&nbsp;(@{{ operation.remark }})</label>
                                     <label v-if="operation.surcharge">耗材附加费:<b>@{{ operation.surcharge }}</b>/@{{ poolMapping.units ? poolMapping.units[operation.surcharge_unit_id] : '' }}</label>
+                                    <label v-if="operation.max_fee">封顶费:<b>@{{ operation.max_fee }}</b></label>
                                     <label v-if="operation.tax_rate_id">税率:@{{ poolMapping.taxRates ? poolMapping.taxRates[operation.tax_rate_id] : '' }}</label>
                                 </div>
                                 <div class="col-1">

+ 2 - 5
resources/views/customer/project/part/_two.blade.php

@@ -46,17 +46,14 @@
 <div class="row mt-3">
     <label for="tax_rate_id" class="col-2">税率</label>
     <select id="tax_rate_id" v-model="owner.tax_rate_id" class="form-control form-control-sm col-4 mb-0" :class="errors.tax_rate_id ? 'is-invalid' : ''" >
-        <option> </option>
+        <option value=""> </option>
+        <option value="0">子模型必填</option>
         <option v-for="taxRate in pool.taxRates" :value="taxRate.id">@{{ taxRate.value }}%</option>
     </select>
     <span class="invalid-feedback offset-2 mt-0" role="alert" v-if="errors.tax_rate_id">
         <strong>@{{ errors.tax_rate_id[0] }}</strong>
     </span>
 </div>
-<div class="row mt-3">
-    <label for="is_tax_exist" class="col-2">子模型必填税率</label>
-    <input type="checkbox" class="switch" id="is_tax_exist" v-model="owner.is_tax_exist">
-</div>
 <div class="row mt-3">
     <label for="waring_line_on" class="col-2">月单量预警</label>
     <input type="number" v-model="owner.waring_line_on" id="waring_line_on" class="form-control form-control-sm col-3 mb-0" :class="errors.waring_line_on ? 'is-invalid' : ''">