Subversion Repositories SmartDukaan

Rev

Rev 30601 | Rev 31083 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
.row {
        margin: 0 auto;
}

.modal-content {
        background: white;
}

.modelHeaderCustom {
        font-size: 14px;
        font-weight: bold;
}

.border-highlight {
        border: 3px solid red;
}

hr {
        background-color: #007aff;
        border: none;
        height: 1px;
        background: #007aff;
}

.control-label {
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 7px;
        font-weight: bold;
        font-size: 14px;
}

.form-group {
        border-bottom: 1px solid #eff2f7;
        padding-bottom: 15px;
        margin-bottom: 15px;
}

.right {
        float: right;
}

.form-control {
        color: #373737;
}

.table-align-center {
        text-align: center;
}
</style>

<script type="text/javascript">
        var cartItemIndex = 0;
        accessoriesDeals = $accessoriesDeals;
        pendingPOCustomer = $pendingPOCustomer;
        pendingPO = $pendingPO;
        console.log(typeof pendingPOCustomer)
        if (pendingPOCustomer != null) {
                $('input.search-phone').val(pendingPOCustomer.mobileNumber).change()
                                .attr('readonly', true);
                var mobileNumber = $('.search-phone').val();
                console.log(mobileNumber)

                writeOldCustomerDetailsByMobileNumber(mobileNumber);
        }
        $(function () {
                var date = new Date();
                var currentMonth = date.getMonth();
                var currentDate = date.getDate();
                var currentYear = date.getFullYear();
                $('input[name="dateOfBirth"]').daterangepicker({
                        maxDate: new Date(currentYear - 18, currentMonth, currentDate),
                        startDate: new Date(currentYear - 18, currentMonth, currentDate),
                        singleDatePicker: true
                });

                $('input[name="dgmfgdate"]').daterangepicker({
                        minDate: new Date(currentYear, currentMonth - 6, currentDate),
                        maxDate: new Date(currentYear, currentMonth, currentDate),
                        singleDatePicker: true,
                }, function (start, end) {
                        mfgDate = start.format(moment.HTML5_FMT.DATETIME_LOCAL_SECONDS);

                });
                formLoaded();
        });
</script>

