SVN r1151

SVN-Revision: r1151
This commit is contained in:
tdx
2026-04-16 10:46:22 +00:00
parent 51e9f54b99
commit 561acbf8ab
3 changed files with 160 additions and 85 deletions
+80 -40
View File
@@ -1,43 +1,39 @@
using System;
using DevExpress.Data;
using DevExpress.Utils;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraTab;
using DevExpress.XtraTreeList.Columns;
using DevExpress.XtraTreeList.Nodes;
using Lskj.Business;
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.BrowserSetting;
using Lskj.Control.Model;
using Lskj.Core;
using Lskj.Data;
using Lskj.Model;
using Lskj.PubBill.Model;
using Lskj.Util;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lskj.Control;
using Lskj.Model;
using Lskj.Control.Model;
using Lskj.Util;
using Lskj.Business.Impl;
using DevExpress.XtraGrid.Views.Grid;
using Lskj.Data;
using DevExpress.XtraBars;
using DevExpress.XtraTab;
using DevExpress.XtraEditors;
using System.Collections;
using Lskj.PubBill.Model;
using DevExpress.Data;
using DevExpress.XtraGrid.Columns;
using System.IO;
using Lskj.Business;
using System.Text.RegularExpressions;
using DevExpress.XtraTreeList.Nodes;
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraGrid.Views.Base;
using System.Threading;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Lskj.Core;
using DevExpress.XtraTreeList.Columns;
using System.Threading.Tasks;
using DevExpress.Utils;
using System.Data.SqlClient;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using Lskj.Control.BrowserSetting;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lskj.PubBill
{
@@ -824,7 +820,7 @@ namespace Lskj.PubBill
//父节点编号
(this.gcMain as TreeGridControlEx).TreeListObj.ParentFieldName = "tap_pid";
(this.gcMain as TreeGridControlEx).SortField = this.BillModel.DetailOrderField;
(this.gcMain as TreeGridControlEx).TreeTableDragCondition = this.BillModel.TreeTableDragCondition;
//(this.gcMain as TreeGridControlEx).TreeTableDragCondition = this.BillModel.TreeTableDragCondition;
(this.gcMain as TreeGridControlEx).InitializedragState();
}
@@ -5616,7 +5612,18 @@ namespace Lskj.PubBill
string tipMsg = string.Empty;
string billNo = this.lblOrderNo.Text.Trim();
#region API
if (ApiHelper.IsExecEventApi(Interface.Api.OperateEvent.BeforeModuleAuditStateChange, this.SysModel.ModuleCode, 0))
{
ApiHelper apiHelper = new ApiHelper(this.SysModel.ModuleCode, billNo, this.BillModel.PrimaryKey, this.BillModel.MasterTable, 0);
apiHelper.OnEvent(Interface.Api.OperateEvent.BeforeModuleAuditStateChange, Interface.Api.ActionType.Submit);//提交
if (!apiHelper.apiHandler.GetApiSuccess(apiHelper.apiHandlerModels))
{
MessageUtil.Show(ResourceKeys.ApplyFault + "\r\n" + apiHelper.apiResutMsg);
return;
}
}
#endregion
int result = BillImpl.BillApply(this.SysModel.ModuleCode, billNo, "", 1, out tipMsg, comfirm);
WaitForm.HideForm();
switch (result)
@@ -9705,7 +9712,7 @@ namespace Lskj.PubBill
string postUrl = "{0}Api/FileUploadApi.ashx?moduleId={1}&idValue={2}&folder={3}&totsize={4}&position={5}&filename={6}&method={7}";
Dictionary<string, string> headerDic = new Dictionary<string, string>();
headerDic.Add("Authorization", $"Bearer {token}");
postUrl = string.Format(postUrl, SystemInfo.Instance.OAUrl, this.SysModel.ModuleCode, this.lblOrderNo.Text, "UploadFilesTemp", fileBytes.Length, 0, HttpUtility.UrlEncode($"{Guid.NewGuid()}_{Path.GetFileName(_imageEdit.CurrentImagePath)}"), "DoWebUpload");
postUrl = string.Format(postUrl, SystemInfo.Instance.OAUrl, this.SysModel.ModuleCode, this.lblOrderNo.Text, "UploadFilesTemp", fileBytes.Length, 0, System.Web.HttpUtility.UrlEncode($"{Guid.NewGuid()}_{Path.GetFileName(_imageEdit.CurrentImagePath)}"), "DoWebUpload");
HttpTools.setting("application/x-www-form-urlencoded", null, null);
HttpWebResponse webResponse = HttpTools.Post(postUrl, fileBase64Str, null, headerDic, HttpTools.Method.POST, out CookieCollection cookieCollection, out string result);
if (webResponse != null && !string.IsNullOrEmpty(result))
@@ -9811,5 +9818,38 @@ namespace Lskj.PubBill
/// 设置打印按钮条件
/// </summary>
/// <param name="dataRow"></param>
public bool SetPrintButton(DataRow rowItem)
public bool SetPrintButton(DataRow rowItem)
{
try
{
bool result = false;
//判断打印按钮条件
if (!string.IsNullOrWhiteSpace(this.BillModel.PrintingConditions))
{
if (rowItem == null) return result;
string cond = ReplaceHelper.ReplaceRowParam(rowItem, this.BillModel.PrintingConditions);
if (cond.StartsWith("@") || cond.StartsWith("!"))
{
result = "1".Equals(BaseImpl.GetDefaultValue(cond));
}
else
{
result = ReplaceHelper.ReplaceRowParamCond(rowItem, cond);
}
return result;
}
else
{
return true;
}
}
catch (Exception ex)
{
return false;
}
}
}
}