作者 anyv
1 个管道 的构建 通过 耗费 1 秒

58

... ... @@ -35,6 +35,9 @@
.log_six_pictyre_titles{
display: none;
}
.log_two_input_title span{
color: #F20000;
}
</style>
</head>
... ... @@ -106,7 +109,7 @@
<div class="log_two_input">
<div class="log_two_input_one ">
<div class="log_two_input_title">
书名
<span>*</span>书名
</div>
<div class="log_two_input_contant">
<input type="text" placeholder="请输入书籍名称" name="book_name" />
... ... @@ -114,7 +117,7 @@
</div>
<div class="log_two_input_one ">
<div class="log_two_input_title">
佣金
<span>*</span>佣金
</div>
<div class="log_two_input_contant">
<input type="text" placeholder="请输入下级推广佣金" name="money" />
... ... @@ -122,7 +125,7 @@
</div>
<div class="log_two_input_one">
<div class="log_two_input_title">
售价
<span>*</span>售价
</div>
<div class="log_two_input_contant">
<input type="text" placeholder="输入售价" name="price" />
... ... @@ -163,7 +166,7 @@
</div>
<div class="log_two_input_one">
<div class="log_two_input_title">
开本
<span>*</span>开本
</div>
<div class="log_two_input_contant">
<input type="text" placeholder="请输入开本" name="book_size" />
... ... @@ -217,7 +220,7 @@
<div class="log_six_select_contant">
<div class="log_two_input_one">
<div class="log_two_input_title">
套装
<span>*</span>套装
</div>
<div class="log_two_input_contant">
<input type="text" placeholder="请输入每套本数" name="suit" />
... ... @@ -226,7 +229,7 @@
<div class="log_six_select_top log_six_select_nianji">
<div class="log_six_select_left">
<div class="log_six_select_one" >
适合年级
<span>*</span>适合年级
</div>
<div class="log_six_select_two log_six_nianji_contant" id="grade" >
请选择
... ... @@ -473,6 +476,17 @@
/**
*确定添加
*/
var booknames = $("input[name='book_name']").val();
var moneys = $("input[name='money']").val();
var prices = $("input[name='price']").val();
var book_sizes = $("input[name='book_size']").val();
var suits = $("input[name='suit']").val();
var grades = $("#grade").text();
$(".log_two_input_contant input").blur(function () {
if(booknames == "" || moneys == "" || prices == "" || book_sizes == "" || suits == "" || grades == ""){
alert("必填项不能为空");
}
})
function Sure_add(){
show_img = $('#show_img')[0].src;
... ... @@ -498,6 +512,7 @@
suit = $("input[name='suit']").val();
printing = $("input[name='printing']").val();
grade = $("#grade").text();
img0 = $('#img0')[0].src;
if(img0 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){
img0 = '';
... ... @@ -510,20 +525,24 @@
if(img2 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){
img2 = '';
}
$.post("{:url('Salesmangoods/Salesman_goods_add')}",{show_img:show_img,thumbnail:thumbnail,book_name:book_name,money:money,price:price,pricing:pricing,instr:instr,book_number:book_number,paper:paper,book_size:book_size,binding:binding,author:author,press:press,press_time:press_time,suit:suit,grade:grade,img0:img0,img1:img1,img2:img2,printing:printing},function(data){
if(data == 3){
alert('添加失败,业务员书籍不能超过8本');
}else if(data == 2){
alert('佣金不能大于售价');
}else{
if(data){
window.location.href = "{:url('salesmangoods/salesman_goods')}";
if(book_name!=""&&money!=""&&price!=""&&book_size!=""&&suit!=""&&grade!=""){
$.post("{:url('Salesmangoods/Salesman_goods_add')}",{show_img:show_img,thumbnail:thumbnail,book_name:book_name,money:money,price:price,pricing:pricing,instr:instr,book_number:book_number,paper:paper,book_size:book_size,binding:binding,author:author,press:press,press_time:press_time,suit:suit,grade:grade,img0:img0,img1:img1,img2:img2,printing:printing},function(data){
if(data == 3){
alert('添加失败,业务员书籍不能超过8本');
}else if(data == 2){
alert('佣金不能大于售价');
}else{
alert('添加失败');
if(data){
window.location.href = "{:url('salesmangoods/salesman_goods')}";
}else{
alert('添加失败');
}
}
}
});
});
}else{
alert("必填项不能为空")
}
}
... ...