Example #1
0
 public function view_index()
 {
     global $mod, $act;
     $this->smarty->assign('title', '异常到货处理');
     $this->smarty->assign('mod', $mod);
     //模块权限
     $order = new PurchaseOrderAct();
     $purtowh = new PurToWhAct();
     $listInfo = $order->getUnnormalSkuReach();
     $perNum = 100;
     $totalNum = $listInfo["totalNum"];
     $list = $listInfo["skuInfo"];
     //$purtowh->updUnusualSkuConfirmQty($list);//重新计算未处理状态下的待确认数量
     $pageobj = new Page($totalNum, $perNum);
     $pageStr = $pageobj->fpage();
     $newInfo = $order->getUnnormalSkuReach();
     //获取更新后的数据
     //$purchaseList	= CommonAct::actGetPurchaseList();
     $purchaseList = getPurchaseUserList();
     $this->smarty->assign('purchaseList', $purchaseList);
     //采购列表
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->assign('userid', $_SESSION['userId']);
     //登录用户userid
     $this->smarty->assign('list', $newInfo['skuInfo']);
     //循环赋值
     $this->smarty->display('unusualOrder.htm');
 }
Example #2
0
 public function view_oversea()
 {
     error_reporting(0);
     $skuData = new SkuAanalyzeAct();
     $skulists = $skuData->overseaAlertInfo();
     $total = $skulists["totalNum"];
     $skuInfo = $skulists["skuInfo"];
     $pagenum = 100;
     $page = new Page($total, $pagenum);
     $pageStr = $page->fpage();
     $this->smarty->assign('title', '海外仓下单预警');
     $this->smarty->assign('skuInfo', $skuInfo);
     $overCguserArr = array('龚永喜', '陈珠艺', '陈剑锋', '郑珍', '王芳', '英爱', '陈奕宏', '汤东东', '胡威');
     $loginName = $_SESSION['userCnName'];
     $this->smarty->assign('loginName', $loginName);
     $this->smarty->assign('overCguserArr', $overCguserArr);
     $platformInfo = $skuData->getSalePlatform();
     $this->smarty->assign('platformInfo', $platformInfo);
     //销售平台数据
     $skuAct = new SkuAct();
     $setContion = $skuAct->getSetting();
     $this->smarty->assign("setContion", $setContion);
     $totalPageNum = ceil($total / $pagenum);
     $purchaseList = getPurchaseUserList();
     $this->smarty->assign('purchaseList', $purchaseList);
     //采购列表
     $partnerList = getPartnerlist();
     $this->smarty->assign('partnerList', $partnerList);
     //供应商列表
     $allPurchaser = getPurchaseUserList();
     $tableColor = array("active", "success", " ", "warning", " ", "danger");
     $this->smarty->assign("tableColor", $tableColor);
     $this->smarty->assign('allPurchaser', $allPurchaser);
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->assign('totalPageNum', $totalPageNum);
     $this->smarty->display('oversea.htm');
 }
Example #3
0
 public function view_index()
 {
     $productStockalarm = new ProductStockalarmAct();
     //接收参数生成条件
     $curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
     $pid = isset($_GET['pid']) ? intval($_GET['pid']) : 0;
     //供应商ID
     $type = isset($_GET['type']) ? trim($_GET['type']) : '';
     //搜索条件
     $key = isset($_GET['keyword']) ? post_check(trim($_GET['keyword'])) : '';
     //关键词
     $pcid = isset($_GET['pcid']) ? intval($_GET['pcid']) : 0;
     //采购员ID
     $is_warn = isset($_GET['is_warn']) ? intval($_GET['is_warn']) : '';
     //是否预警
     $status = isset($_GET['status']) ? intval($_GET['status']) : '';
     //产品状态
     $condition = "1";
     if (!empty($status)) {
         $condition .= " AND a.goodsStatus = '{$status}'";
     }
     if (!empty($is_warn)) {
         //$condition	.= " AND c.is_warning = '{$is_warn}'";
         $condition .= " AND c.is_alert = '{$is_warn}'";
     }
     if ($pid != "") {
         $skuData = new SkuAanalyzeAct();
         $skuArr = $skuData->getSkuFromPartner($pid);
         $skuStr = implode("','", $skuArr);
         $condition .= " AND a.sku in ('{$skuStr}')";
     }
     if ($type && $key) {
         if ($type == 'goodsName') {
             $condition .= ' AND a.' . $type . " like '%" . $key . "%'";
         } else {
             if ($type == "partner") {
                 $skuArr = $this->getSkuByPartner($key);
                 $skuStr = implode("','", $skuArr);
                 $condition .= " and a.sku in ('{$skuStr}')";
             } else {
                 $condition .= " AND a.sku like '{$key}%'";
             }
         }
     } else {
         if (isset($key)) {
             $condition .= " AND a.sku like '%{$key}%'";
         }
     }
     $condition .= " AND a.is_delete=0";
     //获取符合条件的数据并分页
     $pagenum = 100;
     //每页显示的个数
     $res = $productStockalarm->actList($condition, $curpage, $pagenum);
     $total = $productStockalarm->actListCount($condition);
     //页面总数量
     $page = new Page($total, $pagenum, '', 'CN');
     $pageStr = "";
     $pageStr = $page->fpage();
     $totalPageNum = ceil($total / $pagenum);
     //替换页面内容变量
     $tableColor = array("active", "success", " ", "warning", " ", "danger");
     $this->smarty->assign("tableColor", $tableColor);
     $this->smarty->assign('title', '采购下单预警');
     $this->smarty->assign('key', $key);
     $this->smarty->assign('type', $type);
     $skuData = new SkuAanalyzeAct();
     $platformInfo = $skuData->getSalePlatform();
     $this->smarty->assign('platformInfo', $platformInfo);
     //销售平台数据
     $this->smarty->assign('pid', $pid);
     $this->smarty->assign('is_warn', $is_warn);
     $this->smarty->assign('pcid', $pcid);
     $this->smarty->assign('status', $status);
     $this->smarty->assign('lists', $res);
     $purchaseList = getPurchaseUserList();
     $this->smarty->assign('purchaseList', $purchaseList);
     //采购列表
     $partnerList = getPartnerlist();
     $this->smarty->assign('partnerList', $partnerList);
     //供应商列表
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->assign('totalPageNum', $totalPageNum);
     //$allPurchaser = $this->getPurchaseUserAll();
     $allPurchaser = $purchaseList;
     $this->smarty->assign('allPurchaser', $allPurchaser);
     $this->smarty->display('products.htm');
 }
