| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <template>
- <view class="aa">
- <view class="card-content">
- <uni-collapse accordion :show-animation="true">
- <uni-collapse-item
- :show-animation="true"
- :typeOpen="1"
- v-for="item in list"
- :key="item.matnr"
- >
- <view slot="title" class="collapse-title">
- <view class="report-item">
- <view class="report-col">{{ item.matnr }}</view>
- <view class="report-col">收货数量:{{ item.menge }}</view>
- </view>
- </view>
- <view class="card-list">
- <view
- class="list-item"
- v-for="(itm, index) in processeDetail"
- :key="index"
- >
- <view class="label">{{ itm.label }}</view>
- <view>{{ item[itm.key] }}</view>
- </view>
- </view>
- </uni-collapse-item>
- </uni-collapse>
- <view class="noData" v-if="!list.length"> 暂无数据 </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getProductReciverInfoOne,
- getProductReciverInfoFive,
- } from "@/api/report/index";
- export default {
- props: {
- // processesList:{
- // type: Array,
- // default: () => []
- // },
- orderId: [Number, String],
- name: String,
- },
- data() {
- return {
- processeDetail: [
- { label: "收货时间", key: "reciverTime" },
- { label: "收货库存地点", key: "lgort" },
- { label: "物料代码", key: "matnr" },
- { label: "物料描述", key: "maktx" },
- { label: "收货批次", key: "charg" },
- { label: "收货数量", key: "menge" },
- ],
- detailObj: {},
- list: [],
- curId: null,
- };
- },
- watch: {
- orderId: {
- immediate: true,
- handler() {
- console.log(this.orderId, "orderInfo");
- if (this.orderId) {
- this.getDetail();
- }
- },
- },
- },
- methods: {
- getDetail() {
- if (this.name == "101") {
- getProductReciverInfoOne(this.orderId).then((res) => {
- console.log(res, "res");
- this.list = res;
- });
- } else {
- getProductReciverInfoFive(this.orderId).then((res) => {
- console.log(res, "res");
- this.list = res;
- });
- }
- },
- handleClose() {
- this.$refs.inputDialog.close();
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .report-item {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- flex-wrap: wrap;
- margin-bottom: 30rpx;
- padding: 10rpx 0;
- border-bottom: 1rpx solid #ccc;
- .report-col {
- width: 50%;
- margin-bottom: 10rpx;
- font-size: $uni-font-size-lg;
- .view-detail {
- width: 180rpx;
- height: 60rpx;
- line-height: 60rpx;
- color: $j-primary-green;
- margin: 0 0 0 auto;
- }
- }
- }
- .card-list{
- padding: 30rpx;
- border-bottom: 1rpx solid #ccc;
- .list-item{
- border-bottom: 1rpx dashed #ccc;
- font-size: $uni-font-size-lg;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx 0;
- }
-
- }
- .noData {
- font-size: $uni-font-size-lg;
- text-align: center;
- padding: 20rpx 0;
- }
- </style>
|