| xqd
@@ -5,7 +5,7 @@
|
|
|
<view class="searchbox">
|
|
|
<u-icon name="search" bold="true" size="25" color="rgb(246,185,78)"></u-icon>
|
|
|
<input type="text" v-model="keywords" placeholder="合同名称/编号、承兑人名称或出票人名称"
|
|
|
- placeholder-style="color:#BBBCBE" @blur="changeSeach"/>
|
|
|
+ placeholder-style="color:#BBBCBE" @blur="changeSeach" />
|
|
|
</view>
|
|
|
<view class="screen" @click="show = true">
|
|
|
<text>筛选</text>
|
| xqd
@@ -22,26 +22,29 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="card" @click.stop="moveDetail(item.id)">
|
|
|
- <view class="passreview" v-if="item.statusText=='成功'">
|
|
|
+ <view class="passreview" v-if="item.statusText=='成功'&&item.contractStatus!==1">
|
|
|
<image src="../../static/img/resuccess.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- <view class="passreview" v-if="item.statusText=='待审核'">
|
|
|
+ <view class="passreview" v-if="item.statusText=='待审核'&&item.contractStatus!==1">
|
|
|
<image src="../../static/img/toreviewe.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- <view class="passreview" v-if="item.statusText=='失败'">
|
|
|
+ <view class="passreview" v-if="item.statusText=='失败'&&item.contractStatus!==1">
|
|
|
<image src="../../static/img/falis.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- <view class="passreview" v-if="item.statusText=='已删除'">
|
|
|
+ <view class="passreview" v-if="item.contractStatus==1">
|
|
|
<image src="../../static/img/redel.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- <view class="timebox" v-if="item.statusText=='成功'"><text>{{item.createdAt}}</text></view>
|
|
|
- <view class="timebox" v-if="item.statusText=='待审核'" :style="{'background-color':'#FFEBE5'}">
|
|
|
+ <view class="timebox" v-if="item.statusText=='成功'&&item.contractStatus!==1">
|
|
|
+ <text>{{item.createdAt}}</text></view>
|
|
|
+ <view class="timebox" v-if="item.statusText=='待审核'&&item.contractStatus!==1"
|
|
|
+ :style="{'background-color':'#FFEBE5'}">
|
|
|
<text>{{item.createdAt}}</text>
|
|
|
</view>
|
|
|
- <view class="timebox" v-if="item.statusText=='失败'" :style="{'background-color':'#E7E7E7'}">
|
|
|
+ <view class="timebox" v-if="item.statusText=='失败'&&item.contractStatus!==1"
|
|
|
+ :style="{'background-color':'#E7E7E7'}">
|
|
|
<text>{{item.createdAt}}</text>
|
|
|
</view>
|
|
|
- <view class="timebox" v-if="item.statusText=='已删除'" :style="{'background-color':'#F6F6F6'}">
|
|
|
+ <view class="timebox" v-if="item.contractStatus==1" :style="{'background-color':'#F6F6F6'}">
|
|
|
<text>{{item.createdAt}}</text>
|
|
|
</view>
|
|
|
<view class="innerbox">
|
| xqd
@@ -92,6 +95,17 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="checklist" v-for="(item,index) in ctrexamstatus" :key="index">
|
|
|
+ <view class="alllistbtn">
|
|
|
+ <text class="btntitle" style="">{{item.title}}</text>
|
|
|
+ <view class="yunbtn">
|
|
|
+ <view class="btnchoose" v-for="(i,k) in item.list" :key="k" @click="choose(item.title,k)"
|
|
|
+ :class="[ contract_examstatus== k?'active':'btnchoose']">
|
|
|
+ <text>{{i.name}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="checklist" v-for="(item,index) in billstatus" :key="index">
|
|
|
<view class="alllistbtn">
|
|
|
<text class="btntitle" style="">{{item.title}}</text>
|
| xqd
@@ -117,26 +131,36 @@
|
|
|
<view class="flex4 custom" v-if="time_status==3">
|
|
|
<text style="font-size: 26rpx;font-weight: 600;">自定义</text>
|
|
|
<view class="custombox flex3">
|
|
|
- <view class="creatdata flex6">
|
|
|
+ <view class="creatdata flex6" @click="openDatePicker(1)">
|
|
|
<text>开始日期</text>
|
|
|
- <view class="flex4 chodatain" @click="openDatePicker(1)">
|
|
|
+ <view class="flex4 chodatain" >
|
|
|
<text>{{creatTime}}</text>
|
|
|
<u-icon name="arrow-right" color="#BEBDBB" bold="true" size="12"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="creatdata flex6">
|
|
|
+ <view class="creatdata flex6" @click="openDatePicker(2)">
|
|
|
<text>结束日期</text>
|
|
|
- <view class="flex4 chodatain" @click="openDatePicker(2)">
|
|
|
+ <view class="flex4 chodatain" >
|
|
|
<text>{{endTime}}</text>
|
|
|
<u-icon name="arrow-right" color="#BEBDBB" bold="true" size="12"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="searchbox" style="margin: 0 20px;margin-bottom: 30px;" v-if="state==0">
|
|
|
+ <view class="checklist">
|
|
|
+ <view class="alllistbtn">
|
|
|
+ <text class="btntitle" style="">搜索供应商</text>
|
|
|
+ <view class="yunbtn">
|
|
|
+ <view class="chosbox">
|
|
|
+ <uni-data-select v-model="asd" :localdata="suplist" @change="changeacPerson" :showas="false" :plname="'搜索供应商名称'" @search="searchSupplier" @checkin="checkacptIndex":nomore="nomore"></uni-data-select>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="searchbox" style="margin: 0 20px;margin-bottom: 30px;" v-if="state==0">
|
|
|
<u-icon name="search" bold="true" size="25" color="rgb(246,185,78)"></u-icon>
|
|
|
<input type="text" v-model="supkeywords" placeholder="请输入供应商名称" placeholder-style="color:#BBBCBE" />
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="aszs flex6">
|
|
|
<view class="againbtn" @click="restoreALL"><text>重置</text></view>
|
|
|
<view class="againbtn" style="color: #D8AB5A;border: 1rpx solid #D8AB5A;" @click="makeSureSelect">
|
| xqd
@@ -198,7 +222,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
keywords: '',
|
|
|
- supkeywords:'',
|
|
|
+ supkeywords: '',
|
|
|
state: 0,
|
|
|
show: false,
|
|
|
editall: false,
|
| xqd
@@ -206,19 +230,40 @@
|
|
|
quan: false,
|
|
|
creatTime: '',
|
|
|
endTime: '',
|
|
|
+ asd:'',
|
|
|
value1: Number(new Date()),
|
|
|
intime: 1,
|
|
|
- contract_status: '',
|
|
|
- draft_status: '',
|
|
|
- time_status: '',
|
|
|
+ contract_examstatus: 0,
|
|
|
+ contract_status: 0,
|
|
|
+ draft_status: 0,
|
|
|
+ time_status: 0,
|
|
|
listall: [],
|
|
|
+ suplist:[],
|
|
|
pageIndex: 1,
|
|
|
+ supageIndex:1,
|
|
|
total: '',
|
|
|
nomore: false,
|
|
|
shai: false,
|
|
|
- startTime:'',
|
|
|
+ startTime: '',
|
|
|
+ supplierId:0,
|
|
|
ctrstatus: [{
|
|
|
title: "合同状态",
|
|
|
+ list: [{
|
|
|
+ name: "全部",
|
|
|
+
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "正常",
|
|
|
+
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "已删除",
|
|
|
+
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }],
|
|
|
+ ctrexamstatus: [{
|
|
|
+ title: "合同审核状态",
|
|
|
list: [{
|
|
|
name: "全部",
|
|
|
|
| xqd
@@ -235,10 +280,7 @@
|
|
|
name: "失败",
|
|
|
|
|
|
},
|
|
|
- {
|
|
|
- name: "已删除",
|
|
|
|
|
|
- },
|
|
|
]
|
|
|
}],
|
|
|
billstatus: [{
|
| xqd
@@ -298,6 +340,7 @@
|
|
|
that.nomore = false
|
|
|
that.listall = []
|
|
|
this.init()
|
|
|
+ this.initSupplier()
|
|
|
},
|
|
|
// 下拉到底部后加载新数据
|
|
|
onReachBottom() {
|
| xqd
@@ -308,21 +351,30 @@
|
|
|
} else {
|
|
|
this.nomore = true
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
init() {
|
|
|
uni.showLoading()
|
|
|
+ let conkey = ''
|
|
|
+ if (this.contract_status == 0) {
|
|
|
+ conkey = 0
|
|
|
+ } else if (this.contract_status == 1) {
|
|
|
+ conkey = 2
|
|
|
+ } else if (this.contract_status == 2) {
|
|
|
+ conkey = 1
|
|
|
+ }
|
|
|
+ console.log(this.supplierId,778)
|
|
|
uni.$u.http.post('/api/Contract/search', {
|
|
|
pageIndex: this.pageIndex,
|
|
|
pageSize: 10,
|
|
|
startTime: this.creatTime,
|
|
|
endTime: this.endTime,
|
|
|
name: this.keywords,
|
|
|
- contractStatus: this.contract_status,
|
|
|
+ contractStatus: conkey,
|
|
|
+ approveStatus: this.contract_examstatus,
|
|
|
draftStatus: this.draft_status,
|
|
|
- supplierName:this.supkeywords
|
|
|
+ supplierId: this.supplierId
|
|
|
}, {
|
|
|
custom: {
|
|
|
auth: true
|
| xqd
@@ -347,13 +399,71 @@
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- changeSeach(e){
|
|
|
- this.keywords=e.detail.value
|
|
|
+ initSupplier(){
|
|
|
+ uni.$u.http.post('/api/Supplier/search', {
|
|
|
+ pageIndex:1,
|
|
|
+ pageSize: 200,
|
|
|
+ // startTime:'',
|
|
|
+ // endTime:'',
|
|
|
+ name:this.seacesu,
|
|
|
+ // contractStatus:'',
|
|
|
+ // contractNo:''
|
|
|
+ }, {
|
|
|
+ custom: {
|
|
|
+ auth: true
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ let list=res.result
|
|
|
+ if(list.length>0){
|
|
|
+ list.forEach((item,index)=>{
|
|
|
+ that.suplist.push({
|
|
|
+ id:item.id,
|
|
|
+ text:item.account,
|
|
|
+ value:index
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if(list.length<10){
|
|
|
+ that.nomore=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log(that.suplist,999999999)
|
|
|
+ }).catch((err) => {
|
|
|
+ uni.hideLoading()
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeSeach(e) {
|
|
|
+ this.keywords = e.detail.value
|
|
|
that.pageIndex = 1
|
|
|
that.nomore = false
|
|
|
that.listall = []
|
|
|
this.init()
|
|
|
},
|
|
|
+ searchSupplier(e){
|
|
|
+ this.seacesu = e
|
|
|
+ this.supageIndex=1,
|
|
|
+ this.suplist = []
|
|
|
+ this.initSupplier()
|
|
|
+ },
|
|
|
+ checkacptIndex(index) {
|
|
|
+ this.acptIndex = index
|
|
|
+ },
|
|
|
+ changeacPerson(e) {
|
|
|
+ this.asd = e
|
|
|
+ if (e == "clearall") {
|
|
|
+ this.supplierId = ''
|
|
|
+ } else {
|
|
|
+ for (let i in this.suplist) {
|
|
|
+ console.log(this.supplierId)
|
|
|
+ if (i == e) {
|
|
|
+ console.log(this.supplierId)
|
|
|
+ this.supplierId=this.suplist[i].id
|
|
|
+ console.log(this.suplist)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.supplierId)
|
|
|
+ },
|
|
|
examineFail() {
|
|
|
let ids = []
|
|
|
that.listall.forEach(item => {
|
| xqd
@@ -605,9 +715,10 @@
|
|
|
this.dateshow = false
|
|
|
const timeFormat = uni.$u.timeFormat
|
|
|
if (this.intime == 1) {
|
|
|
- this.creatTime = timeFormat(e.value, 'yyyy-mm-dd')
|
|
|
+
|
|
|
+ this.creatTime = timeFormat(e.value, 'yyyy-mm-dd 23:59:59')
|
|
|
} else {
|
|
|
- this.endTime = timeFormat(e.value, 'yyyy-mm-dd')
|
|
|
+ this.endTime = timeFormat(e.value, 'yyyy-mm-dd 00:00:00')
|
|
|
}
|
|
|
|
|
|
},
|
| xqd
@@ -643,14 +754,16 @@
|
|
|
this.endTime = ''
|
|
|
this.time_status = 0
|
|
|
this.contract_status = 0
|
|
|
- this.draft_status = 0
|
|
|
- that.pageIndex = 1
|
|
|
- that.nomore = false
|
|
|
- that.listall = []
|
|
|
- this.init()
|
|
|
+ this.draft_status = 0
|
|
|
+ that.pageIndex = 1
|
|
|
+ that.nomore = false
|
|
|
+ that.listall = []
|
|
|
+ this.init()
|
|
|
},
|
|
|
choose(title, k) {
|
|
|
- if (title == "合同状态") {
|
|
|
+ if (title == "合同审核状态") {
|
|
|
+ this.contract_examstatus = k
|
|
|
+ } else if (title == "合同状态") {
|
|
|
this.contract_status = k
|
|
|
} else if (title == "汇票状态") {
|
|
|
this.draft_status = k
|
| xqd
@@ -658,7 +771,9 @@
|
|
|
this.time_status = k
|
|
|
if (k == 0) {
|
|
|
this.creatTime = ''
|
|
|
+ this.endTime=''
|
|
|
} else if (k == 1) {
|
|
|
+ this.endTime=''
|
|
|
let myDate = new Date()
|
|
|
let yy = String(myDate.getFullYear())
|
|
|
let mm = String(myDate.getMonth() + 1 < 10 ? '0' + (myDate.getMonth() + 1) : myDate.getMonth() + 1)
|
| xqd
@@ -666,12 +781,17 @@
|
|
|
let nowDate = yy + '-' + mm + '-' + dd
|
|
|
this.creatTime = nowDate
|
|
|
} else if (k == 2) {
|
|
|
+ this.endTime=''
|
|
|
+ this.creatTime =''
|
|
|
let myDate = new Date()
|
|
|
let yy = String(myDate.getFullYear())
|
|
|
let mm = String(myDate.getMonth() + 1 < 10 ? '0' + (myDate.getMonth() + 1) : myDate.getMonth() + 1)
|
|
|
let dd = String(myDate.getDate() - 1 < 10 ? '0' + myDate.getDate() - 1 : myDate.getDate() - 1)
|
|
|
- let nowDate = yy + '-' + mm + '-' + dd
|
|
|
- this.creatTime = nowDate
|
|
|
+ let aa = String(myDate.getDate() < 10 ? '0' + myDate.getDate() : myDate.getDate())
|
|
|
+ let nowDate = yy + '-' + mm + '-' + aa+' '+"00:00:00"
|
|
|
+ let startDate=yy + '-' + mm + '-' + dd+' '+"23:59:59"
|
|
|
+ this.endTime=nowDate
|
|
|
+ this.creatTime = startDate
|
|
|
}
|
|
|
|
|
|
}
|
| xqd
@@ -698,7 +818,7 @@
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- padding-left: 30rpx;
|
|
|
+ // padding-left: 30rpx;
|
|
|
}
|
|
|
}
|
|
|
|
| xqd
@@ -708,7 +828,7 @@
|
|
|
background-color: #ECECEC;
|
|
|
border-radius: 38rpx;
|
|
|
// width: 688rpx;
|
|
|
- flex: 1;
|
|
|
+ // flex: 1;
|
|
|
height: 75rpx;
|
|
|
margin: 0 auto;
|
|
|
display: flex;
|