123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681 |
- <template>
- <view class="content">
- <view class="headbgbox flex2">
- <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" />
- </view>
- <view class="screen" @click="show = true">
- <text>筛选</text>
- <view style="padding-left: 10rpx;">
- <u-icon name="arrow-down" color="#1F242A" size="14" bold="true"></u-icon>
- </view>
- </view>
- </view>
- <view class="cardlist">
- <view>
- <view class="lable " v-for="(item,index) in listall" :key="index" >
- <view class="radiobox" v-if="editall">
- <radio :value="index" :checked="item.checked" color="#D8AB5A" @click="checkBox(item.id)"/>
- </view>
- <view class="card" @click.stop="moveDetail(item.id)">
- <view class="passreview" v-if="item.statusText=='成功'">
- <image src="../../static/img/resuccess.png" mode="aspectFill"></image>
- </view>
- <view class="passreview" v-if="item.statusText=='待审核'" >
- <image src="../../static/img/toreviewe.png" mode="aspectFill"></image>
- </view>
- <view class="passreview" v-if="item.statusText=='失败'" >
- <image src="../../static/img/falis.png" mode="aspectFill"></image>
- </view>
- <view class="passreview" v-if="item.statusText=='已删除'" >
- <image src="../../static/img/redel.png" mode="aspectFill"></image>
- </view>
- <view class="timebox" v-if="item.statusText=='成功'"><text>{{item.contractNo}}</text></view>
- <view class="timebox" v-if="item.statusText=='待审核'" :style="{'background-color':'#FFEBE5'}"><text>{{item.contractNo}}</text></view>
- <view class="timebox" v-if="item.statusText=='失败'" :style="{'background-color':'#E7E7E7'}"><text>{{item.contractNo}}</text></view>
- <view class="timebox" v-if="item.statusText=='已删除'" :style="{'background-color':'#F6F6F6'}"><text>{{item.contractNo}}</text></view>
- <view class="innerbox">
- <view class="listicon">
- <image src="/static/img/listticon.png" mode="aspectFill"></image>
- </view>
- <text class="cardtitle hideone">{{item.name}}</text>
- </view>
- <view class="contractmsg flex5">
- <text>合同编号:{{item.contractNo}}</text>
- <text style="padding-top: 10rpx;">承兑人:{{item.acceptorName}}</text>
- <text style="padding-top: 10rpx;">供应商:四川高鼎科技有限公司</text>
- </view>
- <view class="flex6 contadra">
- <text>出票人:{{item.drawersName}}</text>
- <text>汇票状态:{{item.status}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="nomore" v-if="listall.length==0">
- <text>暂无数据</text>
- </view>
- <view class="totalmanage " v-if="listall.length>0">
- <text style="color:#68625B;font-size: 28rpx;">合计:{{total}}份</text>
- <view class=" maboxtitls" @click="editall=true">
- <view class="managebox">
- <image src="/static/img/manage.png" mode="aspectFit"></image>
- </view>
- <text style="padding-left: 15rpx;">管理</text>
- </view>
- </view>
- <view class="safebt"></view>
- <!-- <view class="plusicon" @click="addContract" v-if="state==1"></view> -->
- <u-popup :show="show" @close="close" @open="open">
- <view class="popscreen">
- <view class="checklist" v-for="(item,index) in ctrstatus" :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_status == 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>
- <view class="yunbtn">
- <view class="btnchoose" v-for="(i,k) in item.list" :key="k" @click="choose(item.title,k)"
- :class="[draft_status == k?'active':'btnchoose']">
- <text>{{i.name}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="checklist" v-for="(item,index) in upstauts" :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="[time_status == k?'active':'btnchoose']">
- <text>{{i.name}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="flex4 custom">
- <text style="font-size: 26rpx;font-weight: 600;">自定义</text>
- <view class="custombox flex3">
- <view class="creatdata flex6">
- <text>开始日期</text>
- <view class="flex4 chodatain" @click="openDatePicker(1)">
- <text>{{creatTime}}</text>
- <u-icon name="arrow-right" color="#BEBDBB" bold="true" size="12"></u-icon>
- </view>
- </view>
- <view class="creatdata flex6">
- <text>结束日期</text>
- <view class="flex4 chodatain" @click="openDatePicker(2)">
- <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;">
- <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" />
- </view>
- <view class="aszs flex6">
- <view class="againbtn"><text>重置</text></view>
- <view class="againbtn" style="color: #D8AB5A;border: 1rpx solid #D8AB5A;"><text>确认</text></view>
- </view>
- </view>
- </u-popup>
- <u-datetime-picker :show="dateshow" v-model="value1" mode="date" @confirm="chooseDate"
- @cancel="closeDate" ></u-datetime-picker>
- <!-- 底部删除 -->
- <u-popup :show="editall&&state==1" @close="closeEidt" @open="openEidt" :overlay="false">
- <view class="editbox">
- <view class="chooseall flex6">
- <view class="leftchoose ">
- <radio :checked="quan" @click="makeSureAll" color="#D8AB5A"></radio>
- <text>全选</text>
- </view>
- <view class="surebtn" @click="selectDown">
- 完成
- </view>
- </view>
- <view class="choosebtn">
- <view class="delbtn flex1">删除</view>
- <view class="restorebtn flex1">复原</view>
- </view>
- </view>
- </u-popup>
- <u-popup :show="editall&&state==0" @close="closeEidt" @open="openEidt" :overlay="false">
- <view class="editbox">
- <view class="chooseall flex6">
- <view class="leftchoose ">
- <radio :checked="quan" @click="makeSureAll" color="#D8AB5A"></radio>
- <text>全选</text>
- </view>
- <view class="anniu">
- <text class="usa">删除</text>
- <text class="usa">复原</text>
- <text @click="selectDown" class="usa">完成</text>
- </view>
- </view>
- <view class="choosebtn">
- <view class="delbtn flex1" @click="examineFail">审核失败</view>
- <view class="restorebtn flex1" @click="examineSuccess">审核成功</view>
- </view>
- </view>
- </u-popup>
- <tabar ></tabar>
- </view>
- </template>
- <script>
- let that
- import tabar from "@/componet/tabbar/tabbar.vue"
- export default {
- components:{
- tabar
- },
- data() {
- return {
- keywords: '',
- state:0,
- show: false,
- editall:false,
- dateshow: false,
- quan:false,
- creatTime: "请选择",
- endTime: "请选择",
- value1: Number(new Date()),
- intime: 1,
- contract_status: '',
- draft_status: '',
- time_status: '',
- listall:[],
- total:'',
- ctrstatus: [{
- title: "合同状态",
- list: [{
- name: "全部",
- },
- {
- name: "待审核",
- },
- {
- name: "成功",
- },
- {
- name: "失败",
- },
- {
- name: "已删除",
- },
- ]
- }],
- billstatus: [{
- title: "汇票状态",
- list: [{
- name: "全部",
- },
- {
- name: "待审核",
- },
- {
- name: "成功",
- },
- {
- name: "失败",
- },
- {
- name: "已删除",
- },
- ]
- }],
- upstauts: [{
- title: "上传日期",
- list: [{
- name: "全部",
- },
- {
- name: "今日",
- },
- {
- name: "昨日",
- },
- ]
- }],
- }
- },
- onLoad() {
- that=this
- this.state = this.$store.state.admin
- this.init()
- },
- methods: {
-
- init() {
- uni.showLoading()
- uni.$u.http.post('/api/Contract/search',{
- pageIndex:1,
- pageSize:10,
- // startTime:'',
- // endTime:'',
- // name:'',
- // contractStatus:0,
- // contractNo:''
- }, {
- custom: {
- auth: true
- }
- }).then((res) => {
- uni.hideLoading()
- this.listall=res.result
- this.total=res.total
- this.listall.forEach(item=>{
- item.checked=false
- })
- }).catch((err) => {
- uni.hideLoading()
- console.log(err)
- })
-
- },
- examineFail(){
- let ids=[]
- that.listall.forEach(item=>{
- if(item.checked){
- ids.push(item.id)
- }
- })
- if(ids.length==0){
- this.$toast("请选择合同")
- return
- }
- uni.showModal({
- title: '提示',
- content: '是否批量审核失败?',
- success: function (res) {
- if (res.confirm) {
-
- uni.showLoading()
- uni.$u.http.post('/api/Contract/manage',
- {
- ids:ids,
- operateType:4
- },
- {
- custom: {
- auth: true
- }
- }).then((res) => {
- uni.hideLoading()
- that.editall=false
- that.quan=false
- that.$toast("操作成功")
- setTimeout(()=>{
-
- that.init()
- },500)
- }).catch((err) => {
- uni.hideLoading()
- that.$toast(err.msg)
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
-
- },
- examineSuccess(){
- let ids=[]
- that.listall.forEach(item=>{
- if(item.checked){
- ids.push(item.id)
- }
- })
- if(ids.length==0){
- that.$toast("请选择合同")
- return
- }
- uni.showModal({
- title: '提示',
- content:"是否批量审核成功?",
- success: function (res) {
- if (res.confirm) {
-
- uni.showLoading()
- uni.$u.http.post('/api/Contract/manage',
- {
- ids:ids,
- operateType:3
- },
- {
- custom: {
- auth: true
- }
- }).then((res) => {
- uni.hideLoading()
- that.editall=false
- that.quan=false
- that.$toast("操作成功")
- setTimeout(()=>{
- that.init()
- },500)
-
- }).catch((err) => {
- uni.hideLoading()
- that.$toast(err.msg)
- })
-
- } else if (res.cancel) {
-
- }
- }
- })
-
- },
- checkBox(id){
- let list=this.listall
- list.forEach(item=>{
- if(item.id==id){
- item.checked=!item.checked
- }
- })
- this.listall = JSON.parse(JSON.stringify(list))
-
- },
- allSelect(){
- let list=this.listall
- if(this.quan){
- list.forEach(item => {
- item.checked =true
- })
- }else{
- list.forEach(item => {
- item.checked =false
- })
- }
- this.listall = JSON.parse(JSON.stringify(list))
- console.log(this.listall)
- },
- addContract(){
- uni.navigateTo({
- url:'/pages/alldeatil/upcontract'
- })
- },
- moveDetail(id){
- uni.navigateTo({
- url:"/pages/alldeatil/contractdetail?id="+id
- })
- },
- makeSureAll(){
- this.quan=!this.quan
- this.allSelect()
- },
- selectDown(){
- this.editall=false
- this.quan=false
- let list=this.listall
- list.forEach(item=>{
- item.checked=false
- })
- },
- closeEidt(){
- this.editall=false
- },
- openEidt(){
- this.editall=true
- },
- chooseDate(e) {
- this.dateshow = false
- const timeFormat = uni.$u.timeFormat
- if (this.intime == 1) {
- this.creatTime = timeFormat(e.value, 'yyyy-mm-dd')
- } else {
- this.endTime = timeFormat(e.value, 'yyyy-mm-dd')
- }
- },
- openDatePicker(e) {
- console.log(e)
- if (e == 1) {
- this.intime = 1
- } else {
- this.intime = 2
- }
- this.dateshow = true
- },
- closeDate() {
- this.dateshow = false
- },
- open() {
- // console.log('open');
- },
- close() {
- this.show = false
- // console.log('close');
- },
- choose(title, k) {
- if (title == "合同状态") {
- this.contract_status = k
- } else if (title == "汇票状态") {
- this.draft_status = k
- } else if (title == "上传日期") {
- this.time_status = k
- }
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F6F6F6 !important;
- }
- .headbgbox {
- background-color: #fff;
- padding: 23rpx 31rpx;
- box-sizing: border-box;
- position: fixed;
- top: 0;
- z-index: 999;
- width: 100%;
- .screen {
- display: flex;
- justify-content: center;
- align-items: center;
- padding-left: 30rpx;
- }
- }
- .searchbox {
- padding-left: 30rpx;
- box-sizing: border-box;
- background-color: #ECECEC;
- border-radius: 38rpx;
- // width: 688rpx;
- flex: 1;
- height: 75rpx;
- margin: 0 auto;
- display: flex;
- align-items: center;
- // justify-content: center;
- // margin-top: -10rpx;
- input{
- width: 240px;
- overflow: hidden;
- text-overflow:ellipsis;
- white-space: nowrap;
- }
- }
- .cardlist {
- display: flex;
- justify-content: center;
- flex-direction: column;
- // align-items: center;
- margin: 0 auto;
- margin-top: 120rpx;
- }
- .lable {
- display: flex;
- margin: 0 auto;
- margin-top: 20rpx;
- .radiobox {
- margin-right: -10rpx;
- margin-left: 30rpx;
- }
- }
- .card {
- flex: 1;
- overflow: hidden;
- margin: 0 30rpx;
- // width: 690rpx;
- // height: 315rpx;
- border-radius: 20rpx;
- background-color: #fff;
- position: relative;
- box-shadow: 0px 8rpx 20rpx 1rpx rgba(31, 36, 42, 0.08);
- .passreview {
- position: absolute;
- right: 30rpx;
- top: 30rpx;
- width: 141rpx;
- height: 123.5rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .contadra{
- font-size: 24rpx;
- color: #BEBDBB;
- padding: 20rpx 0;
- margin: 0 30rpx;
- border-top: 1rpx solid #E8E8E8;
-
- }
- .innerbox {
- padding: 49rpx 0rpx;
- padding-bottom: 30rpx;
- margin: 0 30rpx;
- display: flex;
- align-items: center;
- border-bottom: 1rpx solid #E8E8E8;
-
- .listicon {
- width: 32rpx;
- height: 36rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .cardtitle {
- display: block;
- max-width: 390rpx;
- font-size: 32rpx;
- font-weight: 600;
- padding-left: 10rpx;
- }
- .timebox {
- background-color: #FFF8E5;
- width: 100%;
- padding: 0 30rpx;
- box-sizing: border-box;
- color: #D8AB5A;
- font-size: 28rpx;
- height: 60rpx;
- line-height: 60rpx;
- }
- .contractmsg {
- padding: 30rpx;
- box-sizing: border-box;
- color: #68625B;
- font-size: 26rpx;
- // border-bottom: 1rpx solid #E8E8E8;
- }
- }
- .totalmanage {
- margin-top: 90rpx;
- margin-bottom: 100rpx;
- // position: fixed;
- // bottom: 0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- padding: 0 30rpx;
-
- box-sizing: border-box;
- .managebox {
- width: 23.8rpx;
- height: 29.7rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .maboxtitls {
- width: 160rpx;
- height: 60rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 30rpx;
- background-color: #D9D9D9;
- // line-height: 60rpx;
- font-size: 28rpx;
- box-sizing: border-box;
- // align-items: center;
- }
- }
-
-
- </style>
|