hezhijie 14 часов назад
Родитель
Сommit
36754bb758

+ 31 - 2
traceCodePackages/traceabilityReport/pages/blacklist/detail/index.vue

@@ -103,15 +103,44 @@ export default {
   onLoad(options) {
     const info = uni.getSystemInfoSync();
     this.statusBarHeight = info.statusBarHeight || 20;
-    const name =
-      options && options.name ? decodeURIComponent(options.name) : "";
+    const name = this.safeDecode(options && options.name);
     this.title = name || "黑名单详情";
     this.creditCode = options.id || "";
     this.dateStr = options.dateStr || ''
 
     this.fetchDetail(this.creditCode, options.dateStr); // 使用固定日期测试,或使用 dateStr
   },
+  onShareAppMessage() {
+    return {
+      title: this.title || "黑名单详情",
+      path: this.buildSharePath(),
+    };
+  },
+  onShareTimeline() {
+    return {
+      title: this.title || "黑名单详情",
+      query: this.buildShareQuery(),
+    };
+  },
   methods: {
+    safeDecode(value) {
+      const raw = value == null ? "" : String(value);
+      if (!raw) return "";
+      try {
+        return decodeURIComponent(raw);
+      } catch (e) {
+        return raw;
+      }
+    },
+    buildShareQuery() {
+      const name = encodeURIComponent(this.title || "");
+      const id = encodeURIComponent(this.creditCode || "");
+      const dateStr = encodeURIComponent(this.dateStr || "");
+      return `id=${id}&dateStr=${dateStr}&name=${name}`;
+    },
+    buildSharePath() {
+      return `/traceCodePackages/traceabilityReport/pages/blacklist/detail/index?${this.buildShareQuery()}`;
+    },
     copyTraceCode(code) {
       const text = String(code || "").trim();
       if (!text) {

+ 48 - 0
traceCodePackages/traceabilityReport/pages/blacklist/index.vue

@@ -87,6 +87,12 @@
                   <text v-if="isCompanySelected(item)">✓</text>
                 </view>
                 <text class="company-name">{{ item.queryCustomer }}</text>
+                <text
+                  class="level-tag"
+                  :class="getLevelClass(item.customerLevel)"
+                >
+                  {{ item.customerLevel }}
+                </text>
               </view>
               <view class="header-right">
                 <text class="status-tag">黑名单</text>
@@ -103,6 +109,14 @@
                   <text class="label">省份</text>
                   <text class="value">{{ item.province }}</text>
                 </view>
+                <view class="info-item">
+                  <text class="label">责任经理</text>
+                  <text class="value">{{ item.responsibleManager }}</text>
+                </view>
+                <view class="info-item">
+                  <text class="label">客户性质</text>
+                  <text class="value">{{ item.customerNature }}</text>
+                </view>
               </view>
             </view>
           </view>
@@ -275,6 +289,12 @@ export default {
   },
   methods: {
     formatDate,
+    getLevelClass(level) {
+      if (level === "VIP") return "tag-vip";
+      if (level === "二级") return "tag-l2";
+      if (level === "三级") return "tag-l3";
+      return "tag-default";
+    },
     switchFilter(value) {
       if (this.currentFilter === value) return;
       this.currentFilter = value;
@@ -1228,4 +1248,32 @@ export default {
   color: #fff;
   box-shadow: 0 6rpx 16rpx rgba(24, 144, 255, 0.3);
 }
+
+.level-tag {
+  font-size: 20rpx;
+  padding: 4rpx 12rpx;
+  border-radius: 8rpx;
+  white-space: nowrap;
+  line-height: 1.2;
+}
+.tag-vip {
+  background: linear-gradient(135deg, #e6f7ff, #bae7ff);
+  color: #096dd9;
+}
+
+.tag-l2 {
+  background: linear-gradient(135deg, #f6ffed, #d9f7be);
+  color: #389e0d;
+}
+
+.tag-l3 {
+  background: linear-gradient(135deg, #fff7e6, #ffe7ba);
+  color: #d46b08;
+}
+
+.tag-default {
+  background: #f5f5f5;
+  color: #999;
+}
+
 </style>

+ 32 - 1
traceCodePackages/traceabilityReport/pages/ganmaoling/detail/index.vue

@@ -88,20 +88,51 @@ export default {
       statusBarHeight: 20,
       flowList: [],
       loading: false,
+      updatedTime: "",
     };
   },
   onLoad(options) {
     const info = uni.getSystemInfoSync();
     this.statusBarHeight = info.statusBarHeight || 20;
-    const name = options.name ? decodeURIComponent(options.name) : "";
+    const name = this.safeDecode(options && options.name);
     const updatedTime = options.updatedTime || "";
     this.title = name || "报表详情";
+    this.updatedTime = updatedTime;
 
     if (name && updatedTime) {
       this.fetchDetail(name, updatedTime);
     }
   },
+  onShareAppMessage() {
+    return {
+      title: this.title || "报表详情",
+      path: this.buildSharePath(),
+    };
+  },
+  onShareTimeline() {
+    return {
+      title: this.title || "报表详情",
+      query: this.buildShareQuery(),
+    };
+  },
   methods: {
+    safeDecode(value) {
+      const raw = value == null ? "" : String(value);
+      if (!raw) return "";
+      try {
+        return decodeURIComponent(raw);
+      } catch (e) {
+        return raw;
+      }
+    },
+    buildShareQuery() {
+      const name = encodeURIComponent(this.title || "");
+      const updatedTime = encodeURIComponent(this.updatedTime || "");
+      return `name=${name}&updatedTime=${updatedTime}`;
+    },
+    buildSharePath() {
+      return `/traceCodePackages/traceabilityReport/pages/ganmaoling/detail/index?${this.buildShareQuery()}`;
+    },
     formatDate,
     formatBillTime(time) {
       if (!time) return "--";

+ 120 - 2
traceCodePackages/traceabilityReport/pages/reportExport/detail/index.vue

@@ -20,6 +20,15 @@
                       {{ prod.name }} {{ prod.spec }}
                     </text>
                   </view>
+                  <view class="company-meta">
+                    <view class="company-meta-row">
+                      <text class="company-meta-item">客户性质:{{ company.customerNature || "--" }}</text>
+                      <text class="company-meta-item">客户等级:{{ company.customerLevel || "--" }}</text>
+                    </view>
+                    <view class="company-meta-row">
+                      <text class="company-meta-item">责任经理:{{ company.responsibleManager || "--" }}</text>
+                    </view>
+                  </view>
                   <!-- <text class="company-total">总数量:{{ company.totalQty }}</text> -->
                 </view>
                 <uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
@@ -30,6 +39,15 @@
                     <text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
                     <uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
                   </view>
+                  <view class="exporter-meta">
+                    <view class="exporter-meta-row">
+                      <text class="exporter-meta-item">客户性质:{{ exp.fromCustomerNature || "--" }}</text>
+                      <text class="exporter-meta-item">客户等级:{{ exp.fromCustomerLevel || "--" }}</text>
+                    </view>
+                    <view class="exporter-meta-row">
+                      <text class="exporter-meta-item">责任经理:{{ exp.fromResponsibleManager || "--" }}</text>
+                    </view>
+                  </view>
                   <view v-if="exp.expanded" class="product-group" v-for="(pg, pIdx) in exp.products" :key="pIdx">
                     <!-- Product Header Removed as requested, info is now in company header -->
                     <!-- <view class="product-header">
@@ -83,6 +101,15 @@
                       {{ prod.name }} {{ prod.spec }}
                     </text>
                   </view>
+                  <view class="company-meta">
+                    <view class="company-meta-row">
+                      <text class="company-meta-item">客户性质:{{ company.customerNature || "--" }}</text>
+                      <text class="company-meta-item">客户等级:{{ company.customerLevel || "--" }}</text>
+                    </view>
+                    <view class="company-meta-row">
+                      <text class="company-meta-item">责任经理:{{ company.responsibleManager || "--" }}</text>
+                    </view>
+                  </view>
                   <!-- <text class="company-total">总数量:{{ company.totalQty }}</text> -->
                 </view>
                 <uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
@@ -93,6 +120,15 @@
                     <text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
                     <uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
                   </view>
+                  <view class="exporter-meta">
+                    <view class="exporter-meta-row">
+                      <text class="exporter-meta-item">客户性质:{{ exp.fromCustomerNature || "--" }}</text>
+                      <text class="exporter-meta-item">客户等级:{{ exp.fromCustomerLevel || "--" }}</text>
+                    </view>
+                    <view class="exporter-meta-row">
+                      <text class="exporter-meta-item">责任经理:{{ exp.fromResponsibleManager || "--" }}</text>
+                    </view>
+                  </view>
                   <view v-if="exp.expanded" class="product-group" v-for="(pg, pIdx) in exp.products" :key="pIdx">
                     <scroll-view scroll-x class="batch-scroll">
                       <view class="batch-table">
@@ -158,6 +194,7 @@ export default {
   },
   data() {
     return {
+      shareTitle: "报表详情",
       taskId: "",
       tableBodyHeight: 0,
       baseRowHeight: 76,
@@ -189,13 +226,25 @@ export default {
     };
   },
   onLoad(options) {
-    const title =
-      options && options.title ? decodeURIComponent(options.title) : "报表详情";
+    const title = this.safeDecode(options && options.title) || "报表详情";
+    this.shareTitle = title;
     this.taskId = options && options.id ? options.id : "";
     uni.setNavigationBarTitle({ title });
     this.tableBodyHeight = 14 * 80;
     this.fetchList();
   },
+  onShareAppMessage() {
+    return {
+      title: this.shareTitle || "报表详情",
+      path: this.buildSharePath(),
+    };
+  },
+  onShareTimeline() {
+    return {
+      title: this.shareTitle || "报表详情",
+      query: this.buildShareQuery(),
+    };
+  },
   computed: {
     isLoading() {
       return (
@@ -214,6 +263,23 @@ export default {
     },
   },
   methods: {
+    safeDecode(value) {
+      const raw = value == null ? "" : String(value);
+      if (!raw) return "";
+      try {
+        return decodeURIComponent(raw);
+      } catch (e) {
+        return raw;
+      }
+    },
+    buildShareQuery() {
+      const id = encodeURIComponent(this.taskId || "");
+      const title = encodeURIComponent(this.shareTitle || "");
+      return `id=${id}&title=${title}`;
+    },
+    buildSharePath() {
+      return `/traceCodePackages/traceabilityReport/pages/reportExport/detail/index?${this.buildShareQuery()}`;
+    },
     selectTab(t) {
       if (this.isLoading) return;
       this.category = t.value;
@@ -235,6 +301,9 @@ export default {
       list.forEach((company) => {
         const companyNode = {
           name: company.enterpriseName,
+          customerLevel: company.customerLevel || "",
+          customerNature: company.customerNature || "",
+          responsibleManager: company.responsibleManager || "",
           totalQty: 0,
           expanded: false, // Default collapsed
           exporters: [],
@@ -245,6 +314,9 @@ export default {
         (company.enterpriseList || []).forEach((exp) => {
           const expNode = {
             name: exp.fromEntName,
+            fromCustomerLevel: exp.fromCustomerLevel || "",
+            fromCustomerNature: exp.fromCustomerNature || "",
+            fromResponsibleManager: exp.fromResponsibleManager || "",
             expanded: false, // Default collapsed
             products: [],
           };
@@ -473,6 +545,28 @@ export default {
   margin-bottom: 8rpx;
 }
 
+.company-meta {
+  margin-bottom: 8rpx;
+}
+
+.company-meta-row {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 6rpx;
+}
+
+.company-meta-row:last-child {
+  margin-bottom: 0;
+}
+
+.company-meta-item {
+  font-size: 26rpx;
+  color: #666;
+  margin-right: 24rpx;
+  display: inline-block;
+}
+
 .company-product-item {
   font-size: 26rpx;
   color: #666;
@@ -509,6 +603,30 @@ export default {
   border-bottom: 1rpx solid #eef0f4;
 }
 
+.exporter-meta {
+  background: #f8f9fb;
+  padding: 8rpx 24rpx 16rpx;
+  border-bottom: 1rpx solid #eef0f4;
+}
+
+.exporter-meta-row {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 6rpx;
+}
+
+.exporter-meta-row:last-child {
+  margin-bottom: 0;
+}
+
+.exporter-meta-item {
+  font-size: 26rpx;
+  color: #666;
+  margin-right: 24rpx;
+  display: inline-block;
+}
+
 .product-group {
   padding: 0;
 }