Browse Source

修改列表查询。修改财务不用审核店铺。修改指派共创权限。新增通知共创修改模板

zhuyiyi 1 month ago
parent
commit
6d92221969

+ 6 - 6
SiteCore/Handler/sync.order.cs

@@ -194,7 +194,7 @@ namespace SiteCore.Handler
 
                 if (poscode != "wxDesigner" && poscode != "Designer" && poscode != "DesignerMr" && poscode != "wxDesignerMr" && poscode != "SysAdmin")
                 {
-                    string usershop = CurrentUser.User.pemShop;
+                    string usershop = "0," + CurrentUser.User.pemShop;
                     lw.Add(string.Format("ShopId in ({0})", usershop));
                 }
             }
@@ -207,7 +207,7 @@ namespace SiteCore.Handler
 
                 if (PKey != "admin" && poscode != "SysAdmin")
                 {
-                    string usershop = CurrentUser.User.pemShop;
+                    string usershop = "0," + CurrentUser.User.pemShop;
                     lw.Add(string.Format("ShopId in ({0})", usershop));
                     paramsCount++;
                 }
@@ -2066,7 +2066,7 @@ namespace SiteCore.Handler
                     entitycell.StartDesignTime = entitycell.pay_time;
                     entitycell.DesignUserId = 218;
                 }
-                if (addFrom == "1" && (shopId != 34 && shopId != 96 && shopId != 95 && shopId != 94 && shopId != 114))
+                if (addFrom == "1" && (shopId != 34 && shopId != 96 && shopId != 95 && shopId != 94 && shopId != 114 && shopId != 158))
                 {
                     entitycell.OrderState = -1;//修改12-5
                     CeWithdraw ceWithdraw = new CeWithdraw();
@@ -2613,10 +2613,11 @@ namespace SiteCore.Handler
                         {
                             //apiDesign.API_GetPrintData_CreateOrder(entity);
                         }
+                        List<int> shopIds = new List<int>() { 17, 21, 52, 54, 64, 63, 66, 49, 67, 105, 35, 57, 53, 65, 87, 140, 26, 45, 2, 77, 122, 121, 153, 154, 158 };
                         if (userid == 3542 && entity.seller_memo != "")
                         {
                             string userPost = CurrentUser.UserPost.Post.Code;
-                            if (CurrentUser.UserID == 73)
+                            if (CurrentUser.UserID == 73 || shopIds.Contains(entity.ShopId))
                             {
                                 userPost = "SysAdmin";
                             }
@@ -11104,8 +11105,6 @@ namespace SiteCore.Handler
         public void upd_supplier_audit()
         {
 
-
-
             if (UrlPostParmsCheck("ctid"))
             {
                 string eid = GetPostString("ctid");
@@ -14263,6 +14262,7 @@ namespace SiteCore.Handler
                 {
                     ceErpTradeCellExtend.Create();
                 }
+                designHelper.API_sendTempInfo(ctid, tempId);
                 LogHelper.addLog(ceErpTradeCellExtend.ctid, CurrentUser.UserID, "修改模板id" + tempId, 6);
                 returnSuccessMsg("保存成功");
                 return;

+ 2 - 8
SiteCore/WebCache.cs

@@ -1071,14 +1071,8 @@ namespace SiteCore
                     {
                         dt.Merge(dt_temp);
                     }
-                }*/
-
-
-                //if (dStruct.Order.Length > 0) sql.AppendFormat(" order by {0}", dStruct.Order);
-                //if (where.Length > 0) sql = string.Format("select top {0} {1} from {2} where {3}", dStruct.PageSize, dStruct.Fileds, tableName, where);
-                //else sql = string.Format("select top {0} {1} from {2} ", dStruct.PageSize, dStruct.Fileds, tableName);
-
-                //return dt;
+                }
+                return dt;*/
             }
 
             SqlParameter[] sqlParameter ={

+ 22 - 0
SiteCore/taobao/designHelper.cs

@@ -512,6 +512,28 @@ namespace SiteCore.Handler
             }
         }
 
+        public static void API_sendTempInfo(string orderNumber, string templateCode)
+        {
+            string post_url = "https://template.lingtao8.com/template/api/renewTemplate";
+            WebClient wc = new WebClient();
+            wc.Encoding = Encoding.GetEncoding("utf-8");
+            NameValueCollection PostVars = new NameValueCollection();
+            PostVars.Add("orderNumber", orderNumber);
+            PostVars.Add("templateCode", templateCode);
+            string remoteInfo = "";
+            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
+            try
+            {
+                byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
+                remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
+
+            }
+            catch (Exception ex)
+            {
+                XLog.SaveLog(0, "API_sendTempInfo:" + ex.Message);
+            }
+        }
+
         public static string API_CheckOrderTo(string orderNumber, string spuId, int shopId)
         {
             List<int> shopIds = new List<int>() { 5, 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 21, 23, 24, 27, 28, 31, 32, 56, 61, 63, 64, 66, 124, 126, 127, 128 };

+ 1 - 1
Web/EOrder/OrderList.aspx

@@ -189,7 +189,7 @@
         <li name="edit" iconcls="icon-dispatch" onclick="onOriFileVisit('ORI_FILE')">上传客户文件</li>
         <li name="edit" iconcls="icon-mation" onclick="onOriFileVisit('PACK_FILE')">查看包裹图片</li>
         <li name="edit" iconcls="icon-mation" onclick="onOriFileVisit('AUTH_FILE')">授权文件</li>
-        <li name="edit" iconcls="icon-split" onclick="onOpenTemplate">查看模板</li>
+        <!--<li name="edit" iconcls="icon-split" onclick="onOpenTemplate">查看模板</li>-->
         <li name="edit" iconcls="icon-split" onclick="viewTempImage">查看模板图片</li>
         <!-- <li name="edit" iconcls="icon-hostrepertory" onclick="onOpenInvoice">发票</li> -->
     </ul>

+ 4 - 3
Web/EOrder/js/p_order.js

@@ -68,9 +68,7 @@ function orderAction(e) {
     if (!record.spu_id) {
         html += getGridBtn("edit", "spu", "changeSpuId('" + record.tid + "','" + id + "')");
     }
-    if (record.tempId) {
-        html += getGridBtn("undo", "填写模板", "onSetTemplate('" + record.tempId + "')");
-    }
+    html += getGridBtn("undo", "填写模板", "onSetTemplate('" + record.tempId + "')");
     if (record.OrderState < 7) {
         html += getGridBtn("word", "上传地址", "uploaderAddress('" + record.ctid + "','" + record.seller_memo + "')");
     }
@@ -1253,6 +1251,9 @@ function viewTempImage() {
     let rec = grid.getSelected();
     let tempId = rec.tempId;
     let url = "https://template.lingtao8.com/template/api/getTemplate"
+    if (!tempId) {
+        showToast("无模板编号。无法查看!");
+    }
     $.ajax({
         url: url,
         type: "POST",