zhuyiyi 1 mese fa
parent
commit
98d7a99c6d

+ 11 - 0
BizCom/Dao/CeErpTradeCellExtend.cs

@@ -526,6 +526,17 @@ namespace BizCom
             get { return _sysPriceRate; }
             set { _sysPriceRate = value; }
         }
+
+        private string _negotiate = "";
+        /// <summary>
+        /// 协商内容
+        /// </summary>
+        [Property]
+        public string negotiate
+        {
+            get { return _negotiate; }
+            set { _negotiate = value; }
+        }
         public static CeErpTradeCellExtend getByTid(string ctid)
         {
             return FindFirst(Expression.Sql(string.Format("ctid='{0}'", ctid)));

+ 28 - 1
SiteCore/Handler/sync.order.cs

@@ -8609,7 +8609,7 @@ namespace SiteCore.Handler
                         string numSql = string.Format("SELECT COUNT ( * ) AS BackNum FROM dbo.Ce_ErpTradeAfterSaleLog WHERE tid = '{0}' AND Con in ('责任主管不认可','供应商不认可')", ceErpTradeResponsible.tid);
                         DataTable dt = DbHelper.DbConn.ExecuteDataset(numSql).Tables[0];
                         int num = Convert.ToInt32(dt.Rows[0]["BackNum"]);
-                        if (num <= 1)
+                        if (num < 1)
                         {
 
                             entity.AfterSaleState = 1;
@@ -15185,6 +15185,33 @@ namespace SiteCore.Handler
             return unit;
         }
 
+        public void setNegotiateInfo()
+        {
+            string ctid = GetPostString("ctid");
+            string negotiate = GetPostString("negotiate");
+
+            if (!string.IsNullOrEmpty(ctid))
+            {
+                CeErpTradeCellExtend ce = CeErpTradeCellExtend.getByTid(ctid);
+                if (ce == null)
+                {
+                    ce = new CeErpTradeCellExtend();
+                    ce.ctid = ctid;
+                }
+                ce.negotiate = negotiate;
+                if (ce.ID > 0)
+                {
+                    ce.Update();
+                }
+                else
+                {
+                    ce.Create();
+                }
+
+                returnSuccessMsg("保存成功");
+            }
+        }
+
     }
 }
 

+ 1 - 0
Web/EOrder/MyOrderList.aspx

@@ -65,6 +65,7 @@
             <div name="orderstatus" width="50" align="center" headeralign="center" renderer="orderStatusRenderer">状态</div>
             <div name="orderscus" width="60" align="center" headeralign="center" renderer="orderCusRenderer">客服</div>
             <div name="orderdesign" width="60" align="center" headeralign="center" renderer="orderDesignRenderer">设计师</div>
+            <div field="negotiate" width="60" align="center" headeralign="center">协商卡</div>
             <div field="ReturnReason" width="70" align="center" headeralign="center">打回原因</div>
             <div name="action" width="120" headeralign="center" align="center" renderer="myorderAction" cellstyle="padding:0;">#</div>
         </div>

+ 31 - 0
Web/EOrder/OrderList.aspx

@@ -155,6 +155,7 @@
                 <div field="quantity" visible="false" align="center" headeralign="center">数量</div>
                 <div field="numbers" visible="false" align="center" headeralign="center">款数</div>
 
+                <div field="negotiate" visible="false" align="center" headeralign="center">协商卡</div>
                 <div field="buyer_message" visible="false" align="center" headeralign="center">买家留言</div>
                 <div field="SupplierName" visible="false" align="center" headeralign="center">供应商</div>
                 <div field="OutSid" visible="false" align="center" headeralign="center">运单号</div>
@@ -713,6 +714,33 @@
     </div>
 
 
+    <div id="negotiate_win" class="mini-window" title="协商内容" style="width: 360px; height: 200px; position: relative; display: none">
+        <input type="hidden" value="" id="negotiateCtid" />
+        <table class="win_tb" border="0" cellpadding="0" cellspacing="1">
+            <tr>
+                <td class="td1"></td>
+                <td class="td2" colspan="3">
+                    <select id="txtNegotiateSelectChange">
+                        <option value="">请选择</option>
+                        <option value="补差价单未发协商卡">补差价单未发协商卡</option>
+                        <option value="客户补差价单协商卡没同意或拒绝">客户补差价单协商卡没同意或拒绝</option>
+                        <option value="客户协商卡未同意或拒绝">客户协商卡未同意或拒绝</option>
+                        <option value="未发协商卡">未发协商卡</option>
+                        <option value="协商卡时间不合理">协商卡时间不合理</option>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="4">
+                    <div class="win_btn" style="text-align: center;">
+                        <a class="mini-button" iconcls="icon-ok" onclick="saveNegotiateFn">保存</a>&nbsp;
+                        <a class="mini-button" iconcls="icon-cancel" onclick="cancelNegotiateFn">取消</a>
+                    </div>
+                </td>
+            </tr>
+        </table>
+    </div>
+
     <div id="distribute_win" class="mini-window" title="指派设计师" style="width: 360px; height: 200px; position: relative; display: none">
         <table class="win_tb" border="0" cellpadding="0" cellspacing="1">
             <tr>
@@ -737,6 +765,7 @@
             </tr>
         </table>
     </div>
+
     <div id="uploaderAddress_win" class="mini-window" title="上传文件地址" style="width: 1500px; height: 300px; position: relative; display: none">
         <table class="win_tb" border="0" cellpadding="0" cellspacing="1">
             <tr>
@@ -1465,6 +1494,8 @@
                 $("#selectReason").parents("tr").show();
             }
         }
+
+
     </script>
 
     <div class="image_large" onclick="hideImage(this)"></div>

+ 22 - 0
Web/EOrder/js/p_order.js

@@ -72,10 +72,32 @@ function orderAction(e) {
     if (record.OrderState < 7) {
         html += getGridBtn("word", "上传地址", "uploaderAddress('" + record.ctid + "','" + record.seller_memo + "')");
     }
+    if (userPostCode == "AfterSale" || userPostCode == "AfterSaleMaster" || userPostCode == "SysAdmin") {
+        html += getGridBtn("dis", "协商卡", "negotiate('" + record.ctid + "','" + record.negotiate + "')");
+    }
     //html += getGridBtn("edit", "删除", "deleteFn('" + id + "')");
     //html += getGridBtn("edit", "重置", "resetFn('" + id + "')");
     return html;
 }
+function negotiate(ctid, value) {
+    $("#negotiateCtid").val(ctid);
+    mini.get("negotiate_win").show();
+    $("#txtNegotiateSelectChange").val(value)
+}
+
+function saveNegotiateFn() {
+    let ctid = $("#negotiateCtid").val();
+    let negotiate = $("#txtNegotiateSelectChange option:selected").val()
+    postAjax("setNegotiateInfo", { ctid, negotiate }, function (data) {
+
+        resultShow(data, "grid.reload();");
+        mini.get("negotiate_win").hide();
+    })
+}
+
+function cancelNegotiateFn() {
+    mini.get("negotiate_win").hide();
+}
 function addDeliveryPaymant() {
     let rec = grid.getSelected();
     let tid = rec.tid;