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

5

... ... @@ -126,6 +126,7 @@ class SalesmangoodsController extends WeChatBaseController{
$data['suit'] = $_POST['suit'];
$data['grade'] = $_POST['grade'];
$data['printing'] = $_POST['printing'];
$data['zixun_phone'] = $_POST['zixun_phone'];
if($_POST['img0'] != ''){
$det_img[0] = $_POST['img0'];
}
... ... @@ -187,6 +188,7 @@ class SalesmangoodsController extends WeChatBaseController{
$data['suit'] = $_POST['suit'];
$data['grade'] = $_POST['grade'];
$data['printing'] = $_POST['printing'];
$data['zixun_phone'] = $_POST['zixun_phone'];
if($_POST['img0'] != ''){
$det_img[0] = $_POST['img0'];
}
... ...
... ... @@ -557,17 +557,6 @@
/**
*确定添加
*/
// 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;
... ... @@ -592,6 +581,7 @@
press_time = $("input[name='press_time']").val();
suit = $("input[name='suit']").val();
printing = $("input[name='printing']").val();
zixun_phone = $("input[name='zixun_phone']").val();
grade = $("#grade").text();
img0 = $('#img0')[0].src;
... ... @@ -606,8 +596,8 @@
if(img2 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){
img2 = '';
}
if(book_name!=""&&money!=""&&price!=""&&book_size!=""&&suit!=""&&grade!=""&&(img0!=""||img1!=""||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(book_name!=""&&money!=""&&price!=""&&book_size!=""&&suit!=""&&grade!=""&&(img0!=""||img1!=""||img2!="")&&zixun_phone!=""){
$.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,zixun_phone:zixun_phone},function(data){
if(data == 3){
alert('添加失败,业务员书籍不能超过8本');
}else if(data == 2){
... ...
... ... @@ -607,6 +607,7 @@
author = $("input[name='author']").val();
press = $("input[name='press']").val();
press_time = $("input[name='press_time']").val();
zixun_phone = $("input[name='zixun_phone']").val();
suit = $("input[name='suit']").val();
id = $("input[name='id']").val();
printing = $("input[name='printing']").val();
... ... @@ -623,8 +624,8 @@
if(img2 == "http://xkeasy.w.bronet.cn/themes/simpleboot3/public/assets/images/jiahao.png"){
img2 = '';
}
if(book_name!=""&&money!=""&&price!=""&&book_size!=""&&suit!=""&&grade!=""&&(img0!=""||img1!=""||img2!="")){
$.post("{:url('Salesmangoods/Salesman_goods_edit')}",{id:id,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(book_name!=""&&money!=""&&price!=""&&book_size!=""&&suit!=""&&grade!=""&&(img0!=""||img1!=""||img2!="")&&zixun_phone!=""){
$.post("{:url('Salesmangoods/Salesman_goods_edit')}",{id:id,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,zixun_phone:zixun_phone},function(data){
if(data == 2){
alert('佣金不能大于售价');
}else{
... ...
... ... @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController
*/
public function checkWeChatUserLogin()
{
/*$user = Db::name('user')->where('id',13)->find();
/*$user = Db::name('user')->where('id',27)->find();
cmf_update_current_user($user);*/
$userId = cmf_get_current_user_id();
if (empty($userId)) {
... ...