|
@@ -1,73 +1,65 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<el-dialog
|
|
<el-dialog
|
|
- :title="!dataForm.materialId ? '详情' : '详情'"
|
|
|
|
|
|
+ title="查看"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
width="70%"
|
|
width="70%"
|
|
:visible.sync="visible">
|
|
:visible.sync="visible">
|
|
- <DescriptionList title="" col="6" :content="dataForm">
|
|
|
|
- <Description term="编码">{{dataForm.materialCode}}</Description>
|
|
|
|
- <Description term="名称">{{dataForm.materialName}}</Description>
|
|
|
|
- <Description term="类别">{{dataForm.categoryName}}</Description>
|
|
|
|
- </DescriptionList>
|
|
|
|
- <DescriptionList title="" col="6" :content="dataForm">
|
|
|
|
- <Description term="规格">{{dataForm.specifications}}</Description>
|
|
|
|
- <Description term="单位">{{dataForm.unitName}}</Description>
|
|
|
|
- <Description term="数量">{{dataForm.cnt}}</Description>
|
|
|
|
- </DescriptionList>
|
|
|
|
-<!-- <DescriptionList title="" col="6" :content="dataForm">-->
|
|
|
|
-<!-- <Description term="单价">{{dataForm.price}}</Description>-->
|
|
|
|
-<!-- <Description term="金额">{{dataForm.amount}}</Description>-->
|
|
|
|
-<!-- <Description term="批次号">{{dataForm.batchNumber}}</Description>-->
|
|
|
|
-<!-- </DescriptionList>-->
|
|
|
|
- <DescriptionList title="" col="6" :content="dataForm">
|
|
|
|
- <Description term="来源"></Description>
|
|
|
|
- <Description term="存放仓库">{{dataForm.warehouseName}}</Description>
|
|
|
|
- <Description term="存放货架">{{dataForm.shelveName}}</Description>
|
|
|
|
- </DescriptionList>
|
|
|
|
- <el-row>
|
|
|
|
- <el-table
|
|
|
|
- :data="dataList"
|
|
|
|
- border
|
|
|
|
- style="width: 100%;">
|
|
|
|
- <el-table-column
|
|
|
|
- label="序号"
|
|
|
|
- type="index"
|
|
|
|
- width="50"
|
|
|
|
- align="center">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="batchNumber"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="批次号">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="cnt"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="数量">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="price"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="单价">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="amount"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="金额">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ (scope.row.cnt*scope.row.price).toFixed(1) }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </el-row>
|
|
|
|
- <DescriptionList title="" col="6" :content="dataForm" style="margin-top: 10px">
|
|
|
|
- <Description term="备注说明">{{dataForm.notes}}</Description>
|
|
|
|
- </DescriptionList>
|
|
|
|
|
|
+ <div style="margin-left: 20px;margin-right: 20px">
|
|
|
|
+ <e-desc title="基本信息" column="3">
|
|
|
|
+ <e-desc-item label="编码">{{dataForm.materialCode}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="名称">{{dataForm.materialName}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="类别">{{dataForm.categoryName}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="规格">{{dataForm.specifications}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="单位">{{dataForm.unitName}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="数量">{{dataForm.cnt}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="来源"></e-desc-item>
|
|
|
|
+ <e-desc-item label="存放仓库">{{dataForm.warehouseName}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="存放货架">{{dataForm.shelveName}}</e-desc-item>
|
|
|
|
+ <e-desc-item label="备注说明" span="3">{{dataForm.notes}}</e-desc-item>
|
|
|
|
+ </e-desc>
|
|
|
|
+ <e-desc title="材料列表" column="3">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="dataList"
|
|
|
|
+ border
|
|
|
|
+ style="width: 100%;">
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="序号"
|
|
|
|
+ type="index"
|
|
|
|
+ width="50"
|
|
|
|
+ align="center">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="batchNumber"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="批次号">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="cnt"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="数量">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="price"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="单价">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="amount"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="金额">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ (scope.row.cnt*scope.row.price).toFixed(1) }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </e-desc>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="visible = false">取消</el-button>
|
|
<el-button @click="visible = false">取消</el-button>
|
|
</span>
|
|
</span>
|
|
@@ -76,30 +68,35 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import DescriptionList from '../common/Description'
|
|
|
|
|
|
+ import EDesc from '../common/e-desc'
|
|
|
|
+ import EDescItem from '../common/e-desc-item'
|
|
export default {
|
|
export default {
|
|
name: 'stock-details',
|
|
name: 'stock-details',
|
|
- components: {DescriptionList},
|
|
|
|
|
|
+ components: {
|
|
|
|
+ EDesc, EDescItem
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
visible: false,
|
|
visible: false,
|
|
|
|
+ id: 0,
|
|
dataForm: {
|
|
dataForm: {
|
|
},
|
|
},
|
|
dataList: []
|
|
dataList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- init (id) {
|
|
|
|
- this.dataForm.materialId = id || 0
|
|
|
|
- if (this.dataForm.materialId) {
|
|
|
|
|
|
+ async init (id) {
|
|
|
|
+ this.visible = true
|
|
|
|
+ this.id = id || 0
|
|
|
|
+ this.dataForm = {}
|
|
|
|
+ this.dataList = []
|
|
|
|
+ if (this.id) {
|
|
this.$http({
|
|
this.$http({
|
|
- url: this.$http.adornUrl(`/biz-service/stock-mg-ctl/info/${this.dataForm.materialId}`),
|
|
|
|
|
|
+ url: this.$http.adornUrl(`/biz-service/stock-mg-ctl/info/${this.id}`),
|
|
method: 'get',
|
|
method: 'get',
|
|
params: this.$http.adornParams()
|
|
params: this.$http.adornParams()
|
|
}).then(({data}) => {
|
|
}).then(({data}) => {
|
|
if (data.code === '200') {
|
|
if (data.code === '200') {
|
|
- this.dataForm = {}
|
|
|
|
- this.visible = true
|
|
|
|
this.dataForm = data.data
|
|
this.dataForm = data.data
|
|
this.dataList = data.data.whBatchInfoList
|
|
this.dataList = data.data.whBatchInfoList
|
|
} else {
|
|
} else {
|