function apply() {
goods_no = $('#goods_no').val();
num = $('#num').val();
flow_no = $('#flow_no').val();
if (flow_no == '') {
alert('单号不能为空');
return false;
}
$.ajax({
cache: false,
url: '/user/welcome/send_to_weiphone.html',
dataType: 'json',
type: 'post',
data: {
goods_no: goods_no,
num: num,
flow_no: flow_no
},
success: function (msg) {
if (msg.code == 1) {
alert('申请成功');
} else if (msg.code == -1) {
alert('申请失败,原因:已经发生了交易,不可修改,建议将物品手动下架后重新发
布');
} else if (msg.code == -2) {
alert('申请失败,原因:所填数量大于发布数量');
}
}
});
}
function send_del(i) {
var ok = confirm('确认要删除该发货地址?');
if (ok == true) {
var id = document.getElementById("table" + i).getElementsByTagName("TR")
[0].getElementsByTagName("INPUT")[0].value;
$.ajax({
url: '/user/welcome/send_delete_address.html',
data: { id: id },
type: 'post',
cache: false,
success: function (ret) {
if (ret == 1) window.location.reload();
else alert('删除失败!');
}
});
}
}