|
|
@@ -3517,17 +3517,20 @@ namespace SiteCore.Handler
|
|
|
dStruct.PageSize = 200;
|
|
|
}
|
|
|
DataTable dt = WebCache.GetData("view_Waitorderlist", dStruct);
|
|
|
- foreach (DataRow dr in dt.Rows)
|
|
|
+ if (dt != null)
|
|
|
{
|
|
|
- dr["receiver_address"] = dr["receiver_name"].ToString() + " " + dr["receiver_mobile"].ToString() + " " + dr["receiver_state"].ToString() + dr["receiver_city"].ToString() + dr["receiver_district"].ToString() + dr["receiver_address"].ToString();
|
|
|
- if (Convert.IsDBNull(dr["SupplierId"]) || Convert.ToInt32(dr["SupplierId"]) == 0)
|
|
|
+ foreach (DataRow dr in dt.Rows)
|
|
|
{
|
|
|
- CeErpTradeCell entity = CeErpTradeCell.GetByCtid(dr["ctid"].ToString());
|
|
|
- int suid = commonHelper.autoDistributeToSupplier(entity); //自动分配供应商
|
|
|
- entity.SupplierId = suid;
|
|
|
- string suname = commonHelper.getSupplierNameById(entity.SupplierId);
|
|
|
- LogHelper.addLog(entity.ctid, 0, "匹配供应商:" + suname, entity.OrderState);
|
|
|
- entity.Update();
|
|
|
+ dr["receiver_address"] = dr["receiver_name"].ToString() + " " + dr["receiver_mobile"].ToString() + " " + dr["receiver_state"].ToString() + dr["receiver_city"].ToString() + dr["receiver_district"].ToString() + dr["receiver_address"].ToString();
|
|
|
+ if (Convert.IsDBNull(dr["SupplierId"]) || Convert.ToInt32(dr["SupplierId"]) == 0)
|
|
|
+ {
|
|
|
+ CeErpTradeCell entity = CeErpTradeCell.GetByCtid(dr["ctid"].ToString());
|
|
|
+ int suid = commonHelper.autoDistributeToSupplier(entity); //自动分配供应商
|
|
|
+ entity.SupplierId = suid;
|
|
|
+ string suname = commonHelper.getSupplierNameById(entity.SupplierId);
|
|
|
+ LogHelper.addLog(entity.ctid, 0, "匹配供应商:" + suname, entity.OrderState);
|
|
|
+ entity.Update();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
writeGridDataTableJson(dStruct.TotalCount, dt);
|
|
|
@@ -12316,7 +12319,91 @@ namespace SiteCore.Handler
|
|
|
designHelper.api_approveDesign(ctids); //approveDesign
|
|
|
returnSuccessMsg("");
|
|
|
}
|
|
|
+ public void get_issue_list()
|
|
|
+ {
|
|
|
+ DataStruct dStruct = GetPostStruct();
|
|
|
+ List<string> lw = new List<string>();
|
|
|
+ int st = 2;
|
|
|
+ string tid = GetPostString("ctid");
|
|
|
+
|
|
|
+ if (tid.Length > 0) lw.Add(string.Format("(ctid = '{0}' or tid = '{0}' or orderSn = '{0}')", tid));
|
|
|
+
|
|
|
+ string shopname = GetPostString("shopname");
|
|
|
+ if (shopname.Length > 0) lw.Add(string.Format("seller_nick = '{0}'", shopname));
|
|
|
+ string buyernick = GetPostString("buyer_nick");
|
|
|
+ if (buyernick.Length > 0) lw.Add(string.Format("buyer_nick like '%{0}%'", buyernick));
|
|
|
+ string sellermemo = GetPostString("seller_memo");
|
|
|
+ if (sellermemo.Length > 0) lw.Add(string.Format("seller_memo like '%{0}%'", sellermemo));
|
|
|
+
|
|
|
+ string supplier = GetPostString("supplier");
|
|
|
+ if (supplier.Length > 0) lw.Add(string.Format("SupplierName like '%{0}%'", supplier));
|
|
|
+
|
|
|
+
|
|
|
+ string customer = GetPostString("customer");
|
|
|
+ if (customer.Length > 0) lw.Add(string.Format("CustomerTb like '%{0}%'", customer));
|
|
|
+ string design = GetPostString("design");
|
|
|
+ if (design.Length > 0) lw.Add(string.Format("DesignUserName like '%{0}%'", design));
|
|
|
+
|
|
|
+ //lw.Add(string.Format("IsArbitrate != '{0}'", 2));
|
|
|
+
|
|
|
+ string poscode = CurrentUser.UserPost.Post.Code;
|
|
|
+ if (poscode != "SysAdmin")
|
|
|
+ {
|
|
|
+ string shopid = CurrentUser.User.pemShop;
|
|
|
+ lw.Add(string.Format("shopId in ({0})", shopid));
|
|
|
+ }
|
|
|
+ lw.Add("IssueState > 0");
|
|
|
+ dStruct.MainWhere = string.Join(" and ", lw.ToArray());
|
|
|
+ DataTable dt = WebCache.GetData("view_ErpTradeCellIssue", dStruct);
|
|
|
+ writeGridDataTableJson(dStruct.TotalCount, dt);
|
|
|
+ }
|
|
|
+ public void saveIssueContent()
|
|
|
+ {
|
|
|
+ string ctid = GetPostString("ctid");
|
|
|
+ if (!string.IsNullOrEmpty(ctid))
|
|
|
+ {
|
|
|
+ string content = GetPostString("content");
|
|
|
+ CeErpTradeAfterSaleExtend ceErpTradeAfterSaleExtend = CeErpTradeAfterSaleExtend.getByTid(ctid);
|
|
|
+ if (ceErpTradeAfterSaleExtend == null)
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend = new CeErpTradeAfterSaleExtend();
|
|
|
+ ceErpTradeAfterSaleExtend.tid = ctid;
|
|
|
+ }
|
|
|
+ ceErpTradeAfterSaleExtend.IssueContent = content;
|
|
|
+ ceErpTradeAfterSaleExtend.IssueState = 1;
|
|
|
+ if (ceErpTradeAfterSaleExtend.ID > 0)
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend.Update();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend.Create();
|
|
|
+ }
|
|
|
+ LogHelper.addLog(ctid, CurrentUser.UserID, "添加问题反馈信息:" + content, 6);
|
|
|
+ returnSuccessMsg("添加成功!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ returnErrorMsg("找不到订单");
|
|
|
+ }
|
|
|
|
|
|
+ public void dealIssueContent()
|
|
|
+ {
|
|
|
+ string ctid = GetPostString("ctid");
|
|
|
+ if (!string.IsNullOrEmpty(ctid))
|
|
|
+ {
|
|
|
+ string content = GetPostString("content");
|
|
|
+ CeErpTradeAfterSaleExtend ceErpTradeAfterSaleExtend = CeErpTradeAfterSaleExtend.getByTid(ctid);
|
|
|
+ if (ceErpTradeAfterSaleExtend != null)
|
|
|
+ {
|
|
|
+ ceErpTradeAfterSaleExtend.IssueState = 2;
|
|
|
+ ceErpTradeAfterSaleExtend.Update();
|
|
|
+ LogHelper.addLog(ctid, CurrentUser.UserID, "处理问题反馈信息", 6);
|
|
|
+ returnSuccessMsg("修改完成!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnErrorMsg("找不到订单");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|