DS7_JingHan
hanxuntao 2 years ago
parent 0898444881
commit 51c1272ba7

@ -1127,8 +1127,8 @@ namespace DSWeb.Areas.Account.Controllers
string mblnotemp = ""; string mblnotemp = "";
var auditlist = new List<MsOpAuditDetail>(); var auditlist = new List<MsOpAuditDetail>();
var error = ""; var error = "";
var DrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "') AND FEETYPE=1 "); var DrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "' OR MASTERNO='" + pbsno + "') AND FEETYPE=1 ");
var CrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "') AND FEETYPE=2 "); var CrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "' OR MASTERNO='" + pbsno + "') AND FEETYPE=2 ");
if (DrChfeeList != null && DrChfeeList.Count != 0) if (DrChfeeList != null && DrChfeeList.Count != 0)
{ {
foreach (var fee in DrChfeeList) foreach (var fee in DrChfeeList)

@ -364,7 +364,7 @@ namespace DSWeb.Areas.Account.Controllers
result= modb.Save(headData); result= modb.Save(headData);
if (result.Success) { if (result.Success) {
ChinvoiceapplicationDAL.SaveAppDetail(headData, detailList); ChinvoiceapplicationDAL.SaveAppDetail(headData.GID, detailList);
} }
}; };
@ -432,7 +432,22 @@ namespace DSWeb.Areas.Account.Controllers
} }
public ContentResult AddDetail(string bill, string data, string curr, bool islist, string GID, bool custgroup = false, string duino = "") public ContentResult SaveAppDetail(string body)
{
var bodyList = JsonConvert.Deserialize<List<ChInvoiceapplicationDetail>>(body);
DBResult result = ChinvoiceapplicationDAL.SaveAppDetail(bodyList[0].LINKGID, bodyList);
var jsonRespose = new JsonResponse
{
Success = result.Success,
Message = result.Message
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult AddDetail(string bill, string data, string curr, bool islist, string GID, bool custgroup = false, string duino = "")
{ {
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{ {
@ -790,14 +805,17 @@ namespace DSWeb.Areas.Account.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
public ContentResult CreateInvList(string data, string storeCurrExrate) public ContentResult CreateInvList(string data,string alldata,string storeCurrExrate)
{ {
var bodyList = JsonConvert.Deserialize<List<ChInvoiceapplicationDetail>>(data); var bodyList = JsonConvert.Deserialize<List<ChInvoiceapplicationDetail>>(data);
var allbodyList = JsonConvert.Deserialize<List<ChInvoiceapplicationDetail>>(alldata);
var exrateList = JsonConvert.Deserialize<List<ChFeeExrate>>(storeCurrExrate); var exrateList = JsonConvert.Deserialize<List<ChFeeExrate>>(storeCurrExrate);
var headData = ChinvoiceapplicationDAL.GetData(" GID='" + bodyList[0].LINKGID + "'"); var headData = ChinvoiceapplicationDAL.GetData(" GID='" + bodyList[0].LINKGID + "'");
ChinvoiceapplicationDAL.SaveAppDetail(headData.GID, allbodyList);
decimal ttlinv = 0; decimal ttlinv = 0;
decimal ttlrmbinv = 0; decimal ttlrmbinv = 0;
decimal ttlusdinv = 0; decimal ttlusdinv = 0;
@ -860,7 +878,6 @@ namespace DSWeb.Areas.Account.Controllers
} }
ChinvoiceapplicationDAL.SaveAppDetail(headData, bodyList);
if ((exrateList == null) || (exrateList.Count == 0)) if ((exrateList == null) || (exrateList.Count == 0))

@ -4644,10 +4644,10 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL
} }
else else
{ {
_Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=2,BSSTATUS=1 WHERE BSNO=@BSNO"; _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=2,BSSTATUS=1 WHERE MASTERNO=@BSNO";
} }
} }
_feeComm = "update ch_fee set FEESTATUS=0 where FEESTATUS=2 AND BSNO=@BSNO"; _feeComm = "update ch_fee set FEESTATUS=0 where FEESTATUS=2 AND BSNO in (select bsno from v_op_bill where MASTERNO=@BSNO)";
} }
else else
{ {
@ -4680,11 +4680,11 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL
else else
{ {
if (SUBMITFEEBLFEELOCK == "1") if (SUBMITFEEBLFEELOCK == "1")
_Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE BSNO=@BSNO"; _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE MASTERNO=@BSNO";
else _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE BSNO=@BSNO"; else _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE MASTERNO=@BSNO";
} }
} }
_feeComm = "update ch_fee set FEESTATUS=2 where (FEESTATUS=1 or FEESTATUS=6 or FEESTATUS=7) AND BSNO=@BSNO"; _feeComm = "update ch_fee set FEESTATUS=2 where (FEESTATUS=1 or FEESTATUS=6 or FEESTATUS=7) AND BSNO in (select bsno from v_op_bs where MASTERNO=@BSNO)";
} }
var cmdupdate = db.GetSqlStringCommand(_Comm); var cmdupdate = db.GetSqlStringCommand(_Comm);

@ -468,7 +468,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
return headList; return headList;
} }
public static DBResult SaveAppDetail(ChInvoiceapplication headData, List<ChInvoiceapplicationDetail> bodyList) public static DBResult SaveAppDetail(string GID, List<ChInvoiceapplicationDetail> bodyList)
{ {
var result = new DBResult(); var result = new DBResult();
@ -505,7 +505,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
cmdInsert.Parameters.Clear(); cmdInsert.Parameters.Clear();
db.AddInParameter(cmdInsert, "@GID", DbType.String, Guid.NewGuid().ToString()); db.AddInParameter(cmdInsert, "@GID", DbType.String, Guid.NewGuid().ToString());
db.AddInParameter(cmdInsert, "@BILLSTATUS", DbType.String,"未开"); db.AddInParameter(cmdInsert, "@BILLSTATUS", DbType.String,"未开");
db.AddInParameter(cmdInsert, "@LINKGID", DbType.String, headData.GID); db.AddInParameter(cmdInsert, "@LINKGID", DbType.String, GID);
db.AddInParameter(cmdInsert, "@CUSTOMERNAME", DbType.String, enumValue.CUSTOMERNAME); db.AddInParameter(cmdInsert, "@CUSTOMERNAME", DbType.String, enumValue.CUSTOMERNAME);
db.AddInParameter(cmdInsert, "@INVOICECUSTNAME", DbType.String, enumValue.INVOICECUSTNAME); db.AddInParameter(cmdInsert, "@INVOICECUSTNAME", DbType.String, enumValue.INVOICECUSTNAME);
db.AddInParameter(cmdInsert, "@AMOUNT", DbType.String, enumValue.AMOUNT); db.AddInParameter(cmdInsert, "@AMOUNT", DbType.String, enumValue.AMOUNT);
@ -4700,7 +4700,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication
} }
ChinvoiceapplicationDAL.SaveAppDetail(headData, dataList); ChinvoiceapplicationDAL.SaveAppDetail(headData.GID, dataList);
return 0; return 0;
} }

