Пример #1
0
 public function index()
 {
     if (strim($_REQUEST['order_sn']) != '') {
         $condition['order_id'] = M("DealOrder")->where("order_sn='" . strim($_REQUEST['order_sn']) . "'")->getField("id");
     }
     if (strim($_REQUEST['notice_sn']) != '') {
         $condition['notice_sn'] = $_REQUEST['notice_sn'];
     }
     if (strim($_REQUEST['user_name']) != '') {
         $condition['user_id'] = M("User")->where("user_name='" . strim($_REQUEST['user_name']) . "'")->getField("id");
     }
     if (strim($_REQUEST['begin_time']) != '') {
         $start_time = strtotime($_REQUEST['begin_time'] . ' 00:00:00');
         $end_time = strtotime($_REQUEST['begin_time'] . ' 23:59:59');
         $condition['s_create_time'] = $start_time;
         //开始时间
         $condition['e_create_time'] = $end_time;
         //结束时间
     }
     $condition['is_payment_list'] = 1;
     if (intval($_REQUEST['payment_id']) == 0) {
         unset($_REQUEST['payment_id']);
     }
     $this->assign("default_map", $condition);
     $this->assign("payment_list", M("Payment")->findAll());
     parent::index();
 }
 public function index()
 {
     $this->assign("parent_region", M("DeliveryRegion")->where("id=" . intval($_REQUEST['pid']))->find());
     $condition['pid'] = intval($_REQUEST['pid']);
     $this->assign("default_map", $condition);
     parent::index();
 }
Пример #3
0
 public function index()
 {
     $data = parent::index(true, false);
     $params = array($data, false);
     tag("assign_dataModel_data", $params);
     $this->response($params[0]);
 }
 public function add_sms()
 {
     //输出会员组
     $group_list = M("UserGroup")->findAll();
     $this->assign("group_list", $group_list);
     parent::index();
 }
Пример #5
0
 public function index()
 {
     $data = parent::index(true);
     if ($_GET["mergeSameRows"] && $_GET["batch"] === "all") {
         $tmp = array();
         foreach ($data as $row) {
             $k = $row["factory_code_all"] . "|" . $row["repository_id"];
             if (!$tmp[$k]) {
                 $tmp[$k] = $row;
                 $tmp[$k]["stocks"][] = $row["stock_name"];
             } else {
                 $tmp[$k]["num"] += $row["num"];
                 if (!in_array($row["stock_name"], $tmp[$k]["stocks"])) {
                     $tmp[$k]["stocks"][] = $row["stock_name"];
                 }
             }
         }
         foreach ($tmp as $k => $v) {
             $tmp[$k]["stock_name"] = implode(",", $v["stocks"]);
             unset($tmp[$k]["stocks"]);
         }
         $this->response(reIndex($tmp));
     } else {
         $this->response($data);
     }
 }
Пример #6
0
 public function index()
 {
     if (strim($_REQUEST['name']) != '') {
         $condition['name'] = array('like', '%' . strim($_REQUEST['name']) . '%');
     }
     $this->assign("default_map", $condition);
     parent::index();
 }
 public function index()
 {
     //输出团购城市
     $city_list = M("DealCity")->where('is_delete = 0')->findAll();
     $city_list = D("DealCity")->toFormatTree($city_list, 'name');
     $this->assign("city_list", $city_list);
     parent::index();
 }
Пример #8
0
 public function index()
 {
     if (trim($_REQUEST['deal_name']) != '') {
         $condition['deal_name'] = array('like', '%' . trim($_REQUEST['deal_name']) . '%');
     }
     //$condition['is_delete'] = 0;
     $this->assign("default_map", $condition);
     parent::index();
 }
Пример #9
0
 public function unpassed()
 {
     if (trim($_REQUEST['title']) != '') {
         $condition['title'] = array('like', '%' . trim($_REQUEST['title']) . '%');
     }
     $condition['verify'] = 2;
     $this->assign("default_map", $condition);
     parent::index();
 }
Пример #10
0
 public function index()
 {
     $groupClass = M("GroupClass")->where(array('status' => 1))->select();
     $array = array();
     foreach ($groupClass as $val) {
         $array[$val['menu']] = $val['name'];
     }
     $this->menu = $array;
     parent::index();
 }
 public function index()
 {
     if (intval($_REQUEST['cate_id']) > 0) {
         $condition['cate_id'] = intval($_REQUEST['cate_id']);
     }
     $cate_list = M("MessageCate")->findAll();
     $this->assign("cate_list", $cate_list);
     $this->assign("default_map", $condition);
     parent::index();
 }
Пример #12
0
 public function index()
 {
     $goods_type_id = intval($_REQUEST['goods_type_id']);
     $goods_type_info = M("GoodsType")->getById($goods_type_id);
     if (!$goods_type_info) {
         $this->error(l("GOODS_TYPE_NOT_EXIST"));
     }
     $this->assign("goods_type_info", $goods_type_info);
     parent::index();
 }
