|
@@ -1,21 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
|
|
+<view class="app-content">
|
|
|
<view class="ex-page">
|
|
<view class="ex-page">
|
|
|
- <view class="top-bar" v-if="false">
|
|
|
|
|
-<!-- <SelectList :list="selectListData" @search="searchSelectEvent" />-->
|
|
|
|
|
-
|
|
|
|
|
- <DorpdownSelect class="bar"
|
|
|
|
|
- :menuObj="menuTimeObj"
|
|
|
|
|
- :typeTime="true"
|
|
|
|
|
- :selectItemId.sync="selectTimeId"
|
|
|
|
|
- :typeSelect="1" top="0upx"
|
|
|
|
|
- @selectSussess="selectSussess" />
|
|
|
|
|
-
|
|
|
|
|
- <DorpdownSelect class="bar"
|
|
|
|
|
- :menuObj.sync="menuObj"
|
|
|
|
|
- :selectItemId.sync="shopId"
|
|
|
|
|
- top="0"
|
|
|
|
|
- @selectSussess="selectShopSussess" />
|
|
|
|
|
- </view>
|
|
|
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
<view class="space-view ex-table">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
@@ -28,22 +13,13 @@
|
|
|
<t-tr v-for="(item, index) in list.data" :key="index">
|
|
<t-tr v-for="(item, index) in list.data" :key="index">
|
|
|
<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color">
|
|
<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color">
|
|
|
<view v-if="column.custom == 'change'">
|
|
<view v-if="column.custom == 'change'">
|
|
|
- <!-- {{ `${item.smallNumOrder}/${item.bigNumOrder}` }} -->
|
|
|
|
|
- {{ `${item.bigNumOrder}/${item.smallNumOrder}` }}
|
|
|
|
|
|
|
+ {{ `${parseFloat(item.itemNum)}` }}
|
|
|
</view>
|
|
</view>
|
|
|
<view v-else-if="column.custom == 'stock'">
|
|
<view v-else-if="column.custom == 'stock'">
|
|
|
- <!-- {{ `${item.smallNumStock}/${item.bigNumStock}` }} -->
|
|
|
|
|
- {{ `${item.bigNumStock}/${item.smallNumStock}` }}
|
|
|
|
|
|
|
+ {{ `${parseFloat(item.newStock)}` }}
|
|
|
</view>
|
|
</view>
|
|
|
<view v-else-if="column.custom == 'time'">
|
|
<view v-else-if="column.custom == 'time'">
|
|
|
- <view class="icon-info">
|
|
|
|
|
- <view class="info-name">
|
|
|
|
|
- {{ item.addTime }}
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- <view class="info-type">
|
|
|
|
|
- {{ item.addTime }}
|
|
|
|
|
- </view> -->
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="icon-info"><view class="info-name">{{ item.addTime.substr(5,11) }}</view></view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-else>
|
|
<view v-else>
|
|
|
{{ item[column.dataIndex] || "" }}
|
|
{{ item[column.dataIndex] || "" }}
|
|
@@ -57,31 +33,19 @@
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
-
|
|
|
|
|
- <!-- 时间段选择-->
|
|
|
|
|
- <rangeDatePick
|
|
|
|
|
- :show="isShow"
|
|
|
|
|
- start="2000-01-01"
|
|
|
|
|
- end="2200-12-01"
|
|
|
|
|
- :value="customizationTime"
|
|
|
|
|
- @change="timeChange"
|
|
|
|
|
- @cancel="timeCancel"
|
|
|
|
|
- themeColor="#4C83D6" fields="day"></rangeDatePick>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
const Month = (new Date().getMonth()+1)<10?'0'+(new Date().getMonth()+1):new Date().getMonth()+1
|
|
const Month = (new Date().getMonth()+1)<10?'0'+(new Date().getMonth()+1):new Date().getMonth()+1
|
|
|
const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
|
|
const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-
|
|
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
import { getStockDetailApi } from "@/api/storehouse/stock";
|
|
import { getStockDetailApi } from "@/api/storehouse/stock";
|
|
|
import { list,selectShop } from "@/mixins";
|
|
import { list,selectShop } from "@/mixins";
|
|
|
-import DorpdownSelect from "@/components/module/dorpdownSelect";
|
|
|
|
|
-import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
|
|
|
|
|
import {mapActions, mapGetters} from "vuex";
|
|
import {mapActions, mapGetters} from "vuex";
|
|
|
export default {
|
|
export default {
|
|
|
- components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
|
|
|
|
|
|
|
+ components: { SelectList, AppWrapperEmpty},
|
|
|
mixins: [list,selectShop],
|
|
mixins: [list,selectShop],
|
|
|
computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
|
|
computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
|
|
|
data() {
|
|
data() {
|
|
@@ -131,6 +95,11 @@ export default {
|
|
|
dataIndex: "typeName",
|
|
dataIndex: "typeName",
|
|
|
color: "info"
|
|
color: "info"
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "名称",
|
|
|
|
|
+ dataIndex: "relateName",
|
|
|
|
|
+ color: "info"
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
name: "变动",
|
|
name: "变动",
|
|
|
custom: "change",
|
|
custom: "change",
|
|
@@ -169,21 +138,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
|
this.itemId = e.id;
|
|
this.itemId = e.id;
|
|
|
- this.params.itemId = e.id;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.params.id = e.id;
|
|
|
let dateDefaultOption = [];
|
|
let dateDefaultOption = [];
|
|
|
let list = this.getDictionariesInfo.dateDefaultOption;
|
|
let list = this.getDictionariesInfo.dateDefaultOption;
|
|
|
- for (let i=0;i<list.length;i++){
|
|
|
|
|
- dateDefaultOption.push({name:list[i].name,id:list[i].value})
|
|
|
|
|
|
|
+ if(!this.$util.isEmpty(list)){
|
|
|
|
|
+ for (let i=0;i<list.length;i++){
|
|
|
|
|
+ dateDefaultOption.push({name:list[i].name,id:list[i].value})
|
|
|
|
|
+ }
|
|
|
|
|
+ this.menuTimeObj = {title:'今天',titleChild:'时间',list: dateDefaultOption}
|
|
|
}
|
|
}
|
|
|
- this.menuTimeObj = {title:'时间',titleChild:'时间',list: dateDefaultOption};
|
|
|
|
|
-
|
|
|
|
|
this.shopId = this.getLoginInfo.shopId;
|
|
this.shopId = this.getLoginInfo.shopId;
|
|
|
- console.log(' this.selectShopId',this.shopId)
|
|
|
|
|
- console.log(' this.getLoginInfo.shopId',this.getLoginInfo.shopId)
|
|
|
|
|
- // console.log('userShopAll',this.setUserShopAll())
|
|
|
|
|
-
|
|
|
|
|
- this.init();
|
|
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
if (!this.list.finished) {
|
|
if (!this.list.finished) {
|
|
@@ -196,36 +160,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
...mapActions(['setUserShopAll']),
|
|
|
- // 选择分店
|
|
|
|
|
- selectShopSussess(val){
|
|
|
|
|
- this.params.shopId = val.selectItem.id;
|
|
|
|
|
- this.init();
|
|
|
|
|
- },
|
|
|
|
|
- //选择时间
|
|
|
|
|
- selectSussess(val) {
|
|
|
|
|
- this.params.selectTime = this.selectTimeId;
|
|
|
|
|
- if(val.select=='自定义'){
|
|
|
|
|
- this.selectTime();
|
|
|
|
|
- }else{
|
|
|
|
|
- this.init();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- //选择时间-自定义时间
|
|
|
|
|
- selectTime(){
|
|
|
|
|
- this.customizationTime = [time,time],
|
|
|
|
|
- this.isShow = true;
|
|
|
|
|
- },
|
|
|
|
|
- //选择自定义时间确定
|
|
|
|
|
- timeChange(e){
|
|
|
|
|
- this.isShow = false;
|
|
|
|
|
- this.params.startTime = e[0]
|
|
|
|
|
- this.params.endTime = e[1]
|
|
|
|
|
- this.init();
|
|
|
|
|
- },
|
|
|
|
|
- //选择自定义时间取消
|
|
|
|
|
- timeCancel(e){this.isShow = false;},
|
|
|
|
|
-
|
|
|
|
|
async init() {
|
|
async init() {
|
|
|
this._list();
|
|
this._list();
|
|
|
},
|
|
},
|
|
@@ -254,7 +188,7 @@ export default {
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
&:nth-child(1){
|
|
&:nth-child(1){
|
|
|
- border-right: 1px solid #eeeeec;
|
|
|
|
|
|
|
+ border-right: 1upx solid #eeeeec;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -304,7 +238,7 @@ export default {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100upx;
|
|
height: 100upx;
|
|
|
|
|
|
|
|
- box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
|
|
|
|
|
|
|
+ box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
|
|
|
.info-view {
|
|
.info-view {
|
|
|
font-size: 26upx;
|
|
font-size: 26upx;
|
|
|
}
|
|
}
|
|
@@ -316,4 +250,4 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|