|
@@ -3,8 +3,8 @@
|
|
|
<view style="padding:15upx 0 30upx 50upx;font-size:30upx;">
|
|
<view style="padding:15upx 0 30upx 50upx;font-size:30upx;">
|
|
|
<view>
|
|
<view>
|
|
|
<text @click="changeBx()">{{ bx == -1 ? '报销状态' : bx == 0 ? '待报销' : '已报销' }}</text>
|
|
<text @click="changeBx()">{{ bx == -1 ? '报销状态' : bx == 0 ? '待报销' : '已报销' }}</text>
|
|
|
- <text style="margin-left:50upx;" @click="changeType()">类型</text>
|
|
|
|
|
- <text style="margin-left:50upx;" @click="changePayMan()">付款人</text>
|
|
|
|
|
|
|
+ <text style="margin-left:50upx;" @click="changeType()">{{ typeName }}</text>
|
|
|
|
|
+ <text style="margin-left:50upx;" @click="changePayMan()">{{ getStaffName }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view style="margin-left:50upx;margin-bottom:26upx;position:relative;">
|
|
<view style="margin-left:50upx;margin-bottom:26upx;position:relative;">
|
|
@@ -40,16 +40,18 @@
|
|
|
<view v-for="(item, index) in typeList" :key="index" style="width:100vw;margin-top:8upx;">
|
|
<view v-for="(item, index) in typeList" :key="index" style="width:100vw;margin-top:8upx;">
|
|
|
<button @click="getCurrentType(item)">{{ item.name }}</button>
|
|
<button @click="getCurrentType(item)">{{ item.name }}</button>
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="width:100vw;margin-top:30upx;margin-bottom:70upx;"><button @click="closeTypeShow()">取消</button></view>
|
|
|
|
|
|
|
+ <view style="width:100vw;margin-top:30upx;"><button @click="resetTypeShow()">重置</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-bottom:70upx;margin-top:8upx;"><button @click="closeTypeShow()">取消</button></view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
|
|
<uni-popup ref="payShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
<uni-popup ref="payShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
<view v-for="(item, index) in staffList" :key="index" style="width:100vw;margin-top:8upx;">
|
|
<view v-for="(item, index) in staffList" :key="index" style="width:100vw;margin-top:8upx;">
|
|
|
- <button @click="">{{ item.name }}</button>
|
|
|
|
|
|
|
+ <button @click="getPayMan(item)">{{ item.name }}</button>
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="width:100vw;margin-top:30upx;margin-bottom:70upx;"><button @click="closePayShow()">取消</button></view>
|
|
|
|
|
|
|
+ <view style="width:100vw;margin-top:30upx;"><button @click="resetPayShow()">重置</button></view>
|
|
|
|
|
+ <view style="width:100vw;margin-bottom:70upx;margin-top:8upx;"><button @click="closePayShow()">取消</button></view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
|
@@ -75,21 +77,74 @@ export default {
|
|
|
getStaffId:0,
|
|
getStaffId:0,
|
|
|
staffList:[],
|
|
staffList:[],
|
|
|
bx:-1,
|
|
bx:-1,
|
|
|
- typeList:[]
|
|
|
|
|
|
|
+ typeList:[],
|
|
|
|
|
+ type:-1,
|
|
|
|
|
+ typeName:'类型',
|
|
|
|
|
+ searchTime:'',
|
|
|
|
|
+ startTime:'',
|
|
|
|
|
+ endTime:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad(){
|
|
|
|
|
+ getAllStaff().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.staffList = res.data.list
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ getTypeList().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.typeList = res.data.list ? res.data.list : []
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ onShow(){
|
|
|
|
|
+ this.resetList()
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ selectDateFn(val) {
|
|
|
|
|
+ this.searchTime = val.searchTime
|
|
|
|
|
+ this.startTime = val.startTime
|
|
|
|
|
+ this.endTime = val.endTime
|
|
|
|
|
+ this.resetList()
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
|
|
+ getPayMan(info){
|
|
|
|
|
+ this.getStaffId = info.id
|
|
|
|
|
+ this.getStaffName = info.name
|
|
|
|
|
+ this.closePayShow()
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
goToBxList(){
|
|
goToBxList(){
|
|
|
this.$util.pageTo({ url: "/admin/expend/bxList"})
|
|
this.$util.pageTo({ url: "/admin/expend/bxList"})
|
|
|
},
|
|
},
|
|
|
changePayMan(){
|
|
changePayMan(){
|
|
|
this.$refs.payShowMore.open('top')
|
|
this.$refs.payShowMore.open('top')
|
|
|
},
|
|
},
|
|
|
|
|
+ resetPayShow(){
|
|
|
|
|
+ this.getStaffName = '选付款人'
|
|
|
|
|
+ this.getStaffId = 0
|
|
|
|
|
+ this.closePayShow()
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
closePayShow(){
|
|
closePayShow(){
|
|
|
this.$refs.payShowMore.close()
|
|
this.$refs.payShowMore.close()
|
|
|
},
|
|
},
|
|
|
|
|
+ resetTypeShow(){
|
|
|
|
|
+ this.type = -1
|
|
|
|
|
+ this.typeName = '类型'
|
|
|
|
|
+ this.closeTypeShow()
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
getCurrentType(info){
|
|
getCurrentType(info){
|
|
|
-
|
|
|
|
|
|
|
+ this.type = info.id
|
|
|
|
|
+ this.typeName = info.name
|
|
|
|
|
+ this.closeTypeShow()
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.init()
|
|
|
},
|
|
},
|
|
|
closeTypeShow(){
|
|
closeTypeShow(){
|
|
|
this.$refs.typeShowMore.close()
|
|
this.$refs.typeShowMore.close()
|
|
@@ -111,8 +166,8 @@ export default {
|
|
|
if(res.tapIndex == 2){
|
|
if(res.tapIndex == 2){
|
|
|
that.bx = -1
|
|
that.bx = -1
|
|
|
}
|
|
}
|
|
|
- //that.resetList()
|
|
|
|
|
- //that.getRefundData()
|
|
|
|
|
|
|
+ that.resetList();
|
|
|
|
|
+ that.init()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -120,25 +175,13 @@ export default {
|
|
|
this.$util.pageTo({url: '/admin/expend/addExpend'})
|
|
this.$util.pageTo({url: '/admin/expend/addExpend'})
|
|
|
},
|
|
},
|
|
|
async init(){
|
|
async init(){
|
|
|
- const res = await getExpendList({ page:this.list.page })
|
|
|
|
|
|
|
+ const res = await getExpendList({ page:this.list.page,bx:this.bx,type:this.type,staffId:this.getStaffId,searchTime: this.searchTime,
|
|
|
|
|
+ startTime: this.startTime,endTime: this.endTime,})
|
|
|
if (this.$util.isEmpty(res.data.list)){
|
|
if (this.$util.isEmpty(res.data.list)){
|
|
|
this.completes(res)
|
|
this.completes(res)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.completes(res)
|
|
this.completes(res)
|
|
|
-
|
|
|
|
|
- getAllStaff().then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- this.staffList = res.data.list
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- getTypeList().then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- this.typeList = res.data.list ? res.data.list : []
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async onPullDownRefresh() {
|
|
async onPullDownRefresh() {
|