Пример #13
0
 public function index()
 {
     $filter_group_id = intval($_REQUEST['filter_group_id']);
     $filter_group_info = M("FilterGroup")->getById($filter_group_id);
     if (!$filter_group_info) {
         $this->error(l("FILTERGROUP_NOT_EXIST"));
     }
     $this->assign("filter_group_info", $filter_group_info);
     parent::index();
 }
Пример #14
0
 public function add_sms()
 {
     //输出团购城市
     $city_list = M("DealCity")->where('is_delete = 0')->findAll();
     $city_list = D("DealCity")->toFormatTree($city_list, 'name');
     $this->assign("city_list", $city_list);
     //输出会员组
     $group_list = M("UserGroup")->findAll();
     $this->assign("group_list", $group_list);
     parent::index();
 }
Пример #15
0
 public function trash()
 {
     $condition['is_delete'] = 1;
     if (trim($_REQUEST['name']) != '') {
         $condition['name'] = array('like', '%' . trim($_REQUEST['name']) . '%');
     }
     if (trim($_REQUEST['id']) != '') {
         $condition['id'] = trim($_REQUEST['id']);
     }
     $this->assign("default_map", $condition);
     parent::index();
 }
Пример #16
0
 public function index()
 {
     $ecv_type = M("EcvType")->where("id=" . intval($_REQUEST['ecv_type_id']))->find();
     if (!$ecv_type) {
         $this->error(l("INVALID_ECV_TYPE"));
     } else {
         $this->assign("ecv_type", $ecv_type);
     }
     $condition['ecv_type_id'] = intval($_REQUEST['ecv_type_id']);
     $this->assign("default_map", $condition);
     parent::index();
 }
 public function trash()
 {
     $supplier_id = intval($_REQUEST['supplier_id']);
     $supplier_info = M("Supplier")->getById($supplier_id);
     if (!$supplier_info) {
         $this->error(l("SUPPLIER_NOT_EXIST"));
     }
     $condition['is_delete'] = 1;
     $condition['supplier_id'] = intval($_REQUEST['supplier_id']);
     $this->assign("default_map", $condition);
     $this->assign("supplier_info", $supplier_info);
     parent::index();
 }
Пример #18
0
 public function index()
 {
     //获取所有节点
     if (!$_GET["mainrow_id"]) {
         return parent::index();
     }
     //仅获取当前数据的下一ID
     //        $map = array();
     //        $this->_filter($map);
     import("@.Workflow.Workflow");
     $workflow = new Workflow($_GET["workflow_alias"]);
     $process = $workflow->getCurrentProcess($_GET["mainrow_id"]);
     $this->response(reIndex($process["nextNode"]));
 }
 public function index()
 {
     $data = parent::index(true);
     foreach ($data[1] as $k => $v) {
         if ($v["store_min"] > 0 && $v["num"] <= $v["store_min"]) {
             $data[1][$k]["colorize"] = "red";
         } else {
             if ($v["store_max"] > 0 && $v["num"] >= $v["store_max"]) {
                 $data[1][$k]["colorize"] = "green";
             }
         }
     }
     $this->response($data);
 }
Пример #20
0
 public function index()
 {
     if (trim($_REQUEST['log_info']) != '') {
         $map['log_info'] = array('like', '%' . trim($_REQUEST['log_info']) . '%');
     }
     $log_begin_time = trim($_REQUEST['log_begin_time']) == '' ? 0 : to_timespan($_REQUEST['log_begin_time']);
     $log_end_time = trim($_REQUEST['log_end_time']) == '' ? 0 : to_timespan($_REQUEST['log_end_time']);
     if ($log_end_time == 0) {
         $map['log_time'] = array('gt', $log_begin_time);
     } else {
         $map['log_time'] = array('between', array($log_begin_time, $log_end_time));
     }
     $this->assign("default_map", $map);
     parent::index();
 }
Пример #21
0
 public function index()
 {
     if (!$_GET["typeahead"]) {
         return parent::index();
     }
     $model = D("Goods");
     $map = $this->beforeFilter($model);
     $this->_filter($map);
     $data = $model->where($map)->limit(10)->order("LENGTH(pinyin) ASC")->select();
     foreach ($data as $k => $v) {
         $data[$k]["combineId"] = sprintf("%s_%d_%d", $v["factory_code"], $v["id"], $v["goods_category_id"]);
         $data[$k]["combineLabel"] = sprintf("%s", $v["name"]);
     }
     //        echo count($data);exit;
     $this->response($data);
 }
Пример #22
0
 public function incharge_index()
 {
     $reminder = M("RemindCount")->find();
     $reminder['incharge_count_time'] = NOW_TIME;
     M("RemindCount")->save($reminder);
     $condition['type'] = 1;
     if (strim($_REQUEST['user_name']) != '') {
         $ids = M("User")->where(array("user_name" => array('eq', strim($_REQUEST['user_name']))))->field("id")->findAll();
         $ids_arr = array();
         foreach ($ids as $k => $v) {
             array_push($ids_arr, $v['id']);
         }
         $condition['user_id'] = array("in", $ids_arr);
     }
     $this->assign("default_map", $condition);
     parent::index();
 }
