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

58

@@ -35,6 +35,9 @@ @@ -35,6 +35,9 @@
35 .log_six_pictyre_titles{ 35 .log_six_pictyre_titles{
36 display: none; 36 display: none;
37 } 37 }
  38 + .log_two_input_title span{
  39 + color: #F20000;
  40 + }
38 </style> 41 </style>
39 </head> 42 </head>
40 43
@@ -106,7 +109,7 @@ @@ -106,7 +109,7 @@
106 <div class="log_two_input"> 109 <div class="log_two_input">
107 <div class="log_two_input_one "> 110 <div class="log_two_input_one ">
108 <div class="log_two_input_title"> 111 <div class="log_two_input_title">
109 - 书名 112 + <span>*</span>书名
110 </div> 113 </div>
111 <div class="log_two_input_contant"> 114 <div class="log_two_input_contant">
112 <input type="text" placeholder="请输入书籍名称" name="book_name" /> 115 <input type="text" placeholder="请输入书籍名称" name="book_name" />
@@ -114,7 +117,7 @@ @@ -114,7 +117,7 @@
114 </div> 117 </div>
115 <div class="log_two_input_one "> 118 <div class="log_two_input_one ">
116 <div class="log_two_input_title"> 119 <div class="log_two_input_title">
117 - 佣金 120 + <span>*</span>佣金
118 </div> 121 </div>
119 <div class="log_two_input_contant"> 122 <div class="log_two_input_contant">
120 <input type="text" placeholder="请输入下级推广佣金" name="money" /> 123 <input type="text" placeholder="请输入下级推广佣金" name="money" />
@@ -122,7 +125,7 @@ @@ -122,7 +125,7 @@
122 </div> 125 </div>
123 <div class="log_two_input_one"> 126 <div class="log_two_input_one">
124 <div class="log_two_input_title"> 127 <div class="log_two_input_title">
125 - 售价 128 + <span>*</span>售价
126 </div> 129 </div>
127 <div class="log_two_input_contant"> 130 <div class="log_two_input_contant">
128 <input type="text" placeholder="输入售价" name="price" /> 131 <input type="text" placeholder="输入售价" name="price" />
@@ -163,7 +166,7 @@ @@ -163,7 +166,7 @@
163 </div> 166 </div>
164 <div class="log_two_input_one"> 167 <div class="log_two_input_one">
165 <div class="log_two_input_title"> 168 <div class="log_two_input_title">
166 - 开本 169 + <span>*</span>开本
167 </div> 170 </div>
168 <div class="log_two_input_contant"> 171 <div class="log_two_input_contant">
169 <input type="text" placeholder="请输入开本" name="book_size" /> 172 <input type="text" placeholder="请输入开本" name="book_size" />
@@ -217,7 +220,7 @@ @@ -217,7 +220,7 @@
217 <div class="log_six_select_contant"> 220 <div class="log_six_select_contant">
218 <div class="log_two_input_one"> 221 <div class="log_two_input_one">
219 <div class="log_two_input_title"> 222 <div class="log_two_input_title">
220 - 套装 223 + <span>*</span>套装
221 </div> 224 </div>
222 <div class="log_two_input_contant"> 225 <div class="log_two_input_contant">
223 <input type="text" placeholder="请输入每套本数" name="suit" /> 226 <input type="text" placeholder="请输入每套本数" name="suit" />
@@ -226,7 +229,7 @@ @@ -226,7 +229,7 @@
226 <div class="log_six_select_top log_six_select_nianji"> 229 <div class="log_six_select_top log_six_select_nianji">
227 <div class="log_six_select_left"> 230 <div class="log_six_select_left">
228 <div class="log_six_select_one" > 231 <div class="log_six_select_one" >
229 - 适合年级 232 + <span>*</span>适合年级
230 </div> 233 </div>
231 <div class="log_six_select_two log_six_nianji_contant" id="grade" > 234 <div class="log_six_select_two log_six_nianji_contant" id="grade" >
232 请选择 235 请选择
@@ -473,6 +476,17 @@ @@ -473,6 +476,17 @@
473 /** 476 /**
474 *确定添加 477 *确定添加
475 */ 478 */
  479 + var booknames = $("input[name='book_name']").val();
  480 + var moneys = $("input[name='money']").val();
  481 + var prices = $("input[name='price']").val();
  482 + var book_sizes = $("input[name='book_size']").val();
  483 + var suits = $("input[name='suit']").val();
  484 + var grades = $("#grade").text();
  485 + $(".log_two_input_contant input").blur(function () {
  486 + if(booknames == "" || moneys == "" || prices == "" || book_sizes == "" || suits == "" || grades == ""){
  487 + alert("必填项不能为空");
  488 + }
  489 + })
476 function Sure_add(){ 490 function Sure_add(){
477 show_img = $('#show_img')[0].src; 491 show_img = $('#show_img')[0].src;
478 492
@@ -498,6 +512,7 @@ @@ -498,6 +512,7 @@
498 suit = $("input[name='suit']").val(); 512 suit = $("input[name='suit']").val();
499 printing = $("input[name='printing']").val(); 513 printing = $("input[name='printing']").val();
500 grade = $("#grade").text(); 514 grade = $("#grade").text();
  515 +
501 img0 = $('#img0')[0].src; 516 img0 = $('#img0')[0].src;
502 if(img0 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){ 517 if(img0 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){
503 img0 = ''; 518 img0 = '';
@@ -510,7 +525,7 @@ @@ -510,7 +525,7 @@
510 if(img2 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){ 525 if(img2 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){
511 img2 = ''; 526 img2 = '';
512 } 527 }
513 - 528 + if(book_name!=""&&money!=""&&price!=""&&book_size!=""&&suit!=""&&grade!=""){
514 $.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){ 529 $.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){
515 if(data == 3){ 530 if(data == 3){
516 alert('添加失败,业务员书籍不能超过8本'); 531 alert('添加失败,业务员书籍不能超过8本');
@@ -524,6 +539,10 @@ @@ -524,6 +539,10 @@
524 } 539 }
525 } 540 }
526 }); 541 });
  542 + }else{
  543 + alert("必填项不能为空")
  544 + }
  545 +
527 } 546 }
528 547
529 548