Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
5891b570
Commit
5891b570
authored
May 12, 2023
by
陆正友
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发票优化
parent
074f6433
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
17 deletions
+64
-17
ap_invoice_import_detail.lview
.../webapp/modules/acp/ACP522/ap_invoice_import_detail.lview
+64
-17
No files found.
src/main/webapp/modules/acp/ACP522/ap_invoice_import_detail.lview
View file @
5891b570
...
...
@@ -6,6 +6,7 @@
</a:init-procedure>
<a:view>
<a:link
id=
"acp_invoice_inf_import_link"
model=
"acp.ACP522.acp_invoice_inf_import"
modelaction=
"update"
/>
<a:link
id=
"acp_invoice_inf_import_total_link"
model=
"acp.ACP522.acp_invoice_inf_import_total"
modelaction=
"update"
/>
<a:link
id=
"acp_invoice_inf_import_submit_link"
model=
"acp.ACP522.acp_invoice_inf_import"
modelaction=
"execute"
/>
<script
src=
"${/request/@context_path}/javascripts/calculate.js"
type=
"text/javascript"
/>
<script>
<![CDATA[
...
...
@@ -16,13 +17,13 @@
Leaf.onReady(function () {
//document.getElementById("ext-gen935").placeholder = "在这输入姓名..";
// document.getElementById("ext-gen124").style.backgroundColor = 'red';
// document.getElementById("ext-gen124").setAttribute('placeholder','注:扫描时请将鼠标光标放在此处。。。');
// document.getElementById("ext-gen124").style.backgroundColor = 'red';
// document.getElementById("ext-gen124").setAttribute('placeholder','注:扫描时请将鼠标光标放在此处。。。');
//document.getElementById("ext-gen124").style.color = 'red';
//document.getElementById("ext-gen124").style.backgroundColor = '#FF7744';
var first=document.getElementsByClassName("item-input-wrap");
var second=first[2].getElementsByClassName('item-textField');
var third=second[0];
var first=document.getElementsByClassName("item-input-wrap");
var second=first[2].getElementsByClassName('item-textField');
var third=second[0];
third.setAttribute('placeholder','注:扫描时请将鼠标光标放在此处。。。');
third.style.backgroundColor = '#FF7744';
});
...
...
@@ -42,7 +43,6 @@
var hd_record = $(hd_id).getAt(0);
var lease_item_amount=hd_record.get('lease_item_amount');
if($(ds_id).getAll().dirty){
alert(111);
return;
}
...
...
@@ -81,11 +81,11 @@
// }
// }
// 营业外收入或营业外支出科目金额超过
0.5
,请联系系统管理员!
// 营业外收入或营业外支出科目金额超过
1
,请联系系统管理员!
if (!isNaN(records[i].get('tax_amount')||0)) {
sum_tax=plus((records[i].get('tax_amount')||0),(sum_tax||0));
}
//校验重复发票号码 add by 26887cz 2021-09-07
//校验重复发票号码 add by 26887cz 2021-09-07
for(var j =i+1;j < records.length;j++){
if(records[i].get('invoice_number')==records[j].get('invoice_number')){
Leaf.showMessage('提示', '发票号码重复,请重新扫描输入!');
...
...
@@ -99,8 +99,8 @@
}
var diff = ((net_lease_item_amount + sum_tax - lease_item_amount) >
0 ? (net_lease_item_amount + sum_tax - lease_item_amount) : (lease_item_amount - sum_tax - net_lease_item_amount));
if(diff >
0.5
){
Leaf.showMessage('提示', '营业外收入或营业外支出科目金额超过
0.5
,请联系系统管理员!');
if(diff >
1
){
Leaf.showMessage('提示', '营业外收入或营业外支出科目金额超过
1
,请联系系统管理员!');
return;
}
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function() {
...
...
@@ -139,9 +139,10 @@
var invoice_number = strs[3];
var net_amount = strs[4];
var invoice_date = strs[5];
var total_amount =strs[4];
//检验设备价格需要大于不含税金额
if (strs.length ==9) {
//校验重复发票号码 add by 26887cz 2021-09-07
//校验重复发票号码 add by 26887cz 2021-09-07
var acr_records = $(acp_ds_id).getAll();
for(var i= 0 ; i
<acr_records.length
;i++){
if(acr_records[i].get("invoice_number")
==
invoice_number){
...
...
@@ -162,24 +163,70 @@
invoice_date:
invoice_date,
contract_id:
contract_id
},
success:
function
()
{
Leaf.SideBar.show({
msg:
'导入成功',
duration:
2000
}
);
setTimeout(function()
{
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
$(acp_ds_id).setQueryParameter('contract_id',
'${/parameter/@contract_id}');
$(acp_ds_id).query();
},
failure:
function
()
{
setTimeout(function()
{
},
failure:
function
()
{
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
},
error:
function()
{
setTimeout(function()
{
error:
function
()
{
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
},
scope:
this
});
}
else
if
(
strs.length =
=
8)
{
//校验重复发票号码
add
by
26887cz
2021-09-07
var
acr_records =
$(acp_ds_id).getAll();
for
(var
i =
0;
i
<
acr_records.length;
i++)
{
if
(acr_records[i].get("invoice_number")
==
invoice_number)
{
Leaf.showMessage('提示',
'发票号码重复,请重新扫描!');
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
return;
}
}
Leaf.request({
url:
$('acp_invoice_inf_import_total_link').getUrl(),
para:
{
invoice_type:
invoice_type,
invoice_code:
invoice_code,
invoice_number:
invoice_number,
total_amount:
total_amount,
invoice_date:
invoice_date,
contract_id:
contract_id
},
success:
function
()
{
Leaf.SideBar.show({
msg:
'导入成功',
duration:
2000
}
);
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
$(acp_ds_id).setQueryParameter('contract_id',
'${/parameter/@contract_id}');
$(acp_ds_id).query();
},
failure:
function
()
{
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
},
error:
function
()
{
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
},
...
...
@@ -187,7 +234,7 @@
});
}
else
{
Leaf.showMessage('提示',
'发票信息有错误,请重新扫描!');
setTimeout(function()
{
setTimeout(function
()
{
record.set('invoice',
'');
},
50);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment