|
@@ -20,6 +20,15 @@
|
|
|
{{ prod.name }} {{ prod.spec }}
|
|
{{ prod.name }} {{ prod.spec }}
|
|
|
</text>
|
|
</text>
|
|
|
</view>
|
|
</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> -->
|
|
<!-- <text class="company-total">总数量:{{ company.totalQty }}</text> -->
|
|
|
</view>
|
|
</view>
|
|
|
<uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
|
|
<uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
|
|
@@ -30,6 +39,15 @@
|
|
|
<text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
|
|
<text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
|
|
|
<uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
|
|
<uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
|
|
|
</view>
|
|
</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">
|
|
<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 -->
|
|
<!-- Product Header Removed as requested, info is now in company header -->
|
|
|
<!-- <view class="product-header">
|
|
<!-- <view class="product-header">
|
|
@@ -83,6 +101,15 @@
|
|
|
{{ prod.name }} {{ prod.spec }}
|
|
{{ prod.name }} {{ prod.spec }}
|
|
|
</text>
|
|
</text>
|
|
|
</view>
|
|
</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> -->
|
|
<!-- <text class="company-total">总数量:{{ company.totalQty }}</text> -->
|
|
|
</view>
|
|
</view>
|
|
|
<uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
|
|
<uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
|
|
@@ -93,6 +120,15 @@
|
|
|
<text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
|
|
<text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
|
|
|
<uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
|
|
<uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
|
|
|
</view>
|
|
</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">
|
|
<view v-if="exp.expanded" class="product-group" v-for="(pg, pIdx) in exp.products" :key="pIdx">
|
|
|
<scroll-view scroll-x class="batch-scroll">
|
|
<scroll-view scroll-x class="batch-scroll">
|
|
|
<view class="batch-table">
|
|
<view class="batch-table">
|
|
@@ -158,6 +194,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ shareTitle: "报表详情",
|
|
|
taskId: "",
|
|
taskId: "",
|
|
|
tableBodyHeight: 0,
|
|
tableBodyHeight: 0,
|
|
|
baseRowHeight: 76,
|
|
baseRowHeight: 76,
|
|
@@ -189,13 +226,25 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
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 : "";
|
|
this.taskId = options && options.id ? options.id : "";
|
|
|
uni.setNavigationBarTitle({ title });
|
|
uni.setNavigationBarTitle({ title });
|
|
|
this.tableBodyHeight = 14 * 80;
|
|
this.tableBodyHeight = 14 * 80;
|
|
|
this.fetchList();
|
|
this.fetchList();
|
|
|
},
|
|
},
|
|
|
|
|
+ onShareAppMessage() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ title: this.shareTitle || "报表详情",
|
|
|
|
|
+ path: this.buildSharePath(),
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ onShareTimeline() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ title: this.shareTitle || "报表详情",
|
|
|
|
|
+ query: this.buildShareQuery(),
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
computed: {
|
|
computed: {
|
|
|
isLoading() {
|
|
isLoading() {
|
|
|
return (
|
|
return (
|
|
@@ -214,6 +263,23 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
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) {
|
|
selectTab(t) {
|
|
|
if (this.isLoading) return;
|
|
if (this.isLoading) return;
|
|
|
this.category = t.value;
|
|
this.category = t.value;
|
|
@@ -235,6 +301,9 @@ export default {
|
|
|
list.forEach((company) => {
|
|
list.forEach((company) => {
|
|
|
const companyNode = {
|
|
const companyNode = {
|
|
|
name: company.enterpriseName,
|
|
name: company.enterpriseName,
|
|
|
|
|
+ customerLevel: company.customerLevel || "",
|
|
|
|
|
+ customerNature: company.customerNature || "",
|
|
|
|
|
+ responsibleManager: company.responsibleManager || "",
|
|
|
totalQty: 0,
|
|
totalQty: 0,
|
|
|
expanded: false, // Default collapsed
|
|
expanded: false, // Default collapsed
|
|
|
exporters: [],
|
|
exporters: [],
|
|
@@ -245,6 +314,9 @@ export default {
|
|
|
(company.enterpriseList || []).forEach((exp) => {
|
|
(company.enterpriseList || []).forEach((exp) => {
|
|
|
const expNode = {
|
|
const expNode = {
|
|
|
name: exp.fromEntName,
|
|
name: exp.fromEntName,
|
|
|
|
|
+ fromCustomerLevel: exp.fromCustomerLevel || "",
|
|
|
|
|
+ fromCustomerNature: exp.fromCustomerNature || "",
|
|
|
|
|
+ fromResponsibleManager: exp.fromResponsibleManager || "",
|
|
|
expanded: false, // Default collapsed
|
|
expanded: false, // Default collapsed
|
|
|
products: [],
|
|
products: [],
|
|
|
};
|
|
};
|
|
@@ -473,6 +545,28 @@ export default {
|
|
|
margin-bottom: 8rpx;
|
|
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 {
|
|
.company-product-item {
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
color: #666;
|
|
color: #666;
|
|
@@ -509,6 +603,30 @@ export default {
|
|
|
border-bottom: 1rpx solid #eef0f4;
|
|
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 {
|
|
.product-group {
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
}
|
|
}
|