@ -497,6 +497,8 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
} }
}], }],
scope: this scope: this
}, {
xtype: "label", id: "bstextall", text: ""
} }
], ],
columns: this.girdBLcolums columns: this.girdBLcolums
@ -2381,6 +2383,9 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
] ]
}); });
this.panelFee = new Ext.Panel({ this.panelFee = new Ext.Panel({
// title: '费用信息', // title: '费用信息',
// layout: "border", // layout: "border",
@ -2389,7 +2394,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
// height: 560, // height: 560,
region: 'east', region: 'east',
split:true, split:true,
width:850, width:700,
items: [ items: [
this.gridBLChFee, this.gridListAmendSum,this.panelBLList this.gridBLChFee, this.gridListAmendSum,this.panelBLList
] ]
@ -2496,6 +2501,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
_thisblaudit.storeBLChFee.removeAll(); _thisblaudit.storeBLChFee.removeAll();
_thisblaudit.storeBodySum.removeAll(); _thisblaudit.storeBodySum.removeAll();
_thisblaudit.storeAmendSum.removeAll(); _thisblaudit.storeAmendSum.removeAll();
Ext.getCmp("bstextall").setText('');
} else { } else {
if (selections.length == 1) { if (selections.length == 1) {
var record = selections[0]; var record = selections[0];
@ -2512,7 +2518,14 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
_thisblaudit.FeeStatus = record.data.FEESTATUS; _thisblaudit.FeeStatus = record.data.FEESTATUS;
_thisblaudit.storeAuditDetailList.load({ params: { condition: "BSNO='" + bsno + "'" } }); _thisblaudit.storeAuditDetailList.load({ params: { condition: "BSNO='" + bsno + "'" } });
_thisblaudit.storeBLChFee.load({ params: { bsno: _thisblaudit.strMBSNO, SLNO, SLNO, bltype: bltype, optype: _thisblaudit.strOPTYPE } }); _thisblaudit.storeBLChFee.load({ params: { bsno: _thisblaudit.strMBSNO, SLNO, SLNO, bltype: bltype, optype: _thisblaudit.strOPTYPE } });
var bstextall = "";
bstextall = bstextall + '集装箱:' + record.data.CNTRTOTAL;
bstextall = bstextall + ' 场站:' + record.data.YARD;
bstextall = bstextall + ' 船公司:' + record.data.CARRIER;
Ext.getCmp("bstextall").setText(bstextall);
//_thisblaudit.formHead.getForm().reset();
//_thisblaudit.formHead.getForm().setValues(record.data);
if (OPTYPE == '更改单') { if (OPTYPE == '更改单') {
_thisblaudit.panelBLList.setHeight(50); _thisblaudit.panelBLList.setHeight(50);
_thisblaudit.gridListAmendSum.setVisible(true); _thisblaudit.gridListAmendSum.setVisible(true);

@ -934,8 +934,200 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
clicksToEdit: 1 clicksToEdit: 1
}); });
this.initgirddetailcolumn = [{
sortable: true,
dataIndex: 'GID',
header: 'GID',
hidden: true,
width: 100
}, {
sortable: true,
dataIndex: 'PID',
header: 'PID',
hidden: true,
width: 100
}, {
sortable: true,
dataIndex: 'SERIALNO',
header: 'SERIALNO',
hidden: true,
width: 100
}, {
sortable: false,
dataIndex: 'GOODSNAME',
header: '货物或应税劳务名称',
editor: this.comboxCodeGoodInv,
renderer: function (value, p, record) {
return record.data.GOODSNAMEREF;
},
summaryType: 'count',
width: 120
}, {
sortable: false,
dataIndex: 'SPEC',
header: '规格型号',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 100
}, {
sortable: false,
dataIndex: 'UNIT',
header: '单位',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 100
}, {
sortable: false,
dataIndex: 'PKGS',
header: '数量',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
width: 80
}, {
sortable: false,
dataIndex: 'TAXPRICE',
header: '含税单价',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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;
},
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
width: 80
}, {
sortable: false,
dataIndex: 'PRICE',
header: '单价',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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;
},
width: 80
}, {
sortable: false,
dataIndex: 'AMOUNT',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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;
},
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
header: '金额',
width: 80
}, {
sortable: false,
dataIndex: 'TAXRATE',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
header: '税率',
width: 80
}, {
sortable: false,
dataIndex: 'TAX',
header: '税额',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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;
},
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
width: 80
}
];
this.girddetailcolumn = this.initgirddetailcolumn;
this.gridDetailList = new Ext.grid.GridPanel({ this.gridDetailList = new Ext.grid.GridPanel({
store: this.storeDetailList, store: this.storeDetailList,
enableHdMenu: false, enableHdMenu: false,
@ -971,203 +1163,27 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.onDelInvDetailClick(); this.onDelInvDetailClick();
}, },
scope: this scope: this
}], }, '-', {
columns: [{ text: "保存列表样式",
sortable: true, menu: [
dataIndex: 'GID', {
header: 'GID', text: "保存",
hidden: true, handler: function (button, event) {
width: 100 this.girddetailcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'detail', _this.gridAppDetailList.columns, _this.girddetailcolumn, 1, true);
}, {
sortable: true,
dataIndex: 'PID',
header: 'PID',
hidden: true,
width: 100
}, {
sortable: true,
dataIndex: 'SERIALNO',
header: 'SERIALNO',
hidden: true,
width: 100
}, {
sortable: false,
dataIndex: 'GOODSNAME',
header: '货物或应税劳务名称',
editor: this.comboxCodeGoodInv,
renderer: function (value, p, record) {
return record.data.GOODSNAMEREF;
},
summaryType: 'count',
width: 120
}, {
sortable: false,
dataIndex: 'SPEC',
header: '规格型号',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 100
}, {
sortable: false,
dataIndex: 'UNIT',
header: '单位',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 100
}, {
sortable: false,
dataIndex: 'PKGS',
header: '数量',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
width: 80
}, {
sortable: false,
dataIndex: 'TAXPRICE',
header: '含税单价',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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;
},
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
width: 80
}, {
sortable: false,
dataIndex: 'PRICE',
header: '单价',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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;
},
width: 80
}, {
sortable: false,
dataIndex: 'AMOUNT',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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 { text: "初始化",
return value; handler: function (menu, event) {
} _this.girddetailcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'detail', _this.gridAppDetailList.columns, _this.initgirddetailcolumn, 1, true);
}
catch (e) {
return value;
}
return value;
},
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
header: '金额',
width: 80
}, {
sortable: false,
dataIndex: 'TAXRATE',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
header: '税率',
width: 80
}, {
sortable: false,
dataIndex: 'TAX',
header: '税额',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
},
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 { scope: this
return value; }],
} columns: this.girddetailcolumn
}
catch (e) {
return value;
}
return value;
},
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
width: 80
}
]
}); });
this.girddetailcolumn = DsTruck.GetGridPanel(USERID, this.formname + 'detail', this.girddetailcolumn, 1); //使用者id表名中间column数组跳过一开始的几列
this.gridAppDetailList.reconfigure(this.storeDetailList, this.girddetailcolumn);
this.gridDetailList.on('edit', function (editor, e, eOpts) { this.gridDetailList.on('edit', function (editor, e, eOpts) {

@ -21,6 +21,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.formname = "ChInvoiceapplicationAdd" this.formname = "ChInvoiceapplicationAdd"
this.billno = ''; this.billno = '';
this.sqlcontext = ''; this.sqlcontext = '';
this.GID = '';
_this = this; _this = this;
this.ParentWin = window.parent.opener; this.ParentWin = window.parent.opener;
Ext.Ajax.timeout = 1200000; Ext.Ajax.timeout = 1200000;
@ -886,6 +887,111 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
clicksToEdit: 1 clicksToEdit: 1
}); });
this.initappgirdcolumn = [{
sortable: true,
dataIndex: 'GID',
header: 'GID',
hidden: true,
width: 100
}, {
sortable: true,
dataIndex: 'LINKGID',
header: 'LINKGID',
hidden: true,
width: 100
}, {
sortable: true,
dataIndex: 'BILLSTATUS',
header: '开票状态', //'币别',
width: 80
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '发票币别', //'币别',
editor: this.comboxCurr3,
width: 100
}, {
sortable: true,
dataIndex: 'AMOUNT',
header: '开票金额', //'单价',
editor: {
xtype: 'numberfield',
keyNavEnabled: false,
selectOnFocus: true,
hideTrigger: true,
mouseWheelEnabled: false,
enableKeyEvents: true
},
align: 'right',
width: 80
}, {
sortable: false,
dataIndex: 'INVOICECUSTNAME',
header: '发票抬头',
editor: this.comboxINVOICECUSTNAME2,
width: 180
}, {
sortable: false,
dataIndex: 'INVOICELINE',
header: '发票种类',
editor: this.comboxINVOICELINE,
renderer: function (value, p, record) {
return record.data.INVOICELINEREF;
},
width: 80
}, {
sortable: false,
dataIndex: 'REMARK',
header: '发票备注',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 160
}, {
sortable: false,
dataIndex: 'CUSTRATENO',
header: '纳税人识别号',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 180
}, {
sortable: false,
dataIndex: 'CUSTTEL',
header: '电话',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 150
}, {
sortable: false,
dataIndex: 'CUSTADDR',
header: '地址',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 180
}, {
sortable: false,
dataIndex: 'CUSTBANK',
header: '银行',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 180
}
];
this.appgirdcolumn = this.initappgirdcolumn;
this.gridAppDetailList = new Ext.grid.GridPanel({ this.gridAppDetailList = new Ext.grid.GridPanel({
store: this.storeAppDetailList, store: this.storeAppDetailList,
@ -923,114 +1029,28 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.onDelInvAppDetailClick(); this.onDelInvAppDetailClick();
}, },
scope: this scope: this
}], }, '-', {
columns: [{ text: "保存列表样式",
sortable: true, menu: [
dataIndex: 'GID', {
header: 'GID', text: "保存",
hidden: true, handler: function (button, event) {
width: 100 this.appgirdcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppDetailList.columns, _this.appgirdcolumn, 1, true);
}, { }
sortable: true, }, {
dataIndex: 'LINKGID', text: "初始化",
header: 'LINKGID', handler: function (menu, event) {
hidden: true, _this.appgirdcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppDetailList.columns, _this.initappgirdcolumn, 1, true);
width: 100 }
}, { }],
sortable: true, scope: this
dataIndex: 'BILLSTATUS', }],
header: '开票状态', //'币别', columns: this.appgirdcolumn
width: 80
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '发票币别', //'币别',
editor: this.comboxCurr3,
width: 100
}, {
sortable: true,
dataIndex: 'AMOUNT',
header: '开票金额', //'单价',
editor: {
xtype: 'numberfield',
keyNavEnabled: false,
selectOnFocus: true,
hideTrigger: true,
mouseWheelEnabled: false,
enableKeyEvents: true
},
align: 'right',
width: 80
}, {
sortable: false,
dataIndex: 'INVOICECUSTNAME',
header: '发票抬头',
editor: this.comboxINVOICECUSTNAME2,
width: 180
}, {
sortable: false,
dataIndex: 'INVOICELINE',
header: '发票种类',
editor: this.comboxINVOICELINE,
renderer: function (value, p, record) {
return record.data.INVOICELINEREF;
},
width: 80
}, {
sortable: false,
dataIndex: 'REMARK',
header: '发票备注',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 160
}, {
sortable: false,
dataIndex: 'CUSTRATENO',
header: '纳税人识别号',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 180
}, {
sortable: false,
dataIndex: 'CUSTTEL',
header: '电话',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 150
}, {
sortable: false,
dataIndex: 'CUSTADDR',
header: '地址',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 180
}, {
sortable: false,
dataIndex: 'CUSTBANK',
header: '银行',
editor: {
xtype: 'textfield',
allowBlank: false,
selectOnFocus: true
},
width: 180
}
]
}); });
this.appgirdcolumn = DsTruck.GetGridPanel(USERID, this.formname+'app', this.appgirdcolumn, 1); //使用者id表名中间column数组跳过一开始的几列
this.appgirdcolumn.unshift(new Ext.grid.RowNumberer());
this.gridAppDetailList.reconfigure(this.storeAppDetailList, this.appgirdcolumn);
this.gridAppDetailList.on('edit', function (editor, e, eOpts) { this.gridAppDetailList.on('edit', function (editor, e, eOpts) {
@ -1097,13 +1117,13 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.gridList.getSelectionModel().on('select', function (model, record, index) { this.gridList.getSelectionModel().on('select', function (model, record, index) {
this.billno = record.data.BILLNO; this.billno = record.data.BILLNO;
var GID = record.data.GID; this.GID = record.data.GID;
var sql = ""; var sql = "";
sql = " BILLNO='" + this.billno + "'"; sql = " BILLNO='" + this.billno + "'";
_this.storeBodyListdetail.load({ params: { condition: sql} }); _this.storeBodyListdetail.load({ params: { condition: sql} });
_this.storeBodySum.load({ params: { condition: sql} }); _this.storeBodySum.load({ params: { condition: sql} });
_this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: _this.billno} }); _this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: _this.billno} });
this.storeAppDetailList.load({ params: { condition: " LINKGID='" + GID + "'" } }); this.storeAppDetailList.load({ params: { condition: " LINKGID='" + _this.GID + "'" } });
}, this); }, this);
@ -1190,12 +1210,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
} }
_this = this; _this = this;
//var bodydatas2 = [];
//for (var i = 0; i < this.storeAppDetailList.getCount(); i += 1) {
// var member = this.storeAppDetailList.getAt(i);
// bodydatas2.push(member);
//}
//var jsonBody2 = ConvertRecordsToJsonAll(bodydatas2);
@ -1207,16 +1222,21 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
} }
var jsonBody2 = ConvertRecordsToJsonAll(bodyDatas2); var jsonBody2 = ConvertRecordsToJsonAll(bodyDatas2);
var allbodydatas = [];
for (var i = 0; i < this.storeAppDetailList.getCount(); i += 1) {
var member = this.storeAppDetailList.getAt(i);
allbodydatas.push(member);
}
var alljsonBody = ConvertRecordsToJsonAll(allbodydatas);
var bodydatas = []; var bodydatas = [];
for (var i = 0; i < this.storeCurrExrate.getCount(); i += 1) { for (var i = 0; i < this.storeCurrExrate.getCount(); i += 1) {
var member = this.storeCurrExrate.getAt(i); var member = this.storeCurrExrate.getAt(i);
if (member.data.EXRATE == 0) { //if (member.data.EXRATE == 0) {
_this.ExrateConversion(member.CURR, billcurr, 'bill', 0); // _this.ExrateConversion(member.CURR, billcurr, 'bill', 0);
return; // return;
} //}
bodydatas.push(member); bodydatas.push(member);
} }
var currBody = ConvertRecordsToJsonAll(bodydatas); var currBody = ConvertRecordsToJsonAll(bodydatas);
@ -1231,6 +1251,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
url: '/Account/Chfee_invoiceapplication/CreateInvList', url: '/Account/Chfee_invoiceapplication/CreateInvList',
params: { params: {
data: jsonBody2, data: jsonBody2,
alldata: alljsonBody,
storeCurrExrate: currBody storeCurrExrate: currBody
}, },
@ -1577,7 +1598,12 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
onDelInvAppDetailClick: function () { onDelInvAppDetailClick: function () {
var selectedRecords = this.GridAppDetailCheckBoxModel.selected.items; var selectedRecords = this.GridAppDetailCheckBoxModel.selected.items;
var GID = this.formEdit.getForm().findField('GID').getValue(); var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择需开出的发票申请!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var GID = selections[0].data.GID;
Ext.MessageBox.confirm('提示', '确定要删除选中的明细吗?', function (btn) { Ext.MessageBox.confirm('提示', '确定要删除选中的明细吗?', function (btn) {
if (btn == 'yes') { if (btn == 'yes') {

@ -41,6 +41,7 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
this.bsCust = getUrlParam('bsCust'); this.bsCust = getUrlParam('bsCust');
this.isfeename = getUrlParam('isfeename'); this.isfeename = getUrlParam('isfeename');
this.salecorp = getUrlParam('salecorp'); this.salecorp = getUrlParam('salecorp');
this.bsduino = getUrlParam('bsduino');
this.INVOICEPORT = ""; this.INVOICEPORT = "";
this.INVAPPPRINTAFTERAUDIT = 0; this.INVAPPPRINTAFTERAUDIT = 0;
@ -3046,6 +3047,9 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
var ret = this.ParentWin.OprationSwap(); var ret = this.ParentWin.OprationSwap();
bsnos = ret[4]; bsnos = ret[4];
currsql = ret[5]; currsql = ret[5];
} else if (this.ParentWin && this.bsnosql == 'recapp') {
bsnos = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + this.bsduino+ "') ";
currsql = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + this.bsduino+ "') ";
} }
this.comboxCustCode.allowBlank = true; this.comboxCustCode.allowBlank = true;
@ -3053,7 +3057,8 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
var condition = ''; var condition = '';
if (this.bsduino != undefined)
this.formSearch.getForm().findField('DuiNo').setValue(this.bsduino);
var sql = this.getCondition(); var sql = this.getCondition();
this.sqlcontext = sql + ' and ' + bsnos; this.sqlcontext = sql + ' and ' + bsnos;
if (currsql != '') if (currsql != '')
@ -6287,8 +6292,8 @@ setSaveBtnStatus: function (enable) {
var btnEAddDetail = Ext.getCmp('btnadddetail'); var btnEAddDetail = Ext.getCmp('btnadddetail');
var btnEDeleteDetail = Ext.getCmp('btndeldetail'); var btnEDeleteDetail = Ext.getCmp('btndeldetail');
var btnEAddbill = Ext.getCmp('btnaddbill'); var btnEAddbill = Ext.getCmp('btnaddbill');
var btnEAddInvDetail = Ext.getCmp('btnAddInvdetail'); //var btnEAddInvDetail = Ext.getCmp('btnAddInvdetail');
var btnEDeleteInvDetail = Ext.getCmp('btndelInvdetail'); //var btnEDeleteInvDetail = Ext.getCmp('btndelInvdetail');
var btnEAddAppInvDetail = Ext.getCmp('btnAddAppInvdetail'); var btnEAddAppInvDetail = Ext.getCmp('btnAddAppInvdetail');
var btnEDeleteAppInvDetail = Ext.getCmp('btndelAppInvdetail'); var btnEDeleteAppInvDetail = Ext.getCmp('btndelAppInvdetail');
@ -6303,8 +6308,8 @@ setSaveBtnStatus: function (enable) {
btnEAddDetail.enable(); btnEAddDetail.enable();
btnEDeleteDetail.enable(); btnEDeleteDetail.enable();
btnEAddbill.enable(); btnEAddbill.enable();
btnEAddInvDetail.enable(); //btnEAddInvDetail.enable();
btnEDeleteInvDetail.enable(); //btnEDeleteInvDetail.enable();
btnEAddAppInvDetail.enable(); btnEAddAppInvDetail.enable();
btnEDeleteAppInvDetail.enable(); btnEDeleteAppInvDetail.enable();
} else { } else {
@ -6314,8 +6319,8 @@ setSaveBtnStatus: function (enable) {
btnEAddDetail.disable(); btnEAddDetail.disable();
btnEDeleteDetail.disable(); btnEDeleteDetail.disable();
btnEAddbill.disable(); btnEAddbill.disable();
btnEAddInvDetail.disable(); //btnEAddInvDetail.disable();
btnEDeleteInvDetail.disable(); //btnEDeleteInvDetail.disable();
btnEAddAppInvDetail.disable(); btnEAddAppInvDetail.disable();
btnEDeleteAppInvDetail.disable(); btnEDeleteAppInvDetail.disable();

@ -60,32 +60,32 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
}); });
// this.StoreUnLockOp.load({ params: { optype: "modPayFeeSettlementUnLock"} }); // this.StoreUnLockOp.load({ params: { optype: "modPayFeeSettlementUnLock"} });
this.storecustbank = Ext.create('DsExt.ux.RefTableStore', { //this.storecustbank = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsInfoClientBankModel', // model: 'MsInfoClientBankModel',
proxy: { url: '/MvcShipping/MsInfoClient/GetBankList' } // proxy: { url: '/MvcShipping/MsInfoClient/GetBankList' }
}); //});
this.comboxCustBank = Ext.create('DsExt.ux.RefTableCombox', { //this.comboxCustBank = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CustomerBank , // fieldLabel: Zi.LAN.CustomerBank ,
store: this.storecustbank, // store: this.storecustbank,
forceSelection: true, // forceSelection: true,
labelWidth: 70, // labelWidth: 70,
name: 'CUSTBANK', // name: 'CUSTBANK',
valueField: 'GID', // valueField: 'GID',
displayField: 'ACCOUNTNAMEREF', // displayField: 'ACCOUNTNAMEREF',
listeners: { // listeners: {
scope: this, // scope: this,
'select': function (combo, records, eOpts) { // 'select': function (combo, records, eOpts) {
if (records.length > 0) { // if (records.length > 0) {
var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT'); // var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT');
CUSTACCOUNT.setValue(records[0].data.ACCOUNT); // CUSTACCOUNT.setValue(records[0].data.ACCOUNT);
} // }
} // }
} // }
}); //});
//#region 编辑form //#region 编辑form
@ -154,8 +154,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
store: this.StoreCurr, store: this.StoreCurr,
forceSelection: true, forceSelection: true,
emptyText:'原币结算', //原币申请 emptyText:'原币结算', //原币申请
labelWidth: 60, //labelWidth: 60,
flex: 0.5, //flex: 0.5,
name: 'CURR', name: 'CURR',
valueField: 'CURR', valueField: 'CURR',
displayField: 'CURR', displayField: 'CURR',
@ -228,8 +228,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
this.StoreBANK.load({ params: { condition: "CURRENCY='RMB'"} }); this.StoreBANK.load({ params: { condition: "CURRENCY='RMB'"} });
this.StoreBANK.on('beforeload', function (store) { this.StoreBANK.on('beforeload', function (store) {
var companyid = this.formEdit.getForm().findField('SALECORPID').getValue(); //var companyid = this.formEdit.getForm().findField('SALECORPID').getValue();
Ext.apply(store.proxy.extraParams, { companyid: companyid }); Ext.apply(store.proxy.extraParams, { companyid: '' });
}, this); }, this);
this.comboxBANK = Ext.create('DsExt.ux.RefTableCombox', { this.comboxBANK = Ext.create('DsExt.ux.RefTableCombox', {
@ -250,8 +250,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
this.StoreBANKUSD.load({ params: { condition: "CURRENCY='USD'" } }); this.StoreBANKUSD.load({ params: { condition: "CURRENCY='USD'" } });
this.StoreBANKUSD.on('beforeload', function (store) { this.StoreBANKUSD.on('beforeload', function (store) {
var companyid = this.formEdit.getForm().findField('SALECORPID').getValue(); // var companyid = this.formEdit.getForm().findField('SALECORPID').getValue();
Ext.apply(store.proxy.extraParams, { companyid: companyid }); Ext.apply(store.proxy.extraParams, { companyid: '' });
}, this); }, this);
this.comboxBANKUSD = Ext.create('DsExt.ux.RefTableCombox', { this.comboxBANKUSD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: 'USD银行账号', fieldLabel: 'USD银行账号',
@ -310,7 +310,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
store: this.storeBILLTYPE, store: this.storeBILLTYPE,
valueField: 'FSTATUS', valueField: 'FSTATUS',
displayField: 'NAME', displayField: 'NAME',
flex: 0.5, //flex: 0.5,
labelWidth: 70, labelWidth: 70,
// flex: 0.7, // flex: 0.7,
// labelWidth: 55, // labelWidth: 55,
@ -423,7 +423,11 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
// flex: 0.5, // flex: 0.5,
readOnly: true, readOnly: true,
name: 'BILLSTATUSREF' name: 'BILLSTATUSREF'
}, this.comboxCustCode, { }, {
fieldLabel: Zi.LAN.SettlementNo,
flex: 1,
name: 'SETTLENO'
}, this.comboxCustCode, {
fieldLabel: Zi.LAN.SettlementTime, fieldLabel: Zi.LAN.SettlementTime,
format: 'Y-m-d H:i:s', format: 'Y-m-d H:i:s',
xtype: 'datefield', xtype: 'datefield',
@ -489,24 +493,6 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
} }
}, this.comboxBANKUSD] }, this.comboxBANKUSD]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxCustBank, {
fieldLabel:Zi.LAN.CustomerAccount,
flex: 1,
name: 'CUSTACCOUNT'
}, this.comboxSTLCATEGROY,this.comboxSaleCompany, {
fieldLabel: Zi.LAN.Remark,
flex: 1,
name: 'REMARK'
}, {
fieldLabel: Zi.LAN.SettlementNo,
flex: 1,
name: 'SETTLENO'
}]
} }
]//end items(fieldset 1) ]//end items(fieldset 1)
}//end fieldset 1 }//end fieldset 1
@ -1724,21 +1710,20 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
} }
} }
} }
}, { }, {
fieldLabel: Zi.LAN.Port, fieldLabel: Zi.LAN.Number,
//format: 'Y-m-d', tooltip: Zi.LAN.DelegateNumber + '、' + Zi.LAN.LadingNumber + '、' + Zi.LAN.FenladingNumber,
labelWidth: 90, name: 'BH',
xtype: 'textfield', labelWidth: 40,
name: 'PORT', enableKeyEvents: true,
enableKeyEvents: true, listeners: {
listeners: { specialkey: function (field, e) {
specialkey: function (field, e) { if (e.getKey() == e.ENTER) {
if (e.getKey() == e.ENTER) { _this.onRefreshClick();
_this.onRefreshClick(); }
} }
} }
} }, this.comboxCurr2, {
}, this.comboxIsDebit, {
xtype: 'button', xtype: 'button',
width: 45, width: 45,
text: "", text: "",
@ -1766,36 +1751,17 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
}, },
scope: this scope: this
} }, {
] xtype: 'button',
}, width: 90,
{ text: Zi.LAN.SearchOrRefresh,
xtype: 'container', iconCls: "btnrefresh",
layout: 'hbox', handler: function (button, event) {
defaultType: 'textfield', this.onRefreshClick();
items: [{ },
fieldLabel: Zi.LAN.Number, scope: this
tooltip: Zi.LAN.DelegateNumber + '、' + Zi.LAN.LadingNumber + '、' + Zi.LAN.FenladingNumber,
name: 'BH',
labelWidth: 40,
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
} }
}, this.comboxCurr2, this.comboxSALECORPID, this.comboxStlMode2, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }, { ]
xtype: 'button',
width: 90,
text: Zi.LAN.SearchOrRefresh,
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick();
},
scope: this
}]
} }
]//end items(fieldset 1) ]//end items(fieldset 1)
}//end fieldset 1 }//end fieldset 1
@ -3527,7 +3493,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
this.panelTop = new Ext.Panel({ this.panelTop = new Ext.Panel({
layout: "border", layout: "border",
region: "north", region: "north",
height: 145, height: 115,
items: [this.panelBtn, this.formEdit] items: [this.panelBtn, this.formEdit]
}); });
this.panelBody = new Ext.Panel({ this.panelBody = new Ext.Panel({
@ -4259,11 +4225,11 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
var CUSTOMERNAME = this.formEdit.getForm().findField('CUSTOMERNAME').getValue(); var CUSTOMERNAME = this.formEdit.getForm().findField('CUSTOMERNAME').getValue();
var CURR = this.formEdit.getForm().findField('CURR').getValue(); var CURR = this.formEdit.getForm().findField('CURR').getValue();
var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK').getValue(); //var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK').getValue();
var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT').getValue(); //var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT').getValue();
var PARAMVALUE = this.formSearch.getForm().findField('PARAMVALUE').getValue(); var PARAMVALUE = this.formSearch.getForm().findField('PARAMVALUE').getValue();
var BILLNO = this.formEdit.getForm().findField('BILLNO').getValue(); var BILLNO = this.formEdit.getForm().findField('BILLNO').getValue();
var SALECORPID = this.formEdit.getForm().findField('SALECORPID').getValue(); //var SALECORPID = this.formEdit.getForm().findField('SALECORPID').getValue();
if (addcurr == '') { if (addcurr == '') {
if ((CURR == '') || (CURR == null)) { if ((CURR == '') || (CURR == null)) {
@ -4309,12 +4275,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
// else if (rec.data.USDBALAMOUNT != 0) this.formEdit.getForm().findField('CURR').setValue('USD'); // else if (rec.data.USDBALAMOUNT != 0) this.formEdit.getForm().findField('CURR').setValue('USD');
//} //}
} }
if ((CUSTBANK == '') || (CUSTBANK == null)) //if ((CUSTBANK == '') || (CUSTBANK == null))
this.formEdit.getForm().findField('CUSTBANK').setValue(addcustbank); // this.formEdit.getForm().findField('CUSTBANK').setValue(addcustbank);
if ((CUSTACCOUNT == '') || (CUSTACCOUNT == null)) //if ((CUSTACCOUNT == '') || (CUSTACCOUNT == null))
this.formEdit.getForm().findField('CUSTACCOUNT').setValue(addcustaccount); // this.formEdit.getForm().findField('CUSTACCOUNT').setValue(addcustaccount);
if ((SALECORPID == '') || (SALECORPID == null)) //if ((SALECORPID == '') || (SALECORPID == null))
this.formEdit.getForm().findField('SALECORPID').setValue(addsalecorpid); // this.formEdit.getForm().findField('SALECORPID').setValue(addsalecorpid);
if (PARAMVALUE == '1') { if (PARAMVALUE == '1') {
if (BILLNO == '*' || BILLNO == '') { if (BILLNO == '*' || BILLNO == '') {
var addbillno = rec.data.BILLNO; var addbillno = rec.data.BILLNO;
@ -4326,7 +4292,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
} }
var CUST = this.formEdit.getForm().findField('CUSTOMERNAME').getValue(); var CUST = this.formEdit.getForm().findField('CUSTOMERNAME').getValue();
this.storecustbank.load({ params: { condition: " LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + CUST + "')"} }); //this.storecustbank.load({ params: { condition: " LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + CUST + "')"} });
if (!basicForm.isValid()) { if (!basicForm.isValid()) {
btnEAddbill.enable(); btnEAddbill.enable();
@ -5602,25 +5568,25 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
LoadCustACCOUNT: function (CUSTOMERNAME) { LoadCustACCOUNT: function (CUSTOMERNAME) {
var CURR = this.formEdit.getForm().findField('CURR').getValue(); //var CURR = this.formEdit.getForm().findField('CURR').getValue();
var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK'); //var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK');
var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT'); //var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT');
var condition = " LINKID=(select TOP 1 GID from info_client where shortname='" + CUSTOMERNAME + "') "; //var condition = " LINKID=(select TOP 1 GID from info_client where shortname='" + CUSTOMERNAME + "') ";
if (CURR != "" && CURR != undefined) { //if (CURR != "" && CURR != undefined) {
condition = condition + " and CURRENCY='" + CURR + "'"; // condition = condition + " and CURRENCY='" + CURR + "'";
} //}
this.storecustbank.load({ params: { condition: condition }, // this.storecustbank.load({ params: { condition: condition },
callback: function (r, options, success) { // callback: function (r, options, success) {
if (success) { // if (success) {
if (r.length != 0) { // if (r.length != 0) {
// CUSTBANK.setValue(this.storecustbank.data.items[0].data.GID); //// CUSTBANK.setValue(this.storecustbank.data.items[0].data.GID);
// CUSTACCOUNT.setValue(this.storecustbank.data.items[0].data.ACCOUNT); // // CUSTACCOUNT.setValue(this.storecustbank.data.items[0].data.ACCOUNT);
} // }
} // }
}, // },
scope: this // scope: this
}); // });
}, },
onClearSql: function () { onClearSql: function () {
@ -5647,12 +5613,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
var CUSTNAME = form.findField('CUSTNAME').getValue(); var CUSTNAME = form.findField('CUSTNAME').getValue();
sql = sql + getAndConSql(sql, CUSTNAME, " CUSTOMERNAME='" + CUSTNAME + "'"); sql = sql + getAndConSql(sql, CUSTNAME, " CUSTOMERNAME='" + CUSTNAME + "'");
var SALECORPID = form.findField('SALECORPID').getValue(); //var SALECORPID = form.findField('SALECORPID').getValue();
sql = sql + getAndConSql(sql, SALECORPID, " SALECORPID='" + SALECORPID + "'"); //sql = sql + getAndConSql(sql, SALECORPID, " SALECORPID='" + SALECORPID + "'");
var SETTLETYPE = form.findField('SETTLETYPE').getValue(); //var SETTLETYPE = form.findField('SETTLETYPE').getValue();
sql = sql + getAndConSql(sql, SETTLETYPE, " SETTLETYPE='" + SETTLETYPE + "'"); //sql = sql + getAndConSql(sql, SETTLETYPE, " SETTLETYPE='" + SETTLETYPE + "'");
var Currency = form.findField('Currency').getValue(); var Currency = form.findField('Currency').getValue();
if (Currency != '') { if (Currency != '') {
@ -5667,12 +5633,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
var expDateEnd = form.findField('ExpDateEnd').getRawValue(); var expDateEnd = form.findField('ExpDateEnd').getRawValue();
sql = sql + getAndConSql(sql, expDateEnd, "APPLYTIME <='" + expDateEnd + "'"); sql = sql + getAndConSql(sql, expDateEnd, "APPLYTIME <='" + expDateEnd + "'");
var PORT = form.findField('PORT').getValue(); //var PORT = form.findField('PORT').getValue();
sql = sql + getAndConSql(sql, PORT, " (PORTLOAD like '%" + PORT + "%' or PORTDISCHARGE like '%" + PORT + "%') "); //sql = sql + getAndConSql(sql, PORT, " (PORTLOAD like '%" + PORT + "%' or PORTDISCHARGE like '%" + PORT + "%') ");
var DC = form.findField('ISDEBIT').getValue(); //var DC = form.findField('ISDEBIT').getValue();
if (DC == '1') //if (DC == '1')
sql = sql + getAndConSql(sql, DC, " (BILLSTATUS=0 OR BILLSTATUS=5) "); // sql = sql + getAndConSql(sql, DC, " (BILLSTATUS=0 OR BILLSTATUS=5) ");
// this.FeeSqlStr = this.getFeeCondition(); // this.FeeSqlStr = this.getFeeCondition();

@ -15,7 +15,7 @@ Zi.LAN.BillNo = "结算单号";
Zi.LAN.BillStatus = "状态"; Zi.LAN.BillStatus = "状态";
Zi.LAN.SettlementTime = "结算日期"; Zi.LAN.SettlementTime = "结算日期";
Zi.LAN.SettlementUser = "结算人"; Zi.LAN.SettlementUser = "结算人";
Zi.LAN.SettlementNo = "相关号码"; Zi.LAN.SettlementNo = "摘要";
Zi.LAN.VoucherNo = "总账凭证号"; Zi.LAN.VoucherNo = "总账凭证号";
Zi.LAN.CustomerAccount = "客户账户"; Zi.LAN.CustomerAccount = "客户账户";
Zi.LAN.VoucherNo_PayBL = "凭证备注"; Zi.LAN.VoucherNo_PayBL = "凭证备注";

@ -3730,7 +3730,7 @@ namespace DSWeb.MvcShipping.Controllers
else else
error = MsOpSeaeEdiPortDAL.IsCreateEdi(headEdiList, type, filetype, filerole); error = MsOpSeaeEdiPortDAL.IsCreateEdi(headEdiList, type, filetype, filerole);
var ftpcount = 0;
if (error == "") if (error == "")
{ {
var ediname = ""; var ediname = "";
@ -3774,7 +3774,7 @@ namespace DSWeb.MvcShipping.Controllers
else else
result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset); result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset);
ftpcount = ftpcount + 1;
var afilename = Path.GetFileName(filename); var afilename = Path.GetFileName(filename);
MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, type, filetype, "", ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"])); MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, type, filetype, "", ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"]));
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
@ -3808,6 +3808,11 @@ namespace DSWeb.MvcShipping.Controllers
result.Message = error; result.Message = error;
} }
if (result.Success) {
result.Message = "已发送成功"+ ftpcount.ToString()+"票!";
}
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
@ -4031,7 +4036,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
Directory.CreateDirectory(path); Directory.CreateDirectory(path);
} }
var ftpcount = 0;
var result = new DBResult(); var result = new DBResult();
if (filetype == "V") if (filetype == "V")
@ -4088,6 +4093,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
result = MsOpSeaeEdiPortDAL.FtpFile2(filename, ftpset); result = MsOpSeaeEdiPortDAL.FtpFile2(filename, ftpset);
var afilename = Path.GetFileName(filename); var afilename = Path.GetFileName(filename);
if (result.Success) ftpcount = ftpcount + 1;
MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "INTTR", filetype, carrier, ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"])); MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "INTTR", filetype, carrier, ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"]));
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
@ -4111,6 +4117,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset); result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset);
var afilename = Path.GetFileName(filename); var afilename = Path.GetFileName(filename);
if (result.Success) ftpcount = ftpcount + 1;
MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "INTTR", filetype, carrier, ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"])); MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "INTTR", filetype, carrier, ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"]));
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
@ -4162,7 +4169,11 @@ namespace DSWeb.MvcShipping.Controllers
} }
MsOpSeaeEdiPortDAL.SendToDJY(headList, Convert.ToString(Session["COMPANYID"])); MsOpSeaeEdiPortDAL.SendToDJY(headList, Convert.ToString(Session["COMPANYID"]));
} }
if (result.Success&&ftpcount!=0)
{
result.Message = "已发送成功" + ftpcount.ToString() + "票!";
}
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }

