예제 #1
0
 public function view_deleteAccountList()
 {
     $id = isset($_GET['id']) ? post_check($_GET['id']) : '';
     $status = '';
     if (intval($id) == 0) {
         $status = '<font color="red">数据异常,删除失败</font>';
         header("location:index.php?mod=omAccount&act=getAccountList&status={$status}");
         exit;
     }
     $omAvailableAct = new OmAvailableAct();
     $tName = 'om_account';
     $where = "WHERE is_delete=0 and id='{$id}'";
     $count = $omAvailableAct->act_getTNameCount($tName, $where);
     if (!$count) {
         $status = '<font color="red">记录不存在,删除失败</font>';
         header("location:index.php?mod=omAccount&act=getAccountList&status={$status}");
         exit;
     }
     $set = "SET is_delete=1 ";
     $where = "WHERE id='{$id}'";
     $affectRow = $omAvailableAct->act_updateTNameRow($tName, $set, $where);
     if ($affectRow) {
         $status = '<font color="green">删除成功</font>';
     } else {
         $status = '<font color="red">删除失败</font>';
     }
     header("location:index.php?mod=omAccount&act=getAccountList&status={$status}");
 }
예제 #2
0
 function act_updateSkuCountInStock()
 {
     $orderId = isset($_GET['orderId']) ? trim($_GET['orderId']) : '';
     $sku_id = isset($_GET['sku_id']) ? trim($_GET['sku_id']) : '';
     $stockqty = isset($_GET['stockqty']) ? trim($_GET['stockqty']) : '';
     $status = isset($_GET['status']) ? trim($_GET['status']) : '';
     if ($orderId == '') {
         self::$errCode = 101;
         self::$errMsg = '参数有误!';
         return false;
     }
     if ($status != '') {
         $ret = OmAvailableAct::act_updateTNameRow("ph_order", "SET status = '4'", "WHERE id = '{$orderId}'");
         if ($ret === false) {
             self::$errCode = 102;
             self::$errMsg = '更新采购订单状态出错!';
             return false;
         }
     }
     if ($sku_id != '' && $stockqty != '') {
         $ret = OmAvailableAct::act_updateTNameRow("ph_order_detail", "SET stockqty = '{$stockqty}'", "WHERE po_id = '{$orderId}' AND sku_id = '{$sku_id}'");
         if ($ret === false) {
             self::$errCode = 103;
             self::$errMsg = '更新采购订单料号数量出错!';
             return false;
         }
     }
     self::$errCode = 0;
     self::$errMsg = '更新成功!';
     return json_encode(array(true));
 }
예제 #3
0
 public function view_deletePlatformList()
 {
     $id = isset($_GET['id']) ? post_check($_GET['id']) : '';
     $status = '';
     if (intval($id) == 0) {
         $status = '数据异常,删除失败';
         header("location:index.php?mod=omPlatform&act=getOmPlatformList&status={$status}");
         exit;
     }
     $omAvailableAct = new OmAvailableAct();
     $tName = 'om_platform';
     $where = "WHERE is_delete=0 and id='{$id}'";
     $count = $omAvailableAct->act_getTNameCount($tName, $where);
     if (!$count) {
         $status = '记录不存在,删除失败';
         header("location:index.php?mod=omPlatform&act=getOmPlatformList&status={$status}");
         exit;
     }
     //获取原始平台账号
     $platformInfo = $omAvailableAct->act_getTNameList($tName, 'platform', ' where id=' . $id);
     $old_platform = $platformInfo[0]['platform'];
     $set = "SET is_delete=1 ";
     $where = "WHERE id='{$id}'";
     $affectRow = $omAvailableAct->act_updateTNameRow($tName, $set, $where);
     if ($affectRow) {
         //更新老系统
         $returnInfo = OldsystemModel::erpSyncPlatform($old_platform, 'delete', $old_platform);
         if ($returnInfo['res_code'] == 200) {
             $status = '删除成功';
         } else {
             $status = '更新老系统失败';
         }
     } else {
         $status = '删除失败';
     }
     header("location:index.php?mod=omPlatform&act=getOmPlatformList&status={$status}");
 }
예제 #4
0
 public function view_deleteBlackList()
 {
     $id = isset($_GET['id']) ? post_check($_GET['id']) : '';
     $status = '';
     if (intval($id) == 0) {
         $status = '数据异常,删除失败';
         header("location:index.php?mod=omBlackList&act=getOmBlackList&status={$status}");
         exit;
     }
     $omAvailableAct = new OmAvailableAct();
     $tName = 'om_blacklist';
     $where = "WHERE is_delete=0 and id='{$id}'";
     $count = $omAvailableAct->act_getTNameCount($tName, $where);
     if (!$count) {
         $status = '记录不存在,删除失败';
         header("location:index.php?mod=omBlackList&act=getOmBlackList&status={$status}");
         exit;
     }
     $set = "SET is_delete=1 ";
     $where = "WHERE id='{$id}'";
     $affectRow = $omAvailableAct->act_updateTNameRow($tName, $set, $where);
     if ($affectRow) {
         $status = '删除成功';
     } else {
         $status = '删除失败';
     }
     header("location:index.php?mod=omBlackList&act=getOmBlackList&status={$status}");
 }