20241105 乐企开票修改

main
dengyu 3 weeks ago
parent 4b4d95158c
commit 0f03d6f536

@ -194,7 +194,7 @@ namespace DSWeb.Areas.Account.Controllers
}
}
head.PUSHMODE = "0";
var json = JsonConvert.Serialize(
new { Success = true, Message = "查询成功", data = head });

@ -1526,13 +1526,12 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
field = basicForm.findField('ISDELETE');
field.setValue('');
field = basicForm.findField('OPERATOR');
//field = basicForm.findField('OPERATOR');
//field.setValue(USERID);
field.setValue(USERID);
//field = basicForm.findField('OPERATORNAME');
//field.setValue(SHOWNAME);
field = basicForm.findField('OPERATORNAME');
field.setValue(SHOWNAME);
field = basicForm.findField('APPLICANT');
field.setValue('');
field = basicForm.findField('AMOUNT');
@ -1604,7 +1603,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
iconCls: 'btn-mail',
tooltip: '打开诺诺(瑞宏)平台中的发票详细信息并保存,小窗下方"获取发票"内有邮件转发pdf的选项已有流水号但开票状态不是开出成功或开出失败的发票可以通过这个按钮获取发票详细信息。',
handler: function (button, event) {
this.onNNReadInvClick();
this.onNNInvoiceSendMail();
},
scope: this
},
@ -3257,8 +3256,8 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
this.paneldetail = new Ext.Panel({
title: '发票明细',
layout: "border",
height: 220,
region: "north",
// height: 220,
region: "center",
items: [this.panelService, this.panelSum]
});
@ -3885,13 +3884,14 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
field = basicForm.findField('ISDELETE');
field.setValue('');
field = basicForm.findField('OPERATOR');
//field = basicForm.findField('OPERATOR');
//field.setValue(USERID);
field.setValue(USERID);
//field = basicForm.findField('OPERATORNAME');
field = basicForm.findField('OPERATORNAME');
//field.setValue(SHOWNAME);
field.setValue(SHOWNAME);
field = basicForm.findField('APPLICANT');
field.setValue('');
field = basicForm.findField('AMOUNT');
@ -6474,7 +6474,10 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
_this.LoadData('edit', condition);
} else {
var url = result.Data.INVOICEINFOURL.replace("http://", "").replace("https://", "").replace("https//", "");
DsOpenEditWin_FullUrl(url, "发票信息", 600, 800, 300, 300);
if (result.Data.INVOICESERIALNUM == result.Data.GID) {
DsOpenEditWin_FullUrl_http(url, "发票信息", 600, 800, 300, 300);
} else
DsOpenEditWin_FullUrl(url, "发票信息", 600, 800, 300, 300);
}
}
@ -6547,8 +6550,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
alert("未知错误");
}
} else {
var url = result.Data.INVOICEINFOURL.replace("http://", "").replace("https://", "").replace("https//", "");
DsOpenEditWin_FullUrl(url, "发票信息", 600, 800, 300, 300);
if (result.Data.INVITERFACE == "东胜乐企他用") {
DsOpenEditWin_FullUrl_http(pageurl.replace("http://", "").replace("https://", "").replace("https//", ""), "发票信息", 600, 800, 300, 300);
} else {
DsOpenEditWin_FullUrl(pageurl.replace("http://", "").replace("https://", "").replace("https//", ""), "发票信息", 600, 800, 300, 300);
}
}
}
@ -6562,6 +6568,156 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
scope: this
});
},
onNNInvoiceSendMail: function () {
var billno = this.formEdit.getForm().findField('BILLNO').getValue();
if (billno == '*' || billno == '') {
Ext.Msg.show({
title: '提示',
msg: '请先保存发票,然后才能进行其他操作!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
};
_this = this;
var mail= _this.formEdit.getForm().findField('PUSHEMAIL').getValue();
this.formDZInvShow = Ext.widget('form', {
frame: true,
title: '发票转发',
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [
{
fieldLabel: '转发邮箱', //'编号',
name: 'email',
labelWidth: 60,
enableKeyEvents: true
}
]
}
]//end root items
});
this.formDZInvShow.getForm().findField('email').setValue(mail);
this.winDZInvShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 400,
height: 150,
layout: 'border',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [this.formDZInvShow],
buttons: [{
text: Zi.LAN.asure,
minWidth: 70,
handler: function () {
// var remarkstr = formRemarkShow.getForm().findField('INVREMARK').getValue();
// var cgFILEROLE = Ext.getCmp('hjFILEROLEGet');
// var FILEROLE = cgFILEROLE.getValue();
var email = _this.formDZInvShow.getForm().findField('email').getValue();
Ext.Ajax.request({
waitMsg: Zi.LAN.addnumnow,
url: '/Account/Chfee_invoice_HangXin/NNSendMail_Djy',
params: {
BILLNO: billno,
email: email
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.Prompt,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
_this.winDZInvShow.close();
Ext.Ajax.request({
waitMsg: Zi.LAN.NowSelect,
url: '/Account/Chfee_invoice/GetData',
params: {
handle: 'edit',
condition: " BILLNO='" + billno + "'",
isapp: false
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.Prompt,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
}
} else {
Ext.MessageBox.alert(Zi.LAN.qqerror, response.responseText);
}
},
scope: this
});
}
} else {
Ext.MessageBox.alert(Zi.LAN.qqerror, response.responseText);
}
},
scope: this
});
}
}, {
text: Zi.LAN.close,
minWidth: 70,
handler: function () {
_this.winDZInvShow.close();
}
}]
});
_this.winDZInvShow.show();
},
onNNVoidInvClick: function () {
@ -6622,7 +6778,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
alert("未知错误");
}
} else {
DsOpenEditWin_FullUrl(result.Data.INVOICEPDFURL.replace("http://", "").replace("https://", "").replace("https//", ""), "发票信息", 600, 800, 300, 300);
var url = result.Data.INVOICEINFOURL.replace("http://", "").replace("https://", "").replace("https//", "");
if (result.Data.INVITERFACE == "东胜乐企他用") {
DsOpenEditWin_FullUrl_http(url, "发票信息", 600, 800, 300, 300);
} else
DsOpenEditWin_FullUrl(url, "发票信息", 600, 800, 300, 300);
}
}
@ -6695,8 +6855,10 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
}
} else {
var url = result.Data.INVOICEINFOURL.replace("http://", "").replace("https://", "").replace("https//", "");
DsOpenEditWin_FullUrl(url, "发票信息", 600, 800, 300, 300);
if (result.Data.INVITERFACE == "东胜乐企他用") {
DsOpenEditWin_FullUrl_http(url, "发票信息", 600, 800, 300, 300);
} else
DsOpenEditWin_FullUrl(url, "发票信息", 600, 800, 300, 300);
}
}
@ -6776,7 +6938,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
alert("未知错误");
}
} else {
DsOpenEditWin_FullUrl(pageurl.replace("http://", "").replace("https://", "").replace("https//", ""), "发票信息", 600, 800, 300, 300);
if (result.Data.INVITERFACE == "东胜乐企他用") {
DsOpenEditWin_FullUrl_http(pageurl.replace("http://", "").replace("https://", "").replace("https//", ""), "发票信息", 600, 800, 300, 300);
} else {
DsOpenEditWin_FullUrl(pageurl.replace("http://", "").replace("https://", "").replace("https//", ""), "发票信息", 600, 800, 300, 300);
}
}
}
@ -7533,11 +7699,6 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
});
return;
};
if (UsdExrate < 0) {
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: '折算汇率不能小于0!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var recs = DsStoreQueryBy(me.storeCurrExrate, 'CURR', bfcurr);
if (recs.getCount() > 0) {
@ -7830,6 +7991,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
}
var winAccess = new Shipping.FileUpload({});
winAccess.BillNo = BillNo;
winAccess.storeChfeeFile = this.storeChfeeFile;
winAccess.show();
}, onDelFileClick: function () {
//var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue();
@ -8009,6 +8171,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
var btn_Pdf = Ext.getCmp("btn_Pdf");
var btn_Void = Ext.getCmp("btn_Void");
var btn_Setred = Ext.getCmp("btn_Setred");
var btnEAddDetail = Ext.getCmp('btnadddetail');
var btnEDeleteDetail = Ext.getCmp('btndeldetail');
var btnEAddInvDetail = Ext.getCmp('btnAddInvdetail');
var btnEDeleteInvDetail = Ext.getCmp('btndelInvdetail');
var 全电发票 = (INVOICELINE == "bs" || INVOICELINE == "pc" || INVOICELINE == "es" || INVOICELINE == "ec");
@ -8023,6 +8190,10 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
}
else {
btn_KP.disable();
//btnEAddDetail.disable();
//btnEDeleteDetail.disable();
//btnEAddInvDetail.disable();
//btnEDeleteInvDetail.disable();
}
///2.如果流水号没有 不能点读取
@ -8041,6 +8212,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
else {
btn_Invinfo.enable();
btn_Pdf.enable();
btnEAddDetail.disable();
btnEDeleteDetail.disable();
btnEAddInvDetail.disable();
btnEDeleteInvDetail.disable();
}
///3.如果同时有了发票号和发票流水号 才能点冲红和作废

