Browse Source

调整坏机换新默认显示问题
调整仓库调拨错误提示
删除重复代码
仓库姓名查询放出

DuGuYang 3 years ago
parent
commit
1cfd97fd7a

+ 128 - 120
AppStart/ExcelHelper.cs

@@ -26,7 +26,7 @@ namespace MySystem
         {
         {
             while (true)
             while (true)
             {
             {
-                string data = RedisDbconn.Instance.RPop<string>("ExcelImportV3");
+                string data = RedisDbconn.Instance.RPop<string>("ExcelImportV2");
                 // string data = RedisDbconn.Instance.RPop<string>("ExcelImportV3");
                 // string data = RedisDbconn.Instance.RPop<string>("ExcelImportV3");
                 if (!string.IsNullOrEmpty(data))
                 if (!string.IsNullOrEmpty(data))
                 {
                 {
@@ -277,163 +277,171 @@ namespace MySystem
                                         //调拨时若出货仓库与填写仓库不符,则该条出货失败
                                         //调拨时若出货仓库与填写仓库不符,则该条出货失败
                                         var posinfo = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo && m.BrandId == BrandId);
                                         var posinfo = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo && m.BrandId == BrandId);
                                         var storeinfo = db.StoreForCode.FirstOrDefault(m => m.Code == OutStoreNo && m.StoreId == posinfo.StoreId);
                                         var storeinfo = db.StoreForCode.FirstOrDefault(m => m.Code == OutStoreNo && m.StoreId == posinfo.StoreId);
-                                        if (storeinfo != null)
+                                        if (posinfo != null)
                                         {
                                         {
-                                            KqProducts kqProduct = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
-                                            if (kqProduct.Id > 0)
+
+                                            if (storeinfo != null)
                                             {
                                             {
-                                                StoreForCode storefor = db.StoreForCode.FirstOrDefault(m => m.Code == OutStoreNo) ?? new StoreForCode();
-                                                StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == storefor.StoreId) ?? new StoreHouse();
-                                                if (store.LaveNum > 0)
+                                                KqProducts kqProduct = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
+                                                if (kqProduct.Id > 0)
                                                 {
                                                 {
-                                                    StoreForCode tostorefor = db.StoreForCode.FirstOrDefault(m => m.Code == StoreNo) ?? new StoreForCode();
-                                                    StoreHouse tostore = db.StoreHouse.FirstOrDefault(m => m.Id == tostorefor.StoreId) ?? new StoreHouse();
-                                                    if (tostore.Id > 0)
+                                                    StoreForCode storefor = db.StoreForCode.FirstOrDefault(m => m.Code == OutStoreNo) ?? new StoreForCode();
+                                                    StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == storefor.StoreId) ?? new StoreHouse();
+                                                    if (store.LaveNum > 0)
                                                     {
                                                     {
-                                                        MachineForSnNo machinefor = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new MachineForSnNo();
-                                                        PosMachinesTwo machine = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machinefor.SnId && m.StoreId != tostore.Id && m.BuyUserId == 0 && m.UserId == 0) ?? new PosMachinesTwo();
-                                                        if (machine.Id > 0)
+                                                        StoreForCode tostorefor = db.StoreForCode.FirstOrDefault(m => m.Code == StoreNo) ?? new StoreForCode();
+                                                        StoreHouse tostore = db.StoreHouse.FirstOrDefault(m => m.Id == tostorefor.StoreId) ?? new StoreHouse();
+                                                        if (tostore.Id > 0)
                                                         {
                                                         {
-                                                            if (machine.PreUserId == 0)
+                                                            MachineForSnNo machinefor = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new MachineForSnNo();
+                                                            PosMachinesTwo machine = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machinefor.SnId && m.StoreId != tostore.Id && m.BuyUserId == 0 && m.UserId == 0) ?? new PosMachinesTwo();
+                                                            if (machine.Id > 0)
                                                             {
                                                             {
-                                                                StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
-                                                                {
-                                                                    CreateDate = DateTime.Now,
-                                                                    CreateMan = Operator,
-                                                                    StoreId = storefor.StoreId, //仓库
-                                                                    BrandId = BrandId, //产品类型
-                                                                    ProductName = RelationClass.GetKqProductBrandInfo(BrandId), //产品名称
-                                                                    BizBatchNo = BatchNo, //业务批次号
-                                                                    TransType = 1, //交易类型
-                                                                    SnNo = SnNo, //SN编号
-                                                                    StockOpDirect = 1, //库存操作方向
-                                                                    SnStatus = 1, //SN状态
-                                                                    DeviceVendor = machine.DeviceName, //设备厂商
-                                                                    DeviceModel = machine.DeviceKind, //设备型号
-                                                                    DeviceType = machine.DeviceType, //设备类型
-                                                                    FromUserId = store.UserId, //出货人
-                                                                    FromDate = DateTime.Now, //出库时间
-                                                                    FromRemark = OutNote, //出库备注
-                                                                    ToUserId = tostore.UserId, //收货人
-                                                                    ToStoreId = tostorefor.StoreId, //退货收货仓库                        
-                                                                    SourceStoreId = machine.SourceStoreId, //源仓库编号
-                                                                    BrandType = machine.DeviceType, //品牌类型
-                                                                }).Entity;
-                                                                db.SaveChanges();
-                                                                string ChangeNo = "SC";
-                                                                int StoreStockChangeId = stockchange.Id;
-                                                                string StoreStockChangeIdString = StoreStockChangeId.ToString();
-                                                                for (int j = 0; j < 18 - StoreStockChangeId.ToString().Length; j++)
+                                                                if (machine.PreUserId == 0)
                                                                 {
                                                                 {
-                                                                    StoreStockChangeIdString = "0" + StoreStockChangeIdString;
-                                                                }
-                                                                ChangeNo += StoreStockChangeIdString;
-                                                                stockchange.ChangeNo = ChangeNo; //交易流水编号
-                                                                machine.StoreId = tostorefor.StoreId;
+                                                                    StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
+                                                                    {
+                                                                        CreateDate = DateTime.Now,
+                                                                        CreateMan = Operator,
+                                                                        StoreId = storefor.StoreId, //仓库
+                                                                        BrandId = BrandId, //产品类型
+                                                                        ProductName = RelationClass.GetKqProductBrandInfo(BrandId), //产品名称
+                                                                        BizBatchNo = BatchNo, //业务批次号
+                                                                        TransType = 1, //交易类型
+                                                                        SnNo = SnNo, //SN编号
+                                                                        StockOpDirect = 1, //库存操作方向
+                                                                        SnStatus = 1, //SN状态
+                                                                        DeviceVendor = machine.DeviceName, //设备厂商
+                                                                        DeviceModel = machine.DeviceKind, //设备型号
+                                                                        DeviceType = machine.DeviceType, //设备类型
+                                                                        FromUserId = store.UserId, //出货人
+                                                                        FromDate = DateTime.Now, //出库时间
+                                                                        FromRemark = OutNote, //出库备注
+                                                                        ToUserId = tostore.UserId, //收货人
+                                                                        ToStoreId = tostorefor.StoreId, //退货收货仓库                        
+                                                                        SourceStoreId = machine.SourceStoreId, //源仓库编号
+                                                                        BrandType = machine.DeviceType, //品牌类型
+                                                                    }).Entity;
+                                                                    db.SaveChanges();
+                                                                    string ChangeNo = "SC";
+                                                                    int StoreStockChangeId = stockchange.Id;
+                                                                    string StoreStockChangeIdString = StoreStockChangeId.ToString();
+                                                                    for (int j = 0; j < 18 - StoreStockChangeId.ToString().Length; j++)
+                                                                    {
+                                                                        StoreStockChangeIdString = "0" + StoreStockChangeIdString;
+                                                                    }
+                                                                    ChangeNo += StoreStockChangeIdString;
+                                                                    stockchange.ChangeNo = ChangeNo; //交易流水编号
+                                                                    machine.StoreId = tostorefor.StoreId;
 
 
-                                                                db.StoreChangeHistory.Add(new StoreChangeHistory()
-                                                                {
-                                                                    CreateDate = DateTime.Now,
-                                                                    CreateMan = Operator,
-                                                                    UserId = store.UserId, //创客
-                                                                    BrandId = BrandId, //产品类型
-                                                                    ChangeRecordNo = ChangeNo, //变更记录单号
-                                                                    BizBatchNo = BatchNo, //业务批次号
-                                                                    TransType = 1, //交易类型
-                                                                    SnNo = SnNo, //SN编号
-                                                                    SnType = machine.PosSnType, //SN机具类型
-                                                                    StockOpDirect = 1, //库存操作方向
-                                                                    DeviceVendor = machine.DeviceName, //设备厂商
-                                                                    DeviceModel = machine.DeviceKind, //设备型号
-                                                                    DeviceType = machine.DeviceType, //设备类型
-                                                                    FromUserId = store.UserId, //出货创客
-                                                                    FromDate = DateTime.Now, //出库时间
-                                                                    FromRemark = OutNote, //出库备注
-                                                                    SourceStoreId = machine.SourceStoreId, //源仓库
-                                                                    StoreId = store.Id, //仓库
-                                                                });
+                                                                    db.StoreChangeHistory.Add(new StoreChangeHistory()
+                                                                    {
+                                                                        CreateDate = DateTime.Now,
+                                                                        CreateMan = Operator,
+                                                                        UserId = store.UserId, //创客
+                                                                        BrandId = BrandId, //产品类型
+                                                                        ChangeRecordNo = ChangeNo, //变更记录单号
+                                                                        BizBatchNo = BatchNo, //业务批次号
+                                                                        TransType = 1, //交易类型
+                                                                        SnNo = SnNo, //SN编号
+                                                                        SnType = machine.PosSnType, //SN机具类型
+                                                                        StockOpDirect = 1, //库存操作方向
+                                                                        DeviceVendor = machine.DeviceName, //设备厂商
+                                                                        DeviceModel = machine.DeviceKind, //设备型号
+                                                                        DeviceType = machine.DeviceType, //设备类型
+                                                                        FromUserId = store.UserId, //出货创客
+                                                                        FromDate = DateTime.Now, //出库时间
+                                                                        FromRemark = OutNote, //出库备注
+                                                                        SourceStoreId = machine.SourceStoreId, //源仓库
+                                                                        StoreId = store.Id, //仓库
+                                                                    });
 
 
-                                                                db.StoreChangeHistory.Add(new StoreChangeHistory()
-                                                                {
-                                                                    CreateDate = DateTime.Now,
-                                                                    CreateMan = Operator,
-                                                                    UserId = tostore.UserId, //创客
-                                                                    BrandId = BrandId, //产品类型
-                                                                    ChangeRecordNo = ChangeNo, //变更记录单号
-                                                                    BizBatchNo = BatchNo, //业务批次号
-                                                                    TransType = 1, //交易类型
-                                                                    SnNo = SnNo, //SN编号
-                                                                    SnType = machine.PosSnType, //SN机具类型
-                                                                    StockOpDirect = 0, //库存操作方向
-                                                                    DeviceVendor = machine.DeviceName, //设备厂商
-                                                                    DeviceModel = machine.DeviceKind, //设备型号
-                                                                    DeviceType = machine.DeviceType, //设备类型
-                                                                    ToUserId = tostore.UserId, //收货创客
-                                                                    ToStoreId = tostore.Id, //创客退货收货仓库
-                                                                    ToDate = DateTime.Now, //入库时间
-                                                                    ToRemark = OutNote, //入库备注
-                                                                    SourceStoreId = machine.SourceStoreId, //源仓库
-                                                                    StoreId = tostore.Id, //仓库
-                                                                });
-                                                                db.SaveChanges();
+                                                                    db.StoreChangeHistory.Add(new StoreChangeHistory()
+                                                                    {
+                                                                        CreateDate = DateTime.Now,
+                                                                        CreateMan = Operator,
+                                                                        UserId = tostore.UserId, //创客
+                                                                        BrandId = BrandId, //产品类型
+                                                                        ChangeRecordNo = ChangeNo, //变更记录单号
+                                                                        BizBatchNo = BatchNo, //业务批次号
+                                                                        TransType = 1, //交易类型
+                                                                        SnNo = SnNo, //SN编号
+                                                                        SnType = machine.PosSnType, //SN机具类型
+                                                                        StockOpDirect = 0, //库存操作方向
+                                                                        DeviceVendor = machine.DeviceName, //设备厂商
+                                                                        DeviceModel = machine.DeviceKind, //设备型号
+                                                                        DeviceType = machine.DeviceType, //设备类型
+                                                                        ToUserId = tostore.UserId, //收货创客
+                                                                        ToStoreId = tostore.Id, //创客退货收货仓库
+                                                                        ToDate = DateTime.Now, //入库时间
+                                                                        ToRemark = OutNote, //入库备注
+                                                                        SourceStoreId = machine.SourceStoreId, //源仓库
+                                                                        StoreId = tostore.Id, //仓库
+                                                                    });
+                                                                    db.SaveChanges();
 
 
-                                                                // RemoveClass.DeletePosMachineList("PosMachineTwoList:" + storefor.StoreId, machine.Id);
-                                                                // RedisDbconn.Instance.AddList("PosMachineTwoList:" + tostorefor.StoreId, machine);
+                                                                    // RemoveClass.DeletePosMachineList("PosMachineTwoList:" + storefor.StoreId, machine.Id);
+                                                                    // RedisDbconn.Instance.AddList("PosMachineTwoList:" + tostorefor.StoreId, machine);
+
+                                                                    if (!storeData.ContainsKey(storefor.StoreId + "_" + BrandId))
+                                                                    {
+                                                                        storeData.Add(storefor.StoreId + "_" + BrandId, 1);
+                                                                    }
+                                                                    else
+                                                                    {
+                                                                        storeData[storefor.StoreId + "_" + BrandId] += 1;
+                                                                    }
+                                                                    if (!toStoreData.ContainsKey(tostorefor.StoreId + "_" + BrandId))
+                                                                    {
+                                                                        toStoreData.Add(tostorefor.StoreId + "_" + BrandId, 1);
+                                                                    }
+                                                                    else
+                                                                    {
+                                                                        toStoreData[tostorefor.StoreId + "_" + BrandId] += 1;
+                                                                    }
+                                                                    SuccessCount += 1;
+                                                                    RedisDbconn.Instance.Set("CheckImport:" + checkKey, SuccessCount + " / " + TotalCount);
 
 
-                                                                if (!storeData.ContainsKey(storefor.StoreId + "_" + BrandId))
-                                                                {
-                                                                    storeData.Add(storefor.StoreId + "_" + BrandId, 1);
-                                                                }
-                                                                else
-                                                                {
-                                                                    storeData[storefor.StoreId + "_" + BrandId] += 1;
-                                                                }
-                                                                if (!toStoreData.ContainsKey(tostorefor.StoreId + "_" + BrandId))
-                                                                {
-                                                                    toStoreData.Add(tostorefor.StoreId + "_" + BrandId, 1);
                                                                 }
                                                                 }
                                                                 else
                                                                 else
                                                                 {
                                                                 {
-                                                                    toStoreData[tostorefor.StoreId + "_" + BrandId] += 1;
+                                                                    RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "为预发机,不可调拨");
                                                                 }
                                                                 }
-                                                                SuccessCount += 1;
-                                                                RedisDbconn.Instance.Set("CheckImport:" + checkKey, SuccessCount + " / " + TotalCount);
-
                                                             }
                                                             }
                                                             else
                                                             else
                                                             {
                                                             {
-                                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "为预发机,不可调拨");
+                                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "不是仓库机或已经在填写的收货仓库中");
+                                                            }
+                                                            if (string.IsNullOrEmpty(tostore.ProductName))
+                                                            {
+                                                                tostore.BrandId = BrandId.ToString();
+                                                                tostore.ProductName = kqProduct.Name;
                                                             }
                                                             }
                                                         }
                                                         }
                                                         else
                                                         else
                                                         {
                                                         {
-                                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "不是仓库机或不在填写的收货仓库中");
-                                                        }
-                                                        if (string.IsNullOrEmpty(tostore.ProductName))
-                                                        {
-                                                            tostore.BrandId = BrandId.ToString();
-                                                            tostore.ProductName = kqProduct.Name;
+                                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "填写的收货仓库编号不正确");
                                                         }
                                                         }
                                                     }
                                                     }
                                                     else
                                                     else
                                                     {
                                                     {
-                                                        RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "填写的收货仓库编号不正确");
+                                                        RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "所在的仓库" + store.StoreName + "(" + store.StoreNo + ")库存不足");
                                                     }
                                                     }
