QDHHYT
dengyu 12 months ago
parent f05a7aaf23
commit 71d14d121f

@ -104,7 +104,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
CUSTADDRTEL.setValue(data.INVADDRTEL);
if (CURR == 'RMB') {
this.storecustbank.load({ params: { condition: " CURRENCY='RMB' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
this.storecustbank.load({
params: { condition: " CURRENCY='RMB' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -115,7 +116,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
scope: this
});
} else if (CURR == 'USD') {
this.storecustbank.load({ params: { condition: " CURRENCY='USD' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
this.storecustbank.load({
params: { condition: " CURRENCY='USD' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -184,7 +186,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
else
CUSTADDRTEL.setValue(data.INVADDRTEL);
if (CURR == 'RMB') {
this.storecustbank.load({ params: { condition: " CURRENCY='RMB' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
this.storecustbank.load({
params: { condition: " CURRENCY='RMB' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -195,7 +198,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
scope: this
});
} else if (CURR == 'USD') {
this.storecustbank.load({ params: { condition: " CURRENCY='USD' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
this.storecustbank.load({
params: { condition: " CURRENCY='USD' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + records[0].data.CustName + "')" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -352,6 +356,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
});
this.storecustbank = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsInfoClientBankModel',
proxy: { url: '/MvcShipping/MsInfoClient/GetBankList' }
@ -395,7 +400,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.comboxInvNo = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreInvNo,
fieldLabel: '发票号',
allowBlank: false,
//allowBlank: false,
flex: 2,
name: 'INVOICENO',
valueField: 'INVNO',
@ -904,7 +909,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
model: 'MsCodeGoodInv',
proxy: { url: '/MvcShipping/MsCodeGoodInv/GetDataList' }
});
this.StoreCodeGoodInv.load({ params: { condition: "" }
this.StoreCodeGoodInv.load({
params: { condition: "" }
});
this.comboxCodeGoodInv = Ext.create('DsExt.ux.RefTableCombox', {
@ -1284,7 +1290,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
width: 100
}, {
sortable: true,
dataIndex: 'ETD',//'ETD'
dataIndex: 'ETD',
header: '开船日期',
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 100
@ -1818,11 +1824,13 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
text: "保存列表样式",
id: "btntest",
menu: [
{ text: "保存",
{
text: "保存",
handler: function (button, event) {
_this.girdbilladdcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'billadd', _this.gridAddFeeList.columns, _this.girdbilladdcolums, 1, true);
}
}, { text: "初始化",
}, {
text: "初始化",
handler: function (menu, event) {
_this.girdbilladdcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'billadd', _this.gridAddFeeList.columns, _this.initgirdbilladdcolums, 1, true);
}
@ -1909,7 +1917,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
width: 100
}, {
sortable: true,
dataIndex: 'ETD',//'ETD'
dataIndex: 'ETD',
header: '开船日期',
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 100
@ -2229,7 +2237,121 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
//#endregion 明细表
//#region 附件上传
this.storeChfeeFile = Ext.create('Ext.data.Store', {
model: 'FeeFileModel',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/Account/Chfee_payapplication/GetFileList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//表格
this.FeeFileColumns = [
{
sortable: true, hidden: true,
dataIndex: 'GID', readOnly: true,
header: 'GID',
width: 80
}, {
sortable: true, hidden: false,
dataIndex: 'File_OriginalName', readOnly: true,
header: '文件名称', //文件名称
renderer: function (value, p, record) {
return '<a href="' + "/Areas/Account/Files/" + record.data.BillNo + '/' + record.data.File_Name + '" target="_blank" style=' + '"text-decoration:none"' + ' >' + value + '</a>';
},
width: 180
}, {
sortable: true, hidden: false,
dataIndex: 'UpdateTime', readOnly: true,
header: '上传日期', //上传日期
width: 80
}, {
sortable: true, hidden: false,
dataIndex: 'Operator', readOnly: true,
header: '上传者', //上传者
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'File_Name', readOnly: true,
header: '文件物理名称', //文件物理名称
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'File_Path',
header: 'File_Path',
width: 80
}, {
xtype: 'actioncolumn',
width: 50,
text: '操作', //操作
items: [{
icon: '/images/icons/btnSearch.gif', // Use a URL in the icon config
tooltip: '预览',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
var filePath = "/Areas/Account/Files/" + rec.get('BillNo') + '/' + rec.get('File_Name') + '?a=' + Math.random();
var imgView = new Shipping.FileView({ filePath: filePath });
imgView.show();
}
}]
}
];
var selCertModel = Ext.create('Ext.selection.CheckboxModel');
this.fileGrid = new Ext.grid.GridPanel({
store: this.storeChfeeFile,
enableHdMenu: false,
layout: 'border',
region: 'center',
loadMask: { msg: '数据加载中,请稍等...' }, //数据加载中,请稍等...
trackMouseOver: true,
disableSelection: false,
selModel: selCertModel,
singleSelect: true,
selType: 'rowmodel',
tbar: [{
text: '上传图片', //上传图片
tooltip: '上传文件',
iconCls: "btnadddetail",
handler: function (button, event) {
this.onAddFileClick(button, event);
},
scope: this
}, '-', {
text: '删除图片', //删除
tooltip: '删除文件', //删除图片
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelFileClick(button, event);
},
scope: this
}],
columns: this.FeeFileColumns
});
//#endregion附件上传
//#region 增加附件上传tab
this.page_2 = new Ext.Panel({
id: "page_2",
title: '附件上传', //附件上传
autoScroll: true,
layout: "border",
region: 'center',
//closable:true,
items: [this.fileGrid]
});
//#endregion
//#region 布局
//控件布局
@ -2269,7 +2391,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
items:
[
this.panelInv,
this.panelBody
this.panelBody,
this.page_2
]
});
@ -2335,7 +2458,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
var sql = "";
sql = " BILLNO='" + bsno + "'";
isloadfee = false;
this.storeAddBodyList.load({ params: { condition: sql },
this.storeAddBodyList.load({
params: { condition: sql },
callback: function (r, options, success) {
if (success) {
isloadfee = true;
@ -2494,7 +2618,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
if (this.opStatus == 'copyadd')
this.CopyNewData();
this.StoreInvNo.load({ params: { condition: "" },
this.StoreInvNo.load({
params: { condition: "" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -2511,6 +2636,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
}
});
this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: data.BILLNO } });
// _this.formEdit.getForm().findField('BILLSTATUS').setDisabled(true);
_this.GetEditStatus();
} else {
@ -2530,7 +2656,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, 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) {
@ -2627,7 +2754,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, 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
});
@ -3240,7 +3368,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
else
CUSTADDRTEL.setValue(data.INVADDRTEL);
if (RECVCURR == 'RMB') {
this.storecustbank.load({ params: { condition: " CURRENCY='RMB' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + cust + "')" },
this.storecustbank.load({
params: { condition: " CURRENCY='RMB' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + cust + "')" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -3251,7 +3380,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
scope: this
});
} else if (RECVCURR == 'USD') {
this.storecustbank.load({ params: { condition: " CURRENCY='USD' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + cust + "')" },
this.storecustbank.load({
params: { condition: " CURRENCY='USD' AND LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + cust + "')" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
@ -3383,7 +3513,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
} else {
btnEAddDetail.enable();
Ext.Msg.show({ title: '请重试',
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
@ -3519,7 +3650,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.storeAddFeeList.reload();
_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) {
@ -3676,7 +3808,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
var sql = this.BillSql;
this.storeAddFeeList.load({ params: { start: 0, limit: _this.PageSize, sort: '', 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) {
@ -4385,6 +4518,9 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
return;
};
this.StoreInvTemplete = Ext.create('DsExt.ux.RefEnumStore', {});
this.StoreInvTemplete.load({ params: { enumTypeId: 83001 } });
this.comboxInvTemplete = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '发票备注模板',
store: this.StoreInvTemplete,
@ -4392,11 +4528,9 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
displayField: 'EnumValueName',
forceSelection: true,
name: 'TemplateName',
value: '发票备注',
value: '模板1',
enableKeyEvents: true
});
this.formRemarkShowGet = Ext.widget('form', {
frame: true,
title: '提取发票备注',
@ -4411,22 +4545,13 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
},
items: [
{
xtype: 'radiogroup',
fieldLabel: "模板名称", //'文件功能',
name: 'TemplateName',
defaults: { flex: 1 },
layout: 'hbox',
items: [
this.comboxInvTemplete,
{
this.comboxInvTemplete, {
fieldLabel: '是否追加', //'是否改签',
inputValue: true,
xtype: 'checkboxfield',
name: 'ISZHUIJIA',
checked: true
}
]//end root items
});
@ -4523,6 +4648,14 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
StoreFieldName.add({ "OPLBNAME": "外币金额(总计)" });
StoreFieldName.add({ "OPLBNAME": "人民币金额(总计)" });
StoreFieldName.add({ "OPLBNAME": "折算汇率(总计)" });
StoreFieldName.add({ "OPLBNAME": "购方银行" });
StoreFieldName.add({ "OPLBNAME": "购方账号" });
StoreFieldName.add({ "OPLBNAME": "销方银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD账号" });
StoreFieldName.add({ "OPLBNAME": "购方RMB银行" });
StoreFieldName.add({ "OPLBNAME": "购方RMB账号" });
var gridField = new Ext.grid.GridPanel({
store: StoreFieldName,
@ -4558,7 +4691,6 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
trackResetOnLoad: true,
items: [gridField]
});
var StoreInvTemplete2 = Ext.create('DsExt.ux.RefEnumStore', {});
StoreInvTemplete2.load({ params: { enumTypeId: 83001 } });
@ -4600,7 +4732,6 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
}
});
var formRemarkShow = Ext.widget('form', {
frame: true,
title: '模板内容',
@ -4623,6 +4754,9 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
anchor: '100%'
},
items: [{
xtype: 'label',
html: "<font color='red'>注意:请将明细部分用 《》 圈起来 例如:《[主提单号] [船名]》</font>"
}, {
xtype: 'textareafield',
grow: true,
height: 300,
@ -5099,7 +5233,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
//#region 必填字段
LoadMustBe: function () {
this.storeMustBe.load({ params: { condition: "BSTYPE='发票开出'" },
this.storeMustBe.load({
params: { condition: "BSTYPE='发票开出'" },
callback: function (r, options, success) {
if (success) {
if (this.storeMustBe.getCount() > 0) {
@ -5143,6 +5278,74 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
else return true;
},
//#region 文件上传
onAddFileClick: function () {
//var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue();
//if ((billstatus != 1) && (billstatus != 4)) {
// Ext.Msg.show({ title: '提示', msg: '当前状态无法添加附件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
// return;
//}
var BillNo = this.formEdit.getForm().findField('BILLNO').getValue();
if (BillNo == '' || BillNo == '*') {
Ext.MessageBox.alert('提示', '请先生成申请编号!'); //提示', '请先生成申请编号!
return;
}
var winAccess = new Shipping.FileUpload({});
winAccess.BillNo = BillNo;
winAccess.show();
}, onDelFileClick: function () {
//var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue();
//if ((billstatus != 1) && (billstatus != 4)) {
// Ext.Msg.show({ title: '提示', msg: '当前状态无法删除附件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
// return;
//}
var selections = this.fileGrid.getSelectionModel().getSelection();
if (selections.length == 0) {//提示', msg: '请先选择要删除的数据!
Ext.Msg.show({ title: '提示', msg: '请先选择要删除的数据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var BillNo = this.formEdit.getForm().findField('BILLNO').getValue();
var record = new Array();
for (var i = 0; i < selections.length; i++) {
record.push(selections[i].data);
} //提示', '确定删除该记录吗?'
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在删除数据...'); //正在删除数据
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/Account/Chfee_payapplication/CertDel',
params: {
data: Ext.JSON.encode(record)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
panelEdit.LoadData('edit', "BILLNO='" + BillNo + "'");
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
} //提示
else {
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {//'警告', msg: '服务器响应出错,请重试'
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
//#endregion
GetEditStatus: function () {
var canedit = false;
var op = this.formEdit.getForm().findField('OPERATORNAME').getValue();
@ -5156,7 +5359,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, 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) {

@ -1470,7 +1470,7 @@ namespace DSWeb.MvcShipping.Controllers
//增加费用
//20220530 改为只有成功时才生成费用
if (result.Success)
MsOpSeaeEdiDAL.MakeFee(headList, filetype, Convert.ToString(Session["USERID"]));
MsOpSeaeEdiDAL.MakeFee(headList, dcarrier, filetype, Convert.ToString(Session["USERID"]));
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
@ -1749,7 +1749,7 @@ namespace DSWeb.MvcShipping.Controllers
//增加费用
//分单
MsOpSeaeEdiDAL.MakeFee(headList, filetype, Convert.ToString(Session["USERID"]), true);
MsOpSeaeEdiDAL.MakeFee(headList, dcarrier, filetype, Convert.ToString(Session["USERID"]), true);
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message, Data = result.Data };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };

@ -11917,7 +11917,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiDAL
/// </summary>
/// <param name="bsnos">业务编号 逗号隔开的文本</param>
/// <param name="filetype">修改类型 B:新增 E:修改 D:删除</param>
public static void MakeFee(List<MsOpSeae> headlist, string filetype,string USERID, bool isfen = false)
public static void MakeFee(List<MsOpSeae> headlist,string dcarrier, string filetype,string USERID, bool isfen = false)
{
var list = new List<string>();
@ -11940,7 +11940,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiDAL
list.Add();
}
var amount = pricehelper.getPrice(item.CARRIER, filetype, isfen);
var amount = pricehelper.getPrice(dcarrier, filetype, isfen);
//var amount = 0M;
//if (filetype == "B")
@ -11995,7 +11995,22 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiDAL
try
{
//Zi.LAN.CARRIER = "Carrier"; //"船公司";
//Zi.LAN.CARRIER_COSU = "COSCO";
//Zi.LAN.CARRIER_HaiFeng = "SITC";
//Zi.LAN.CARRIER_HuaGang = "华港";
//Zi.LAN.CARRIER_LianDai = "联代";
//Zi.LAN.CARRIER_PX = "鹏信";
//Zi.LAN.CARRIER_DongSheng = "东胜";
//Zi.LAN.CARRIER_WaiDai = "外代";
//Zi.LAN.CARRIER_WaiYun = "外运";
//Zi.LAN.CARRIER_ZC = "正常";
//Zi.LAN.CARRIER_ZhenHua = "振华";
//Zi.LAN.CARRIER_ZhongChuang = "中创";
//Zi.LAN.CARRIER_ZhongHaiQinggang = "中海(青港)";
//Zi.LAN.CARRIER_ZhongHai = "中海";
//Zi.LAN.CARRIER_ZhongTong = "中通";
//Zi.LAN.CARRIER_ZhongYuan = "中远";
var _d = DetailList.First(x => x.EnumValueID == "其他");
if (DetailList.Exists(x => x.EnumValueID == carrier))
{

Loading…
Cancel
Save