mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-05 22:55:32 +08:00
329 lines
19 KiB
HTML
329 lines
19 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.
|
||
-->
|
||
|
||
<{capture name="header"}>
|
||
<{css app='omeauto' src="style.css"}>
|
||
<{/capture}>
|
||
<style>
|
||
#content_tbl .role_content ul li {width:140px; overflow: hidden; float: left; margin-bottom: 0px; font-size: 12px;}
|
||
#content_tbl .role_content ul li span {cursor: pointer;}
|
||
#content_tbl .role_content ul li input {cursor: pointer;}
|
||
#content_tbl .title {height: 20px; margin-bottom: 0px; font-size: 12px; font-weight: 700;}
|
||
#content_tbl .role_content {margin-top: 6px; height : auto ; padding: 8px;}
|
||
#content_tbl .title span {height: 20px; margin-bottom: 5px; margin-left: 20px; color: #999999;}
|
||
#content_li li {width:90px; overflow: hidden; float: left; margin-bottom: 10px; font-size: 12px; line-height: 20px;}
|
||
.current-set {color: red; font-weight: 700; cursor: pointer;}
|
||
.current-disabled , .current-disabled span {color: #DDDDDD; font-weight: 700; cursor:auto;}
|
||
</style>
|
||
<form action="index.php?app=omeauto&ctl=autoconfirm&act=do_add" method="post">
|
||
<div class="tableform">
|
||
<div class="division">
|
||
<table width="100%" cellspacing="0" cellpadding="0" id="content_tbl">
|
||
<tbody>
|
||
<tr>
|
||
<th width="10%"><label for="autoName">规则名称:</label></th>
|
||
<td colspan="3"><{input type="text&&required" name="name" id="autoName" value="{$data.name}" size="30" }> (请使用通俗易懂的名称,如独立店规则、淘宝订单规则)
|
||
<{if $data.defaulted=='true'}><script>$('autoName').set('disabled', 'true');</script><{/if}>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th><label for="autoMemo">简单描述:</label></th>
|
||
<td colspan="3"><textarea name="memo" id="autoMemo" cols="60" rows="4" class="x-input" <{if $data.defaulted=='true'}>disabled<{/if}>><{$data.memo|escape}></textarea> </td>
|
||
</tr>
|
||
<tr>
|
||
<th>订单分组:</th>
|
||
<td colspan="3">
|
||
<div class="title">选择已设定分组<span>(勾选的订单分组将会使用本审单规则)</span></div>
|
||
<div class="role_content" id="content_li">
|
||
<ul>
|
||
<{foreach from=$orderType item=item}>
|
||
<li><input type="checkbox" name="config[autoOrders][]" value="<{$item.tid}>" id="autoOrder_<{$item.tid}>" <{if is_array($data.config.autoOrders) && $item.tid|in_array:$data.config.autoOrders}>checked<{else}><{if $item.oid || $data.defaulted=='true'}>disabled<{/if}><{/if}>/><label for="autoOrder_<{$item.tid}>"> <span title="<{$item.title}>"><{$item.name}></span></label></li>
|
||
<{/foreach}>
|
||
</ul>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<!--
|
||
<tr>
|
||
<th>库存检查处理模式:</th>
|
||
<td colspan="3">
|
||
<input type="radio" name="store" checked/> 需要检查
|
||
<input type="radio" name="store"/> 不需要
|
||
</td>
|
||
</tr>
|
||
-->
|
||
<!--
|
||
<tr>
|
||
<th>规则设定:</th>
|
||
<td colspan="3">
|
||
<div class="title">是否启用自动合单<span>(除特定类型如分销订单,<b style="color:red; font-size:14px;">强烈建议开启本选项</b>)</span></div>
|
||
<div class="role_content">
|
||
<input type="radio" name="config[combine]" value='1' <{if $data.config.combine != '0'}>checked<{/if}>/> 自动按规则合并订单
|
||
|
||
<input type="radio" name="config[combine]" value="0" <{if $data.config.combine == '0'}>checked<{/if}>/> 我不需要合单
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
-->
|
||
<tr>
|
||
<th>拆分规则:</th>
|
||
<td colspan="3">
|
||
<{input type='object' object='order_split@omeauto' name='config[split_id]' value=$data.config.split_id }>
|
||
<{help}>按京东开普勒商品渠道ID拆:现仅用于【抖音平台】订单使用【京东云交易】仓储进行发货。<br>按虚拟商品拆单:请特别注意,如果设置了 "按虚拟商品拆单",系统会优先执行。<{/help}>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>规则设定:</th>
|
||
<td colspan="3">
|
||
<div class="title">用户多地址<span>(指同一个买家有多个订单并且收货地址不一致的情况,对分销类型不起作用)</span></div>
|
||
<div class="role_content">
|
||
<input type="radio" name="config[morder]" value='1' <{if $data.config.morder != '0'}>checked<{/if}>/> 检查同用户多地址的订单
|
||
|
||
<input type="radio" name="config[morder]" value="0" <{if $data.config.morder == '0'}>checked<{/if}>/> 不需要
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th> </th>
|
||
<td colspan="3">
|
||
<div class="title">未支付订单<span>(指同一买家还有未支付订单)</span></div>
|
||
<div class="role_content">
|
||
<input type="radio" name="config[payStatus]" value="1" <{if $data.config.payStatus != '0'}>checked<{/if}>/> 需检查可合并的未支付订单
|
||
|
||
<input type="radio" name="config[payStatus]" value="0" <{if $data.config.payStatus == '0'}>checked<{/if}>/> 不需要
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th> </th>
|
||
<td colspan="3">
|
||
<div class="title">发票检查</div>
|
||
<div class="role_content">
|
||
<input type="radio" name="config[tax]" value='1' <{if $data.config.tax != '0'}>checked<{/if}>/> 需要
|
||
<input type="radio" name="config[tax]" value='0' <{if $data.config.tax == '0'}>checked<{/if}>/> 不需要
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th> </th>
|
||
<td colspan="3">
|
||
<div class="title">留言和备注<span>(指对订单中客户留言及客服备注内容是否需要检查)</span></div>
|
||
<div class="role_content">
|
||
<input type="checkbox" name="config[memo]" value='1' <{if $data.config.memo == '1'}>checked<{/if}>/> 需检查客户留言
|
||
|
||
<input type="checkbox" name="config[mark]" value='1' <{if $data.config.mark == '1'}>checked<{/if}>/> 需检查客服备注
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th> </th>
|
||
<td colspan="3">
|
||
<div class="title">货到付款订单<span>(选择货到付款的处理模式)</span></div>
|
||
<div class="role_content">
|
||
<input type="radio" name="config[autoCod]" value="0" <{if $data.config.autoCod != '1'}>checked<{/if}>/> 全部需要人工审核
|
||
|
||
<input type="radio" name="config[autoCod]" value="1" <{if $data.config.autoCod == '1'}>checked<{/if}>/> 如符合其它条件,可自动确认
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<!-- <tr>-->
|
||
<!-- <th> </th>-->
|
||
<!-- <td colspan="3">-->
|
||
<!-- <div class="title">选择物流公司是否用全境物流<span>(没有指定配送地区的物流公司)</span></div>-->
|
||
<!-- <div class="role_content">-->
|
||
<!-- <input type="radio" name="config[allDlyCrop]" value="1" <{if $data.config.allDlyCrop == '1'}>checked<{/if}> disabled/> 禁用-->
|
||
<!-- -->
|
||
<!-- <input type="radio" name="config[allDlyCrop]" value="0" <{if $data.config.allDlyCrop != '1'}>checked<{/if}> disabled /> 启用-->
|
||
<!-- </div>-->
|
||
<!-- </td> -->
|
||
<!-- </tr>-->
|
||
<tr>
|
||
<th> </th>
|
||
<td colspan="3">
|
||
<div class="title">选择物流公司<span>(任选以下两种方案)</span></div>
|
||
<div class="role_content">
|
||
<input type="radio" name="config[corpChoice]" value="1" <{if $data.config.corpChoice != '2'}>checked<{/if}> /> 智能优先
|
||
|
||
<input type="radio" name="config[corpChoice]" value="2" <{if $data.config.corpChoice == '2'}>checked<{/if}> /> 指定物流
|
||
|
||
<div id="special_corp" class="object-select clearfix" style="display:inline-block;*zoom:1;float: right;margin-right: 200px;">
|
||
<div class="label" id="" rel="选择快递"><{$corp.name}></div>
|
||
<div class="handle"> </div>
|
||
<textarea name="config[special_corp]" style="display: none;"><{$data.config.special_corp}></textarea>
|
||
<input type="hidden" name="config[corp_id]" vtype="" value="<{$data.config.corp_id}>">
|
||
</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<!--
|
||
<tr>
|
||
<th> </th>
|
||
<td colspan="3">
|
||
<div class="title">商品SKU检查<span>(该情况是指该订单内存在无SKU商品或该商品的SKU无法在商品库中找到)</span></div>
|
||
<div class="content">
|
||
<input type="radio" name="sku" checked/> 需要检查
|
||
|
||
<input type="radio" name="morder"/> 不需要
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
-->
|
||
<tr>
|
||
<th>自动生成发货单:</th>
|
||
<td colspan="3">
|
||
<input type="radio" name="config[autoConfirm]" value="1" <{if $data.config.autoConfirm != '0'}>checked<{/if}> /> 自动生成发货单
|
||
|
||
<input type="radio" name="config[autoConfirm]" value="0" <{if $data.config.autoConfirm == '0'}>checked<{/if}>/> 不生成发货单,但会给订单加上各种需要关注的标记
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th><span style="color:red;">*</span>生效时间范围:</th>
|
||
<td colspan="3">
|
||
<{input type='time' name='confirmStartTime' value=$data.config.confirmStartTime }>
|
||
<strong style="font-weight:bold;">至</strong>
|
||
<{input type='time' name='confirmEndTime' value=$data.config.confirmEndTime }> <{help}>若审单规则长期有效,请设置较长的结束时间(此项为必填写项)<{/help}>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>排除时间范围:</th>
|
||
<td colspan="3">
|
||
<{input type='time' name='excludeStartTime' value=$data.config.excludeStartTime }>
|
||
<strong style="font-weight:bold;">至</strong>
|
||
<{input type='time' name='excludeEndTime' value=$data.config.excludeEndTime }> <{help}>在"排除时间范围"内系统不会执行该审单规则(默认为空,则不进行排除审单时间范围)<{/help}>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<{if $data.oid}><input type="hidden" name="oid" value="<{$data.oid}>"/><{/if}>
|
||
</div>
|
||
</div>
|
||
<div class="table-action">
|
||
<{button class="btn-primary" label="保存" type="button" id="saveCurrent"}>
|
||
<{button class="btn-primary" label="取消" type="button" id="cancelBtn"}>
|
||
</div>
|
||
</form>
|
||
<script>
|
||
(function(){
|
||
$('saveCurrent').getParents('form').removeEvents('submit').addEvent('submit', function(e) {
|
||
e.stop();
|
||
new Request ({
|
||
url:this.action,
|
||
onRequest:function(e){
|
||
//提交按钮:disabled
|
||
$('saveCurrent').set('disabled', 'true');
|
||
$('saveCurrent').getElements('span')[1].set('text','正在保存');
|
||
},
|
||
onComplete:function(result){
|
||
result = JSON.decode(result);
|
||
if(result.rsp == 'fail'){
|
||
MessageBox.error(result.error_msg);
|
||
|
||
//提交按钮:enabled
|
||
$('saveCurrent').set('disabled', '');
|
||
$('saveCurrent').getElements('span')[1].set('text','保存');
|
||
|
||
return;
|
||
}else{
|
||
$('saveCurrent').getElements('span')[1].set('text','保存成功');
|
||
|
||
//提交按钮:disabled
|
||
var findId = "<{$env.get.finder_id}>";
|
||
if (findId != '') {
|
||
finderGroup["<{$env.get.finder_id}>"].refresh.delay(400,finderGroup["<{$env.get.finder_id}>"]);
|
||
}
|
||
$('cancelBtn').getParent('.dialog').retrieve('instance').close();
|
||
}
|
||
}
|
||
})[this.method](this);
|
||
});
|
||
|
||
//保存按钮
|
||
$('saveCurrent').addEvent('click', function() {
|
||
//检查规则名称
|
||
var aName = $('autoName').value.trim();
|
||
if (aName == '') {
|
||
alert("请输入规则名称,使用通俗易懂的名字,如独立店规则、淘宝订单规则。");
|
||
return;
|
||
}
|
||
//检查对应订单类型
|
||
var aHasOrder = false;
|
||
$$('#content_li input[type=checkbox]').each(function(item){
|
||
if (item.checked) {
|
||
aHasOrder = true;
|
||
}
|
||
});
|
||
if (!aHasOrder) {
|
||
//alert("你必须要选择对应使用本规则的订单分组,请仔细勾选后再试。");
|
||
//return;
|
||
}
|
||
|
||
$('saveCurrent').getParents('form').fireEvent('submit', {
|
||
stop: function(){
|
||
}
|
||
});
|
||
});
|
||
|
||
//关闭按钮
|
||
$('cancelBtn').addEvent('click', function(){
|
||
$('cancelBtn').getParent('.dialog').retrieve('instance').close();
|
||
});
|
||
|
||
//选择订单标红
|
||
$$('#content_li input[type=checkbox]').addEvent('click',function(item){
|
||
this.blur();
|
||
this.getParent()[this.checked?'addClass':'removeClass']('current-set');
|
||
});
|
||
$$('#content_li input[type=checkbox]').each(function(item){
|
||
if (item.get('disabled')) {
|
||
item.getParent()['addClass']('current-disabled');
|
||
} else {
|
||
item.blur();
|
||
item.getParent()[item.checked?'addClass':'removeClass']('current-set');
|
||
}
|
||
});
|
||
|
||
//指定物流
|
||
$$('#content_tbl input[name="config[corpChoice]"]').addEvent('click',function(){
|
||
if (this.value == 2) {
|
||
$E('#content_tbl #special_corp').show();
|
||
} else {
|
||
$E('#content_tbl #special_corp').hide();
|
||
}
|
||
});
|
||
|
||
if ($E('#content_tbl input[name="config[corpChoice]"]:checked').value==1) {
|
||
$E('#content_tbl #special_corp').hide();
|
||
}
|
||
|
||
$('special_corp').addEvent('click', function(){
|
||
new Dialog('index.php?app=omeauto&ctl=autoconfirm&act=showbranchcorp',{
|
||
width:700,
|
||
height:420,
|
||
title:'指定快递公司',
|
||
ajaxoptions:{
|
||
method:'post',
|
||
data:{
|
||
branch_corp:$E('textarea[name=config[special_corp]]').value,
|
||
common_corp:$E('input[name=config[corp_id]]').value,
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
})();
|
||
</script>
|