/// <summary>
 /// Insert a PCOtherCheckDetail.
 /// </summary>
 public void Insert(Model.PCOtherCheckDetail pCOtherCheckDetail)
 {
     //
     // todo:add other logic here
     //
     accessor.Insert(pCOtherCheckDetail);
 }
 /// <summary>
 /// Update a PCOtherCheckDetail.
 /// </summary>
 public void Update(Model.PCOtherCheckDetail pCOtherCheckDetail)
 {
     //
     // todo: add other logic here.
     //
     accessor.Update(pCOtherCheckDetail);
 }
示例#3
0
        public override void gridView1_DoubleClick(object sender, EventArgs e)
        {
            EditForm f = new EditForm();

            Model.PCOtherCheckDetail model = this.bindingSource1.Current as Model.PCOtherCheckDetail;
            if (model != null)
            {
                f = new EditForm(model.PCOtherCheckId);
            }
            f.ShowDialog(this);
        }
示例#4
0
        public EditForm(IList <Model.ProduceOtherInDepotDetail> list)
            : this()
        {
            this.AddNew();

            this._PCOtherCheck.FromPCType = -1;
            //this.Ncc_Supplier.EditValue = list[0].Invoice == null ? null : list[0].Invoice.Supplier;//厂商
            this._PCOtherCheck.Supplier = list[0].ProduceOtherInDepot == null ? null : list[0].ProduceOtherInDepot.Supplier;

            //this.textInvoiceCusXOId.Text = cgform.key[0].Invoice.InvoiceCustomXOId;     //客户订单编号
            //this.Ncc_Supplier.EditValue = cgform.key[0].Invoice.Supplier;               //厂商

            foreach (Model.ProduceOtherInDepotDetail item in list)
            {
                Model.PCOtherCheckDetail detail = new Model.PCOtherCheckDetail();       //详细
                detail.PCOtherCheckDetailId    = Guid.NewGuid().ToString();             //详细本身编号
                detail.PCOtherCheckId          = this._PCOtherCheck.PCOtherCheckId;     //头编号
                detail.FromInvoiceDetailID     = item.ProduceOtherInDepotDetailId;      //来源详细本身编号
                detail.FromInvoiceID           = item.ProduceOtherInDepotId;            //来源详细头编号
                detail.PCOtherCheckDetailDesc1 = item.ProduceOtherCompactId;
                //detail.ProceduresId = null;                                             //工序编号
                //detail.Procedures = null;                                               //加工
                detail.ProductId = item.ProductId;                                                                                                                                                          //商品编号
                detail.Product   = item.Product;                                                                                                                                                            //品名
                //detail.PCOtherCheckDetailDesc = item.Product == null ? "" : item.Product.ProductDescription;//说明
                detail.PCOtherCheckDetailQuantity = 0;                                                                                                                                                      //数量
                detail.ProductUnit     = item.ProductUnit;                                                                                                                                                  //单位
                detail.PerspectiveRate = item.Customer == null ? "" : item.Customer.CheckedStandard;                                                                                                        //透视率
                detail.DeliveryDate    = this.OtherCompactDetailManager.Get(item.ProduceOtherCompactDetailId) == null ? null : this.OtherCompactDetailManager.Get(item.ProduceOtherCompactDetailId).JiaoQi; //交期

                detail.InQuantity  = item.ProduceQuantity;                                                                                                                                                  //进厂数量
                detail.OutQuantity = 0;                                                                                                                                                                     //出厂数量
                detail.Determinant = "";                                                                                                                                                                    //判定
                detail.PCOtherCheckDetailFromPC = "0";                                                                                                                                                      //来源于 采购入库订单

                //客户订单编号
                detail.InvoiceCusXOId = item.InvoiceCusId;
                this._PCOtherCheck.Detail.Add(detail);
            }
            this.tag    = 1;
            this.action = "insert";
        }
 public void Update(Model.PCOtherCheckDetail e)
 {
     this.Update <Model.PCOtherCheckDetail>(e);
 }
 public void Insert(Model.PCOtherCheckDetail e)
 {
     this.Insert <Model.PCOtherCheckDetail>(e);
 }
