This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">Stemcell_Customer::images/logo.png</argument>
</arguments>
</referenceBlock>
</body>
</page>
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Backend\Block\Template" name="some_css" template="Stemcell_Customer::customer/css.phtml"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header">
<block class="Magento\Backend\Block\Page\Header" name="logo" before="-">
<arguments>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">STEMCELLMART</argument>
<argument name="logo_image_src" xsi:type="string">Stemcell_Customer::images/stemcell.png</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="column_name">
<action method="setTemplate">
<argument name="template" translate="true" xsi:type="string">Stemcell_Customer::items/column/name.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Lab Edit
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="lab_form"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Lab Import
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="lab_import_form"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Lab List
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="lab_grid"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Salesperson Edit
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="salesperson_form"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Salesperson Import
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="salesperson_import_form"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Salesperson List
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="salesperson_grid"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,6 @@
<style>
#customer-edit-delete-button, #order, #invalidateToken, #tab_cart_content, #tab_newsletter_content,
#tab_customer_edit_tab_agreements_content, #tab_reviews_content, #tab_wishlist_content{
display: none;
}
</style>
@@ -0,0 +1,91 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/**
* @var $block \Magento\Sales\Block\Adminhtml\Items\Column\Name
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>
<?php
/** @var \Magento\Catalog\Helper\Data $catalogHelper */
$catalogHelper = $block->getData('catalogHelper');
?>
<?php
if ($_item = $block->getItem()):
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getProductId());
?>
<div id="order_item_<?= (int) $_item->getId() ?>_title"
class="product-title">
<?= $block->escapeHtml($_item->getName()) ?>
</div>
<div class="product-sku-block">
<span><?= $block->escapeHtml(__('SKU'))?>:</span>
<?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($block->escapeHtml($block->getSku()))) ?>
</div>
<?php if ($block->getOrderOptions()): ?>
<dl class="item-options">
<?php foreach ($block->getOrderOptions() as $_option): ?>
<dt><?= $block->escapeHtml($_option['label']) ?>:</dt>
<dd>
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
<?= /* @noEscape */ $block->getCustomizedOptionValue($_option) ?>
<?php else: ?>
<?php $_option = $block->getFormattedOption($_option['value']); ?>
<?php $dots = 'dots' . uniqid(); ?>
<?php $id = 'id' . uniqid(); ?>
<?= $block->escapeHtml($_option['value'], ['a', 'br']) ?>
<?php if (isset($_option['remainder']) && $_option['remainder']): ?>
<span id="<?= /* @noEscape */ $dots; ?>"> ...</span>
<span id="<?= /* @noEscape */ $id; ?>">
<?= $block->escapeHtml($_option['remainder'], ['a']) ?>
</span>
<?php $scriptString = <<<script
require(['prototype'], function() {
script;
$scriptString .= "$('" . /* @noEscape */ $id . "').hide();" . PHP_EOL;
$scriptString .= "$('" . /* @noEscape */ $id .
"').up().observe('mouseover', function(){ $('" . /* @noEscape */ $id . "').show();});" .
PHP_EOL;
$scriptString .= "$('" . /* @noEscape */ $id .
"').up().observe('mouseover', function(){ $('" . /* @noEscape */ $dots .
"').hide();});" . PHP_EOL;
$scriptString .= "$('" . /* @noEscape */ $id .
"').up().observe('mouseout', function(){ $('" . /* @noEscape */ $id .
"').hide();});" . PHP_EOL;
$scriptString .= "$('" . /* @noEscape */ $id .
"').up().observe('mouseout', function(){ $('" . /* @noEscape */ $dots .
"').show();});" . PHP_EOL . "});" . PHP_EOL;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
<?php endif; ?>
<?php endif; ?>
</dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?= $block->escapeHtml($_item->getDescription()) ?>
<?php if($_product->getData('included')):?>
<dl class="item-options summary-detail">
<dt>组合包含</dt>
<dd><?= $_product->getData('included')?></dd>
</dl>
<style>
.item-options.summary-detail ul{padding-left: 12px;margin-bottom: 10px;font-size: 12px;}
.item-options.summary-detail ul li{list-style: disc outside;margin-bottom: 0;}
.item-options.summary-detail ul ul{margin-top: 5px;}
.item-options.summary-detail ul ul li{list-style: circle outside;}
</style>
<?php endif; ?>
<?php endif; ?>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="customer">
<field name="extension_attributes.customer_abbr" sortOrder="85" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<label translate="true">Customer Abbr</label>
</settings>
</field>
</fieldset>
</form>
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">lab_form.lab_form_data_source</item>
<item name="deps" xsi:type="string">lab_form.lab_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Customer Information</item>
<item name="layout" xsi:type="array">
<item name="type" xsi:type="string">tabs</item>
</item>
<item name="buttons" xsi:type="array">
<item name="save" xsi:type="string">Stemcell\Customer\Block\Adminhtml\Edit\SaveButton</item>
<item name="back" xsi:type="string">Magento\Customer\Block\Adminhtml\Edit\BackButton</item>
</item>
</argument>
<dataSource name="lab_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="stemcell_customer/lab/save"/>
</settings>
<aclResource>Stemcell_Customer::salesperson_index</aclResource>
<dataProvider class="Stemcell\Customer\Ui\Component\DataProvider\Lab" name="lab_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>lab_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="lab">
<settings>
<label translate="true">Lab</label>
</settings>
<field name="lab_id" formElement="hidden">
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="created_at" formElement="input">
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="lab_code" formElement="input">
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">LAB ID</label>
</settings>
</field>
<email name="booking_account">
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">Booking Account</label>
</settings>
</email>
<field name="pi_sap_id" formElement="input">
<settings>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">PI SAP ID</label>
</settings>
</field>
<field name="customer_id" sortOrder="50" formElement="select">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Stemcell\Customer\Ui\Component\DataProvider\VendorOption</item>
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
<item name="filterOptions" xsi:type="boolean">true</item>
<item name="showCheckbox" xsi:type="boolean">true</item>
<item name="chipsEnabled" xsi:type="boolean">true</item>
<item name="multiple" xsi:type="boolean">false</item>
<item name="disableLabel" xsi:type="boolean">true</item>
</item>
</argument>
<settings>
<label translate="true">Dealer Name</label>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
</settings>
</field>
<field name="salesperson_id" sortOrder="51" formElement="select">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Stemcell\Customer\Ui\Component\DataProvider\SalespersonOption</item>
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
<item name="filterOptions" xsi:type="boolean">true</item>
<item name="showCheckbox" xsi:type="boolean">true</item>
<item name="chipsEnabled" xsi:type="boolean">true</item>
<item name="multiple" xsi:type="boolean">false</item>
<item name="disableLabel" xsi:type="boolean">true</item>
</item>
</argument>
<settings>
<label translate="true">Salesperson</label>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
</settings>
</field>
<field name="is_active" formElement="checkbox">
<settings>
<dataType>boolean</dataType>
<label translate="true">Is Active</label>
</settings>
<formElements>
<checkbox>
<settings>
<valueMap>
<map name="false" xsi:type="number">0</map>
<map name="true" xsi:type="number">1</map>
</valueMap>
<prefer>toggle</prefer>
</settings>
</checkbox>
</formElements>
</field>
</fieldset>
</form>
@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">lab_grid.lab_grid_data_source</item>
</item>
</argument>
<settings>
<spinner>lab_columns</spinner>
<deps>
<dep>lab_grid.lab_grid_data_source</dep>
</deps>
<buttons>
<button name="add">
<url path="*/*/new"/>
<class>primary</class>
<label translate="true">Add New</label>
</button>
<button name="import">
<url path="*/*/import"/>
<class>primary</class>
<label translate="true">Import</label>
</button>
</buttons>
</settings>
<dataSource name="lab_grid_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<storageConfig>
<param name="indexField" xsi:type="string">lab_id</param>
</storageConfig>
<updateUrl path="mui/index/render"/>
</settings>
<aclResource>Stemcell_Customer::salesperson_index</aclResource>
<dataProvider class="Stemcell\Customer\Ui\Component\Listing\Lab\DataProvider" name="lab_grid_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>lab_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<listingToolbar name="listing_top">
<settings>
<sticky>true</sticky>
</settings>
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<filters name="listing_filters" />
<massaction name="listing_massaction">
<action name="delete">
<settings>
<confirm>
<message translate="true">Are you sure you want to delete selected lab records?</message>
<title translate="true">Delete Lab Records</title>
</confirm>
<url path="stemcell_customer/lab/massDelete"/>
<type>delete</type>
<label translate="true">Delete</label>
</settings>
</action>
</massaction>
<paging name="listing_paging"/>
<exportButton name="export_button">
<settings>
<options>
<option name="xlsx" xsi:type="array">
<item name="value" xsi:type="string">xlsx</item>
<item name="label" xsi:type="string" translate="true">Excel</item>
<item name="url" xsi:type="string">*/*/export</item>
</option>
</options>
</settings>
</exportButton>
<filterSearch name="fulltext"/>
</listingToolbar>
<columns name="lab_columns">
<selectionsColumn name="ids" component="Magento_Sales/js/grid/columns/multiselect">
<settings>
<indexField>lab_id</indexField>
</settings>
</selectionsColumn>
<column name="lab_code">
<settings>
<filter>text</filter>
<label translate="true">LAB ID</label>
</settings>
</column>
<column name="booking_account">
<settings>
<filter>text</filter>
<label translate="true">Booking Account</label>
</settings>
</column>
<column name="pi_sap_id">
<settings>
<filter>text</filter>
<label translate="true">PI SAP ID</label>
</settings>
</column>
<column name="is_active" component="Magento_Ui/js/grid/columns/select">
<settings>
<filter>select</filter>
<dataType>select</dataType>
<options class="Magento\Config\Model\Config\Source\Yesno"/>
<label translate="true">Is Active</label>
</settings>
</column>
<column name="customer_firstname">
<settings>
<filter>text</filter>
<label translate="true">Dealer Name</label>
</settings>
</column>
<column name="salesperson_name">
<settings>
<filter>text</filter>
<label translate="true">Salesperson</label>
</settings>
</column>
<column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
<settings>
<dataType>date</dataType>
<label translate="true">Created At</label>
<sorting>desc</sorting>
</settings>
</column>
<column name="updated_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
<settings>
<dataType>date</dataType>
<label translate="true">Updated At</label>
</settings>
</column>
<actionsColumn name="actions" class="Stemcell\Customer\Ui\Component\Listing\Columns\LabActions">
<settings>
<indexField>lab_id</indexField>
</settings>
</actionsColumn>
</columns>
</listing>
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">lab_import_form.lab_form_data_source</item>
<item name="deps" xsi:type="string">lab_import_form.lab_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Customer Information</item>
<item name="layout" xsi:type="array">
<item name="type" xsi:type="string">tabs</item>
</item>
<item name="buttons" xsi:type="array">
<item name="back" xsi:type="string">Magento\Customer\Block\Adminhtml\Edit\BackButton</item>
<item name="sample" xsi:type="string">Stemcell\Customer\Block\Adminhtml\Edit\SampleButton</item>
</item>
</argument>
<dataSource name="lab_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="stemcell_customer/lab/save"/>
</settings>
<aclResource>Stemcell_Customer::salesperson_index</aclResource>
<dataProvider class="Stemcell\Customer\Ui\Component\DataProvider\Lab" name="lab_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>lab_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="lab">
<settings>
<label translate="true">Lab</label>
</settings>
<field name="import" formElement="fileUploader">
<settings>
<label translate="true">Import</label>
<notice translate="true">Please upload xlsx, xls</notice>
</settings>
<formElements>
<fileUploader>
<settings>
<uploaderConfig>
<param xsi:type="string" name="url">stemcell_customer/lab/importpost</param>
</uploaderConfig>
<allowedExtensions>xlsx xls</allowedExtensions>
</settings>
</fileUploader>
</formElements>
</field>
</fieldset>
</form>
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">salesperson_form.salesperson_form_data_source</item>
<item name="deps" xsi:type="string">salesperson_form.salesperson_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Customer Information</item>
<item name="layout" xsi:type="array">
<item name="type" xsi:type="string">tabs</item>
</item>
<item name="buttons" xsi:type="array">
<item name="save" xsi:type="string">Stemcell\Customer\Block\Adminhtml\Edit\SaveButton</item>
<item name="back" xsi:type="string">Magento\Customer\Block\Adminhtml\Edit\BackButton</item>
</item>
</argument>
<dataSource name="salesperson_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="stemcell_customer/salesperson/save"/>
</settings>
<aclResource>Stemcell_Customer::salesperson_index</aclResource>
<dataProvider class="Stemcell\Customer\Ui\Component\DataProvider\Salesperson" name="salesperson_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>salesperson_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="salesperson">
<settings>
<label translate="true">Salesperson</label>
</settings>
<field name="salesperson_id" formElement="hidden">
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="created_at" formElement="input">
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="name" formElement="input">
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">Name</label>
</settings>
</field>
<email name="email">
<settings>
<validation>
<rule name="validate-email" xsi:type="boolean">true</rule>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">Email</label>
</settings>
</email>
<field name="telephone" formElement="input">
<settings>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">Telephone</label>
</settings>
</field>
<email name="rsm_email">
<settings>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">RSM Email</label>
</settings>
</email>
<field name="sisr_email" formElement="input">
<settings>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">SISR Email</label>
</settings>
</field>
<field name="csr_email" formElement="input">
<settings>
<dataType>text</dataType>
<visible>true</visible>
<label translate="true">CSR Email</label>
</settings>
</field>
<field name="is_active" formElement="checkbox">
<settings>
<dataType>boolean</dataType>
<label translate="true">Is Active</label>
</settings>
<formElements>
<checkbox>
<settings>
<valueMap>
<map name="false" xsi:type="number">0</map>
<map name="true" xsi:type="number">1</map>
</valueMap>
<prefer>toggle</prefer>
</settings>
</checkbox>
</formElements>
</field>
</fieldset>
</form>
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">salesperson_grid.salesperson_grid_data_source</item>
</item>
</argument>
<settings>
<spinner>salesperson_columns</spinner>
<deps>
<dep>salesperson_grid.salesperson_grid_data_source</dep>
</deps>
<buttons>
<button name="add">
<url path="*/*/new"/>
<class>primary</class>
<label translate="true">Add New</label>
</button>
<button name="import">
<url path="*/*/import"/>
<class>primary</class>
<label translate="true">Import</label>
</button>
</buttons>
</settings>
<dataSource name="salesperson_grid_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<storageConfig>
<param name="indexField" xsi:type="string">salesperson_id</param>
</storageConfig>
<updateUrl path="mui/index/render"/>
</settings>
<aclResource>Stemcell_Customer::salesperson_index</aclResource>
<dataProvider class="Stemcell\Customer\Ui\Component\Listing\Salesperson\DataProvider" name="salesperson_grid_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>salesperson_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<listingToolbar name="listing_top">
<settings>
<sticky>true</sticky>
</settings>
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<filters name="listing_filters" />
<massaction name="listing_massaction">
<action name="delete">
<settings>
<confirm>
<message translate="true">Are you sure you want to delete selected salesperson records?</message>
<title translate="true">Delete Salesperson Records</title>
</confirm>
<url path="stemcell_customer/salesperson/massDelete"/>
<type>delete</type>
<label translate="true">Delete</label>
</settings>
</action>
</massaction>
<filterSearch name="fulltext"/>
<paging name="listing_paging"/>
</listingToolbar>
<columns name="salesperson_columns">
<selectionsColumn name="ids" component="Magento_Sales/js/grid/columns/multiselect">
<settings>
<indexField>salesperson_id</indexField>
</settings>
</selectionsColumn>
<column name="name">
<settings>
<filter>text</filter>
<label translate="true">Name</label>
</settings>
</column>
<column name="email">
<settings>
<filter>text</filter>
<label translate="true">Email</label>
</settings>
</column>
<column name="telephone">
<settings>
<filter>text</filter>
<label translate="true">Telephone</label>
</settings>
</column>
<column name="is_active" component="Magento_Ui/js/grid/columns/select">
<settings>
<filter>select</filter>
<dataType>select</dataType>
<options class="Magento\Config\Model\Config\Source\Yesno"/>
<label translate="true">Is Active</label>
</settings>
</column>
<column name="rsm_email">
<settings>
<filter>text</filter>
<label translate="true">RSM Email</label>
</settings>
</column>
<column name="sisr_email">
<settings>
<filter>text</filter>
<label translate="true">SISR Email</label>
</settings>
</column>
<column name="csr_email">
<settings>
<filter>text</filter>
<label translate="true">CSR Email</label>
</settings>
</column>
<column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
<settings>
<dataType>date</dataType>
<label translate="true">Created At</label>
<sorting>desc</sorting>
</settings>
</column>
<column name="updated_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
<settings>
<filter>false</filter>
<dataType>date</dataType>
<label translate="true">Updated At</label>
</settings>
</column>
<actionsColumn name="actions" class="Stemcell\Customer\Ui\Component\Listing\Columns\Actions">
<settings>
<indexField>salesperson_id</indexField>
</settings>
</actionsColumn>
</columns>
</listing>
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">salesperson_import_form.salesperson_form_data_source</item>
<item name="deps" xsi:type="string">salesperson_import_form.salesperson_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Customer Information</item>
<item name="layout" xsi:type="array">
<item name="type" xsi:type="string">tabs</item>
</item>
<item name="buttons" xsi:type="array">
<!-- <item name="save" xsi:type="string">Stemcell\Customer\Block\Adminhtml\Edit\SaveButton</item>-->
<item name="back" xsi:type="string">Magento\Customer\Block\Adminhtml\Edit\BackButton</item>
<item name="back" xsi:type="string">Stemcell\Customer\Block\Adminhtml\Salesperson\SampleButton</item>
</item>
</argument>
<dataSource name="salesperson_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="stemcell_customer/salesperson/save"/>
</settings>
<aclResource>Stemcell_Customer::salesperson_index</aclResource>
<dataProvider class="Stemcell\Customer\Ui\Component\DataProvider\Salesperson" name="salesperson_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>salesperson_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="salesperson">
<settings>
<label translate="true">Catalog Import</label>
</settings>
<field name="import" formElement="fileUploader">
<settings>
<label translate="true">Import</label>
<notice translate="true">Please upload excel</notice>
</settings>
<formElements>
<fileUploader>
<settings>
<uploaderConfig>
<param xsi:type="string" name="url">stemcell_catalog/stock/importpost</param>
</uploaderConfig>
<allowedExtensions>xls xlsx</allowedExtensions>
</settings>
</fileUploader>
</formElements>
</field>
</fieldset>
</form>
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

@@ -0,0 +1,563 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">customer_form.customer_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Customer Information</item>
<item name="reverseMetadataMerge" xsi:type="boolean">true</item>
</argument>
<settings>
<buttons>
<button name="save_and_continue" class="Magento\Customer\Block\Adminhtml\Edit\SaveAndContinueButton"/>
<button name="save" class="Magento\Customer\Block\Adminhtml\Edit\SaveButton"/>
<button name="reset" class="Magento\Customer\Block\Adminhtml\Edit\ResetButton"/>
<button name="order" class="Magento\Customer\Block\Adminhtml\Edit\OrderButton"/>
<button name="resetPassword" class="Magento\Customer\Block\Adminhtml\Edit\ResetPasswordButton"/>
<button name="unlock" class="Magento\Customer\Block\Adminhtml\Edit\UnlockButton"/>
<button name="invalidateToken" class="Magento\Customer\Block\Adminhtml\Edit\InvalidateTokenButton"/>
<button name="delete" class="Magento\Customer\Block\Adminhtml\Edit\DeleteButton"/>
<button name="back" class="Magento\Customer\Block\Adminhtml\Edit\BackButton"/>
</buttons>
<layout>
<navContainerName>left</navContainerName>
<type>tabs</type>
</layout>
<deps>
<dep>customer_form.customer_form_data_source</dep>
</deps>
</settings>
<dataSource name="customer_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<validateUrl path="customer/index/validate"/>
<submitUrl path="customer/index/save"/>
</settings>
<dataProvider class="Magento\Customer\Model\Customer\DataProviderWithDefaultAddresses" name="customer_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>entity_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<htmlContent name="customer_edit_tab_view_content">
<block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View" name="customer_edit_tab_view" template="Magento_Customer::tab/view.phtml">
<arguments>
<argument name="sort_order" xsi:type="number">1000</argument>
<argument name="tab_label" xsi:type="string" translate="true">Customer View</argument>
</arguments>
<block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View\PersonalInfo" name="personal_info" template="Magento_Customer::tab/view/personal_info.phtml"/>
</block>
</htmlContent>
<fieldset name="customer">
<settings>
<opened>true</opened>
<label translate="true">Account Information</label>
</settings>
<field name="entity_id" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="confirmation" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="created_in" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<visible>false</visible>
</settings>
</field>
<field name="default_billing" formElement="checkbox">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>boolean</dataType>
<visible>false</visible>
</settings>
</field>
<field name="default_shipping" formElement="checkbox">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>boolean</dataType>
<visible>false</visible>
</settings>
</field>
<field name="website_id" component="Magento_Customer/js/form/element/website" formElement="select">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<visible>false</visible>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<tooltip>
<link>https://experienceleague.adobe.com/docs/commerce-admin/start/setup/websites-stores-views.html#scope-settings</link>
<description translate="true">If your Magento installation has multiple websites, you can edit the scope to associate the customer with a specific site.</description>
</tooltip>
<imports>
<link name="customerId">${ $.provider }:data.customer.entity_id</link>
</imports>
</settings>
<formElements>
<select>
<settings>
<options class="Magento\Customer\ViewModel\Customer\Website"/>
</settings>
</select>
</formElements>
</field>
<field name="prefix" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<container name="container_group" component="Magento_Ui/js/form/components/group" sortOrder="2000">
<argument name="data" xsi:type="array">
<item name="type" xsi:type="string">group</item>
<item name="config" xsi:type="array">
<item name="dataScope" xsi:type="boolean">false</item>
<item name="validateWholeGroup" xsi:type="boolean">true</item>
</item>
</argument>
<field name="group_id" formElement="select">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="fieldGroup" xsi:type="string">group_id</item>
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<required>false</required>
<dataType>number</dataType>
</settings>
</field>
<field name="disable_auto_group_change" formElement="checkbox" class="Magento\Customer\Ui\Component\Form\Field\DisableAutoGroupChange">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="fieldGroup" xsi:type="string">group_id</item>
<item name="source" xsi:type="string">customer</item>
<item name="default" xsi:type="number">0</item>
</item>
</argument>
<settings>
<dataType>boolean</dataType>
<visible>false</visible>
</settings>
<formElements>
<checkbox>
<settings>
<description translate="true">Disable Automatic Group Change Based on VAT ID</description>
<valueMap>
<map name="false" xsi:type="string">0</map>
<map name="true" xsi:type="string">1</map>
</valueMap>
<prefer>checkbox</prefer>
</settings>
</checkbox>
</formElements>
</field>
</container>
<field name="firstname" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
</settings>
</field>
<field name="middlename" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="lastname" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<visible>false</visible>
<validation>
<rule name="required-entry" xsi:type="boolean">false</rule>
</validation>
<dataType>text</dataType>
</settings>
</field>
<field name="suffix" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="email" formElement="email">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<validation>
<rule name="validate-email" xsi:type="boolean">true</rule>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
</settings>
</field>
<field name="dob" formElement="date">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<validation>
<rule name="validate-date" xsi:type="boolean">true</rule>
<rule name="validate-dob" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<visible>false</visible>
</settings>
<formElements>
<date>
<settings>
<options>
<option name="maxDate" xsi:type="string">-1d</option>
</options>
</settings>
</date>
</formElements>
</field>
<field name="taxvat" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="salespersons" sortOrder="334" formElement="select">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Stemcell\Customer\ViewModel\Salesperson</item>
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
<item name="filterOptions" xsi:type="boolean">true</item>
<item name="showCheckbox" xsi:type="boolean">true</item>
<item name="chipsEnabled" xsi:type="boolean">true</item>
<item name="multiple" xsi:type="boolean">true</item>
<item name="disableLabel" xsi:type="boolean">true</item>
</item>
</argument>
<settings>
<label translate="true">销售代表</label>
</settings>
</field>
<field name="extension_attributes.assistance_allowed" sortOrder="85" formElement="checkbox">
<settings>
<visible>false</visible>
</settings>
</field>
<field name="gender" formElement="select">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
</settings>
</field>
<field name="sendemail_store_id" component="Magento_Ui/js/form/element/select" formElement="select">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">customer</item>
</item>
</argument>
<settings>
<visible>false</visible>
<dataType>number</dataType>
<label translate="true">Send Welcome Email From</label>
<imports>
<link name="value">${ $.provider }:data.customer.store_id</link>
</imports>
</settings>
<formElements>
<select>
<settings>
<options class="Magento\Customer\ViewModel\Customer\Store"/>
<filterBy>
<field>website_id</field>
<target>${ $.provider }:${ $.parentScope }.website_id</target>
</filterBy>
</settings>
</select>
</formElements>
</field>
</fieldset>
<fieldset name="address" class="Magento\Customer\Ui\Component\Form\AddressFieldset">
<settings>
<collapsible>false</collapsible>
<label translate="true">Addresses</label>
<componentType>fieldset</componentType>
<additionalClasses>
<class name="customer-address-form">true</class>
</additionalClasses>
</settings>
<container name="customer_default_billing_address_wrapper" template="Magento_Customer/default-address-wrapper">
<component name="customer_default_billing_address_content" template="Magento_Customer/default-address">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="defaultAddressClass" xsi:type="string">billing-address</item>
<item name="defaultAddressId" xsi:type="string">billing-address-caption</item>
<item name="title" translate="true" xsi:type="string">Default Billing Address</item>
<item name="contentClass" xsi:type="string">customer-default-billing-address-content</item>
<item name="notExistsMessage" xsi:type="string" translate="true">The customer does not have default billing address</item>
<item name="tracks" xsi:type="array">
<item name="address" xsi:type="boolean">true</item>
</item>
</item>
</argument>
<settings>
<imports>
<link name="address">${ $.provider}:data.default_billing_address</link>
</imports>
</settings>
</component>
<button name="edit_billing_address" component="Magento_Customer/js/address/default-address">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="buttonClasses" xsi:type="string">edit-default-billing-address-button</item>
<item name="buttonTextId" xsi:type="string">edit-billing-address</item>
<item name="ariLabelledby" xsi:type="string">billing-address-caption edit-billing-address</item>
<item name="actions" xsi:type="array">
<item name="0" xsi:type="array">
<item name="targetName" xsi:type="string">customer_form.areas.address.address.customer_address_update_modal.update_customer_address_form_loader</item>
<item name="actionName" xsi:type="string">destroyInserted</item>
</item>
<item name="1" xsi:type="array">
<item name="targetName" xsi:type="string">customer_form.areas.address.address.customer_address_update_modal</item>
<item name="actionName" xsi:type="string">openModal</item>
</item>
<item name="2" xsi:type="array">
<item name="targetName" xsi:type="string">customer_form.areas.address.address.customer_address_update_modal.update_customer_address_form_loader</item>
<item name="actionName" xsi:type="string">render</item>
</item>
</item>
</item>
</argument>
<settings>
<componentType>button</componentType>
<title translate="true">Edit</title>
<displayAsLink>true</displayAsLink>
<imports>
<link name="entityId">${ $.provider}:data.default_billing_address.entity_id</link>
<link name="entity">${ $.provider}:data.default_billing_address</link>
</imports>
</settings>
</button>
</container>
<container name="customer_default_shipping_address_wrapper" template="Magento_Customer/default-address-wrapper">
<component name="customer_default_shipping_address_content" template="Magento_Customer/default-address">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="defaultAddressClass" xsi:type="string">shipping-address</item>
<item name="defaultAddressId" xsi:type="string">shipping-address-caption</item>
<item name="title" xsi:type="string" translate="true">Default Shipping Address</item>
<item name="contentClass" xsi:type="string">customer-default-shipping-address-content</item>
<item name="notExistsMessage" xsi:type="string" translate="true">The customer does not have default shipping address</item>
<item name="tracks" xsi:type="array">
<item name="address" xsi:type="boolean">true</item>
</item>
</item>
</argument>
<settings>
<imports>
<link name="address">${ $.provider}:data.default_shipping_address</link>
</imports>
</settings>
</component>
<button name="edit_shipping_address" component="Magento_Customer/js/address/default-address">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="buttonClasses" xsi:type="string">edit-default-shipping-address-button</item>
<item name="buttonTextId" xsi:type="string">edit-shipping-address</item>
<item name="ariLabelledby" xsi:type="string">shipping-address-caption edit-shipping-address</item>
<item name="actions" xsi:type="array">
<item name="0" xsi:type="array">
<item name="targetName" xsi:type="string">customer_form.areas.address.address.customer_address_update_modal.update_customer_address_form_loader</item>
<item name="actionName" xsi:type="string">destroyInserted</item>
</item>
<item name="1" xsi:type="array">
<item name="targetName" xsi:type="string">customer_form.areas.address.address.customer_address_update_modal</item>
<item name="actionName" xsi:type="string">openModal</item>
</item>
<item name="2" xsi:type="array">
<item name="targetName" xsi:type="string">customer_form.areas.address.address.customer_address_update_modal.update_customer_address_form_loader</item>
<item name="actionName" xsi:type="string">render</item>
</item>
</item>
</item>
</argument>
<settings>
<componentType>button</componentType>
<title translate="true">Edit</title>
<displayAsLink>true</displayAsLink>
<imports>
<link name="entityId">${ $.provider}:data.default_shipping_address.entity_id</link>
<link name="entity">${ $.provider}:data.default_shipping_address</link>
</imports>
</settings>
</button>
</container>
<button name="add_address" component="Magento_Customer/js/address/default-address">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="formElement" xsi:type="string">container</item>
<item name="buttonClasses" xsi:type="string">add-new-address-button</item>
<item name="actions" xsi:type="array">
<item name="0" xsi:type="array">
<item name="targetName" xsi:type="string">${ $.parentName}.customer_address_update_modal.update_customer_address_form_loader</item>
<item name="actionName" xsi:type="string">destroyInserted</item>
</item>
<item name="1" xsi:type="array">
<item name="targetName" xsi:type="string">${ $.parentName}.customer_address_update_modal</item>
<item name="actionName" xsi:type="string">openModal</item>
</item>
<item name="2" xsi:type="array">
<item name="targetName" xsi:type="string">${ $.parentName}.customer_address_update_modal.update_customer_address_form_loader</item>
<item name="actionName" xsi:type="string">render</item>
</item>
</item>
</item>
</argument>
<settings>
<title translate="true">Add New Address</title>
<imports>
<link name="parentId">${ $.provider}:data.customer_id</link>
</imports>
</settings>
</button>
<modal name="customer_address_update_modal">
<settings>
<options>
<option name="title" xsi:type="string" translate="true">Add/Update Address</option>
</options>
</settings>
<insertForm name="update_customer_address_form_loader" component="Magento_Customer/js/form/components/insert-form">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="addressListingProvider" xsi:type="string">ns = customer_address_listing, index = customer_address_listing</item>
<item name="addressModalProvider" xsi:type="string">${ $.parentName }</item>
</item>
</argument>
<settings>
<formSubmitType>ajax</formSubmitType>
<renderUrl path="mui/index/render_handle">
<param name="handle">customer_address_edit</param>
<param name="buttons">1</param>
</renderUrl>
<loading>false</loading>
<toolbarContainer>${ $.parentName }</toolbarContainer>
<externalProvider>${ $.ns }.customer_address_form_data_source</externalProvider>
<ns>customer_address_form</ns>
<exports>
<link name="parentId">${ $.externalProvider }:data.parent_id</link>
</exports>
<imports>
<link name="parentId">${ $.provider}:data.customer_id</link>
<link name="onAddressDelete">${ $.ns }.${ $.ns }:deleteAddressAction</link>
</imports>
</settings>
</insertForm>
</modal>
<insertListing name="customer_address_listing" component="Magento_Customer/js/form/components/insert-listing">
<settings>
<dataLinks>
<exports>false</exports>
<imports>true</imports>
</dataLinks>
<externalProvider>customer_address_listing.customer_address_listing_data_source</externalProvider>
<selectionsProvider>customer_address_listing.customer_address_listing.customer_address_columns.ids</selectionsProvider>
<autoRender>true</autoRender>
<dataScope>customer_address_listing</dataScope>
<ns>customer_address_listing</ns>
<exports>
<link name="parent_id">${ $.externalProvider }:params.parent_id</link>
</exports>
<imports>
<link name="parent_id">${ $.provider }:data.customer.entity_id</link>
<link name="onAction">ns = ${ $.ns }, index = actions:action</link>
<link name="onMassAction">ns = ${ $.ns }, index = listing_massaction:massaction</link>
</imports>
</settings>
</insertListing>
</fieldset>
</form>
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>车辆线索进线</title>
</head>
<body>
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\Template" cacheable="false" template="Stemcell_Customer::avatr/index.phtml"/>
<referenceContainer name="page.messages"/>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,24 @@
<?php /* @var $block \Magento\Framework\View\Element\Template */ ?>
<form action="<?= $block->escapeUrl($block->getUrl('commerce_customer/avatr/post')) ?>" method="post" enctype="multipart/form-data">
<?= $block->getBlockHtml('formkey') ?>
<div class="fields-group">
<label for="avatr">请上传:</label>
<input type="file" name="avatr" id="avatr" required accept=".xls,.xlsx" />
</div>
<div class="fields-group" style="display: none">
<label for="evn">环境:</label>
<select name="env" id="env">
<option value="prod">正式</option>
<!-- <option value="dev">测试</option>-->
</select>
</div>
<input type="submit" value="提交">
</form>
<style>
.fields-group{
display: flex;
gap: 20px;
margin-bottom: 20px;
}
.fields-group select{width: auto}
</style>
@@ -0,0 +1,168 @@
<?php
use Magento\Framework\App\Action\Action;
/**
* @var $block \Stemcell\Customer\Block\Widget\Product\ProductsList
* @var $ajaxViewModel Amasty\JetTheme\ViewModel\Catalog\Ajax
* @var $escaper Magento\Framework\Escaper
*/
// phpcs:disable
$compareHelper = $this->helper(\Magento\Catalog\Helper\Product\Compare::class);
$wishlistHelper = $this->helper(\Magento\Wishlist\Helper\Data::class);
// phpcs:enable
$ajaxViewModel = $block->getAjaxViewModel();
$isAjaxAddToCartEnabled = $ajaxViewModel && $ajaxViewModel->isEnabledAjaxAddToCart();
?>
<?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?>
<?php
$type = 'widget-product-grid';
$mode = 'grid';
$image = 'new_products_content_widget_grid';
$items = $block->getProductCollection()->getItems();
$showWishlist = true;
$showCompare = true;
$showCart = true;
$templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
$description = false;
?>
<div class="block am-widget <?= /* @noEscape */ $type ?>">
<div class="block-product-link amtheme-item-text">
<?php if ($block->getTitle()): ?>
<span class="block-title" style="margin-bottom:0px">
<?= $escaper->escapeHtml(__($block->getTitle())) ?>
</span>
<?php endif ?>
<?php if ($block->getLinkAttributes()): ?>
<span class="widget block block-product-link-inline">
<a href="<?= /* @noEscape */ $block->getLinkAttributes() ?>"><span><?= __('More') ?></span></a>
</span>
<?php endif ?>
</div>
<div class="block-content content">
<div class="products wrapper <?= /* @noEscape */ $mode ?> products-<?= /* @noEscape */ $mode ?>">
<ol class="products list items product-items amtheme-products-secondary -col-xl-4 -full-width">
<?php $iterator = 1; ?>
<?php foreach ($items as $_item): ?>
<?= /* @noEscape */ ($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
<div class="product-item-info ">
<div class="product-photo-wrapper">
<a href="<?= $escaper->escapeUrl($block->getProductUrl($_item)) ?>"
class="product photo product-item-photo"
title="<?= $escaper->escapeHtmlAttr($_item->getName()) ?>"
aria-label="<?= $escaper->escapeHtmlAttr($_item->getName()) ?>">
<?= /* @noEscape */ $block->getImage($_item, $image)->toHtml() ?>
</a>
</div>
<div class="product details product-item-details">
<span class="product name product-item-name">
<a title="<?= $escaper->escapeHtmlAttr($_item->getName()) ?>"
aria-label="<?= $escaper->escapeHtmlAttr($_item->getName()) ?>"
href="<?= $escaper->escapeUrl($block->getProductUrl($_item)) ?>"
class="product-item-link">
<?= $escaper->escapeHtml($_item->getName()) ?>
</a>
</span>
<?php if ($templateType): ?>
<?= /* @noEscape */ $block->getReviewsSummaryHtml($_item, $templateType) ?>
<?php endif; ?>
<div class="product-details-action">
<?= /* @noEscape */ $block->getProductPriceHtml($_item, $type) ?>
<?php if ($showWishlist || $showCompare): ?>
<div class="amtheme-icon-wrapper">
<?php if ($wishlistHelper->isAllow() && $showWishlist): ?>
<a href="#"
data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($_item) ?>'
class="action towishlist amtheme-circle-icon"
title="<?= $escaper->escapeHtmlAttr(__('Add to Wishlist')) ?>"
aria-label="<?= $escaper->escapeHtmlAttr(__('Add to Wishlist')) ?>"
data-action="add-to-wishlist"
role="button">
<svg class="amtheme-icon -hover-bg">
<use xlink:href="#icon-wishlist" />
</svg>
</a>
<?php endif; ?>
<?php if ($block->getAddToCompareUrl() && $showCompare): ?>
<a href="#"
data-post='<?= /* @noEscape */ $compareHelper->getPostDataParams($_item) ?>'
class="action tocompare amtheme-circle-icon"
title="<?= $escaper->escapeHtmlAttr(__('Add to Compare')) ?>"
aria-label="<?= $escaper->escapeHtmlAttr(__('Add to Compare')) ?>"
data-action="add-to-compare"
role="button">
<svg class="amtheme-icon -hover-bg">
<use xlink:href="#icon-compare" />
</svg>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<?= /* @noEscape */ $block->getProductDetailsHtml($_item) ?>
<?php if ($showCart): ?>
<div class="product actions product-item-actions">
<?php if ($_item->isSaleable()): ?>
<?php $postParams = $block->getAddToCartPostParams($_item); ?>
<?php
// phpcs:ignore
$postDataHelper = $this->helper(\Magento\Framework\Data\Helper\PostHelper::class);
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]);
?>
<form data-role="tocart-form"
data-product-sku="<?= $escaper->escapeHtmlAttr($_item->getSku()) ?>"
action="<?= isset($postParams['action']) ? $escaper->escapeUrl($postParams['action']) : $escaper->escapeUrl($block->getAddToCartUrl($_item)) ?>"
<?php if ($isAjaxAddToCartEnabled): ?>
data-amtheme-js="ajax-tocart"
<?php endif; ?>
method="post">
<input type="hidden" name="product" value="<?= $escaper->escapeHtmlAttr($postParams['data']['product']) ?>">
<input type="hidden" name="<?= /* @noEscape */ Action::PARAM_NAME_URL_ENCODED ?>" value="<?= /* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] ?>">
<?= $block->getBlockHtml('formkey') ?>
<button type="submit"
title="<?= $escaper->escapeHtmlAttr(__('Add to Cart')) ?>"
aria-label="<?= $escaper->escapeHtmlAttr(__('Add to Cart')) ?>"
class="action tocart primary">
<?= $escaper->escapeHtml(__('Add to Cart')) ?>
</button>
</form>
<?php else: ?>
<?php if ($_item->getIsSalable()): ?>
<div class="stock available"><?= $escaper->escapeHtml(__('In stock')) ?></div>
<?php else: ?>
<div class="stock unavailable"><?= $escaper->escapeHtml(__('Out of stock')) ?></div>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
<?= ($iterator == count($items) + 1) ? '</li>' : '' ?>
<?php endforeach ?>
</ol>
</div>
<?= $block->getPagerHtml() ?>
</div>
</div>
<?php endif;?>
<?php if ($isAjaxAddToCartEnabled): ?>
<script type="text/x-magento-init">
{
"[data-amtheme-js=ajax-tocart]": {
"amAjaxCart": {
"actionUrl": "<?= /* @noEscape */ $ajaxViewModel->getAjaxAddToCartUrl() ?>",
"classes":{
"addToCartButtonDisable": "disabled"
}
}
}
}
</script>
<?php endif;?>