<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header">
                                <i class="icon_table"></i>Order
                        </h3>
                        <ol class="breadcrumb">
                                <li><i class="fa fa-home"></i><a
                                        href="${rc.contextPath}/dashboard">Home</a></li>
                                <li><i class="icon_table"></i>ORDER</li>
                        </ol>
                </div>
        </div>
        <form id="cd">

                <div id="order-details" style="padding: 10px">
                        #if($cartItems.size()==0)
                                <div class="card row">
                                        <p>Your Cart is Empty.</p>
                                </div>
                        #else
                                <div class="row">
                                        <div class="table-responsive col-lg-8"
                                                 style="background-color: white">
                                                <div class="row">
                                                        <h4 class="modelHeaderCustom" style="font-size: 22px;">Product
                                                                Information</h4>
                                                        <table id="order-items" class="table table-condensed">
                                                                <tr>
                                                                        <th style="width: 25%">Description</th>
                                                                        <th style="width: 5%">Qty</th>
                                                                        <th style="width: 13%">Serial Number</th>
                                                                        <th style="width: 13%">Unit Price</th>
                                                                        <th style="widht:13%">Activation Discount</th>
                                                                        <th style="width: 15%">Mobile Insurance</th>
                                                                        <th style="width: 15%">Total Price</th>
                                                                </tr>

                                                                #foreach ($cartItem in $cartItems) #set($mrp="MRP")
                                                        #if($mopPriceMap.get($cartItem.getItemId()).getMrp()!=0)
                                                                #set($mrp="$mopPriceMap.get($cartItem.getItemId()).getMrp()(MRP)")
                                                        #end
                                                        #set($placeHolder = "$mopPriceMap.get($cartItem.getItemId()).getPrice()(MOP) - $mrp")
                                                        #set($dp = $mopPriceMap.get($cartItem.getItemId()).getPurchasePrice())
                                                                #if($accessoriesDeals && $cartItem.getItemType() =="NON_SERIALIZED")
                                                                        #set($placeHolder =
                                                                                "$mopPriceMap.get($cartItem.getItemId()).getPurchasePrice()(DP) -
                                                                                        $mopPriceMap.get($cartItem.getItemId()).getPrice()(MOP) - $mrp")
                                                                #end
                                                                #if($cartItem.getItemType() =="SERIALIZED") #set($start = 1)
                                                                        #set($end = $cartItem.getQuantity())
                                                                        #set($range = [$start..$end])
                                                                        #foreach ($index in $range)
                                                                                <tr>
                                                                                        <td>$cartItem.getDisplayName()</td>
                                                                                        <td class="table-align-center">1</td>
                                                                                        <td class="table-align-center"><input readonly type="text"
                                                                                                                                                                  itemId="$cartItem.getItemId()"
                                                                                                                                                                  itemType="$cartItem.getItemType()"
                                                                                                                                                                  name="serialNumber"
                                                                                                                                                                  class="serialNumber input-sm form-control">
                                                                                        </td>
                                                                                        <td class="table-align-center"><input type="number"
                                                                                                                                                                  class="unitPrice form-control input-sm"
                                                                                                                                                                  name="unitPrice"
                                                                                quantity="1" itemId="$cartItem.getItemId()"
                                                                                mopPrice="$mopPriceMap.get($cartItem.getItemId()).getPrice()"
                                                                                dp="$dp"
                                                                                mrp="$mopPriceMap.get($cartItem.getItemId()).getMrp()"
                                                                                isMop="$mopPriceMap.get($cartItem.getItemId()).isMop()"
                                                                                placeholder="$placeHolder"></td>
                                                                        <td class="table-align-center"><input type="number"
                                                                                class="discount form-control input-sm" name="discount"
                                                                                #if($mopPriceMap.get($cartItem.getItemId()).getMaxDiscountAmount() > 0)
                                                                                        data-maxdiscount="$mopPriceMap.get($cartItem.getItemId()).getMaxDiscountAmount()"
                                                                                        max="$mopPriceMap.get($cartItem.getItemId()).getMaxDiscountAmount()"
                                                                                        placeholder="Upto $mopPriceMap.get($cartItem.getItemId()).getMaxDiscountAmount()"
                                                                                        value="$mopPriceMap.get($cartItem.getItemId()).getMaxDiscountAmount()"
                                                                                #else
                                                                                readonly value="0"
                                                                                #end
                                                                                ></td>
                                                                        <td class="table-align-center">
                                                                                <div class="input-group">
                                                                                        <input type="number" itemId="$cartItem.getItemId()" value="0"
                                                                                                name="insuranceamount"
                                                                                                class="insuranceamount form-control input-sm" readonly>
                                                                                        <input type="hidden" itemId="$cartItem.getItemId()" value="0"
                                                                                                name="insuranceid" class="insuranceid"> <input
                                                                                                type="hidden" itemId="$cartItem.getItemId()" name="ram"
                                                                                                class="ram"> <input type="hidden"
                                                                                                itemId="$cartItem.getItemId()" name="memory" class="memory">
                                                                                        <input type="hidden" itemId="$cartItem.getItemId()"
                                                                                                name="mfgdate" class="mfgdate">
                                                                                        <div class="input-group-btn">
                                                                                                <button type="button"
                                                                                                        class="btn btn-sm btn-default mk_check_plans"
                                                                                                        data-mop="$mopPriceMap.get($cartItem.getItemId()).getPrice()">
                                                                                                        Check Plans</button>
                                                                                        </div>
                                                                                </div>
                                                                        </td>
                                                                        <td class="table-align-center"><input name="totalPrice"
                                                                                class="totalPrice input-sm  form-control"
                                                                                itemId="$cartItem.getItemId()" type="number" value="0" readonly></td>
                                                                </tr>
                                                                #end
                                                        #else
                                                        <tr>
                                                                <td>$cartItem.getDisplayName()</td>
                                                                <td class="table-align-center">$cartItem.getQuantity()</td>
                                                                <td class="table-align-center"><div class="input-group">
                                                                                <input type="text" itemId="$cartItem.getItemId()"
                                                                                        name="serialNumber" itemType="$cartItem.getItemType()"
                                                                                        class="serialNumber form-control input-sm" readonly>
                                                                        </div></td>
                                                                <td class="table-align-center"><input type="number"
                                                                        class="unitPrice input-sm form-control" dp="$dp"
                                                                        name="unitPrice" quantity="$cartItem.getQuantity()"
                                                                        itemId="$cartItem.getItemId()"
                                                                        mopPrice="$mopPriceMap.get($cartItem.getItemId()).getPrice()"
                                                                        mopPrice="$mopPriceMap.get($cartItem.getItemId()).isMop()"
                                                                        placeholder="$placeHolder" /></td>
                                                                <td>Not Applicable</td>
                                                                <td>Not Applicable</td>
                                                                <td class="table-align-center"><input name="totalPrice"
                                                                        class="totalPrice input-sm form-control"
                                                                        itemId="$cartItem.getItemId()" type="number" value="0" readonly></td>
                                                        </tr>
                                                        #end #end
                                                </table>
                                        </div>
                                        <div class="row">
                                                <div class="row">
                                                        <div class="col-lg-3">
                                                                <h4 class="modelHeaderCustom" style="font-size: 22px;">Customer
                                                                        Information</h4>
                                                        </div>
                                                        <div class="col-lg-3" style="margin-top: 15px">
                                                                <input placeholder="Search Mobile" type="number" name="mobile"
                                                                        class="form-control search-phone input-sm">
                                                        </div>
                                                </div>
                                                <div class="row customerinfo">
                                                        <div class="col-lg-2 form-group">
                                                                <input placeholder="Mobile Number" type="number" name="mobile"
                                                                        class="form-control phone input-sm" readonly>
                                                        </div>
                                                        <div class="col-lg-3 form-group">
                                                                <input placeholder="First Name" name="firstName" type="text"
                                                                        value="" class="form-control input-sm firstName" required>
                                                        </div>
                                                        <div class="col-lg-3 form-group">
                                                                <input placeholder="Last Name" name="lastName" type="text"
                                                                        value="" class="form-control input-sm lastName">
                                                        </div>
                                                        <div class="col-lg-2 form-group">
                                                                <input id="emailId" name="emailId" type="email" value=""
                                                                        class="form-control input-sm email"
                                                                        placeholder="Email(xyz@gmail.com)">
                                                        </div>
                                                        <div class="col-lg-2 form-group">
                                                                <button type="button"
                                                                        class="btn btn-block btn-primary mk_add_customer"
                                                                        style="display: none">Add customer</button>
                                                                <button type="button"
                                                                        class="btn btn-block btn-primary mk_add_email"
                                                                        style="display: none">Update Customer</button>
                                                        </div>
                                                </div>
                                        </div>
                                        <div class="row billinginfo" style="display: none">
                                                <div class="row">
                                                        <div class="col-lg-3">
                                                                <h4 class="modelHeaderCustom" style="font-size: 22px;">Billing
                                                                        Address</h4>
                                                        </div>
                                                        <div class="col-lg-3">
                                                                <button type="button"
                                                                        class="btn btn-block btn-primary new-address-btn">New
                                                                        Address</button>
                                                        </div>
                                                </div>
                                                <div class="row">
                                                        <div class="col-lg-3 form-group">
                                                                <input placeholder="GST Number" id="gstNumber" name="gstNumber"
                                                                        type="text" value="" class="form-control input-sm">
                                                        </div>
                                                </div>
                                                <div class="row" id="customer-address">
                                                        <table class="table table-bordered">
                                                                <thead>
                                                                        <tr>
                                                                                <th>Name</th>
                                                                                <th>Address Lines</th>
                                                                                <th>City</th>
                                                                                <th>State</th>
                                                                                <th>Pin</th>
                                                                                <th>Mobile</th>
                                                                                <th>Action</th>
                                                                        </tr>
                                                                </thead>
                                                                <tbody id="address-body">
                                                                </tbody>
                                                        </table>
                                                </div>
                                        </div>
                                        <div>
                                                <div class="row">
                                                        <h4 class="modelHeaderCustom" style="font-size: 22px;">Insurance
                                                                Information</h4>
                                                </div>
                                        </div>
                                        <div class="row mk_insurance_row" style="display: none">
                                                <div class="col-lg-3 form-group">
                                                        <label for="gender">Gender</label> <select
                                                                class="form-control input-sm" id="gender" name="gender"
                                                                placeholder="Gender">
                                                                <option value="" disabled selected>Gender</option>
                                                                <option value="1" selected>Male</option>
                                                                <option value="2" selected>Female</option>
                                                        </select>
                                                </div>
                                                <div class="col-lg-3 form-group">
                                                        <label for="dateOfBirth">Date Of Birth</label> <input
                                                                placeholder="Date Of Birth" id="dateOfBirth" name="dateOfBirth"
                                                                type="text" value="" class="form-control">
                                                </div>
                                        </div>
                                </div>
                                <div class="col-lg-4 row">
                                        <div class="col-lg-1"></div>
                                        <div id="payment-details"
                                                style="background: white; background-color: white;"
                                                class="col-lg-10">
                                                <h4 class="modelHeaderCustom" style="font-size: 22px;">Payment
                                                        Details</h4>
                                                <div class="row">
                                                        <div class="col-lg-7">
                                                                <h4>Total Amount :</h4>
                                                        </div>
                                                        <div class="col-lg-5">
                                                                <input type="number"
                                                                        class="netPayableAmount form-control input-sm" name=""
                                                                        value="0" readonly>
                                                        </div>
                                                </div>
                                                <div id="payment-option-id-amount-container"
                                                        paymentOptionSize=$paymentOptions.size()>
                                                        #set($a = 0) #set($b = $paymentOptions.size() - 1) #set($range =
                                                        [$a..$b]) #foreach($index in $range)
                                                        <div class="row">
                                                                #set($paymentOption = $paymentOptions[$index])
                                                                #if($paymentOption.getName() == 'ONLINE')
                                                                <div class="col-lg-7">
                                                                        <h4>$paymentOption.getName() :</h4>
                                                                </div>
                                                                <div class="col-lg-5">
                                                                        <input type="number" id="paymentOptionIdAmount${index}"
                                                                                name="paymentOptionIdAmount${index}"
                                                                                class="form-control paymentOptionAmount amount input-sm"
                                                                                value="$pendingOrderItem.getSellingPrice()"
                                                                                paymentOptionId="$paymentOption.getId()" readonly>
                                                                </div>
                                                                #else
                                                                <div class="col-lg-7">
                                                                        <h4>$paymentOption.getName() :</h4>
                                                                </div>
                                                                <div class="col-lg-5">
                                                                        <input type="number" id="paymentOptionIdAmount${index}"
                                                                                name="paymentOptionIdAmount${index}"
                                                                                class="form-control paymentOptionAmount amount input-sm"
                                                                                value="" paymentOptionId="$paymentOption.getId()">
                                                                </div>
                                                                #end
                                                        </div>
                                                        #end
                                                </div>
                                                <div class="row">
                                                        <div class="form-group col-lg-10">
                                                                #if($pendingOrder.getId()) <input type="hidden"
                                                                        value="$pendingOrder.getId()" id="poid" /> <input
                                                                        type="hidden" value="$pendingOrderItem.getId()" id="poItemId" />
                                                                #else <input type="hidden" value="0" id="poid" /> <input
                                                                        type="hidden" value="0" id="poItemId" /> #end

                                                                <button class="btn btn-block btn-primary order-checkout"
                                                                        type="submit">Create Order</button>
                                                        </div>
                                                </div>
                                        </div>
                                </div>
                        </div>
                </div>
                #end
                </div>
        </form>
