| | |
| | | else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { //修改 |
| | | |
| | | //修改 |
| | | DataSet dss; |
| | | dss = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Gy_RoutingBillMain"); |
| | | //判断是否可编辑 |
| | | if (dss.Tables[0].Rows[0]["HChecker"].ToString() != "" && dss.Tables[0].Rows[0]["HChecker"] != null) |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "乔一") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "此单据已经被审核,不允许修改!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | dss = oCN.RunProcReturn("select COUNT(*) as number from Sc_ProcessExchangeBillMain where HRoutingBillID = " + HInterID, "Gy_RoutingBillMain"); |
| | | //判断是否可编辑 |
| | | if (dss.Tables[0].Rows[0]["number"].ToString() != "0") |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "此单据已经被引用,不允许修改!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | //修改 |
| | | DataSet dss; |
| | | dss = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Gy_RoutingBillMain"); |
| | | //判断是否可编辑 |
| | | if ((dss.Tables[0].Rows[0]["HChecker"].ToString() != "" && dss.Tables[0].Rows[0]["HChecker"] != null) || (dss.Tables[0].Rows[0]["HBillStatus"].ToString() != "1" && dss.Tables[0].Rows[0]["HBillStatus"].ToString() != "0")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "此单据状态未在创建,不允许修改!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | dss = oCN.RunProcReturn("select COUNT(*) as number from Sc_ProcessExchangeBillMain where HRoutingBillID = " + HInterID, "Gy_RoutingBillMain"); |
| | | //判断是否可编辑 |
| | | if (dss.Tables[0].Rows[0]["number"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "此单据已经被引用,不允许修改!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | oCN.RunProc("update Gy_RoutingBillMain set " + |
| | | "HDate='" + HDate + |
| | |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID=" + HInterID); |
| | | |
| | | //刷新默认工艺路线 |
| | | //oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "添康科技") //系统参数 |
| | | { |
| | | //刷新默认工艺路线 |
| | | oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + CurUserName + "'"); |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核成功"; |