Browse Source

采购列表添加创建时间显示

hu hao 4 years ago
parent
commit
d307e3edfb

+ 2 - 16
app/Http/Controllers/TestController.php

@@ -1364,25 +1364,11 @@ TEXT;
 
     public function testPrice()
     {
-        $configurationService=app(ConfigurationService::class);
-        $priceCoefficient=$configurationService->getPriceCoefficient();
         $procurement_unit_prices=[
-            '1298'=>8.3,
-            '1286'=>0.1,
-            '1285'=>2.9,
-            '1284'=>5.4,
-            '1281'=>5.7,
-            '1280'=>40,
-            '1279'=>1,
-            '1277'=>2.15,
-            '1275'=>0.25,];
+            '1297'=>1.8,
+            '1296'=>0.98,];
         foreach ($procurement_unit_prices as $key=>$value){
             Procurement::query()->find($key)->update(['unit_price'=>$value]);
         }
-        $procurement_ids=['1289','1288','1287','1274',];
-        foreach ($procurement_ids as $id){
-            $procurement=Procurement::query()->find($id);
-            $procurement->update(['unit_price'=>$procurement->cost_price*$priceCoefficient]);
-        }
     }
 }

+ 2 - 0
resources/views/procurement/procurement/index.blade.php

@@ -124,6 +124,7 @@
                 <td class="text-center"><span>@{{ procurement.unit_price }}</span></td>
                 <td class="text-center"><span v-if="procurement.deliver_amount">@{{ procurement.deliver_amount }}</span></td>
                 <td class="text-center"><span>@{{ (procurement.quantity*procurement.unit_price).toFixed(2) }}</span></td>
+                <td class="text-center"><span>@{{ procurement.created_at }}</span></td>
                 <td class="text-muted"><span v-if="procurement.supplier">@{{ procurement.supplier.phone }}</span></td>
             </tr>
         </table>
@@ -241,6 +242,7 @@
                     {name: 'unit_price', value: '销售单价(元)', neglect: true,class: 'text-center'},
                     {name: '送货数量', value: '送货数量', neglect: true,class: 'text-center'},
                     {name: '销售总价', value: '销售总价(元)', neglect: true,class: 'text-center'},
+                    {name: 'created_at', value: '创建时间', neglect: true,class: 'text-center'},
                     {name: '联系方式', value: '供应商联系方式', neglect: true,class: 'text-center'},
                 ];