main-20240105
parent
63e3b19af9
commit
da20590e70
@ -0,0 +1,191 @@
|
||||
<template>
|
||||
<van-popup v-model="isShow" position="bottom" round safe-area-inset-bottom lock-scroll lazy-render get-container="#app" :close-on-click-overlay="false">
|
||||
<div class="Re-select-header">
|
||||
<div class="Re-select-header-cancel" @click="hanleCancel">取消</div>
|
||||
<div class="Re-select-header-title">报销规则</div>
|
||||
<div class="Re-select-header-confirm" @click="handleConfirm">确认</div>
|
||||
</div>
|
||||
<div class="box-1">
|
||||
<van-field v-model="dataObj.dept" class="actived-disabled" disabled label="费用归属部门" clear-trigger="always" input-align="right" />
|
||||
<van-field v-model="dataObj.area" class="actived-disabled" disabled label="目的地" clear-trigger="always" input-align="right" />
|
||||
<van-field v-model="dataObj.feetypeName" class="actived-disabled" disabled label="费用类型" clear-trigger="always" input-align="right" />
|
||||
<van-field v-model="dataObj.maxMoney" class="actived-disabled" disabled label="限制额度" clear-trigger="always" input-align="right" />
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs';
|
||||
import { ImagePreview } from 'vant';
|
||||
export default {
|
||||
props: {
|
||||
dataObj: Object,
|
||||
isOpen: Boolean,
|
||||
typeStr: String,
|
||||
},
|
||||
components: {
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// tableList() {
|
||||
// let arr = (this.list || []).map(item => {
|
||||
// return {
|
||||
// ...item,
|
||||
// checked: (this.invoiceIds || []).includes(item.id)
|
||||
// }
|
||||
// })
|
||||
// console.log('arr', arr, this.invoiceIds);
|
||||
// return arr
|
||||
// },
|
||||
userDeptTree() {
|
||||
return this.$store.getters.userDeptTree
|
||||
},
|
||||
userList() {
|
||||
return this.$store.getters.userList
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableList: [],
|
||||
demo: false,
|
||||
isShow: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isOpen: {
|
||||
handler(val) {
|
||||
this.isShow = val
|
||||
if (val) {
|
||||
this.handleInitList()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleSetCheck(index) {
|
||||
// this.tableList
|
||||
this.$set(this.tableList[index], 'checked', !this.tableList[index].checked)
|
||||
},
|
||||
handleShowImg() {
|
||||
ImagePreview(['https://img01.yzcdn.cn/vant/apple-1.jpg']);
|
||||
},
|
||||
dayjs,
|
||||
handleNewDel(index) {
|
||||
this.tableList.splice(index, 1)
|
||||
},
|
||||
handleInitList() {
|
||||
|
||||
},
|
||||
|
||||
handleConfirm() {
|
||||
let arr = (this.tableList.filter(item => item.checked)).map(item => item.id) || []
|
||||
this.$emit('onConfirm', arr)
|
||||
},
|
||||
|
||||
hanleCancel() {
|
||||
this.$emit('onCancel')
|
||||
},
|
||||
handleDel(index) {
|
||||
this.form.tripPartners.splice(index, 1)
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .actived-disabled {
|
||||
.van-field__control:disabled {
|
||||
color: #333 !important;
|
||||
-webkit-text-fill-color: #333 !important;
|
||||
}
|
||||
.van-field__label {
|
||||
color: #333 !important;
|
||||
-webkit-text-fill-color: #333 !important;
|
||||
}
|
||||
}
|
||||
.Re-select-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.Re-select-header-cancel {
|
||||
color: #f56c6c;
|
||||
padding: 8px 14px;
|
||||
&:active {
|
||||
background: #eeeeee;
|
||||
}
|
||||
}
|
||||
.Re-select-header-title {
|
||||
color: #333333;
|
||||
}
|
||||
.Re-select-header-confirm {
|
||||
color: #409eff;
|
||||
padding: 8px 14px;
|
||||
&:active {
|
||||
background: #eeeeee;
|
||||
}
|
||||
}
|
||||
}
|
||||
.top-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 1rem;
|
||||
position: absolute;
|
||||
}
|
||||
.box-2 {
|
||||
margin-top: 1rem;
|
||||
box-sizing: border-box;
|
||||
padding: 0.5rem 1rem;
|
||||
padding-top: 0;
|
||||
max-height: 50vh;
|
||||
overflow: auto;
|
||||
.box-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0.8rem 0;
|
||||
.box-lf {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
.add-box {
|
||||
width: 100%;
|
||||
margin-top: 0.6rem;
|
||||
.van-button {
|
||||
width: 100%;
|
||||
// border-radius: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.box-1 {
|
||||
@extend .box-2;
|
||||
.new-item-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
// padding: 0.5rem;
|
||||
margin: 0.5rem 0;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0 0.5rem 0.2rem #ccc;
|
||||
align-items: center;
|
||||
padding: 0.5rem;
|
||||
.new-lf {
|
||||
display: flex;
|
||||
margin-right: 0.8rem;
|
||||
}
|
||||
.new-cr {
|
||||
width: 13rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// margin-left: ;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .van-image__img {
|
||||
border-radius: 100%;
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue