Ejemplo n.º 1
0
 function act_ajaxGetAllArtPicBySpu()
 {
     $spu = isset($_POST['spu']) ? $_POST['spu'] : "";
     //料号条码
     if (empty($spu)) {
         return false;
     }
     $picUrl = getAllArtPicFromOpenSysSpu($spu);
     return $picUrl;
 }
Ejemplo n.º 2
0
 public function view_updateSkuSing()
 {
     $id = $_GET['id'] ? post_check(trim($_GET['id'])) : '';
     //检查spu是否非法
     $tName = 'pc_goods';
     $select = '*';
     $where = "WHERE id={$id} and is_delete=0";
     $skuList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($skuList)) {
         $status = "SKU不存在";
         header("Location:index.php?mod=goods&act=getGoodsList&status={$status}");
         exit;
     }
     $spu = $skuList[0]['spu'];
     $tName = 'pc_archive_spu_property_value_relation';
     $select = '*';
     $where = "WHERE spu='{$spu}'";
     $PPV = OmAvailableModel::getTNameList($tName, $select, $where);
     $tName = 'pc_archive_spu_input_value_relation';
     $INV = OmAvailableModel::getTNameList($tName, $select, $where);
     $tName = 'pc_archive_spu_link';
     $Link = OmAvailableModel::getTNameList($tName, $select, $where);
     $navlist = array(array('url' => 'index.php?mod=goods&act=getGoodsList', 'title' => '产品信息'), array('url' => 'index.php?mod=goods&act=getGoodsList', 'title' => '产品信息列表'), array('url' => "index.php?mod=goods&act=updateSkuSing&id={$id}", 'title' => "修改产品信息_{$skuList[0]['sku']}"));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('onevar', 1);
     $this->smarty->assign('twovar', 11);
     $this->smarty->assign('title', 'SKU修改');
     $this->smarty->assign('id', $skuList[0]['id']);
     $this->smarty->assign('spu', $skuList[0]['spu']);
     $this->smarty->assign('sku', $skuList[0]['sku']);
     $this->smarty->assign('pid', $skuList[0]['goodsCategory']);
     $this->smarty->assign('goodsName', $skuList[0]['goodsName']);
     $this->smarty->assign('goodsCost', $skuList[0]['goodsCost']);
     $this->smarty->assign('goodsWeight', $skuList[0]['goodsWeight']);
     $this->smarty->assign('goodsNote', $skuList[0]['goodsNote']);
     $this->smarty->assign('goodsLength', $skuList[0]['goodsLength']);
     $this->smarty->assign('goodsWidth', $skuList[0]['goodsWidth']);
     $this->smarty->assign('goodsHeight', $skuList[0]['goodsHeight']);
     $this->smarty->assign('goodsColor', $skuList[0]['goodsColor']);
     $this->smarty->assign('goodsStatus', $skuList[0]['goodsStatus']);
     $this->smarty->assign('purchaseId', $skuList[0]['purchaseId']);
     $this->smarty->assign('pmId', $skuList[0]['pmId']);
     $this->smarty->assign('isPacking', $skuList[0]['isPacking']);
     $this->smarty->assign('goodsSize', $skuList[0]['goodsSize']);
     $this->smarty->assign('pmCapacity', $skuList[0]['pmCapacity']);
     $this->smarty->assign('isNew', $skuList[0]['isNew']);
     $pathImplodeStr = getAllPathBypid($skuList[0]['goodsCategory']);
     $this->smarty->assign('pathImplodeStr', $pathImplodeStr);
     $this->smarty->assign('PPV', $PPV);
     $this->smarty->assign('INV', $INV);
     $this->smarty->assign('Link', $Link);
     if ($skuList[0]['isNew'] == 1) {
         //是新品的话,不用加载图片
         $spuPicList = array();
     } else {
         $spuPicList = getAllArtPicFromOpenSysSpu($skuList[0]['spu']);
     }
     $this->smarty->assign('spuPicList', $spuPicList);
     $this->smarty->display("updateSkuSing.htm");
 }
