Prechádzať zdrojové kódy

fix: 为采购订单产品列表项添加颜色属性,使用颜色键赋值

xieyong 3 týždňov pred
rodič
commit
773bda5e4b

+ 7 - 2
src/views/purchasingManage/purchaseOrder/accountstatement/components/addAccountDialog.vue

@@ -168,8 +168,10 @@
         // // 编辑详情回填应付信息(兼容 payablesList / statPayable 两种字段)
         
         // this.dataForm = data;
-
-         this.datasource = data.productList || [];
+        data.productList.forEach(item=>{
+          item.color = item.colorKey;
+        })
+        this.datasource = data.productList || [];
     
         this.payablesList =
           (data.statPayable && data.statPayable.statPayableDetailList) ||
@@ -221,6 +223,9 @@
         };
         let data = await getStatementRecordSummaryAPI(searchQuery);
         // this.recorpayList = data.recorpayList || [];
+        data.productList.forEach(item=>{
+          item.color = item.colorKey;
+        })
         this.datasource = data.productList || [];
         // 查询接口暂未返回预付信息时,先置空(由 payablesInfo 本地维护)
         this.payablesList = 

+ 3 - 0
src/views/purchasingManage/purchaseOrder/accountstatement/components/detailDialog.vue

@@ -105,6 +105,9 @@
         this.dialogType = dialogType;
         this.dataForm.type = type;
         let data = await accountstatementInfoAPI(row.id);
+        data.productList.forEach(item=>{
+          item.color = item.colorKey;
+        })
         this.datasource = data.productList || [];
         this.payablesList =
           (data.statPayable && data.statPayable.statPayableDetailList) || [];