{
  template: '${tmpl}',
    data: function() {
      return {
        active: 1,
        code: {},
        dataOrder: {},
        dataCustomerinfo: {},
        img: null,
        tyImg: [],
        trademarks: '',
        trademarksLength: '',
        smallType: null,
        smallTypeLength: null,
        cellValue: '',
        target: '/mobiletypedetail',

        /**交官文件 */
        stuffList: [],

        /**回执文件 */
        officialList: [],
        officeShow: false,
        isJpg: null,
        jpgUrl: '',
      }
    },
  mounted: function() {
    console.log(this.$route.query);
    this.code.orderNum = this.$route.query.code;
    this.$root.getReq("/web/orderCtl/getTmOrderDetail?orderNum=" + this.code.orderNum).then((res) => {
      console.log(res.data.trademarks, res, "/////////////////////////////");


      this.dataOrder = res.data.order;
      this.dataCustomerinfo = res.data.customerinfo;
      this.img = res.data.order.mobilePic;
      this.trademarks = res.data.trademarks;
      this.trademarksLength = res.data.trademarks.length;
      console.log(this.dataOrder);
      /**商标图样 */
      console.log(res.data.tmstuffs);

      res.data.tmstuffs.forEach((item, index) => {
        /**商标图样 */
        if (item.stuffType == "ty" || item.stuffType == "csty") {
          this.tyImg.push(item.stuffUrl);
        }
        /**交官文件 */
        if (item.stuffType != "ty" && item.stuffType != "csty") {
          var obj = {};
          obj.url = item.stuffUrl;
          obj.name = item.name;
          this.stuffList.push(obj);
        }
      });
      this.trademarks.forEach((item, index) => {
        /*大小类 */
        this.smallTyp = this.trademarks[index].nclSmallCodes;
        this.smallTypeLength += JSON.parse(this.trademarks[index].nclSmallCodes).length;
        /**回执文件 */
        console.log(item, "xxxxxxxxxxxxxxxxxxxxxxxx00");
        item.tmofficials.forEach((item1, index1) => {
          let obj = {};
          obj.url = item1.officialFileUrl;
          obj.name = item1.officialFileName;
          this.officialList.push(obj);
        });

      });
      console.log(this.officialList, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

      this.cellValue = `共${this.trademarksLength}大类${this.smallTypeLength}个小项`;
      let trademarks = JSON.stringify(this.trademarks);
      this.target = `/mobiletypedetail?data=${trademarks}`;



    });
    this.step();

  },
  created: function() {

  },
  methods: {
    step() {
      /*全部订单状态 需要判断付款状态是否存在 存在用付款状态的id */
      let active = Number(this.$route.query.active);
      this.active = ++active;
    },
    handleOffice(){
      this.officeShow = false;
    },
    showOffice(item){
      this.officeShow = true;
      console.log(item.url);
      if (item.url.indexOf('.jpg') != -1) {
        this.isJpg = true;
        this.jpgUrl = item.url;
      } else {
        this.isJpg = false;
        console.log($('.mobilemyindentdetail-panel-body'));
        this.$nextTick(() => {
          $('.mobilemyindentdetail-panel-body').scroll(0, 0);
          $('.mobilemyindentdetail-panel-body').media({
            width: '100%',
            autoplay: true,
            src: item.url,
          });
        })

      }

      /*
this.$router.push({ path: "/mobilepdf", query: { index, index1 } });
*/
    },

  },
  vname: "gsb-mobilemyindentdetail"
}
