From 2ffea51205b7eb94cf3fb7221aede7ff66669fc1 Mon Sep 17 00:00:00 2001 From: wjt <1797368093@qq.com> Date: 星期一, 29 七月 2024 15:59:04 +0800 Subject: [PATCH] 新需求修改 --- policy/policyApply/perPicker.vue | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 deletions(-) diff --git a/policy/policyApply/perPicker.vue b/policy/policyApply/perPicker.vue index c84fd10..3cac8aa 100644 --- a/policy/policyApply/perPicker.vue +++ b/policy/policyApply/perPicker.vue @@ -5,7 +5,10 @@ <view class="button" @click="cancel" size="mini">鍙栨秷</view> <view class="button entery" @click="entery" color="#1171E0" size="mini">纭畾</view> </view> - <u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search> + <view class="set-flex"> + <u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search> + <text @click="addContent">鏂板</text> + </view> <view> <picker-view immediate-change :value="value" @change="bindChange" class="picker-view"> <picker-view-column> @@ -53,14 +56,15 @@ this.index = e.detail.value[0] }, companyList() { - companyList({companyName: this.companyName, companyStatus: 0, checkStatus: 2}).then(val => { + return companyList({companyName: this.companyName, companyStatus: 0, checkStatus: 2}).then(val => { if(val.data.code == 200){ if(!val.data.rows.length || !val.data.rows){ - uni.showToast({ - title: '娌℃湁绗﹀悎鐨勬暟鎹紝璇锋鏌ヨ緭鍏ョ殑鎵ф硶瀵硅薄', - icon: 'none', - duration: 3000 - }) + // uni.showToast({ + // title: '娌℃湁绗﹀悎鐨勬暟鎹紝璇锋鏌ヨ緭鍏ョ殑鎵ф硶瀵硅薄', + // icon: 'none', + // duration: 3000 + // }) + this.columns = val.data.rows || [] } else { this.columns = val.data.rows } @@ -72,6 +76,16 @@ const info = this.columns[this.index] this.$emit('confirm', info) this.show = false + }, + async addContent() { + await this.companyList() + // console.log(this.columns.length) + if(this.columns.length) { + + } else { + this.$emit('setCompany', this.companyName) + this.show = false + } } } @@ -115,4 +129,18 @@ height: 500rpx; margin-top: 20rpx; } + .set-flex{ + display: flex; + justify-content: flex-start; + align-items: center; + text{ + display: inline-block; + background-color: $main-color; + color: white; + border-radius: 5px; + padding: 5px 15px; + margin-left: 20rpx; + font-size: 24rpx; + } + } </style> \ No newline at end of file -- Gitblit v1.9.1