|
|
@ -46,9 +46,9 @@ namespace SCP.Views.SupplierData |
|
|
|
public void Search(Action<IQueryable<V_TM_HYANTOLIN_REVIEW>> p_action) |
|
|
|
{ |
|
|
|
V_TM_HYANTOLIN_REVIEW _entity = new V_TM_HYANTOLIN_REVIEW(); |
|
|
|
_entity.State = 0; |
|
|
|
|
|
|
|
_entity.ReviewBillNum = TXT_ReviewBillNum.Text; |
|
|
|
_entity.State = int.Parse(DDL_State.SelectedValue); |
|
|
|
_entity.BillStateList = GetStateList(); |
|
|
|
_entity.BarCode = TXT_BarCode.Text; |
|
|
|
_entity.PartCode = TXT_PartCode.Text; |
|
|
|
_entity.Batch = TXT_Batch.Text; |
|
|
@ -83,62 +83,19 @@ namespace SCP.Views.SupplierData |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
private List<int> GetStateList() |
|
|
|
{ |
|
|
|
List<int> lsValue = new List<int>(); |
|
|
|
string[] values = ckb.SelectedValueArray; |
|
|
|
foreach(var itm in values) |
|
|
|
{ |
|
|
|
lsValue.Add(int.Parse(itm)); |
|
|
|
} |
|
|
|
|
|
|
|
return lsValue; |
|
|
|
} |
|
|
|
protected void btnOutput_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
//DataSet _ds = new DataSet();
|
|
|
|
//int[] _selections = Grid_TM_HYANTOLIN_REVIEW.SelectedRowIndexArray;
|
|
|
|
//List<V_TM_HYANTOLIN_REVIEW> _list = new List<V_TM_HYANTOLIN_REVIEW>();
|
|
|
|
//V_TM_HYANTOLIN_REVIEW _entity = new V_TM_HYANTOLIN_REVIEW();
|
|
|
|
//for (int i = 0, count = Grid_TM_HYANTOLIN_REVIEW.Rows.Count; i < count; i++)
|
|
|
|
//{
|
|
|
|
// if (_selections.Contains(i))
|
|
|
|
// {
|
|
|
|
// GridRow row = Grid_TM_HYANTOLIN_REVIEW.Rows[i];
|
|
|
|
// object[] rowDataKeys = Grid_TM_HYANTOLIN_REVIEW.DataKeys[i];
|
|
|
|
// V_TM_HYANTOLIN_REVIEW _review = new V_TM_HYANTOLIN_REVIEW();
|
|
|
|
// _review.ReviewBillNum = rowDataKeys[3] as string;
|
|
|
|
// _review.RelationReviewNo = rowDataKeys[4] as string;
|
|
|
|
// _review.BarCode = rowDataKeys[7] as string;
|
|
|
|
// _review.PartCode = rowDataKeys[8] as string;
|
|
|
|
// _review.Batch = rowDataKeys[9] as string;
|
|
|
|
// _review.ProjectId = rowDataKeys[10] as string;
|
|
|
|
// _review.Qty = ConvertHelper.To<decimal>(rowDataKeys[11]);
|
|
|
|
// _review.BadCouse = rowDataKeys[12] as string;
|
|
|
|
// _review.ReviewResult = rowDataKeys[13] as string;
|
|
|
|
// _review.UltimateDepart = rowDataKeys[14] as string;
|
|
|
|
// _review.UltimateName = rowDataKeys[15] as string;
|
|
|
|
// _review.ClaimAmount = ConvertHelper.To<decimal>(rowDataKeys[16]);
|
|
|
|
// //_review.OperName = rowDataKeys[17] as string;
|
|
|
|
// //_review.BillDate = ConvertHelper.To<DateTime?>(rowDataKeys[18]);
|
|
|
|
// //_review.CreateTime = ConvertHelper.To<DateTime?>(rowDataKeys[19]);
|
|
|
|
// //_review.ReviewTime = ConvertHelper.To<DateTime?>(rowDataKeys[20]);
|
|
|
|
// //_review.VendId = rowDataKeys[23] as string;
|
|
|
|
// //_review.VendName = rowDataKeys[24] as string;
|
|
|
|
// //_review.Currency = rowDataKeys[25] as string;
|
|
|
|
// //_review.Unit = rowDataKeys[26] as string;
|
|
|
|
// //_review.PartDesc = rowDataKeys[27] as string;
|
|
|
|
// _list.Add(_review);
|
|
|
|
// //UID,Guid,State,ReviewBillNum,RelationReviewNo,
|
|
|
|
// //ReviewType,ReviewSite,BarCode,PartCode,Batch,ProjectId,Qty,BadCouse,ReviewResult,
|
|
|
|
// //UltimateDepart,UltimateName,ClaimAmount,OperName,BillDate,CreateTime,ReviewTime
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//if (_list.Count > 0)
|
|
|
|
//{
|
|
|
|
// _entity.VendName = _list[0].VendName;
|
|
|
|
//}
|
|
|
|
|
|
|
|
//var _dt = ConvertHelper.ToDataTable(_list);
|
|
|
|
//_ds.Tables.Add(_dt);
|
|
|
|
|
|
|
|
|
|
|
|
//string str = JSONReportData.FromDataSet(_ds);
|
|
|
|
//var js = string.Format("openPostWindow('{0}',{1},'winOpen')", "../../Handlers/GenerateReport.ashx?report=ClaimBill&data=101&type=pdf&filename=ClaimBill.grf&open=", str);
|
|
|
|
//PageContext.RegisterStartupScript(js);
|
|
|
|
|
|
|
|
|
|
|
|
Search((rs) => |
|
|
|
{ |
|
|
@ -147,6 +104,9 @@ namespace SCP.Views.SupplierData |
|
|
|
|
|
|
|
switch (p.State) |
|
|
|
{ |
|
|
|
case -2: |
|
|
|
p.UltimateDepart = "已作废"; |
|
|
|
break; |
|
|
|
case -1: |
|
|
|
p.UltimateDepart = "已索赔"; |
|
|
|
break; |
|
|
@ -177,16 +137,12 @@ namespace SCP.Views.SupplierData |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
p.Domain= "发票寄出"; |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
case 5: |
|
|
|
p.Domain= "财务收票"; |
|
|
|
|
|
|
|
break; |
|
|
|
case 8: |
|
|
|
p.Domain= "财务手工收票"; |
|
|
|
|
|
|
|
break; |
|
|
|
case 6: |
|
|
|
p.Domain = "财务退回"; |
|
|
@ -252,12 +208,15 @@ namespace SCP.Views.SupplierData |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (_ls.Count > 0) |
|
|
|
{ |
|
|
|
var ret = SCP_QUALITY_CONTROLLER.Save_TM_HYANTOLIN_REVIEW(_ls, REVIEW_STATE.CLOSE); |
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
Bind(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected void btnUnAccept_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
@ -366,6 +325,11 @@ namespace SCP.Views.SupplierData |
|
|
|
} |
|
|
|
switch (itm.State) |
|
|
|
{ |
|
|
|
case -2: |
|
|
|
_label1.Text = "已报废"; |
|
|
|
_label1.ForeColor = Color.Red; |
|
|
|
|
|
|
|
break; |
|
|
|
case -1: |
|
|
|
_label1.Text = "已索赔"; |
|
|
|
_label1.ForeColor = Color.DarkBlue; |
|
|
@ -426,5 +390,34 @@ namespace SCP.Views.SupplierData |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected void btnDelete_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
List<int> _ls = new List<int>(); |
|
|
|
int[] _selections = Grid_TM_HYANTOLIN_REVIEW.SelectedRowIndexArray; |
|
|
|
for (int i = 0, count = Grid_TM_HYANTOLIN_REVIEW.Rows.Count; i < count; i++) |
|
|
|
{ |
|
|
|
if (_selections.Contains(i)) |
|
|
|
{ |
|
|
|
object[] rowDataKeys = Grid_TM_HYANTOLIN_REVIEW.DataKeys[i]; |
|
|
|
_ls.Add(int.Parse(rowDataKeys[0].ToString())); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (_ls.Count > 0) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
var ret = SCP_QUALITY_CONTROLLER.Save_TM_HYANTOLIN_REVIEW(_ls, REVIEW_STATE.DELETE); |
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
Bind(); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Alert.Show("请选择操作数据!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |