Skip to content

Commit

Permalink
admin product manager: 增加数据采集按钮,以及数据采集的一些字段显示
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed Mar 25, 2021
1 parent 1cc1baa commit 50f9607
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 4 deletions.
21 changes: 21 additions & 0 deletions app/appadmin/languages/zh-CN/appadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,13 +880,34 @@
'canceled' => '已取消',
'Cart & Coupon' => '购物车&优惠券',
'Admin Url Key Sql Gii' => '后台菜单Sql Gii',
'Third Collection' => '第三方采集',
'Third Refer Url' => '外部来源',
'Third Refer Code' => '外部编码',
'Third Product Code' => '第三方货号',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',
'' => '',




Expand Down
4 changes: 3 additions & 1 deletion app/appadmin/modules/Catalog/block/productinfo/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ public function getEditBar()
<li><a class="add" href="'.$this->_batchInsertUrl.'" target="dialog" height="680" width="1200" drawable="true" mask="true"><span>' . Yii::$service->page->translate->__('Batch Add') . '</span></a></li>
<li><a target="dialog" height="680" width="1200" drawable="true" mask="true" class="edit" href="'.$this->_editUrl.'?'.$this->_primaryKey.'={sid_user}" ><span>' . Yii::$service->page->translate->__('Update') . '</span></a></li>
<li><a csrfName="' .CRequest::getCsrfName(). '" csrfVal="' .CRequest::getCsrfValue(). '" title="' . Yii::$service->page->translate->__('Are you sure you want to delete these records?') . '" target="selectedTodo" rel="'.$this->_primaryKey.'s" postType="string" href="'.$this->_deleteUrl.'" class="delete"><span>' . Yii::$service->page->translate->__('Batch Delete') . '</span></a></li>
</ul>';
<li><a style="background-color: #eea236; border: #eea236;" href="https://www.shopfw.com/soft/fecmall.html" target="_blank" ><span>批量采集商品</span></a></li>
</ul>';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function getLastData()
'custom_option_img' => $this->getCustomOpImgHtml(),
'custom_option_list'=> $this->_custom_option_list_str,
'relation' => $this->getRelationInfo(),
'thirdInfo' => $this->getThirdDataInfo(),
];
}

Expand Down Expand Up @@ -174,6 +175,16 @@ public function getRelationInfo()

return $this->_lang_attr.$editBar.$this->_textareas;
}

public function getThirdDataInfo()
{
$this->_lang_attr = '';
$this->_textareas = '';
$editArr = $this->_attr->getThirdDataInfo();
$editBar = $this->getEditBar($editArr);

return $this->_lang_attr.$editBar.$this->_textareas;
}

public function getBaseInfo()
{
Expand Down
12 changes: 12 additions & 0 deletions app/appadmin/modules/Catalog/block/productinfo/Manageredit.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function getLastData()
'custom_option_img' => $this->getCustomOpImgHtml(),
'custom_option_list'=> $this->_custom_option_list_str,
'relation' => $this->getRelationInfo(),
'thirdInfo' => $this->getThirdDataInfo(),
];
}

Expand Down Expand Up @@ -173,7 +174,18 @@ public function getRelationInfo()

return $this->_lang_attr.$editBar.$this->_textareas;
}


public function getThirdDataInfo()
{
$this->_lang_attr = '';
$this->_textareas = '';
$editArr = $this->_attr->getThirdDataInfo();
$editBar = $this->getEditBar($editArr);

return $this->_lang_attr.$editBar.$this->_textareas;
}

public function getBaseInfo()
{
$this->_lang_attr = '';
Expand Down
32 changes: 32 additions & 0 deletions app/appadmin/modules/Catalog/block/productinfo/index/Attr.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,38 @@ public function getRelationInfo()

];
}

public function getThirdDataInfo()
{
return [
[
'label' => Yii::$service->page->translate->__('Third Refer Url'),
'name' => 'third_refer_url',
'display' => [
'type' => 'inputString',
],
'require' => 0,
],
[
'label' => Yii::$service->page->translate->__('Third Refer Code'),
'name' => 'third_refer_code',
'display' => [
'type' => 'inputString',
],
'require' => 0,
],
[
'label' => Yii::$service->page->translate->__('Third Product Code'),
'name' => 'third_product_code',
'display' => [
'type' => 'inputString',
],
'require' => 0,
],

];
}


public function getBaseInfo()
{
Expand Down
31 changes: 31 additions & 0 deletions app/appadmin/modules/Catalog/block/productinfo/index/BatchAttr.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,38 @@ public function getRelationInfo()

];
}

public function getThirdDataInfo()
{
return [
[
'label' => Yii::$service->page->translate->__('Third Refer Url'),
'name' => 'third_refer_url',
'display' => [
'type' => 'inputString',
],
'require' => 0,
],
[
'label' => Yii::$service->page->translate->__('Third Refer Code'),
'name' => 'third_refer_code',
'display' => [
'type' => 'inputString',
],
'require' => 0,
],
[
'label' => Yii::$service->page->translate->__('Third Product Code'),
'name' => 'third_product_code',
'display' => [
'type' => 'inputString',
],
'require' => 0,
],

];
}

public function getBaseInfo()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ function thissubmit(thiss){
<!--<li><a href="javascript:;"><span><?= Yii::$service->page->translate->__('Custom Option') ?></span></a></li>
-->
<li><a href="javascript:;"><span><?= Yii::$service->page->translate->__('Relate Product') ?></span></a></li>
</ul>
<li><a href="javascript:;"><span><?= Yii::$service->page->translate->__('Third Collection') ?></span></a></li>

</ul>
</div>
</div>
<div class="tabsContent" style="height:550px;overflow:auto;">
Expand Down Expand Up @@ -607,7 +609,10 @@ function getTableStr(attrArr, i, hStr) {
</div>
</div>
<div class="relation_list" style="margin:20px 2px;">
<?= $relation ?>
<?= $relation ?>
</div>
<div class="third_info_list" style="margin:20px 2px;">
<?= $thirdInfo ?>
</div>
</div>
<div class="tabsFooter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ function thissubmit(thiss){
<!--<li><a href="javascript:;"><span><?= Yii::$service->page->translate->__('Custom Option') ?></span></a></li>
-->
<li><a href="javascript:;"><span><?= Yii::$service->page->translate->__('Relate Product') ?></span></a></li>
</ul>
<li><a href="javascript:;"><span><?= Yii::$service->page->translate->__('Third Collection') ?></span></a></li>

</ul>
</div>
</div>
<div class="productPage tabsContent" style="height:550px;overflow:auto;">
Expand Down Expand Up @@ -393,6 +395,9 @@ function thissubmit(thiss){
<div class="relation_list" style="margin:20px 2px;">
<?= $relation ?>
</div>
<div class="third_info_list" style="margin:20px 2px;">
<?= $thirdInfo ?>
</div>
</div>
<div class="tabsFooter">
<div class="tabsFooterContent"></div>
Expand Down

0 comments on commit 50f9607

Please sign in to comment.