|
|
|
@ -1022,7 +1022,15 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
|
|
|
|
|
this.onSubmitAuditBackClick();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}
|
|
|
|
|
}, '-', {
|
|
|
|
|
id: 'btnSubmitBack',
|
|
|
|
|
text: '撤销未开票申请',
|
|
|
|
|
tooltip: '驳回未开票申请',
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onSubmitBackClick();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}); //end 按钮Toolbar
|
|
|
|
|
|
|
|
|
@ -5219,7 +5227,124 @@ onSubmitAuditBackClick: function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSubmitBackClick: function () {
|
|
|
|
|
var Duino = this.formEdit.getForm().findField('BILLNO').getValue();
|
|
|
|
|
var GID = this.formEdit.getForm().findField('GID').getValue();
|
|
|
|
|
var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue();
|
|
|
|
|
|
|
|
|
|
if (Duino == '*') {
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先保存发票申请,然后才能提交审核!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在添加数据...',
|
|
|
|
|
url: '/Account/Chfee_invoiceapplication/SubmitBack',
|
|
|
|
|
params: {
|
|
|
|
|
bill: Duino
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (!result.Success) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: '提示',
|
|
|
|
|
msg: result.Message,
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
|
this.storeBodyAddList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql } });
|
|
|
|
|
_this.storeBodyList.load({
|
|
|
|
|
params: { condition: " BILLNO='" + Duino + "'" },
|
|
|
|
|
callback: function (r, options, success) {
|
|
|
|
|
if (success) {
|
|
|
|
|
if (_this.storeBodyList.getCount() > 0) {
|
|
|
|
|
_this.comboxCurr.setReadOnly(true);
|
|
|
|
|
_this.comboxCustCode.setReadOnly(true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
_this.comboxCurr.setReadOnly(false);
|
|
|
|
|
_this.comboxCustCode.setReadOnly(false);
|
|
|
|
|
_CUSTOMERNAME = "";
|
|
|
|
|
}
|
|
|
|
|
_this.formEdit.getForm().findField('CUSTOMERNAME').setValue(_CUSTOMERNAME);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeBodySum.load({ params: { condition: " BILLNO='" + Duino + "'" } });
|
|
|
|
|
//this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
|
|
|
|
|
this.storeAppDetailList.load({ params: { condition: " LINKGID='" + GID + "'" } });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
|
|
url: '/Account/Chfee_invoiceapplication/GetData',
|
|
|
|
|
params: {
|
|
|
|
|
handle: 'edit',
|
|
|
|
|
condition: " BILLNO='" + Duino + "'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (!result.Success) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: '提示',
|
|
|
|
|
msg: result.Message,
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var data = result.data;
|
|
|
|
|
_this.formEdit.getForm().findField('BILLSTATUS').setDisabled(false);
|
|
|
|
|
_this.formEdit.getForm().reset();
|
|
|
|
|
_this.formEdit.getForm().setValues(data);
|
|
|
|
|
_this.formEdit.getForm().findField('BILLSTATUS').setDisabled(true);
|
|
|
|
|
var editp = Ext.create('MsChInvoiceapplication', data);
|
|
|
|
|
|
|
|
|
|
this.editRecord.fields.each(function (field) {
|
|
|
|
|
if (field.persist) {
|
|
|
|
|
name = field.name;
|
|
|
|
|
if (name != 'id')
|
|
|
|
|
this.editRecord.set(name, editp.get(name));
|
|
|
|
|
}
|
|
|
|
|
}, this);
|
|
|
|
|
this.editRecord.commit();
|
|
|
|
|
|
|
|
|
|
_this.GetEditStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ImportRemarks: function () {
|
|
|
|
|