diff --git a/src/views/purchase/processing/orderProcessing.vue b/src/views/purchase/processing/orderProcessing.vue index 1da0188..deebd4f 100644 --- a/src/views/purchase/processing/orderProcessing.vue +++ b/src/views/purchase/processing/orderProcessing.vue @@ -1,11 +1,15 @@ @@ -52,6 +72,7 @@ export default { sysOrgCode: Vue.ls.get(USER_INFO).orgCode, supplierList: [], tableData: [], + dataShow: false, } }, computed: { @@ -81,14 +102,21 @@ export default { }) }, getTableData() { + this.dataShow = false; getAction(this.getdata,).then(res => { //如果为200,则获取数据 if (res.code == 200) { this.tableData = res.result.records; - this.activeKey = [0]; - this.tableData.forEach(item => { - item.procurementContent = JSON.parse(item.procurementContent); - }); + //判断数据是否为空 + if (this.tableData.length == 0) { + this.dataShow = false; + } else { + this.activeKey = [0]; + this.tableData.forEach(item => { + item.procurementContent = JSON.parse(item.procurementContent); + }); + this.dataShow = true; + } } else { this.$message.error(res.message); } @@ -97,7 +125,7 @@ export default { receiveNO(item) { //深拷贝一份item let newItem = Object.assign({}, item); - newItem.procurementContent = String(newItem.procurementContent); + newItem.procurementContent = JSON.stringify(newItem.procurementContent); postAction(this.receiveNOurl, newItem).then(res => { //如果为200,则获取数据 if (res.code == 200) { @@ -107,7 +135,37 @@ export default { this.$message.error(res.message); } }) + }, downloadFile(text) { + if (!text) { + this.$message.warning("未知的文件") + return; + } + if (text.indexOf(",") > 0) { + text = text.substring(0, text.indexOf(",")) + } + let url = this.getFileAccessHttpUrl(text) + window.open(url); }, + getFileAccessHttpUrl(avatar, subStr) { + if (!subStr) subStr = 'http' + try { + if (avatar && avatar.startsWith(subStr)) { + return avatar; + } else { + if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) { + return window._CONFIG['staticDomainURL'] + "/" + avatar; + } + } + } catch (err) { + return; + } + }, generateOrder(item) { + console.log(item); + this.$message.success('生成订单中'); + }, arrange(item) { + console.log(item); + this.$message.success('正在整理'); + } } } diff --git a/src/views/purchase/receiving/PurchaseOrderConfirmationList.vue b/src/views/purchase/receiving/PurchaseOrderConfirmationList.vue index 31ee1f8..89503ad 100644 --- a/src/views/purchase/receiving/PurchaseOrderConfirmationList.vue +++ b/src/views/purchase/receiving/PurchaseOrderConfirmationList.vue @@ -1,6 +1,9 @@