|
|
|
@ -3208,6 +3208,124 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, 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 布局
|
|
|
|
|
//控件布局
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
|
@ -3242,7 +3360,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
|
|
|
|
|
id: "TabPanelID",
|
|
|
|
|
enableTabScroll: true,
|
|
|
|
|
split: true,
|
|
|
|
|
items: [this.panelInv, this.panelBody]
|
|
|
|
|
items: [this.panelInv, this.panelBody, this.page_2]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
|
@ -3601,7 +3719,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
|
|
|
|
|
Data_pushmail = { EMAIL: data.PUSHEMAIL, NAMEANDEMAIL: data.PUSHEMAIL };
|
|
|
|
|
this.storeInfoClientMailTel.removeAll();
|
|
|
|
|
this.storeInfoClientMailTel.add(Data_pushmail);
|
|
|
|
|
|
|
|
|
|
this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: data.BILLNO } });
|
|
|
|
|
this.GetEditStatus();
|
|
|
|
|
} else {
|
|
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
|
@ -7602,6 +7720,73 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//#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();
|
|
|
|
|