mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-05 06:45:32 +08:00
128 lines
6.0 KiB
HTML
128 lines
6.0 KiB
HTML
<!--
|
||
Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
See LICENSE file for license details.
|
||
-->
|
||
|
||
<h3>仓库设置</h3>
|
||
<div class="gridlist-action data-action" id="dataAction" style="margin-bottom:10px;padding:5px; border:0;">
|
||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td nowrap="nowrap" style="width:auto;">
|
||
<div class="tabs-wrap select-tabs delivery-cfg-tab">
|
||
<ul style="margin-top:2px;padding:0;">
|
||
<li class="tab current" >
|
||
<span><a href="javascript:void(0);"><{t}>仓库配置<{/t}></a></span>
|
||
</li>
|
||
|
||
</ul>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<form method="post" action="index.php?app=ome&ctl=admin_branchset&act=save" id="frm">
|
||
<div class="tableform tableform-tabs">
|
||
<div class="division">
|
||
<table width="100%" cellspacing="0" cellpadding="0" border="0" class='delivery-cfg-table'>
|
||
<tbody>
|
||
<tr>
|
||
<th><{t}>类型选择:<{/t}></th>
|
||
<td>
|
||
<input type="radio" name="set[branchtype]" value="delivery" <{if $branchtype=='delivery' || $branchtype==''}>checked<{/if}>>发货仓库
|
||
<input type="radio" name="set[branchtype]" value="branch" <{if $branchtype=='branch'}>checked<{/if}>> 仓库列表 <font color="red" weight="bold">(默认为发货仓库)</font>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th><{t}>售后质检商品入库类型:<{/t}></th>
|
||
<td>
|
||
<input type="radio" name="set[goods_branch_type]" value="main" <{if $goods_branch_type=='main' || $goods_branch_type==''}>checked<{/if}>>主仓
|
||
<input type="radio" name="set[goods_branch_type]" value="aftersale" <{if $goods_branch_type=='aftersale'}>checked<{/if}>> 售后仓
|
||
<input type="radio" name="set[goods_branch_type]" value="damaged" <{if $goods_branch_type=='damaged'}>checked<{/if}>> 残损仓
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>默认售后仓库设置:</th>
|
||
<td>
|
||
<select name="set[return.auto_branch]">
|
||
<option value=''>请选择</option>
|
||
<{foreach from=$branchList item=branch}>
|
||
<option value="<{$branch.branch_id}>" <{if $setData.return_auto_branch==$branch.branch_id}>selected<{/if}>><{$branch.name}></option>
|
||
<{/foreach}>
|
||
</select>
|
||
<{button label="添加店铺默认售后仓" type="button" id="btn-add-shop-branch"}>
|
||
<table style="width: 650px">
|
||
<tbody id="shop-branch-default">
|
||
<{foreach from=$setData.return_auto_shop_branch key=shop_id item=branch_id}>
|
||
<tr>
|
||
<td>
|
||
<select name="auto_shop_branch[shop_id][]">
|
||
<{foreach from=$shopList item=shop}>
|
||
<option value="<{$shop.shop_id}>" <{if $shop_id==$shop.shop_id}>selected<{/if}>><{$shop.name}></option>
|
||
<{/foreach}>
|
||
</select>
|
||
</td>
|
||
<td>
|
||
<select name="auto_shop_branch[branch_id][]">
|
||
<{foreach from=$branchList item=branch}>
|
||
<option value="<{$branch.branch_id}>"<{if $branch_id==$branch.branch_id}>selected<{/if}>><{$branch.name}></option>
|
||
<{/foreach}>
|
||
</select>
|
||
</td>
|
||
<td>
|
||
<{button label="删除" type="button" class="btn-del" onclick="this.getParent('TR').remove();"}>
|
||
</td>
|
||
</tr>
|
||
<{/foreach}>
|
||
</tbody>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="table-action">
|
||
<{button label="提交" type="submit" name="submit" id="btn-submit" }>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<script type="text/javascript">
|
||
(function(){
|
||
var tpl = '<td>\
|
||
<select name="auto_shop_branch[shop_id][]">\
|
||
<{foreach from=$shopList item=shop}>\
|
||
<option value="<{$shop.shop_id}>"><{$shop.name}></option>\
|
||
<{/foreach}>\
|
||
</select>\
|
||
</td>\
|
||
<td>\
|
||
<select name="auto_shop_branch[branch_id][]">\
|
||
<{foreach from=$branchList item=branch}>\
|
||
<option value="<{$branch.branch_id}>"><{$branch.name}></option>\
|
||
<{/foreach}>\
|
||
</select>\
|
||
</td>\
|
||
<td>\
|
||
<{button label="删除" type="button" class="btn-del"}>\
|
||
</td>';
|
||
$('btn-add-shop-branch').addEvent('click', function() {
|
||
var oTr = new Element('tr', {html: tpl.substitute({})});
|
||
oTr.getElement('.btn-del').addEvent('click', function() {
|
||
this.getParent('TR').remove();
|
||
})
|
||
$('shop-branch-default').adopt(oTr);
|
||
});
|
||
let btn = $('btn-submit');
|
||
$('frm').store('target',{
|
||
onRequest:function(){
|
||
btn.setAttribute('disabled', 'disabled');
|
||
},
|
||
onComplete:function(){
|
||
btn.removeAttribute('disabled');
|
||
},
|
||
onSuccess:function(response){
|
||
W.page("index.php?app=ome&ctl=admin_branchset");
|
||
}
|
||
});
|
||
})();
|
||
</script> |