|
@@ -27,6 +27,21 @@
|
|
|
show
|
|
|
show-summary
|
|
|
border>
|
|
|
+ <template slot="num" slot-scope="{row}">
|
|
|
+ <Tooltip
|
|
|
+ placement="left"
|
|
|
+ @on-popper-show="handleToolShow(index, row)"
|
|
|
+ >
|
|
|
+ <div slot="content">
|
|
|
+ <div>
|
|
|
+ <div v-for="(_item,_index) in warehouse" :key="_index">
|
|
|
+ {{_item.warehouse_title}}:{{_item.num}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span >{{ row.num }}</span>
|
|
|
+ </Tooltip>
|
|
|
+ </template>
|
|
|
</Table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -54,10 +69,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
{ title: '计量单位', align: 'center', key: 'unit', minWidth: 100, },
|
|
|
- { title: this.$route.query.type == 1 ? '入库数量' : '出库数量', align: 'center', key: 'num', minWidth: 100 },
|
|
|
+ { title: this.$route.query.type == 1 ? '入库数量' : '出库数量', align: 'center', key: 'num', minWidth: 100,slot:'num' },
|
|
|
],
|
|
|
tableData: [],
|
|
|
order_no: '',
|
|
|
+ warehouse:''
|
|
|
}
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -68,6 +84,24 @@ export default {
|
|
|
created () {
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleToolShow(index, row) {
|
|
|
+ if (this.warehouse) {
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.axios
|
|
|
+ .get("/api/warehouse_stock_number", {
|
|
|
+ params: {
|
|
|
+ material_id: row.material_id,
|
|
|
+ material_detail_id: row.material_detail_id,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.warehouse= res.data
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // this.warehouse.num = this.warehouseTotal[index].num;
|
|
|
+ // this.warehouse.warehouseName = this.warehouseTotal[index].warehouseName
|
|
|
+ },
|
|
|
initData () {
|
|
|
if (this.$route.query.type == 1) {
|
|
|
this.axios({
|