diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index dbdd897f..768b691d 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -1300,11 +1300,6 @@ namespace DSWeb.Common.DB public string ORREASON { get; set; } - public bool? IsReplacePayment { get; set; } - public string ReplacePaymentStatus { get; set; } - public string ReplacePaymentCORPID { get; set; } - public string ReplacePaymentOPNAME { get; set; } - public DateTime? ReplacePaymentOPTIME { get; set; } #region 外键 => 导航属性,ManyToMany @@ -1367,8 +1362,34 @@ namespace DSWeb.Common.DB public string WORKBILLNO { get; set; } public int? PRINTCOUNT { get; set; } public bool? ISREVINV { get; set; } + + + public bool? IsReplacePayment { get; set; } + public string ReplacePaymentStatus { get; set; } + public string ReplacePaymentCORPID { get; set; } + public string ReplacePaymentOPNAME { get; set; } + public DateTime? ReplacePaymentOPTIME { get; set; } } + [Table("ch_fee_File")] + public partial class ch_fee_File_md + { + [Key] + public string GID { get; set; } + public string BillNo { get; set; } + public int? File_Type { get; set; } + public string File_Name { get; set; } + public string File_Path { get; set; } + public DateTime? CreateTime { get; set; } + public DateTime? UpdateTime { get; set; } + public string Operator { get; set; } + public int? DelFlag { get; set; } + public string File_OriginalName { get; set; } + public string File_DocNo { get; set; } + public string File_DocType { get; set; } + } + + [Table("company")] public class company_md { diff --git a/DSWeb.Common/DB/CommonDataContext.cs b/DSWeb.Common/DB/CommonDataContext.cs index a2c01db1..cbb0fd9f 100644 --- a/DSWeb.Common/DB/CommonDataContext.cs +++ b/DSWeb.Common/DB/CommonDataContext.cs @@ -87,7 +87,8 @@ namespace DSWeb.Common.DB public DbSet ch_fee_settlement { get; set; } public DbSet ch_fee_recvapplication { get; set; } public DbSet ch_fee_payapplication { get; set; } - + public DbSet ch_fee_File { get; set; } + public DbSet sys_bank { get; set; } public DbSet op_aire_bill { get; set; } diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs index 670232f6..71ce60f4 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs @@ -27,6 +27,7 @@ using DSWeb.Areas.Account.Models.ChfeeDetail; using DSWeb.Areas.Account.Models.BSNOLB; using DSWeb.Areas.MvcShipping.Helper; using DSWeb.Common.DB; +using static com.sun.net.httpserver.Authenticator; namespace DSWeb.Areas.Account.Controllers { @@ -261,10 +262,10 @@ namespace DSWeb.Areas.Account.Controllers public ContentResult Save(string opstatus, string data) { - if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") + var canlogin = BasicDataRefDAL.CheckLogin(Session); + if (!canlogin.Success) { - var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + return (ContentResult)canlogin.Data; } var headData = JsonConvert.Deserialize(data); @@ -293,18 +294,14 @@ namespace DSWeb.Areas.Account.Controllers { headData.DbOperationType = DbOperationType.DbotDel; } - var ct = ChpayapplicationDAL.GetPayRdCount("GID<>'" + headData.GID + "' AND BILLNO='" + headData.BILLNO + "' "); - if (ct != 0) - { - var jsonRespose0 = new JsonResponse - { - Success = false, - Message = "付费申请编号重复,不允许保存!" - }; + - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose0) }; - } + var cansave = CanSave(ref headData); + + if (!cansave.Success) { + return new ContentResult() { Content = JsonConvert.Serialize(cansave) }; + } var BILLNO = headData.BILLNO; if (headData.INVDATE == "") headData.INVDATE = null; @@ -332,7 +329,40 @@ namespace DSWeb.Areas.Account.Controllers } - public ContentResult AddDetail(string bill, string data, string curr, string storeCurrExrate,string salecorp) + private static JsonResponse CanSave(ref ChPayapplication headData) + { + var error = ""; + var result = new JsonResponse { Success = true }; + + var ct = ChpayapplicationDAL.GetPayRdCount("GID<>'" + headData.GID + "' AND BILLNO='" + headData.BILLNO + "' "); + if (ct != 0) + { + error += "付费申请编号重复,不允许保存!"; + } + + if (headData.IsReplacePayment == "1" || headData.IsReplacePayment == "true") { + if (string.IsNullOrWhiteSpace(headData.ReplacePaymentCORPID)) + { + error += "垫付时必须指定垫付公司;"; + } + else { + headData.ReplacePaymentStatus = "未垫付"; + } + } + else{ + headData.ReplacePaymentStatus = ""; + headData.ReplacePaymentCORPID = ""; + } + + + if (error != "") { + result.Success = false; + result.Message = error; + } + return result; + } + + public ContentResult AddDetail(string bill, string data, string curr, string storeCurrExrate,string salecorp) { if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") { @@ -511,6 +541,123 @@ namespace DSWeb.Areas.Account.Controllers } + #region 垫付和取消垫付 + public ContentResult DoReplacePayment( string data,string dotype) + { + var canlogin = BasicDataRefDAL.CheckLogin(Session); + if (!canlogin.Success) + { + return (ContentResult)canlogin.Data; + } + + var _headData = JsonConvert.Deserialize(data); + + var cdc = new CommonDataContext(); + var headData = cdc.ch_fee_payapplication.FirstOrDefault(x => x.BILLNO == data); + + if (headData == null || !string.IsNullOrWhiteSpace(headData.BILLNO)) + { + + } + else { + var jsonRespose0 = new JsonResponse + { + Success = false, + Message = "没有找到该业务" + }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose0) }; + } + + //执行 + if (dotype == "do") + { + var _r = CanDo(headData); + + if (_r.Success != true) { + return new ContentResult() { Content = JsonConvert.Serialize(_r) }; + } + + headData.ReplacePaymentStatus = "已垫付"; + headData.ReplacePaymentOPTIME = DateTime.Now; + headData.ReplacePaymentOPNAME = Convert.ToString(Session["SHOWNAME"]).ToString().Trim(); + } + //取消 + if (dotype == "undo") + { + var _r = CanUnDo(headData); + + if (_r.Success != true) + { + return new ContentResult() { Content = JsonConvert.Serialize(_r) }; + } + + headData.ReplacePaymentStatus = "未垫付"; + headData.ReplacePaymentOPTIME = DateTime.Now; + headData.ReplacePaymentOPNAME = Convert.ToString(Session["SHOWNAME"]).ToString().Trim(); + } + var jsonRespose = new JsonResponse + { + Success = true, + Message = "执行成功", + Data = ChpayapplicationDAL.GetData(" BILLNO='" + headData.BILLNO + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])) + }; + + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + } + + /// + /// 判断能否垫付 + /// + /// + /// + public JsonResponse CanDo(ch_fee_payapplication_md headData) { + //必须是审核通过状态的业务 + //必须有至少一条附件 + var error = ""; + + if (headData.BILLSTATUS != 0) { + error += "只有【审核通过】状态的付费申请才能执行垫付操作;"; + } + + var cdc = new CommonDataContext(); + + var filelist = cdc.ch_fee_File.Where(x => x.BillNo == headData.BILLNO).ToList(); + + if (filelist == null || filelist.Count == 0) { + error += "必须上传相应的附件"; + } + + var result = new JsonResponse { Success = true }; + + if (error != "") { + result.Success = false; + result.Message = error; + } + return result; + } + + public JsonResponse CanUnDo(ch_fee_payapplication_md headData) + { + //必须是审核通过状态的业务 + var error = ""; + + if (headData.BILLSTATUS != 0) + { + error += "只有【审核通过】状态的付费申请才能执行垫付操作;"; + } + + var result = new JsonResponse { Success = true }; + + if (error != "") + { + result.Success = false; + result.Message = error; + } + return result; + } + #endregion + #region 提交和撤销审核 public ContentResult SubmitAudit(string bill) { diff --git a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs index f46d3bda..3c8f1f54 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs @@ -22,6 +22,8 @@ using DSWeb.MvcShipping.DAL.MsBaseInfoDAL; using DSWeb.Areas.Account.Models.TruckChfee_do_detail; using System.Data.SqlClient; using DSWeb.Areas.Account.Models.BSNOLB; +using DSWeb.Common.DB; +using System.Linq; namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication { @@ -90,6 +92,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication strSql.Append(",cm.SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP"); strSql.Append(",(select top 1 description from info_client where SHORTNAME=cm.CUSTOMERNAME) as CUSTOMERFULLNAME"); + strSql.Append(",IsReplacePayment,ReplacePaymentStatus,ReplacePaymentCORPID,ReplacePaymentOPNAME,ReplacePaymentOPTIME"); + strSql.Append(" FROM ch_fee_payapplication cm where 1=1 "); if (!string.IsNullOrEmpty(strCondition)) @@ -171,6 +175,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication strSql.Append(",dbo.GetBalNoByPayNo(i.BILLNO) as BALBILLNO,i.ISPRINT,i.PRINTCOUNT,i.wxpush,i.STLRATE,i.STLAMOUNT,i.STLCURR "); strSql.Append(",i.SALECORPID,(select [NAME] from [company] where GID=i.SALECORPID) as SALECORP,i.ISREVINV"); strSql.Append(",(select top 1 description from info_client where SHORTNAME=i.CUSTOMERNAME) as CUSTOMERFULLNAME"); + strSql.Append(",IsReplacePayment,ReplacePaymentStatus,ReplacePaymentCORPID,ReplacePaymentOPNAME,ReplacePaymentOPTIME"); strSql.Append(" FROM ch_fee_payapplication i left join workflow_using wu on wu.bsno=i.billno where 1=1 "); if (isaudit == "3") { @@ -333,6 +338,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication data.SALECORP = Convert.ToString(reader["SALECORP"]); data.SALECORPID = Convert.ToString(reader["SALECORPID"]); + data.IsReplacePayment = Convert.ToString(reader["IsReplacePayment"]); + data.ReplacePaymentStatus = Convert.ToString(reader["ReplacePaymentStatus"]); + data.ReplacePaymentCORPID = Convert.ToString(reader["ReplacePaymentCORPID"]); + data.ReplacePaymentOPNAME = Convert.ToString(reader["ReplacePaymentOPNAME"]); + data.ReplacePaymentOPTIME = Convert.ToString(reader["ReplacePaymentOPTIME"]); #endregion headList.Add(data); } @@ -2588,7 +2598,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication return result; } - + public static DBResult SubmitAuditBack(string WorkFlowName, String USERID, String bill) { var result = new DBResult(); diff --git a/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs b/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs index 40b663fe..67d2e02b 100644 --- a/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs +++ b/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs @@ -589,6 +589,16 @@ namespace DSWeb.Areas.Account.Models.Chfee_Payapplication } public Int32 PRINTCOUNT { get;set;} + [ModelDB] + public string IsReplacePayment { get; set; } + [ModelDB] + public string ReplacePaymentStatus { get; set; } + [ModelDB] + public string ReplacePaymentCORPID { get; set; } + [ModelDB] + public string ReplacePaymentOPNAME { get; set; } + [ModelDB] + public string ReplacePaymentOPTIME { get; set; } #endregion diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationBLEdit.js index 1e16018b..5fb99edf 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationBLEdit.js @@ -35,18 +35,25 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { this.formname = "MsChInvoiceapplicationBLEdit"; //页面名称 - this.bsnosql = getUrlParam('bsnosql'); this.bsCurr = getUrlParam('bsCurr'); this.bsCust = getUrlParam('bsCust'); this.isfeename = getUrlParam('isfeename'); this.salecorp = getUrlParam('salecorp'); + + this.INVOICEPORT = ""; this.INVAPPPRINTAFTERAUDIT = 0; - parentWin = window.parent.opener; - this.mainWin = getMainForm(parentWin); + if (!this.bsnosql) { + parentWin = window.parent.opener; + this.mainWin = getMainForm(parentWin); + } else { + parentWin = window.parent.opener.opener; + this.mainWin = getMainForm(parentWin); + } + //#region 枚举参照相关(编辑form) this.comboxPUSHMODE = getEnumcombox({ diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js index ef48a1e5..9e32af30 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js @@ -43,6 +43,15 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { this.bsnosql = getUrlParam('bsnosql'); this.bsCust = getUrlParam('bsCust'); + mainWin = {}; + if (!this.bsnosql) { + parentWin = window.parent.opener; + mainWin = getMainForm(parentWin); + } else { + parentWin = window.parent.opener.opener; + mainWin = getMainForm(parentWin); + } + Ext.define('DsShipping.ux.MsClientGroup', { extend: 'Ext.data.Model', fields: [ @@ -237,6 +246,23 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { displayField: 'NAME' }); + this.storeReplacePaymentCORPID = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsCompanysEntity', + proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' } + }); + //this.storeReplacePaymentCORPID.load({ params: { condition: "" } }); + this.storeReplacePaymentCORPID.loadData(mainWin.GetPubStore("Company").data.items); + this.storeReplacePaymentCORPID.add({ GID: '', NAME: '' }); + this.comboxReplacePaymentCORPID = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '垫付公司', //'委托分公司', + store: this.storeReplacePaymentCORPID, + forceSelection: true, + readOnly: false, + name: 'ReplacePaymentCORPID', + valueField: 'GID', + displayField: 'NAME' + }); + //编辑form this.formEdit = Ext.widget('form', { region: 'center', @@ -442,6 +468,34 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { name: 'REMARK' }] + }, { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + xtype: "checkbox", //checkbox控件 + name: "IsReplacePayment", + fieldLabel: "是否垫付", + inputValue: "true", //选中的值 + uncheckedValue: "false" //未选中的值 + }, this.comboxReplacePaymentCORPID + , { + name: "ReplacePaymentStatus", + fieldLabel: "垫付状态", + readOnly: true + }, { + name: "ReplacePaymentOPNAME", + fieldLabel: "垫付操作人", + readOnly:true + }, { + xtype: 'datefield', + format: 'Y-m-d H:i:s', + name: "ReplacePaymentOPTIME", + fieldLabel: "垫付时间", + readOnly: true + }, {xtype:'hiddenfield',flex:1}] + } ]//end items(fieldset 1) }//end fieldset 1 @@ -535,6 +589,22 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { this.onSubmitAuditBackClick(); }, scope: this + }, '-', { + id: 'btnDoReplacePayment', + text: Zi.LAN.DoReplacePayment, + tooltip: Zi.LAN.DoReplacePayment, //执行垫付 + handler: function (button, event) { + this.onReplacePayment(1); + }, + scope: this + }, { + id: 'btnUnDoReplacePayment', + text: Zi.LAN.UnDoReplacePayment, + tooltip: Zi.LAN.UnDoReplacePayment, //取消垫付 + handler: function (button, event) { + this.onReplacePayment(2); + }, + scope: this }, '-', { text: Zi.LAN.delete1, //删除 @@ -2169,7 +2239,7 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 185, + height: 210, items: [this.panelBtn, this.formEdit] }); @@ -3719,13 +3789,10 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { return; }; - - if (billstatus != '1' && billstatus != '6') { // 提示 当前状态无法删除此单据 Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.nodelete, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; - } _this = this; @@ -3770,6 +3837,65 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { }, + onReplacePayment: function (type){ + //1执行垫付 //2取消执行垫付 + var Duino = this.formEdit.getForm().findField('BILLNO').getValue(); + + var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue(); + + if (Duino == '*') {//提示', msg: '请先保存付费申请,然后才能提交审核! + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.baocunshenq, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + }; + + if (billstatus != '0' ) { + // 提示 当前状态无法删除此单据 + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: '只有【审核通过】状态的申请单可以执行垫付操作', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + + var basicForm = this.formEdit.getForm(); + + var data = basicForm.getValues(); + + var dotype = ""; + if (type == 1) { + dotype = "do"; + } + if (type == 2) { + dotype = "undo"; + } + + Ext.Msg.wait(Zi.LAN.nowdelete); + Ext.Ajax.request({ + waitMsg: Zi.LAN.nowdelete, + url: '/Account/Chfee_payapplication/DoReplacePayment', + params: { + data: Ext.JSON.encode(data), + dotype: dotype + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + if (this.opStatus == 'edit') + condition = " BILLNO='" + this.editRecord.get('BILLNO') + "'"; + + this.LoadData(this.opStatus, condition); + } + else { + Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } + }, + failure: function (response, options) {//警告', msg: '服务器响应出错,请重试' + Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { + }, + scope: this + }); //end Ext.Ajax.request + }, onRefreshClick: function (button, event) { var sql = this.getCondition(); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBalEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBalEdit.js index 21642fd9..d614889f 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBalEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBalEdit.js @@ -47,6 +47,8 @@ Ext.extend(Shipping.MsChPayapplicationBalEdit, Ext.Panel, { this.StoreClientGroup.load({ params: { condition: "PCORPNAME<>'' " } }); + + //#region 编辑form //枚举参照相关(编辑form) @@ -204,7 +206,7 @@ Ext.extend(Shipping.MsChPayapplicationBalEdit, Ext.Panel, { margins: '2 2 2 2', labelAlign: 'right', flex: 1, - labelWidth: 90, + labelWidth: 86, msgTarget: 'qtip' }, @@ -368,7 +370,6 @@ Ext.extend(Shipping.MsChPayapplicationBalEdit, Ext.Panel, { flex: 4, name: 'REMARK' }] - } ]//end items(fieldset 1) }//end fieldset 1 @@ -1607,7 +1608,7 @@ Ext.extend(Shipping.MsChPayapplicationBalEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 185, + height: 205, items: [this.panelBtn, this.formEdit] }); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationIndex.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationIndex.js index 2710a208..196ceb80 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationIndex.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationIndex.js @@ -21,6 +21,11 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, { this.sqlcontext = ""; this.worksql = getUrlParam('worksql'); + parentWin = window.parent; + mainWin = getMainForm(parentWin); + + _this = this; + this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', { model: 'MsOP', proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' } @@ -528,6 +533,40 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, { return "是"; } } + }, { + sortable: true, + dataIndex: 'IsReplacePayment', + header: '是否需垫付', + renderer: function (value, cellmeta) { + if (value == 'True' || value == 'true' || value == '1') { + return "√"; + } else return ""; + } + }, { + sortable: true, + dataIndex: 'ReplacePaymentStatus', + header: '垫付状态' + }, { + sortable: true, + dataIndex: 'ReplacePaymentCORPID', + header: '垫付分公司', + renderer: function (value, cellmeta) { + if (value) { + var corpname = _this.storeReplacePaymentCORPID.find('GID', value); + if (corpname) { + corp = _this.storeReplacePaymentCORPID.getAt(corpname); + return corp.data.NAME; + } + } + } + }, { + sortable: true, + dataIndex: 'ReplacePaymentOPNAME', + header: '垫付操作人' + }, { + sortable: true, + dataIndex: 'ReplacePaymentOPTIME', + header: '垫付时间' } ]; @@ -584,7 +623,7 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, { //#region formSearch //#region formSearch枚举参照相关 - _this = this; + this.storeBILLSTATUS = Ext.create('DsExt.ux.RefEnumStore', {}); this.storeBILLSTATUS.load({ params: { enumTypeId: 97005} }); @@ -618,13 +657,75 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, { } } } + }); + //this.storeIsReplacePayment = Ext.create('DsExt.ux.RefTableStore', { + // model: 'DsTruckMng.ux.GeneralValue', + // proxy: { url: '/CommMng/BasicDataRef/GeneralSelect' } + //}); + //this.storeIsReplacePayment.add({ GID: '', GVALUE: '' }); + //this.storeIsReplacePayment.add({ GID: '是', GVALUE: '是' }); + //this.storeIsReplacePayment.add({ GID: '否', GVALUE: '否' }); + //this.comboxIsReplacePayment = Ext.create('DsExt.ux.RefTableCombox', { + // fieldLabel: '是否需垫付', + // store: this.storeIsReplacePayment, + // queryMode: 'local', + // name: 'IsReplacePayment', + // valueField: 'GID', + // displayField: 'GVALUE', + // enableKeyEvents: true, + // listeners: { + // keyup: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + // } + //}); + + this.storeReplacePaymentStatus = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsTruckMng.ux.GeneralValue', + proxy: { url: '/CommMng/BasicDataRef/GeneralSelect' } + }); + this.storeReplacePaymentStatus.add({ GID: '', GVALUE: '' }); + this.storeReplacePaymentStatus.add({ GID: '未垫付', GVALUE: '未垫付' }); + this.storeReplacePaymentStatus.add({ GID: '已垫付', GVALUE: '已垫付' }); + this.comboxReplacePaymentStatus = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '垫付状态', + store: this.storeReplacePaymentStatus, + queryMode: 'local', + name: 'ReplacePaymentStatus', + valueField: 'GID', + displayField: 'GVALUE', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); + this.storeReplacePaymentCORPID = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsCompanysEntity', + proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' } + }); + //this.storeReplacePaymentCORPID.load({ params: { condition: "" } }); + this.storeReplacePaymentCORPID.loadData(mainWin.GetPubStore("Company").data.items); + this.storeReplacePaymentCORPID.add({GID:'',NAME:''}); + this.comboxReplacePaymentCORPID = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '垫付公司', //'委托分公司', + store: this.storeReplacePaymentCORPID, + forceSelection: true, + readOnly: false, + name: 'ReplacePaymentCORPID', + valueField: 'GID', + displayField: 'NAME' + }); //#endregion - this.formSearch = Ext.widget('form', { frame: true, region: 'center', @@ -744,9 +845,14 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, { } } } - }, { + }, + this.comboxReplacePaymentStatus + , + this.comboxReplacePaymentCORPID + , + { xtype: 'hiddenfield', - flex: 3.82 + flex: 1.82 } ] } @@ -1254,6 +1360,14 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, { sql = sql + getAndConSql(sql, expDateEnd, "APPLYTIME <='" + expDateEnd + " 23:59:59'"); + var ReplacePaymentStatus = form.findField('ReplacePaymentStatus').getRawValue(); + sql = sql + getAndConSql(sql, ReplacePaymentStatus, "ReplacePaymentStatus ='" + ReplacePaymentStatus + "' "); + + var ReplacePaymentCORPID = form.findField('ReplacePaymentCORPID').getRawValue(); + sql = sql + getAndConSql(sql, ReplacePaymentCORPID, "ReplacePaymentCORPID ='" + ReplacePaymentCORPID + "' "); + + + return sql; }, OprationSwap: function () { diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js index 0d8651af..3b3f6621 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js @@ -52,18 +52,23 @@ { name: 'BALBILLNO', type: 'string' }, { name: 'ISPRINT', type: 'string' }, { name: 'PRINTCOUNT', type: 'number' }, - { name: 'PREAMOUNTRMB', type: 'number' }, - { name: 'PREAMOUNTUSD', type: 'number' }, - { name: 'PREAMOUNTOT', type: 'number' }, - { name: 'BALAMOUNTRMB', type: 'number' }, - { name: 'BALAMOUNTUSD', type: 'number' }, - { name: 'BALAMOUNTOT', type: 'number' }, + { name: 'PREAMOUNTRMB', type: 'number' }, + { name: 'PREAMOUNTUSD', type: 'number' }, + { name: 'PREAMOUNTOT', type: 'number' }, + { name: 'BALAMOUNTRMB', type: 'number' }, + { name: 'BALAMOUNTUSD', type: 'number' }, + { name: 'BALAMOUNTOT', type: 'number' }, { name: 'IsAudit', type: 'number' }, { name: 'PUSHMODE', type: 'string' }, { name: 'PUSHMOBILE', type: 'string' }, { name: 'PUSHEMAIL', type: 'string' }, { name: 'PUSHMODEREF', type: 'string' }, - { name: 'CUSTOMERFULLNAME', type: 'string' } + { name: 'CUSTOMERFULLNAME', type: 'string' }, + { name: 'IsReplacePayment', type: 'string' }, + { name: 'ReplacePaymentStatus', type: 'string' }, + { name: 'ReplacePaymentCORPID', type: 'string' }, + { name: 'ReplacePaymentOPNAME', type: 'string' }, + { name: 'ReplacePaymentOPTIME', type: 'string' } ] }); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js index 3ea4d118..226f4a96 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js @@ -145,6 +145,10 @@ Zi.LAN.xypiao = "下一票"; Zi.LAN.saveandclose = "保存并关闭"; Zi.LAN.saveandnew = "保存并新建"; Zi.LAN.cxsh = "撤销审核"; + +Zi.LAN.DoReplacePayment = "执行垫付"; +Zi.LAN.UnDoReplacePayment = "取消垫付"; + Zi.LAN.chatts = "微信推送"; Zi.LAN.fyduixiang = "费用对象"; Zi.LAN.sjmoney = "申请金额"; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js index 16c9909b..d3bfc652 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js @@ -147,6 +147,10 @@ Zi.LAN.xypiao = "下一票"; Zi.LAN.saveandclose = "保存并关闭"; Zi.LAN.saveandnew = "保存并新建"; Zi.LAN.cxsh = "撤销审核"; + +Zi.LAN.DoReplacePayment = "执行垫付"; +Zi.LAN.UnDoReplacePayment = "取消垫付"; + Zi.LAN.chatts = "微信推送"; Zi.LAN.fyduixiang = "费用对象"; Zi.LAN.sjmoney = "申请金额"; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js index d9091c4f..2967c9fe 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js @@ -952,3 +952,48 @@ Ext.define('OPUserInfo', { { name: 'EMAIL1', type: 'string' } ] }); + +Ext.define('MsCompanysEntity', { + extend: 'Ext.data.Model', + idProperty: 'GID', + fields: [ + { name: 'GID', type: 'string' }, //GID + { name: 'CODENAME', type: 'string' }, //CODENAME + { name: 'NAME', type: 'string' }, //NAME + { name: 'FULLNAME', type: 'string' }, //FULLNAME + { name: 'ENNAME', type: 'string' }, //公司英文名称 + { name: 'ADDRESS', type: 'string' }, //ADDRESS + { name: 'ENADDRESS', type: 'string' }, //公司英文地址 + { name: 'POSTCODE', type: 'string' }, //POSTCODE + { name: 'OFFICEPHONE', type: 'string' }, //OFFICEPHONE + { name: 'FAX', type: 'string' }, //FAX + { name: 'EMAIL', type: 'string' }, //EMAIL + { name: 'WEBSITEURL', type: 'string' }, //WEBSITEURL + { name: 'LICENSECODE', type: 'string' }, //LICENSECODE + { name: 'TAXCODE', type: 'string' }, //TAXCODE + //{name: 'LOGO', type: 'byte[]' }, //徽标 + { name: 'CREATEUSER', type: 'string' }, //CREATEUSER + { name: 'CREATETIME', type: 'DateTime' }, //CREATETIME + { name: 'MODIFIEDUSER', type: 'string' }, //更新人gid + { name: 'MODIFIEDTIME', type: 'DateTime' }, //更新时间 + { name: 'ISDELETED', type: 'bool' }, //ISDELETED + { name: 'ISDISABLE', type: 'bool' }, //ISDISABLE + { name: 'PARENTID', type: 'string' }, //PARENTID + { name: 'BILLRISES', type: 'string' }, //发票抬头 + { name: 'CHEQUEPAYABLE', type: 'string' }, //支票抬头 + { name: 'PRTHEADXML1', type: 'string' }, //打印抬头1 + { name: 'PRTHEADXML2', type: 'string' }, //打印抬头2 + { name: 'PRTHEADXML3', type: 'string' }, //打印抬头3 + { name: 'PRTHEADXML4', type: 'string' }, //打印抬头4 + { name: 'PRTHEADXML5', type: 'string' }, //打印抬头5 + { name: 'BANKSHEAD', type: 'string' }, //BANKSHEAD + { name: 'LOCALCURR', type: 'string' }, //本地货币 + { name: 'WORKFLOWMSG', type: 'string' }, //是否启用消息提示 + { name: 'GPSUSER', type: 'string' }, //GPSUser + { name: 'GPSPASSWORD', type: 'string' }, //GPSPassWord + { name: 'ORGANIZATIONCODE', type: 'string' }, + { name: 'MODIFIEDUSERNAME', type: 'string' }, + { name: 'DBNAME', type: 'string' }, + { name: 'LOGOURL', type: 'string' } + ] +}); \ No newline at end of file diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js index 85e4069c..c3708dee 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MainForm/MainForm.js @@ -1003,8 +1003,15 @@ Ext.extend(Shipping.MainForm, Ext.Panel, { this.PubStore_CODE_FEE.load(); + ////_this.LoadPubStore("INFOCLIENT_ALL"); - + + + this.PubStore_Company = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsCompanysEntity', + proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' } + }); + this.PubStore_Company.load(); //window.storeCustomerAll = Ext.create('DsExt.ux.RefTableStore', { // model: 'DsShipping.ux.CustomRefModel', @@ -1290,6 +1297,9 @@ Ext.extend(Shipping.MainForm, Ext.Panel, { result = this.PubStore_CodeGoodsList; } + if (STORENAME == "Company") { + result = this.PubStore_Company; + } return result; diff --git a/DSWeb/bin/DSWeb.rar b/DSWeb/bin/DSWeb.rar deleted file mode 100644 index 4aaeec89..00000000 Binary files a/DSWeb/bin/DSWeb.rar and /dev/null differ diff --git a/DSWeb/sql/update.mdb b/DSWeb/sql/update.mdb index 612a8b87..b2e01372 100644 Binary files a/DSWeb/sql/update.mdb and b/DSWeb/sql/update.mdb differ