Commit d7658991 authored by 耿迪迪's avatar 耿迪迪

出入库记录

parent e0a86769
...@@ -28,6 +28,8 @@ public class TProductStoreLog extends BaseEntity ...@@ -28,6 +28,8 @@ public class TProductStoreLog extends BaseEntity
/** $column.columnComment */ /** $column.columnComment */
private Long createId; private Long createId;
private String nickName;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
...@@ -65,6 +67,14 @@ public class TProductStoreLog extends BaseEntity ...@@ -65,6 +67,14 @@ public class TProductStoreLog extends BaseEntity
return createId; return createId;
} }
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTProductStoreLogVo"> <sql id="selectTProductStoreLogVo">
select id, store_id, `number`, create_time, create_id from t_product_store_log select id, store_id, `number`, create_time, create_id, (select nick_name from sys_user where user_id = create_id)as nickName from t_product_store_log
</sql> </sql>
<select id="selectTProductStoreLogList" parameterType="TProductStoreLog" resultMap="TProductStoreLogResult"> <select id="selectTProductStoreLogList" parameterType="TProductStoreLog" resultMap="TProductStoreLogResult">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
<div class="store-operate"> <div class="store-operate">
<i style="color:#1890ff" class="el-icon-circle-plus-outline" v-if="index == 0" @click="addStore"></i> <i style="color:#1890ff" class="el-icon-circle-plus-outline" v-if="inHouseStore.length -1 == index" @click="addStore"></i>
<i style="color: #ff9292" class="el-icon-remove-outline" v-else @click="delStore(index)"></i> <i style="color: #ff9292" class="el-icon-remove-outline" v-else @click="delStore(index)"></i>
</div> </div>
</div> </div>
......
<template>
<el-dialog :title="storeInfo.title + '出入库记录'" :visible.sync="recordOpen" width="800px" append-to-body :close-on-click-modal="false">
<el-tabs v-model="activeName" @tab-click="handleClick" v-if="recordOpen">
<el-tab-pane label="入库记录" name="import">
<RecordInfo tab="import" :id="storeInfo.id" v-if="activeName == 'import'"/>
</el-tab-pane>
<el-tab-pane label="出库记录" name="export">
出库记录
</el-tab-pane>
</el-tabs>
</el-dialog>
</template>
<script>
import RecordInfo from "./RecordInfo";
export default {
name: "record",
components:{
RecordInfo
},
data(){
return{
recordOpen: false,
activeName: "import",
storeInfo: {}
}
},
watch:{
recordOpen(){
if(this.recordOpen){
this.activeName = 'import';
}
}
},
methods:{
initRecordInfo(row){
this.storeInfo = row;
this.recordOpen = true;
},
handleClick(tab,event){
this.activeName = tab.name;
}
}
}
</script>
<style scoped>
</style>
<template>
<div style="margin-bottom: 20px">
<el-table v-loading="loading" :data="recordList">
<el-table-column label="操作人" align="center" prop="nickName" />
<el-table-column label="数量" align="center" prop="number" />
<el-table-column label="操作时间" align="center" prop="createTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listLog } from "@/api/track/storeLog.js";
export default {
name: "record-info",
props:{
tab: {
type: String,
default: "import"
},
id: {
type: Number
}
},
data(){
return{
loading: false,
recordList: [],
total: 0,
queryParams:{
pageNum: 1,
pageSize: 10,
storeId: null
}
}
},
created(){
this.queryParams.storeId = this.id;
this.getList();
},
methods:{
getList(){
if(this.tab == 'import'){
this.getImportRecord();
}else{
}
},
//入库信息
getImportRecord(){
this.loading = true;
listLog(this.queryParams).then(res =>{
this.loading = false;
if(res.code == 200){
this.total = res.total;
this.recordList = res.rows;
}
})
},
//出库记录
getExportRecord(){
}
}
}
</script>
<style scoped>
</style>
...@@ -129,6 +129,12 @@ ...@@ -129,6 +129,12 @@
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-order"
@click="handleRecord(scope.row)"
>出入库记录</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -212,6 +218,9 @@ ...@@ -212,6 +218,9 @@
<!-- 入库 --> <!-- 入库 -->
<House ref="house"/> <House ref="house"/>
<!-- 出入库记录 -->
<Record ref="record"/>
</div> </div>
</template> </template>
...@@ -219,11 +228,13 @@ ...@@ -219,11 +228,13 @@
import { listStore, getStore, delStore, addStore, updateStore, exportStore } from "@/api/track/store"; import { listStore, getStore, delStore, addStore, updateStore, exportStore } from "@/api/track/store";
import DetailInfo from "./components/DetailInfo"; import DetailInfo from "./components/DetailInfo";
import House from "./components/House"; import House from "./components/House";
import Record from "./components/Record";
export default { export default {
name: "Store", name: "Store",
components: { components: {
DetailInfo, DetailInfo,
House House,
Record
}, },
data() { data() {
return { return {
...@@ -286,7 +297,7 @@ export default { ...@@ -286,7 +297,7 @@ export default {
} }
} }
], ],
} },
}; };
}, },
created() { created() {
...@@ -415,6 +426,10 @@ export default { ...@@ -415,6 +426,10 @@ export default {
//入库英文 //入库英文
handleHouse(){ handleHouse(){
this.$refs.house.openHouse(); this.$refs.house.openHouse();
},
//出入库记录
handleRecord(row){
this.$refs.record.initRecordInfo(row);
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment