|
|
@@ -83,7 +83,7 @@
|
|
|
<button class="admin-button-com big blue" style="width:420upx;" @click="loanStock()">借库存</button>
|
|
|
</view>
|
|
|
<view style="margin-top:6upx;">
|
|
|
- <button class="admin-button-com big default" style="margin-right:20upx;width:200upx;" @click="">加库存上架</button>
|
|
|
+ <button class="admin-button-com big default" style="margin-right:20upx;width:200upx;" @click="">增数上架</button>
|
|
|
<button class="admin-button-com big default" style="width:200upx;" @click="">下架报损</button>
|
|
|
</view>
|
|
|
<view style="margin-top:6upx;">
|
|
|
@@ -131,7 +131,8 @@ export default {
|
|
|
customId:0,
|
|
|
currentItem:null,
|
|
|
respond:{remainNum:0,remainName:''},
|
|
|
- currentNum:''
|
|
|
+ currentNum:'',
|
|
|
+ needRefresh:0
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -141,6 +142,12 @@ export default {
|
|
|
},
|
|
|
onLoad() {
|
|
|
|
|
|
+ },
|
|
|
+ onShow(){
|
|
|
+ if(this.needRefresh == 1){
|
|
|
+ this.getStatList()
|
|
|
+ this.needRefresh = 0
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
@@ -185,12 +192,12 @@ export default {
|
|
|
this.$refs.actRef.close()
|
|
|
this.$util.confirmModal({content:'确认上架'+this.currentNum+'份'},() => {
|
|
|
goOnFn({id:this.currentItem.id,num:this.currentNum}).then(res=>{
|
|
|
+ that.currentNum = ''
|
|
|
if(res.code == 1){
|
|
|
that.$msg('操作成功')
|
|
|
setTimeout(() => {
|
|
|
that.getStatList()
|
|
|
}, 1000)
|
|
|
- that.currentNum = ''
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -204,12 +211,12 @@ export default {
|
|
|
this.$refs.actRef.close()
|
|
|
this.$util.confirmModal({content:'确认下架'+this.currentNum+'份'},() => {
|
|
|
goOffFn({id:this.currentItem.id,num:this.currentNum}).then(res=>{
|
|
|
+ that.currentNum = ''
|
|
|
if(res.code == 1){
|
|
|
that.$msg('操作成功')
|
|
|
setTimeout(() => {
|
|
|
that.getStatList()
|
|
|
}, 1000)
|
|
|
- that.currentNum = ''
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -258,6 +265,10 @@ export default {
|
|
|
this.$refs.actRef.close()
|
|
|
},
|
|
|
async init() {
|
|
|
+ this.getStatList()
|
|
|
+ },
|
|
|
+ getStatList() {
|
|
|
+ let that = this
|
|
|
if(this.option.itemId){
|
|
|
this.itemId = this.option.itemId
|
|
|
this.itemName = this.option.itemName
|
|
|
@@ -266,10 +277,6 @@ export default {
|
|
|
this.customId = this.option.customId
|
|
|
this.customName = this.option.custonName
|
|
|
}
|
|
|
- this.getStatList();
|
|
|
- },
|
|
|
- getStatList() {
|
|
|
- let that = this
|
|
|
uni.showLoading()
|
|
|
getBookItemCustomList({itemId:this.itemId,customId:this.customId}).then(res => {
|
|
|
uni.hideLoading()
|