Ejemplo n.º 3
0
 public function view_updateSpuArchive()
 {
     $spu = $_GET['spu'] ? post_check(trim($_GET['spu'])) : '';
     ///////////////////检查spu是否非法
     $tName = 'pc_spu_archive';
     $select = '*';
     $where = "WHERE spu='{$spu}' and is_delete=0";
     $spuArchiveList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($spuArchiveList)) {
         $status = "SPU档案中不存在 {$spu}";
         header("Location:index.php?mod=autoCreateSpu&act=getSpuArchiveList&status={$status}");
         exit;
     }
     $tName = 'pc_archive_spu_property_value_relation';
     $select = '*';
     $where = "WHERE spu='{$spu}'";
     $PPV = OmAvailableModel::getTNameList($tName, $select, $where);
     $tName = 'pc_archive_spu_input_value_relation';
     $INV = OmAvailableModel::getTNameList($tName, $select, $where);
     $tName = 'pc_archive_spu_link';
     $Link = OmAvailableModel::getTNameList($tName, $select, $where);
     //add 20140526 获取SPUPKSKU信息
     $tName = 'pc_spu_archive_pk_sku';
     $spuPkSkuList = OmAvailableModel::getTNameList($tName, $select, $where);
     $tmpArr = array();
     foreach ($spuPkSkuList as $value) {
         $tmpArr[] = $value['sku'];
     }
     $spuPkSkuList = $tmpArr;
     $tName = 'pc_goods';
     $select = 'sku';
     $where = "WHERE is_delete=0 and spu='{$spuArchiveList[0]['secretInfo']}'";
     $skuList = OmAvailableModel::getTNameList($tName, $select, $where);
     $navlist = array(array('url' => 'index.php?mod=autoCreateSpu&act=getAutoCreatePrefixList', 'title' => 'SPU管理'), array('url' => 'index.php?mod=autoCreateSpu&act=getSpuArchiveList', 'title' => 'SPU档案管理'), array('url' => "index.php?mod=autoCreateSpu&act=updateSpuArchive&spu={$spu}", 'title' => "SPU档案修改_{$spu}"));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('onevar', 2);
     $this->smarty->assign('twovar', 23);
     $this->smarty->assign('title', 'SPU档案修改');
     $this->smarty->assign('spu', $spuArchiveList[0]['spu']);
     $this->smarty->assign('pid', $spuArchiveList[0]['categoryPath']);
     $this->smarty->assign('pidArr', explode('-', $spuArchiveList[0]['categoryPath']));
     $this->smarty->assign('spuName', $spuArchiveList[0]['spuName']);
     $this->smarty->assign('spuPurchasePrice', $spuArchiveList[0]['spuPurchasePrice']);
     $this->smarty->assign('spuCalWeight', $spuArchiveList[0]['spuCalWeight']);
     $this->smarty->assign('spuLowestPrice', $spuArchiveList[0]['spuLowestPrice']);
     $this->smarty->assign('referMonthSales', $spuArchiveList[0]['referMonthSales']);
     $this->smarty->assign('minNum', $spuArchiveList[0]['minNum']);
     $this->smarty->assign('freight', $spuArchiveList[0]['freight']);
     $this->smarty->assign('platformId', $spuArchiveList[0]['platformId']);
     $this->smarty->assign('secretInfo', $spuArchiveList[0]['secretInfo']);
     $this->smarty->assign('lowestUrl', $spuArchiveList[0]['lowestUrl']);
     $this->smarty->assign('bidUrl', $spuArchiveList[0]['bidUrl']);
     $this->smarty->assign('spuNote', $spuArchiveList[0]['spuNote']);
     $this->smarty->assign('spuStatus', $spuArchiveList[0]['spuStatus']);
     $this->smarty->assign('auditStatus', $spuArchiveList[0]['auditStatus']);
     $this->smarty->assign('PPV', $PPV);
     $this->smarty->assign('INV', $INV);
     $this->smarty->assign('Link', $Link);
     $this->smarty->assign('spuPkSkuList', $spuPkSkuList);
     $this->smarty->assign('skuList', $skuList);
     $pathImplodeStr = getAllPathBypid($spuArchiveList[0]['categoryPath']);
     $this->smarty->assign('pathImplodeStr', $pathImplodeStr);
     $tName = 'pc_goods';
     $where = "WHERE spu='{$spu}' and isNew=0";
     $countSpuSku = OmAvailableModel::getTNameCount($tName, $where);
     if ($countSpuSku) {
         //该spu对应的sku是老品的时候才加载图片
         $spuPicList = getAllArtPicFromOpenSysSpu($spu);
     } else {
         $spuPicList = array();
     }
     $tName = 'pc_special_property_spu';
     $select = 'propertyId';
     $where = "WHERE spu='{$spu}'";
     $pspsList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (!empty($pspsList)) {
         $pspsIdArr = array();
         foreach ($pspsList as $pspsValue) {
             $pspsIdArr[] = $pspsValue['propertyId'];
         }
         $this->smarty->assign('spId', $pspsIdArr);
     }
     $this->smarty->assign('spuPicList', $spuPicList);
     $this->smarty->display("updateSpuArchive.htm");
 }