mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-30 21:15:34 +08:00
62 lines
1.7 KiB
HTML
62 lines
1.7 KiB
HTML
<!--
|
|
Copyright 2026 ShopeX (https://www.shopex.cn)
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<{if $otmplList}>
|
|
<form method='post' action='<{$request_uri}>' id='relate-delivery-form'>
|
|
<{foreach from=$postData item=item key=key}>
|
|
<input type='hidden' name="<{$key}>" value="<{$item}>" />
|
|
<{/foreach}>
|
|
</form>
|
|
<div style='float:left;'>
|
|
<div style='float:left;'>可选模板:</div>
|
|
<select name='otmpl' onchange="changeTmpl(this);" >
|
|
<{foreach from=$otmplList item=item key=key}>
|
|
<option value="<{$item.id}>" <{if $item.id==$current_otmpl_id}>selected='selected'<{/if}> > <{$item.title}> </option>
|
|
<{/foreach}>
|
|
</select>
|
|
|
|
</div>
|
|
<style>
|
|
.tmpl-cur{
|
|
color:#808080;
|
|
}
|
|
.tmpl-other{
|
|
color: #000000;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
function changeTmpl(el){
|
|
var id=0;
|
|
el.getElements("option").each(function(item){
|
|
if (item.selected) {
|
|
id=item.value;
|
|
}
|
|
});
|
|
if (id==0) {
|
|
return;
|
|
}
|
|
var _form = $('relate-delivery-form');
|
|
var action = '<{$request_uri}>';
|
|
if (action.contains('&otmplId=')) {
|
|
action = action.replace(/&otmplId=\d+/,'&otmplId='+id);
|
|
}else{
|
|
action += '&otmplId='+id;
|
|
}
|
|
_form.set('action',action);
|
|
_form.submit();
|
|
}
|
|
</script>
|
|
<{/if}> |