ajax帶對象提交

//賣船要求信息

? ? ? ? ? ? var sellerVesselInfo = {

"vesselName": vesselName,

"registry": registry,

"vesselTexture": vesselTexture,

"jobType": jobType,

"grossTon": grossTon,

"netTon": netTon,

"loa": loa,

"beam": beam,

"vesselDepth": vesselDepth,

"enginType": enginType,

"engine": engine,

"yard": yard,

"vesselExplain": vesselExplain,

"stringBuilt":$("#built1").val(),

"projectCode": projectCode

};

//賣家信息

? ? ? ? ? ? var sellerInfo = {

"owner": owner,

"ownerCode": ownerCode,

"address": address,

"ownerTel": ownerTel,

"saleRequirement": saleRequirement,

"vesselOwnerType":"true",

"projectCode": projectCode

};

//船舶所有人所占比例

//? ? ? ? ? ? var sellerStockPercent = {

//? ? ? ? ? ? ? ? "owner": $("#people").val(),

//? ? ? ? ? ? ? ? "pencent": $("#percent").val(),

//? ? ? ? ? ? ? ? "projectCode": $("#project_code").html()

//? ? ? ? ? ? };

? ? ? ? ? ? var para = {

"id": $("#ID").html(),

"projectCode": projectCode,

"projectName": projectName,

"assessmentPrice": assessmentPrice,

"listingPrice": listingPrice,

"stringListingStart":$("#listing_start_date").val(),

"stringListingEnd":$("#listing_end_date").val(),

"contactsPerson": contactsPerson,

"contactsOfficeTel": contactsOfficeTel,

"contactsTel": contactsTel,

"contactsFax": contactsFax,

"status":status,

"sellerVesselInfo": sellerVesselInfo,

"sellerInfo": sellerInfo,

"sellerStockPercent": getValue()

};

console.info(JSON.stringify(para));

$.ajax({

type:"POST",

url:"/saleApplication/saveApplication",

contentType:'application/json;charset=UTF-8',

data: JSON.stringify(para),

dataType:"json",

success:function (data) {

console.log(data);

console.log(data.success);

if (data.success) {

//設置保存按鈕有效

? ? ? ? ? ? ? ? ? ? ? ? $("#save").attr("disabled",false);

sweetAlert('操作成功');

window.location.href ='/saleApplication';

}else {

//設置保存按鈕有效

? ? ? ? ? ? ? ? ? ? ? ? $("#save").attr("disabled",false);

sweetAlert('未知錯誤');

//window.location.href = '/saleApplication';

? ? ? ? ? ? ? ? ? ? }

}

});

}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容