|
|
@@ -83,8 +83,8 @@
|
|
|
<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="width:200upx;" @click="">减库存</button>
|
|
|
+ <button class="admin-button-com big default" style="margin-right:20upx;width:200upx;" @click="addStockBook()">加库存</button>
|
|
|
+ <button class="admin-button-com big default" style="width:200upx;" @click="delStockBook()">减库存</button>
|
|
|
</view>
|
|
|
<view style="margin-top:6upx;">
|
|
|
<button class="admin-button-com big default" style="width:420upx;" @click="getStockDetail()">库存明细</button>
|
|
|
@@ -105,6 +105,7 @@
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
import { getBookItemCustomList,goOnFn,toBoxFn,goOffFn,cancelBoxFn } from "@/api/book"
|
|
|
+import { bookAddStockFn,bookDelStockFn } from "@/api/inventory"
|
|
|
import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
@@ -167,6 +168,44 @@ export default {
|
|
|
this.$refs.actRef.close()
|
|
|
this.$util.pageTo({ url: "/admin/book/itemCustomBookCgChange?id="+this.currentItem.id+'&customId='+this.currentItem.customId+'&itemId='+this.currentItem.itemId+'&customName='+this.currentItem.customName+'&itemName='+this.currentItem.name})
|
|
|
},
|
|
|
+ delStockBook(){
|
|
|
+ let that = this
|
|
|
+ if(Number(this.currentNum)<=0){
|
|
|
+ this.$msg('请填写数量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.$refs.actRef.close()
|
|
|
+ this.$util.confirmModal({content:'确认减少'+this.currentNum+'份'},() => {
|
|
|
+ bookDelStockFn({bookItemCustomId:this.currentItem.id,num:this.currentNum,itemId:this.currentItem.itemId}).then(res=>{
|
|
|
+ that.currentNum = ''
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('减少成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ that.getStatList()
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addStockBook(){
|
|
|
+ let that = this
|
|
|
+ if(Number(this.currentNum)<=0){
|
|
|
+ this.$msg('请填写数量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.$refs.actRef.close()
|
|
|
+ this.$util.confirmModal({content:'确认增加'+this.currentNum+'份'},() => {
|
|
|
+ bookAddStockFn({bookItemCustomId:this.currentItem.id,num:this.currentNum,itemId:this.currentItem.itemId}).then(res=>{
|
|
|
+ that.currentNum = ''
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('添加成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ that.getStatList()
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
loanStock(){
|
|
|
this.$refs.actRef.close()
|
|
|
this.$util.pageTo({ url: "/admin/item/loan?itemId="+this.currentItem.itemId+'&bookItemCustomId='+this.currentItem.id})
|