Example #4
0
 public function view_editPurchaseOrder()
 {
     $id = $_GET['id'];
     $PO = new PurchaseOrderAct();
     $partnerList = $PO->partnerList();
     $storeList = $PO->storeList();
     $PhOrder = $PO->phOrder($id);
     $mainOrderInfo = $PO->getMainOrderInfo($id);
     $purchaseList = getPurchaseUserList();
     //$partnerList	= CommonAct::actGetPartnerList();
     //$partnerList	= getPartnerlist();
     $this->smarty->assign("title", "编辑采购订单页面");
     //$this->smarty->assign('partnerList',$partnerList);//供应商列表
     $this->smarty->assign('purchaseList', $purchaseList);
     //采购列表
     $this->smarty->assign("id", $id);
     $this->smarty->assign("storeList", $storeList);
     $this->smarty->assign("partnerList", $partnerList);
     $this->smarty->assign("PhOrder", $PhOrder);
     $this->smarty->assign("mainOrderInfo", $mainOrderInfo);
     //采购订单主表信息
     //$this->smarty->display("editPurchaseOrder.htm");
     $this->smarty->display("editOrder.htm");
 }
Example #5
0
 /**
  * 编辑供应商信息的函数
  * @return   void
  */
 public function view_editPartner()
 {
     $this->smarty->assign('title', '修改供应商信息');
     $partnerId = post_check($_GET['id']);
     $field = " pp.limit_money,pp.limit_alert_money,pp.is_sign,pp.id,pp.company_name,ppt.category_name,pp.username,pp.type_id,pp.status,pp.tel,pp.phone,pp.fax,pp.QQ,pp.AliIM,pp.e_mail,pp.shoplink,pp.address,pp.city,pp.email_status,pp.sms_status,pu.global_user_name as purchaser,pp.note,pp.company_id,pp.purchaseuser_id ";
     $result = PartnerAct::act_getPartnerInfo($partnerId, $field);
     $this->smarty->assign("partnerInfo", $result[0]);
     $isSMSChecked = $result[0]['sms_status'] == '1' ? 'checked="checked"' : '';
     $isEmailChecked = $result[0]['email_status'] == '1' ? 'checked="checked"' : '';
     $this->smarty->assign("isSMSChecked", $isSMSChecked);
     $this->smarty->assign("isEmailChecked", $isEmailChecked);
     $where = '';
     $field = ' `id`, `category_name` ';
     $list = PartnerTypeAct::act_getPartnerTypeList($where, $field);
     krsort($list);
     $option_values = array();
     $option_output = array();
     $type_id = 0;
     foreach ($list as $key => $type) {
         $option_values[] = $type['id'];
         $option_output[] = $type['category_name'];
         if ($result[0]['type_id'] == $type['id']) {
             $type_id = $type['id'];
         }
     }
     $this->smarty->assign("option_values", $option_values);
     $this->smarty->assign("option_output", $option_output);
     $this->smarty->assign("option_selected", $type_id);
     $field = ' `id`,`company` ';
     $list = PartnerAct::act_getPartnerCompany($where, $field);
     $option_company_id = array();
     $option_company_name = array();
     $company_id = 0;
     foreach ($list as $key => $company) {
         $option_company_id[] = $company['id'];
         $option_company_name[] = $company['company'];
         if ($result[0]['company_id'] == $company['id']) {
             $company_id = $company['id'];
         }
     }
     $this->smarty->assign("option_company_id", $option_company_id);
     $this->smarty->assign("option_company_name", $option_company_name);
     $this->smarty->assign("option_company_selected", $company_id);
     $field = " global_user_id as id, global_user_login_name as username ";
     $where = " and  global_user_id in ({$_SESSION['access_id']})";
     $list = PartnerAct::act_getPurchaserList($where, $field);
     $option_purchaser_id = array();
     $option_purchaser = array();
     $purchaser_id = 0;
     foreach ($list as $key => $purchaser) {
         $option_purchaser_id[] = $purchaser['id'];
         $option_purchaser[] = $purchaser['global_user_name'];
         if ($result[0]['purchaseuser_id'] == $purchaser['id']) {
             $purchaser_id = $purchaser['id'];
         }
     }
     $purchaseList = getPurchaseUserList();
     $this->smarty->assign('purchaseList', $purchaseList);
     //采购列表
     $this->smarty->assign("option_purchaser_id", $option_purchaser_id);
     $this->smarty->assign("option_purchaser", $option_purchaser);
     $this->smarty->assign("option_purchaser_selected", $purchaser_id);
     $this->smarty->display('editPartner.htm');
 }