@ -20714,7 +20714,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
//if (bill.EDIREMARK.Trim() != "") //if (bill.EDIREMARK.Trim() != "")
//{ //{
Shipping = formatEdiStr("txt", bill.EDIREMARK); Shipping = formatEdiStr("txt", bill.EDIREMARK);
ShippingList = formatlengthStr(Shipping, 70, false, true); ShippingList = formatlengthStr(Shipping, 70, false);
var strlist = new List<string>(); var strlist = new List<string>();
if (!string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE1) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE2)) if (!string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE1) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE2))
{ {

@ -15,6 +15,8 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, {
PageSize: 100, PageSize: 100,
PageSizeAdd: 100, PageSizeAdd: 100,
sqlcontext: '', sqlcontext: '',
selectbsnostr: '',
selectfeestr: '',
initUIComponents: function () { initUIComponents: function () {
this.serialNo = 0; this.serialNo = 0;
@ -308,6 +310,20 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, {
this.onSubmitFeeClick(); this.onSubmitFeeClick();
}, },
scope: this scope: this
}, '-',
{
text: Zi.LAN.scfapiao, //生成发票申请
handler: function (button, event) {
this.onCreateInvAppClick(button, event);
},
scope: this
}, '-',
{
text: '生成付费申请', //生成发票申请
handler: function (button, event) {
this.onCreatePayShenClick(button, event);
},
scope: this
} }
//, '-', { //, '-', {
@ -3970,6 +3986,53 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, {
form.reset(); form.reset();
}, },
onCreateInvAppClick: function (button, event) {
var invduino = this.formEdit.getForm().findField('DUINO').getValue();
var invcust = this.formEdit.getForm().findField('CUSTNAME').getValue();
this.selectbsnostr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + invduino + "') ";
this.selectfeestr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + invduino + "') ";
DsOpenEditWin("/Account/Chfee_invoiceapplication/BLEdit?handle=check&bsnosql=recapp&bsCurr=&bsCust=" + invcust + "&bsduino=" + invduino, '发票申请');
},
onCreatePayShenClick: function (button, event) {
var invduino = this.formEdit.getForm().findField('DUINO').getValue();
Ext.MessageBox.confirm(Zi.LAN.Prompt, '确定要生成付费申请吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在处理....'); //正在删除数据...
Ext.Ajax.request({
waitMsg: '正在处理....',
url: '/MvcShipping/MsChDui/MakeShen',
params: {
duino: invduino
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
Ext.Msg.hide();
DsOpenEditWin("/Account/Chfee_payapplication/BLEdit?handle=check&bsPayNo=" + jsonresult.Data, '付费申请');
}
else {//错误
Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {//警告', msg: '服务器响应出错,请重试
Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
}, //onDeleteClick
getduiCondition: function () { getduiCondition: function () {
var form = this.formSearch.getForm(); var form = this.formSearch.getForm();
if (!form.isValid()) { if (!form.isValid()) {
@ -4707,6 +4770,17 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, {
} }
}, },
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.EditRecord;
ret[3] = this.EditRecord;
ret[4] = this.selectbsnostr;
ret[5] = this.selectfeestr;
return ret;
},
Print: function () { Print: function () {
var basicForm = this.formEdit.getForm(); var basicForm = this.formEdit.getForm();
var billNo = basicForm.findField('DUINO').value; var billNo = basicForm.findField('DUINO').value;

@ -1225,86 +1225,11 @@ Ext.extend(Shipping.MsChDuiIndex, Ext.Panel, {
var record = selections[0]; var record = selections[0];
var invcust = record.data.CUSTNAME; var invcust = record.data.CUSTNAME;
var invduino = record.data.DUINO;
this.selectbsnostr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + record.data.DUINO + "') "; this.selectbsnostr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + record.data.DUINO + "') ";
this.selectfeestr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + record.data.DUINO + "') "; this.selectfeestr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + record.data.DUINO + "') ";
var StoreCurr = Ext.create('DsExt.ux.RefTableStore', { DsOpenEditWin("/Account/Chfee_invoiceapplication/BLEdit?handle=check&bsnosql=recapplist&bsCurr=&bsCust=" + invcust + "&bsduino=" + invduino, '发票申请');
model: 'MsFeeCurr',
proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' }
});
StoreCurr.load({ params: { condition: ""} });
this.comboxInvCurr = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.shishoubibie, //实收币别
store: StoreCurr,
id: 'ShenCurr',
forceSelection: true,
allowBlank: false,
name: 'CURR',
value: 'RMB',
valueField: 'CURR',
displayField: 'CURR'
});
this.formIFTMBFSShow = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 80,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [this.comboxInvCurr]
}]
});
me = this;
var winIFTMBFShow = Ext.create('Ext.window.Window', {
width: 250,
height: 190,
//plain : true,
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true, // 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.formIFTMBFSShow],
buttons: [{
text: Zi.LAN.suisc, //确认生成
minWidth: 70,
handler: function () {
var ShenCurr = Ext.getCmp('ShenCurr');
var Curr = ShenCurr.getValue();
_this.onCreateInvShenClick(Curr, invcust);
}
}, {
text: Zi.LAN.close, //关闭
minWidth: 70,
handler: function () {
winIFTMBFShow.close();
}
}]
});
winIFTMBFShow.show();

@ -4259,10 +4259,10 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
var cellediting = null; var cellediting = null;
if (type == 1) { if (type == 1) {
cellediting = this.cellEditingDrChFee; cellediting = this.cellEditingDrChFee;
editColumnIndex = 4; editColumnIndex = 3;
} else if (type == 2) { } else if (type == 2) {
cellediting = this.cellEditingCrChFee; cellediting = this.cellEditingCrChFee;
editColumnIndex = 4; editColumnIndex = 3;
} }
var n = store.getCount(); var n = store.getCount();
cellediting.startEditByPosition({ row: n - 1, column: editColumnIndex }); cellediting.startEditByPosition({ row: n - 1, column: editColumnIndex });

@ -6139,10 +6139,10 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
var cellediting = null; var cellediting = null;
if (type == 1) { if (type == 1) {
cellediting = this.cellEditingDrChFee; cellediting = this.cellEditingDrChFee;
editColumnIndex = 5; editColumnIndex = 4;
} else if (type == 2) { } else if (type == 2) {
cellediting = this.cellEditingCrChFee; cellediting = this.cellEditingCrChFee;
editColumnIndex =5; editColumnIndex =4;
} }
var n = store.getCount(); var n = store.getCount();

Loading…
Cancel
Save