Commit e52c4913 authored by stone's avatar stone

【fix】修改bug

parent 2cbd800c
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<ns1:model xmlns:s="leaf.plugin.script" xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="cont.CON500.con_contract_v" extendMode="reference">
<ns1:model xmlns:s="leaf.plugin.script" xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="cont.CON500.con_contract_v" extendMode="reference" needAccessControl="false">
<ns1:fields>
<ns1:field name="bp_id_tenant"/>
<ns1:field name="contract_id"/>
......@@ -43,6 +43,5 @@
<ns1:data-filters>
<ns1:data-filter enforceOperations="query" expression="t1.contract_status not in (&apos;CANCEL&apos;,&apos;TERMINATE&apos;,&apos;CLOSED&apos;)"/>
<ns1:data-filter enforceOperations="query" expression="t1.insurance_number is null"/>
<ns1:data-filter enforceOperations="query" expression="t1.project_id is not null"/>
</ns1:data-filters>
</ns1:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CONTRACT_INSURANCE_TEMP">
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CONTRACT_INSURANCE_TEMP" needAccessControl="false">
<bm:fields>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="CONTRACT_INSURANCE_TEMP.RECORD_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="CONTRACT_INSURANCE_TEMP.BATCH_ID"/>
......
......@@ -4,6 +4,10 @@ var add_datafilters = [
name: 'document_type',
expression: "t1.document_type = 'CARCON'"
},
{
name:'contract_status',
expression:"t1.contract_status ='NEW'"
},
{
name: 'sign_contract_status',
expression: "t1.sign_contract_status in ('NEW','SIGNING','SIGN','SIGN_RETURN')"
......
......@@ -35,8 +35,35 @@
}
function acr516_invoice_apply() {
var records=$('acr516_invoice_result_ds').getSelected();
var datas = [];
for (var i = 0;i < records.length;i++) {
datas.push({
'invoice_hd_id':records[i].get('invoice_hd_id'),
'_status': 'update'
})
}
$L.showConfirm("提示",'确认执行该操作?',function(){
$('acr516_invoice_result_ds').submitSelected();
Leaf.request({
url: '${/request/@context_path}/autocrud/acr.ACR604.acr_invoice_claim_application_new/batch_update',
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr516_invoice_result_ds').query();
},
failure: function () {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
})
}
......
......@@ -40,10 +40,36 @@
function acr517_invoice_confirm() {
// var records = $('acr517_invoice_result_ds').getSelected();
$('acr517_invoice_result_ds').setSubmitUrl('${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update');
$L.showConfirm("提示",'确认执行该操作?',function(){
$('acr517_invoice_result_ds').submitSelected();
// $('acr517_invoice_result_ds').setSubmitUrl('${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update');
var records=$('acr517_invoice_result_ds').getSelected();
var datas = [];
for (var i = 0;i < records.length;i++) {
datas.push({
'invoice_hd_id':records[i].get('invoice_hd_id'),
'_status': 'update'
})
}
$L.showConfirm("提示",'确认执行该操作?',function(){
Leaf.request({
url: '${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update',
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr517_invoice_result_ds').query();
},
failure: function () {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
})
// alert(record.get('invoice_hd_id'));
......@@ -67,33 +93,37 @@
}
function acr517_invoice_return() {
// console.log($('acr517_invoice_result_ds'));
// return;
// var record = $('acr517_invoice_result_ds').getCurrentRecord();
var url=$('acr_invoice_refuse_link_id').getUrl();
$('acr517_invoice_result_ds').setSubmitUrl(url);
$L.showConfirm("提示",'确认执行该操作?',function(){
$('acr517_invoice_result_ds').submitSelected();
var records=$('acr517_invoice_result_ds').getSelected();
var datas = [];
for (var i = 0;i < records.length;i++) {
datas.push({
'invoice_hd_id':records[i].get('invoice_hd_id'),
'_status': 'update'
})
}
$L.showConfirm("提示",'确认执行该操作?',function(){
Leaf.request({
url: '${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_return/batch_update',
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr517_invoice_result_ds').query();
},
failure: function () {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
})
// alert(record.get('invoice_hd_id'));
// debugger;
// invoice_hd_id = record.get('invoice_hd_id');
// Leaf.request({
// url: $("bmLink_acr_invoice_return").getUrl(),
// para: {
// invoice_hd_id:invoice_hd_id,
// },
// success:function(){
// $('acr517_invoice_result_ds').query();
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
// },
// sync:true,
// scope: this
// });
}
function submit_success_btn(){
$('acr517_invoice_result_ds').query();
......@@ -143,7 +173,7 @@
<a:toolbarButton click="acr517_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr517_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr517_invoice_confirm" text="确认"/>
<a:toolbarButton click="acr517_invoice_return" text="回"/>
<a:toolbarButton click="acr517_invoice_return" text="退回"/>
</a:screenTopToolbar>
<a:form marginWidth="30" padding="0" title="查询条件" column="4">
<a:textField name="document_number" bindTarget="acr517_invoice_query_ds" prompt="单据编号" width="135"/>
......
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