haoyahui
2023-11-11 332c012e7336f2996c4fe5c8c110d00713c1bde2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<template>
  <el-dialog
    title="详情"
    width="60%"
    :modal="true"
    :visible.sync="visible"
    :top="'15vh'"
    :close-on-click-modal="false"
    :append-to-body="true"
    :destroy-on-close="true"
    @close="close"
    class="stock-detail"
  >
    <el-row :gutter="20">
      <el-col :span="8">
        <span>调拨单号:</span>
        <span>{{ detail.businessFormCode }}</span>
      </el-col>
      <el-col :span="8">
        <span>调拨仓库:</span>
        <span>{{ detail.warehouseName }}</span>
      </el-col>
      <el-col :span="8">
        <span>所属机构:</span>
        <span>{{ detail.agencyId }}</span>
      </el-col>
    </el-row>
    <el-row :gutter="20" style="margin-top: 20px">
      <el-col :span="8">
        <span>状态:</span>
        <span>{{ detail.states == 1 ? '待调拨' : '已调拨' }}</span>
      </el-col>
      <el-col :span="8">
        <span>创建人:</span>
        <span>{{ detail.buyerName }}</span>
      </el-col>
      <el-col :span="8">
        <span>调拨时间:</span>
        <span>{{ detail.incomeTime | formatTime }}</span>
      </el-col>
    </el-row>
    <el-row :gutter="20" style="margin-top: 20px">
      <el-col class="img-row" :span="24">
        <span>调拨手续照片:</span>
        <div class="img-box"></div>
      </el-col>
    </el-row>
    <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex">
      <el-row :gutter="20">
        <el-col :span="8">
          <span>物品分类:</span>
          <span>{{ goodsItem.baseCategoryId }}</span>
        </el-col>
        <el-col :span="8">
          <span>物品名称:</span>
          <span>{{ goodsItem.goodsTemplateName }}</span>
        </el-col>
        <el-col :span="8">
          <span>供货商:</span>
          <span>{{ goodsItem.supplier }}</span>
        </el-col>
      </el-row>
      <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px">
        <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center">
          <template slot-scope="scope">
            {{ scope.row.baseGoodsModelsName }}
          </template>
        </el-table-column>
        <el-table-column label="单位" align="center">
          <template slot-scope="scope">
            {{ scope.row.unit }}
          </template>
        </el-table-column>
        <el-table-column prop="price" label="现有库存" align="center">
          <template slot-scope="scope">
            {{ scope.row.price }}
          </template>
        </el-table-column>
        <el-table-column prop="counts" label="调拨数量" align="center">
          <template slot-scope="scope">
            {{ scope.row.counts }}
          </template>
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</template>
<script>
import { procureDetail } from '@/api/stock/procure/purchaseOrder';
import * as DateFormatter from '@/utils/DateFormatter';
 
export default {
  data() {
    return {
      visible: false,
      detail: {
        businessFormCode: '',
        goodsTemplateName: '',
        agencyId: '',
        states: '',
        createName: '',
        time: '',
        procureGoods: [{}, {}],
      },
    };
  },
  filters:{
    formatTime(time) {
      if(!time) return
      return DateFormatter.LongToDateTime(time)
    }
  },
  methods: {
    open(id) {
      this.visible = true;
      procureDetail({ id }).then((res) => {
        this.detail = res;
      });
    },
    close() {
      this.visible = false;
    },
  },
};
</script>
<style lang="scss" scoped>
@import url(../../index.scss);
</style>