Example #6
0
 public function view_index()
 {
     @session_start();
     global $mod, $act;
     $this->smarty->assign('title', '收货管理表');
     $this->smarty->assign('mod', $mod);
     //模块权限
     $ser_ordersn = isset($_GET['ser_ordersn']) ? $_GET['ser_ordersn'] : '';
     $ser_sku = isset($_GET['ser_sku']) ? $_GET['ser_sku'] : '';
     $ser_parnter = isset($_GET['ser_parnter']) ? $_GET['ser_parnter'] : '';
     $ser_status = isset($_GET['ser_status']) ? $_GET['ser_status'] : '';
     $ser_orderstu = isset($_GET['ser_orderstu']) ? $_GET['ser_orderstu'] : '';
     $ser_cguser = isset($_GET['ser_cguser']) ? $_GET['ser_cguser'] : '';
     $ser_starttime = isset($_GET['ser_startTime']) ? $_GET['ser_startTime'] : '';
     $ser_endtime = isset($_GET['ser_endTime']) ? $_GET['ser_endTime'] : '';
     $ser_receiptstu = isset($_GET['ser_receiptstu']) ? $_GET['ser_receiptstu'] : '';
     $page = isset($_GET['page']) ? $_GET['page'] : '1';
     $loginname = $_SESSION['userCnName'];
     $condition = '';
     if (!empty($ser_ordersn)) {
         $condition .= " AND ordersn = '{$ser_ordersn}'";
     }
     if (!empty($ser_sku)) {
         $condition .= " AND sku LIKE '{$ser_sku}%'";
     }
     if (!empty($ser_status)) {
         $condition .= " AND status = '{$ser_status}'";
     }
     if (!empty($ser_orderstu)) {
         $condition .= " AND order_stu = '{$ser_orderstu}'";
     }
     if (!empty($ser_receiptstu)) {
         if ($ser_receiptstu == 1) {
             $condition .= " AND actualcount = purcount";
         } else {
             if ($ser_receiptstu == 2) {
                 $condition .= " AND actualcount < purcount";
             }
         }
     }
     if (!empty($ser_parnter)) {
         $condition .= " AND parnter LIKE '{$ser_parnter}%'";
     }
     if (!empty($ser_cguser)) {
         $condition .= " AND cguser = '******'";
     }
     if (!empty($ser_starttime) && $ser_endtime >= $ser_starttime) {
         $serstart = strpos($ser_starttime, ':') !== false ? strtotime($ser_starttime) : strtotime($ser_starttime . " 00:00:00");
         $serend = strpos($ser_endtime, ':') !== false ? strtotime($ser_endtime) : strtotime($ser_endtime . " 23:59:59");
         $condition .= " AND purtime BETWEEN '{$serstart}' AND '{$serend}'";
     }
     $purwh = new PurToWhAct();
     $listInfo = $purwh->getReceiptGoods($condition, $page);
     $perNum = 200;
     $totalNum = $listInfo["totalNum"];
     $list = $listInfo["goodsInfo"];
     $listDetail = $listInfo['detailInfo'];
     $pageobj = new Page($totalNum, $perNum);
     $pageStr = $pageobj->fpage();
     $purchaseList = getPurchaseUserList();
     $this->smarty->assign('loginname', $loginname);
     $this->smarty->assign('purchaseList', $purchaseList);
     //采购列表
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->assign('userid', $_SESSION['userId']);
     //登录用户userid
     $this->smarty->assign('list', $list);
     //循环赋值*/
     $this->smarty->assign('listDetail', $listDetail);
     $this->smarty->display('receiptGoods.htm');
 }