{
    template: '${tmpl}',
        data: function() {
            return {
                listPath: {
                    path: `/${this.$root.channelName}/jdindentlist`,
                    query: {
                        channelUserId: this.$route.query.channelUserId,
                    }
                },
                currentStep: 0,
                companyData: [],
                channelFrom: null,
                user_Name: "",
                companyName: '',
                enterprise: [],
                allShareholder: [],
                employees: [],
                logistics: [],
                attachFiles: [],
                created_at: '',
                regInfo: []
            }
        },
    mounted: function() {
        document.cookie.split('; ').map((item, index) => {
            if (item.includes('pin=')) {
                this.user_Name = decodeURIComponent(item.substring(4));
                console.log(this.user_Name, "bbbbbbbbbbbbbbbbbbbbbbbb");
            }
        });
        if (this.$route.query.created_at) {
            this.created_at = this.$route.query.created_at
        }
        this.getChannelFrom();
        this.getDetail();
        this.getFlow();
    },
    created: function() {

    },
    methods: {
        getFlow(){
            console.log(this.$route.query.channelUserId, "llllllllllllllllllllllllllllllllllllll");
            if (this.$route.query.channelUserId != "") {
                this.$root.channelUserId = this.$route.query.channelUserId;
            }
            let obj = this.$root.copyParams({
                "channelUserId": this.$root.channelUserId,
                "orderNo": this.$route.query.orderNo || "203915601880842"
            }, "getOrderDeliveryInfo", "/action/tmOrder/springBoard", 'yes', 'yes');
            console.log(obj);
            /*
            obj.actionBody.channelUserId = '15010929366';
            */
            this.$root.loading = true;
            this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then(d => {
                console.log(d, ';;;;;;;;;;;;;;;;;;;;;;;');
                this.$root.loading = false;
                switch (d.data.orderDeliveryStatusName) {
                    case '已下单':
                        this.currentStep = 0;
                        break;
                    case '园区入驻审核':
                        this.currentStep = 1;
                        break;
                    case '上传工商注册材料':
                        this.currentStep = 2;
                        break;
                    case '工商审核环节':
                        this.currentStep = 3;
                        break;
                    case '刻章环节':
                        this.currentStep = 4;
                        break;
                    case '证件邮寄环节':
                        this.currentStep = 5;
                        break;
                    case '已签收':
                        this.currentStep = 6;
                        break;
                    default:
                        break;
                }
            })
        },
        getDetail(){
            let obj = this.$root.copyParams({
                "idempotentNo": "203915601880842"
            }, "getIcbcOrderDetails", "/action/tmOrder/springBoard");
            this.$root.loading = true;
            this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
                this.$root.loading = false;
                if (d.status == 0) {
                    this.companyName = d.data.companyName;
                    var enterpriseInfo = {};
                    enterpriseInfo.orgType = d.data.orgType;
                    enterpriseInfo.detailAddress = d.data.detailAddress;
                    enterpriseInfo.companyName = d.data.companyName;
                    enterpriseInfo.industryType = d.data.industryType;
                    enterpriseInfo.alternative = d.data.alternative;
                    enterpriseInfo.companyType = d.data.companyType;
                    enterpriseInfo.taxpayerType = d.data.taxpayerType;
                    enterpriseInfo.area = d.data.area;
                    enterpriseInfo.depositRatio = d.data.depositRatio;
                    enterpriseInfo.scope = d.data.scope;
                    let capital = {};
                    capital.capital = d.data.capital;
                    capital.deadline = d.data.deadline;
                    capital.capiDate = d.data.capiDate;
                    this.regInfo.push(capital);
                    this.enterprise.push(enterpriseInfo);
                    let legalShareholder = d.data.legalShareholder;
                    let shareholder = d.data.shareholder;
                    /*合并数组 */
                    legalShareholder.map((item, index) => {
                        item.stockName = `${item.stockName}(法人)`;
                        item.unifyCode = item.creditCode;
                    });
                    shareholder.map((item, index) => {
                        item.stockName = `${item.stockName}(自然人)`;
                        item.unifyCode = item.idCard;
                    });
                    legalShareholder.push.apply(legalShareholder, shareholder);
                    this.allShareholder = legalShareholder;
                    this.allShareholder.map((item, index) => {
                        item.id = index + 1;
                    });
                    console.log(shareholder, "bbbbbbbbbbbbnnnnnnnnnnnnnnnnnnn");


                    this.employees = d.data.employees;
                    this.logistics.push(d.data.logistics);
                    this.attachFiles = d.data.attachFiles;
                    console.log("返回信息", { ...d.data })
                } else {
                    console.log(d.msg);
                }
            })

        },
        getChannelFrom(){
            this.channelFrom = this.$root.getChannelPath();
        },
        loginOut(){
            /*
            var url = encodeURIComponent("http://tm.plus.jdcloud.com/#/jd/jdtrademark") ;
            
            */
            /*
             location.href = `http://login.jdcloud.com/logout?callback=http://tm.plus.jdcloud.com/#/jd/jdtrademark`;
             */

            let _this = this;
            $.ajax({
                async: true,
                url: "https://login.jdcloud.com/logout",
                type: "GET",
                dataType: "jsonp",
                jsonp: 'callback',
                jsonpCallback: 'handleResponse',
                data: {
                },
                success: function (response, status, xhr) {
                    console.log('状态为：' + status + ',状态是：' + xhr.statusText);
                    console.log(response);
                    if (response.code == 0) {
                        console.log(response);
                        _this.$router.push({ path: `/${_this.$root.channelName}/jdtrademark` });
                    }
                }
            });


        },
    },
    vname: "gsb-companydetail"
}
