diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js index e60058dd..c13b0944 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js @@ -1153,10 +1153,10 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { 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); this.formEdit.getForm().findField('CFREIGHT').setValue(''); - } + //var PFREIGHT = this.formEdit.getForm().findField('PFREIGHT').getValue(); //var CFREIGHT = this.formEdit.getForm().findField('CFREIGHT').getValue(); //if ((CFREIGHT != '' && CFREIGHT != 0) && (PFREIGHT == '' || PFREIGHT == 0)){ @@ -1166,10 +1166,10 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { this.feechange(); } else if (BLFRT == 'CC') { - if (ttl != 0) { + this.formEdit.getForm().findField('CFREIGHT').setValue(ttl); this.formEdit.getForm().findField('PFREIGHT').setValue(''); - } + //var PFREIGHT = this.formEdit.getForm().findField('PFREIGHT').getValue(); //var CFREIGHT = this.formEdit.getForm().findField('CFREIGHT').getValue(); //if ((PFREIGHT != '' && PFREIGHT != 0) && (CFREIGHT == '' || CFREIGHT == 0)){ @@ -1554,18 +1554,18 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = parseFloatDef(newValue, 0); var BLFRT = this.formEdit.getForm().findField('BLFRT').getValue(); if (BLFRT == 'PP') { - 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(); } } @@ -1852,7 +1852,7 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = Add(pfreight, parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('POTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); } @@ -1873,7 +1873,7 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = Add(pfreight, parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('COTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('CTOTAL').setValue(ttl); } @@ -1901,7 +1901,7 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('POTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); } @@ -1922,7 +1922,7 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('COTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('CTOTAL').setValue(ttl); } @@ -1950,7 +1950,7 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(POTFREIGHT, 0)); var PCARRIEROT = this.formEdit.getForm().findField('PCARRIEROT').getValue(); ttl = Add(ttl, parseFloatDef(PCARRIEROT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); } @@ -1971,7 +1971,7 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(POTFREIGHT, 0)); var PCARRIEROT = this.formEdit.getForm().findField('CCARRIEROT').getValue(); ttl = Add(ttl, parseFloatDef(PCARRIEROT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('CTOTAL').setValue(ttl); } @@ -3834,11 +3834,11 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { 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(''); } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js index a1d25fc4..4df8b153 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireFenEdit.js @@ -1134,18 +1134,18 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { 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); 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(); } @@ -1548,18 +1548,18 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = parseFloatDef(newValue, 0); var BLFRT = this.formEdit.getForm().findField('BLFRT').getValue(); if (BLFRT == 'PP') { - 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(); } @@ -1847,7 +1847,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = Add(pfreight, parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('POTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); } @@ -1868,7 +1868,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = Add(pfreight, parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('COTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('CTOTAL').setValue(ttl); } @@ -1896,7 +1896,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('POTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); } @@ -1917,7 +1917,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(PCARRIEROT, 0)); var POTFREIGHT = this.formEdit.getForm().findField('COTFREIGHT').getValue(); ttl = Add(ttl, parseFloatDef(POTFREIGHT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('CTOTAL').setValue(ttl); } @@ -1945,7 +1945,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(POTFREIGHT, 0)); var PCARRIEROT = this.formEdit.getForm().findField('PCARRIEROT').getValue(); ttl = Add(ttl, parseFloatDef(PCARRIEROT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('PTOTAL').setValue(ttl); } @@ -1966,7 +1966,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var ttl = Add(parseFloatDef(pfreight, 0), parseFloatDef(POTFREIGHT, 0)); var PCARRIEROT = this.formEdit.getForm().findField('CCARRIEROT').getValue(); ttl = Add(ttl, parseFloatDef(PCARRIEROT, 0)); - if (ttl != 0) + this.formEdit.getForm().findField('CTOTAL').setValue(ttl); } @@ -3849,20 +3849,20 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, { var OTFRT = this.formEdit.getForm().findField('OTFRT').getValue(); if (OTFRT == 'PP') { - if (ttl != 0) + this.formEdit.getForm().findField('PCARRIEROT').setValue(ttl); } else if (OTFRT == 'CC') { - if (ttl != 0) + 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(''); } diff --git a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs index 32b4708b..2375b93a 100644 --- a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs @@ -104,6 +104,11 @@ namespace DSWeb.Areas.TruckMng.Controllers { return View(); } + public ActionResult PiLiangFeeEdit() + { + return View(); + } + [SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器 public ContentResult GetDataList ( int start, int limit, string sort, string condition ) @@ -444,6 +449,13 @@ namespace DSWeb.Areas.TruckMng.Controllers var jsonRespose = new JsonResponse { Success = false, Message = "工作号重复,不允许保存!" }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } + var ct2 = MsRptPcHeadEditDAL.GetRdCount("Gid<>'" + headData.gId + "' AND MblNoSe='" + headData.MblNoSe + "' and BSTYPE='" + headData.BsType + "' and BLTYPE<>'派车分票' "); + if (ct2 != 0) + { + isPost = false; + var jsonRespose = new JsonResponse { Success = false, Message = "工作号重复,不允许保存!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + } } if (opstatus == "add") @@ -1616,6 +1628,54 @@ namespace DSWeb.Areas.TruckMng.Controllers } + public ContentResult UpdateStatus(string data, string status) + { + var headData = JsonConvert.Deserialize>(data); + var errstr = ""; + var result = new DBResult(); + + if (headData != null) + { + foreach (var enumValue in headData) + { + var BSNO = enumValue.gId; + + result=MsRptPcHeadEditDAL.UpdateStatus(BSNO, status, Convert.ToString(Session["SHOWNAME"])); + + } + } + + + + var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + } + public ContentResult DeleteStatus(string data, string status) + { + var headData = JsonConvert.Deserialize>(data); + var errstr = ""; + var result = new DBResult(); + + if (headData != null) + { + foreach (var enumValue in headData) + { + var BSNO = enumValue.gId; + + result = MsRptPcHeadEditDAL.deleteStatus(BSNO, status); + + } + } + + + + var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + } + + } } diff --git a/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs b/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs index b3b7da8e..b6201a25 100644 --- a/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs +++ b/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs @@ -1990,6 +1990,24 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit if (ttlduidr == 0) data.DRDUISTATUS = "未对账"; else if (ttlduidr == ttldr) data.DRDUISTATUS = "已对账"; else if (ttlduidr != ttldr) data.DRDUISTATUS = "部分对账"; + + decimal ttlcr = 0; + decimal ttlduicr = 0; + if (reader["TTLCR"] != DBNull.Value) + ttlcr = Convert.ToDecimal(reader["TTLCR"]); + decimal ttlinvcr = 0; + if (reader["TTLINVCR"] != DBNull.Value) + ttlinvcr = Convert.ToDecimal(reader["TTLINVCR"]); + if (reader["TTLDUICR"] != DBNull.Value) + ttlduicr = Convert.ToDecimal(reader["TTLDUICR"]); + if (ttlinvcr == 0) data.CRINVSTATUS = "未开票"; + else if (ttlinvcr == ttlcr) data.CRINVSTATUS = "已开票"; + else if (ttlinvcr != ttlcr) data.CRINVSTATUS = "部分开票"; + + if (ttlduicr == 0) data.CRDUISTATUS = "未对账"; + else if (ttlduicr == ttldr) data.CRDUISTATUS = "已对账"; + else if (ttlduicr != ttldr) data.CRDUISTATUS = "部分对账"; + data.ISCANCEL = Convert.ToString(reader["ISCANCEL"]); #endregion headList.Add(data); @@ -2346,6 +2364,75 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit result.Message = "操作成功"; return result; } + public static DBResult UpdateStatus(string bsno, string status, string op) + { + var result = new DBResult(); + Database db = DatabaseFactory.CreateDatabase(); + using (var conn = db.CreateConnection()) + { + conn.Open(); + var tran = conn.BeginTransaction(); + try + { + var cmdDelete = db.GetSqlStringCommand("insert into op_status(ST_ID,BSNO,STATUS,ISCOMP,COMPTIME,INPUTTIME,STTYPE,COMPOP,INPUTBY) values(NEWID(),'" + bsno + "','"+ status + "',1,'" + DateTime.Now.ToString() + "','" + DateTime.Now.ToString() + "','1','" + op + "','" + op + "')"); + db.ExecuteNonQuery(cmdDelete, tran); + + + + tran.Commit(); + + } + catch (Exception) + { + tran.Rollback(); + + result.Success = false; + result.Message = "更新出现错误,请重试或联系系统管理员"; + + return result; + } + } + + + result.Success = true; + result.Message = "操作成功"; + return result; + } + public static DBResult deleteStatus(string bsno, string status) + { + var result = new DBResult(); + Database db = DatabaseFactory.CreateDatabase(); + using (var conn = db.CreateConnection()) + { + conn.Open(); + var tran = conn.BeginTransaction(); + try + { + var cmdDelete = db.GetSqlStringCommand("delete from op_status where BSNO='" + bsno + "' AND STATUS='" + status + "'"); + db.ExecuteNonQuery(cmdDelete, tran); + + + + tran.Commit(); + + } + catch (Exception) + { + tran.Rollback(); + + result.Success = false; + result.Message = "更新出现错误,请重试或联系系统管理员"; + + return result; + } + } + + + result.Success = true; + result.Message = "操作成功"; + return result; + } + #endregion #region 明细表 diff --git a/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs b/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs index 91eba6d6..9b233e12 100644 --- a/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs +++ b/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs @@ -2479,6 +2479,10 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs public string DRINVSTATUS { get; set; } public string DRDUISTATUS { get; set; } + + public string CRINVSTATUS { get; set; } + public string CRDUISTATUS { get; set; } + public string ISCANCEL { get; set; } #endregion diff --git a/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/PiLiangFeeEdit.aspx b/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/PiLiangFeeEdit.aspx new file mode 100644 index 00000000..6ad7c44e --- /dev/null +++ b/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/PiLiangFeeEdit.aspx @@ -0,0 +1,83 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/MvcShipping/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> + + + + + + + + + + + + + + + + + +
+
diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js index 260c6d18..7dacd9a2 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js @@ -124,6 +124,10 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { { name: 'ContainerNoSe', type: 'string' }, { name: 'DRFEESTATUS', type: 'string' }, { name: 'CRFEESTATUS', type: 'string' }, + { name: 'DRDUISTATUS', type: 'string' }, + { name: 'DRINVSTATUS', type: 'string' }, + { name: 'CRDUISTATUS', type: 'string' }, + { name: 'CRINVSTATUS', type: 'string' }, { name: 'ISSHUISHI', type: 'boolean' }, { name: 'ISGAOWEN', type: 'boolean' }, { name: 'ISXIANLIANG', type: 'boolean' }, @@ -366,6 +370,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.storeRtnDocStatus2.add({ "FSTATUS": "无装箱证明", "NAME": "无装箱证明" }); this.storeRtnDocStatus2.add({ "FSTATUS": "无转港", "NAME": "无转港" }); this.storeRtnDocStatus2.add({ "FSTATUS": "已办", "NAME": "已办" }); + this.storeRtnDocStatus2.add({ "FSTATUS": "1", "NAME": "1" }); + this.storeRtnDocStatus2.add({ "FSTATUS": "缺附件", "NAME": "缺附件" }); + this.storeRtnDocStatus2.add({ "FSTATUS": "完结", "NAME": "完结" }); this.comboxRtnDocStatus2 = Ext.create('DsExt.ux.RefTableCombox', { @@ -415,6 +422,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } }); + + this.ACCDATEEDIT = Ext.create('Ext.ux.form.MonthField', { + format: 'Y-m', + selectOnFocus: true + }); + this.column = [ { sortable: true, hidden: true, @@ -427,15 +440,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { dataIndex: 'ExpDate', header: '业务时间', width: 160, - // , - // editor: { - // //format: 'Y-m-d H:i:s', - // xtype: 'datetimefield' - // /*, - // labelWidth: 60, - // width: 220, - // name: 'STARTDATETIME'*/ - // } + editor: { + xtype: 'datefield', + format: 'Y-m-d', + selectOnFocus: true + }, + renderer: Ext.util.Format.dateRenderer('Y-m-d') }, { sortable: true, @@ -572,6 +582,78 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { return value; } }, + { + sortable: true, + id: '', + dataIndex: 'DRDUISTATUS', + header: '应收对账', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + if (value == '已对账') { + meta.tdCls = 'feestatus_pass'; + } else if (value == '部分对账') { + meta.tdCls = 'feestatus_refer'; + } else if (value == '未对账') { + } + return value; + } + }, + { + sortable: true, + id: '', + dataIndex: 'CRDUISTATUS', + header: '应付对账', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + if (value == '已对账') { + meta.tdCls = 'feestatus_pass'; + } else if (value == '部分对账') { + meta.tdCls = 'feestatus_refer'; + } else if (value == '未对账') { + } + return value; + } + }, + { + sortable: true, + id: '', + dataIndex: 'DRINVSTATUS', + header: '应收开票', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + //if (value == '已对账') { + // meta.tdCls = 'feestatus_pass'; + //} else if (value == '部分对账') { + // meta.tdCls = 'feestatus_refer'; + //} else if (value == '未对账') { + //} + return value; + } + }, + { + sortable: true, + id: '', + dataIndex: 'CRINVSTATUS', + header: '应付开票', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + //if (value == '已对账') { + // meta.tdCls = 'feestatus_pass'; + //} else if (value == '部分对账') { + // meta.tdCls = 'feestatus_refer'; + //} else if (value == '未对账') { + //} + return value; + } + }, { sortable: true, id: '', @@ -629,7 +711,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { sortable: true, dataIndex: 'ACCDATE', header: '会计期间', - width: 160 + width: 160, //'会计期间', + editor: this.ACCDATEEDIT, + renderer: Ext.util.Format.dateRenderer('Y-m') }, { sortable: true, @@ -1202,6 +1286,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { var ISCANCEL = record.get('ISCANCEL'); if (ISCANCEL == '1') return 'feestatus_Del'; + var DRDUISTATUS = record.get('DRDUISTATUS'); + if (DRDUISTATUS == '已对账') + return 'feestatus_pass'; + var OPSTATUS = record.get('OPSTATUS'); + if (OPSTATUS == '完结') + return 'feestatus_settle'; } }, // plugins: [this.cellEditing], @@ -1231,9 +1321,10 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { DsOpenEditWinAll('/TruckMng/PcHeadEdit_WFSD/HYRDEdit'); }, this); this.gridList.addListener('itemclick', function (dataview, record, item, index, e, b) { + this.SelectedstoreList = this.storeList; var ISMASTER = this.formSearch.getForm().findField('ONLYMASTER').getValue(); if (ISMASTER != '1') { - if (record.data.BLTYPE == '派车主票') { + if (record.data.BLTYPE == '派车主票' && this.CheckSaveQuery.checked) { this.SelectedRecord = record; var SelectGridtext = Ext.getCmp('SelectCustNo'); SelectGridtext.setText('所选主票:' + record.data.CUSTNO); @@ -1756,6 +1847,15 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { panelTest.SetEnd("0"); }; + + this.CheckSaveQuery = new Ext.form.Checkbox({ + fieldLabel: '显示分票', //记忆查询条件 + checked: true, + labelWidth: 55, + width: 80 + }); + + this.panelBtn = new Ext.Panel({ region: "north", tbar: [ @@ -1895,6 +1995,26 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { handler: function (menu, event) { _thisPcIndex.winModifyShow.show(); } + }, { + text: "费用编辑", //"费用编辑", + handler: function (menu, event) { + _thisPcIndex.onFeeEditClick(menu, event); + } + }, { + text: '完结', //"退舱", + id: "btnOpOver", + menu: [ + { + text: '确认完结', //"确认退舱", + handler: function (menu, event) { + _thisPcIndex.UpdateStatus('完结'); + } + }, { + text: '取消完结', //"取消退舱", + handler: function (menu, event) { + _thisPcIndex.DeleteStatus('完结'); + } + }] }, { text: '退单', //"退舱", id: "btnOpTui", @@ -1912,7 +2032,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }] }], scope: this - } + }, this.CheckSaveQuery @@ -2671,6 +2791,125 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, + + + UpdateStatus: function (status) { + var records = this.MainCB.selected.items; + if (records.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务! + return; + } + + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + if (rec.data.BSSTATUSREF == '锁定') { + Ext.Msg.show({ title: '警告', msg: '已业务锁定不能更新业务', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + } else { + + } + + } + + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + bodyAddDatas.push(rec); + } + + + Ext.MessageBox.confirm('提示', '确定更新完结吗?', function (btn) { + if (btn == 'yes') { + + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + //Ext.Msg.wait('正在' + cancelstr + '退舱...'); + Ext.Msg.wait('正在操作数据....'); + Ext.Ajax.request({ + waitMsg: '正在操作数据....', + url: '/TruckMng/PcHeadEdit_WFSD/UpdateStatus', + params: { + data: jsonbodyAddDatas, + status: status + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + this.onDsQuery(); + 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); + + + }, + DeleteStatus: function (status) { + var records = this.MainCB.selected.items; + if (records.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务! + return; + } + + + var bodyAddDatas = []; + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + bodyAddDatas.push(rec); + } + + + Ext.MessageBox.confirm('提示', '确定取消完结吗?', function (btn) { + if (btn == 'yes') { + + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + //Ext.Msg.wait('正在' + cancelstr + '退舱...'); + Ext.Msg.wait('正在操作数据....'); + Ext.Ajax.request({ + waitMsg: '正在操作数据....', + url: '/TruckMng/PcHeadEdit_WFSD/DeleteStatus', + params: { + data: jsonbodyAddDatas, + status: status + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + this.onDsQuery(); + 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: function (button, event, type) { if (type == 1) { var selections = this.gridListFen.getSelectionModel().getSelection(); @@ -3339,8 +3578,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { if (ReturnDate != '') ReturnDate = Ext.util.Format.date(ReturnDate, 'Y-m-d'); member.data.ReturnDate = ReturnDate; + var ExpDate = member.data.ExpDate; + if (ExpDate != '') + ExpDate = Ext.util.Format.date(ExpDate, 'Y-m-d'); + member.data.ExpDate = ExpDate; - + bodyList.push(member); @@ -3366,6 +3609,10 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { if (ReturnDate != '') ReturnDate = Ext.util.Format.date(ReturnDate, 'Y-m-d'); member.data.ReturnDate = ReturnDate; + var ExpDate = member.data.ExpDate; + if (ExpDate != '') + ExpDate = Ext.util.Format.date(ExpDate, 'Y-m-d'); + member.data.ExpDate = ExpDate; bodyList.push(member); }; } @@ -3694,6 +3941,24 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } + }, + + onFeeEditClick: function (menu, event) { + + var selections = this.gridList.getSelectionModel().getSelection(); + if (selections.length == 0) { + Ext.Msg.show({ title: '提示', msg:'请选择业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + this.SelectedstoreList = this.storeList; + var record = selections[0]; + + this.SelectedRecord = record; + this.OprationStatus = 'edit'; + DsOpenEditWin('/TruckMng/PcHeadEdit_WFSD/PiLiangFeeEdit'); + + + }, //#region 打印 diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js index dd865f03..0f6b6458 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js @@ -123,6 +123,10 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { { name: 'ContainerNoSe', type: 'string' }, { name: 'DRFEESTATUS', type: 'string' }, { name: 'CRFEESTATUS', type: 'string' }, + { name: 'DRDUISTATUS', type: 'string' }, + { name: 'DRINVSTATUS', type: 'string' }, + { name: 'CRDUISTATUS', type: 'string' }, + { name: 'CRINVSTATUS', type: 'string' }, { name: 'ISSHUISHI', type: 'boolean' }, { name: 'ISGAOWEN', type: 'boolean' }, { name: 'ISXIANLIANG', type: 'boolean' }, @@ -329,6 +333,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } }); + + this.ACCDATEEDIT = Ext.create('Ext.ux.form.MonthField', { + format: 'Y-m', + selectOnFocus: true + }); + this.column = [ { sortable: true, hidden: true, @@ -341,6 +351,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { dataIndex: 'ExpDate', header: '业务时间', width: 160, + editor: { + xtype: 'datefield', + format: 'Y-m-d', + selectOnFocus: true + }, + renderer: Ext.util.Format.dateRenderer('Y-m-d') }, { sortable: true, @@ -476,6 +492,78 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { return value; } }, + { + sortable: true, + id: '', + dataIndex: 'DRDUISTATUS', + header: '应收对账', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + if (value == '已对账') { + meta.tdCls = 'feestatus_pass'; + } else if (value == '部分对账') { + meta.tdCls = 'feestatus_refer'; + } else if (value == '未对账') { + } + return value; + } + }, + { + sortable: true, + id: '', + dataIndex: 'CRDUISTATUS', + header: '应付对账', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + if (value == '已对账') { + meta.tdCls = 'feestatus_pass'; + } else if (value == '部分对账') { + meta.tdCls = 'feestatus_refer'; + } else if (value == '未对账') { + } + return value; + } + }, + { + sortable: true, + id: '', + dataIndex: 'DRINVSTATUS', + header: '应收开票', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + //if (value == '已对账') { + // meta.tdCls = 'feestatus_pass'; + //} else if (value == '部分对账') { + // meta.tdCls = 'feestatus_refer'; + //} else if (value == '未对账') { + //} + return value; + } + }, + { + sortable: true, + id: '', + dataIndex: 'CRINVSTATUS', + header: '应付开票', //'应收对账', + align: 'center', + width: 60, + renderer: function (value, meta, record) { + + //if (value == '已对账') { + // meta.tdCls = 'feestatus_pass'; + //} else if (value == '部分对账') { + // meta.tdCls = 'feestatus_refer'; + //} else if (value == '未对账') { + //} + return value; + } + }, { sortable: true, id: '', @@ -533,7 +621,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { sortable: true, dataIndex: 'ACCDATE', header: '会计期间', - width: 160 + width: 160, //'会计期间', + editor: this.ACCDATEEDIT, + renderer: Ext.util.Format.dateRenderer('Y-m') }, { sortable: true, @@ -1028,6 +1118,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { var ISCANCEL = record.get('ISCANCEL'); if (ISCANCEL == '1') return 'feestatus_Del'; + var DRDUISTATUS = record.get('DRDUISTATUS'); + if (DRDUISTATUS == '已对账') + return 'feestatus_pass'; + var OPSTATUS = record.get('OPSTATUS'); + if (OPSTATUS == '完结') + return 'feestatus_settle'; } }, // plugins: [this.cellEditing], @@ -1059,7 +1155,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.gridList.addListener('itemclick', function (dataview, record, item, index, e, b) { var ISMASTER = this.formSearch.getForm().findField('ONLYMASTER').getValue(); if (ISMASTER != '1') { - if (record.data.BLTYPE == '派车主票') { + + + if (record.data.BLTYPE == '派车主票' && this.CheckSaveQuery.checked) { this.SelectedRecord = record; var SelectGridtext = Ext.getCmp('SelectCustNo'); SelectGridtext.setText('所选主票:' + record.data.CUSTNO); @@ -1288,6 +1386,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.storeRtnDocStatus.add({ "FSTATUS": "无装箱证明", "NAME": "无装箱证明" }); this.storeRtnDocStatus.add({ "FSTATUS": "无转港", "NAME": "无转港" }); this.storeRtnDocStatus.add({ "FSTATUS": "已办", "NAME": "已办" }); + this.storeRtnDocStatus2.add({ "FSTATUS": "1", "NAME": "1" }); + this.storeRtnDocStatus2.add({ "FSTATUS": "缺附件", "NAME": "缺附件" }); + this.storeRtnDocStatus2.add({ "FSTATUS": "完结", "NAME": "完结" }); this.comboxRtnDocStatus = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '集港单', //是否开垫付 @@ -1619,7 +1720,8 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { this.CheckSaveQuery = new Ext.form.Checkbox({ fieldLabel: '显示分票', //记忆查询条件 checked: true, - width: 120 + labelWidth: 55, + width: 80 }); this.panelBtn = new Ext.Panel({ @@ -1754,6 +1856,26 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { handler: function (menu, event) { _thisZXindex.winModifyShow.show(); } + }, { + text: "费用编辑", //"费用编辑", + handler: function (menu, event) { + _thisZXindex.onFeeEditClick(menu, event); + } + }, { + text: '完结', //"退舱", + id: "btnOpOver", + menu: [ + { + text: '确认完结', //"确认退舱", + handler: function (menu, event) { + _thisPcIndex.UpdateStatus('完结'); + } + }, { + text: '取消完结', //"取消退舱", + handler: function (menu, event) { + _thisPcIndex.DeleteStatus('完结'); + } + }] }, { text: '退单', //"退舱", id: "btnOpTui", @@ -2511,6 +2633,123 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, + UpdateStatus: function (status) { + var records = this.MainCB.selected.items; + if (records.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务! + return; + } + + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + if (rec.data.BSSTATUSREF == '锁定') { + Ext.Msg.show({ title: '警告', msg: '已业务锁定不能更新业务', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + } else { + + } + + } + + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + bodyAddDatas.push(rec); + } + + + Ext.MessageBox.confirm('提示', '确定更新完结吗?', function (btn) { + if (btn == 'yes') { + + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + //Ext.Msg.wait('正在' + cancelstr + '退舱...'); + Ext.Msg.wait('正在操作数据....'); + Ext.Ajax.request({ + waitMsg: '正在操作数据....', + url: '/TruckMng/PcHeadEdit_WFSD/UpdateStatus', + params: { + data: jsonbodyAddDatas, + status: status + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + this.onDsQuery(); + 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); + + + }, + DeleteStatus: function (status) { + var records = this.MainCB.selected.items; + if (records.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务! + return; + } + + + var bodyAddDatas = []; + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + bodyAddDatas.push(rec); + } + + + Ext.MessageBox.confirm('提示', '确定取消完结吗?', function (btn) { + if (btn == 'yes') { + + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + //Ext.Msg.wait('正在' + cancelstr + '退舱...'); + Ext.Msg.wait('正在操作数据....'); + Ext.Ajax.request({ + waitMsg: '正在操作数据....', + url: '/TruckMng/PcHeadEdit_WFSD/DeleteStatus', + params: { + data: jsonbodyAddDatas, + status: status + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + this.onDsQuery(); + 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: function (button, event, type) { if (type == 1) { var selections = this.gridListFen.getSelectionModel().getSelection(); @@ -3596,6 +3835,24 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } + }, + onFeeEditClick: function (menu, event) { + + var selections = this.gridList.getSelectionModel().getSelection(); + if (selections.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请选择业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + + this.SelectedstoreList = this.storeList; + var record = selections[0]; + + this.SelectedRecord = record; + this.OprationStatus = 'edit'; + DsOpenEditWin('/TruckMng/PcHeadEdit_WFSD/PiLiangFeeEdit'); + + + }, //#region 打印 diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js index a8a05c3c..7d115b55 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js @@ -587,6 +587,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.storeRtnDocStatus.add({ "FSTATUS": "无装箱证明", "NAME": "无装箱证明" }); this.storeRtnDocStatus.add({ "FSTATUS": "无转港", "NAME": "无转港" }); this.storeRtnDocStatus.add({ "FSTATUS": "已办", "NAME": "已办" }); + this.storeRtnDocStatus.add({ "FSTATUS": "1", "NAME": "1" }); + this.storeRtnDocStatus.add({ "FSTATUS": "缺附件", "NAME": "缺附件" }); + this.storeRtnDocStatus.add({ "FSTATUS": "完结", "NAME": "完结" }); this.comboxRtnDocStatus = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '集港单', //是否开垫付 @@ -1282,6 +1285,17 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.Print(); }, scope: this + }, + '-', + { + text: '刷新', + handler: function (button, event) { + this.opStatus = 'edit'; + var condition = " BillNo='" + this.editRecord.get('BillNo') + "'"; + + this.LoadData(this.opStatus, condition); + }, + scope: this } ] }); //end 按钮Toolbar @@ -2461,6 +2475,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { } } }); + + _thisPc.panelFee.onPostDetailClick(null,null,3); + }, //end save diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js index f17feb38..f1961f90 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js @@ -595,6 +595,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.storeRtnDocStatus.add({ "FSTATUS": "无装箱证明", "NAME": "无装箱证明" }); this.storeRtnDocStatus.add({ "FSTATUS": "无转港", "NAME": "无转港" }); this.storeRtnDocStatus.add({ "FSTATUS": "已办", "NAME": "已办" }); + this.storeRtnDocStatus.add({ "FSTATUS": "1", "NAME": "1" }); + this.storeRtnDocStatus.add({ "FSTATUS": "缺附件", "NAME": "缺附件" }); + this.storeRtnDocStatus.add({ "FSTATUS": "完结", "NAME": "完结" }); + this.comboxRtnDocStatus = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '集港单', //是否开垫付 @@ -1855,6 +1859,17 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.Print(); }, scope: this + }, + '-', + { + text: '刷新', + handler: function (button, event) { + this.opStatus = 'edit'; + var condition = " BillNo='" + this.editRecord.get('BillNo') + "'"; + + this.LoadData(this.opStatus, condition); + }, + scope: this } ] }); //end 按钮Toolbar @@ -3062,6 +3077,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { } } }); + _thisPc.panelFee.onPostDetailClick(null, null, 3); }, //end save onCreateFenClick: function () { diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/PiLiangPcFee.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/PiLiangPcFee.js new file mode 100644 index 00000000..2e5e914e --- /dev/null +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/PiLiangPcFee.js @@ -0,0 +1,614 @@ +Ext.namespace('Shipping'); + +Shipping.PiliangPcFee = function (config) { + Ext.applyIf(this, config); + this.initUIComponents(); + window.Shipping.PiliangPcFee.superclass.constructor.call(this); +}; + +Ext.extend(Shipping.PiliangPcFee, Ext.Panel, { + ParentWin: null, + OpStatus: 'add', + StoreList: null, + EditRecord: null, + region: 'north', + BsNo: '', + feeType:null, + StoreFee: null, + StoreFeeUnit: null, + StoreFeeCust:null, + + + initUIComponents: function () { + + + + this.formHead = Ext.widget('form', { + frame: true, + region: 'center', + bodyPadding: 1, + fieldDefaults: { + margins: '2 2 2 2', + labelAlign: 'right', + flex: 1, + labelWidth: 70, + msgTarget: 'qtip' + }, + items: [ + { + xtype: 'fieldset', + defaultType: 'textfield', + layout: 'anchor', + defaults: { + anchor: '100%' + }, + items: [ + { xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [{ + fieldLabel: '录入日期', + name: 'LrDate', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '记账日期', + name: 'JzDate', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '用户编码', + name: 'UserCode', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '卸货工厂', + name: 'FactoryAddr', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '组织编码', + name: 'OrgCode', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '组织名称', + name: 'OrgName', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'gId', + name: 'gId', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'PGid', + name: 'PGid', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'RefBillNo', + name: 'RefBillNo', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'RefBillNose', + name: 'RefBillNose', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'BillNo', + name: 'BillNo', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'Property', + name: 'Property', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'FEESTATUS', + name: 'FEESTATUS', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'UserName', + name: 'UserName', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: 'BsType', + name: 'BsType', value: '装箱', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '时间戳', + name: 'timeMark', flex: 0, hidden: true, margins: '0' + }, { + fieldLabel: '工作号', + name: 'CUSTNO' + }, { + fieldLabel: '委托单位', + name: 'CustomerName' + }, { + fieldLabel: '主提单号', + name: 'MblNoSe' + }, { + fieldLabel: '箱型', + name: 'ContainerType' + }, { + fieldLabel: '箱量', + name: 'ContainerQty' + } + ] + } + + + ] + + }] + + + }); //end this.formEdit + + //#region 按钮Toolbar + this.panelBtn = new Ext.Panel({ + region: "north", + tbar: [{ + id: 'btnEPrev', + text: "上一票", + // iconCls: "btnsave", + handler: function (button, event) { + this.PrevRecord(); + }, + scope: this + }, { + id: 'btnENext', + text: "下一票", + // iconCls: "btnsave", + handler: function (button, event) { + this.NextRecord(); + }, + scope: this + }] + }); //end 按钮Toolbar + //#endregion + this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsTruckMng.ux.CustomRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' } + }); + this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '委托单位', + typeAhead: true, + store: this.storeCustCode, + queryMode: 'remote', + minChars: 1, + queryParam: 'CODENAME', + name: 'CustName', + valueField: 'CustName', + displayField: 'CodeAndName', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _thisZXindex.onRefreshClick(); + } + } + } + }); + + this.formSearch = Ext.widget('form', { + frame: true, + region: 'north', + height: 40, + bodyPadding: 5, + fieldDefaults: { + margins: '2 2 2 2', + labelAlign: 'right', + flex: 1, + labelWidth: 90, + msgTarget: 'qtip' + }, + + items: [ + {//fieldset 1 + xtype: 'container', + defaultType: 'textfield', + layout: 'anchor', + defaults: { + anchor: '100%' + }, + items: [{ + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [{ + fieldLabel: '编号', + name: 'MblNo', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + this.onRefreshClick(); + } + } + } + }, this.comboxCustCode, { + fieldLabel: '从装箱日期', + format: 'Y-m-d', + xtype: 'datefield', + name: 'Fr_ArriveDate', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + this.onRefreshClick(); + } + } + } + }, { + fieldLabel: '到装箱日期', + format: 'Y-m-d', + xtype: 'datefield', + name: 'To_ArriveDate', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + this.onRefreshClick(); + } + } + } + }, { + xtype: 'button', + width: 90, + text: "执行查询", + iconCls: "btnrefresh", + handler: function (button, event) { + this.onRefreshClick(button, event); + }, + scope: this + } + ] + + }] + + }] + + }); + + Ext.define('PCmb', { + extend: 'Ext.data.Model', + idProperty: '', + fields: [ + { name: 'ywType', type: 'string' }, + { name: 'PcBillType', type: 'string' }, + { name: 'PcBillTypeREF', type: 'string' }, + { name: 'timeMark', type: 'number' }, + { name: 'gId', type: 'string' }, + { name: 'PGid', type: 'string' }, + { name: 'BLTYPE', type: 'string' }, + { name: 'ACCDATE', type: 'string' }, + { name: 'RowNumber', type: 'string' }, + { name: 'BillNo', type: 'string' }, + { name: 'ExpDate', type: 'string', }, + { name: 'GroupDate', type: 'string' }, + { name: 'EndPortDate', type: 'string' }, + { name: 'EtDate', type: 'string' }, + { name: 'VoyVeg', type: 'string' }, + { name: 'VoyVegSe', type: 'string' }, + { name: 'ArriveDate', type: 'string' }, + { name: 'ReturnDate', type: 'string' }, + { name: 'CustomerName', type: 'string' }, + { name: 'F_CustomerName', type: 'string' }, + { name: 'DdName', type: 'string' }, + { name: 'DrvName', type: 'string' }, + { name: 'TruckNo', type: 'string' }, + { name: 'MblNo', type: 'string' }, + { name: 'LinkMan', type: 'string' }, + { name: 'DstArea', type: 'string' }, + { name: 'DetiNation', type: 'string' }, + { name: 'ContainerQty', type: 'string' }, + { name: 'Ton', type: 'string' }, + { name: 'LoadCount', type: 'string' }, + { name: 'LoadPlace', type: 'string' }, + { name: 'TruckSpec', type: 'string' }, + { name: 'IsDouble', type: 'string' }, + { name: 'Property', type: 'string' }, + { name: 'YUNFEI', type: 'string' }, + { name: 'HCHJ', type: 'string' }, + { name: 'ZXF', type: 'string' }, + { name: 'DDF', type: 'string' }, + { name: 'QTFee', type: 'string' }, + { name: 'TotalFee', type: 'string' }, + { name: 'Remark', type: 'string' }, + { name: 'FEESTATUS', type: 'string' }, + { name: 'UserCode', type: 'string' }, + { name: 'UserName', type: 'string' }, + { name: 'OrgName', type: 'string' }, + { name: 'LrDate', type: 'string' }, + { name: 'PCSTATUSREF', type: 'string' }, + { name: 'RefBillNo', type: 'string' }, + { name: 'RefBillNose', type: 'string' }, + { name: 'MblNoSe', type: 'string' }, + { name: 'ContainerType', type: 'string' }, + { name: 'LinkTel', type: 'string' }, + { name: 'YardName', type: 'string' }, + { name: 'LinkManSe', type: 'string' }, + { name: 'LinkTelSe', type: 'string' }, + { name: 'RtnYardName', type: 'string' }, + { name: 'BsType', type: 'string' }, + { name: 'CustName', type: 'string' }, + { name: 'CustLikeManName', type: 'string' }, + { name: 'DispatchName', type: 'string' }, + { name: 'INVOICENO', type: 'string' }, + { name: 'KINDPKGS', type: 'string' }, + { name: 'CUSTNO', type: 'string' }, + { name: 'SalesName', type: 'string' }, + { name: 'RoadFee', type: 'number' }, + { name: 'GoodsName', type: 'string' }, + { name: 'RtnDocStatus', type: 'string' }, + { name: 'RtnDocTime', type: 'string' }, + { name: 'PORTLOAD', type: 'string' }, + { name: 'DESTINATION', type: 'string' }, + { name: 'SALECORPID', type: 'string' }, + { name: 'SALECORP', type: 'string' }, + { name: 'DCLASS', type: 'string' }, + { name: 'DUNNO', type: 'string' }, + { name: 'OPSTATUS', type: 'string' }, + { name: 'FEESTATUSREF', type: 'string' }, + { name: 'BSSTATUSREF', type: 'string' }, + { name: 'COLOR', type: 'string' }, + { name: 'FuelPrice', type: 'number' }, + { name: 'FuelQty', type: 'number' }, + { name: 'RealMil', type: 'number' }, + { name: 'RatedMil', type: 'number' }, + { name: 'RatedFuel', type: 'number' }, + { name: 'RealFuel', type: 'number' }, + { name: 'DetiNationSe', type: 'string' }, + { name: 'FactoryAddrSe', type: 'string' }, + { name: 'ContainerNoSe', type: 'string' }, + { name: 'DRFEESTATUS', type: 'string' }, + { name: 'CRFEESTATUS', type: 'string' }, + { name: 'DRDUISTATUS', type: 'string' }, + { name: 'DRINVSTATUS', type: 'string' }, + { name: 'CRDUISTATUS', type: 'string' }, + { name: 'CRINVSTATUS', type: 'string' }, + { name: 'ISSHUISHI', type: 'boolean' }, + { name: 'ISGAOWEN', type: 'boolean' }, + { name: 'ISXIANLIANG', type: 'boolean' }, + { name: 'ISCHECHUAN', type: 'boolean' }, + { name: 'ISHAIWU', type: 'boolean' }, + { name: 'ISFENGXIANG', type: 'boolean' }, + { name: 'ISWEISHENBAO', type: 'boolean' }, + { name: 'ISBAOGUAN', type: 'boolean' }, + { name: 'ISRIZHAO', type: 'boolean' }, + { name: 'ISBOCHUAN', type: 'boolean' }, + { name: 'ISPINGTAI', type: 'boolean' }, + { name: 'FrTruckNo', type: 'string' }, + { name: 'FrDrvName', type: 'string' }, + { name: 'WmsTruckNo', type: 'string' }, + { name: 'WmsDrvName', type: 'string' }, + { name: 'ChangedReson', type: 'string' }, + { name: 'LoadFactory', type: 'string' }, + { name: 'DrvCode', type: 'string' }, + { name: 'EtDateSe', type: 'string' }, + { name: 'ContainerNo', type: 'string' }, + { name: 'SealNo', type: 'string' }, + { name: 'YardCodeSe', type: 'string' }, + { name: 'YardNameSe', type: 'string' }, + { name: 'DstAreaSe', type: 'string' }, + { name: 'SealNoSe', type: 'string' }, + { name: 'ContainerTypeSe', type: 'string' }, + { name: 'ISCANCEL', type: 'string' }, + { name: 'CargoID', type: 'string' } + + ] + }); + + + this.storeList = Ext.create('Ext.data.Store', { + pageSize: this.PageSize, + model: 'PCmb', + remoteSort: true, + proxy: { + type: 'ajax', + url: '/TruckMng/PcHeadEdit_WFSD/GetHYRDDataList', + reader: { + id: '', + root: 'data', + totalProperty: 'totalCount' + } + } + }); + + this.panelTop = new Ext.Panel({ + layout: "border", + region: "north", + collapsed: false, + collapsible: true, + height: 140, + id: "BillHeadSeae", + items: [this.panelBtn, this.formSearch, this.formHead] + }); + + this.panelFee = new Shipping.FeeEditGrid({ + region: 'center', + layout: 'border' + }); + + + + + this.panelFee.stroplb = 'tMsWlPcHead'; + + this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CustomerName" }); + this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "F_CustomerName" }); + + this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } }); + this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } }); + this.panelFee.storeFeeNameRef.load({ params: { condition: "ISTRUCKING='1' " } }); + + + Ext.apply(this, { + items: [this.panelTop, this.panelFee] + }); + + parentWin = window.parent.opener; + this.InitData(); + }, + + + //#region 加载事件 + InitData: function () { + this.opStatus = 'add'; + var condition = ''; + _this = this; + if (parentWin) { + var ret = parentWin.OprationSwap(); + this.opStatus = ret[0]; + this.StoreList = ret[1]; + this.EditRecord = ret[2]; + } + + this.BsNo = this.EditRecord.get('gId'); + + + this.LoadData(); + + + }, //end InitData + + LoadData: function () { + this.formHead.getForm().loadRecord(this.EditRecord); + this.panelFee.EditRecord = this.EditRecord; + var bsno = this.EditRecord.get('gId'); + var bltype = this.EditRecord.get('BLTYPE'); + + + this.panelFee.strBSNO = bsno; + this.panelFee.StoreDateCurr.load({ params: { optype: "tMsWlPcHead", bsno: bsno } }); + this.panelFee.StoreUnit.load({ params: { bsno: bsno, bstype: "tMsWlPcHead" } }); + this.panelFee.strbltype = bltype; + if (bltype == '派车主票') { + this.panelFee.LoadDrChFee2("FEETYPE=1 AND BSNO IN (SELECT BSNO FROM V_OP_BS WHERE MASTERNO='" + bsno + "')"); + this.panelFee.LoadCrChFee2("FEETYPE=2 AND BSNO IN (SELECT BSNO FROM V_OP_BS WHERE MASTERNO='" + bsno + "')"); + } else { + this.panelFee.storeDrChFee.load({ params: { billno: bsno, type: 1, optype: "tMsWlPcHead" } }); + this.panelFee.storeCrChFee.load({ params: { billno: bsno, type: 2, optype: "tMsWlPcHead" } }); + } + this.panelFee.storeBodySum.load({ + params: { bsno: bsno, bltype: bltype, optype: "tMsWlPcHead" }, + callback: function (r, options, success) { + if (success) { + _thisfee.setTotalHead(); + } + } + }); + this.panelFee.storeChFeeGain.load({ params: { bsno: bsno, bltype: bltype, optype: "普通货", oplb: "tMsWlPcHead" } }); + this.panelFee.storeBodyList_GuDingFeeWeiHu.load(); + if (this.panelFee.strbltype == '拼箱主票' || this.panelFee.strbltype == '派车主票') { + this.panelFee.tabTotal.add(this.panelFee.panelCustMaster); + this.panelFee.storeChFeeMasterGain.load({ params: { bsno: bsno } }); + } + + + + + + + }, // end LoadDate + //#region 打印 + Print: function () { + + var basicForm = this.formHead.getForm(); + var billNo = basicForm.findField('BSNO').value; + if (billNo == '*' || billNo == '') { + Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + return; + } + + var printType = 'MSOPSEAE'; + var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_seae WHERE BSNO = '" + billNo + "'"; + var sql2 = ""; + var sql3 = ""; + var sql4 = ""; + var sql5 = ""; + var sql6 = ""; + + PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6); + + }, + //#endregion + + onRefreshClick: function (button, event) { + var sql = this.getCondition(); + this.storeList.load({ + params: { start: 0, limit: this.PageSize, sort: '', condition: sql }, + callback: function (r, options, success) { + if (success) { + if (this.storeList.getCount() > 0) { + this.EditRecord = this.storeList.getAt(0); + this.BsNo = this.EditRecord.get('BSNO'); + this.LoadData(); + } else { + + } + } + }, + waitMsg: "正在查询数据...", + scope: this + }); + }, + getCondition: function () { + var form = this.formSearch.getForm(); + if (!form.isValid()) { + Ext.Msg.alert('提示', '查询条件赋值错误,请检查。'); + return ''; + } + + var sql = ''; + + //#region formSearch 查询面板 + //编号包括(主提单号) + var MblNo = form.findField('MblNo').getValue(); + sql = sql + getAndConSql(sql, MblNo, " (MblNo like '%" + MblNo + "%' or MBLNOse like '%" + MblNo + "%')"); + + //客户名称 + var CUSTOMERNAME = form.findField('CustName').getValue(); + sql = sql + getAndConSql(sql, CUSTOMERNAME, " customername='" + CUSTOMERNAME + "'"); //到港日期 + + var Fr_ArriveDate = form.findField('Fr_ArriveDate').getRawValue(); + sql = sql + getAndConSql(sql, Fr_ArriveDate, " ArriveDate>='" + Fr_ArriveDate + "'"); + + var To_ArriveDate = form.findField('To_ArriveDate').getRawValue(); + sql = sql + getAndConSql(sql, To_ArriveDate, " ArriveDate<='" + To_ArriveDate + " 23:59:59'"); + + + return sql; + }, + + PrevRecord: function () { + var j = this.StoreList.indexOf(this.EditRecord); + if (j == 0) { + Ext.Msg.show({ title: '警告', msg: '已是最前一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + + return; + } + if (j == this.StoreList.count) { + Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + + return; + + } + + + j = j - 1; + this.EditRecord = this.StoreList.getAt(j); + this.BsNo = this.EditRecord.get('BSNO'); + this.LoadData(); + }, + NextRecord: function () { + var j = this.StoreList.indexOf(this.EditRecord); + + if (j == (this.StoreList.data.length - 1)) { + Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + + return; + + } + j = j + 1; + this.EditRecord = this.StoreList.getAt(j); + this.BsNo = this.EditRecord.get('BSNO'); + this.LoadData(); + + }, + getModifyStatus: function () { + return this.panelFee.getModifyStatus(); + }, + feeType: function () { + return this.panelFee.feeType; + }, + StoreFee: function () { + return this.panelFee.StoreFee; + }, + StoreFeeUnit: function () { + return this.panelFee.StoreFeeUnit; + }, + StoreFeeCust: function () { + return this.panelFee.StoreFeeCust; + } + + +}); + diff --git a/DSWeb/DSWeb.csproj b/DSWeb/DSWeb.csproj index 981590e4..3c1cbaa0 100644 --- a/DSWeb/DSWeb.csproj +++ b/DSWeb/DSWeb.csproj @@ -4106,6 +4106,7 @@ + @@ -5275,6 +5276,7 @@ +