/**
|
* 初始化小件物流订单详情对话框
|
*/
|
var TOrderLogisticsInfoDlg = {
|
tOrderLogisticsInfoData : {}
|
};
|
|
/**
|
* 清除数据
|
*/
|
TOrderLogisticsInfoDlg.clearData = function() {
|
this.tOrderLogisticsInfoData = {};
|
}
|
|
/**
|
* 设置对话框中的数据
|
*
|
* @param key 数据的名称
|
* @param val 数据的具体值
|
*/
|
TOrderLogisticsInfoDlg.set = function(key, val) {
|
this.tOrderLogisticsInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
|
return this;
|
}
|
|
/**
|
* 设置对话框中的数据
|
*
|
* @param key 数据的名称
|
* @param val 数据的具体值
|
*/
|
TOrderLogisticsInfoDlg.get = function(key) {
|
return $("#" + key).val();
|
}
|
|
/**
|
* 关闭此对话框
|
*/
|
TOrderLogisticsInfoDlg.close = function() {
|
parent.layer.close(window.parent.TOrderLogistics.layerIndex);
|
}
|
|
/**
|
* 收集数据
|
*/
|
TOrderLogisticsInfoDlg.collectData = function() {
|
this
|
.set('id')
|
.set('type')
|
.set('userId')
|
.set('driverId')
|
.set('carId')
|
.set('orderNum')
|
.set('cargoType')
|
.set('cargoNumber')
|
.set('remark')
|
.set('placementLon')
|
.set('placementLat')
|
.set('placementAddress')
|
.set('startLon')
|
.set('startLat')
|
.set('startAddress')
|
.set('endLon')
|
.set('endLat')
|
.set('endAddress')
|
.set('recipient')
|
.set('recipientPhone')
|
.set('boardingLon')
|
.set('boardingLat')
|
.set('boardingAddress')
|
.set('boardingTime')
|
.set('getoffLon')
|
.set('getoffLat')
|
.set('getoffAddress')
|
.set('getoffTime')
|
.set('mileage')
|
.set('payManner')
|
.set('payType')
|
.set('orderMoney')
|
.set('travelMoney')
|
.set('tipMoney')
|
.set('redPacketMoney')
|
.set('couponMoney')
|
.set('redPacketId')
|
.set('couponId')
|
.set('discount')
|
.set('discountMoney')
|
.set('activityId')
|
.set('companyId')
|
.set('payMoney')
|
.set('state')
|
.set('insertTime')
|
.set('travelTime')
|
.set('snatchOrderTime')
|
.set('setOutTime')
|
.set('arriveTime')
|
.set('startServiceTime')
|
.set('endServiceTime')
|
.set('orderSource')
|
.set('invoiceId')
|
.set('trackId')
|
.set('isDelete')
|
.set('telX')
|
.set('bindId');
|
}
|
|
/**
|
* 提交添加
|
*/
|
TOrderLogisticsInfoDlg.addSubmit = function() {
|
|
this.clearData();
|
this.collectData();
|
|
//提交信息
|
var ajax = new $ax(Feng.ctxPath + "/tOrderLogistics/add", function(data){
|
Feng.success("添加成功!");
|
window.parent.TOrderLogistics.table.refresh();
|
TOrderLogisticsInfoDlg.close();
|
},function(data){
|
Feng.error("添加失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set(this.tOrderLogisticsInfoData);
|
ajax.start();
|
}
|
|
/**
|
* 提交修改
|
*/
|
TOrderLogisticsInfoDlg.editSubmit = function() {
|
|
this.clearData();
|
this.collectData();
|
|
//提交信息
|
var ajax = new $ax(Feng.ctxPath + "/tOrderLogistics/update", function(data){
|
Feng.success("修改成功!");
|
window.parent.TOrderLogistics.table.refresh();
|
TOrderLogisticsInfoDlg.close();
|
},function(data){
|
Feng.error("修改失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set(this.tOrderLogisticsInfoData);
|
ajax.start();
|
}
|
|
$(function() {
|
var userImgs = $("#userImg1").val().split(",");
|
var driverImgs = $("#driverImg1").val().split(",");
|
|
/// 注入商品图
|
var userHtml = '';
|
for (let i = 0; i < userImgs.length; i++) {
|
if (userImgs[i] !== ""){
|
userHtml += '<img width="100px" height="100px" style="margin-left: 20px" src="' + userImgs[i] + '"/>'
|
}
|
}
|
$("#userImg").append(userHtml);
|
|
/// 注入回单照片
|
var driverHtml = '';
|
for (let i = 0; i < driverImgs.length; i++) {
|
if (driverImgs[i] !== ""){
|
driverHtml += '<img width="100px" height="100px" style="margin-left: 20px" src="' + driverImgs[i] + '"/>'
|
}
|
}
|
$("#driverImg").append(driverHtml);
|
});
|