Commit 168e4f68 authored by xiaochao's avatar xiaochao

Merge branch 'feature/付款申请审批记录打印' into develop

parents 87a2c6a2 eeb9fe55
......@@ -97,7 +97,7 @@
}
if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != ''){
if (record.get('guarantor_name_duty') != 'Y'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
......
......@@ -97,7 +97,7 @@
}
if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != ''){
if (record.get('guarantor_name_duty') != 'Y'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
......
......@@ -215,23 +215,25 @@
record.getField('paid_byother_flag_n').setReadOnly(false);
record.set('transaction_type', 'RECEIPT');
}
}else if(name == 'extra_nam'){
//深圳美鹏
// var extra_nam = record.get('extra_nam');
var bp_code = record.get('bp_code');
if (bp_code == 'C00010168'){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc','是');
record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if (bp_code != 'C00010168'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}else if (name =='bp_code'){
}
// else if(name == 'extra_nam'){
// //深圳美鹏
// // var extra_nam = record.get('extra_nam');
// var bp_code = record.get('bp_code');
//
// if (bp_code == 'C00010168'){
// record.getField('guarantor_name_duty_desc').setReadOnly(false);
// record.set('guarantor_name_duty_desc','6666');
// record.set('guarantor_name_duty','Y');
// record.getField('guarantor_name_duty_desc').setRequired(true);
// }else if (bp_code != 'C00010168'){
// record.getField('guarantor_name_duty_desc').setReadOnly(true);
// record.set('guarantor_name_duty_desc','4444');
// record.set('guarantor_name_duty','N');
// record.getField('guarantor_name_duty_desc').setRequired(false);
// }
// }
else if (name =='bp_code'){
var bp_id = record.get('bp_id');
Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
......@@ -258,12 +260,19 @@
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc','是');
record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){
if (unit_code == 241 || unit_code == 610){
if(record.get('paid_byother_flag') == 'T'){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(record.get('paid_byother_flag') == 'F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}else if(unit_code != 241 || unit_code != 610){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
......@@ -294,6 +303,48 @@
Leaf.Masker.unmask(Ext.getBody());
}
});
}else if(name == 'paid_byother_flag'){
if(record.get('paid_byother_flag') =='T'){
var extra_id = record.get('bp_id');
if (extra_id != null){
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id: extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241 || unit_code == 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
} else if (unit_code != 241 || unit_code != 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}
}else if(record.get('paid_byother_flag') =='F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}
}
......@@ -449,12 +500,12 @@
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
if (unit_code == 241 || unit_code == 610){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
// record.set('guarantor_name_duty_desc','是');
// record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){
}else if(unit_code != 241 || unit_code != 610){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
// record.set('guarantor_name_duty_desc','否');
// record.set('guarantor_name_duty','N');
......@@ -615,8 +666,10 @@
</a:field>
<!--担保人履行担保义务-->
<a:field name="guarantor_name_duty_desc" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="guarantor_name_duty" valueField="code_value"/>
<a:field name="guarantor_name_duty" required="true"/>
<a:field name="guarantor_name_duty_desc" displayField="code_value_name"
options="yes_no_ds" prompt="担保人履行担保义务"
returnField="guarantor_name_duty" valueField="code_value"/>
<!--<a:field name="guarantor_name_duty" required="true"/>-->
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/>
......@@ -697,7 +750,7 @@
<!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" width="180" />
<a:column name="guarantor_name_duty" hidden="true"/>
<!--<a:column name="guarantor_name_duty" hidden="true"/>-->
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
......
......@@ -229,7 +229,6 @@
success: function (res) {
//先查询数量
var count = res.result.extra_name_count;
//根据数量,一个直接查询显示,多个显示空
if (count == 1){
//查询代理点得简称
......@@ -247,14 +246,14 @@
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true);
}else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false);
if (unit_code == 241 || unit_code == 610){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
// record.set('guarantor_name_duty','是');
// record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241 || unit_code != 610){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
// record.set('guarantor_name_duty','否');
// record.getField('guarantor_name_duty_desc').setRequired(false);
}
},
failure: function () {
......@@ -504,7 +503,7 @@
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
<a:field name="extra_nam"/>
<a:field name="guarantor_name_duty"/>
<a:field name="guarantor_name_duty_desc"/>
</a:fields>
<a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
......@@ -581,7 +580,7 @@
<a:textField width="300" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds"
<a:comboBox name="guarantor_name_duty_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" readOnly="true" width="180" />
</a:hBox>
</a:fieldSet>
......
......@@ -245,57 +245,67 @@
record.getField('paid_byother_flag_n').setReadOnly(false);
record.set('transaction_type', 'RECEIPT');
}
}else if(name == 'extra_nam'){
//深圳美鹏
// var extra_nam = record.get('extra_nam');
var bp_code = record.get('bp_code');
if (bp_code == 'C00010168'){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc','是');
record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if (bp_code != 'C00010168'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}
// else if(name == 'extra_nam'){
// //深圳美鹏
// // var extra_nam = record.get('extra_nam');
// var bp_code = record.get('bp_code');
// //bp_code == 'C00010168'
// if (bp_code == 'D00010001' || bp_code == 'D00000009'){
// record.getField('guarantor_name_duty_desc').setReadOnly(false);
// record.set('guarantor_name_duty_desc','是');
// record.set('guarantor_name_duty','Y');
// record.getField('guarantor_name_duty_desc').setRequired(true);
// }else if (bp_code != 'D00010001' || bp_code == 'D00000009'){
// record.getField('guarantor_name_duty_desc').setReadOnly(true);
// record.set('guarantor_name_duty_desc','否');
// record.set('guarantor_name_duty','N');
// record.getField('guarantor_name_duty_desc').setRequired(false);
// }
// }
else if (name =='bp_code') {
var bp_id = record.get('bp_id');
Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
para: {bp_id: bp_id},
scope: this,
success: function (res) {
//先查询数量
var count = res.result.extra_name_count;
//根据数量,一个直接查询显示,多个显示空
if (count == 1){
if (count == 1) {
//查询代理点得简称
Leaf.request({
url: $('get_extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
para: {bp_id: bp_id},
scope: this,
success: function (res) {
var extra_name = res.result.extra_name;
record.set('extra_nam',extra_name);
record.set('extra_nam', extra_name);
var extra_id = bp_id;
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : extra_id},
para: {bp_id: extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc','是');
record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){
if (unit_code == 241 || unit_code == 610) {
if(record.get('paid_byother_flag') == 'T'){
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(record.get('paid_byother_flag') == 'F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
} else if (unit_code != 241 || unit_code != 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
},
......@@ -323,6 +333,48 @@
Leaf.Masker.unmask(Ext.getBody());
}
});
}else if(name == 'paid_byother_flag'){
if(record.get('paid_byother_flag') =='T'){
var extra_id = record.get('bp_id');
if (extra_id != null){
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id: extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241 || unit_code == 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
} else if (unit_code != 241 || unit_code != 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}
}else if(record.get('paid_byother_flag') =='F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}
}
// function onAdd_csh511_receipt(ds, record) {
// record.set('precision',2);
......@@ -489,6 +541,7 @@
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_code" to="bp_code"/>
<a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_name" to="bp_category_display"/>
......
......@@ -80,30 +80,14 @@
var record1 = new Leaf.Record({
'address_type': 'HOUSEHOLD_ADDRESS',
'address_type_n': '户籍地址',
'country_id': 37,
'country_id_n': '中华人民共和国',
'province_id': 0,
'province_id_n': '',
'city_id': 0,
'city_id_n': '',
'district_id': 0,
'district_id_n': '',
'address': ' ',
'phone': ' '
'country_id': 32,
'country_id_n': '中华人民共和国'
});
var record2 = new Leaf.Record({
'address_type': 'POSTAL_ADDRESS',
'address_type_n': '通讯地址',
'country_id': 37,
'country_id_n': '中华人民共和国',
'province_id': 0,
'province_id_n': '',
'city_id': 0,
'city_id_n': '',
'district_id': 0,
'district_id_n': '',
'address': ' ',
'phone': ' '
'country_id': 32,
'country_id_n': '中华人民共和国'
});
address_ds_id_ds.add(record1);
address_ds_id_ds.add(record2);
......@@ -122,16 +106,8 @@
var record2 = new Leaf.Record({
'address_type': 'POSTAL_ADDRESS',
'address_type_n': '通讯地址',
'country_id': 37,
'country_id_n': '中华人民共和国',
'province_id': 0,
'province_id_n': '',
'city_id': 0,
'city_id_n': '',
'district_id': 0,
'district_id_n': '',
'address': ' ',
'phone': ' '
'country_id': 32,
'country_id_n': '中华人民共和国'
});
address_ds_id_ds.add(record2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment