1class ScriptLogisticsTracking extends Script { 2 constructor(params) { 3 super(params) 4 this.attrId = params.attrId 5 this.site_id = window.app.info.site.site_id 6 } 7 /** åå§åï¼æ¯æå¼æ¥ */ 8 init() { 9 this.initVue() 10 } 11 async initVue() { 12 const _this = this 13 await new Load('/assets/plugins/vue.min.js') 14 new Vue({ 15 el: `#${this.attrId}.logistics-tracking`, 16 data: { 17 utilts: window.app.utilts, 18 site_id: 0, 19 list: [], 20 step: 1, 21 detail: { 22 invoice_no: 0, 23 customer_po: '', 24 etd: '', 25 eta: '', 26 invoice_amount: '', 27 open_amount: '', 28 rebate_credit: '', 29 payment_due_date: '', 30 days_over_due: '', 31 attachments: [], 32 bl_number: '', 33 tracking_website: '', 34 remark: '', 35 products: [], 36 } 37 }, 38 async mounted() { 39 let el = document.querySelector('.lt-no-data img') 40 if (el) { 41 el.src = el.getAttribute('lazy-src') || '' 42 } 43 try { 44 let pageCode = window?.app?.info?.page?.page_code 45 if (pageCode) { 46 sessionStorage.setItem('page_code', pageCode) 47 } 48 } catch (error) { 49 console.log(error); 50 } 51 this.site_id = window.app.info.site.site_id 52 if (window.LFSDK.isLogin()) { 53 if (!window.location.pathname.includes('/logistics-detail.html')) { 54 window.location.href = globalThis.Server.getRinseHref(`/logistics-detail.html`, window.app.info.site) 55 return 56 } else { 57 let res = await this.getLogisticsList({ site_id: this.site_id }) 58 if (res.code === 0) { 59 this.list = res.data.list 60 } 61 } 62 } 63 }, 64 methods: { 65 async getLogisticsList(params) { 66 return new Promise((resolve, reject) => { 67 this.utilts.request({ 68 url: '/logistics-tracking/list-page-by-search', 69 method: 'GET', 70 params 71 }).then(res => resolve(res)) 72 .catch(err => reject(err)) 73 }) 74 }, 75 async getLogisticsDetail(params) { 76 return new Promise((resolve, reject) => { 77 this.utilts.request({ 78 url: '/logistics-tracking/detail', 79 method: 'GET', 80 params 81 }).then(res => resolve(res)) 82 .catch(err => reject(err)) 83 }) 84 }, 85 async clickDetail(item) { 86 // 妿IDç¸åï¼åä¸åéå¤è¯·æ± 87 this.step = 2 88 if (item.id === this.detail.id) { 89 return 90 } 91 let res = await this.getLogisticsDetail({ id: item.id, site_id: this.site_id }) 92 if (res.code === 0) { 93 this.detail = res.data 94 } 95 }, 96 downloadFile(item) { 97 window.app.utilts.jupmLinkSave({ 98 href: item.file_url, // å¿ å¡«ï¼æä»¶URL 99 target: '_blank', // å¯éï¼éå¸¸ç¨ _blank 100 name: item.file_name // å¯éï¼åç¹åç§° 101 }) 102 // window.open('/uncache/download.html?file=' + (item.file_url || ''), '_blank') 103 } 104 } 105 }) 106 } 107}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.