Browse Source

feat:ESG-carbon Dialog根据productType显示下载

Ken 3 ngày trước cách đây
mục cha
commit
47afa5cf5a
1 tập tin đã thay đổi với 22 bổ sung1 xóa
  1. 22 1
      components/FootprintReportDialog.vue

+ 22 - 1
components/FootprintReportDialog.vue

@@ -56,7 +56,11 @@
           </div>
         </div>
       </div>
-      <div style="text-align:right;margin-top:20px;">
+      <div class="report-footer" v-if="comProductType == '粗算'">
+        <p>Contact us for detailed reports.</p>
+        <p>esgteam@promocollection.com.au</p>
+      </div>
+      <div style="text-align:right;margin-top:20px;" v-else>
         <el-button type="primary" class="report-btn"
           @click="download(comEquallist?.url)">Download</el-button>
       </div>
@@ -85,6 +89,9 @@ export default {
     comEquallist() {
       return this.carbon[this.form.model]?.accountlist?.find(item => item.code === this.form.transport) || { equallist: [], emissionTotal: 0 };
     },
+    comProductType() {
+      return this.carbon[this.form.model]?.productType || '';
+    },
     comEmissionTotal() {
       return this.multiply(this.comEquallist.emissionTotal, this.form.quantity).toFixed(2) || 0;
     }
@@ -221,6 +228,20 @@ $shadow-green: 0 2px 8px rgba($green, 0.08);
   }
 }
 
+.report-footer{
+  p{
+    font-size: 16px;
+    font-weight: 600;
+    &:nth-child(1){
+      margin: 10px 0;
+      color: #303133;
+    }
+    &:nth-child(2){
+      color: $blue-dark;
+    }
+  }
+}
+
 .report-btn {
   background: $blue-dark !important;
   border: none !important;