|
|
@@ -8,6 +8,9 @@
|
|
|
</view>
|
|
|
<view class="top-bar">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
+ <button class="admin-button-com middle blue" style="margin-left:30upx;position: absolute;top:-25upx;right:130upx;" @click="changeStaff()">
|
|
|
+ {{selectStaff.id == 0 ?'选采购人':selectStaff.name}}
|
|
|
+ </button>
|
|
|
</view>
|
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
|
@@ -41,12 +44,26 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="max-height:90vh;overflow: scroll;">
|
|
|
+ <view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
|
|
|
+ <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+ <view v-for="(item, index) in staffData" :key="index" @tap.stop="getCurrentStaff(item)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
+ <view style="margin-top:8upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;font-weight:bold;font-size:30upx;">{{item.name}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="cancelCurrentStaff()">取消选择</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
import { getStatItemShow } from "@/api/stat";
|
|
|
+import { getAllStaff } from "@/api/shop-admin";
|
|
|
import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
@@ -63,9 +80,13 @@ export default {
|
|
|
searchTime:'',
|
|
|
startTime: "",
|
|
|
endTime: "",
|
|
|
- sort:"num"
|
|
|
+ sort:"num",
|
|
|
+ staffId:0,
|
|
|
+ staffName:''
|
|
|
},
|
|
|
- profile:[]
|
|
|
+ profile:[],
|
|
|
+ staffData:[],
|
|
|
+ selectStaff:{id:0,name:''}
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -74,9 +95,30 @@ export default {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
},
|
|
|
+ onLoad(e) {
|
|
|
+ getAllStaff().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.staffData = res.data.list ? res.data.list : []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ getCurrentStaff(staff){
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ this.selectStaff.id = staff.id
|
|
|
+ this.selectStaff.name = staff.name
|
|
|
+ this.getStatList("num")
|
|
|
+ },
|
|
|
+ cancelCurrentStaff(){
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ this.selectStaff.id = 0
|
|
|
+ this.selectStaff.name = ''
|
|
|
+ this.getStatList("num")
|
|
|
+ },
|
|
|
+ changeStaff(){
|
|
|
+ this.$refs.staffRef.open('center')
|
|
|
+ },
|
|
|
searchFn(e){
|
|
|
-
|
|
|
},
|
|
|
selectShopFn(val){
|
|
|
this.init();
|
|
|
@@ -95,6 +137,8 @@ export default {
|
|
|
let that = this
|
|
|
uni.showLoading()
|
|
|
this.params.sort = rank
|
|
|
+ this.params.staffId = this.selectStaff.id
|
|
|
+ this.params.staffName = this.selectStaff.name
|
|
|
getStatItemShow(this.params).then(res => {
|
|
|
uni.hideLoading()
|
|
|
that.profile = res.data
|