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
0731752d
Commit
0731752d
authored
Nov 11, 2024
by
38823
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I-20927 【建机】核销时选择到重名商业伙伴时提示
parent
b7857a10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
53 deletions
+146
-53
contract_bp.lwm
src/main/webapp/WEB-INF/classes/csh/CSH531N/contract_bp.lwm
+13
-0
csh_write_off_ref_contract.lview
...bapp/modules/csh/CSH531N/csh_write_off_ref_contract.lview
+133
-53
No files found.
src/main/webapp/WEB-INF/classes/csh/CSH531N/contract_bp.lwm
0 → 100644
View file @
0731752d
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:s=
"leaf.plugin.script"
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
needAccessControl=
"false"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select count(*) as con_sum from con_contract_bp ccb where ccb.bp_id=${@bp_id} and ccb.contract_id =${@contract_id} #WHERE_CLAUSE#
]]>
</bm:query-sql>
<bm:parameters>
<bm:parameter
name=
"con_sum"
dataType=
"java.lang.Long"
input=
"false"
output=
"true"
outputPath=
"@con_sum"
/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/modules/csh/CSH531N/csh_write_off_ref_contract.lview
View file @
0731752d
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
trace=
"true"
>
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
trace=
"true"
>
<a:view>
<a:view>
<a:link
id=
"contract_bp_link"
model=
"csh.CSH531N.contract_bp"
modelaction=
"query"
/>
<script
type=
"text/javascript"
>
<![CDATA[
<script
type=
"text/javascript"
>
<![CDATA[
function csh_write_off_query() {
function csh_write_off_query() {
$('csh_lov_con_contract_ds').query();
$('csh_lov_con_contract_ds').query();
...
@@ -50,6 +51,17 @@
...
@@ -50,6 +51,17 @@
Leaf.showInfoMessage("提示", "请选择要核销的现金流!");
Leaf.showInfoMessage("提示", "请选择要核销的现金流!");
return;
return;
}
}
Leaf.request({
url: $('contract_bp_link').getUrl(),
para: {
bp_id: '${/parameter/@bp_id}',
contract_id:con_rec.get('contract_id')
},
success: function(res) {
debugger;
if(res.result.record.con_sum == 0){
Leaf.showConfirm('${l:HLS.PROMPT}', '当前选择合同的商业伙伴和现金事务不一致,您确认吗?', function() {
debugger;
var rec = ds.getCurrentRecord();
var rec = ds.getCurrentRecord();
rec.set('contract_id', con_rec.get('contract_id'));
rec.set('contract_id', con_rec.get('contract_id'));
rec.set('contract_number', con_rec.get('contract_number'));
rec.set('contract_number', con_rec.get('contract_number'));
...
@@ -106,6 +118,74 @@
...
@@ -106,6 +118,74 @@
ds.add(newRecord);
ds.add(newRecord);
}
}
$('${/parameter/@lovid}').win.close();
$('${/parameter/@lovid}').win.close();
});
}else {
var rec = ds.getCurrentRecord();
rec.set('contract_id', con_rec.get('contract_id'));
rec.set('contract_number', con_rec.get('contract_number'));
rec.set('division', con_rec.get('division'));
rec.set('bp_tenant_name', con_rec.get('bp_name'));
rec.set('write_off_bp_name', con_rec.get('bp_name'));
rec.set('write_off_bp_id', con_rec.get('bp_id_tenant'));
rec.set('bp_id_tenant', con_rec.get('bp_id_tenant'));
rec.set('write_off_cf_item_desc', cf_recs[0].get('cf_item_desc'));
rec.set('write_off_cashflow_id', cf_recs[0].get('cashflow_id'));
rec.set('write_off_cf_item', cf_recs[0].get('cf_item'));
rec.set('write_off_times', cf_recs[0].get('times'));
rec.set('left_principal', cf_recs[0].get('unreceived_principal'));
rec.set('left_interest', cf_recs[0].get('unreceived_interest'));
rec.set('left_amount', cf_recs[0].get('unreceived_amount'));
rec.set('due_amount', cf_recs[0].get('due_amount'));
rec.set('principal', cf_recs[0].get('principal'));
rec.set('interest', cf_recs[0].get('interest'));
rec.set('due_date', cf_recs[0].get('due_date'));
rec.set('write_off_principal', cf_recs[0].get('unreceived_principal'));
rec.set('write_off_interest', cf_recs[0].get('unreceived_interest'));
rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount'));
rec.set('write_off_date',new Date().format('yyyy-mm-dd'));
rec.set('journal_date',new Date().format('yyyy-mm-dd'));
rec.set('payment_deduction', con_rec.get('payment_deduction'));
// rec.set('write_off_amount', cf_recs[0].get('unreceived_amount'));
for (var i = 1; i < cf_recs.length; i++) {
//copy...
// var newRecord = new Leaf.Record({...rec.data});
//IE不支持ES6扩展
var obj = JSON.parse(JSON.stringify(rec.data));
var newRecord = new Leaf.Record(obj);
newRecord.ds = rec.ds;
newRecord.set('write_off_cf_item_desc', cf_recs[i].get('cf_item_desc'));
newRecord.set('write_off_cf_item', cf_recs[i].get('cf_item'));
newRecord.set('write_off_times', cf_recs[i].get('times'));
newRecord.set('due_date', cf_recs[i].get('due_date'));
newRecord.set('write_off_cashflow_id', cf_recs[i].get('cashflow_id'));
newRecord.set('unreceived_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('interest', cf_recs[i].get('interest'));
newRecord.set('principal', cf_recs[i].get('principal'));
newRecord.set('due_amount', cf_recs[i].get('due_amount'));
newRecord.set('left_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('left_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('left_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('write_off_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('write_off_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('write_off_date',new Date().format('yyyy-mm-dd'));
newRecord.set('journal_date',new Date().format('yyyy-mm-dd'));
// newRecord.set('write_off_amount', cf_recs[i].get('unreceived_amount'));
ds.add(newRecord);
}
$('${/parameter/@lovid}').win.close();
}
},
failure: function() {
Leaf.Masker.unFmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
function setBankAccount() {
function setBankAccount() {
...
...
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