Greasy Fork

来自缓存

Greasy Fork is available in English.

vc精简版自动加收货人名2

1111111!

当前为 2021-05-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         vc精简版自动加收货人名2
// @namespace    http://tampermonkey.net/
// @version      5.4
// @description  1111111!
// @match        https://pdropship.jd.com/orderManage/initListPage
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
var anniu=`<button type="button"style="float: right;"  id="add_name"class="pui-button ui-widget ui-state-default ui-corner-all pui-button-text-icon-left" role="button" aria-disabled="false">
<span class="pui-button-icon-left ui-icon ui-icon-key"></span>
<span class="pui-button-text">添加收货人</span>
</button>`

    var kefu = "杰";
    var timer3 = "";
    var ccc=''

 timer3=setInterval(func1,1000)

    function func1() {
        if( $(".pui-dialog-buttonpane").length>7){
            clearInterval(timer3)
            console.log("找到了了")
            $(".pui-dialog-buttonpane").eq(5).append(anniu)
            $("#addRemark").eq(0).attr("maxlength","500");
            $("#addRemark").eq(0).attr("placeholder","最多能输入500个字");

        }


        $("#add_name").click(function(){
            var user='1'
            var remark=   $('#addRemark').val()
            var _id= $("#tr_1").text()
            $.get("https://pdropship.jd.com/outBound/outboundList?orderIdList=&orderId="+_id,function(data){
               var _url=data.rows[0].orderDetailList[0].imagePath
                user=data.rows[0].customerName
               // if(_url.indexOf("a6331ac8da17f4fc") >= 0||_url.indexOf("2b356ce939ce81e4") >= 0 )
              //  let pinming=data.rows[0].orderDetailList[0].wareName.indexOf("桌垫") //如果大于0 就是桌垫

                if(_url.indexOf("a6331ac8da17f4fc") >= 0||_url.indexOf("2b356ce939ce81e4") >= 0 ){
                    if( $('#addRemark').val().indexOf("桌垫可定制:")>0){

                      let bz= $('#addRemark').val()

                      let shan_zd=  bz.replace("桌垫可定制:",'').replace(kefu,'').replace(user,'').replace(',','');
                         $('#addRemark').val(shan_zd)
                    }else{
                      $('#addRemark').val(user+',桌垫可定制:'+remark+' '+kefu)
                    }

                }else{
                     if( $('#addRemark').val().indexOf("可定制:")>0){
                      let bz= $('#addRemark').val()
                      let shan_zd=  bz.replace("可定制:",'').replace(kefu,'').replace(user,'').replace(',','');
                         $('#addRemark').val(shan_zd)
                    }else{
                      $('#addRemark').val(user+',可定制:'+remark+' '+kefu)
                    }
                }
                console.log(user)
            })
        })
        }

    // Your code here...














})();