diff --git a/DSWeb/Areas/Account/Views/Chfee_invoice/AppEdit.aspx b/DSWeb/Areas/Account/Views/Chfee_invoice/AppEdit.aspx index 74f4231e..e1c6a996 100644 --- a/DSWeb/Areas/Account/Views/Chfee_invoice/AppEdit.aspx +++ b/DSWeb/Areas/Account/Views/Chfee_invoice/AppEdit.aspx @@ -22,6 +22,9 @@ + + + diff --git a/DSWeb/Areas/Account/Views/Chfee_invoice/BLEdit.aspx b/DSWeb/Areas/Account/Views/Chfee_invoice/BLEdit.aspx index 1332f2bc..ad34af4f 100644 --- a/DSWeb/Areas/Account/Views/Chfee_invoice/BLEdit.aspx +++ b/DSWeb/Areas/Account/Views/Chfee_invoice/BLEdit.aspx @@ -12,6 +12,9 @@ + + + diff --git a/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/AppEdit.aspx b/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/AppEdit.aspx index ddd82c63..bc6b539d 100644 --- a/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/AppEdit.aspx +++ b/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/AppEdit.aspx @@ -22,6 +22,9 @@ + + + diff --git a/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/BLEdit.aspx b/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/BLEdit.aspx index 3ee581f8..05f58bf6 100644 --- a/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/BLEdit.aspx +++ b/DSWeb/Areas/Account/Views/Chfee_invoice_HangXin/BLEdit.aspx @@ -11,6 +11,9 @@ + + + diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js index 87809496..0d20f01f 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js @@ -38,6 +38,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { this.onlyfeedr = 0; this.onlyfeecr = 0; this.worktype = ''; + this.isbslock = '0' //明细表-数据集 this.storeDrChFee = Ext.create('Ext.data.Store', { @@ -3971,6 +3972,12 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { width: 120 }); + this.CheckBsClose = new Ext.form.Checkbox({ + fieldLabel: '同时业务封账', + checked: false, + width: 100 + }); + this.formAccMonthShow = Ext.widget('form', { frame: true, region: 'center', @@ -3999,7 +4006,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { fieldLabel: Zi.LAN.kuaiJiQJ, //会计区间 xtype: 'monthfield', name: 'AccDate' - } + }, this.CheckBsClose ] } ]//end items(fieldset 1) @@ -4189,6 +4196,26 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { }, scope: this }); + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', + params: { + modulename: "modBsLockBig" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + _this.CheckBsClose.setVisible(false); + } else { + _this.CheckBsClose.setVisible(true); + } + } else { + + } + }, + scope: this + }); }, //end initUIComponents @@ -5862,6 +5889,9 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { this.IsAccDate = '1' } else this.IsAccDate = '0' + if (_this.CheckBsClose.checked) { + this.isbslock = '1' + } else this.isbslock = '0' var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { @@ -5889,7 +5919,8 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { params: { data: jsonbodyAddDatas, isAccDate: _this.IsAccDate, - AccDate: _this.AccDate + AccDate: _this.AccDate, + isbslock: _this.isbslock }, callback: function (options, success, response) { if (success) { diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js index f057252b..0175987e 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js @@ -2228,8 +2228,122 @@ 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 '' + value + ''; + }, + 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({ @@ -2268,7 +2382,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { items: [ this.panelInv, - this.panelBody + this.panelBody, + this.page_2 ] }); @@ -2510,6 +2625,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 { @@ -5148,6 +5264,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(); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js index 1472d72c..5cfb2968 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js @@ -2590,8 +2590,122 @@ 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 '' + value + ''; + }, + 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({ @@ -2630,7 +2744,8 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, { items: [ this.panelInv, - this.panelBody + this.panelBody, + this.page_2 ] }); @@ -2923,7 +3038,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, { } }); - + this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: data.BILLNO } }); // _this.formEdit.getForm().findField('BILLSTATUS').setDisabled(true); _this.GetEditStatus(); @@ -6145,6 +6260,77 @@ 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(); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js index 21b9a2d1..133e0b81 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js @@ -2916,6 +2916,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 '' + value + ''; + }, + 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 布局 @@ -2956,7 +3071,8 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { items: [ this.panelInv, - this.panelBody + this.panelBody, + this.page_2 ] }); @@ -3243,7 +3359,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, 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); @@ -6339,6 +6455,73 @@ 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(); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js index eff25660..a963f70c 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceBLEdit.js @@ -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 '' + value + ''; + }, + 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(); diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs index 839b0adf..c9dce52a 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs @@ -394,23 +394,27 @@ namespace DSWeb.MvcShipping.Controllers var findlist = new List(); foreach (var fee in bodyList) { - var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName&&X.Amount==fee.Amount); - if (newinvlink == null) + if (fee.FeeType == 2) { - var InvLink = new MsChFee(); - InvLink.Currency = fee.Currency; - InvLink.CustomerName = fee.CustomerName; - InvLink.Amount = fee.Amount; - findlist.Add(InvLink); - } - else { - var jsonRespose3 = new JsonResponse + var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName && X.Amount == fee.Amount); + if (newinvlink == null) { - Success = false, - Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!", - }; - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; + var InvLink = new MsChFee(); + InvLink.Currency = fee.Currency; + InvLink.CustomerName = fee.CustomerName; + InvLink.Amount = fee.Amount; + findlist.Add(InvLink); + } + else + { + var jsonRespose3 = new JsonResponse + { + Success = false, + Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!", + }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; + } } } diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs index 26db6304..a83f64f9 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitController.cs @@ -273,7 +273,7 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append("GROUP BY BSNO) G ON (G.BSNO=A.BSNO) "); strSql.Append(" LEFT JOIN info_client C ON (C.SHORTNAME=B.CUSTOMERNAME) "); // strSql.Append("LEFT JOIN OP_CLOSE CL ON (CL.BSNO=A.BSNO) "); - strSql.Append(" WHERE ISNULL(G.BSNO,'')<>'' "); + strSql.Append(" WHERE 1=1 "); } @@ -357,7 +357,7 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append("GROUP BY BSNO) G ON (G.BSNO=B.BSNO) "); // strSql.Append("LEFT JOIN OP_CLOSE CL ON (CL.BSNO=B.BSNO) "); strSql.Append(" LEFT JOIN info_client C ON (C.SHORTNAME=B.CUSTOMERNAME) "); - strSql.Append(" WHERE ISNULL(G.BSNO,'')<>'' "); + strSql.Append(" WHERE 1=1 "); } else @@ -529,7 +529,8 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append(" Where " + feecondition); strSql.Append("GROUP BY BSNO) G ON (G.BSNO=A.BSNO) "); strSql.Append(" LEFT JOIN info_client C ON (C.SHORTNAME=B.CUSTOMERNAME) "); - strSql.Append(" WHERE ISNULL(G.BSNO,'')<>'' "); + //strSql.Append(" WHERE ISNULL(G.BSNO,'')<>'' "); + strSql.Append(" WHERE 1=1 "); } @@ -613,7 +614,8 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append("GROUP BY BSNO) G ON (G.BSNO=B.BSNO) "); // strSql.Append("LEFT JOIN OP_CLOSE CL ON (CL.BSNO=B.BSNO) "); strSql.Append(" LEFT JOIN info_client C ON (C.SHORTNAME=B.CUSTOMERNAME) "); - strSql.Append(" WHERE ISNULL(G.BSNO,'')<>'' "); + //strSql.Append(" WHERE ISNULL(G.BSNO,'')<>'' "); + strSql.Append(" WHERE 1=1 "); } else diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js index ac335fea..8e043c7f 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js @@ -3800,6 +3800,28 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { this.LoadPeriod(); + + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', + params: { + modulename: "modNotFeeSumDetail" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + } else { + // + _thisAmendfee.formtotal.height = 0; + } + } else { + + } + }, + scope: this + }); + Ext.Ajax.request({ waitMsg: '', url: '/MvcShipping/MsSysParamSet/GetData', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js index 630a4358..f7fec860 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js @@ -1756,7 +1756,7 @@ Ext.extend(Shipping.MsOpAireView, Ext.Panel, { root: { name: '根节点', expanded: true, - id: '5840B545-4012-4FCE-A2F4-A03911A2D1BEaaaaa' + id: '5840B545-4012-4FCE-A2F4-A03911A2D1BE' } }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js index 55cfb7c3..8676f223 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js @@ -1125,7 +1125,7 @@ Ext.extend(Shipping.MsOpAiriView, Ext.Panel, { root: { name: '根节点', expanded: true, - id: '16E13948-D20D-452B-852F-6EC58173996Caaaaaa' + id: '16E13948-D20D-452B-852F-6EC58173996C' } });