modi_shippname.html
2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<include file="public/layout"/>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit; min-width:400px;">
<div id="" class="layui-layer-content" >
<div style="margin:10px 10%;font-size: 15px;">
自定义物流名称:<input type="text" value="{$shipping_name}" name="shipping_name" class="t_mane"
id="shipping_name"
onkeydown="strkeydown(event, this, 'sumbbtn')">
</div>
<div class="layui-layer-btn" style="width: 300px;">
<a class="layui-layer-btn0" id="btnmodi">
确认修改
</a>
<a class="layui-layer-btn1">
取消
</a>
</div>
</div>
<script>
function showfir(ind) {
if (ind == 1) {
$("#expfir").fadeIn(3);
} else {
$("#expfir").fadeOut(3);
}
}
$("#btnmodi").click(function () {
var getparm="/index.php?m=Admin&c=Plugin&a=sumbitmodi&id={$id}";
if ($("#shipping_name").val()=="") {
layer.msg('请输入自定义物流名称', {icon: 2, time: 2000});
$("#shipping_name").focus();
return false;
}
getparm+="&shipping_name="+$("#shipping_name").val();
layer.msg('加载中...', {
icon: 16,
shade: [0.5, '#f5f5f5'],
scrollbar: false,
offset: '200px',
time: 100000
});
$.ajax({
url: getparm + "&ispost=1",
type: 'post',
dataType: 'json',
success: function (data) {
layer.closeAll();
if (data.code == 0) {
layer.msg('修改成功', {icon: 1, time: 2000});
setTimeout(function () {
window.parent.batcheditclose();
}, 1000)
} else {
layer.msg(data.msg, {icon: 2, time: 2000});
}
},
error: function () {
layer.closeAll();
layer.msg('修改失败', {icon: 2, time: 2000});
}
});
})
$(".layui-layer-btn1").click(function () {
window.parent.layer.closeAll();
})
</script>
</body>
</html>