export stock addresses

This commit is contained in:
Michał Zieliński
2025-11-08 12:23:19 +01:00
parent ef6b3e0f7c
commit a39ebfd84c
3 changed files with 291 additions and 187 deletions

View File

@@ -1,5 +1,5 @@
<div class="loader" id="loader">
<img src="themes/default/images/loading.gif" />
<img src="themes/default/images/loading.gif"/>
</div>
<script>
var CODES = {$CODES};
@@ -17,10 +17,10 @@
<input type="text" name="address" id="address" size="30" value="{$CURRENT_ADDRESS}">
</td>
<td>
<input type="hidden" name="module" value="EcmProducts" />
<input type="hidden" name="action" value="stockAddress" />
<input type="hidden" name="searchType" value="address" />
<input type="button" id="searchByAddressTrigger" value="Szukaj adresu&nbsp;" class="button" />
<input type="hidden" name="module" value="EcmProducts"/>
<input type="hidden" name="action" value="stockAddress"/>
<input type="hidden" name="searchType" value="address"/>
<input type="button" id="searchByAddressTrigger" value="Szukaj adresu&nbsp;" class="button"/>
<span style="color: red;" id="addressError"></span>
</td>
</tr>
@@ -34,11 +34,11 @@
<input type='text' name="index" id="index" size="30" value="{$CURRENT_INDEX}">
</td>
<td>
<input type="hidden" name="module" value="EcmProducts" />
<input type="hidden" name="action" value="stockAddress" />
<input type="hidden" name="searchType" value="index" />
<input type="hidden" name="productId" id="productId" value="" />
<input type="button" id="searchByIndexTrigger" value="Szukaj indeksu" class="button" />
<input type="hidden" name="module" value="EcmProducts"/>
<input type="hidden" name="action" value="stockAddress"/>
<input type="hidden" name="searchType" value="index"/>
<input type="hidden" name="productId" id="productId" value=""/>
<input type="button" id="searchByIndexTrigger" value="Szukaj indeksu" class="button"/>
<span style="color: red;" id="indexError"></span>
</td>
</tr>
@@ -57,13 +57,23 @@
</select>
</td>
<td>
<input type="hidden" name="module" value="EcmProducts" />
<input type="hidden" name="action" value="stockAddress" />
<input type="hidden" name="searchType" value="allAddresses" />
<input type="submit" id="searchByIndexTrigger" value="Pokaż adresy" class="button" />
<input type="hidden" name="module" value="EcmProducts"/>
<input type="hidden" name="action" value="stockAddress"/>
<input type="hidden" name="searchType" value="allAddresses"/>
<input type="submit" id="searchByIndexTrigger" value="Pokaż adresy" class="button"/>
</td>
</tr>
</form>
<tr>
<td scope="row" nowrap="nowrap" width="1%">
<input type="hidden" name="module" value="EcmProducts"/>
<input type="hidden" name="action" value="stockAddress"/>
<input type="hidden" name="searchType" value="export"/>
<input type="button" id="exportTrigger" value="Eksport Excel" class="button"/>
</td>
<td nowrap="nowrap" width="1%">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
{if $PROCESS && $PROCESS=='ADDRESS'}
@@ -92,10 +102,11 @@
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="button" value="Karta produktu" class="button"
onclick="openProductCard('{$PRODUCT.ecmproduct_id}');" />&nbsp;&nbsp;
onclick="openProductCard('{$PRODUCT.ecmproduct_id}');"/>&nbsp;&nbsp;
<input type="button" value="Wyszukaj wszystkie adresy" class="button"
onclick="searchByIndex('{$PRODUCT.code}')" />&nbsp;&nbsp;
<input type="button" value="Usuń produkt z adresu" class="button" onclick="removeProductFromAddress()" />
onclick="searchByIndex('{$PRODUCT.code}')"/>&nbsp;&nbsp;
<input type="button" value="Usuń produkt z adresu" class="button"
onclick="removeProductFromAddress()"/>
</td>
</tr>
</table>
@@ -118,7 +129,7 @@
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="button" value="Dodaj produkt" class="button" onclick="addProductToAddress()" />
<input type="button" value="Dodaj produkt" class="button" onclick="addProductToAddress()"/>
</td>
</tr>
</table>
@@ -126,7 +137,10 @@
{/if}
{if $PROCESS && $PROCESS=='PRODUCT'}
<h2>{$PRODUCT.code} {$PRODUCT.name} ( Stan: {$PRODUCT.ems_qty_in_stock} )&nbsp;<input type="button"
value="Karta produktu" class="button" onclick="openProductCard('{$PRODUCT.id}');" /></h2>
value="Karta produktu"
class="button"
onclick="openProductCard('{$PRODUCT.id}');"/>
</h2>
<table cellpadding="0" cellspacing="0" class="list view">
<tr class="oddListRowS1">
<th style="width: 15%;"><b>Adres</b></td>
@@ -141,29 +155,29 @@
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="checkbox" {if $item.is_not_full}checked{/if}
onclick="setAddressIsNotFull('{$item.stock_address}', this)" />
<input type="checkbox" {if $item.is_not_full}checked{/if}
onclick="setAddressIsNotFull('{$item.stock_address}', this)"/>
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="button" value="Usuń lokalizację" class="button"
onclick="removeAddressFromProduct('{$item.stock_address}')" />
onclick="removeAddressFromProduct('{$item.stock_address}')"/>
</td>
</tr>
{/foreach}
<tr class="oddListRowS1">
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="text" size="10" id="newAddress" />
<input type="text" size="10" id="newAddress"/>
<span style="color: red;" id="newAddressError"></span>
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="checkbox" id="isNotFull" />
<input type="checkbox" id="isNotFull"/>
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="button" value="Dodaj lokalizację" class="button" onclick="addAddressToProduct();" />
<input type="button" value="Dodaj lokalizację" class="button" onclick="addAddressToProduct();"/>
</td>
</tr>
</table>
@@ -186,11 +200,11 @@
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="checkbox" {if $item.is_not_full}checked{/if} disabled />
<input type="checkbox" {if $item.is_not_full}checked{/if} disabled/>
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
<input type="button" value="Pokaż adres" class="button" name="showAddress-{$item.stock_address}" />
<input type="button" value="Pokaż adres" class="button" name="showAddress-{$item.stock_address}"/>
</td>
<td valign="top" class="oddListRowS1"
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
@@ -212,31 +226,32 @@
{/if}
<style>
{literal}
.ui-autocomplete {
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
padding-right: 20px;
border-radius: 0;
}
.ui-autocomplete {
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
padding-right: 20px;
border-radius: 0;
}
.ui-corner-all {
border-radius: 0;
}
.ui-corner-all {
border-radius: 0;
}
.loader {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding-top: 50vh;
text-align: center;
background-color: rgba(16, 16, 16, 0.5);
}
.loader {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding-top: 50vh;
text-align: center;
background-color: rgba(16, 16, 16, 0.5);
}
.loader>img {}
.loader > img {
}
{/literal}
</style>