zrg
2024-04-29 40d8d68aff0e4ffd4bd4b003d1a719db12b2838b
WebAPI/Controllers/²Ö´æ¹ÜÀí/µ÷²¦Å̵ã/Kf_MoveStockRequestBillController.cs
@@ -180,8 +180,33 @@
                }
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                    DataSet dss;
                    dss = oCn.RunProcReturn("select * from h_v_IF_MoveStockRequestBillList_Litee where hmainid=" + HInterID + " and å•据号='" + HBillNo + "'", "h_v_IF_MoveStockRequestBillList_Litee");
                    //判断是否可编辑
                    if (dss.Tables[0].Rows[0]["审核人"].ToString() != "" && dss.Tables[0].Rows[0]["审核人"] != null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "此单据已经被审核,不允许修改!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (dss.Tables[0].Rows[0]["状态"].ToString() != "创建")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oCn.RunProc("update Kf_MoveStockRequestBillMain  set " +
                                "HRemark='" + HRemark + "', HChecker='" + HMaker + "', HCheckDate=getdate()" + "' where HInterID=" + HInterID);
                                    "HSupID='" + HSupID + "', HEmpID='" + HEmpID + "'," +
                                    "HWHID='" + HWHID + "', HSCWHID='" + HSCWHID + "'," +
                                    "HMangerID='" + HMangerID + "', HSecManagerID='" + HSecManagerID + "'," +
                                    "HKeeperID='" + HKeeperID + "', HDeptID='" + HDeptID + "'," +
                                    "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + " where HInterID=" + HInterID);
                    //删除子表
                    oCn.RunProc("delete from Kf_MoveStockRequestBillSub where HInterID='" + HInterID + "'");
@@ -291,6 +316,43 @@
        #endregion
        //调拨申请单编辑
        [Route("Kf_MoveStockRequestBill/cx")]
        [HttpGet]
        public object cx(long HInterID)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_IF_MoveStockRequestBillList_Litee where hmainid =" + HInterID, "h_v_IF_POOrderBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "false!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        ///删除功能
        /// </summary>