Files
OMS/app/wmsmgr/view/add_wms.html
2026-01-04 19:08:31 +08:00

118 lines
5.4 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.
-->
<div class="tableform">
<div class="division">
<form method="post" action="index.php?app=wmsmgr&ctl=admin_wms&act=saveWms" id="terminal">
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<th><em class="c-red">*</em> 仓储编码:</th>
<td><{if $wms.channel_bn}><{$wms.channel_bn}><{else}>
<{input type="text&&required" name="wms[channel_bn]" value=""}><{/if}>
<{help}><{t}>第三方仓储的唯一标识<{/t}><{/help}>
</td>
</tr>
<tr>
<th ><em class="c-red">*</em> 仓储名称:</th>
<td><{input type="text&&required" size="32" name="wms[channel_name]" value=$wms.channel_name}>
<{help}><{t}>中文名称<{/t}><{/help}>
</td>
</tr>
<tr>
<th ><em class="c-red">*</em> 仓储适配器:</th>
<td><{input type='select' name='wms[adapter]' id='wmstype' vtype='required' rows=$adapter_list valueColumn='value' labelColumn='label' value=$wms.adapter}>
<ul style='color:red' id="adapter_desc">
<{foreach from=$adapter_list item=item}>
<li id="desc_<{$item.value}>" style="display:none"><{$item.desc}></li>
<{/foreach}>
</ul>
</td>
</tr>
</tbody>
</table>
<div id='adapter_config'></div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<th>密文传输:</th>
<td>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt][pinduoduo]" value="1" <{if $wms.config.need_encrypt.pinduoduo}>checked<{/if}>> 拼多多订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt][360buy]" value="1" <{if $wms.config.need_encrypt.360buy}>checked<{/if}>> 京东订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt][kuaishou]" value="1" <{if $wms.config.need_encrypt.kuaishou}>checked<{/if}>> 快手订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt][yangsc]" value="1" <{if $wms.config.need_encrypt.yangsc}>checked<{/if}>> 洋葱订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt][wxshipin]" value="1" <{if $wms.config.need_encrypt.wxshipin}>checked<{/if}>> 视频号订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt][youzan]" value="1" <{if $wms.config.need_encrypt.youzan}>checked<{/if}>> 有赞订单 </div>
</td>
</tr>
<tr>
<th>密文运单号传输:</th>
<td>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt_logistics][taobao]" value="1" <{if $wms.config.need_encrypt_logistics.taobao}>checked<{/if}>> 淘宝订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt_logistics][360buy]" value="1" <{if $wms.config.need_encrypt_logistics.360buy}>checked<{/if}>> 京东订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt_logistics][luban]" value="1" <{if $wms.config.need_encrypt_logistics.luban}>checked<{/if}>> 抖音订单 </div>
<div class="span-auto"><input type="checkbox" name="config[need_encrypt_logistics][xhs]" value="1" <{if $wms.config.need_encrypt_logistics.xhs}>checked<{/if}>> 小红书订单 </div>
</td>
</tr>
</tbody>
</table>
<{if $wms.channel_id}>
<input type="hidden" name="wms[channel_id]" value="<{$wms.channel_id}>">
<{/if}>
<{if $wms.adapter}>
<input type='hidden' name='adapter' value="<{$wms.adapter}>">
<{/if}>
<div class="table-action">
<{button class="btn-primary" type="submit" id="saveterminal" name="submit" label="提交"}>
</div>
</form>
</div>
</div>
<script>
$('terminal').store('target',{
onRequest:function(){
$('saveterminal').set('disabled', 'true');
},
onComplete:function(jsontext){
var json = Json.evaluate(jsontext);
if (typeof(json.error) != 'undefined'){
$('saveterminal').set('disabled', '');
}else{
$('saveterminal').set('disabled', 'true');
finderGroup['<{$env.get.finder_id}>'].refresh.delay(400,finderGroup['<{$env.get.finder_id}>']);
$('saveterminal').getParent('.dialog').retrieve('instance').close();
}
}
});
$('wmstype').addEvents({
'change':function(e){
if (!this.value) return;
$ES('#adapter_desc li').hide();
$ES('#adapter_desc #desc_'+this.value).show();
W.page('index.php?app=wmsmgr&&ctl=admin_wms&act=confightml&p[0]=<{$wms.channel_id}>&p[1]='+this.value,{update:$('adapter_config'),clearUpdateMap:false});
},
'domready':function(e){
this.fireEvent('change',e);
}
});
</script>