|
|
@@ -1,18 +1,11 @@
|
|
|
<template>
|
|
|
<Water></Water>
|
|
|
<view class="nav" :style="{ paddingTop: statusBarHeight + 'px' }">
|
|
|
- <text
|
|
|
- class="nav-back"
|
|
|
- :style="{ top: statusBarHeight + 'px' }"
|
|
|
- @click="onBack"
|
|
|
- ></text>
|
|
|
+ <text class="nav-back" :style="{ top: statusBarHeight + 'px' }" @click="onBack"></text>
|
|
|
<view class="nav-title">{{ title }}</view>
|
|
|
</view>
|
|
|
<view class="page">
|
|
|
- <view
|
|
|
- class="header-card"
|
|
|
- :style="{ paddingTop: statusBarHeight + 60 + 'px' }"
|
|
|
- >
|
|
|
+ <view class="header-card" :style="{ paddingTop: statusBarHeight + 60 + 'px' }">
|
|
|
<view class="meta">
|
|
|
<view class="dot"></view>
|
|
|
<text class="meta-text">客户名称:{{ title }}</text>
|
|
|
@@ -22,10 +15,7 @@
|
|
|
<text class="meta-text">信用代码:{{ creditCode }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view
|
|
|
- class="list-container"
|
|
|
- :style="{ paddingTop: statusBarHeight - 30 + 'px' }"
|
|
|
- >
|
|
|
+ <view class="list-container" :style="{ paddingTop: statusBarHeight - 30 + 'px' }">
|
|
|
<view v-if="loading" class="empty-row">加载中...</view>
|
|
|
<view v-else-if="products.length === 0" class="empty-row">暂无数据</view>
|
|
|
<view v-else v-for="(prd, i) in products" :key="'prd-' + i">
|
|
|
@@ -54,15 +44,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <uni-icons
|
|
|
- type="down"
|
|
|
- size="22"
|
|
|
- color="#999"
|
|
|
- :style="{
|
|
|
- transform: c.expanded ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
|
- transition: 'transform 0.3s ease-in-out',
|
|
|
- }"
|
|
|
- ></uni-icons>
|
|
|
+ <uni-icons type="down" size="22" color="#999" :style="{
|
|
|
+ transform: c.expanded ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
|
+ transition: 'transform 0.3s ease-in-out',
|
|
|
+ }"></uni-icons>
|
|
|
</view>
|
|
|
<view class="table-card" v-show="c.expanded">
|
|
|
<scroll-view scroll-x="true" class="table-scroll">
|
|
|
@@ -71,26 +56,19 @@
|
|
|
<view class="th col-region">货源片区</view>
|
|
|
<view class="th col-qty">数量</view>
|
|
|
<view class="th col-batch">批号</view>
|
|
|
- <view class="th col-sample">监管码样本(抽样)</view>
|
|
|
+ <view class="th col-sample">追溯码(抽样)</view>
|
|
|
<view class="th col-terminal">终端到达数量</view>
|
|
|
</view>
|
|
|
<view class="blk-body">
|
|
|
- <view
|
|
|
- class="blk-row"
|
|
|
- v-for="(row, idx) in c.detailLineDTOList"
|
|
|
- :key="'row-' + idx"
|
|
|
- >
|
|
|
+ <view class="blk-row" v-for="(row, idx) in c.detailLineDTOList" :key="'row-' + idx">
|
|
|
<view class="td col-region">{{ row.supplyArea }}</view>
|
|
|
<view class="td col-qty">{{ row.quantity }}</view>
|
|
|
<view class="td col-batch">{{ row.batchNumber }}</view>
|
|
|
- <view class="td col-sample">{{ row.supervisionCodeSample }}</view>
|
|
|
+ <view class="td col-sample copyable-code" @click="copyTraceCode(row.supervisionCodeSample)">{{
|
|
|
+ row.supervisionCodeSample }}</view>
|
|
|
<view class="td col-terminal">{{ row.quantity || '--' }}</view>
|
|
|
</view>
|
|
|
- <view
|
|
|
- v-if="!c.detailLineDTOList || c.detailLineDTOList.length === 0"
|
|
|
- class="empty-row"
|
|
|
- >暂无数据</view
|
|
|
- >
|
|
|
+ <view v-if="!c.detailLineDTOList || c.detailLineDTOList.length === 0" class="empty-row">暂无数据</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
@@ -131,10 +109,23 @@ export default {
|
|
|
this.fetchDetail(this.creditCode, options.dateStr); // 使用固定日期测试,或使用 dateStr
|
|
|
},
|
|
|
methods: {
|
|
|
+ copyTraceCode(code) {
|
|
|
+ const text = String(code || "").trim();
|
|
|
+ if (!text) {
|
|
|
+ uni.showToast({ title: "无可复制内容", icon: "none" });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: text,
|
|
|
+ success: () => {
|
|
|
+ uni.showToast({ title: "追溯码已复制", icon: "none" });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
onBack() {
|
|
|
try {
|
|
|
uni.navigateBack();
|
|
|
- } catch (e) {}
|
|
|
+ } catch (e) { }
|
|
|
},
|
|
|
toggleCustomer(i, j) {
|
|
|
const cur = this.products[i].upstreamDTOList[j];
|
|
|
@@ -193,6 +184,7 @@ export default {
|
|
|
.meta-text {
|
|
|
font-size: 32rpx;
|
|
|
}
|
|
|
+
|
|
|
.nav {
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
@@ -355,7 +347,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.blk-table {
|
|
|
- min-width: 1060rpx;
|
|
|
+ min-width: 1080rpx;
|
|
|
border-top: 1rpx solid #eee;
|
|
|
border-left: 1rpx solid #eee;
|
|
|
}
|
|
|
@@ -418,7 +410,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
.col-sample {
|
|
|
- width: 300rpx;
|
|
|
+ width: 320rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.copyable-code {
|
|
|
+ color: #2c69ff;
|
|
|
}
|
|
|
|
|
|
.col-terminal {
|