Ver código fonte

修改不认可字数,新增识别地址

zhuyiyi 6 meses atrás
pai
commit
5affc4a97c

+ 1 - 1
SiteCore/taobao/commonHelper.cs

@@ -350,7 +350,7 @@ namespace SiteCore
                 {
                     receiver_state = rDt.Rows[0]["receiver_state"].ToString();
 
-                    if (trade.IsOldCustomer == 1)
+                    if (trade.IsOldCustomer == 1 && !string.IsNullOrEmpty(rDt.Rows[0]["buyer_nick"].ToString()))
                     {
                         StringBuilder oldsql = new StringBuilder();
                         oldsql.AppendFormat("select top 1 * from view_erptradecell where buyer_nick='{0}' and ProductId={1} and SupplierId!=0 order by ID desc;", rDt.Rows[0]["buyer_nick"].ToString(), trade.ProductId);

+ 2 - 2
Web/EAfterSale/WaitingVerify.aspx

@@ -57,8 +57,8 @@
         <input type="hidden" id="win_type" value="0" />
         <input type="hidden" id="win_value" value="0" />
         <div style="display: flex; align-items: center; margin-top: 20px">
-            <label style="margin-right: 10px">说明:</label>
-            <textarea id="supmemo" style="width: 90%; height: 80px;"></textarea>
+            <label style="margin-right: 10px">说明:(最多100个字)</label>
+            <textarea id="supmemo" style="width: 90%; height: 80px;" maxlength="100"></textarea>
         </div>
         <iframe id="upframe" style="width: 100%; height: 200px; border: 0px" src="../plug/ssi/ssi-uploader.html" scrolling="no"></iframe>
         <div id="id_preViewImgCon"></div>

+ 50 - 3
Web/EOrder/OrderList.aspx

@@ -8,6 +8,7 @@
     <script src="../js/ssi/ssi-upload.js"></script>
     <script src="../js/imgbox-1.0.3.js"></script>
     <script src="../js/alioss.js"></script>
+    <script src="../js/address_parse.min.js"></script>
     <script src="../js/xlsx.js"></script>
     <script type="text/javascript" src="js/p_order.js?v=<%=SiteVer %>"></script>
     <script>
@@ -719,10 +720,14 @@
         <table class="win_tb" border="0" cellpadding="0" cellspacing="1">
             <tr>
                 <td class="td1">文件地址</td>
-                <td class="td2" colspan="5">
+                <td class="td2" colspan="3">
                     <div id="uploader_url"></div>
                 </td>
+                <td class="td1">文件名</td>
                 <td class="td2" colspan="5">
+                    <div id="up_memo"></div>
+                </td>
+                <td class="td2">
                     <a class="mini-button" iconcls="icon-add" onclick="addAddressRow">新增一行</a>
                 </td>
             </tr>
@@ -737,6 +742,7 @@
                 <td class="td1">市</td>
                 <td class="td1">区</td>
                 <td class="td1">地址</td>
+                <td class="td1">#</td>
             </tr>
             <tr id="addressBase">
                 <td class="td1">
@@ -769,9 +775,12 @@
                 <td class="td1">
                     <input class="address-input" data-name="address" />
                 </td>
+                <td class="td1">
+                    <div onclick="getAddress(this)" style="padding: 5px 10px; white-space: nowrap; background: #fff; border-radius: 5px; border: 1px solid #e1e1e1; cursor: pointer;">识别地址</div>
+                </td>
             </tr>
             <tr>
-                <td colspan="10">
+                <td colspan="11">
                     <div class="win_btn" style="text-align: center;">
                         <a class="mini-button" iconcls="icon-ok" onclick="saveUploaderAddressFn">确定</a>&nbsp;
                         <a class="mini-button" iconcls="icon-cancel" onclick="cancelUploaderAddressFn">取消</a>
@@ -939,6 +948,40 @@
             return html;
         }
 
+        function getAddress(that) {
+            mini.prompt("请输入地址:", "请输入",
+                function (action, value) {
+                    if (action == "ok") {
+                        let parse_data = window.smart(value)
+                        let inputs = that.closest("tr").querySelectorAll("input");
+                        let { address, city, county, name, phone, province, street } = parse_data;
+                        inputs.forEach(item => {
+                            let data_name = item.dataset.name;
+                            if (data_name == "province") {
+                                item.value = province
+                            }
+                            if (data_name == "city") {
+                                item.value = city
+                            }
+                            if (data_name == "area") {
+                                item.value = county
+                            }
+                            if (data_name == "address") {
+                                item.value = street + address
+                            }
+                            if (data_name == "receiver") {
+                                item.value = name
+                            }
+                            if (data_name == "mobile") {
+                                item.value = phone
+                            }
+                        })
+                    }
+                },
+                true
+            );
+        }
+
         const client = new OSS({
             // yourregion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
             region: "oss-cn-fuzhou",
@@ -998,10 +1041,11 @@
         let tagIds = [];
         let tagId = 0;
         let uploaderAddressTid = "";
-        function uploaderAddress(tid) {
+        function uploaderAddress(tid,fileName) {
             uploaderAddressTid = tid;
             //document.getElementById('address_file').value = "";
             $("#uploader_url").text("");
+            document.getElementById("up_memo").innerHTML = fileName;
             tagIds.forEach((item) => {
                 $("#" + item).remove();
             })
@@ -1168,6 +1212,9 @@
                 </td>
                 <td class="td1">
                     <input class="address-input" data-name="address" />
+                </td> 
+                <td class="td1">
+                    <div onclick="getAddress(this)" style="padding: 5px 10px; white-space: nowrap; background: #fff; border-radius: 5px; border: 1px solid #e1e1e1; cursor: pointer;">识别地址</div>
                 </td>
             </tr>`
             let addressBase = document.getElementById("addressBase");

+ 1 - 1
Web/EOrder/js/p_order.js

@@ -58,7 +58,7 @@ function orderAction(e) {
         html += getGridBtn("edit", "spu", "changeSpuId('" + record.tid + "','" + id + "')");
     }
     if (record.OrderState < 7) {
-        html += getGridBtn("word", "上传地址", "uploaderAddress('" + record.ctid + "')");
+        html += getGridBtn("word", "上传地址", "uploaderAddress('" + record.ctid + "','" + record.seller_memo + "')");
     }
     //html += getGridBtn("edit", "删除", "deleteFn('" + id + "')");
     //html += getGridBtn("edit", "重置", "resetFn('" + id + "')");

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
Web/js/address_parse.min.js


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff