zhuyiyi 9 달 전
부모
커밋
d7d45f5735

+ 11 - 0
BizCom/Dao/CeErpTrade.cs

@@ -473,6 +473,17 @@ namespace BizCom
         /// </summary>
         [Property]
         public DateTime? confirmTime { get; set; }
+
+        private string _attachments;
+        /// <summary>
+        /// ¸½¼þ
+        /// </summary>
+        [Property]
+        public string Attachments
+        {
+            get { return _attachments; }
+            set { _attachments = value; }
+        }
         public object Clone()
         {
             return this.MemberwiseClone();

+ 14 - 3
SiteCore/Handler/sync.order.cs

@@ -38,6 +38,7 @@ using System.Web.UI.WebControls;
 using Utils;
 using Utils.Serialization;
 using static NHibernate.Linq.Visitors.LeftJoinDetector;
+using static SiteCore.taoObj.Api_trade_info;
 using static SiteCore.taoObj.Api_waybill_code_response_Obj;
 using static SiteCore.taoObj.work_core_vo;
 using static System.Net.Mime.MediaTypeNames;
@@ -2347,7 +2348,8 @@ namespace SiteCore.Handler
                             returnErrorMsg("售后单被打回了,到售后打回列表恢复即可!");
                             return;
                         }
-                        if (entity.DispatchSort == 2 && userid != 3542 && CurrentUser.UserPost.Post.Code != "SysAdmin" && CurrentUser.UserPost.Post.Code != "Summarize")
+                        //157赖橙帆 159林晨
+                        if (entity.OrderState > 3 && entity.DispatchSort == 2 && userid != 3542 && CurrentUser.UserPost.Post.Code != "SysAdmin" && CurrentUser.UserPost.Post.Code != "Summarize" && CurrentUser.UserID != 157 && CurrentUser.UserID != 159)
                         {
                             returnErrorMsg("指派设计共创无法再次指派!");
                             return;
@@ -2377,8 +2379,17 @@ namespace SiteCore.Handler
                                 return;
                             }
                             entity.DispatchSort = 2;
-                            entity.OrderState = 3;
-
+                        }
+                        else
+                        {
+                            if (entity.DispatchSort == 2)
+                            {
+                                ApiVo apiVo = new ApiVo();
+                                apiVo.actionName = "closeDesign";
+                                apiVo.orderNumber = entity.ctid;
+                                designHelper.API_WorkCore(apiVo);//closeDesign
+                            }
+                            entity.DispatchSort = 0;
                         }
 
                         entity.DesignUserId = userid;

+ 5 - 0
SiteCore/taobao/dataHelper.cs

@@ -203,8 +203,13 @@ namespace SiteCore.Handler
                 returnErrorMsg("查无订单");
                 return;
             }
+            CeErpTrade ceErpTrade = CeErpTrade.Get(ceErpTradeCell.tid);
             Dictionary<string, object> data = new Dictionary<string, object>();
             data.Add("ctid", ceErpTradeCell.ctid);
+            if (ceErpTrade != null)
+            {
+                data.Add("province", ceErpTrade.receiver_state);
+            }
             ReturnSuccess(JsonConvert.SerializeObject(data));
             return;
         }

+ 2 - 2
SiteCore/taobao/designHelper.cs

@@ -57,9 +57,8 @@ namespace SiteCore.Handler
                 }
             }
         }
-
         static string pUrl = "http://47.122.60.212:8181/api/originalOrder/";
-        //static string pUrl = "http://47.122.40.91:8181/api/originalOrder/";
+        //static string pUrl = "http://47.122.40.91:9999/api/manager/";
 
         static HttpHelper tb_http = new HttpHelper();
 
@@ -70,6 +69,7 @@ namespace SiteCore.Handler
                 return new designApiResponseVo(-1, "补差价订单不需要过设计系统");
             }
             string post_url = pUrl + "add";
+            //string post_url = pUrl + "createOrder";
             CeErpOrderFormData formData = null;
             if (post != "SysAdmin" && post != "Summarize")
             {

+ 61 - 1
SiteCore/taobao/preSalesHelper.cs

@@ -503,7 +503,7 @@ namespace SiteCore.Handler
                         int OrderState = Convert.ToInt32(dr["OrderState"]);
                         if (OrderState >= 4)
                         {
-                            returnErrorMsg(dr["ctid"] + "财务要求已下单已发货无法重置");
+                            returnErrorMsg(dr["ctid"] + "设计中订单无法重置");
                             return;
                         }
                         LogHelper.addLog(dr["ctid"].ToString(), UserID, "售前:订单重置", 0, 1);
@@ -558,7 +558,67 @@ namespace SiteCore.Handler
             }
             returnErrorMsg("缺少必要的参数ctid");
         }
+        /// <summary>
+        /// 标识回访
+        /// </summary>
+        public void set_return_visit()
+        {
+            string ctid = GetPostString("ctid");
+            int UserID = GetPostInt("UserID");
+            if (!string.IsNullOrEmpty(ctid))
+            {
+                CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ctid);
+                if (ceErpTradeCellExtend == null)
+                {
+                    ceErpTradeCellExtend = new CeErpTradeCellExtend();
+                    ceErpTradeCellExtend.ctid = ctid;
+                }
+                ceErpTradeCellExtend.returnVisit = 1;
+                if (ceErpTradeCellExtend.ID == 0)
+                {
+                    ceErpTradeCellExtend.Create();
+                }
+                else
+                {
+                    ceErpTradeCellExtend.Update();
+                }
+                CeErpTradeAfterSaleExtend ceErpTradeAfterSaleExtend = CeErpTradeAfterSaleExtend.getByTid(ctid);
+                if (ceErpTradeAfterSaleExtend != null)
+                {
+                    ceErpTradeAfterSaleExtend.TextResult = "";
+                    ceErpTradeAfterSaleExtend.Update();
+                }
+                LogHelper.addLog(ctid, UserID, "售前添加客户回访信息", 6);
+                returnSuccessMsg("修改成功!");
+                return;
+            }
+            returnErrorMsg("找不到订单");
+        }
 