Пример #23
0
 function index()
 {
     $this->curid = I('id');
     $this->secid = D('Category')->getCatSecRootID(I('id'));
     if ($this->secid == -1 && $this->curid == 12) {
         $this->secid = 37;
     }
     if ($this->secid == -1 && $this->curid == 44) {
         $this->secid = 66;
     }
     if ($this->curid == $this->secid) {
         $this->thiid = -1;
     } else {
         $this->thiid = $this->curid;
     }
     $this->secsubcatlist = D('Category')->getCatList($this->secid);
     parent::index();
 }
 public function index()
 {
     if (trim($_REQUEST['order_sn']) != '') {
         $condition['order_id'] = M("DealOrder")->where("order_sn='" . trim($_REQUEST['order_sn']) . "'")->getField("id");
     }
     if (trim($_REQUEST['notice_sn']) != '') {
         $condition['notice_sn'] = $_REQUEST['notice_sn'];
     }
     if (trim($_REQUEST['user_name']) != '') {
         $condition['user_id'] = M("User")->where("user_name='" . trim($_REQUEST['user_name']) . "'")->getField("id");
     }
     if (intval($_REQUEST['payment_id']) == 0) {
         unset($_REQUEST['payment_id']);
     }
     $this->assign("default_map", $condition);
     $this->assign("payment_list", M("Payment")->findAll());
     parent::index();
 }
 public function index()
 {
     vendor("common");
     parent::index();
 }
 public function index()
 {
     $map = $this->com_search();
     //定义条件
     $where = ' is_paid = 1 ';
     //日期期间使用in形式,以确保能正常使用到索引
     if (isset($map['start_time']) && $map['start_time'] != '' && isset($map['end_time']) && $map['end_time'] != '') {
         $where .= " and pay_date in (" . date_in($map['start_time'], $map['end_time']) . ")";
     }
     $sql = "select payment_id,pay_date, sum(money) as money from " . DB_PREFIX . "payment_notice where " . $where . " group by payment_id,pay_date";
     $money_list = $GLOBALS['db']->getAll($sql);
     $sql = "select id,name from " . DB_PREFIX . "payment where is_effect = 1 or total_amount > 0";
     $payment_list = $GLOBALS['db']->getAll($sql);
     $date_list = explode(",", date_in($map['start_time'], $map['end_time'], false));
     //print_r($money_list);
     //print_r($date_list);
     $list = array();
     foreach ($date_list as $k => $v) {
         $row = array();
         $row['pay_date'] = $v;
         foreach ($payment_list as $pk => $pv) {
             //$payment_list[$pk]['money'] = 0;
             //$row[$pv['id'].'_id'] = $pv['id'];
             $money = array();
             $money['pay_id'] = $pv['id'];
             $money['pay_name'] = $pv['name'];
             $money['money'] = format_price($this->getMoney($pv['id'], $v, $money_list));
             $money['url'] = U("PaymentNotice/index", array("is_paid" => 1, 'start_time' => $v, 'end_time' => $v, 'payment_id' => $pv['id']));
             $row['pay_money'][] = $money;
         }
         $list[] = $row;
     }
     //print_r($list);
     //$this->assign("default_map",$map);
     $this->assign("list", $list);
     parent::index();
 }
 public function index()
 {
     parent::index();
 }
 public function trash()
 {
     $condition['is_delete'] = 1;
     $this->assign("default_map", $condition);
     parent::index();
 }
 public function online()
 {
     $map = $this->com_search();
     if (trim($_REQUEST['order_sn']) != '') {
         $condition['order_id'] = M("DealOrder")->where("order_sn='" . trim($_REQUEST['order_sn']) . "'")->getField("id");
     }
     if (intval($_REQUEST['no_payment_id']) > 0) {
         $condition['payment_id'] = array("neq", intval($_REQUEST['no_payment_id']));
     }
     if (trim($_REQUEST['notice_sn']) != '') {
         $condition['notice_sn'] = $_REQUEST['notice_sn'];
     }
     $payment_id = M("Payment")->where("class_name = 'Otherpay'")->getField("id");
     $condition['payment_id'] = $payment_id;
     if ($map['start_time'] != '' && $map['end_time']) {
         $condition['create_time'] = array("between", array(to_timespan($map['start_time'], "Y-m-d"), to_timespan(dec_date($map['end_time'], -1), "Y-m-d")));
     }
     if (intval($_REQUEST['is_paid']) == -1 || !isset($_REQUEST['is_paid'])) {
         unset($_REQUEST['is_paid']);
     }
     $this->assign("default_map", $condition);
     parent::index();
 }
 public function index()
 {
     $this->assign("default_map", $condition);
     parent::index();
 }