{
  template: '${tmpl}',
    data: function() {
      return {
        showSelectedNclList: false,
        fkey: 0,
        isIndeterminate: false,
        checkAll: false,
        checkedNcl: [],
        ncl: ["01", "02", "03", "04", "05", "06", "07", "08", "09",
          "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24",
          "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38",
          "39", "40", "41", "42", "43", "44", "45"
        ],
        nclOptions: ["01", "02", "03", "04", "05", "06", "07", "08", "09",
          "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24",
          "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38",
          "39", "40", "41", "42", "43", "44", "45"
        ],
        isIndeterminate: false,
        refbizcode: '',
        bizCode: '',
        filterText: '',
        status: "",
        data2: [{
          id: 1,
          label: '一级 1',
          children: []
        }],
        ncldata: [
          { code: "01", name: "化学原料" }, { code: "02", name: "颜料油漆" }, { code: "03", name: "日化用品" }, { code: "04", name: "燃料油脂" }, { code: "05", name: "医药" },
          { code: "06", name: "金属材料" }, { code: "07", name: "机械设备" }, { code: "08", name: "手工器械" }, { code: "09", name: "科学仪器" }, { code: "10", name: "医疗器械" },
          { code: "11", name: "灯具空调" }, { code: "12", name: "运输工具" }, { code: "13", name: "军火烟火" }, { code: "14", name: "珠宝钟表" }, { code: "15", name: "乐器" },
          { code: "16", name: "办公用品" }, { code: "17", name: "橡胶制品" }, { code: "18", name: "皮革皮具" }, { code: "19", name: "建筑材料" }, { code: "20", name: "家具" },
          { code: "21", name: "厨房洁具" }, { code: "22", name: "绳网袋篷" }, { code: "23", name: "纱线丝" }, { code: "24", name: "布料床单" }, { code: "25", name: "服装鞋帽" },
          { code: "26", name: "纽扣拉链" }, { code: "27", name: "地毯席垫" }, { code: "28", name: "健身器材" }, { code: "29", name: "食品" }, { code: "30", name: "方便食品" },
          { code: "31", name: "饲料种籽" }, { code: "32", name: "啤酒饮料" }, { code: "33", name: "酒" }, { code: "34", name: "烟草烟具" }, { code: "35", name: "广告销售" },
          { code: "36", name: "金融物管" }, { code: "37", name: "建筑修理" }, { code: "38", name: "通讯服务" }, { code: "39", name: "运输贮藏" }, { code: "40", name: "材料加工" },
          { code: "41", name: "教育娱乐" }, { code: "42", name: "网站服务" }, { code: "43", name: "餐饮住宿" }, { code: "44", name: "医疗园艺" }, { code: "45", name: "社会服务" }

        ],
        bigtype: [{
          value: '人工智能', label: '人工智能',
          children: [{ value: '技术研究', label: '技术研究', }, { value: '智能办公', label: '智能办公', }, { value: '智能驾驶', label: '智能驾驶', }, { value: '智能教育', label: '智能教育', }, { value: '智能穿戴', label: '智能穿戴', }]
        },
        {
          value: '文教娱|传媒、教育、文化、娱乐', label: '文教娱|传媒、教育、文化、娱乐',
          children: [{ value: '影视', label: '影视', }, { value: '教育培训', label: '教育培训', }, { value: '文化娱乐', label: '文化娱乐', }, { value: '旅游服务', label: '旅游服务', }]
        },
        {
          value: '服务业|餐饮、修理安装', label: '服务业|餐饮、修理安装',
          children: [{ value: '餐饮', label: '餐饮', }, { value: '修理安装', label: '修理安装', }]
        },
        {
          value: '商业服务|广告、金融、法律财务人力服务', label: '商业服务|广告、金融、法律财务人力服务',
          children: [{ value: '广告、会展', label: '广告、会展', }, { value: '人力资源', label: '人力资源', }, { value: '创业孵化器', label: '创业孵化器', }, { value: '金融财务', label: '金融财务', }, { value: '商业咨询', label: '商业咨询', }, { value: '法律服务', label: '法律服务', }]
        },
        {
          value: '房产建材|建筑工程监理物管', label: '房产建材|建筑工程监理物管',
          children: [{ value: '装饰装潢', label: '装饰装潢', }, { value: '家具家居', label: '家具家居', }, { value: '建材', label: '建材', }, { value: '建筑、监理', label: '建筑、监理', }]
        },
        {
          value: '交通物流|运输、仓储、物流、快递、车辆养护', label: '交通物流|运输、仓储、物流、快递、车辆养护',
          children: [{ value: '物流运输、快递', label: '物流运输、快递', }, { value: '车辆养护、维修', label: '车辆养护、维修', }, { value: '物流仓储', label: '物流仓储', }]
        },
        {
          value: '医药保健化工能源', label: '医药保健化工能源',
          children: [{ value: '化工能源', label: '化工能源', }, { value: '眼镜面罩', label: '眼镜面罩', }, { value: '医疗保健', label: '医疗保健', }, { value: '医疗器械', label: '医疗器械', }, { value: '药品', label: '药品', }, { value: '医疗服务', label: '医疗服务', }]
        },
        {
          value: '食品饮料|生鲜、保健产品、烟酒糖茶', label: '食品饮料|生鲜、保健产品、烟酒糖茶',
          children: [{ value: '烟酒糖茶、饮料', label: '烟酒糖茶、饮料', }, { value: '营养产品', label: '营养产品', }, { value: '生鲜食品、糕点', label: '生鲜食品、糕点', }, { value: '珠宝钟表', label: '珠宝钟表', }, { value: '美容、化妆品', label: '美容、化妆品', }, { value: '服装、配饰', label: '服装、配饰', }]
        },
        {
          value: 'IT、互联网||通信、电子、互联网', label: 'IT、互联网||通信、电子、互联网',
          children: [{ value: '在线服务', label: '在线服务', }, { value: '游戏', label: '游戏', }, { value: '社交、论坛', label: '社交、论坛', }, { value: '电商平台', label: '电商平台', }, { value: '软件开发运营', label: '软件开发运营', }, { value: '家电产品', label: '家电产品', }, { value: '计算机及周边', label: '计算机及周边', }, { value: '通信', label: '通信', }]
        },
        {
          value: '农业|农、林、牧、渔等', label: '农业|农、林、牧、渔等',
          children: [{ value: '化肥、饲料', label: '化肥、饲料', }, { value: '农产品加工', label: '农产品加工', }]
        },
        {
          value: '机械制造|机械车辆五金工具', label: '机械制造|机械车辆五金工具',
          children: [{ value: '五金器械', label: '五金器械', }, { value: '车船航空器制造', label: '车船航空器制造', }, { value: '机械、加工制造', label: '机械、加工制造', }]
        },

        ],
        selectedOptions: [],
        defaultProps: {
          children: 'children',
          label: function (data, node) {
            if (data.code == null || data.code == null) {
              return data.name;
            } else {
              return data.code + " " + data.name;
            }
          }
        },
        form: {
          selecttype: "自主选择",
          tmFormType: "3",
          tmName: "",
          picUrl: "",
          colorizedPicUrl: "",
          nclTotalPublicExpense: 0,
          invoiceTaxes: 0,
          totalSum: 0,
          remark: "",
        },

        nclOne: [],
        d: {},
        action: "",
        invoiceTaxRate: 10,
        step: "1",
        isRead: false,
        steps: [
          { title: "填写基本信息" },
          { title: "填写申请人信息" },
          { title: "确认订单信息" }
        ],
        apply: {
          type: "",
          applyName: "",
          creditCode: "",
          identityCard: "",
          applyAddr: "",
          zipCode: "100000",
          customerContact: "",
          mobile: "",
          email: "",
          businessLicensePic: "",
          identityCardPic: "",
          sealAuthorizeStuff: "",
          descUrl: "",
        },
        order: {},
        qrcode: "",
        qrCodeJumpUrl: "",
        pay: {
          offlinePayDocument: "",
          paymentPlatformType: "wx"
        },
        payconfirm: false,
        tradeKey: "",
        interval: null,
        orderNum: "",
        canedit: true,
        channelOrder: {}
      }
    },
  computed: Vuex.mapState({
    count: state => state.count,
    headStyle: function () {
      return { "background-color": "white" };
    }
  }),
    created: function() {

    },
  mounted: function() {
    var that = this;
    var orderNum = window.location.href.split("allfqtmdetail/")[1];
    this.orderNum = orderNum;
    if (!orderNum) {
      this.$message.warning(`订单参数错误`);
      this.$router.push("/sysmag/allfqtm");
      return;
    }
    this.$root.getReq("/web/pconfigCtl/getConfigValue", { configType: "invoiceTaxRate" }).then(function (d) {
      console.log(d);
      if (d != null && d.configValue != null && d.configValue != "") {
        that.invoiceTaxRate = Number(d.configValue);
      }
    });
    this.getOrderDetail();

  },
  methods: {
    getOrderDetail: function() {
      var orderNum = this.orderNum;
      var that = this;
      this.$root.getReq("/web/orderCtl/getFqOrderDetailByOrderNum", { orderNum: orderNum }).then(function (d) {
        console.log("/web/orderCtl/getOrderDetailByOrderNum");
        console.log(d);
        if (d && d.code == "1") {
          var d_tm = d.data.tms[0];
          var d_order = d.data.order;
          var d_apply = d.data.apply;
          var d_customer = d.data.customer;
          var form = {
            selecttype: "自主选择",
            tmFormType: d_tm.tmFormType,
            tmName: d_tm.tmName,
            picUrl: d_tm.picUrl,
            nclTotalPublicExpense: d_order.totalPublicExpense, colorizedPicUrl:
              d_tm.colorizedPicUrl,
            invoiceTaxes: d_order.totalInvoiceTaxes, totalSum: d_order.totalSum, remark: d_order.remark
          };
          var apply = {
            type: d_apply ? d_apply.type : "",
            applyName: d_apply ? d_apply.applyName : "",
            creditCode: d_apply ? d_apply.creditCode : "",
            identityCard: d_apply ? d_apply.identityCard : "",
            applyAddr: d_apply ? d_apply.applyAddr : "",
            zipCode: d_customer ? d_customer.zipCode : "100000",
            customerContact: d_customer ? d_customer.customerContact : "",
            mobile: d_customer ? d_customer.mobile : "",
            email: d_customer ? d_customer.email : "",
            businessLicensePic: d_apply ? d_apply.businessLicensePic : "",
            identityCardPic: d_apply ? d_apply.identityCardPic : "",
            sealAuthorizeStuff:
              d_tm.sealAuthorizeStuff, descUrl:
              d_tm.descUrl
          };
          var order = d_order;
          that.form = form;
          that.apply = apply;
          that.order = order;
          var nclOne = [];
          for (var i = 0; i < d.data.tms.length; i++) {
            var t = d.data.tms[i];
            var nclThree = null;
            if (t.nclSmallCodes.indexOf("nclthree") < 0) {
              nclThree = JSON.parse(t.nclSmallCodes);
            } else {
              var tmpNclThree = JSON.parse(t.nclSmallCodes);
              var sources = [];
              for (var j = 0; j < tmpNclThree.nclthree.length; j++) {
                var tmpItem = tmpNclThree.nclthree[j];
                if (tmpItem) {
                  var source = {
                    "code": tmpNclThree.nclthree[j].code,
                    "name": tmpNclThree.nclthree[j].name,
                    "fullname": tmpNclThree.nclthree[j].code + " " + tmpNclThree.nclthree[j].name,
                    "pcode": tmpNclThree.nclthree[j].pcode,
                    "disabled": false
                  };
                  sources.push(source);
                }
              }
              nclThree = sources;
            }
            console.log(Number(t.nclOneCodes));
            var name = that.ncldata[Number(t.nclOneCodes)-1].name;
            var o = { code: t.nclOneCodes, name: name, nclThree: nclThree };
            nclOne.push(o);

          }
          that.nclOne = nclOne;
        }
      });
    },
    totmlist:function(){
      this.$router.push("/sysmag/allfqtm");
      return;
    }
  },
    vname:"gsb-allfqtmdetail"
}
