|
|
@ -74,18 +74,18 @@ |
|
|
|
</style> |
|
|
|
<template> |
|
|
|
<view class="container flex"> |
|
|
|
<d-search/> |
|
|
|
<d-search v-model="searchVal.baseName" @search="clean();search()"/> |
|
|
|
|
|
|
|
<scroll-view scroll-y> |
|
|
|
<view class="card" @click="$u.route({url:'pages/purchase/detail'})"> |
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
|
<view class="card" v-for="(v,k) in list" :key="k" @click="$u.route({url:'pages/purchase/detail',params:{id:v.id,date:v.applicantTime}})"> |
|
|
|
<view class="head"> |
|
|
|
<text class="plant-edifice"/> |
|
|
|
<text>一号基地</text> |
|
|
|
<text>张召忠</text> |
|
|
|
<text>{{v.baseName}}</text> |
|
|
|
<text>{{v.applicantName}}</text> |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<text>申请日期</text> |
|
|
|
<text>2022-12-29</text> |
|
|
|
<text>{{v.applicantTime}}</text> |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<text>种类</text> |
|
|
@ -94,21 +94,56 @@ |
|
|
|
</view> |
|
|
|
<view class="foot"> |
|
|
|
<view class="examine"> |
|
|
|
<text>审核人:章晓华</text> |
|
|
|
<text class="over">原因:此处是原因此处是原因此处是处是原因此处是原因此处是</text> |
|
|
|
<text v-if="false">审核人:章晓华</text> |
|
|
|
<text v-if="false" class="over">原因:此处是原因此处是原因此处是处是原因此处是原因此处是</text> |
|
|
|
</view> |
|
|
|
<text class="type">审核中</text> |
|
|
|
<text class="type" :style="{'--bg':({2:'#FFCB69',3:'#10C176',4:'#EE263A',5:'#2196f3'})[v.applicantStatus]}">{{({2:"审核中",3:"通过",4:"未通过",5:"农资入库"})[v.applicantStatus]}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import request from '@/common/request' |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
|
|
|
|
searchVal:{ |
|
|
|
baseName:"", |
|
|
|
pageNo:1, |
|
|
|
pageSize:6, |
|
|
|
companyId:this.$store.getters['userInfo'].companyId |
|
|
|
}, |
|
|
|
total:0, |
|
|
|
list:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
|
this.search() |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
clean(){ |
|
|
|
this.list=[] |
|
|
|
this.total=0 |
|
|
|
this.searchVal.pageNo=1 |
|
|
|
}, |
|
|
|
async search(){ |
|
|
|
if(this.total==0||this.list.length<this.total){ |
|
|
|
var res = await request("/api/purchase/purchaseList",{ |
|
|
|
params:this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.records) |
|
|
|
this.total=res.data.total |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||"获取采购记录失败!", |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |