diff --git a/src/views/material/part/partLease/component/homeApply.vue b/src/views/material/part/partLease/component/homeApply.vue index 9046a693..87ab146b 100644 --- a/src/views/material/part/partLease/component/homeApply.vue +++ b/src/views/material/part/partLease/component/homeApply.vue @@ -120,7 +120,7 @@ /> - +
@@ -342,14 +342,23 @@ export default { methods: { //打开领料单 async handleLld(row) { + this.leaseApplyData = {} + this.leaseApplyDetails = [] this.title = '领料单' this.open = true - const res = await getPartLeaseByTaskIdApi({ taskId: row.taskId }) - console.log('🚀 ~ handleLld ~ res:', res) - this.leaseApplyDetails = res.data.detailsList - this.leaseApplyData = res.data.details - this.leaseApplyData.createTime = row.createTime - this.leaseApplyData.code = row.code + this.loading = true + try { + const res = await getPartLeaseByTaskIdApi({ taskId: row.taskId }) + console.log('🚀 ~ handleLld ~ res:', res) + this.leaseApplyDetails = res.data.detailsList + this.leaseApplyData = res.data.details + this.leaseApplyData.createTime = row.createTime + this.leaseApplyData.code = row.code + } catch (error) { + console.log('🚀 ~ handleLld ~ error:', error) + } finally { + this.loading = false + } }, //打印 print() {