|
|
@ -522,9 +522,27 @@ export default { |
|
|
partDesc: this.$route.query.partDesc || "", |
|
|
partDesc: this.$route.query.partDesc || "", |
|
|
}; |
|
|
}; |
|
|
try { |
|
|
try { |
|
|
this.materialList = this.$route.query.materialList ? JSON.parse(this.$route.query.materialList) : []; |
|
|
|
|
|
|
|
|
// PDA 端 URL 长度可能受限,materialList 不建议走 query;优先从 sessionStorage 读取兜底 |
|
|
|
|
|
const fromQuery = this.$route.query.materialList |
|
|
|
|
|
? JSON.parse(this.$route.query.materialList) |
|
|
|
|
|
: null; |
|
|
|
|
|
if (Array.isArray(fromQuery)) { |
|
|
|
|
|
this.materialList = fromQuery; |
|
|
|
|
|
} else { |
|
|
|
|
|
const raw = sessionStorage.getItem('directIssueNoMaterial_materialList_forDetail'); |
|
|
|
|
|
this.materialList = raw ? JSON.parse(raw) : []; |
|
|
|
|
|
} |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.materialList = []; |
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
const raw = sessionStorage.getItem('directIssueNoMaterial_materialList_forDetail'); |
|
|
|
|
|
this.materialList = raw ? JSON.parse(raw) : []; |
|
|
|
|
|
} catch (_) { |
|
|
|
|
|
this.materialList = []; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.workOrderNo) { |
|
|
|
|
|
this.$message.error("页面参数丢失(可能是PDA端URL过长被截断),请返回重进"); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
handleBack() { |
|
|
handleBack() { |
|
|
|