mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 606325706e | |||
| 742d26bdd3 | |||
| 308a1bcdc0 | |||
| f0f70e421e | |||
| 3dff650b04 | |||
| 5a55b4ccf2 | |||
| 303b1abff1 | |||
| 69a2743056 | |||
| cf49a661e1 | |||
| 4bcb67e972 | |||
| e8564ee3b5 | |||
| 23e5e1e268 | |||
| cce1979388 | |||
| f39f9ee2a7 | |||
| c1cf22544f | |||
| 321002ed04 | |||
| de237a4110 | |||
| ee408da523 | |||
| de797d65ee | |||
| 9831ff29af | |||
| 0102dabdba | |||
| 86913ad80b | |||
| fad2685534 | |||
| 589422a9a8 | |||
| e2b96d7281 | |||
| df14f196b9 | |||
| 7698c35b85 | |||
| 88c0b4303e | |||
| c4eec73803 | |||
| 8e0d23a208 | |||
| 2a077edcde | |||
| 27940854e2 | |||
| 35dec3042b | |||
| 918db70429 | |||
| 1796ddefbf | |||
| 31e28c3dfa | |||
| faf4d35340 | |||
| 4fef6f8e6f | |||
| 5d504b5111 | |||
| 3854884370 | |||
| fe70c4b111 | |||
| dad2f95eaa | |||
| 764e709135 | |||
| 9b35f8c374 | |||
| 2e03ce370d | |||
| d972e98732 | |||
| 9041d9623b | |||
| f4a96fec78 | |||
| c299c60d38 | |||
| 96eeb5a63e | |||
| fc6c365792 | |||
| 6094adadec | |||
| 78ce2084b9 | |||
| 4fb284c85c | |||
| 9e060bccd3 | |||
| 3100d42bd7 | |||
| 0640e0de9b | |||
| aa1d1dccc5 | |||
| e369bc7f9e | |||
| 6713542dc9 | |||
| f73094ca06 | |||
| 453683ca76 | |||
| e8eb02430b | |||
| 6507b84e55 | |||
| eab465e837 | |||
| 1cc0303539 | |||
| 305ae6c217 | |||
| bcd926b4c9 | |||
| 4e4475ad12 | |||
| a287a1193a | |||
| a80b3013c3 |
@@ -2,19 +2,18 @@
|
||||
|
||||
namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\Order;
|
||||
use App\Models\PackingList;
|
||||
use Carbon\Carbon;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Carbon\Carbon;
|
||||
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
|
||||
use App\Classes\ValueObjects\Constants\RoleTypes;
|
||||
|
||||
class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize, FromCollection
|
||||
class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize, FromQuery
|
||||
{
|
||||
|
||||
use Exportable;
|
||||
@@ -36,31 +35,19 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection|mixed
|
||||
*/
|
||||
public function collection()
|
||||
public function query()
|
||||
{
|
||||
$returnArray = collect();
|
||||
|
||||
$packingLists = PackingList::where('type', '=', 1)->where('status', '=', 2)->get();
|
||||
$exceptionUsers = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]);
|
||||
|
||||
foreach($packingLists as $packingList){
|
||||
$packages = !$packingList->packingLists()->exists() || $exceptionUsers ? $packingList->packages : $packingList->packingLists->first()->packages;
|
||||
foreach ($packages as $package) {
|
||||
$returnArray->push($package);
|
||||
}
|
||||
}
|
||||
|
||||
return $returnArray;
|
||||
return PackingList::where('type', '=', 1)->where('status', '=', 2)->where('owner_type', Order::class)->whereHas('transports', function($query){
|
||||
return $query->where('drop_date', '>=',Carbon::now()->subMonth());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReturnArray $returnArray
|
||||
*
|
||||
* @param $packingList
|
||||
* @return array
|
||||
*/
|
||||
public function map($package): array
|
||||
public function map($packingList): array
|
||||
{
|
||||
$packingList = $package->packingList;
|
||||
$order = $packingList->owner;
|
||||
|
||||
$connection = $order->companyModule()->first()->inviters()->withPivot('invitee_reference')->first();
|
||||
@@ -68,7 +55,9 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
|
||||
$warehouse = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee;
|
||||
|
||||
$cbm = (($package->width / 100) * ($package->height / 100) * ($package->length / 100)) * $package->quantity;
|
||||
$cbm = $packingList->packages->sum(function($package){
|
||||
return (($package->width / 100) * ($package->height / 100) * ($package->length / 100)) * $package->quantity;
|
||||
});
|
||||
|
||||
$arrival_date = $packingList->transports()->first()->drop_date->format('d-m-Y');
|
||||
|
||||
@@ -77,8 +66,8 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
$marking,
|
||||
$warehouse->reference,
|
||||
$cbm,
|
||||
$package->description,
|
||||
$package->quantity,
|
||||
$packingList->packages->implode('description', ', '),
|
||||
$packingList->packages->sum('quantity'),
|
||||
$arrival_date,
|
||||
''
|
||||
];
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\Order;
|
||||
use App\Models\PackingList;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
@@ -46,6 +47,7 @@ class ExportsOnHoldPackingList implements FromQuery, WithHeadings, WithHeadingRo
|
||||
$container = $packingList->containers()->first();
|
||||
$ContainerTransport = $container->transports()->first();
|
||||
$order = $packingList->owner;
|
||||
if(!$order instanceof Order)return [];
|
||||
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
|
||||
|
||||
return [
|
||||
|
||||
@@ -67,7 +67,7 @@ class CreateOrderLogic extends AbstractControllerLogic
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $request->input('warehouse_id')]);
|
||||
|
||||
if(!in_array($company->companyModules()->importers()->first()->id, WarehouseReferences::YD_EXEMPT_LIST)){
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['reference' => $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? WarehouseReferences::YD_GUANG_ZHOU_2 : WarehouseReferences::YD_YIWU]);
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['reference' => $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? WarehouseReferences::YD_GUANG_ZHOU : WarehouseReferences::YD_YIWU]);
|
||||
}
|
||||
|
||||
if($originWarehouse->reference === WarehouseReferences::YD_YIWU && in_array($address->state_id, [5, 13, 14])) {
|
||||
|
||||
+8
-8
@@ -126,7 +126,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
$start = $start ? $start : Carbon::now()->subDays(10);
|
||||
$start = $start ? $start : Carbon::now()->subDays(30);
|
||||
|
||||
$startLimit = Carbon::parse('11-08-2021');
|
||||
|
||||
@@ -142,27 +142,27 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
$containers = $this->fetchesDataFRomVTPortal->getResponseBody($containersRequest);
|
||||
|
||||
foreach ($containers->Rows as $container){
|
||||
$filter = '["ContainerID:=%js%'.$container[11].'"]';
|
||||
$containerDetailRequest = $this->fetchesDataFRomVTPortal->clientRequest('http://portal.vtnation.com.my/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"VPodetailparcel","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":"CreatedOn asc","Filter":'.$filter.'}}'), '');
|
||||
$filter = '["ContainerID:=%js%'.$container[12].'"]';
|
||||
$containerDetailRequest = $this->fetchesDataFRomVTPortal->clientRequest('http://portal.vtnation.com.my/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"ParcelInContainer","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":null,"Filter":'.$filter.'}}'), '');
|
||||
|
||||
$containerDetail = $this->fetchesDataFRomVTPortal->getResponseBody($containerDetailRequest);
|
||||
|
||||
$containerObject = new ContainerObject($container[0], str_replace(' ', '', $container[24]), str_replace(' ', '', $container[15]), ContainerTypes::FORTY_FEET_DRY_CONTAINER, Carbon::parse($container[5]), ApprovalStatus::PENDING_VERIFICATION);
|
||||
$containerObject = new ContainerObject($container[0], str_replace(' ', '', $container[24]), str_replace(' ', '', $container[16]), ContainerTypes::FORTY_FEET_DRY_CONTAINER, Carbon::parse($container[6]), ApprovalStatus::PENDING_VERIFICATION);
|
||||
|
||||
try {
|
||||
$container = $this->fetchesContainer->execute(['reference' => $containerObject->getReference()]);
|
||||
} catch (ResourceNotFoundException $exception){
|
||||
$warehouseId = $container[12];
|
||||
$warehouseId = $container[13];
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $warehouseId === 11 ? 3 : 4]);
|
||||
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
|
||||
}
|
||||
|
||||
foreach($containerDetail->Rows as $packingList){
|
||||
$marking = preg_split('(-|\(|\)|\/)', str_replace("/YW","", $packingList[13]));
|
||||
$marking = preg_split('(-|\(|\)|\/)', str_replace("/YW","", $packingList[39]));
|
||||
|
||||
$orderNumber = $marking[array_key_last($marking)];
|
||||
|
||||
if(!$packingList[22]){
|
||||
if(!$packingList[11]){
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
continue;
|
||||
}
|
||||
|
||||
$packingListReference = $packingList[16];
|
||||
$packingListReference = $packingList[6];
|
||||
|
||||
try{
|
||||
$this->fetchesPackingList->execute(['reference' => $packingListReference]);
|
||||
|
||||
+2
-2
@@ -136,7 +136,7 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
public function execute(?Carbon $start = null, ?Carbon $end = null)
|
||||
{
|
||||
try {
|
||||
$start = $start ? $start : Carbon::now()->subMonths(2);
|
||||
$start = $start ? $start : Carbon::now()->subMonths(1);
|
||||
|
||||
$startLimit = Carbon::parse('01-12-2021');
|
||||
|
||||
@@ -222,7 +222,7 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
$unstuffingDate = Carbon::parse($trackingRow->trackingtime);
|
||||
}
|
||||
|
||||
if (Str::contains($trackingRow->tracking, ['派送中'])) {
|
||||
if (Str::contains($trackingRow->tracking, ['派送中', '签收完成', ' 第三方提货', '货物已派送完成'])) {
|
||||
$deliveryDate = Carbon::parse($trackingRow->trackingtime);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-11
@@ -128,19 +128,18 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
|
||||
|
||||
$filter = '["ParcelDate:$between$%js%\"'.$start->format('Y-m-d').'T00:00:00.000\"$and$%js%\"'.$end->format('Y-m-d').'T00:00:00.000\"\u0000"]';
|
||||
|
||||
$warehouseListRequest = $this->fetchesDataFRomVTPortal->clientRequest('http://portal.vtnation.com.my/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"WarehouseList","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":"ParcelDate asc","Filter":'.$filter.'}}'), '');
|
||||
$warehouseListRequest = $this->fetchesDataFRomVTPortal->clientRequest('http://portal.vtnation.com.my/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"Parcel","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":"ParcelDate asc","Filter":'.$filter.'}}'), '');
|
||||
|
||||
$response = $this->fetchesDataFRomVTPortal->getResponseBody($warehouseListRequest);
|
||||
|
||||
foreach ($response->Rows as $parcel){
|
||||
|
||||
$marking = preg_split('(-|\(|\)|\/)', str_replace("/YW","", $parcel[5]));
|
||||
$marking = preg_split('(-|\(|\)|\/)', str_replace("/YW","", $parcel[29]));
|
||||
$orderNumber = $marking[array_key_last($marking)];
|
||||
|
||||
if(!$parcel[9]){
|
||||
if(!$parcel[3]){
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$order = $this->fetchesOrder->execute(['reference' => $orderNumber]);
|
||||
} catch (ResourceNotFoundException $exception) {
|
||||
@@ -176,7 +175,7 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
|
||||
}
|
||||
|
||||
|
||||
$warehouseId = $parcel[0];
|
||||
$warehouseId = $parcel[44];
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $warehouseId === 11 ? 3 : 4]);
|
||||
|
||||
$order = $this->createOrderProcessor->execute($companyModule->company, $originWarehouse, $address, $orderNumber);
|
||||
@@ -186,11 +185,11 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
|
||||
|
||||
}
|
||||
|
||||
$packingListReference = $parcel[17];
|
||||
$quantity = $parcel[9];
|
||||
$measurement = round(($parcel[10]/$quantity) ** (1/3) * 100, 2);
|
||||
$description = $parcel[7];
|
||||
$tracking = $parcel[6];
|
||||
$packingListReference = $parcel[0];
|
||||
$quantity = $parcel[3];
|
||||
// $measurement = round(($parcel[10]/$quantity) ** (1/3) * 100, 2);
|
||||
$description = $parcel[31];
|
||||
$tracking = $parcel[38];
|
||||
$receiveDate = $parcel[1];
|
||||
|
||||
$packingListObject = new PackingListObject($packingListReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee->id, PackingListType::WAREHOUSE_RECEIVE_LIST, ApprovalStatus::APPROVED);
|
||||
@@ -216,7 +215,7 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
|
||||
$packingList->packages()->delete();
|
||||
if($replica) $replica->packages()->delete();
|
||||
|
||||
$packageObject = new PackageObject(PackageType::CARTON, $description, $measurement, $measurement, $measurement, 0, $quantity, ApprovalStatus::APPROVED);
|
||||
$packageObject = new PackageObject(PackageType::CARTON, $description, $parcel[10], $parcel[9], $parcel[8], 0, $quantity, ApprovalStatus::APPROVED);
|
||||
$this->createPackageProcessor->execute($packageObject, $packingList);
|
||||
}
|
||||
} catch (\Exception $exception){
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Segments\ControllersLogic;
|
||||
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Segments\Services\ListsSegments;
|
||||
use App\Http\Resources\AirShipmentItemPriceResource;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ListAirShipmentPriceLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Retrieved Air Shipment Price List',
|
||||
'message' => 'You have successfully retrieved a list of Air Shipment Price'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var ListsSegments */
|
||||
private $listsSegments;
|
||||
|
||||
/**
|
||||
* ListSegmentLogic constructor.
|
||||
* @param ListsSegments $listsSegments
|
||||
*/
|
||||
public function __construct(ListsSegments $listsSegments)
|
||||
{
|
||||
$this->listsSegments = $listsSegments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
|
||||
// $query = $this->listsSegments->execute($this->listsSegments->deserializeFilters($request->input('filters')));
|
||||
|
||||
// category - Dimension / perKg
|
||||
$price = array(
|
||||
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Sound system speakers - MINI',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '50',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Sound system speakers - SMALL',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '200',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Sound system speakers - LARGE',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '400',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Washing Machine - Dimension',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => 'true',
|
||||
'tax' => '',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Oven, Balnder - perPcs',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '20',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Perfume - perKg',
|
||||
'pricePerKg' => '33',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Gold - Prohibited',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => 'true',
|
||||
'hasGram' => '',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '',
|
||||
])
|
||||
],
|
||||
[
|
||||
'details' => json_encode([
|
||||
'name' => 'Food - hasGram',
|
||||
'pricePerKg' => '',
|
||||
'pricePerPcs' => '',
|
||||
'isProhibited' => '',
|
||||
'hasGram' => 'true',
|
||||
'hasDimensionCharges' => '',
|
||||
'tax' => '',
|
||||
])
|
||||
],
|
||||
);
|
||||
|
||||
return $this->collectionResponse(AirShipmentItemPriceResource::collection($price));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,7 +43,7 @@ final class WarehouseReferences {
|
||||
|
||||
public const YD_DESTINATION_WAREHOUSE = self::YD_KLANG;
|
||||
|
||||
public const YD_EXEMPT_LIST = [230, 294, 320, 652, 1248, 1726];
|
||||
public const YD_EXEMPT_LIST = [230, 294, 320, 652, 1248, 1726, 2349];
|
||||
|
||||
public const REPLICA_WHITE_LIST = [502];
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Segments;
|
||||
|
||||
use App\Classes\Modules\Segments\ControllersLogic\ListAirShipmentPriceLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ListAirShipmentPriceController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param ListSegmentLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function list(Request $request, ListAirShipmentPriceLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class AirShipmentItemPriceResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$object = $this->resource;
|
||||
$detailsArray = (array)json_decode($object['details']);
|
||||
|
||||
return [
|
||||
'name' => $detailsArray['name'],
|
||||
'details' => $object['details'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 959 KiB |
+13
@@ -70,10 +70,23 @@
|
||||
<order-form-component v-show="$store.getters.isShowing('createOrderForm')" :company="company" :section="section"></order-form-component>
|
||||
</div>
|
||||
</div>
|
||||
<component is="h1">{{children}}</component>
|
||||
</template>
|
||||
export function Heading({element: Element = 'h2', children, id}: HeadingProps) {
|
||||
return (
|
||||
<Element className={styles.Heading} id={id}>
|
||||
{children}
|
||||
</Element>
|
||||
);
|
||||
}
|
||||
<script>
|
||||
import styles from './Heading.scss';
|
||||
export default {
|
||||
props: {
|
||||
element: {
|
||||
type: String,
|
||||
default: 'h2'
|
||||
},
|
||||
company_id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
</div>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col-8">
|
||||
<p class="m-b-0 text-danger m-t-15" v-if="parameters.warehouse_id === 3">近期由于船期的安排和马来西亚海关的运作等一些不可控因数,导致船期延迟,请大家提前做好采购安排。若有不便之处,敬请谅解。 <br>Due to inevitable circumstances, shipping arrangements and Malaysia custom clearance may have delays. Kindly plan your purchases in advance, thank you for your cooperation.</p>
|
||||
<p class="m-b-0 text-danger m-t-15" v-if="parameters.warehouse_id === 4">由于义乌船期不稳定,建议发广州仓库。<br>Due to unexpected shipping delays for Yiwu warehouse, you may select an alternative warehouse.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,458 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col no-margin">
|
||||
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
|
||||
<div class="row align-content-center h-100" v-if="step === 1">
|
||||
<div class="col-8">
|
||||
<div class="row m-b-20">
|
||||
<div class="col-12 col-md-7">
|
||||
<div class="row m-b-10 text-info">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 m-t-0 bold">Service Type</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col p-l-5">
|
||||
<div class="b-a b-thick p-t-15 p-b-15 p-l-35 p-r-35 pointer" :class="{ 'b-info': parameters.type === 1, 'b-grey': parameters.type !== 1 }" @click="parameters.type = 1">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABmJLR0QA/wD/AP+gvaeTAAAEJklEQVR4nO3aS6hVVRzH8c8tsUKvjWoQBGGPSZFGg0ot8+YgMBoKEQhBBBFNokFkUhOzGjSoUVnUMIugUQ8pe4gVRhFISpMI7UpGpuiN3vc0WOt0ttt93nufvW93fWFxNov9/6///p211l7rvzaJRCKRSCQSiUQikUgkEolEIpFIJBY5S/E0jqJVUZnDAWzHpZN5rMnxlOqEKyqncM9EnmxCzAoPdtOQdm1BBmEZbsbr0WYe9w7ZXmMZRogy7O4XBPwT60awbxyTFpAw57bwIy4Z0UdjqEPAc/FetP9UeJEtWOoQEC7Gkejj2TH81E5dAsIN+D362Tymr9qoU0B4IPo5jatL8Ddx6hYQXom+vsWFJfmcGE0Q8AJ8Gf29hamS/E6EJggIl+F49PlwiX4rpykCwp3CIvsvzJTpeEr5wS4EvsP7sbwrvGhGYjEK+Kuwh27zG/ZidywHhnVYxZAhBPXJBO0GZSk2YIfwgvnHmVmdo3gVdwuL8r5UJeBC4SLcJSx52hmkdpnHV0JqbgbnFTlY7ALmuQYP4R1huGcF/QlbsSRrUJScPIzbxwxknzAcx7XbWxDfKH5H4XxsxDP4OtP+m0LigoLgsiKOQ1lzYJGAVc6RvVgrpMpa2NKuLBrCaVh3Z7OgzWftiiRgbzZhP/5w9hkMqhvCZc2BdbJJ74Ms53QxPIL7xmx83mi9eFS7Kngi/j4iLGGmFCQk0nDtzilBm+W5+r49MBHYH38f1ON8paoe+H+YA2fwtxHmwG5sxE4hwzuHk8Lm+0XhLDY7PzRxDszHPxevd+K2gvv34A58IZw3FzJID7xc8YI2X3YLCcymMWj8H2PlAP7O0KyfgOuEntYSVuGPYpWQElqG1cL+sL1CP4HrB32yCTBs/Cexpo/PgQW8ShCkhdec/TbKMo1d8d6f8bn658BR4/8FV3SJZ5+OZqvoLuCU0KXbjQ9yIDOl86FPC28PYJOnrHzguPHv6RJPdir4nu4C3qrT7Xv9c3mmcSzarh/CrmzKiP+WHve10Or1Fm5nG54T3lZtsh9OzgqZ3ewa6TSez/mog4nF387C5ifOg7H+2lx90YeTT+buWR3rDw4SQI6y5sAy4v+mh///Ru6OAofZku/+WcHXxuvZ3D3TfXxOslQZ/+EleDwabTHcN3XZSbmqhW+VjBt/34RLtyFQ1GO35+4ZZAhUTe3xvxydbM3VL41BzOKH2Hh+o70t2r40TgBjUnv863WWAdND2K0QTq9awgfgddGI+D+KjnYZfCH6RrT5YNzGS6D2+K8UtjUtYYXe659ckWn8uLCBr5tGxL9GZz95DI/hOmF5sDxeb9Pp9idwY1mNl0Aj4l+pMxx6lQ81M53VmPhn8AIO6SQkD8W6DVU2XBILPf5EIpFIJBKJRCKRSCQSiUQiUSP/AlkkSdKJddQ3AAAAAElFTkSuQmCC" class="w-100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="no-margin" :class="{ 'text-info': parameters.type === 1, 'semi-bold': parameters.type === 1}">Pick Up</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-r-5">
|
||||
<div class="b-a b-thick p-t-15 p-b-15 p-l-35 p-r-35 pointer" :class="{ 'b-info': parameters.type === 2, 'b-grey': parameters.type !== 2 }" @click="parameters.type = 2">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<img src="data:image/png;base64,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" class="w-100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="no-margin"></h5>
|
||||
<h5 class="no-margin" :class="{ 'text-info': parameters.type === 2, 'semi-bold': parameters.type === 2}">Drop Off</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20" v-if="parameters.type !== ''">
|
||||
<div class="col bg-master-lightest p-t-15">
|
||||
<div class="row m-b-20 text-info">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 m-t-0 bold">Packing list</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component selectable class="m-b-15" :validator="$v.productType">
|
||||
<label>Product Type</label>
|
||||
<selectable-component :endpoint="route('api.segment.air_shipment.price.list')" :section="section" valueColumn="details" :labelColumn="['name']" v-model="productType"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.productDesc">
|
||||
<label>Product Description</label>
|
||||
<input class="form-control" v-model="parameters.product.productDesc">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.quantity">
|
||||
<label>Quantity</label>
|
||||
<input class="form-control" type="number" v-model="parameters.product.quantity">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.totalWeight">
|
||||
<label>Total Weight (KG)</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.product.totalWeight" v-money="weight">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col" v-if="productTypeArray['hasGram'] === 'true'">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.gram">
|
||||
<label>Gram</label>
|
||||
<input class="form-control" v-model="parameters.product.gram">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="productTypeArray['hasDimensionCharges'] === 'true'">
|
||||
<div class="col-4">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.width">
|
||||
<label>Width</label>
|
||||
<input class="form-control" v-model="parameters.product.width">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.length">
|
||||
<label>Length</label>
|
||||
<input class="form-control" v-model="parameters.product.length">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.product.height">
|
||||
<label>Height</label>
|
||||
<input class="form-control" v-model="parameters.product.height">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="productTypeArray['isProhibited'] === 'true'" class="text-danger text-center">This item is blacklisted to ship to bangladish. <span class="text-underline text-complete">Black listed items list</span></p>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="btn btn-complete w-100 m-b-15 padding-10" :class="{'disabled': productTypeArray['isProhibited'] === 'true', 'not-allowed': productTypeArray['isProhibited'] === 'true'}" @click="addProduct()">Add Product</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="margin-15 padding-15 bg-master-lightest">
|
||||
<p class="m-b-15 bold fs-18">Order Summary</p>
|
||||
<p class="m-b-15 bold fs-15">Products</p>
|
||||
<div class="row" v-if="productList.length != 0">
|
||||
<div class="col">
|
||||
<div class="row m-l-0 m-r-0 m-b-10" v-for="(cartItem, index) in productList">
|
||||
<div class="col p-t-10 p-b-10 bg-white">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="bold no-margin">{{cartItem.productDesc}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="muted no-margin">{{ cartItem.quantity }} X {{ cartItem.productType }} - {{ cartItem.totalWeight }}KG</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto bg-white pointer" @click="removeElement(index)">
|
||||
<div class="row h-100 align-content-center justify-content-center">
|
||||
<div class="col">
|
||||
<i class="fa fa-times fs-12"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-l-0 m-r-0 m-b-10 b-a rounded b-primary-light" v-if="parameters.product.productDesc != '' || productType != ''">
|
||||
<div class="col p-t-10 p-b-10 bg-white">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="bold no-margin">{{parameters.product.productDesc}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="muted no-margin">{{parameters.product.quantity}} X {{ productTypeArray['name'] }} - {{ parameters.product.totalWeight }}KG</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="parameters.product.productDesc == '' && productType == '' && productList.length == 0">
|
||||
<div class="col">
|
||||
<p class="muted">There are no items added yet!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="bold fs-15">Quotation</p>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Total Weight</div>
|
||||
<div class="col">{{ parameters.totalWeight }} kg</div>
|
||||
</div>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Service Type</div>
|
||||
<div class="col">{{ parameters.type === 1 ? 'Pick Up' : parameters.type === 2 ? 'Drop Off' : '' }}</div>
|
||||
</div>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Price Per kg</div>
|
||||
<div class="col">{{ parameters.pricePerKg }} RM</div>
|
||||
</div>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Shipping Fee</div>
|
||||
<div class="col">{{ parameters.totalShipping }} RM</div>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col">Special Product Tax</div>
|
||||
<div class="col">{{ parameters.totalTax }} RM</div>
|
||||
</div>
|
||||
<p class="text-complete text-underline pointer">What is this cost?</p>
|
||||
<div class="row m-t-15 justify-content-between">
|
||||
<div class="col fs-20 bold">Total</div>
|
||||
<div class="col fs-20 bold">{{ parameters.totalCombine }} RM</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col">
|
||||
<div class="btn btn-success w-100 m-b-15 padding-10" @click="step++">Procced Next</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="step === 2">
|
||||
<div class="col">
|
||||
<new-registration-form-component section="loginSection"></new-registration-form-component>
|
||||
<div class="row m-t-15">
|
||||
<div class="col-auto">
|
||||
<div class="btn btn-default w-100 m-b-15 padding-10" @click="step--">back</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="btn btn-success w-100 m-b-15 padding-10" @click="step++">Procced Next</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="step === 3">
|
||||
<div class="col-8">
|
||||
<div class="row m-t-20">
|
||||
<div class="col bg-master-lightest p-t-15">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.pickUpAddress">
|
||||
<label>Pick up address</label>
|
||||
<input class="form-control" v-model="parameters.pickUpAddress">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.pickUpDate">
|
||||
<label>Pick up date</label>
|
||||
<date-picker-component v-model.lazy="parameters.pickUpDate"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.deliveryAddress">
|
||||
<label>Delivery address</label>
|
||||
<input class="form-control" v-model="parameters.deliveryAddress">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<p>Addon Wrapping service</p>
|
||||
<div class="row m-l-5">
|
||||
<div class="col-4 p-r-10 p-l-0">
|
||||
<div class="padding-20 bg-master-light text-center pointer" @click="parameters.wrappingService = 'Pick Up' " :class="{'bg-complete-light': parameters.wrappingService === 'Pick Up', 'text-white': parameters.wrappingService === 'Pick Up',}">
|
||||
Wrap my goods
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 p-l-10">
|
||||
<div class="padding-20 bg-master-light text-center pointer" @click="parameters.wrappingService = 'Drop Off'" :class="{'bg-complete-light': parameters.wrappingService === 'Drop Off', 'text-white': parameters.wrappingService === 'Drop Off',}">
|
||||
No Thanks
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="margin-15 padding-15 bg-master-lightest">
|
||||
<p class="m-b-15 bold fs-18">Order Summary</p>
|
||||
<div class="row m-b-15">
|
||||
<div class="col">
|
||||
<p class="bold fs-15">Products</p>
|
||||
<p>1x product1 </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="bold fs-15">Quotation</p>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Total Weight</div>
|
||||
<div class="col">15 kg</div>
|
||||
</div>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Service Type</div>
|
||||
<div class="col">{{ parameters.servicetype }}</div>
|
||||
</div>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Price Per kg</div>
|
||||
<div class="col">26 RM</div>
|
||||
</div>
|
||||
<div class="row justify-content-between m-b-5">
|
||||
<div class="col">Shipping Fee</div>
|
||||
<div class="col">200 RM</div>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col">Special Product Tax</div>
|
||||
<div class="col">50 RM</div>
|
||||
</div>
|
||||
<p class="text-complete text-underline pointer">What is this cost?</p>
|
||||
<div class="row m-t-15 justify-content-between">
|
||||
<div class="col fs-20 bold">Total</div>
|
||||
<div class="col fs-20 bold">50 RM</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col">
|
||||
<div class="btn btn-success w-100 m-b-15 padding-10" @click="step++">Procced Next</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
import { VMoney } from 'v-money'
|
||||
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
section: 'createDelvieryOrderSectionComponent',
|
||||
weight: {decimal: '.',thousands: ',', precision: 1},
|
||||
step: 1,
|
||||
productType: '',
|
||||
productList: [],
|
||||
parameters : {
|
||||
type: '',
|
||||
|
||||
product: {
|
||||
productType: '',
|
||||
productDesc: '',
|
||||
quantity: '1',
|
||||
totalWeight: 10,
|
||||
gram: '',
|
||||
width: '',
|
||||
length: '',
|
||||
height: '',
|
||||
},
|
||||
|
||||
pickUpAddress: '',
|
||||
pickUpDate: '',
|
||||
deliveryAddress: '',
|
||||
wrappingService: '',
|
||||
|
||||
tax: 0,
|
||||
totalWeight: 0,
|
||||
pricePerKg: 0,
|
||||
totalShipping: 0,
|
||||
totalTax: 0,
|
||||
totalCombine: 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
productType: { },
|
||||
parameters: {
|
||||
product: {
|
||||
productDesc: { },
|
||||
quantity: { },
|
||||
totalWeight: { },
|
||||
gram: { },
|
||||
width: { },
|
||||
length: { },
|
||||
height: { },
|
||||
},
|
||||
|
||||
pickUpAddress: { },
|
||||
pickUpDate: { },
|
||||
deliveryAddress: { },
|
||||
wrappingService: { },
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
productTypeArray() {
|
||||
return this.productType === '' ? '' : JSON.parse(this.productType);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
addProduct() {
|
||||
// todo: change this to vuelidate
|
||||
if (this.parameters.product.productDesc != '' && this.productType != '') {
|
||||
|
||||
// add weight
|
||||
this.parameters.totalWeight += parseInt(this.parameters.product.totalWeight);
|
||||
|
||||
// has tax
|
||||
if (this.productTypeArray['tax']) {
|
||||
this.parameters.totalTax += parseInt(this.productTypeArray['tax']);
|
||||
}
|
||||
|
||||
var itemShippingFee = 0;
|
||||
|
||||
// pricePerKg * kg
|
||||
if (this.productTypeArray['pricePerKg']) {
|
||||
|
||||
// add pricePerKg
|
||||
this.parameters.pricePerKg += parseInt(this.productTypeArray['pricePerKg']);
|
||||
|
||||
itemShippingFee += parseInt(this.productTypeArray['pricePerKg']) * parseInt(this.parameters.product.totalWeight);
|
||||
}
|
||||
|
||||
// pricePerPcs * quantity
|
||||
if (this.productTypeArray['pricePerPcs']) {
|
||||
itemShippingFee += parseInt(this.productTypeArray['pricePerPcs']) * this.parameters.product.quantity;
|
||||
}
|
||||
|
||||
this.productList.push(
|
||||
{
|
||||
productType: this.productTypeArray['name'],
|
||||
productDesc: this.parameters.product.productDesc,
|
||||
quantity: this.parameters.product.quantity,
|
||||
gram: '',
|
||||
width: '',
|
||||
length: '',
|
||||
height: '',
|
||||
|
||||
totalWeight: this.parameters.product.totalWeight,
|
||||
itemTax: this.productTypeArray['tax'],
|
||||
pricePerKg: this.productTypeArray['pricePerKg'],
|
||||
itemShippingFee: itemShippingFee,
|
||||
}
|
||||
);
|
||||
|
||||
this.parameters.totalShipping += itemShippingFee;
|
||||
this.parameters.totalCombine += ( itemShippingFee + parseInt(this.productTypeArray['tax'] == '' ? 0 : this.productTypeArray['tax']) );
|
||||
|
||||
this.parameters.product.productDesc = '' ;
|
||||
this.productType = '';
|
||||
}
|
||||
},
|
||||
removeElement(index) {
|
||||
var itemRemoved = this.productList.splice(index, 1)[0];
|
||||
|
||||
// remove weight
|
||||
this.parameters.totalWeight -= parseInt(itemRemoved['totalWeight']);
|
||||
|
||||
// has tax
|
||||
if (itemRemoved['itemTax']) {
|
||||
this.parameters.totalTax -= parseInt(itemRemoved['itemTax']);
|
||||
}
|
||||
|
||||
if (itemRemoved['itemShippingFee']) {
|
||||
this.parameters.totalShipping -= parseInt(itemRemoved['itemShippingFee']);
|
||||
}
|
||||
|
||||
// remove pricePerKg
|
||||
if (itemRemoved['pricePerKg']) {
|
||||
this.parameters.pricePerKg -= parseInt(itemRemoved['pricePerKg']);
|
||||
}
|
||||
|
||||
this.parameters.totalCombine -= ( parseInt(itemRemoved['itemShippingFee']) + parseInt(itemRemoved['itemTax'] == '' ? 0 : parseInt(itemRemoved['itemTax'])) );
|
||||
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler],
|
||||
directives: {money: VMoney}
|
||||
}
|
||||
</script>
|
||||
@@ -274,7 +274,7 @@
|
||||
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M8.6,23.65c-2.37676,0 -4.3,1.92324 -4.3,4.3c0,2.37676 1.92324,4.3 4.3,4.3c2.37676,0 4.3,-1.92324 4.3,-4.3c4.77031,0 8.6,3.82969 8.6,8.6v85.10137c0,8.28926 6.76074,15.05 15.05,15.05h0.50391c0.99941,2.98145 3.72051,5.19863 7.02109,5.19863h4.43438c-0.74746,1.26816 -1.20938,2.72949 -1.20938,4.3c0,4.72832 3.87168,8.6 8.6,8.6c4.72832,0 8.6,-3.87168 8.6,-8.6c0,-1.57051 -0.46191,-3.03184 -1.20938,-4.3h66.91875c-0.74746,1.26816 -1.20937,2.72949 -1.20937,4.3c0,4.72832 3.87168,8.6 8.6,8.6c4.72832,0 8.6,-3.87168 8.6,-8.6c0,-1.57051 -0.46191,-3.03184 -1.20937,-4.3h4.43437c3.36777,0 6.13926,-2.30117 7.08828,-5.375h0.43672v-2.15c0,-3.90527 -3.04863,-7.12188 -6.87832,-7.45781c0.26035,-0.69707 0.42832,-1.43613 0.42832,-2.21719v-40.85c0,-1.67129 -0.73066,-3.14941 -1.78887,-4.3c1.0582,-1.15059 1.78887,-2.62871 1.78887,-4.3v-43c0,-3.53574 -2.91426,-6.45 -6.45,-6.45h-94.6c-3.53574,0 -6.45,2.91426 -6.45,6.45v43c0,1.67129 0.73066,3.14941 1.78887,4.3c-1.0582,1.15059 -1.78887,2.62871 -1.78887,4.3v40.85c0,0.78105 0.16797,1.52012 0.42832,2.21719c-3.15781,0.27715 -5.75293,2.51953 -6.57598,5.48418h-0.30234c-5.96289,0 -10.75,-4.78711 -10.75,-10.75v-85.10137c0,-7.09668 -5.80332,-12.9 -12.9,-12.9zM49.45,30.1h94.6c1.21777,0 2.15,0.93223 2.15,2.15v43c0,1.21777 -0.93223,2.15 -2.15,2.15c-1.17578,0.0168 -2.11641,0.97422 -2.11641,2.15c0,1.17578 0.94062,2.1332 2.11641,2.15c1.21777,0 2.15,0.93223 2.15,2.15v40.85c0,1.21777 -0.93223,2.15 -2.15,2.15h-94.6c-1.21777,0 -2.15,-0.93223 -2.15,-2.15v-40.85c0,-1.21777 0.93223,-2.15 2.15,-2.15c1.17578,-0.0168 2.11641,-0.97422 2.11641,-2.15c0,-1.17578 -0.94063,-2.1332 -2.11641,-2.15c-1.21777,0 -2.15,-0.93223 -2.15,-2.15v-43c0,-1.21777 0.93223,-2.15 2.15,-2.15zM88.15,38.7c-0.77266,-0.0084 -1.49492,0.39473 -1.88965,1.0666c-0.38633,0.67188 -0.38633,1.49492 0,2.1668c0.39473,0.67188 1.11699,1.075 1.88965,1.0666h17.2c0.77266,0.0084 1.49492,-0.39473 1.88965,-1.0666c0.38633,-0.67187 0.38633,-1.49492 0,-2.1668c-0.39472,-0.67187 -1.11699,-1.075 -1.88965,-1.0666zM58.05,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM66.65,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM75.25,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM83.85,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM92.45,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM101.05,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM109.65,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM118.25,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM126.85,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM135.45,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM88.15,90.3c-0.77266,-0.0084 -1.49492,0.39473 -1.88965,1.0666c-0.38633,0.67188 -0.38633,1.49492 0,2.1668c0.39473,0.67188 1.11699,1.075 1.88965,1.0666h17.2c0.77266,0.0084 1.49492,-0.39473 1.88965,-1.0666c0.38633,-0.67187 0.38633,-1.49492 0,-2.1668c-0.39472,-0.67187 -1.11699,-1.075 -1.88965,-1.0666zM44.075,131.15h105.35c1.80566,0 3.225,1.41934 3.225,3.225c0,1.80566 -1.41934,3.225 -3.225,3.225h-105.35c-1.80566,0 -3.225,-1.41934 -3.225,-3.225c0,-1.80566 1.41934,-3.225 3.225,-3.225zM55.9,141.9c2.40195,0 4.3,1.89805 4.3,4.3c0,2.40195 -1.89805,4.3 -4.3,4.3c-2.40195,0 -4.3,-1.89805 -4.3,-4.3c0,-2.40195 1.89805,-4.3 4.3,-4.3zM137.6,141.9c2.40195,0 4.3,1.89805 4.3,4.3c0,2.40195 -1.89805,4.3 -4.3,4.3c-2.40195,0 -4.3,-1.89805 -4.3,-4.3c0,-2.40195 1.89805,-4.3 4.3,-4.3z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="$store.getters.isSuperAdmin">
|
||||
<div class="row" v-if="$store.getters.isAdmin">
|
||||
<div class="col">
|
||||
<div data-type="createWarehousePackageList" class="text-complete pointer requestModal fs-11 all-caps text-underline">Add Arrived Parcel</div>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="stick-up" type="createWarehousePackageList" >
|
||||
|
||||
+2
-1
@@ -29,7 +29,8 @@ export default {
|
||||
$crisp.push(["set", "user:nickname", getters.getDecodedAccessToken.user.company_marking]);
|
||||
$crisp.push(["set", "session:data", [
|
||||
[
|
||||
["company name", getters.getDecodedAccessToken.user.company_name],
|
||||
["izyim-marking", getters.getDecodedAccessToken.user.company_marking],
|
||||
["company-name", getters.getDecodedAccessToken.user.company_name]
|
||||
]
|
||||
]]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<delivery-orders-section-component></delivery-orders-section-component>
|
||||
@endsection
|
||||
@@ -9,6 +9,8 @@ Route::group(['prefix' => 'segment', 'as' => 'segment.', 'namespace' => 'Segment
|
||||
Route::put('/update/{id}', 'UpdateSegmentController@update')->name('update');
|
||||
Route::get('/list', 'ListSegmentsController@list')->name('list');
|
||||
|
||||
Route::get('/air-shipment/item-price/list', 'ListAirShipmentPriceController@list')->name('air_shipment.price.list');
|
||||
|
||||
Route::group(['prefix' => '{id}/constant', 'as' => 'constant.'], function () {
|
||||
Route::put('/service/update', 'UpdateCustomServiceConstantController@update')->name('service.update');
|
||||
Route::put('/update', 'UpdateConstantController@update')->name('update');
|
||||
|
||||
+13
-3
@@ -55,6 +55,16 @@ Route::group(['prefix'=> '/last_mile_delivery', 'as' => 'last_mile_delivery.'],
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix'=> '/air_shipment', 'as' => 'air_shipment.'], function () {
|
||||
// Route::get('/', function () {
|
||||
// return view('pages.accounts.signup');
|
||||
// })->name('login');
|
||||
|
||||
Route::get('/quotation', function () {
|
||||
return view('pages.airShipment.quotation');
|
||||
})->name('quotation');
|
||||
});
|
||||
|
||||
Route::get('', function () {
|
||||
return view('pages.accounts.login');
|
||||
})->name('login');
|
||||
@@ -153,7 +163,7 @@ Route::get('/orders/refresh', function(){
|
||||
|
||||
Route::get('/containers/refresh', function(){
|
||||
|
||||
(App()->make(\App\Classes\Modules\PackingLists\Processors\FetchWarehouseReceiveListFromVTPortalProcessor::class))->execute();
|
||||
dd((App()->make(\App\Classes\Modules\PackingLists\Processors\FetchLoadedContainersFromVTPortalProcessor::class))->execute());
|
||||
// FetchLoadedContainersFromVTPortalJob::dispatch();
|
||||
// FetchContainersStatusUpdateFromVTPortalJob::dispatch();
|
||||
|
||||
@@ -271,8 +281,8 @@ Route::get('/settings', function () {
|
||||
})->name('settings');
|
||||
|
||||
Route::get('/customer/summary/monthly', function () {
|
||||
// $containers = Container::whereMonth('loading_date', 1)->where('owner_id', 3)->get();
|
||||
$containers = Container::whereIn('reference', ['EPS-3850', 'EPS-3863', 'WP-1331', 'EPS-3856'])->get();
|
||||
$containers = Container::whereMonth('loading_date', '>', ((float)\Carbon\Carbon::now()->format('m') - 1))->whereYear('loading_date', \Carbon\Carbon::now()->format('Y'))->get();
|
||||
// $containers = Container::whereIn('reference', ['cs-6062', 'eps-3926', 'sh-1122', 'sh-1121', 'eps-3925', 'cs-6060', 'eps-3927', 'cs-6066', 'cs-6069'])->get();
|
||||
foreach ($containers as $container){
|
||||
$packingLists = $container->packingLists()->get()->filter(function ($packingList) {
|
||||
return $packingList->owner->company_module_id === 248;
|
||||
|
||||
Reference in New Issue
Block a user