Files
OMS/app/omeanalysts/view/ome/time_header.html
chenping 61783b7d01 1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数

3. 【优化】盘点申请单确认

4. 【修复】采购退货单模拟出库失败问题

5. 【新增】订单金额客户实付与结算金额

6. 【优化】仓库发货统计报表物料名称显示

7. 【优化】自有仓储虚拟发货逻辑

8. 【修复】基础物料分类管理问题
2026-04-01 11:59:17 +08:00

341 lines
14 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="borderGray" style="margin:5px 0; padding:5px 10px;border:1px solid #ddd;background:#f3f3f3"><b>当天数据请于第二天查看</b><br/>
当前时间不足一月,本月数据只显示到当前时间前一天的数据</div>-->
<style>
.branch-div {
top: 5px;
z-index: 100;
overflow: visible;
}
.branch-div .select-label {
padding-top: 0px;
padding-bottom: 0px;
}
.branch-div .select-label:after {
top: 9px;
}
.branch-div .select-dropdown {
margin-top: 1px;
}
.finder-title {
overflow: visible;
}
.finder-action {
clear: both;
}
</style>
<div class="data-action" id="dataAction" style="padding:5px;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<{if $type_display == "true"}>
<tr>
<td>
<{foreach from=$typeData key=type_key item=type_item}>
<{if $type_item.type eq 'text'}>
<{$type_item.lab}>:
<input type="text" name="<{$type_key}>" value="<{$type_selected.$type_key}>">
<{else}>
<div style="display: inline;"><{t}>选择<{/t}><{$type_item.lab}>:<select name="<{$type_key}>" id="<{$type_item.id}>"<{if $type_item.multiple}> multiple="multiple" style="height:10px;" <{/if}> <{if $report != "month"}> style="max-width:90px;_width:90px;"<{/if}> >
<{if $type_key!='branch_id' && !$type_item.multiple && $type_key!='material_type' }><option value="0" >&nbsp;<{t}>全部<{/t}>&nbsp;</option><{/if}>
<{foreach from=$type_item.data key=key item=item}>
<option value="<{$item.type_id}>" <{if (is_array($type_selected.$type_key) && in_array($item.type_id, $type_selected.$type_key)) || (!is_array($type_selected.$type_key) && $type_selected.$type_key == $item.type_id)}>selected="selected"<{/if}>><{$item.name}></option>
<{/foreach}>
</select></div>
<{/if}>
<{/foreach}>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<{/if}>
<tr>
<td nowrap="nowrap">
<label><{t}>时间范围<{if $timeExplain}><{$timeExplain}><{/if}>:<{/t}></label>
<{if $report != "month"}>
<{input type="date" vtype="date" name="time_from" style="width:96px; font-family:arial;" value=$time_from}><{t}>至<{/t}>
<{input type="date" vtype="date" name="time_to" style="width:96px; font-family:arial;" value=$time_to}>
<{else}>
<select id="from_year" class="date_select">
<{foreach from=$year item=item}>
<option value="<{$item}>" <{if $from_selected[0] == $item}>selected="selected"<{/if}>><{$item}></option>
<{/foreach}>
</select><{t}>年<{/t}>
<select id="from_month" class="date_select">
<{foreach from=$month item=item}>
<option value="<{$item}>" <{if $from_selected[1] == $item}>selected="selected"<{/if}>><{$item}></option>
<{/foreach}>
</select><{t}>月 <{/t}><{t}>至<{/t}>
<select id="to_year" class="date_select">
<{foreach from=$year item=item}>
<option value="<{$item}>" <{if $to_selected[0] == $item}>selected="selected"<{/if}>><{$item}></option>
<{/foreach}>
</select><{t}>年<{/t}>
<select id="to_month" class="date_select">
<{foreach from=$month item=item}>
<option value="<{$item}>" <{if $to_selected[1] == $item}>selected="selected"<{/if}>><{$item}></option>
<{/foreach}>
</select><{t}>月<{/t}>
<input type="hidden" name="time_from" value="<{$time_from}>">
<input type="hidden" name="time_to" value="<{$time_to}>">
<{/if}>
<span id="tohidden"></span>
<{button class="filterBtn btn-thirdly" label=$___eccommon="确定"|t:'eccommon'}>&nbsp; 快速查看:
<{if $report != "month"}>
<{if $time_shortcut}>
<{if $time_shortcut[0]==1}><{button class="dataBtn btn-fourthly" time_from=$yesterday time_to=$yesterday label=$___eccommon="昨日"|t:'eccommon'}><{/if}>
<{if $time_shortcut[1]==2}><{button class="dataBtn btn-fourthly" time_from=$today time_to=$today label=$___eccommon="今日"|t:'eccommon'}><{/if}>
<{if $time_shortcut[2]==3}><{button class="dataBtn btn-fourthly" time_from=$this_week_from time_to=$this_week_to label=$___eccommon="本周"|t:'eccommon'}><{/if}>
<{if $time_shortcut[3]==4}><{button class="dataBtn btn-fourthly" time_from=$last_week_from time_to=$last_week_to label=$___eccommon="上周"|t:'eccommon'}><{/if}>
<{if $time_shortcut[4]==5}><{button class="dataBtn btn-fourthly" time_from=$this_month_from time_to=$this_month_to label=$___eccommon="本月"|t:'eccommon'}><{/if}>
<{if $time_shortcut[5]==6}><{button class="dataBtn btn-fourthly" time_from=$last_month_from time_to=$last_month_to label=$___eccommon="上月"|t:'eccommon'}><{/if}>
<{else}>
<{button class="dataBtn btn-fourthly" time_from=$yesterday time_to=$yesterday label=$___eccommon="昨日"|t:'eccommon'}>
<{button class="dataBtn btn-fourthly" time_from=$today time_to=$today label=$___eccommon="今日"|t:'eccommon'}>
<{button class="dataBtn btn-fourthly" time_from=$this_week_from time_to=$this_week_to label=$___eccommon="本周"|t:'eccommon'}>
<{button class="dataBtn btn-fourthly" time_from=$last_week_from time_to=$last_week_to label=$___eccommon="上周"|t:'eccommon'}>
<{button class="dataBtn btn-fourthly" time_from=$this_month_from time_to=$this_month_to label=$___eccommon="本月"|t:'eccommon'}>
<{button class="dataBtn btn-fourthly" time_from=$last_month_from time_to=$last_month_to label=$___eccommon="上月"|t:'eccommon'}>
<{/if}>
<{else}>
<{button class="dataBtn btn-fourthly" time_from=$this_month_from time_to=$this_month_to label=$___eccommon="本月"|t:'eccommon'}>
<{button class="dataBtn btn-fourthly" time_from=$last_month_from time_to=$last_month_to label=$___eccommon="上月"|t:'eccommon'}>
<{/if}>
</td>
</tr>
</table>
</div>
<script>
(function(){
//if($E('.num')) $E('.num').innerHTML+=' 数据非及时显示,当天数据请于第二天查看';
var _finder = finderGroup['<{$name}>'],
dataAction= $('dataAction'),
data_ipt=$$(dataAction.getElements('input[name^=time_]'),dataAction.getElements('select')),
from=dataAction.getElement('input[name=time_from]'),
to=dataAction.getElement('input[name=time_to]');
if(_finder&&_finder.form){
fdoc = document.createDocumentFragment();
data_ipt.each(function(ipt){
if(ipt.multiple) {
ipt.getElements('option:selected').each(function (item){
var itemValue = item.getAttribute('value');
fdoc.appendChild(new Element('input[type=hidden]', {'name': ipt.name, value: itemValue}));
});
return;
}
fdoc.appendChild(new Element('input[type=hidden]', {'name': ipt.name, value: ipt.value}));
});
_finder.form.appendChild(fdoc);
}
data_ipt.addEvent('change',function(e){
if(_finder&&_finder.form){
var ipt=$E('input[name='+this.name+']',_finder.form);
if(ipt)ipt.value=this.value;
}
});
<{if $report == "month"}>
var today=new Date();
$$('select.date_select').each(function(item){
/* $A(item.options).each(function(opt,i){
if(opt.text==today.getFullYear() || opt.text==today.getMonth()+1) opt.selected=true;
}); */
item.addEvent('change',function(){
setDate(this.get('id').split('_')[0]);
});
});
setDate();
function setDate(){
var arguments=arguments.length===0 ? ['from','to'] : arguments;
$A(arguments).each(function(item){
dataAction.getElement('input[name=time_'+item+']').value=$(item+'_year').options[$(item+'_year').selectedIndex].text+'-'+$(item+'_month').options[$(item+'_month').selectedIndex].text+'-01';
});
}
<{/if}>
$$('.select-tabs a').addEvent('click',function(e){
e.stop();
W.page(this.href,{data:'report='+this.type,method:"post"});
});
function setChartData(flag,e){
if(!check_data(from,to))return;
var params=dataAction.toQueryString(),
itemcur=$E('.chart-view .chart-item-cur');
dataAction.store('_data',params);
if(flag&&itemcur&&$E('iframe',itemcur)) $E('iframe',itemcur).src+='&'+params;
if(flag) url='index.php?app=<{$env.get.app}>&ctl=<{$env.get.ctl}>&act=<{$env.get.act}>';
else url=e.target.href||e.target.getParent().href;
W.page(url, {data:params, method:'post',onComplete:function(){
if(_finder) _finder.filter.value=params;
}});
}
dataAction.getElements('select').each(
function(el,i){
var type_key = el.get('name');
if($(type_key)) $(type_key).addEvent('change',function(e){$('tohidden').set('html','');setChartData(true);});
}
);
//$('select_shop').addEvent('change',function(e){setChartData(true);});
dataAction.getElement('.filterBtn').addEvent('click',function(e){$('tohidden').set('html','');setChartData(true);});
var packet=$('finder-packet-<{$name}>');
if(packet) packet.addEvent("click",function(e){
if(e.target.tagName.toLowerCase()=="a" || e.target.getParent().tagName.toLowerCase()=="a"){
e.stop();
$('tohidden').set('html','');
setChartData(false,e);
}
});
<{if $report == "month"}>
function check_data(from,to){
if(Date.parse(to.value.replace(/-/gi,"/"))<Date.parse(from.value.replace(/-/gi,"/"))){
return MessageBox.error('<{t}>选择开始时间必须早于结束时间<{/t}>');
}
return true;
}
<{else}>
function check_data(from,to){
var data=[],
_return=[from,to].every(function(el){
if(!/^(19|20)[0-9]{2}-([1-9]|0[1-9]|1[012])-([1-9]|0[1-9]|[12][0-9]|3[01])+$/.test(el.value)){
new MessageBox('<{t}>请录入日期格式yyyy-mm-dd<{/t}>',{type:'error',autohide:true});
el.focus();
return false;
}
data.push(Date.parse(el.value.replace(/-/gi,"/")));
return true;
});
if(!_return)return null;
if(data[1]<data[0]){
return MessageBox.error('<{t}>选择开始时间必须早于结束时间<{/t}>');
}
return _return;
}
<{/if}>
var dataBtn=dataAction.getElements('.dataBtn');
dataBtn.each(function(el,i){
if(el.get('time_from')==from.value && el.get('time_to')==to.value)
el.addClass('btn-fourthly-cur');
el.addEvent('click',function(e){
from.value=this.get('time_from');
to.value=this.get('time_to');
/* ['time_from','time_to'].each(function(v){
* dataAction.getElements('input[name='+v+']').value=this.get(v);
* },this); */
dataAction.getElement('.filterBtn').fireEvent('click');
});
});
if($ES('.large .span-auto').length)
$ES('.large .span-auto').each(function(el){
el.store('tip:title',el.get('title')).store('tip:text',el.get('info'));
Xtip.attach(el);
});
})();
window.addEvent('domready',function(e){
var lazyload = new LazyLoad();
if($E('.chart-tabs li')) new ItemAgg($ES('.chart-tabs li'),$ES('.chart-view .chart-items'),{
activeName:'current',
itemsClass:'chart-item-cur',
onActive:function(tab,item){
lazyload.loadCustomLazyData(item,'textarea');
var iframe=item.getElement('iframe'),
src=item.retrieve('_src',iframe.src),
params=$('dataAction').retrieve('_data','');
if(window.ie||iframe.retrieve('_params','')!=params){
iframe.src=src+params;
iframe.store('_params',params);
}
}
});
if($E('.finder-action .export')) $E('.finder-action .export').addEvent('click',function(e){
e.stop();
var target = this.get('target'),options = JSON.decode(target);
new Dialog(this.get('href'),$extend({
ajaxoptions:{
data:$('dataAction').toQueryString(),
method: 'post'
},
onClose:function(){
if((_finder=finderGroup['<{$name}>'])) _finder.refresh();
}
},options));
});
if($E('.chart-view') && $E('.finder-options')){
var closeBtn = $('btn_close_charts') || new Element('div.span-auto',{html:'<a id="btn_close_charts" href="javascript:void(0);">收起图形</a>'}).inject($E('.finder-options'));
if(window.ie7) $E('.finder-options').style.cssText = 'width:auto;float:right;';
var closedEl = $E('.chart-view');
closeBtn.getElement('a').addEvent('click',function(){
if(closedEl.isDisplay()){
closedEl.hide();
this.set('text','展开图形');
}
else{
closedEl.show();
var iframe=$E('.chart-view .chart-item-cur iframe'),
params=$('dataAction').toQueryString();
if(iframe && (window.ie||iframe.retrieve('_params','')!=params)){
iframe.src += params;
iframe.store('_params',params);
}
this.set('text','收起图形');
}
window.fireEvent('resize');
});
}
});
</script>
<script>
if($('shop_type_id')) tail.select("#shop_type_id", {
classNames: 'branch-div',
multiple: true,
width: 150,
height: 360,
searchMinLength: 0,
search: true,
});
if($('shop_branch_id')) tail.select("#shop_branch_id", {
classNames: 'branch-div',
multiple: false,
width: 150,
height: 160,
searchMinLength: 0,
search: true,
});
</script>