| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <view>
- <view class="tabs-container">
- <view class="tabs">
- <view class="tab-item" :class="{ active: activeName === 1 }" @click="activeName = 1">基本信息</view>
- <view class="tab-item" :class="{ active: activeName === 2 }" @click="activeName = 2">盘点清单</view>
- <view class="tab-item" :class="{ active: activeName === 3 }" @click="activeName = 3">报损报溢清单</view>
- </view>
- </view>
- <view v-if="activeName === 1">
- <CellInfo label="盘点名称" :value="baseInfo.name" />
- <CellInfo label="单据编号" :value="baseInfo.code" />
- <CellInfo label="盘点仓库" :value="baseInfo.warehouseName" />
- <CellInfo label="盘点部门" :value="baseInfo.executeGroupName" />
- <CellInfo label="盘点人员" :value="baseInfo.executorName" />
- <CellInfo label="计划盘点时长" :value="baseInfo.executorDuration + '分钟'" />
- <CellInfo label="备注" :value="baseInfo.remark" />
- </view>
- <view class="list" v-if="activeName === 2">
- <AssetsCard2 v-for="(item, index) in baseInfo.planDetailVOS" class="kd-row" :key="index" :item="item" />
- </view>
- <view class="list" v-if="activeName === 3">
- <AssetsCard v-for="(item, index) in list" class="kd-row" :key="index" :item="item" />
- </view>
- </view>
- </template>
- <script>
- import CellInfo from '@/components/CellInfo.vue'
- import AssetsCard from './AssetsCard.vue'
- import AssetsCard2 from './AssetsCard2.vue'
- export default {
- components: { CellInfo, AssetsCard, AssetsCard2 },
- props: {
- baseInfo: {
- type: Object,
- default: () => ({})
- },
- list: {
- type: Array,
- default: () => []
- },
- type: {
- type: String,
- default: ''
- }
- },
- computed: {
- sum() {
- return this.list.reduce((sum, item) => {
- if (item.takeStockPattern) {
- sum += +item.amount
- } else {
- sum += item.detailReqList?.length || 0
- }
- return sum
- }, 0)
- }
- },
- data() {
- return {
- activeName: 1,
- statusList: {
- 0: '未提交',
- 1: '审核中',
- 2: '已完成'
- },
- statusClass: {
- 0: 'text-danger',
- 1: 'text-primary',
- 2: 'text-primary'
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .tabs-container {
- height: 80rpx;
- }
- .tabs {
- position: fixed;
- width: 100vw;
- height: 80rpx;
- background-color: #fff;
- display: flex;
- justify-content: flex-start;
- align-items: flex-end;
- margin-bottom: 20rpx;
- padding-left: 30rpx;
- .tab-item {
- width: 200rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- padding-top: 10rpx;
- &.active {
- background: linear-gradient(180deg, rgba(75, 121, 2, 1) 0%, rgba(255, 255, 255, 1) 12%);
- border-right: 1rpx solid #ccc;
- border-left: 1rpx solid #ccc;
- }
- }
- }
- .list {
- margin: 20rpx 40rpx;
- border: 1rpx solid rgba(204, 204, 204, 1);
- }
- .kd-row {
- font-size: 28rpx;
- padding: 14rpx 12rpx 6rpx;
- border-bottom: 1rpx solid $page-bg;
- .kd-col {
- display: flex;
- justify-content: space-between;
- align-items: center;
- color: #aaaaaa;
- > text {
- flex: 1;
- }
- .label {
- margin-right: 20rpx;
- }
- &.kd-col {
- margin-top: 25rpx;
- }
- .status {
- background-color: $page-bg;
- display: inline-block;
- padding: 4rpx 10rpx;
- border-radius: 18rpx;
- }
- }
- .title {
- font-weight: bold;
- color: #333333;
- }
- }
- </style>
|