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

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

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

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

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

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

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

173 lines
7.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
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">
<!-- <h3>财务设置</h3> -->
<div class="division">
<{if $isSaveInitTime == 'false'}>
<form method="post" action="index.php?app=finance&ctl=setting_init&act=save_init_time" id="setting-form">
<{/if}>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<th style='width:200px;text-align:right;'><em class="c-red">*</em>账务起始年:</th>
<td><{input type="select" name="init_time[year]" options=$year value=$init_time.year vtype="required" }></td>
</tr>
<tr>
<th style='width:200px;text-align:right;'><em class="c-red">*</em>账务起始月:</th>
<td><{input type="select" name="init_time[month]" options=$month value=$init_time.month vtype="required" }></td>
</tr>
<tr>
<th style='width:200px;text-align:right;'><em class="c-red">*</em>账务起始日:</th>
<td><{input type="select" name="init_time[day]" options=$day value=$init_time.day vtype="required" }></td>
</tr>
<tr>
<th style='width:200px;text-align:right;'>账期时间:</th>
<td><{input type="select" name="init_time[cycle]" options=array("month"=>"按月","day"=>"按日") required="true" value=$init_time.cycle}></td>
</tr>
<tr>
<th style='width:200px;text-align:right;'>账期规则:</th>
<td><{input type="select" name="init_time[according]" options=array("ying_shou"=>"按应收单账单日期","shi_shou"=>"按实收单账单日期") required="true" value=$init_time.according}></td>
</tr>
<tr>
<th style='width:200px;text-align:right;'>应收金额:</th>
<td><{input type="select" name="init_time[ying_shou]" options=array("sale"=>"销售金额","settlement"=>"结算金额","actually"=>"客户实付") required="true" value=$init_time.ying_shou}></td>
</tr>
<tr>
<th style='width:200px;text-align:right;'>应退金额:</th>
<td><{input type="select" name="init_time[ying_tui]" options=array("apply"=>"退款申请金额","refund"=>"退款金额","settlement"=>"结算金额","real_refund_amount"=>"买家实退") required="true" value=$init_time.ying_tui}>
<span style='color:red;'>注意:结算金额时,售后仅退款以退款金额为准!</span>
</td>
</tr>
</tbody>
</table>
<div class='notice'>
初始化设置完成后,有数据进入系统,则不能修改!必须清空所有数据才能再次修改!<br/><br/>
<span style='color:red;'>注意:必须费用项不能为空,不然流水无法转换到实收实退单!</span>
</div>
<div class="table-action">
<{if $isSaveInitTime == 'true' || $feeTypeCount}>
<{button label="保存" type="button" name="submit" id="btn-setting" disabled="disabled" }>
<{else}>
<{button label="保存" type="submit" name="submit" id="btn-setting" }>
<{/if}>
<{button type='button' label='关闭' isCloseDialogBtn="true"}>
</div>
<{if $isSaveInitTime == 'false'}>
</form>
<{/if}>
</div>
<div class="division" style="display:none;">
<h3>第二步:账期数据导入</h3>
<{if $isInit == 'false' }>
<form method="post" action="index.php?app=finance&ctl=setting_init&act=save_init">
<input type="hidden" value="true" name="isInit">
<{/if}>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tbody>
<tr>
<th style='width:200px;text-align:right;'>选择导入模版:</th>
<td>
<input type='button' value='下载模版' <{if $isInit == 'false' || $canImport == 'true' }>onclick="new Dialog('index.php?app=omecsv&ctl=admin_export&act=main&add=finance&ctler=finance_mdl_bill&filter[template]=1',{'title':'<{t}>下载模版<{/t}>','width':400,'height':170});"<{/if}> >
</td>
</tr>
<tr>
<th style='width:200px;text-align:right;'>导入模版:</th>
<td>
<input type='button' value='导入账单' <{if $isInit == 'false' || $canImport == 'true' }>onclick="new Dialog('index.php?app=omecsv&ctl=admin_import&act=main&add=finance&ctler=finance_mdl_bill&filter[checkTime]=before',{'title':'<{t}>导入账单<{/t}>','width':400,'height':180});"<{/if}> >
</td>
</tr>
</tbody>
</table>
<div class="table-action">
<{if $isInit == 'true'}>
<{button label="初始化完成" type="button" name="submit" id="btn-setting" disabled="disabled" }>
<{else}>
<{button label="初始化完成" type="submit" name="submit" id="btn-setting"}>
<{/if}>
</div>
<{if $isInit == 'false' }>
</form>
<{/if}>
</div>
</div>
<script>
$('btn-setting').addEvent('click',function(event){
if (!validate($('setting-form'))){
return ;
}
$('setting-form').fireEvent('submit', {stop:$empty});
});
$('setting-form').store('target',{
onRequest:function(){
$('btn-setting').set('disabled', 'true');
},
onComplete:function(resp){
resp = JSON.decode(resp)
$('btn-setting').set('disabled', '');
if (resp.error) return ;
$('setting-form').getParent('.dialog').retrieve('instance').close();
// 安全地刷新finder如果存在的话
try {
var finderId = '<{$env.get.finder_id}>';
if (finderId && finderGroup && finderGroup[finderId]) {
// 有finder上下文的情况从finder页面调用如monthend.php的index方法
finderGroup[finderId].refresh();
} else {
// 没有finder上下文的情况从dialog弹窗调用
// 调用场景:
// 1. app/financebase/view/admin/bill/import.html - 账单导入页面
// 2. 其他通过 target="dialog" 直接打开此页面的场景
// 3. 通过 window.open 或类似方式打开的弹窗
if (window.opener && !window.opener.closed) {
// 通过window.open打开的弹窗刷新打开者页面
window.opener.location.reload();
} else if (window.parent && window.parent !== window) {
// 在iframe中刷新父框架页面
window.parent.location.reload();
} else {
// 其他情况,刷新当前页面
window.location.reload();
}
}
} catch (e) {
console.log('[WARN] 刷新finder失败尝试刷新页面:', e.message);
// 如果刷新finder失败尝试刷新页面
if (window.opener && !window.opener.closed) {
window.opener.location.reload();
} else if (window.parent && window.parent !== window) {
window.parent.location.reload();
} else {
window.location.reload();
}
}
}
});
</script>