</section>
<div class="modal modal-lg row" id="mobilePlansModal" tabindex="-1"
        role="dialog">
        <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                        <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                </button>
                                <h4 class="modal-title">Choose from plans</h4>
                        </div>
                        <div class="modal-body" style="overflow-y: auto;max-height: calc(100vh - 210px)">
                                <div class="row itemdetails">
                                        <div class="row col-lg-3">
                                                <div class="col-lg-6">
                                                        <h4>*Ram(GB):</h4>
                                                </div>
                                                <div class="col-lg-6 form-group">
                                                        <input type="number" class="dgram form-control input-sm"
                                                                name="ram" value="0">
                                                </div>
                                        </div>
                                        <div class="row col-lg-4">
                                                <div class="col-lg-6">
                                                        <h4>*Memory(GB):</h4>
                                                </div>
                                                <div class="col-lg-5 form-group">
                                                        <input type="number" class="dgmemory form-control input-sm"
                                                                name="memory" value="0">
                                                </div>
                                        </div>
                                        <div class="col-lg-4">
                                                <div class="col-lg-3">
                                                        <h4>*Mfg Date:</h4>
                                                </div>
                                                <div class="col-lg-6 form-group">
                                                        <input placeholder="Mfg Date" id="dgmfgdate" name="dgmfgdate"
                                                                type="text" value="" class="form-control input-sm dgmfgdate">
                                                </div>
                                        </div>
                                </div>
                                <div class="row insurancedetails"></div>
                        </div>
                </div>
        </div>
