From e8dabb696ef93daed98513282af69ffef6a167a8 Mon Sep 17 00:00:00 2001 From: hanxuntao Date: Fri, 13 Sep 2024 17:55:05 +0800 Subject: [PATCH] 1 --- .../Controllers/Chfee_hexiaoController.cs | 4 +- .../Viewsjs/Chfee_Audit/Chfee_Audit.js | 88 ++++++++++++++- .../Account/Viewsjs/Chfee_Audit/Zi_en-us.js | 2 + .../Account/Viewsjs/Chfee_Audit/Zi_zh-cn.js | 1 + .../Controllers/MsCwVouchersGlController.cs | 14 +++ .../MsCwVouchersGl/MsCwVouchersGlIndex.js | 106 +++++++++++++++++- .../MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js | 4 +- 7 files changed, 213 insertions(+), 6 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_hexiaoController.cs b/DSWeb/Areas/Account/Controllers/Chfee_hexiaoController.cs index 7e12a82..803a71c 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_hexiaoController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_hexiaoController.cs @@ -659,8 +659,8 @@ namespace DSWeb.Areas.Account.Controllers foreach (var enumValue in bodyList) { var feesql = " f.FEESTATUS=0 and f.SETTLEMENT=0 and f.ORDERAMOUNT=0 and f.ORDERINVOICE=0 AND ISNULL(F.INVOICE,0)=0 AND F.AMOUNT<>0 " - + " and f.FEETYPE=" + enumValue.FEETYPE + " AND F.CUSTOMERNAME='" + enumValue.CUSTNAME + "' AND F.CURRENCY='"+enumValue.CURRENCY+"' " - + " and f.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE PARENTID='" + enumValue.PARENTID + "' AND PARENTID IN (SELECT PARENTID FROM V_CD_FEELIST)) "; + + " AND F.CUSTOMERNAME='" + enumValue.CUSTNAME + "' AND F.CURRENCY='"+enumValue.CURRENCY+"' " + + " and f.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE MBLNO='" + enumValue.MBLNO + "') "; var FeeList = ChsettlementDAL.GetFeeDetailList(feesql, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"])); if (FeeList.Count != 0) { var HEXIAOBILLNO = ""; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js index 372f180..37599e5 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js @@ -625,6 +625,11 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { _this.onSelAuditClick(button, event); }, scope: this + }, { + xtype: 'label', + // flex: 0.4, + id: 'DRSELECTSTR', + html: "" }], columns: this.girdDrcolums }); @@ -1078,7 +1083,12 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { } }], scope: this - }], + }, { + xtype: 'label', + // flex: 0.4, + id: 'CRSELECTSTR', + html: "" + }], columns: this.girdCrcolums }); @@ -4405,6 +4415,43 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { memberyf.set("ISSEL", '0'); }; + var DRSELECTSTR = Ext.getCmp('DRSELECTSTR'); + DRSELECTSTR.setText('', false); + } else { + var storeSelect = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsSelectFee', + proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' } + }); + for (var i = 0; i < selections.length; i++) { + var memberyf = selections[i]; + var records = DsStoreQueryBy(storeSelect, 'CURR', memberyf.data.Currency) + if (records.getCount() > 0) { + var rec = records.getAt(0); + var AMOUNT = Add(rec.data.AMOUNT, memberyf.data.Amount); + rec.set('AMOUNT', AMOUNT); + } else { + var rec = Ext.create('MsSelectFee', { + CURR: memberyf.data.Currency, + AMOUNT: memberyf.data.Amount + }); + storeSelect.add(rec); + } + } + if (storeSelect.getCount() > 0) { + str = Zi.LAN.FEE.DRSELECTSTR + '['; + for (i = 0; i < storeSelect.getCount(); i += 1) { + var memberyf = storeSelect.getAt(i); + str = str + memberyf.data.CURR + ':' + memberyf.data.AMOUNT + ' '; + } + str = str + ']'; + var DRSELECTSTR = Ext.getCmp('DRSELECTSTR'); + DRSELECTSTR.setText(str, false); + } else { + var DRSELECTSTR = Ext.getCmp('DRSELECTSTR'); + DRSELECTSTR.setText('', false); + } + + } } }); @@ -4417,6 +4464,45 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { memberyf.set("ISSEL", '0'); }; + var DRSELECTSTR = Ext.getCmp('CRSELECTSTR'); + DRSELECTSTR.setText('', false); + } else { + + var storeSelect = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsSelectFee', + proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' } + }); + for (var i = 0; i < selections.length; i++) { + var memberyf = selections[i]; + var records = DsStoreQueryBy(storeSelect, 'CURR', memberyf.data.Currency) + if (records.getCount() > 0) { + var rec = records.getAt(0); + var AMOUNT = Add(rec.data.AMOUNT, memberyf.data.Amount); + rec.set('AMOUNT', AMOUNT); + } else { + var rec = Ext.create('MsSelectFee', { + CURR: memberyf.data.Currency, + AMOUNT: memberyf.data.Amount + }); + storeSelect.add(rec); + } + } + if (storeSelect.getCount() > 0) { + str = Zi.LAN.FEE.DRSELECTSTR + '['; + for (i = 0; i < storeSelect.getCount(); i += 1) { + var memberyf = storeSelect.getAt(i); + str = str + memberyf.data.CURR + ':' + memberyf.data.AMOUNT + ' '; + } + str = str + ']'; + var DRSELECTSTR = Ext.getCmp('CRSELECTSTR'); + DRSELECTSTR.setText(str, false); + } else { + var DRSELECTSTR = Ext.getCmp('CRSELECTSTR'); + DRSELECTSTR.setText('', false); + } + + + } } }); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_en-us.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_en-us.js index 2351b09..b1b0482 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_en-us.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_en-us.js @@ -318,6 +318,8 @@ Zi.LAN.CHUANDAI = "船代"; Zi.LAN.BAOXIANGONGS = "保险公司"; Zi.LAN.QITA = "其他"; Zi.LAN.CANGKU = "仓库"; +Zi.LAN.FEE.DRSELECTSTR = "选中费用合计"; +Zi.LAN.FEE.DRSELECTSTR = "选中费用合计"; //#endregion diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_zh-cn.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_zh-cn.js index 88ec811..44a5678 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_zh-cn.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Zi_zh-cn.js @@ -320,3 +320,4 @@ Zi.LAN.CHUANDAI = "船代"; Zi.LAN.BAOXIANGONGS = "保险公司"; Zi.LAN.QITA = "其他"; Zi.LAN.CANGKU = "仓库"; +Zi.LAN.FEE.DRSELECTSTR = "选中费用合计"; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsCwVouchersGlController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsCwVouchersGlController.cs index d83806d..a0f77d5 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsCwVouchersGlController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsCwVouchersGlController.cs @@ -560,6 +560,20 @@ namespace DSWeb.MvcShipping.Controllers } } + public ContentResult SetNotExp(string gids) + { + if (Convert.ToString(Session["COMPANYID"]).Trim() == "" || Convert.ToString(Session["USERID"]).Trim() == "" || Convert.ToString(Session["CODENAME"]).Trim() == "" || Convert.ToString(Session["SHOWNAME"]).Trim() == "" || Convert.ToString(Session["DEPTNAME"]).Trim() == "") + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + + T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); + T_ALL_DA.GetExecuteSqlCommand("update cw_vouchers_gl set ISEXPORT=0,EXPVOUNO='' where ORDNO in ('" + gids.Replace(",", "','") + "') ");//客户(系统)//varchar(18) + var jsonRespose = new JsonResponse { Success = true, Message = "已更新!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + } + public ContentResult DeleteDetail(string data) { if (Convert.ToString(Session["COMPANYID"]).Trim() == "" || Convert.ToString(Session["USERID"]).Trim() == "" || Convert.ToString(Session["CODENAME"]).Trim() == "" || Convert.ToString(Session["SHOWNAME"]).Trim() == "" || Convert.ToString(Session["DEPTNAME"]).Trim() == "") diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsCwVouchersGl/MsCwVouchersGlIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsCwVouchersGl/MsCwVouchersGlIndex.js index 79fc59e..566e613 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsCwVouchersGl/MsCwVouchersGlIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsCwVouchersGl/MsCwVouchersGlIndex.js @@ -1125,7 +1125,15 @@ Ext.extend(Shipping.MsCwVouchersGlIndex, Ext.Panel, { this.onCopyVouToOther(); }, scope: this - }] + }, { + text: "设置为未导出", + id: "btnSetNotExp", + iconCls: "btnrefresh", + handler: function (button, event) { + this.onSetNoExpClick(); + }, + scope: this + }] }); this.panelZQ = new Ext.Panel({ @@ -1363,7 +1371,28 @@ Ext.extend(Shipping.MsCwVouchersGlIndex, Ext.Panel, { //#endregion + var btnSetNotExp = Ext.getCmp('btnSetNotExp'); + + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', + params: { + modulename: "modSetNotExp" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + btnSetNotExp.setVisible(false); + } else { + btnSetNotExp.setVisible(true); + } + } else { + } + }, + scope: this + }); }, //end initUIComponents @@ -1677,6 +1706,81 @@ Ext.extend(Shipping.MsCwVouchersGlIndex, Ext.Panel, { }, this); } }, + + onSetNoExpClick: function () { + var selections; + if (Ext.getCmp('rdLBYS').getValue().OBJNUM.toString() == "合计列") { + selections = this.gridListHJ.getSelectionModel().getSelection(); + } + else { + selections = this.gridList.getSelectionModel().getSelection(); + } + if (selections.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; + } + // + var gids = ""; + var sError = ""; + for (var i = 0; i < selections.length; i++) { + var record = selections[i]; + if (record.get('ISEXPORT').toString() != "true") { + //if (i == 0) { + // gids = record.get('ORDNO'); + //} + //else { + // gids += "," + record.get('ORDNO'); + //} + } + else { + if (i == 0) { + gids = record.get('ORDNO'); + } + else { + gids += "," + record.get('ORDNO'); + } + } + } + // + if (gids.trim() == "") { + Ext.Msg.show({ title: '提示', msg: '请选择导出的凭证!' + sError, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; + } + else { + Ext.MessageBox.confirm('提示', '确定设置选中的凭证为未导出吗?', function (btn) { + if (btn == 'yes') { + Ext.Msg.wait('正在处理数据...'); + Ext.Ajax.request({ + waitMsg: '正在处理数据...', + url: '/MvcShipping/MsCwVouchersGl/SetNotExp', + params: { + gids: gids + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + this.storeList.reload(); + + Ext.Msg.show({ title: '提示', msg: jsonresult.Message + sError, 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) { + Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + } + }, this); + } + + }, + //#endregion //#region 审核/返审 diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js index 9885291..7f87968 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js @@ -983,7 +983,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { }, { fieldLabel: '从签入日期', format: 'Y-m-d', - xtype: 'datefield', + xtype: 'datetimefield', name: 'QR_BGN', enableKeyEvents: true, listeners: { @@ -996,7 +996,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { }, { fieldLabel: '到签入日期', format: 'Y-m-d', - xtype: 'datefield', + xtype: 'datetimefield', name: 'QR_END', enableKeyEvents: true, listeners: {