| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/billingsystem/dashboard/component/ |
Upload File : |
<div class="modal fade bd-example-modal-lg" id="Edit" tabindex="-1" role="dialog" aria-labelledby="addNew" aria-disabled="true">
<div class="modal-dialog modal-md modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Edit Delivery Note
</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-disabled="true">×</span>
</button>
</div>
<?php include 'component/uploadfile.php'; ?>
<div class="modal-body deliveryDetail">
<div class="card-body boxShadow whiteBg mb-3">
<!-- form-->
<form>
<div class="row">
<div class="col-md-12">
<div class="d-flex justify-content-between">
<p>
Delivery Note#<span class="small text-muted">(Auto
Generate)</span>: <span class="text-danger h3 norwarp">DN-220428-001</span>
</p>
<p>Report Type : CNY Delivery</p>
</div>
</div>
<div class="col-md-3">
<div class="form-group borderSelect2">
<p class="mb-0 small require">Customer Name</P>
<input type="text" class="form-control mainSearchInput normalSearch" aria-describedby="search" placeholder="" value="May" autocomplete="nope">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="Invoice" class="require">Invoice#</label>
<select class="form-control" id="Invoice">
<option value=""></option>
<option value="INV-202102020-001" selected>INV-202102020-001</option>
<option value="INV-202102020-001">INV-202102020-001</option>
</select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="Reference" class="require">Delivery Date</label>
<input type="text" class="form-control" placeholder="" value="30 Jan 2020" id="DeliveryDate">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="Reference" class="require">Delivery Time Range</label>
<select class="form-control" id="Payment">
<option value=""></option>
<option value="13:00-15:00" selected>13:00-15:00</option>
<option value="18:00-20:00">18:00-20:00</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="Salesman">Salesman</label>
<select class="form-control" id="Salesman">
<option value=""></option>
<option value="Jacket" selected>Jacket</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="Team">Team</label>
<select class="form-control" id="Team">
<option value=""></option>
<option value="A Team" selected>A Team</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<p class="mb-0 small require">Worksheet ID</P>
<input type="text" class="form-control" placeholder="" value="12312323" autocomplete="nope">
</div>
</div>
<div class="col-lg-12">
<div class="boxShadow whiteBg mt-3 mb-4">
<!-- delivery Form -->
<?php include 'component/deliveryaddress.php'; ?>
<!-- delivery Form END -->
</div>
</div>
<div class="col-md-12">
<div id="EditDeliveryNoteGrid" class="newGrid receiptGrid mb-4"></div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="RemarksCreditNote">Delivery Note Remarks</label>
<textarea class="form-control" id="RemarksCreditNote" rows="2"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Remark">Remarks <span class="text-muted">(For Internal
Use)</span> </label>
<textarea class="form-control" id="Remark" rows="2"></textarea>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Close">Back</button>
<!-- <button type="button" class="btn btn-danger submitDate shadow_red">Reject</button> -->
<button type="button" class="btn btn-primary submitDate shadow_blue">Save</button>
</div>
</div>
</div>
</div>
</div>
<script>
$(function() {
$(document).on("click", ".uploadFileModal", function() {
$('.uploadWrap').fadeIn();
$('.deliveryDetail').hide();
});
$(document).on("click", ".backUplaodBtn", function() {
$('.uploadWrap').hide();
$('.deliveryDetail').fadeIn();
});
var NewData = [{
'Item#': "123456",
Description: "Monthly Plant",
'Order_Qty': "10",
'Balance_Qty': "10",
'Delivery_Qty': "10",
'Position_&_Photos': ""
}, {
'Item#': "123456",
Description: "Monthly Plant",
'Order_Qty': "10",
'Balance_Qty': "10",
'Delivery_Qty': "10",
'Position_&_Photos': ""
}, {
'Item#': "123456",
Description: "Monthly Plant",
'Order_Qty': "10",
'Balance_Qty': "10",
'Delivery_Qty': "10",
'Position_&_Photos': ""
}, {
'Item#': "123456",
Description: "Monthly Plant",
'Order_Qty': "10",
'Balance_Qty': "10",
'Delivery_Qty': "10",
'Position_&_Photos': ""
}, {
'Item#': "123456",
Description: "Monthly Plant",
'Order_Qty': "10",
'Balance_Qty': "10",
'Delivery_Qty': "10",
'Position_&_Photos': ""
}];
var UploadfileField = function(config) {
jsGrid.Field.call(this, config);
};
UploadfileField.prototype = new jsGrid.Field({
itemTemplate: function(value) {
return `<a href="#" class="link small uploadFileModal" >View & Upload</a>`;
},
insertTemplate: function(value) {
this._insertInput = $(
`<a href="#" class="link small uploadFileModal" >View & Upload</a>`
);
/*return this._insertInput.prop('outerHTML') +
`<a href="javascript:void(0);" class="small payValueBtn">Pay in Full </a>`;*/
return this._insertInput;
},
editTemplate: function(value) {
this._editInput = $(
`<a href="#" class="link small uploadFileModal" >View & Upload</a>`
);
return this._editInput;
},
});
jsGrid.fields.uploadfileField = jsGrid.UploadfileField = UploadfileField;
const SelectField = jsGrid.SelectField;
function Select2Field(config) {
SelectField.call(this, config);
}
Select2Field.prototype = new SelectField({
itemTemplate: function(value) {
var insertValue = this._insertValue = value;
return insertValue;
},
insertValue: function() {
return this._insertInput.val();
},
_createSelect() {
const el = SelectField.prototype._createSelect.call(this);
setTimeout(() => el.select2({
placeholder: ''
}), 100);
return el;
}
});
jsGrid.fields.select2 = jsGrid.Select2Field = Select2Field;
$("#EditDeliveryNoteGrid").jsGrid({
height: "auto",
width: "100%",
inserting: true,
editing: true,
sorting: true,
paging: true,
data: NewData,
rowClass: function(item, itemIndex) {
return "client-" + itemIndex;
},
controller: {
loadData: function() {
return NewData.slice(0, 15);
}
},
fields: [{
name: "#",
type: "iconField",
width: 30,
align: "left"
}, {
name: "Item#",
type: "select2",
items: [{
value: 'INV-202102020-001',
text: 'INV-202102020-001'
}],
textField: 'text',
valueField: 'value',
width: 200,
align: "left"
}, {
name: "Description",
type: "remarkField",
width: 150,
sorting: false
},
{
name: "Order_Qty",
type: "number",
width: 150,
align: "left"
},
{
name: "Balance_Qty.",
type: "number",
width: 80,
align: "left"
},
{
name: "Delivery_Qty",
type: "number",
width: 80,
align: "left"
},
{
name: "Position_&_Photos",
type: "uploadfileField",
width: 150,
align: "left"
},
{
type: "control",
width: 50,
editButton: false
}
],
onRefreshed: function() {
var $gridData = $("#grid .jsgrid-grid-body tbody");
$gridData.sortable({
update: function(e, ui) {
// array of indexes
var clientIndexRegExp = /\s*client-(\d+)\s*/;
var indexes = $.map($gridData.sortable("toArray", {
attribute: "class"
}), function(classes) {
return clientIndexRegExp.exec(classes)[1];
});
alert("Reordered indexes: " + indexes.join(", "));
// arrays of items
var items = $.map($gridData.find("tr"), function(row) {
return $(row).data("JSGridItem");
});
console && console.log("Reordered items", items);
}
});
},
rowClick: function(args) {
var $row = $(args.event.target).closest("tr");
var $cell = $(args.event.target).closest(".jsgrid-cell");
cellIndex = $($row.find("td")).index($cell);
if (this._editingRow) {
this.updateItem();
}
if (this.editing) {
this.editItem($row);
}
}
});
$(document).on("click", "input[type='radio'][name='mainSearch']:checked", function() {
$(this).closest(".mainSearchWrap").find(".mainSearchInput").val($(
this)
.val());
$(this).closest(".mainSearchWrap").removeClass('active');
});
});
</script>