From 3b2413e71273365288452bfc74c7c1599621ab4c Mon Sep 17 00:00:00 2001 From: hanxuntao Date: Fri, 1 Nov 2024 16:17:03 +0800 Subject: [PATCH] 1 --- BookingJieFeng/BookingJieFeng.csproj.user | 2 +- BookingWeb/BookingWeb.csproj.user | 2 +- .../DAL/MsOpRailway/MsOpRailwayDAL.cs | 13 ++- .../Viewsjs/MsOpAire/MsOpAireEdit.js | 12 +- .../Viewsjs/MsOpAire/MsOpAireFenEdit.js | 104 ++++++++++++++---- .../Controllers/PcHeadEdit_WFSDController.cs | 63 ++++++++++- .../Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js | 73 +++++++++++- .../Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js | 68 +++++++++++- .../TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js | 9 +- .../TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js | 18 ++- DispatchWeb/DispatchWeb.csproj.user | 2 +- 11 files changed, 319 insertions(+), 47 deletions(-) diff --git a/BookingJieFeng/BookingJieFeng.csproj.user b/BookingJieFeng/BookingJieFeng.csproj.user index 28be9c4c..a48b3371 100644 --- a/BookingJieFeng/BookingJieFeng.csproj.user +++ b/BookingJieFeng/BookingJieFeng.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU FolderProfile true diff --git a/BookingWeb/BookingWeb.csproj.user b/BookingWeb/BookingWeb.csproj.user index 4edb5e0f..6bc24ada 100644 --- a/BookingWeb/BookingWeb.csproj.user +++ b/BookingWeb/BookingWeb.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpRailway/MsOpRailwayDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpRailway/MsOpRailwayDAL.cs index f3b91962..fecb713e 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpRailway/MsOpRailwayDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpRailway/MsOpRailwayDAL.cs @@ -1054,18 +1054,19 @@ namespace DSWeb.MvcShipping.DAL.MsOpRailwayDAL } if (visiblerange == "4") { - str = " (OP='" + username + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "' OR DOC='" + username + "')"; + str = " (OP='" + username + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "' OR DOC='" + username + "' OR INPUTBY='" + username + "')"; } else if (visiblerange == "3") { - str = " (OP='" + username + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "' OR DOC='" + username + "')"; + str = " (OP='" + username + "' OR SALE='" + username + "' OR CUSTSERVICE='" + username + "' OR DOC='" + username + "' OR INPUTBY='" + username + "')"; } else if (visiblerange == "2") { var rangeDa = new RangeDA(); - var deptname = rangeDa.GetDEPTNAME(userid); - str = " (OP in (select showname from [user] where GID in (select USERID from user_company where COMPANYID='" + companyid + "') and GID in (select userid from user_baseinfo where DEPTNAME='" + deptname + "'))" - + " )"; + var deptid = rangeDa.GetDEPTGID(userid); + str = " (OP in (select showname from vw_user where deptgid='" + deptid + "') OR SALE in (select showname from vw_user where deptgid='" + deptid + "') OR CUSTSERVICE in (select showname from vw_user where deptgid='" + deptid + "') " + + " OR DOC in (select showname from vw_user where deptgid='" + deptid + "') OR INPUTBY in (select showname from vw_user where deptgid='" + deptid + "'))"; + } else if (visiblerange == "1") { @@ -1132,7 +1133,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpRailwayDAL reader.Close(); } if (opstr == "") opstr = "('" + username + "')"; - str = " (B.OP in " + opstr + " or B.SALE in " + opstr + " or B.CUSTSERVICE IN " + opstr + " or B.DOC IN " + opstr + ")"; + str = " (B.OP in " + opstr + " or B.SALE in " + opstr + " or B.CUSTSERVICE IN " + opstr + " or B.DOC IN " + opstr + " or B.INPUTBY IN " + opstr + ")"; } else diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js index eb87ab97..e60058dd 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js @@ -3042,9 +3042,9 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { selModel: this.GridCheckBoxModelCtn, plugins: [this.gridListCellEditing], selType: 'cellmodel', - features: [{ - ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性 - }], + //features: [{ + // ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性 + //}], tbar: [{ text: Zi.LAN.btnadddetails, //'增加明细', tooltip: Zi.LAN.btnadddetails, //'增加明细', @@ -3123,6 +3123,8 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { } }] }); + + var btnaddbs = Ext.getCmp('btnaddbs'); var btnESaveAndNew = Ext.getCmp('btnESaveAndNew'); var btnECopyNew = Ext.getCmp('btnECopyNew'); @@ -4078,11 +4080,11 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { SetFEEKGSChangeNew: function () { var KGS = this.formEdit.getForm().findField('KGS').getValue(); var CBM = this.formEdit.getForm().findField('CBM').getValue(); - var ACBM = Div(CBM, 0.006); + var ACBM = Div(CBM, 0.006,5); var ACBMSTR = ACBM.toString(); if (ACBMSTR.indexOf('.') > 0) { var arr1 = ACBMSTR.split("."); - var postr = arr1[1].substr(1, 1); + var postr = arr1[1].substr(0, 1); var acbm = Number(arr1[0]); if (postr == '0') ACBMSTR = arr1[0]; else if (postr == '1' || postr == '2' || postr == '3' || postr == '4' || postr == '5') ACBMSTR = arr1[0] + '.5'; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js index e7a50280..a1d25fc4 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js @@ -1129,15 +1129,25 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { listeners: { scope: this, change: function (field, newValue, oldValue, eOpts) { + if (newValue == oldValue) return; var ttl = parseFloatDef(this.formEdit.getForm().findField('TTLFREIGHT').getValue(), 0); var BLFRT = this.formEdit.getForm().findField('BLFRT').getValue(); var OTFRT = this.formEdit.getForm().findField('OTFRT').getValue(); if (BLFRT == 'PP') { - if (ttl != 0) - this.formEdit.getForm().findField('PFREIGHT').setValue(ttl); - } else if (OTFRT == 'CC') { - if (ttl != 0) + if (ttl != 0) { this.formEdit.getForm().findField('PFREIGHT').setValue(ttl); + this.formEdit.getForm().findField('CFREIGHT').setValue(''); + } + + this.feechange(); + + } else if (BLFRT == 'CC') { + if (ttl != 0) { + this.formEdit.getForm().findField('CFREIGHT').setValue(ttl); + this.formEdit.getForm().findField('PFREIGHT').setValue(''); + } + + this.feechange(); } } } @@ -1537,13 +1547,20 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { if (newValue == oldValue) return; var ttl = parseFloatDef(newValue, 0); var BLFRT = this.formEdit.getForm().findField('BLFRT').getValue(); - var OTFRT = this.formEdit.getForm().findField('OTFRT').getValue(); if (BLFRT == 'PP') { - if (ttl != 0) - this.formEdit.getForm().findField('PFREIGHT').setValue(ttl); - } else if (OTFRT == 'CC') { - if (ttl != 0) + if (ttl != 0) { this.formEdit.getForm().findField('PFREIGHT').setValue(ttl); + this.formEdit.getForm().findField('CFREIGHT').setValue(''); + } + + this.feechange(); + + } else if (BLFRT == 'CC') { + if (ttl != 0) { + this.formEdit.getForm().findField('CFREIGHT').setValue(ttl); + this.formEdit.getForm().findField('PFREIGHT').setValue(''); + } + this.feechange(); } } @@ -3044,9 +3061,9 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { selModel: this.GridCheckBoxModelCtn, plugins: [this.gridListCellEditing], selType: 'cellmodel', - features: [{ - ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性 - }], + //features: [{ + // ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性 + //}], tbar: [{ text: '增加明细', //'增加明细', tooltip: '增加明细', //'增加明细', @@ -3111,9 +3128,10 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var CBM = 0; for (var i = 0; i < _this.storeBodyList.getCount(); i += 1) { var member = _this.storeBodyList.getAt(i); - CBM = Add(CBM, member.data.CBM); + CBM = Add(CBM, member.data.CBM, 5); } _this.formEdit.getForm().findField('CBM').setValue(CBM); + _this.SetFEEKGSChangeNew(); me.winCtnListShow.close(); } @@ -3838,9 +3856,39 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { this.formEdit.getForm().findField('CCARRIEROT').setValue(ttl); } this.formEdit.getForm().findField('OTFEE').setValue(s); + var OTFRT = this.formEdit.getForm().findField('OTFRT').getValue(); + if (OTFRT == 'PP') { + if (ttl != 0) + this.formEdit.getForm().findField('PCARRIEROT').setValue(ttl); + this.formEdit.getForm().findField('CCARRIEROT').setValue(''); + } else if (OTFRT == 'CC') { + if (ttl != 0) + this.formEdit.getForm().findField('CCARRIEROT').setValue(ttl); + this.formEdit.getForm().findField('PCARRIEROT').setValue(''); + } + this.feechange(); }, + feechange: function () { + var pfreight = this.formEdit.getForm().findField('PFREIGHT').getValue(); + var PCARRIEROT = this.formEdit.getForm().findField('PCARRIEROT').getValue(); + + var ttl = Add(pfreight, parseFloatDef(PCARRIEROT, 0)); + var POTFREIGHT = this.formEdit.getForm().findField('POTFREIGHT').getValue(); + ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); + + var cfreight = this.formEdit.getForm().findField('CFREIGHT').getValue(); + var CCARRIEROT = this.formEdit.getForm().findField('CCARRIEROT').getValue(); + var cttl = Add(cfreight, parseFloatDef(CCARRIEROT, 0)); + var COTFREIGHT = this.formEdit.getForm().findField('COTFREIGHT').getValue(); + cttl = Add(cttl, parseFloatDef(COTFREIGHT, 0)); + this.formEdit.getForm().findField('CTOTAL').setValue(cttl); + + + + }, //#region LoadDefValue: function () { this.storeDefValue.load({ params: { condition: "BSTYPE='空运出口'" }, @@ -4057,11 +4105,11 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ACBMSTR = ACBM.toString(); if (ACBMSTR.indexOf('.') > 0) { var arr1 = ACBMSTR.split("."); - var postr = arr1[1].substr(1, 1); + var postr = arr1[1].substr(0, 1); var acbm = Number(arr1[0]); if (postr == '0') ACBMSTR = arr1[0]; else if (postr == '1' || postr == '2' || postr == '3' || postr == '4' || postr == '5') ACBMSTR = arr1[0] + '.5'; - else if (postr == '6' || postr == '7' || postr == '8' || postr == '9') ACBMSTR = Add(acbm,1); + else if (postr == '6' || postr == '7' || postr == '8' || postr == '9') ACBMSTR = Add(acbm, 1); } ACBM = Number(ACBMSTR); var feekgs = 0; @@ -4209,9 +4257,22 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var HEIGHT = e.record.data['HEIGHT']; var CTNFEE = Mul3(LENGTH, WIDTH, HEIGHT, 2); - var CBM = Mul(PKGS, CTNFEE, 2); - CBM = CBM / 1000; - CBM = (CBM / 1000).toFixed(2); + var CBM = Mul(PKGS, CTNFEE, 5); + // CBM=Div(CBM, 1000); + CBM = Div(CBM, 1000000, 6).toString(); + + if (CBM.indexOf('.') > 0) { + var arr1 = CBM.split("."); + if (arr1[1].length >= 5) { + var postr = arr1[1].substr(4, 1); + var postr2 = arr1[1].substr(5, 1); + var acbm = Number(arr1[0] + '.' + arr1[1].substr(0, 4)); + if (postr == '0' && (postr2 == '' || postr2 == '0')) CBM = acbm; + else CBM = Add(acbm, 0.0001, 5); + } + } + + e.record.set('CBM', CBM); } @@ -4239,6 +4300,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var bodydatas = []; + var ttlcbm = 0; for (var i = 0; i < this.storeBodyList.getCount(); i += 1) { var member = this.storeBodyList.getAt(i); var LENGTH = member.data.LENGTH; @@ -4250,11 +4312,15 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { if (WIDTH == '' || WIDTH == null) member.data.WIDTH = '0'; if (HEIGHT == '' || HEIGHT == null) member.data.HEIGHT = '0'; if (PKGS == '' || PKGS == null) member.data.PKGS = '0'; - if (CBM == '' || CBM == null) member.data.CBM= '0'; + if (CBM == '' || CBM == null) member.data.CBM = '0'; bodydatas.push(member); + /* ttlcbm=*/ + ttlcbm = Add(ttlcbm, CBM, 5); } var jsonBody = ConvertRecordsToJsonAll(bodydatas); + this.formEdit.getForm().findField('CBM').setValue(ttlcbm); + _this.SetFEEKGSChangeNew(); // // diff --git a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs index 44431633..32b4708b 100644 --- a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs @@ -39,6 +39,7 @@ using DSWeb.MvcShipping.Models.MsChFee; using DSWeb.Areas.MvcShipping.Models.Message.VGM; using NPOI.SS.Formula.Functions; using DSWeb.MvcShipping.DAL.MsOpSeaePreDAL; +using com.sun.tools.@internal.xjc.reader.gbind; namespace DSWeb.Areas.TruckMng.Controllers { @@ -588,9 +589,10 @@ namespace DSWeb.Areas.TruckMng.Controllers // var currentTime = System.DateTime.Now; // headData.LrDate = currentTime.ToString("d"); //} - headData.LoadFactory = headData.FactoryAddrSe; + headData.ChangedReson = headData.FactoryAddrSe; headData.FactoryAddrSe = ""; headData.DetiNationSe = ""; + var modb2 = new ModelObjectDB(); result = modb2.Save(headData); if (result.Success) @@ -842,6 +844,16 @@ namespace DSWeb.Areas.TruckMng.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; } + if (headData.TruckSpec == "进口") { + if (bodyctnData != null && bodyctnData.Count<= 2) + { + var jsonRespose2 = new JsonResponse { Success = true, Message = "不需要生成分票!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + + } + + } + if (bodyctnData == null|| bodyctnData.Count == 0) { @@ -1153,7 +1165,56 @@ namespace DSWeb.Areas.TruckMng.Controllers } + public ContentResult DeleteListHYRD(string data) + { + var headList = JsonConvert.Deserialize>(data); + if ((headList!=null)&&(headList.Count!=0)){ + foreach (var head in headList) + { + var isfee = MsWlPcDAL.GetFeeCount(head.GId); + if (isfee) + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "此票业务存在费用,请先删除费用才能删除此票业务!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + var isfen = MsWlPcDAL.GetFenCount(head.GId); + if (isfen) + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "此票业务存在分票,请先删除分票才能删除此票业务!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + + + else + { + var modb = new ModelObjectDBBill(); + DBResult result = modb.Delete(head, + "delete from tMsWlBsFixed where BillNo='" + head.BillNo + "'", + "delete from ch_fee where BsNo='" + head.GId + "'", + "delete from tcard_use where BillNo='" + head.BillNo + "'"); + MsSysBillNoSetDAL.DeleteBsNo(head.BillNo); + + + //var jsonRespose2 = new JsonResponse { Success = result.Success, Message = result.Message }; + //return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + } + var jsonRespose = new JsonResponse { Success =true, Message ="删除完成" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + } else + { + + + var jsonRespose = new JsonResponse { Success =false, Message ="没有需要删除的业务" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + } + + + + } public ContentResult HuiDan(string data,string jsonBody) diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js index 2980d4fa..260c6d18 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js @@ -199,7 +199,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.storeTruckNo = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlTruck', - proxy: { url: '/TruckMng/MsWlPc/GetTruckNoCanUse' }, + proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' }, //params: { condition: " A.truckno not in (select DISTINCT truckno from tMsWlPcHead where isnull(isend,0)=0 )"}, autoLoad: false }); @@ -208,6 +208,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.comboxTruckNo = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '车牌号', //multiSelect:true, + queryMode: 'remote', + minChars: 1, + queryParam: 'TruckNo', store: this.storeTruckNo, //readOnly:true, queryMode: 'remote', name: 'TruckNo', id: "TruckNo", @@ -272,13 +275,16 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.storeWmsTruckNo = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlTruck', - proxy: { url: '/TruckMng/MsWlPc/GetTruckNoList' } + proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' } }); this.storeWmsTruckNo.load({ params: { condition: "" } }); this.comboxWmsTruckNo = Ext.create('DsExt.ux.RefTableCombox', { store: this.storeWmsTruckNo, name: 'WmsTruckNo', + queryMode: 'remote', + minChars: 1, + queryParam: 'TruckNo', valueField: 'TruckNo', displayField: 'TruckNo', matchFieldWidth: true @@ -361,6 +367,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.storeRtnDocStatus2.add({ "FSTATUS": "无转港", "NAME": "无转港" }); this.storeRtnDocStatus2.add({ "FSTATUS": "已办", "NAME": "已办" }); + this.comboxRtnDocStatus2 = Ext.create('DsExt.ux.RefTableCombox', { store: this.storeRtnDocStatus2, valueField: 'FSTATUS', @@ -1811,7 +1818,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { text: "删除", id: "btndelete", //hidden: true, iconCls: "btndelete", handler: function (button, event) { - this.onDeleteClick(button, event); + this.onDeleteListClick(button, event); }, scope: this }, { @@ -1990,7 +1997,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { tooltip: '删除分票', iconCls: "btndelete", handler: function (button, event) { - this.onDeleteClick(button, event, 1); + this.onDeleteListClick(button, event, 1); }, scope: this }, { @@ -2716,6 +2723,64 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, this); }, //onDeleteClick + onDeleteListClick: function (button, event, type) { + if (type == 1) { + var selections = this.gridListFen.getSelectionModel().getSelection(); + + } else + var selections = this.gridList.getSelectionModel().getSelection(); + + var bodyAddDatas = []; + var icount = 0; + for (var i = 0; i < selections.length; i++) { + var rec = selections[i]; + var isdelete = true; + if (rec.data.FEESTATUS == true) { + Ext.Msg.show({ title: '警告', msg: '已费用锁定不允许删除业务!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; + } + if (isdelete) { + bodyAddDatas.push(rec); + icount = icount + 1; + } + } + + Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) { + if (btn == 'yes') { + Ext.Msg.wait('正在删除数据...'); + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Ajax.request({ + waitMsg: '正在删除数据...', + url: '/TruckMng/PcHeadEdit_WFSD/DeleteListHYRD', + params: { + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + if (type == 1) + this.storeListfen.reload(); + else + this.storeList.reload(); + 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) { + Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { + }, + scope: this + }); //end Ext.Ajax.request + } + }, this); + }, //onDeleteClick + onBsViewClick: function (button, event) { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js index e18b3eeb..dd865f03 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js @@ -1616,6 +1616,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { panelTest.SetEnd("0"); }; + this.CheckSaveQuery = new Ext.form.Checkbox({ + fieldLabel: '显示分票', //记忆查询条件 + checked: true, + width: 120 + }); + this.panelBtn = new Ext.Panel({ region: "north", tbar: [ @@ -1671,7 +1677,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { text: "删除", id: "btndelete", //hidden: true, iconCls: "btndelete", handler: function (button, event) { - this.onDeleteClick(button, event); + this.onDeleteListClick(button, event); }, scope: this }, { @@ -1765,7 +1771,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }] }], scope: this - } + }, this.CheckSaveQuery @@ -1850,7 +1856,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { tooltip: '删除分票', iconCls: "btndelete", handler: function (button, event) { - this.onDeleteClick(button, event, 1); + this.onDeleteListClick(button, event, 1); }, scope: this }, { @@ -2616,7 +2622,63 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, this); }, //onDeleteClick + onDeleteListClick: function (button, event, type) { + if (type == 1) { + var selections = this.gridListFen.getSelectionModel().getSelection(); + + } else + var selections = this.gridList.getSelectionModel().getSelection(); + var bodyAddDatas = []; + var icount = 0; + for (var i = 0; i < selections.length; i++) { + var rec = selections[i]; + var isdelete = true; + if (rec.data.FEESTATUS == true) { + Ext.Msg.show({ title: '警告', msg: '已费用锁定不允许删除业务!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; + } + if (isdelete) { + bodyAddDatas.push(rec); + icount = icount + 1; + } + } + + Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) { + if (btn == 'yes') { + Ext.Msg.wait('正在删除数据...'); + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Ajax.request({ + waitMsg: '正在删除数据...', + url: '/TruckMng/PcHeadEdit_WFSD/DeleteListHYRD', + params: { + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + if (type == 1) + this.storeListfen.reload(); + else + this.storeList.reload(); + 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) { + Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { + }, + scope: this + }); //end Ext.Ajax.request + } + }, this); + }, //onDeleteClick onDeleteFn: function (type) { if (type == 1) { var selections = this.gridListFen.getSelectionModel().getSelection(); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js index 45e8e927..a8a05c3c 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js @@ -1855,7 +1855,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); - this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); + + var myDate = new Date(); + var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); + this.formEdit.getForm().findField('ExpDate').setValue(mydatestr); this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); @@ -2057,7 +2060,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); - this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); + var myDate = new Date(); + var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); + this.formEdit.getForm().findField('ExpDate').setValue(mydatestr); this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js index daead01d..f17feb38 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js @@ -371,13 +371,16 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.storeTruckNo = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlTruck', - proxy: { url: '/TruckMng/MsWlPc/GetTruckNoList' } + proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' } }); this.storeTruckNo.load({ params: { condition: ""} }); this.comboxTruckNo = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '空箱车号', store: this.storeTruckNo, + queryMode: 'remote', + minChars: 1, + queryParam: 'TruckNo', name: 'TruckNo', valueField: 'TruckNo', displayField: 'TruckNo', @@ -396,7 +399,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.storeWmsTruckNo = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlTruck', - proxy: { url: '/TruckMng/MsWlPc/GetTruckNoList' } + proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' } }); this.storeWmsTruckNo.load({ params: { condition: "" } }); @@ -404,6 +407,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { fieldLabel: '入库车号', store: this.storeWmsTruckNo, name: 'WmsTruckNo', + queryMode: 'remote', + minChars: 1, + queryParam: 'TruckNo', valueField: 'TruckNo', displayField: 'TruckNo', matchFieldWidth: true, @@ -2433,7 +2439,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); - this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); + var myDate = new Date(); + var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); + this.formEdit.getForm().findField('ExpDate').setValue(mydatestr); this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); @@ -2629,7 +2637,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); - this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); + var myDate = new Date(); + var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); + this.formEdit.getForm().findField('ExpDate').setValue(mydatestr); this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); diff --git a/DispatchWeb/DispatchWeb.csproj.user b/DispatchWeb/DispatchWeb.csproj.user index af17a67a..e6a8406a 100644 --- a/DispatchWeb/DispatchWeb.csproj.user +++ b/DispatchWeb/DispatchWeb.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true