@ -29,13 +29,13 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
model: 'MsFeeOP',
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpIDRang' }
});
this.StoreLockOp.load({ params: { optype: "modInvLock"} });
this.StoreLockOp.load({ params: { optype: "modInvLock" } });
this.StoreUnLockOp = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsFeeOP',
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpIDRang' }
});
this.StoreUnLockOp.load({ params: { optype: "modInvUnLock"} });
this.StoreUnLockOp.load({ params: { optype: "modInvUnLock" } });
//#region 编辑form
@ -50,7 +50,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
proxy: { url: '/CommMng/BasicDataRef/GetCustomInvRefList' }
});
this.storeCustCode.load({ params: { condition: ""} });
this.storeCustCode.load({ params: { condition: "" } });
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '开票单位',
store: this.storeCustCode,
@ -106,7 +106,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
proxy: { url: '/CommMng/BasicDataRef/GetCustomInvRefList' }
});
this.storeInvCustCode.load({ params: { condition: ""} });
this.storeInvCustCode.load({ params: { condition: "" } });
this.comboxInvCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '代开客户',
@ -158,7 +158,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
model: 'MsFeeCurr',
proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' }
});
this.StoreCurr.load({ params: { condition: ""} });
this.StoreCurr.load({ params: { condition: "" } });
this.comboxCurr = Ext.create('DsExt.ux.RefTableCombox', {
@ -203,7 +203,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
model: 'DsExtEnumModel',
proxy: { url: '/CommMng/PubSys/GetEnumValueList' }
});
this.storeInvCategory.load({ params: { enumTypeId: 97008} });
this.storeInvCategory.load({ params: { enumTypeId: 97008 } });
this.comboxInvCategory = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '类型',
@ -218,7 +218,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
model: 'MsChInvoiceNo',
proxy: { url: '/Account/Chfee_invoice_HangXin/GetInvoiceNo' }
});
this.StoreInvNo.load({ params: { condition: ""} });
this.StoreInvNo.load({ params: { condition: "" } });
this.comboxInvNo = Ext.create('DsExt.ux.RefTableCombox', {
@ -248,256 +248,256 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: 'GID',
name: 'GID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'BILLSTATUS',
name: 'BILLSTATUS', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'VOUCHERNO',
name: 'VOUCHERNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'VOUNO',
name: 'VOUNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'APPLICANT',
name: 'APPLICANT', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'OPERATOR',
name: 'OPERATOR', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'COMPANYID',
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'INVOICETYPE',
value: '1',
name: 'INVOICETYPE', flex: 0, hidden: true, margins: '0'
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: 'GID',
name: 'GID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'BILLSTATUS',
name: 'BILLSTATUS', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'VOUCHERNO',
name: 'VOUCHERNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'VOUNO',
name: 'VOUNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'APPLICANT',
name: 'APPLICANT', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'OPERATOR',
name: 'OPERATOR', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'COMPANYID',
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'INVOICETYPE',
value: '1',
name: 'INVOICETYPE', flex: 0, hidden: true, margins: '0'
},
{
fieldLabel: '编号',
readOnly: true,
hidden: true,
flex: 2,
name: 'BILLNO'
},
{
fieldLabel: '发票类别',
readOnly: true,
flex: 2,
name: 'INVOICETYPEREF'
}, this.comboxInvNo, {
fieldLabel: '开票日期',
flex: 2,
readOnly: true,
name: 'INVOICEMAKETIME'
},
{
fieldLabel: '开票人',
flex: 2,
readOnly: true,
name: 'OPERATORNAME'
},
{
fieldLabel: '是否锁定',
flex: 1,
readOnly: true,
name: 'BILLSTATUSREF'
},
{
fieldLabel: '是否打印',
flex: 1,
readOnly: true,
name: 'ISNEEDPRINT'
},
{
fieldLabel: '是否结算',
flex: 1,
readOnly: true,
name: 'ISNEEDFEE'
},
{
fieldLabel: '是否作废',
flex: 1,
readOnly: true,
name: 'ISDELETE'
}
]
}
]//end items(fieldset 1)
}, //end fieldset 1
{
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
{
fieldLabel: '编号',
readOnly: true,
hidden: true,
flex: 2,
name: 'BILLNO'
},
{
fieldLabel: '发票类别',
readOnly: true,
flex: 2,
name: 'INVOICETYPEREF'
}, this.comboxInvNo, {
fieldLabel: '开票日期',
flex: 2,
readOnly: true,
name: 'INVOICEMAKETIME'
},
{
fieldLabel: '开票人',
flex: 2,
readOnly: true,
name: 'OPERATORNAME'
},
{
fieldLabel: '是否锁定',
flex: 1,
readOnly: true,
name: 'BILLSTATUSREF'
},
{
fieldLabel: '是否打印',
flex: 1,
readOnly: true,
name: 'ISNEEDPRINT'
},
{
fieldLabel: '是否结算',
flex: 1,
readOnly: true,
name: 'ISNEEDFEE'
},
{
fieldLabel: '是否作废',
flex: 1,
readOnly: true,
name: 'ISDELETE'
}
]
items: [{
xtype: 'container',
layout: 'anchor',
flex: 3,
defaultType: 'textfield',
items: [
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '发票抬头',
name: 'INVOICECUSTNAME'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '纳税人识别号',
name: 'CUSTRATENO'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '地址、电话',
name: 'CUSTADDRTEL'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '开户行及账号',
name: 'CUSTBANK'
}]
}
]
}, {
xtype: 'fieldset',
defaultType: 'textfield',
flex: 5,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxCurr, this.comboxInvCategory, this.comboxCustCode, this.comboxInvCustCode]
}, {
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: '实际金额',
labelWidth: 60,
name: 'AMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
fieldLabel: '开票金额',
name: 'INVAMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
fieldLabel: '开票税率',
name: 'EXCHANGERATE'
}, {
fieldLabel: '外币金额',
name: 'OTCURRAMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}]
}
, {
xtype: 'container',
layout: 'hbox',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
labelWidth: 60,
name: 'REMARK',
fieldLabel: '备注',
anchor: '100%'
}]
}
]
}
]//end items(fieldset 2)
}
]//end items(fieldset 1)
}, //end fieldset 1
{
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'anchor',
flex: 3,
defaultType: 'textfield',
items: [
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '发票抬头',
name: 'INVOICECUSTNAME'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '纳税人识别号',
name: 'CUSTRATENO'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '地址、电话',
name: 'CUSTADDRTEL'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '开户行及账号',
name: 'CUSTBANK'
}]
}
]
}, {
xtype: 'fieldset',
defaultType: 'textfield',
flex: 5,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxCurr, this.comboxInvCategory, this.comboxCustCode, this.comboxInvCustCode]
}, {
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: '实际金额',
labelWidth: 60,
name: 'AMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
fieldLabel: '开票金额',
name: 'INVAMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}, {
fieldLabel: '开票税率',
name: 'EXCHANGERATE'
}, {
fieldLabel: '外币金额',
name: 'OTCURRAMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
}]
}
, {
xtype: 'container',
layout: 'hbox',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
labelWidth: 60,
name: 'REMARK',
fieldLabel: '备注',
anchor: '100%'
}]
}
]
}
]//end items(fieldset 2)
}
]//end root items
@ -851,26 +851,26 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: '金额合计(大写)',
readOnly: true,
name: 'AMOUNTCAPITAL'
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}]
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '金额合计(大写)',
readOnly: true,
name: 'AMOUNTCAPITAL'
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}]
}); //end this.formEdit
@ -1542,7 +1542,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
proxy: { url: '/CommMng/BasicDataRef/GetCustomInvRefList' }
});
this.storeCustCodefee.load({ params: { condition: ""} });
this.storeCustCodefee.load({ params: { condition: "" } });
this.comboxAddCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '费用对象',
@ -1616,7 +1616,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
displayField: 'CodeAndName'
});
this.storeFeeNameRef.load({ params: { condition: ""} });
this.storeFeeNameRef.load({ params: { condition: "" } });
this.storeCurrExrate = Ext.create('Ext.data.Store', {
fields: ['CURR', 'EXRATE']
@ -1670,7 +1670,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
scope: this
}
]
]
}, {
xtype: 'container',
layout: 'hbox',
@ -1693,7 +1693,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
scope: this
}
]
]
}
]//end items(fieldset 1)
}//end fieldset 1
@ -1796,22 +1796,22 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
});
this.tabpanel = new Ext.TabPanel
({
activeTab: 0,
autoWidth: true,
border: false,
frame: false,
height: 220,
region: 'north',
id: "TabPanelID",
enableTabScroll: true,
split: true,
items:
[
this.panelInv,
this.panelBody
]
});
({
activeTab: 0,
autoWidth: true,
border: false,
frame: false,
height: 220,
region: 'north',
id: "TabPanelID",
enableTabScroll: true,
split: true,
items:
[
this.panelInv,
this.panelBody
]
});
Ext.apply(this, {
@ -1944,7 +1944,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
};
this.storeBodyList.load({ params: { condition: " BILLNO='" + billno + "'" },
this.storeBodyList.load({
params: { condition: " BILLNO='" + billno + "'" },
callback: function (r, options, success) {
if (success) {
if (this.storeBodyList.getCount() > 0) {
@ -1959,8 +1960,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
scope: this
});
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'"} });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'" } });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'" } });
}, // end LoadDate
@ -2025,7 +2026,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
}
if (type == '0') {
this.opStatus = 'edit';
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'" } });
} else if (type == '1') {
@ -2038,7 +2039,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
@ -2288,7 +2290,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
params: {
billno: BILLNO,
body: jsonBody,
GID:GID
GID: GID
},
callback: function (options, success, response) {
if (success) {
@ -2407,14 +2409,15 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
this.editRecord.commit();
}
this.opStatus = 'edit';
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'" } });
_this.addDetailfn();
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
@ -2454,7 +2457,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
return;
}
if (VOUCHERNO != '' && VOUCHERNO !=null) {
if (VOUCHERNO != '' && VOUCHERNO != null) {
Ext.Msg.show({ title: '提示', msg: '已生成接口凭证无法修改此发票,只能作废!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
@ -2552,11 +2555,12 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
var sql = this.BillSql;
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql} });
this.storeAddBodySum.load({ params: { condition: sql} });
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql } });
this.storeAddBodySum.load({ params: { condition: sql } });
_this.storeBodyList.load({ params: { condition: " BILLNO='" + billno + "'" },
_this.storeBodyList.load({
params: { condition: " BILLNO='" + billno + "'" },
callback: function (r, options, success) {
if (success) {
if (_this.storeBodyList.getCount() > 0) {
@ -2572,8 +2576,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
scope: this
});
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'"} });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'" } });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'" } });
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
@ -2704,9 +2708,10 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
} else {
var sql = this.BillSql;
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql} });
this.storeAddBodySum.load({ params: { condition: sql} });
_this.storeBodyList.load({ params: { condition: " BILLNO='" + billno + "'" },
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql } });
this.storeAddBodySum.load({ params: { condition: sql } });
_this.storeBodyList.load({
params: { condition: " BILLNO='" + billno + "'" },
callback: function (r, options, success) {
if (success) {
if (_this.storeBodyList.getCount() > 0) {
@ -2721,7 +2726,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
scope: this
});
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'"} });
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'" } });
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
@ -2788,7 +2793,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
var ISNEEDFEE = this.formEdit.getForm().findField('ISNEEDFEE').getValue();
var VOUCHERNO = this.formEdit.getForm().findField('VOUCHERNO').getValue();
var VOUNO = this.formEdit.getForm().findField('VOUNO').getValue();
if (VOUCHERNO != '') {
Ext.Msg.show({ title: '提示', msg: '已生成接口凭证无法删除此发票!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
@ -2827,9 +2832,10 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
} else {
var sql = this.BillSql;
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql} });
this.storeAddBodySum.load({ params: { condition: sql} });
_this.storeBodyList.load({ params: { condition: " BILLNO='" + billno + "'" },
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql } });
this.storeAddBodySum.load({ params: { condition: sql } });
_this.storeBodyList.load({
params: { condition: " BILLNO='" + billno + "'" },
callback: function (r, options, success) {
if (success) {
if (_this.storeBodyList.getCount() > 0) {
@ -2844,7 +2850,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
},
scope: this
});
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'"} });
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'" } });
if (ISNEEDPRINT == "true") {
@ -2949,11 +2955,12 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
var sql = this.BillSql;
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql} });
this.storeAddBodySum.load({ params: { condition: sql} });
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql } });
this.storeAddBodySum.load({ params: { condition: sql } });
_this.storeBodyList.load({ params: { condition: " BILLNO='" + billno + "'" },
_this.storeBodyList.load({
params: { condition: " BILLNO='" + billno + "'" },
callback: function (r, options, success) {
if (success) {
if (_this.storeBodyList.getCount() > 0) {
@ -2969,8 +2976,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
scope: this
});
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'"} });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'" } });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'" } });
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
@ -3039,7 +3046,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue();
var VOUCHERNO = this.formEdit.getForm().findField('VOUCHERNO').getValue();
var VOUNO = this.formEdit.getForm().findField('VOUNO').getValue();
if (Duino == '*') {
Ext.Msg.show({ title: '提示', msg: '请先保存,然后才能撤销锁定!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
@ -3080,11 +3087,12 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
var sql = this.BillSql;
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql} });
this.storeAddBodySum.load({ params: { condition: sql} });
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', condition: sql } });
this.storeAddBodySum.load({ params: { condition: sql } });
_this.storeBodyList.load({ params: { condition: " BILLNO='" + billno + "'" },
_this.storeBodyList.load({
params: { condition: " BILLNO='" + billno + "'" },
callback: function (r, options, success) {
if (success) {
if (_this.storeBodyList.getCount() > 0) {
@ -3100,8 +3108,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
scope: this
});
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'"} });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'"} });
this.storeBodySum.load({ params: { condition: " BILLNO='" + billno + "'" } });
this.storeDetailList.load({ params: { condition: " PID='" + GID + "'" } });
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
@ -3164,8 +3172,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
onRefreshClick: function (button, event) {
var sql = this.getCondition();
this.storeAddFeeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql} });
this.storeAddBodySum.load({ params: { condition: sql} });
this.storeAddFeeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql } });
this.storeAddBodySum.load({ params: { condition: sql } });
},
onClearSql: function () {
@ -3310,7 +3318,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
text: afcurr,
name: 'bfcurr2'
}
]
]
}, {
xtype: 'container',
layout: 'hbox',
@ -3360,7 +3368,7 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
text: bfcurr,
name: 'afcurr2'
}
]
]
}
]//end items(fieldset 1)
}//end fieldset 1
@ -3570,7 +3578,8 @@ Ext.extend(Shipping.MsChInvoiceEdit, Ext.Panel, {
} else {
this.StoreOpRange.load({ params: { optype: "modInvoiceManagement" },
this.StoreOpRange.load({
params: { optype: "modInvoiceManagement" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {

@ -147,15 +147,31 @@ function DsOpenEditWin_FullUrl(url, caption, height, width, top, left) {
return window.open("https://" + url, _caption, pageinfo);
}
/*
function DsOpenEditWin(url, caption) {
return window.open(url, caption, "height=650px, width=900px,center:yes,help:no,toolbar=no,menubar=no,scrollbars=no,resizable=0,location=no,status=no");
}
function DsOpenEditWin_FullUrl_http(url, caption, height, width, top, left) {
var pageinfo = "height=";
function DsOpenEditWin(url) {
return window.open(url, "添加提单", "height=600px, width=900px,center:yes,help:no,toolbar=no,menubar=no,scrollbars=no,resizable=0,location=no,status=no");
}*/
if (caption == undefined) { var _caption = "添加提单"; }
else { var _caption = caption; }
// //alert(height);
if (height == undefined || height == "") { pageinfo = pageinfo.concat("" + (window.screen.availHeight - 50) + ""); } //"650"
else { pageinfo = pageinfo.concat(height); }
pageinfo = pageinfo.concat("px, width=");
if (width == undefined || width == "") { pageinfo = pageinfo.concat("" + (window.screen.availWidth - 10) + ""); } //"900"
else { pageinfo = pageinfo.concat(width); }
pageinfo = pageinfo.concat("px, top=");
if (top == undefined || top == "") { pageinfo = pageinfo.concat("0"); }
else { pageinfo = pageinfo.concat(top); }
pageinfo = pageinfo.concat("px, left=");
if (left == undefined || left == "") { pageinfo = pageinfo.concat("0"); }
else { pageinfo = pageinfo.concat(left); }
pageinfo = pageinfo.concat("px,center:yes,resizable=yes,status=yes,menubar=no,scrollbars=yes");
pageinfo.concat(",location=no");
return window.open("http://" + url, _caption, pageinfo);
}
function DsOpenAtMain(url, caption, MainCenter) {
var finded = false;

Loading…
Cancel
Save