示例#7
0
        //选择委外入库单据
        private void btnSelectWeiWai_Click(object sender, EventArgs e)
        {
            ProduceOtherInDepot.ChooseProduceOtherInDepotForPCO f = new Book.UI.produceManager.ProduceOtherInDepot.ChooseProduceOtherInDepotForPCO();
            if (f.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            if (f.SelectItems.Count > 0)
            {
                //清空数据
                if (this._PCOtherCheck.FromPCType > 0)
                {
                    this._PCOtherCheck.Detail.Clear();
                }
                this._PCOtherCheck.FromPCType = -1;
                //this.lcDanJuId.Text = "委外入库單編號:";
                //this.textInvoiceCusXOId.Text = f.SelectItems[0].ProduceOtherInDepot == null ? "" : f.SelectItems[0].ProduceOtherInDepot.InvoiceCusId;
                #region 对控件进行赋值
                //if (!string.IsNullOrEmpty(OtherCompact.MRSHeaderId))                    //客户订单编号
                //{
                //    Model.MRSHeader mrsHeader = new BL.MRSHeaderManager().Get(OtherCompact.MRSHeaderId);
                //    if (mrsHeader != null)
                //    {
                //        Model.MPSheader mPSheader = new BL.MPSheaderManager().Get(mrsHeader.MPSheaderId);
                //        if (mPSheader != null)
                //        {
                //            Model.InvoiceXO invoiceXo = new BL.InvoiceXOManager().Get(mPSheader.InvoiceXOId);
                //            this.textInvoiceCusXOId.Text = invoiceXo == null ? string.Empty : invoiceXo.CustomerInvoiceXOId;
                //        }
                //    }
                //}
                #endregion
                this.Ncc_Supplier.EditValue = f.SelectItems[0].ProduceOtherInDepot.Supplier; //厂商

                foreach (Model.ProduceOtherInDepotDetail item in f.SelectItems)
                {
                    Model.PCOtherCheckDetail detail = new Model.PCOtherCheckDetail();       //详细
                    detail.PCOtherCheckDetailId = Guid.NewGuid().ToString();                //详细本身编号
                    detail.PCOtherCheckId       = this._PCOtherCheck.PCOtherCheckId;        //头编号
                    detail.FromInvoiceDetailID  = item.ProduceOtherInDepotDetailId;         //来源详细本身编号
                    detail.FromInvoiceID        = item.ProduceOtherInDepotId;               //来源详细头编号
                    //detail.ProceduresId = item.ProceduresId;                              //工序编号
                    //detail.Procedures = item.Procedures;                                  //加工
                    detail.ProductId = item.ProductId;                                                                                                                                                                   //商品编号
                    detail.Product   = item.Product;                                                                                                                                                                     //品名
                    detail.PCOtherCheckDetailDesc     = item.Product.ProductDescription;                                                                                                                                 //说明
                    detail.PCOtherCheckDetailQuantity = 0;                                                                                                                                                               //数量
                    detail.ProductUnit              = item.ProductUnit;                                                                                                                                                  //单位
                    detail.PerspectiveRate          = item.Customer == null ? "" : item.Customer.CheckedStandard;                                                                                                        //透视率
                    detail.DeliveryDate             = this.OtherCompactDetailManager.Get(item.ProduceOtherCompactDetailId) == null ? null : this.OtherCompactDetailManager.Get(item.ProduceOtherCompactDetailId).JiaoQi; //交期
                    detail.InQuantity               = item.ProduceQuantity;                                                                                                                                              //进厂数量
                    detail.OutQuantity              = 0;                                                                                                                                                                 //出厂数量
                    detail.Determinant              = "";                                                                                                                                                                //判定
                    detail.PCOtherCheckDetailFromPC = "0";                                                                                                                                                               //来源于 委外入库单

                    //客户订单编号
                    detail.InvoiceCusXOId = item.InvoiceCusId;
                    this._PCOtherCheck.Detail.Add(detail);
                }
                this.gridControl1.RefreshDataSource();
            }
            f.Dispose();
            GC.Collect();
        }
示例#8
0
        //private void AddDataRows()
        //{
        //    Model.PCOtherCheckDetail pcocDetail = new Book.Model.PCOtherCheckDetail();
        //    pcocDetail.PCOtherCheckDetailId = Guid.NewGuid().ToString();
        //    pcocDetail.PCOtherCheckId = this._PCOtherCheck.PCOtherCheckId;
        //    this._PCOtherCheck.Detail.Add(pcocDetail);

        //    this.bindingSourceDetails.Position = this.bindingSourceDetails.IndexOf(pcocDetail);
        //}
        #endregion

        //选择采购入库单据
        private void btnSelectCaiGou_Click(object sender, EventArgs e)
        {
            Book.UI.Invoices.CG.SearchCGDetail cgform = new Book.UI.Invoices.CG.SearchCGDetail();
            if (cgform.ShowDialog() == DialogResult.OK)
            {
                if (cgform.selectItems.Count > 0)
                {
                    BL.InvoiceCOManager mCOM = new Book.BL.InvoiceCOManager();
                    //Model.InvoiceCO co = cgform.Invoice;
                    //清空数据
                    if (this._PCOtherCheck.FromPCType < 0)
                    {
                        this._PCOtherCheck.Detail.Clear();
                    }
                    this._PCOtherCheck.FromPCType = 1;
                    //this.lcDanJuId.Text = "採購入庫單編號:";
                    //对控件进行赋值
                    //this.textInvoiceCusXOId.Text = mCOM.Get(cgform.selectItems[0].InvoiceCOId) == null ? "" : mCOM.Get(cgform.selectItems[0].InvoiceCOId).InvoiceCustomXOId;//客户订单编号
                    this.Ncc_Supplier.EditValue = cgform.selectItems[0].Invoice == null ? null : cgform.selectItems[0].Invoice.Supplier;//厂商

                    //this.textInvoiceCusXOId.Text = cgform.key[0].Invoice.InvoiceCustomXOId;     //客户订单编号
                    //this.Ncc_Supplier.EditValue = cgform.key[0].Invoice.Supplier;               //厂商

                    Model.InvoiceCO co = new Book.Model.InvoiceCO();
                    foreach (Model.InvoiceCGDetail item in cgform.selectItems)
                    {
                        Model.PCOtherCheckDetail detail = new Model.PCOtherCheckDetail();                                //详细
                        detail.PCOtherCheckDetailId = Guid.NewGuid().ToString();                                         //详细本身编号
                        detail.PCOtherCheckId       = this._PCOtherCheck.PCOtherCheckId;                                 //头编号
                        detail.FromInvoiceDetailID  = item.InvoiceCGDetailId;                                            //来源详细本身编号
                        detail.FromInvoiceID        = item.InvoiceId;                                                    //来源详细头编号
                        detail.ProceduresId         = null;                                                              //工序编号
                        detail.Procedures           = null;                                                              //加工
                        detail.ProductId            = item.ProductId;                                                    //商品编号
                        detail.Product = item.Product;                                                                   //品名
                        detail.PCOtherCheckDetailDesc     = item.Product == null ? "" : item.Product.ProductDescription; //说明
                        detail.PCOtherCheckDetailQuantity = 0;                                                           //数量
                        detail.ProductUnit = item.InvoiceProductUnit;                                                    //单位

                        co = mCOM.Get(item.InvoiceCOId);
                        if (co == null)
                        {
                            detail.PerspectiveRate = "";
                            detail.DeliveryDate    = null;
                        }
                        else
                        {
                            try
                            {
                                detail.PerspectiveRate = co.Customer == null ? "" : mCOM.Get(cgform.selectItems[0].InvoiceCOId).Customer.CheckedStandard;//透视率
                            }
                            catch
                            {
                                detail.PerspectiveRate = "";
                            }
                            detail.DeliveryDate = co.InvoiceYjrq;//交期
                        }

                        detail.InQuantity  = item.InvoiceCGDetailQuantity;                      //进厂数量
                        detail.OutQuantity = 0;                                                 //出厂数量
                        detail.Determinant = "";                                                //判定
                        detail.PCOtherCheckDetailFromPC = "1";                                  //来源于 采购入库订单

                        //客户订单编号
                        detail.InvoiceCusXOId = co == null ? "" : co.InvoiceCustomXOId;
                        this._PCOtherCheck.Detail.Add(detail);
                    }
                    this.gridControl1.RefreshDataSource();
                }
            }
            cgform.Dispose();
            GC.Collect();
        }
示例#9
0
        //private void AddDataRows()
        //{
        //    Model.PCOtherCheckDetail pcocDetail = new Book.Model.PCOtherCheckDetail();
        //    pcocDetail.PCOtherCheckDetailId = Guid.NewGuid().ToString();
        //    pcocDetail.PCOtherCheckId = this._PCOtherCheck.PCOtherCheckId;
        //    this._PCOtherCheck.Detail.Add(pcocDetail);

        //    this.bindingSourceDetails.Position = this.bindingSourceDetails.IndexOf(pcocDetail);
        //}
        #endregion

        //选择采购单据    2016-1-6 将数据来源从采购入库单改为采购单
        private void btnSelectCaiGou_Click(object sender, EventArgs e)
        {
            #region 原版 采购入库单
            //Book.UI.Invoices.CG.SearchCGDetail cgform = new Book.UI.Invoices.CG.SearchCGDetail();
            //if (cgform.ShowDialog() == DialogResult.OK)
            //{
            //    if (cgform.selectItems.Count > 0)
            //    {
            //        BL.InvoiceCOManager mCOM = new Book.BL.InvoiceCOManager();
            //        //Model.InvoiceCO co = cgform.Invoice;
            //        //清空数据
            //        if (this._PCOtherCheck.FromPCType < 0)
            //        {
            //            this._PCOtherCheck.Detail.Clear();
            //        }
            //        this._PCOtherCheck.FromPCType = 1;

            //        this.Ncc_Supplier.EditValue = cgform.selectItems[0].Invoice == null ? null : cgform.selectItems[0].Invoice.Supplier;//厂商
            //        Model.InvoiceCO co = new Book.Model.InvoiceCO();
            //        foreach (Model.InvoiceCGDetail item in cgform.selectItems)
            //        {
            //            Model.PCOtherCheckDetail detail = new Model.PCOtherCheckDetail();       //详细
            //            detail.PCOtherCheckDetailId = Guid.NewGuid().ToString();                //详细本身编号
            //            detail.PCOtherCheckId = this._PCOtherCheck.PCOtherCheckId;              //头编号
            //            detail.FromInvoiceDetailID = item.InvoiceCGDetailId;                    //来源详细本身编号
            //            detail.FromInvoiceID = item.InvoiceId;                                  //来源详细头编号
            //            detail.ProceduresId = null;                                             //工序编号
            //            detail.Procedures = null;                                               //加工
            //            detail.ProductId = item.ProductId;                                      //商品编号
            //            detail.Product = item.Product;                                          //品名
            //            detail.PCOtherCheckDetailDesc = item.Product == null ? "" : item.Product.ProductDescription;//说明
            //            detail.PCOtherCheckDetailQuantity = 0;                                  //数量
            //            detail.ProductUnit = detail.Product.ProduceUnit == null ? null : detail.Product.ProduceUnit.CnName;                        //单位

            //            co = mCOM.Get(item.InvoiceCOId);
            //            if (co == null)
            //            {
            //                detail.PerspectiveRate = "";
            //                detail.DeliveryDate = null;
            //            }
            //            else
            //            {
            //                try
            //                {
            //                    detail.PerspectiveRate = co.Customer == null ? "" : mCOM.Get(cgform.selectItems[0].InvoiceCOId).Customer.CheckedStandard;//透视率
            //                }
            //                catch
            //                {
            //                    detail.PerspectiveRate = "";
            //                }
            //                detail.DeliveryDate = co.InvoiceYjrq;//交期
            //            }

            //            detail.InQuantity = item.InvoiceCGDetailQuantity;                       //进厂数量
            //            detail.OutQuantity = 0;                                                 //出厂数量
            //            detail.Determinant = "";                                                //判定
            //            detail.PCOtherCheckDetailFromPC = "1";                                  //来源于 采购入库订单

            //            //客户订单编号
            //            detail.InvoiceCusXOId = co == null ? "" : co.InvoiceCustomXOId;
            //            this._PCOtherCheck.Detail.Add(detail);
            //        }
            //        this.gridControl1.RefreshDataSource();
            //    }
            //}
            //cgform.Dispose();
            //GC.Collect();
            #endregion

            Invoices.CG.CGForm f = new Book.UI.Invoices.CG.CGForm();
            if (f.ShowDialog(this) == DialogResult.OK)
            {
                if (f.key != null && f.key.Count > 0)
                {
                    if (this._PCOtherCheck.FromPCType < 0)
                    {
                        this._PCOtherCheck.Detail.Clear();
                    }
                    this._PCOtherCheck.FromPCType = 1;

                    Model.InvoiceCO co = f.key[0].Invoice;
                    this.Ncc_Supplier.EditValue = co == null ? null : co.Supplier;

                    foreach (var item in f.key)
                    {
                        Model.PCOtherCheckDetail detail = new Model.PCOtherCheckDetail();
                        detail.PCOtherCheckDetailId = Guid.NewGuid().ToString();
                        detail.PCOtherCheckId       = this._PCOtherCheck.PCOtherCheckId;
                        detail.FromInvoiceDetailID  = item.InvoiceCODetailId;
                        detail.FromInvoiceID        = item.InvoiceId;
                        detail.ProceduresId         = null;
                        detail.Procedures           = null;
                        detail.ProductId            = item.ProductId;
                        detail.Product = item.Product;
                        if (item.Product != null)
                        {
                            detail.PCOtherCheckDetailDesc = item.Product == null ? "" : item.Product.ProductDescription;
                            detail.ProductUnit            = item.Product.ProduceUnit == null ? null : item.Product.ProduceUnit.CnName;
                        }
                        detail.PCOtherCheckDetailQuantity = 0;                   //数量以后改为合格数量,进场数量即为检验数量
                        detail.InQuantity  = item.OrderQuantity - Convert.ToDouble(item.HasCheckQuantity);
                        detail.InQuantity  = detail.InQuantity < 0 ? 0 : detail.InQuantity;
                        detail.OutQuantity = 0;
                        detail.Determinant = "";
                        detail.PCOtherCheckDetailFromPC = "1";


                        if (co != null)
                        {
                            try
                            {
                                detail.PerspectiveRate = co.Customer == null ? "" : co.Customer.CheckedStandard;//透视率
                            }
                            catch
                            {
                                detail.PerspectiveRate = "";
                            }
                            detail.DeliveryDate   = co.InvoiceYjrq;//交期
                            detail.InvoiceCusXOId = co.InvoiceCustomXOId;
                        }
                        else
                        {
                            detail.PerspectiveRate = "";
                            detail.DeliveryDate    = null;
                            detail.InvoiceCusXOId  = "";
                        }

                        this._PCOtherCheck.Detail.Add(detail);
                    }
                    this.gridControl1.RefreshDataSource();
                }
            }
            f.Dispose();
            GC.Collect();
        }
示例#10
0
        //选择委外合同
        private void simpleButtonOther_Click_1(object sender, EventArgs e)
        {
            ProduceOtherCompact.ChooseOutContract f = new ProduceOtherCompact.ChooseOutContract();
            if (f.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            if (f.key == null || f.key.Count == 0)
            {
                return;
            }
            Model.ProduceOtherCompact OtherCompact = f.key[0].ProduceOtherCompact;

            if (this._produceOtherInDepot.Details.Count > 0 && string.IsNullOrEmpty(this._produceOtherInDepot.Details[0].ProductId))
            {
                this._produceOtherInDepot.Details.RemoveAt(0);
            }

            this.newChooseContorlSipu.EditValue = OtherCompact.Supplier;
            //this.textEditCusXOId.Text = OtherCompact.CustomerInvoiceXOId;
            //if (!string.IsNullOrEmpty(OtherCompact.MRSHeaderId))
            //{
            //    Model.MRSHeader mrsHeader = this.mRSHeaderManager.Get(OtherCompact.MRSHeaderId);
            //    if (mrsHeader != null)
            //    {
            //        Model.MPSheader mPSheader = this.mPSheaderManager.Get(mrsHeader.MPSheaderId);
            //        if (mPSheader != null)
            //        {
            //            Model.InvoiceXO invoiceXO = this.invoiceXOManager.Get(mPSheader.InvoiceXOId);
            //            this.textEditCusXOId.Text = invoiceXO == null ? string.Empty : invoiceXO.CustomerInvoiceXOId;
            //        }
            //    }
            //}
            foreach (Model.ProduceOtherCompactDetail item in f.key)
            {
                IList <Model.PCOtherCheckDetail> PCOtherCheckDetailList = this.PCOtherCheckDetailManager.SelectByPOCDetailId(item.OtherCompactDetailId);
                Model.PCOtherCheckDetail         PCOtherCheckDetail     = null;
                if (PCOtherCheckDetailList != null && PCOtherCheckDetailList.Count > 0)
                {
                    PCOtherCheckDetail = PCOtherCheckDetailList[0];
                }
                if (PCOtherCheckDetail == null)
                {
                    MessageBox.Show("商品:" + item.Product.ToString() + " 完成進料檢驗的部分已全部入庫,或者未開具進料檢驗單!", this.Text, MessageBoxButtons.OK);
                    continue;
                }

                Model.ProduceOtherInDepotDetail detail = new Model.ProduceOtherInDepotDetail();
                detail.ProduceOtherInDepotDetailId = Guid.NewGuid().ToString();
                detail.ProduceOtherCompactDetailId = item.OtherCompactDetailId;
                detail.CustomerId   = item.ProduceOtherCompact.CustomerId;
                detail.InvoiceCusId = item.CustomInvoiceXOId;
                detail.Product      = item.Product;
                detail.ProductId    = item.ProductId;
                detail.ProductUnit  = item.ProductUnit;
                //detail.ProduceQuantity = item.OtherCompactCount - Convert.ToDouble(item.InDepotCount);
                detail.ProduceQuantity         = PCOtherCheckDetail.PCOtherCheckDetailQuantity;
                detail.ProduceInDepotQuantity  = 0;
                detail.ProduceTransferQuantity = 0;
                detail.ProcessPrice            = item.OtherCompactPrice;
                detail.Description             = item.Description;
                detail.ProduceOtherCompactId   = item.ProduceOtherCompactId;
                detail.ProduceMoney            = detail.ProcessPrice * Convert.ToDecimal(detail.ProduceQuantity);
                //客户订单编号
                detail.InvoiceCusId         = item.CustomInvoiceXOId;
                detail.PCOtherCheckDetailId = PCOtherCheckDetail.PCOtherCheckDetailId;
                this._produceOtherInDepot.Details.Add(detail);
            }
            this.gridControl1.RefreshDataSource();

            decimal d = 0;

            foreach (Model.ProduceOtherInDepotDetail model in this._produceOtherInDepot.Details)
            {
                d += Convert.ToDecimal(model.ProduceMoney);
            }
            this.txt_Sum.Text   = d.ToString();
            this.txt_Tax.Text   = (Convert.ToDouble(d) * 0.05).ToString();
            this.txt_Total.Text = (Convert.ToDouble(d) * (1.05)).ToString();
        }
示例#11
0
        public EditForm(IList <Model.InvoiceCGDetail> list)
            : this()
        {
            this.AddNew();

            BL.InvoiceCOManager mCOM = new Book.BL.InvoiceCOManager();
            this._PCOtherCheck.FromPCType = 1;
            //this.Ncc_Supplier.EditValue = list[0].Invoice == null ? null : list[0].Invoice.Supplier;//厂商
            this._PCOtherCheck.Supplier = list[0].Invoice == null ? null : list[0].Invoice.Supplier;

            //this.textInvoiceCusXOId.Text = cgform.key[0].Invoice.InvoiceCustomXOId;     //客户订单编号
            //this.Ncc_Supplier.EditValue = cgform.key[0].Invoice.Supplier;               //厂商

            Model.InvoiceCO co = new Book.Model.InvoiceCO();
            foreach (Model.InvoiceCGDetail item in list)
            {
                Model.PCOtherCheckDetail detail = new Model.PCOtherCheckDetail();       //详细
                detail.PCOtherCheckDetailId    = Guid.NewGuid().ToString();             //详细本身编号
                detail.PCOtherCheckId          = this._PCOtherCheck.PCOtherCheckId;     //头编号
                detail.FromInvoiceDetailID     = item.InvoiceCGDetailId;                //来源详细本身编号
                detail.FromInvoiceID           = item.InvoiceId;                        //来源详细头编号
                detail.PCOtherCheckDetailDesc1 = item.InvoiceCOId;
                detail.ProceduresId            = null;                                  //工序编号
                detail.Procedures = null;                                               //加工
                detail.ProductId  = item.ProductId;                                     //商品编号
                detail.Product    = item.Product;                                       //品名
                //detail.PCOtherCheckDetailDesc = item.Product == null ? "" : item.Product.ProductDescription;//说明
                detail.PCOtherCheckDetailQuantity = 0;                                  //数量
                detail.ProductUnit = item.InvoiceProductUnit;                           //单位

                co = mCOM.Get(item.InvoiceCOId);
                if (co == null)
                {
                    detail.PerspectiveRate = "";
                    detail.DeliveryDate    = null;
                }
                else
                {
                    try
                    {
                        detail.PerspectiveRate = co.Customer == null ? "" : mCOM.Get(list[0].InvoiceCOId).Customer.CheckedStandard;//透视率
                    }
                    catch
                    {
                        detail.PerspectiveRate = "";
                    }
                    detail.DeliveryDate = co.InvoiceYjrq;//交期
                }

                detail.InQuantity  = item.InvoiceCGDetailQuantity;                      //进厂数量
                detail.OutQuantity = 0;                                                 //出厂数量
                detail.Determinant = "";                                                //判定
                detail.PCOtherCheckDetailFromPC = "1";                                  //来源于 采购入库订单

                //客户订单编号
                detail.InvoiceCusXOId = co == null ? "" : co.InvoiceCustomXOId;
                this._PCOtherCheck.Detail.Add(detail);
            }
            this.tag    = 1;
            this.action = "insert";
        }