|
@@ -5,92 +5,78 @@
|
|
|
:before-close="handleClose"
|
|
|
width="70%"
|
|
|
>
|
|
|
- <el-descriptions class="margin-top" title="货权预留单" :column="3" size="small" border>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 预留单据号
|
|
|
- </template>
|
|
|
- {{ resData.code }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 来源单据号
|
|
|
- </template>
|
|
|
- {{ resData.source }}
|
|
|
- </el-descriptions-item>
|
|
|
- <!-- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 客户
|
|
|
- </template>
|
|
|
- {{ resData.customer }}
|
|
|
- </el-descriptions-item> -->
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 客户名称
|
|
|
- </template>
|
|
|
- {{ resData.customerName }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 创建人
|
|
|
- </template>
|
|
|
- {{ resData.createBy }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 创建人名称
|
|
|
- </template>
|
|
|
- {{ resData.createByName }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 创建时间
|
|
|
- </template>
|
|
|
- {{ resData.createTime }}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
-
|
|
|
- <el-table style="margin-top: 50px" :data="tableList2">
|
|
|
+ <el-descriptions class="margin-top" title="货权预留单" :column="3" size="small" border>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">
|
|
|
+ 预留单据号
|
|
|
+ </template>
|
|
|
+ {{ resData.code }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">
|
|
|
+ 来源单据号
|
|
|
+ </template>
|
|
|
+ {{ resData.source }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">
|
|
|
+ 客户名称
|
|
|
+ </template>
|
|
|
+ {{ resData.customerName }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">
|
|
|
+ 创建人
|
|
|
+ </template>
|
|
|
+ {{ resData.createByName }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">
|
|
|
+ 创建人编码
|
|
|
+ </template>
|
|
|
+ {{ resData.createBy }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">
|
|
|
+ 创建时间
|
|
|
+ </template>
|
|
|
+ {{ resData.createTime }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <el-table style="margin-top: 50px" :data="items" @row-click="rowClick" height="300px">
|
|
|
<el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="unit" label="单位" width="150"></el-table-column> -->
|
|
|
<el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="reservedProportion" label="预留比例" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="reservedPeriod" label="预留周期" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="warehouse" label="仓库" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库名称" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="allocation" label="货位" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="allocationName" label="货位名称" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="totalIn" label="累计入库数量" width="150"></el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="qty" label="可用量" width="150"></el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="usedQty" label="已用量" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库名称" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="allocationName" label="货位名称" width="150"></el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="createTime" label="创建时间" width="200"></el-table-column>
|
|
|
</el-table>
|
|
|
- <el-table style="margin-top: 50px" :data="tableList3">
|
|
|
+ <el-table style="margin-top: 50px" :data="showHistoryItems" height="300px">
|
|
|
<el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="unit" label="单位" width="150"></el-table-column> -->
|
|
|
<el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
|
|
|
- <el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
|
|
|
- <el-table-column show-overflow-tooltip prop="allotQty" label="操作数量" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="reservedProportion" label="预留比例" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="reservedPeriod" label="预留周期" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="deliveryWarehouse" label="调出仓库" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="deliveryWarehouseName" label="调出仓库名称" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="deliveryAllocation" label="调出货位" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="deliveryAllocationName" label="调出货位名称" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="storageWarehouse" label="调入仓库" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="storageWarehouseName" label="调入仓库名称" width="150"></el-table-column>
|
|
|
- <!-- <el-table-column show-overflow-tooltip prop="storageAllocation" label="调入货位" width="150"></el-table-column> -->
|
|
|
- <el-table-column show-overflow-tooltip prop="storageAllocationName" label="调入货位名称" width="150"></el-table-column>
|
|
|
- <el-table-column show-overflow-tooltip prop="createTime" label="创建时间" width="200"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="operateType" label="操作类型" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="operateBill" label="操作单据" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="operateBillcode" label="操作单据编码" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="operateBillitem" label="操作明细行" width="150"></el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="allotQty" label="操作数量" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.allotQty > 0 ? "+" + scope.row.allotQty : scope.row.allotQty}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="createTime" label="操作时间" width="200"></el-table-column>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getResevedDetail} from '@/api/purchase/transferOrder.js'
|
|
|
+import {getDetailBySource} from '@/api/purchase/ownership.js'
|
|
|
+
|
|
|
export default {
|
|
|
props: {
|
|
|
isVisible: {
|
|
@@ -103,31 +89,33 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log('出现')
|
|
|
- console.log(this.info)
|
|
|
this.getDetails(this.info)
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
visible:this.isVisible,
|
|
|
resData: {},
|
|
|
- tableList2: [],
|
|
|
- tableList3: [],
|
|
|
+ items: [],
|
|
|
+ historyItems: [],
|
|
|
+ showHistoryItems: [],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
getDetails(row) {
|
|
|
- getResevedDetail(row.code).then(res => {
|
|
|
+ getDetailBySource(row.code).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.resData = res.data
|
|
|
- this.tableList2 = res.data.stMaterialOwnershipItemList
|
|
|
- this.tableList3 = res.data.stMaterialOwnershipHistoryList
|
|
|
+ this.resData = res.data;
|
|
|
+ this.items = res.data.stMaterialOwnershipItemList;
|
|
|
+ this.historyItems = res.data.stMaterialOwnershipHistoryList;
|
|
|
+ this.showHistoryItems = this.historyItems.filter(ele => ele.ownerId == this.items[0].id);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
handleClose() {
|
|
|
- console.log('调用')
|
|
|
this.$emit('updateReserved', false)
|
|
|
+ },
|
|
|
+ rowClick(row){
|
|
|
+ this.showHistoryItems = this.historyItems.filter(ele => ele.ownerId == row.id);
|
|
|
}
|
|
|
}
|
|
|
}
|