2023-11-13

This commit is contained in:
李鹏飞 2023-11-13 17:46:33 +08:00
parent 833dc56cb6
commit 6464e225c3
7 changed files with 142 additions and 48 deletions

Binary file not shown.

View File

@ -1464,6 +1464,7 @@
<Content Include="res\assets\js\swiper.min.js" />
<Content Include="res\assets\js\video-7.15.0.min.js" />
<Content Include="res\assets\js\world.js" />
<Content Include="res\DataInTable.js" />
<Content Include="res\HJGL\InfoQuery\css\Chart.css" />
<Content Include="res\images\idcard.png" />
<Content Include="res\images\Signature0.png" />

View File

@ -355,10 +355,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
protected void btnPrint_Click(object sender, EventArgs e)
{
Print(Grid1.SelectedRowIDArray);
HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
if (Print(Grid1.SelectedRowIDArray))
{
HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
}
}
private void Print(string[] PipelineComponentId)
private bool Print(string[] PipelineComponentId)
{
BLL.FastReportService.ResetData();
@ -371,7 +374,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
else
{
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
return;
return false;
}
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
@ -383,6 +386,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
return true;
}
/// <summary>

View File

@ -8,7 +8,7 @@ using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
using System.Threading.Tasks;
namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
public partial class WeldReportEdit : PageBase
@ -254,6 +254,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
//dt = this.LINQToDataTable(task);
}
task = task.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointNum).ToList();
Grid1.RecordCount = task.Count;
Grid1.DataSource = task;
Grid1.DataBind();
@ -322,33 +323,23 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
return StateName;
}
#region
/// <summary>
/// 编辑焊接日报
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
// 检查用户权限
private bool HasPermission()
{
return CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_WeldTaskMenuId, Const.BtnSave);
}
// 获取焊接信息
private List<Model.View_HJGL_WeldJoint> GetWeldJointView()
{
return Funs.DB.View_HJGL_WeldJoint
.Where(x => x.WeldingDailyId == WeldingDailyId)
.OrderBy(x => x.PipelineCode)
.ThenBy(x => x.WeldJointCode)
.ToList();
}
// 创建新的焊接日报
private Model.HJGL_WeldingDaily CreateNewWeldingDaily()
{
if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId,
Const.HJGL_WeldTaskMenuId, Const.BtnSave))
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
if (BLL.WeldingDailyService.IsExistWeldingDailyCode(this.txtWeldingDailyCode.Text,
!string.IsNullOrEmpty(this.WeldingDailyId) ? this.WeldingDailyId : "", CurrUser.LoginProjectId))
{
ShowNotify("日报编号已存在,请重新录入", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.txtWeldingDate.Text) ||
string.IsNullOrEmpty(this.txtWeldingDailyCode.Text.Trim()))
{
ShowNotify("日报告号、焊接日期不能为空", MessageBoxIcon.Warning);
return;
}
Model.HJGL_WeldingDaily newWeldingDaily = new Model.HJGL_WeldingDaily
{
WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim(),
@ -364,14 +355,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
newWeldingDaily.UnitWorkId = this.drpUnitWork.SelectedValue;
}
//List<Model.SpWeldingDailyItem> GetWeldingDailyItem = this.CollectGridJointInfo();
string errlog = string.Empty;
var weldJointView = (from x in BLL.Funs.DB.View_HJGL_WeldJoint where x.WeldingDailyId == this.WeldingDailyId orderby x.PipelineCode, x.WeldJointCode
select x).ToList();
string eventArg = string.Empty;
return newWeldingDaily;
}
//焊工资质判断
private void CheckWelderQualification()
{
#region
//foreach (var item in GetWeldingDailyItem)
@ -464,6 +452,42 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
//}
#endregion
}
/// <summary>
/// 编辑焊接日报
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (!HasPermission())
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
if (BLL.WeldingDailyService.IsExistWeldingDailyCode(this.txtWeldingDailyCode.Text,
!string.IsNullOrEmpty(this.WeldingDailyId) ? this.WeldingDailyId : "", CurrUser.LoginProjectId))
{
ShowNotify("日报编号已存在,请重新录入", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.txtWeldingDate.Text) ||
string.IsNullOrEmpty(this.txtWeldingDailyCode.Text.Trim()))
{
ShowNotify("日报告号、焊接日期不能为空", MessageBoxIcon.Warning);
return;
}
// 创建新的焊接日报
var newWeldingDaily = CreateNewWeldingDaily();
// 获取焊接信息
var weldJointView = GetWeldJointView();
string errlog = string.Empty;
string eventArg = string.Empty;
// 焊工资质判断
// CheckWelderQualification(weldJointView);
if (eventArg == string.Empty) //焊工焊接的所有焊口资质都符合要求)
{
@ -646,9 +670,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
#endregion
ChanggeState(); //更新焊口属性
System.Threading.Tasks.Task.Run(() =>
{
ChanggeState();
});
//更新焊口属性
if (string.IsNullOrEmpty(errlog))
{
ShowNotify("保存成功!", MessageBoxIcon.Success);

View File

@ -195,7 +195,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
}
//SaveGrid1();
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#region

View File

@ -34,6 +34,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
ContractId = Request.Params["ContractId"];
GridTable.Columns.Add("Id");
GridTable.Columns.Add("SerialNumber");
ListItem[] list = new ListItem[8];
list[0] = new ListItem("主项号", "MainItemCode");
list[1] = new ListItem("主项名称", "MainItemName");
@ -316,6 +317,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
foreach (var item in sublist)
{
DataRow row = tempTable.NewRow();
row["SerialNumber"] = item.SerialNumber;
row["Id"] = item.Id;
row["MainItemCode"] = item.MainItemCode;
row["MainItemName"] = item.MainItemName;
@ -362,7 +364,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
GridTable.Rows.Add(newRow);
}
Grid1.RecordCount = count;
Grid1.DataSource = GridTable;
Grid1.DataSource = GridTable.AsEnumerable().OrderBy(x => x["SerialNumber"].ToString(), new CustomComparer());;
Grid1.DataBind();
}
}

View File

@ -0,0 +1,60 @@

function parse(y) {
var box = document.getElementById("box");
//获取进度条div的宽度
var x = box.style.width;
x = parseInt(x) + 1;
y = y + 1;
//将y值加上百分号赋值给box的宽度。这样每次+1就可以实现进度条占父容器的100%;
box.style.width = y + "%";
//将y值加上百分号并赋值给显示下载百分比的div上
document.getElementById("box").innerHTML = y + "%";
//判断当y已经100的时候也就是进度条的宽度和父容器的宽度一致的时候停止。
if (y >= 100) {
document.getElementById("box").innerHTML = "100%";
}
}
function printX() {
var userid = document.getElementById('id-inputEl').value;
F.ui.Window2.show();
parse(0);
var begin = setInterval(function () {
PageMethods.getPercent(userid,function (result) {
parse(result);
if (result >= 100) {
F.ui.Window2.hide();
clearInterval(begin);
print();
}
});
}, 1000 );
y = 0;
}
function print() {
PageMethods.
setTimeout(function () {
var message = document.getElementById('message-inputEl').value;
console.log(message);
notify(message);
}, 1000); // 1000毫秒即1秒
}
// 通知框
function notify(msg) {
F.notify({
message: msg,
messageIcon: 'information',
target: '_top',
header: false,
displayMilliseconds: 3 * 1000,
positionX: 'center',
positionY: 'center'
});
}