提交 60ec9394 编写于 作者: yi.li's avatar yi.li

商品管理相关增加storeId

上级 0768036f
...@@ -532,6 +532,7 @@ ...@@ -532,6 +532,7 @@
costPrice:'', costPrice:'',
decrStock:'',//减少库存 decrStock:'',//减少库存
incrStock:'',//增加库存 incrStock:'',//增加库存
storeId: null,
}, },
showCropper: false, showCropper: false,
currentOption: { currentOption: {
...@@ -632,8 +633,9 @@ ...@@ -632,8 +633,9 @@
created() { created() {
vm = this; vm = this;
const {id} = this.$route.query const {id, storeId} = this.$route.query
this.title = id == 'add' ? '新增商品' : '编辑商品' this.title = id == 'add' ? '新增商品' : '编辑商品'
this.formData.storeId = storeId || 0;
this.getLever(0,1) this.getLever(0,1)
dosageAll().then((res)=>{ dosageAll().then((res)=>{
this.doseAll = res.data this.doseAll = res.data
......
...@@ -234,7 +234,8 @@ ...@@ -234,7 +234,8 @@
created() { created() {
this.getLists() this.getLists()
this.getLever() this.getLever()
//const {storeId} = this.$route.query const {storeId} = this.$route.query;
this.searchForm.storeId = storeId || 0;
// if(storeId){ // if(storeId){
// this.searchForm.storeId = storeId // this.searchForm.storeId = storeId
// } // }
...@@ -405,9 +406,9 @@ ...@@ -405,9 +406,9 @@
edit(row){ edit(row){
let url = '' let url = ''
if(row == 'add'){ if(row == 'add'){
url = `/create-good?id=add` url = `/create-good?id=add&storeId=${this.searchForm.storeId}`
}else{ }else{
url = `/create-good?id=${row.goodsId}` url = `/create-good?id=${row.goodsId}&storeId=${this.searchForm.storeId}`
} }
this.$store.dispatch('goodsManage/changeGoodsInfo', {...row}); this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this.$router.push({ this.$router.push({
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册