+                                                    db.SaveChanges();
                                                 }
                                                 }
                                                 else
                                                 else
                                                 {
                                                 {
-                                                    RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "所在的仓库" + store.StoreName + "(" + store.StoreNo + ")库存不足");
+                                                    RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "的品牌填写有误");
                                                 }
                                                 }
-                                                db.SaveChanges();
                                             }
                                             }
                                             else
                                             else
                                             {
                                             {
-                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "的品牌填写有误");
+                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "出货仓库与填写仓库不符");
                                             }
                                             }
                                         }
                                         }
                                         else
                                         else
                                         {
                                         {
-                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "出货仓库与填写仓库不符");
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "机具" + SnNo + "的品牌填写有误");
                                         }
                                         }
                                     }
                                     }
                                     DoCount += Size;
                                     DoCount += Size;

+ 46 - 46
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -68,51 +68,51 @@ namespace MySystem.Areas.Admin.Controllers
             {
             {
                 condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
                 condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
             }
             }
-            // //仓库归属人真实姓名
-            // if (!string.IsNullOrEmpty(UserIdRealName))
-            // {
-            //     DataTable dt = OtherMySqlConn.dtable("SELECT Id FROM Users WHERE RealName like '%" + UserIdRealName + "%'");
-            //     var Count = dt.Rows.Count;
-            //     int times = 0;
-            //     string UserIds = "";
-            //     foreach (DataRow item in dt.Rows)
-            //     {
-            //         times++;
-            //         if (times == Count)
-            //         {
-            //             UserIds += item["Id"].ToString();
-            //         }
-            //         else
-            //         {
-            //             UserIds += item["Id"].ToString() + ",";
-            //         }
-            //     }
-            //     // condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
-            //     condition += " and UserId in (" + UserIds + ")";
-            // }
-            // //仓库管理员真实姓名
-
-            // if (!string.IsNullOrEmpty(ManageUserIdRealName))
-            // {
-            //     DataTable dts = OtherMySqlConn.dtable("SELECT Id FROM Users WHERE RealName like '%" + ManageUserIdRealName + "%'");
-            //     var Counts = dts.Rows.Count;
-            //     int time = 1;
-            //     string UserIdss = "";
-            //     foreach (DataRow items in dts.Rows)
-            //     {
-            //         time++;
-            //         if (time == Counts)
-            //         {
-            //             UserIdss += items["Id"].ToString();
-            //         }
-            //         else
-            //         {
-            //             UserIdss += items["Id"].ToString() + ",";
-            //         }
-            //     }
-            //     // condition += " and ManageUserId in (select ManageUserId from UserForRealName where RealName='" + ManageUserIdRealName + "')";
-            //     condition += " and UserId in (" + UserIdss + ")";
-            // }
+            //仓库归属人真实姓名
+            if (!string.IsNullOrEmpty(UserIdRealName))
+            {
+                DataTable dt = OtherMySqlConn.dtable("SELECT Id FROM Users WHERE RealName like '%" + UserIdRealName + "%'");
+                var Count = dt.Rows.Count;
+                int times = 0;
+                string UserIds = "";
+                foreach (DataRow item in dt.Rows)
+                {
+                    times++;
+                    if (times == Count)
+                    {
+                        UserIds += item["Id"].ToString();
+                    }
+                    else
+                    {
+                        UserIds += item["Id"].ToString() + ",";
+                    }
+                }
+                // condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
+                condition += " and UserId in (" + UserIds + ")";
+            }
+            //仓库管理员真实姓名
+
+            if (!string.IsNullOrEmpty(ManageUserIdRealName))
+            {
+                DataTable dts = OtherMySqlConn.dtable("SELECT Id FROM Users WHERE RealName like '%" + ManageUserIdRealName + "%'");
+                var Counts = dts.Rows.Count;
+                int time = 1;
+                string UserIdss = "";
+                foreach (DataRow items in dts.Rows)
+                {
+                    time++;
+                    if (time == Counts)
+                    {
+                        UserIdss += items["Id"].ToString();
+                    }
+                    else
+                    {
+                        UserIdss += items["Id"].ToString() + ",";
+                    }
+                }
+                // condition += " and ManageUserId in (select ManageUserId from UserForRealName where RealName='" + ManageUserIdRealName + "')";
+                condition += " and UserId in (" + UserIdss + ")";
+            }
             //仓库管理员手机号
             //仓库管理员手机号
             if (!string.IsNullOrEmpty(ManageUserIdMobile))
             if (!string.IsNullOrEmpty(ManageUserIdMobile))
             {
             {
@@ -599,7 +599,7 @@ namespace MySystem.Areas.Admin.Controllers
         {
         {
             // RedisDbconn.Instance.AddList("ExcelImport", ExcelPath + "#cut#" + Kind);
             // RedisDbconn.Instance.AddList("ExcelImport", ExcelPath + "#cut#" + Kind);
             string key = function.MD5_16(Guid.NewGuid().ToString());
             string key = function.MD5_16(Guid.NewGuid().ToString());
-            RedisDbconn.Instance.AddList("ExcelImportV3", ExcelPath + "#cut#" + Kind + "#cut#" + key + "#cut#" + SysUserName);
+            RedisDbconn.Instance.AddList("ExcelImportV2", ExcelPath + "#cut#" + Kind + "#cut#" + key + "#cut#" + SysUserName);
             return "success|" + key;
             return "success|" + key;
         }
         }
 
 

+ 0 - 1
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -1418,7 +1418,6 @@ namespace MySystem.Areas.Admin.Controllers
                 newpos.SeoKeyword = oldpos.SeoKeyword;
                 newpos.SeoKeyword = oldpos.SeoKeyword;
                 newpos.PrizeParams = oldpos.PrizeParams;
                 newpos.PrizeParams = oldpos.PrizeParams;
                 newpos.LeaderUserId = oldpos.LeaderUserId;
                 newpos.LeaderUserId = oldpos.LeaderUserId;
-                newpos.IsFirst = oldpos.IsFirst;
                 // }
                 // }
                 // oldpos.BuyUserId = 0;
                 // oldpos.BuyUserId = 0;
                 // oldpos.UserId = 0;
                 // oldpos.UserId = 0;

+ 2 - 2
Areas/Admin/Views/MainServer/SysTools/ChangeBadPos.cshtml

@@ -34,12 +34,12 @@
                                     <label class="layui-form-label">换新类型</label>
                                     <label class="layui-form-label">换新类型</label>
                                     <div class="layui-input-inline">
                                     <div class="layui-input-inline">
                                         <select id="ChangeType" name="ChangeType" lay-search="" lay-filter="ChangeType">
                                         <select id="ChangeType" name="ChangeType" lay-search="" lay-filter="ChangeType">
-                                            <option value="0">创客换新</option>
+                                            <option value="0" selected="selected">创客换新</option>
                                             <option value="1">分仓换新</option>
                                             <option value="1">分仓换新</option>
                                         </select>
                                         </select>
                                     </div>
                                     </div>
                                 </div>
                                 </div>
-                                <div class="layui-form-item" id="MakerCodeSelect" style="display: none;">
+                                <div class="layui-form-item" id="MakerCodeSelect">
                                     <label class="layui-form-label">创客编号</label>
                                     <label class="layui-form-label">创客编号</label>
                                     <div class="layui-input-inline">
                                     <div class="layui-input-inline">
                                         <input class="layui-input" type="text" id="MakerCode" name="MakerCode"
                                         <input class="layui-input" type="text" id="MakerCode" name="MakerCode"