|
|
@@ -1,9 +1,12 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
<view class="ex-page">
|
|
|
- <view class="input-wrap_box">
|
|
|
- <view>
|
|
|
- <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
|
|
|
+ <view class="input-wrap">
|
|
|
+ <view class="search-bar">
|
|
|
+ <app-search-module v-model="py" placeholder="输拼音首字母" @input="searchFn" />
|
|
|
+ </view>
|
|
|
+ <view style="padding:0 0upx 0 20upx;" >
|
|
|
+ <button class="admin-button-com middle blue" @click="allOutSelectShop()">全部出库</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="top-bar" style="margin-left:115upx;">实时</view>
|
|
|
@@ -41,6 +44,7 @@
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
import { getProductDataApi } from "@/api/product/index";
|
|
|
+import { allOut } from "@/api/stock-out"
|
|
|
import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
@@ -67,24 +71,41 @@ export default {
|
|
|
storageData:[],
|
|
|
searchContent:'',
|
|
|
shopId:0,
|
|
|
- classItemData:[]
|
|
|
+ classItemData:[],
|
|
|
+ form:{shopId:0,shopName:'',hasSelect:0}
|
|
|
};
|
|
|
},
|
|
|
- onLoad(e) {
|
|
|
- this.shopId = this.getMyShopInfo.id;
|
|
|
- let type = '';
|
|
|
-
|
|
|
- let that = this
|
|
|
- getProductDataApi({ type, shopId: this.shopId,status:0,requestType:'hasStock'}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.classItemData = res.data
|
|
|
- console.log(that.classItemData)
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
+ onShow(){
|
|
|
+ let that = this
|
|
|
+ if(this.form.hasSelect == 1){
|
|
|
+ that.$util.confirmModal({content:'确认全部出库到'+this.form.shopName+'?'},() => {
|
|
|
+ that.form.hasSelect = 0
|
|
|
+ allOut({shopId:this.form.shopId}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ that.showStock()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.showStock()
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(['setUserShopAll'])
|
|
|
+ allOutSelectShop(){
|
|
|
+ this.$util.pageTo({url: '/admin/shop/selectShop',query: {style:2}})
|
|
|
+ },
|
|
|
+ showStock(){
|
|
|
+ this.shopId = this.getMyShopInfo.id;
|
|
|
+ let type = '';
|
|
|
+ let that = this
|
|
|
+ getProductDataApi({ type, shopId: this.shopId,status:0,requestType:'hasStock'}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.classItemData = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -95,6 +116,13 @@ export default {
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+ .input-wrap {
|
|
|
+ display: flex;
|
|
|
+ padding: 0upx 20upx 0upx 13upx;
|
|
|
+ .search-bar {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
.top-bar {
|
|
|
position: absolute;
|
|
|
left: 0;
|