From adee7a71ba7ab1b63cab63381dfe1846437853d6 Mon Sep 17 00:00:00 2001
From: wzp <2040239371@qq.com>
Date: 星期四, 02 三月 2023 17:37:05 +0800
Subject: [PATCH] 增加分销商配置

---
 web/web/GwOrderCreate.aspx |   79 ++++++++++++++++++++++++++-------------
 1 files changed, 53 insertions(+), 26 deletions(-)

diff --git a/web/web/GwOrderCreate.aspx b/web/web/GwOrderCreate.aspx
index 7cb0dd4..f352f0f 100644
--- a/web/web/GwOrderCreate.aspx
+++ b/web/web/GwOrderCreate.aspx
@@ -16,37 +16,58 @@
                         璐﹀彿鍏呭�� <input type="hidden" name="apid" id="apid" value="0"/></h4>
                 </div>
                 <div class="modal-body">
-                    <div class="form-group">
-                        <label class="col-sm-2 control-label">
-                            瀹㈡埛璐﹀彿</label>
-                        <div class="col-sm-6 ">
-                            <select name="clientId" id="clientId" class="form-control" disabled="disabled">
-                                <%=GetClientOptions(GwOrder.ClientId)%>
-                            </select>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                瀹㈡埛璐﹀彿</label>
+                            <div class="col-sm-6 ">
+                                <input type="text" class="form-control" name="clientId" id="clientId" value="<%=GwOrder.ClientId %>" readonly="readonly"/>
+                            </div>
                         </div>
-                    </div>
-                    <div class="form-group">
-                        <label class="col-sm-2 control-label">
-                            鐭俊璐﹀彿</label>
-                        <div class="col-sm-6 ">
-                            <%if (_controlFlag == 0)
-                                { %>
-                                <select name="spId" id="spId" class="form-control" onchange="getGwSp(this);" >
-                                    <%=GetSpOptions()%>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                鍏徃鍚嶇О</label>
+                            <div class="col-sm-6 ">
+                                <input type="text" class="form-control" name="company" id="company" value="<%=GwOrder.Company %>" readonly="readonly"/>
+                            </div>
+                        </div>
+                    <%if (_controlFlag == 0)
+                        { %>
+                        <!--
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                瀹㈡埛璐﹀彿</label>
+                            <div class="col-sm-6 ">
+                                <select name="clientId" id="clientId" class="form-control" disabled="disabled">
+                                    <!%=GetClientOptions(GwOrder.ClientId)%>
                                 </select>
-                            <%}
-                                else { %>
-                            <input type="text" class="form-control" name="spId" id="spId" value="<%=GwOrder.SpId %>" readonly="readonly"/>
-                            <%} %>
+                            </div>
                         </div>
-                    </div>
+                        -->
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                鐭俊璐﹀彿</label>
+                            <div class="col-sm-6 ">
+                                    <select name="spId" id="spId" class="form-control" onchange="getGwSp(this);" >
+                                        <%=GetSpOptions()%>
+                                    </select>
+                            </div>
+                        </div>
+                    <%}
+                        else { %>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">
+                                鐭俊璐﹀彿</label>
+                            <div class="col-sm-6 ">
+                                <input type="text" class="form-control" name="spId" id="spId" value="<%=GwOrder.SpId %>" readonly="readonly"/>
+                            </div>
+                        </div>
+                    <%} %>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">
                             浜у搧鍚嶇О</label>
                         <div class="col-sm-6 ">
-                            <select name="productId" id="productId" class="form-control" disabled="disabled">
-                                <%=GetProductOptions(GwOrder.ProductId)%>
-                            </select>
+                            <input type="text" class="form-control" name="productName" id="productName" value="<%=GwOrder.ProductName %>" readonly="readonly"/>
+                            <input type="hidden" class="form-control" name="productId" id="productId" value="<%=GwOrder.ProductId %>" />
                         </div>
                     </div>
                     <div class="form-group">
@@ -157,15 +178,19 @@
             var givingNum = $("#givingNum").val();
             var remark = $("#remark").val();
 
+            let _basicNum = $("#_basicNum").val();
+            let _givingNum = $("#_givingNum").val();
+            let beforeBalanceNum = parseInt(_basicNum) + parseInt(_givingNum);
+
             mytek.confirm("鏄惁纭畾鍏呭�硷紵", "鏄惁鎿嶄綔锛�", function (b) {
 
                 if (b) {
 
-                    $.post("gwOrder.ashx", { action: "add", spId: spId, clientId: clientId, productId: productId, price: price, payAmount:payAmount, basicNum: basicNum, givingNum: givingNum, remark: remark }, function (r) {
+                    $.post("gwOrder.ashx", { action: "add", spId: spId, clientId: clientId, productId: productId, price: price, payAmount: payAmount, basicNum: basicNum, givingNum: givingNum, remark: remark, beforeBalanceNum: beforeBalanceNum }, function (r) {
 
                         mytek.alert(r.Message, r.OK, function () {
                             if (r.OK) {
-                                window.location = "GwSp.aspx";
+                                window.location = "<%=backUrl%>";
                             } else {
                                 mytek.alert(r.Message, false);
                             }
@@ -187,8 +212,10 @@
 
                     //$("#orderId").val(r.Message.OrderId).attr("readonly", "readonly");
                     $("#clientId").val(r.Message.ClientId).attr("disabled", "disabled");
+                    $("#company").val(r.Message.Company).attr("disabled", "disabled");
                     $("#spId").val(r.Message.SpId);
                     $("#productId").val(r.Message.ProductId).attr("disabled", "disabled");
+                    $("#productName").val(r.Message.ProductName).attr("disabled", "disabled");
                     $("#_basicNum").val(r.Message.BasicNum, 0);
                     $("#_givingNum").val(r.Message.GivingNum, 0); 
                     $("#price").val(r.Message.Price / 1000, 0.00).attr("readonly", "readonly");

--
Gitblit v1.9.1