|
@@ -7,10 +7,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="top-bar">
|
|
<view class="top-bar">
|
|
|
- <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
|
|
- <button class="admin-button-com mini-btn blue" style="margin-left:30upx;" @click="printOrder()">打印</button>
|
|
|
|
|
|
|
+ <text @click="changeStaff()" style="margin-left:90upx;font-size:30upx;">{{selectStaff.id == 0 ?'选采购人':selectStaff.name}}</text>
|
|
|
<button class="admin-button-com mini-btn blue" style="margin-left:50upx;" @click="modifyBook(0)" v-if="Number(bookSn)>0">结束预订</button>
|
|
<button class="admin-button-com mini-btn blue" style="margin-left:50upx;" @click="modifyBook(0)" v-if="Number(bookSn)>0">结束预订</button>
|
|
|
<button class="admin-button-com mini-btn blue" style="margin-left:50upx;" @click="modifyBook(1)" v-else>开启预订</button>
|
|
<button class="admin-button-com mini-btn blue" style="margin-left:50upx;" @click="modifyBook(1)" v-else>开启预订</button>
|
|
|
|
|
+ <button class="admin-button-com mini-btn blue" style="margin-left:50upx;" @click="goCg()">去采购</button>
|
|
|
</view>
|
|
</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">
|
|
@@ -39,12 +39,26 @@
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</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>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
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 { getStatBookProfit,getStatBookPrint } from "@/api/stat";
|
|
import { getStatBookProfit,getStatBookPrint } from "@/api/stat";
|
|
|
|
|
+import { getAllStaff } from "@/api/shop-admin";
|
|
|
import { changeBook } from "@/api/book"
|
|
import { changeBook } from "@/api/book"
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
@@ -83,7 +97,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
profile:[],
|
|
profile:[],
|
|
|
searchContent:'',
|
|
searchContent:'',
|
|
|
- bookSn:0
|
|
|
|
|
|
|
+ bookSn:0,
|
|
|
|
|
+ staffData:[],
|
|
|
|
|
+ selectStaff:{id:0,name:''},
|
|
|
|
|
+ T:null
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -96,9 +113,32 @@ export default {
|
|
|
this.itemId = e.id;
|
|
this.itemId = e.id;
|
|
|
this.params.itemId = e.id;
|
|
this.params.itemId = e.id;
|
|
|
this.shopId = this.getLoginInfo.shopId;
|
|
this.shopId = this.getLoginInfo.shopId;
|
|
|
|
|
+ getAllStaff().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.staffData = res.data.list ? res.data.list : []
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
...mapActions(['setUserShopAll']),
|
|
|
|
|
+ getCurrentStaff(staff){
|
|
|
|
|
+ this.$refs.staffRef.close()
|
|
|
|
|
+ this.selectStaff.id = staff.id
|
|
|
|
|
+ this.selectStaff.name = staff.name
|
|
|
|
|
+ this.getStatList()
|
|
|
|
|
+ },
|
|
|
|
|
+ cancelCurrentStaff(){
|
|
|
|
|
+ this.$refs.staffRef.close()
|
|
|
|
|
+ this.selectStaff.id = 0
|
|
|
|
|
+ this.selectStaff.name = ''
|
|
|
|
|
+ this.getStatList()
|
|
|
|
|
+ },
|
|
|
|
|
+ changeStaff(){
|
|
|
|
|
+ this.$refs.staffRef.open('center')
|
|
|
|
|
+ },
|
|
|
|
|
+ goCg(){
|
|
|
|
|
+ this.$util.pageTo({ url: "/pagesPurchase/supplier",type:2})
|
|
|
|
|
+ },
|
|
|
modifyBook(status){
|
|
modifyBook(status){
|
|
|
let hint = status == 0 ?'确认结束?':'确认开启?'
|
|
let hint = status == 0 ?'确认结束?':'确认开启?'
|
|
|
this.$util.confirmModal({content:hint},() => {
|
|
this.$util.confirmModal({content:hint},() => {
|
|
@@ -111,21 +151,15 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- printOrder(){
|
|
|
|
|
- this.$msg('开发中')
|
|
|
|
|
- return false
|
|
|
|
|
- this.$util.confirmModal({content:'确认打印?'},() => {
|
|
|
|
|
- uni.showLoading({mask:true})
|
|
|
|
|
- getStatBookPrint(this.params).then(res => {
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- this.$msg('打印成功')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
searchFn(e){
|
|
searchFn(e){
|
|
|
- this.searchContent = e;
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ if(that.T != null){
|
|
|
|
|
+ clearTimeout(that.T)
|
|
|
|
|
+ }
|
|
|
|
|
+ that.T = setTimeout(function(){
|
|
|
|
|
+ that.searchContent = e
|
|
|
|
|
+ that.getStatList()
|
|
|
|
|
+ },700)
|
|
|
},
|
|
},
|
|
|
goDetail(item){
|
|
goDetail(item){
|
|
|
this.$util.pageTo({ url: "/admin/book/itemCustom?itemId="+item.itemId+'&itemName='+item.name})
|
|
this.$util.pageTo({ url: "/admin/book/itemCustom?itemId="+item.itemId+'&itemName='+item.name})
|
|
@@ -142,11 +176,6 @@ export default {
|
|
|
goBookCgChange(item){
|
|
goBookCgChange(item){
|
|
|
this.$util.pageTo({ url: "/admin/book/globalBookCgChange?itemId="+item.itemId+'&itemName='+item.name+'&id='+item.id})
|
|
this.$util.pageTo({ url: "/admin/book/globalBookCgChange?itemId="+item.itemId+'&itemName='+item.name+'&id='+item.id})
|
|
|
},
|
|
},
|
|
|
- selectShopFn(val){
|
|
|
|
|
- this.params.shopId = val.id;
|
|
|
|
|
- this.init();
|
|
|
|
|
- },
|
|
|
|
|
- //选择时间
|
|
|
|
|
selectDateFn(val) {
|
|
selectDateFn(val) {
|
|
|
this.params = {...this.params,...val}
|
|
this.params = {...this.params,...val}
|
|
|
this.init()
|
|
this.init()
|
|
@@ -157,7 +186,7 @@ export default {
|
|
|
getStatList() {
|
|
getStatList() {
|
|
|
let that = this
|
|
let that = this
|
|
|
uni.showLoading()
|
|
uni.showLoading()
|
|
|
- getStatBookProfit(this.params).then(res => {
|
|
|
|
|
|
|
+ getStatBookProfit({...this.params,staffId:this.selectStaff.id,search:this.searchContent}).then(res => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
this.bookSn = res.data.shop && res.data.shop.bookSn ? res.data.shop.bookSn : 0
|
|
this.bookSn = res.data.shop && res.data.shop.bookSn ? res.data.shop.bookSn : 0
|
|
|
if (!this.$util.isEmpty(res.data.list)) {
|
|
if (!this.$util.isEmpty(res.data.list)) {
|