123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493 |
- <template>
- <div class="expenseMobile-all">
- <el-dialog top="20vh" custom-class="selfDialog" width="95%" title="详情" :visible.sync="expenseMobileVisible">
- <div class="dialog-title">详情</div>
- <div class="dialog-info">
- <div class="dialog-info-ms">费用描述:{{dailydata.instructions}}</div>
- <div class="dialog-info-zj">费用总计:{{townum(dailydata.sumPrice)}}</div>
- <div class="dialog-info-sh">
- <div>财务审核:{{dailydata.fAuditDesc}}</div>
- <div>总经理审核:{{dailydata.mAuditDesc}}</div>
- <div>是否付款:{{ dailydata.isPay==1?'已付款':'未付款' }}</div>
- </div>
- </div>
- <div class="dialog-title">具体费用</div>
- <div class="dialog-list">
- <div v-for="(items,index) in dailydata.feeContents" :key="index" class="dialog-list-li">
- <div>费用项目:{{items.priceName}}</div>
- <div class="info-sl">
- <div>数量:{{items.quantity}}</div>
- <div>单价(CNY):{{townum(items.price)}}</div>
- <div>小计(CNY):{{townum(items.itemTotal)}}</div>
- </div>
- <div>备注:{{items.remark}}</div>
- </div>
- </div>
- </el-dialog>
- <div v-if="platejudgment==1">
- <div class="expenseMobile-top">
- <div class="expenseMobile-title">{{a}}日常付款申请{{b}}</div>
- <div class="expenseMobile-search">
- <el-input clearable placeholder="请输入费用描述" v-model="input" class="input-with-select">
- <el-button @click="searchbtn" slot="append" icon="el-icon-search"></el-button>
- </el-input>
- </div>
- </div>
- <div id="scroll-div" ref="element" class="daily-box">
- <div class="daily-card" v-for="(item,index) in tableData" :key="index">
- <div class="card-description">费用描述:{{item.instructions}}</div>
- <div class="card-date">申请时间:{{item.createTime}}</div>
- <div class="card-expense">
- <span>费用总计:{{townum(item.sumPrice)}}</span>
- <span>申请人:{{item.createUser}}</span>
- </div>
- <div class="card-btn">
- <el-button @click="infobtn(item)" size="mini">详情</el-button>
- <el-button size="mini" @click="PostDelDailyPaymentAudit(item.id,1)" type="primary">通过</el-button>
- <el-button size="mini" @click="PostDelDailyPaymentAudit(item.id,2)" type="danger">拒绝</el-button>
- </div>
- </div>
- </div>
- <div id="tshezi" style="padding-bottom: 65px;">
- <div v-if="zwgd" class="expenseMobile-zwgd">暂无更多</div>
- <div v-if="!zwgd" class="expenseMobile-zwgd">加载中!</div>
- </div>
- </div>
- <div v-else>
- <div class="expenseMobile-top">
- <div class="expenseMobile-title">费用审核</div>
- <div class="expenseMobile-search">
- <el-input clearable placeholder="请输入团组名称" v-model="value" class="input-with-select">
- <el-button @click="searchexamine" slot="append" icon="el-icon-search"></el-button>
- </el-input>
- </div>
- </div>
- <div id="examine-div" class="examine-box">
- <div v-for="(info,index) in groupData" :key="index" class="examine-card">
- <div class="examine-card-name">团组名称:{{info.teamName}}</div>
- <div class="examine-card-date">出访时间:{{cltade(info.visitDate)}}</div>
- <div class="examine-card-client">客户名称:{{info.clientName}}</div>
- <div class="examine-card-operator">
- <div>天数/人数:{{info.visitDays}}/{{info.visitPNumber}}</div>
- <div>接团操作人:{{info.jietuanOperator}}</div>
- </div>
- <div class="examine-card-btn">
- <el-button @click="CheckCost(info)" size="mini" type="primary">查看费用</el-button>
- </div>
- </div>
- </div>
- </div>
- <div class="expenseMobile-tabtn">
- <div class="tabtn-box">
- <div @click="rcbtn">
- <div v-if="platejudgment==1"><i style="font-size:22px;" class="el-icon-s-goods"></i></div>
- <div v-else><i style="font-size:20px;" class="el-icon-goods"></i></div>
- <div style="font-size:14px;">日常</div>
- </div>
- <div @click="tzbtn">
- <div v-if="platejudgment==2"><i style="font-size:22px;" class="el-icon-s-goods"></i></div>
- <div v-else><i style="font-size:20px;" class="el-icon-goods"></i></div>
- <div style="font-size:14px;">团组</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data () {
- return {
- tableData:[],
- input:'',
- expenseMobileVisible:false,
- dailydata:{},
- pageIndex:1,
- pageIndexExamine:1,
- loadflagExamine:false,
- loadflag:false,
- zwgd:false,
- platejudgment:2,
- value:'',
- groupData:[],
- a:0,
- b:0,
- }
- },
- methods:{
- //保留两位小数
- townum(val){
- val=Number(val);
- return val.toFixed(2);
- },
- //保留两位小数
- cltade(val){
- return val.split(" ")[0];
- },
- //翻页
- PageTurning(){
- this.pageIndex++;
- this.postPageDailyPaymentList();
- },
- //翻页Examine
- PageTurningExamine(){
- this.pageIndexExamine++;
- this.PostExpenseAuditGroupPageItems();
- },
- //获取列表
- postPageDailyPaymentList() {
- var url = "/api/Financial/PostPageSearchDailyPaymentList"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- pageIndex: that.pageIndex,
- pageSize: 10,
- companyId: -1,
- financialAuditStatus: -1,//财务审核
- managerAuditStatus: -1, //总经理审核
- feeTypeId: -1, //费用类型
- feeSubTypeId: -1, //费用子类型
- feeDesc: that.input, //描述
- createUserId: -1, //申请人
- isPaySign:-1 //是否支付
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- var magarr=res.data.data.dataList;
- if(magarr.length<10){
- that.zwgd=true;
- }
- for(let j=0;j<magarr.length;j++){
- that.tableData.push(magarr[j])
- }
- that.loadflag=true;
- // that.tableData = res.data.data.dataList;
- }
- })
- },
- //审核
- PostDelDailyPaymentAudit(val1,val2){
- var url = "/api/Financial/PostDelDailyPaymentAudit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- id: val1,
- auditType:2,
- auditStatus:val2
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message: res.data.msg,
- type: 'success',
- offset:50
- });
- }else{
- that.$message.error(res.data.msg);
- }
- })
- },
- //详情按钮
- infobtn(val){
- this.expenseMobileVisible=true;
- this.dailydata={};
- this.getPostSearchDailyPaymentInfo(val.id);
- },
- //获取详情
- getPostSearchDailyPaymentInfo(val){
- var url = "/api/Financial/PostSearchDailyPaymentInfo"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- PortType: 1,
- id:val
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.dailydata=res.data.data;
- }
- })
- },
- //搜索
- searchbtn(){
- this.zwgd=false;
- this.pageIndex=1;
- this.tableData=[];
- this.postPageDailyPaymentList();
- },
- //搜索examine
- searchexamine(){
- this.pageIndexExamine=1;
- this.groupData=[];
- this.PostExpenseAuditGroupPageItems();
- localStorage.setItem("Examinevalue",this.value );
- },
- scrollBottomExamine(e) {
- let scrollTop=document.documentElement.scrollTop || document.body.scrollTop;
- let clientHeight=document.documentElement.clientHeight || document.body.clientHeight;
- let scrollHeight=document.documentElement.scrollHeight || document.body.scrollHeight;
- if (scrollTop + clientHeight == scrollHeight&&this.loadflagExamine) {
- this.PageTurningExamine()
- }
- },
- scrollBottom(e) {
-
- let scrollTop=document.documentElement.scrollTop || document.body.scrollTop;
- let clientHeight=document.documentElement.clientHeight || document.body.clientHeight;
- // let scrollHeight=document.documentElement.scrollHeight || document.body.scrollHeight;
- let scrollHeight=document.getElementById('scroll-div').offsetHeight;
- // console.log(document.getElementById("tshezi").getBoundingClientRect().top);
- // console.log(scrollTop);
- // console.log(clientHeight);
- this.a=document.getElementById("tshezi").getBoundingClientRect().top;
- this.b=clientHeight-84;
- if(document.getElementById("tshezi").getBoundingClientRect().top==clientHeight-84&&this.loadflag){
- this.PageTurning()
- }
- // if (scrollTop + clientHeight > scrollHeight+83&&this.loadflag) {
- // this.PageTurning()
- // }
- },
- //日常切换
- rcbtn(){
- this.loadflag=false;
- this.platejudgment=1;
- this.zwgd=false;
- this.pageIndex=1;
- this.tableData=[];
- window.addEventListener('scroll', this.scrollBottom, true);
- window.removeEventListener('scroll', this.scrollBottomExamine, true);
- this.postPageDailyPaymentList();
- },
- //tuanzhuqiehuan
- tzbtn(){
- this.loadflagExamine=false;
- this.platejudgment=2;
- this.pageIndexExamine=1;
- this.groupData=[];
- window.addEventListener('scroll', this.scrollBottomExamine, true);
- window.removeEventListener('scroll', this.scrollBottom, true);
- this.PostExpenseAuditGroupPageItems();
- },
- //费用审核列表
- PostExpenseAuditGroupPageItems(){
- var url = "/api/Groups/PostExpenseAuditGroupPageItems"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- pageId:47,
- userId:21,
- pageIndex: that.pageIndexExamine,
- pageSize: 10,
- isSure: -1,
- searchCriteria: that.value,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- var groupDatas=res.data.data.data;
- for(let j=0;j<groupDatas.length;j++){
- that.groupData.push(groupDatas[j])
- }
- that.loadflagExamine=true;
- }
- })
- },
- //查看费用
- CheckCost(row){
- this.$router.push({path: '/expenseMobileinfo?id=' + row.id +''});
- }
- },
- watch:{
-
- },
- mounted(){
- // if(localStorage.getItem('Examinevalue')!=""){
- // this.value=localStorage.getItem('Examinevalue');
- // }
- // console.log(localStorage.getItem('Examinevalue'));
- // this.token=JSON.parse(localStorage.getItem('Examinevalue'));
- if(this.platejudgment==1){
- window.addEventListener('scroll', this.scrollBottom, true)
- window.removeEventListener('scroll', this.scrollBottomExamine, true)
- this.postPageDailyPaymentList();
- }else{
- window.addEventListener('scroll', this.scrollBottomExamine, true)
- window.removeEventListener('scroll', this.scrollBottom, true)
- this.PostExpenseAuditGroupPageItems();
- }
- },
- destroyed(){
- window.removeEventListener('scroll', this.scrollBottomExamine, true);
- window.removeEventListener('scroll', this.scrollBottom, true);
- }
- }
- </script>
- <style>
- *{
- margin: 0;
- padding: 0;
- }EntryDetails
- .expenseMobile-all{
- background-color: #fff;
- color: #555;
- }
- .expenseMobile-all .el-dialog__header{
- display: none;
- }
- .expenseMobile-all .el-dialog__body{
- padding: 10px;
- }
- .daily-box{
- padding: 8px;
- padding-top: 93px;
- }
- .examine-box{
- padding: 8px;
- padding-top: 93px;
- padding-bottom: 65px;
- }
- .card-description{
- font-weight: 600;
- }
- .daily-card{
- padding: 8px;
- box-shadow: 0 0 10px #0005;
- border-radius:5px ;
- font-size: 14px;
- margin-bottom: 10px;
- }
- .examine-card{
- padding: 8px;
- box-shadow: 0 0 10px #0005;
- border-radius:5px ;
- font-size: 14px;
- margin-bottom: 10px;
- }
- .card-date{
- margin: 5px 0;
- }
- .card-expense{
- display: flex;
- justify-content: space-between;
- }
- .card-btn{
- margin-top: 10px;
- text-align: right;
- }
- .expenseMobile-top{
- position: fixed;
- top: 0;
- background-color: #fff;
- width: 100%;
- text-align: center;
- border-bottom: 1px solid #ede8e8;
- }
- .expenseMobile-title{
- margin: 10px;
- margin-bottom:0px;
- font-size: 17px;
- font-weight:600 ;
- }
- .expenseMobile-search{
- padding: 8px;
- }
- .expenseMobile-tabtn{
- position: fixed;
- bottom: 0;
- background-color: #fff;
- width: 100%;
- padding: 8px;
- text-align: center;
- border-top: 1px solid #ede8e8;
- }
- .tabtn-box{
- display: flex;
- justify-content: space-around;
- }
- .tabtn-box div{
- width: 15%;
- }
- .tabtn-box div div{
- width: 100%;
- }
- .expenseMobile-all .dialog-title{
- font-weight: 600;
- margin-bottom: 10px;
- }
- .expenseMobile-all .dialog-info{
- margin-bottom: 10px;
- }
- .dialog-info-zj{
- margin: 5px 0;
- }
- .dialog-info-sh{
- display: flex;
- flex-wrap: wrap;
- justify-content:space-between;
- }
- .dialog-info-sh div{
- margin-bottom: 5px;
- }
- .info-sl{
- margin: 5px 0;
- display: flex;
- justify-content: space-between;
- flex-wrap:wrap ;
- }
- .dialog-list-li{
- padding: 5px 0;
- border-top: 1px dotted #afadad;
- }
- .dialog-list-li:last-child{
- border-bottom: 1px dotted #afadad;
- }
- .expenseMobile-all .dialog-list{
- max-height: 240px;
- overflow: auto;
- }
- .expenseMobile-zwgd{
- font-size: 14px;
- font-weight: 600;
- text-align: center;
- }
- .examine-card-operator{
- display: flex;
- justify-content: space-between;
- }
- .examine-card-btn{
- text-align: right;
- }
- .examine-card-date{
- margin: 5px 0;
- }
- .examine-card-operator{
- margin: 5px 0;
- }
- .examine-card-name{
- font-weight: 600;
- }
- </style>
|