Browse Source

fix: 修复获取详情逻辑,确保来源清单始终为数组以避免报错

xieyong 5 days ago
parent
commit
712d8eb879

+ 2 - 3
src/views/bpm/handleTask/components/financialManage/invoiceManage/components/detailDialog.vue

@@ -414,9 +414,8 @@
     methods: {
       //获取详情
       async getInfo(id) {
-        this.form = (await invoiceApplyInfoV2API(id)) || {};
-        //来源清单没有数据时给空数组,避免表格因空行报错
-        this.form.relatedList = this.form.relatedVO ? [this.form.relatedVO] : [];
+        this.form = await invoiceApplyInfoV2API(id);
+        this.form.relatedList = [this.form.relatedVO];
         this.form.category = Number(this.form.category) || '';
         this.$nextTick(() => {
           // 根据来源类型设置数据源:99 用 tableInfo(setValue),非 99 用 tableInfoNew(putValue)