+        public void up_attachments()
+        {
+            string tid = GetPostString("tid");
+            int UserID = GetPostInt("UserID");
+            string atta = GetPostString("atta");
+            if (!string.IsNullOrEmpty(tid))
+            {
+                if (string.IsNullOrEmpty(atta))
+                {
+                    returnErrorMsg("文件地址为空");
+                }
+                CeErpTrade ceErpTrade = CeErpTrade.Get(tid);
+                if (ceErpTrade == null)
+                {
+                    returnErrorMsg("找不到订单");
+                }
+                ceErpTrade.Attachments = atta;
+                ceErpTrade.Update();
+                LogHelper.addLog(tid, UserID, "上传文件地址", 6);
+                returnSuccessMsg("上传成功!");
+                return;
+            }
+            returnErrorMsg("找不到订单");
+        }
         /**
          * 顺丰到付\顺丰寄付
          * ctid

+ 4 - 3
Web/EAfterSale/js/Handling.js

@@ -541,8 +541,8 @@ function saveHandleFn() {
     parms.AfterSalePayment = $("#txtPayment").val();
     parms.DeductFee = $("#txtDeduct").val();
     parms.RefundFee = $("#txtRefund").val();
-    if (parms.ResponsibleSupId != "" && parms.ResponsibleSupId > 0 && parms.supRefundType == "") {
-        mini.alert("供应商责任,请选择供应商退款类型");
+    if ( parms.supRefundType == "") {
+        mini.alert("请选择退款类型");
         return;
     }
     let txtResponsibleView = mini.get("txtResponsibleView").value;
@@ -1131,7 +1131,8 @@ function refundTypeSelFn() {
         $('#id_Deduct_td2').css("display", "none");
     }
 
-    if (tValue == '无需扣款' || tValue == '正常损耗' || tValue == '不理赔' || tValue == '不售后') {
+    changeDuctPrice();
+    if (tValue == '无需扣款' || tValue == '不理赔' || tValue == '不售后') {
         $("#txtRefund1").val("0");
     }
 }

+ 12 - 1
Web/EDelivery/js/DeliveredList.js

@@ -259,11 +259,22 @@ function actionRenderer(e) {
     var id = record.ID;
     var html = getGridBtn("view", "预览文件", "viewCdrImg('" + id + "')");
     html += getGridBtn("edit", "修改物流", "changeExpress('" + record.ctid + "')");
+    if (!!record.attachments) {
+        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+    }
 
     return html;
 }
 
-
+function downAtta(url) {
+    if (!!url) {
+        const link = document.createElement('a');
+        link.href = url;
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+    }
+}
 
 function onBeforeOpen(e) {
     var grid = mini.get("m_grid");

+ 13 - 1
Web/EDelivery/js/PddDelivered.js

@@ -261,10 +261,22 @@ function actionRenderer(e) {
     var id = record.ID;
     var html = getGridBtn("view", "预览文件", "viewCdrImg('" + id + "')");
     html += getGridBtn("edit", "修改物流", "changeExpress('" + record.ctid + "')");
-
+    if (!!record.attachments) {
+        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+    }
     return html;
 }
 
+function downAtta(url) {
+    if (!!url) {
+        const link = document.createElement('a');
+        link.href = url;
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+    }
+}
+
 function onBeforeOpen(e) {
     var grid = mini.get("m_grid");
     var menu = e.sender;

+ 13 - 0
Web/EDelivery/js/PddDelivering.js

@@ -147,8 +147,21 @@ function actionRenderer(e) {
     if (userPostCode != "Supplier") {
         html += getGridBtn("edit", "成本登记", "showPriceWin('" + ctid + "','" + record.payment_cyt + "','" + record.SupplierName + "')");
     }
+    if (!!record.attachments) {
+        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+    }
     return html;
 }
+
+function downAtta(url) {
+    if (!!url) {
+        const link = document.createElement('a');
+        link.href = url;
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+    }
+}
 //function ImgRenderer(e) {
 //    var record = e.record;
 //    if (record.OrderState < 5) {

+ 13 - 0
Web/EDelivery/js/WaitingDelivery.js

@@ -121,8 +121,21 @@ function actionRenderer(e) {
     if (userPostCode != "Supplier") {
         html += getGridBtn("edit", "成本登记", "showPriceWin('" + ctid + "','" + record.payment_cyt + "','" + record.SupplierName + "')");
     }
+    if (!!record.attachments) {
+        html += getGridBtn("view", "下载附件", "downAtta('" + record.attachments + "')");
+    }
     return html;
 }
+
+function downAtta(url) {
+    if (!!url) {
+        const link = document.createElement('a');
+        link.href = url;
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+    }
+}
 //function ImgRenderer(e) {
 //    var record = e.record;
 //    if (record.OrderState < 5) {