</div>

<div class="modal modal-lg row" id="newaddressModal" tabindex="-1"
        role="dialog">
        <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                        <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                </button>
                                <h4 class="modal-title">New Address</h4>
                        </div>
                        <div class="modal-body" id="newaddress">
                                <div class="row">
                                        <div class="col-lg-4 form-group">
                                                <input placeholder="First Name" id="firstName" name="firstName"
                                                        type="text" value="" class="form-control input-sm">
                                        </div>
                                        <div class="col-lg-4 form-group">
                                                <input placeholder="Last Name" id="lastName" name="lastName"
                                                        type="text" value="" class="form-control input-sm">
                                        </div>
                                        <div class="col-lg-4 form-group">
                                                <input placeholder="Mobile Number" id="alternatePhone"
                                                        name="alternatePhone" type="text" value=""
                                                        class="form-control input-sm">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4 form-group">
                                                <input placeholder="Address Line 1" id="line1" name="line1"
                                                        type="text" size="50" value="" class="form-control input-sm">
                                        </div>
                                        <div class="col-lg-4 form-group">
                                                <input placeholder="Address Line 2" id="line2" name="line2"
                                                        type="text" value="" class="form-control input-sm">
                                        </div>
                                        <div class="col-lg-4 form-group">
                                                <input placeholder="Landmark" id="landmark" name="landmark"
                                                        type="text" value="" class="form-control input-sm">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-3 form-group">
                                                <input placeholder="Pin Code" id="pinCode" name="pinCode"
                                                        type="number" value="" class="form-control input-sm">
                                        </div>
                                        <div class="col-lg-3 form-group">
                                                <input placeholder="City" id="city" name="city" type="text"
                                                        value="" class="form-control input-sm">
                                        </div>
                                        <div class="col-lg-3 form-group">
                                                <select class="form-control input-sm" id="state" name="state"
                                                        placeholder="State">
                                                        <option value="" disabled selected>State</option>
                                                        #foreach($stateName in $stateNames) #if($retailerStateName ==
                                                        $stateName)
                                                        <option value="$stateName" selected>$stateName</option> #else
                                                        <option value="$stateName">$stateName</option> #end #end

                                                </select>
                                        </div>
                                </div>
                        </div>
                        <div class="modal-footer">
                                <button type="button" class="btn btn-primary btn-add-address">Add
                                        Address</button>
                        </div>
                </div>
        </div>
</div>
<script type=text/javascript">

</script>