Files
OMS/app/logisticsmanager/view/admin/channel/netsite/add.html
2026-01-04 19:08:31 +08:00

87 lines
2.8 KiB
HTML

<!--
Copyright 2012-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.
-->
<style>
#form-channel select{
width: 204px;
}
</style>
<div class="tableform">
<div class="division">
<form method="post" action="index.php?app=logisticsmanager&ctl=admin_channel&act=saveNetsite" id="form-channel">
<div class="step-1">
<table>
<tr>
<th>渠道名称:</th>
<td><{input type="text" name="name" size="30" vtype="required"}></td>
</tr>
<tr>
<th>渠道平台:</th>
<td>
<select class="x-input-select inputstyle" name="channel_type" id="channel_type" vtype="required" >
<option value="">请选择</option>
<option value="youzan">有赞电子面单</option>
</select>
</td>
</tr>
</table>
</div>
<!-- 获取店铺 -->
<div class="step-2">
</div>
</form>
</div>
</div>
<{area inject='.mainFoot'}>
<div class="table-action">
<{button type="button" class="btn-primary" label="保存" id="btn-add-channel"}>
<{button type="botton" class="btn-secondary" label="关闭" isCloseDialogBtn="true" }>
</div>
<{/area}>
<script>
(function(){
$('channel_type').addEvent('change',function(){
if (!this.value) {
$E('#form-channel .step-2').empty();
return true
}
W.page('index.php?app=logisticsmanager&ctl=admin_channel&act=queryNetsiteShop&channel_type='+this.value,{
update:$E('#form-channel .step-2'),
clearUpdateMap:false,
});
});
$('btn-add-channel').addEvent('click', function(){
$('form-channel').fireEvent('submit', {stop:$empty});
});
$('form-channel').store('target', {
onComplete:function(resp){
resp = JSON.parse(resp);
if (resp.success){
$('form-channel').getParent('.dialog').retrieve('instance').close();
finderGroup['<{$env.get.finder_id}>'].refresh();
}
}
});
})();
</script>