From 0e9b58dea98030029d30e86a0460323c8e56b1ec Mon Sep 17 00:00:00 2001 From: 346149741 <346149741@qq.com> Date: 星期二, 03 九月 2024 14:03:00 +0800 Subject: [PATCH] 新增临时企业 --- policy/policyApply/perPicker.vue | 128 +++++++++++++++++++++++++++++++++++------- 1 files changed, 107 insertions(+), 21 deletions(-) diff --git a/policy/policyApply/perPicker.vue b/policy/policyApply/perPicker.vue index 1aea242..ad96f1c 100644 --- a/policy/policyApply/perPicker.vue +++ b/policy/policyApply/perPicker.vue @@ -1,20 +1,47 @@ <template> - <u-popup mode="bottm" :show="show" :safeAreaInsetBottom="false"> - <view class="picker-view-box"> - <view class="options"> - <view class="button" @click="cancel" size="mini">鍙栨秷</view> - <view class="button entery" @click="entery" color="#1171E0" size="mini">纭畾</view> + <view> + <u-popup mode="bottm" :show="show" :safeAreaInsetBottom="false"> + <view class="picker-view-box"> + <view class="options"> + <view class="button" @click="cancel" size="mini">鍙栨秷</view> + <view class="button entery" @click="add" color="#1171E0" size="mini">鏂板浼佷笟</view> + </view> + <view class="set-flex"> + <u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search> + <text @click="entery">纭畾</text> + </view> + <view> + <picker-view immediate-change :value="value" @change="bindChange" class="picker-view"> + <picker-view-column> + <view class="text-center" v-for="(item,index) in columns" :key="index">{{item[keyName]}}</view> + </picker-view-column> + </picker-view> + </view> </view> - <u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search> - <view> - <picker-view immediate-change :value="value" @change="bindChange" class="picker-view"> - <picker-view-column> - <view class="text-center" v-for="(item,index) in columns" :key="index">{{item[keyName]}}</view> - </picker-view-column> - </picker-view> + </u-popup> + <u-popup mode="bottm" :show="showadd" :safeAreaInsetBottom="false"> + <view class="picker-view-box"> + <view class="head"> + 鏂板涓存椂浼佷笟 + </view> + <view style="margin: 20rpx 0;"> + <u-input v-model="name" placeholder="璇疯緭鍏ヤ紒涓氬悕绉�" type="text" /> + </view> + <view class="bz"> + 澶囨敞锛氬浼佷笟鎼滅储鏃犵粨鏋滄垨浼佷笟鏃犱簩缁寸爜锛屽垯璇ヤ紒涓氭湭鍦ㄥ钩鍙板唴杩涜娉ㄥ唽锛屽彲鐐瑰嚮鈥滄柊澧炩�濊緭鍏ヨ浼佷笟鍚嶇О鏂板涓存椂浼佷笟锛屾柊澧炵殑浼佷笟鍙渶瑕佹彁浜ょ敵璇�-瀹℃壒閫氳繃鍚庡嵆鍙~鎶ユ墽娉曠粨鏋滐紝鏃犻渶鎵紒涓氫簩缁寸爜銆傚浼佷笟宸叉湁浜岀淮鐮侊紝璇疯繑鍥炴悳绱㈤〉鎼滅储骞堕�夋嫨璇ヤ紒涓氾紝涓嶈鏂板涓存椂浼佷笟銆� + </view> + <view class="down-button"> + <view> + <u-button shape="circle" @click="close">鍙栨秷</u-button> + </view> + <view> + <u-button shape="circle" color="#1171E0" @click="addContent">纭畾</u-button> + </view> + </view> </view> - </view> - </u-popup> + + </u-popup> + </view> </template> <script> @@ -32,7 +59,9 @@ show: false, companyName: "", index: 0, - value: [] + value: [], + showadd:false, + name:'' } }, mounted() { @@ -53,14 +82,15 @@ this.index = e.detail.value[0] }, companyList() { - companyList({companyName: this.companyName}).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 +102,35 @@ const info = this.columns[this.index] this.$emit('confirm', info) this.show = false + }, + close(){ + this.show = true + this.showadd = false + }, + add() { + this.show = false + this.showadd = true + // await this.companyList() + // // console.log(this.columns.length) + // if(this.columns.length) { + + // } else { + // this.$emit('setCompany', this.companyName) + // this.show = false + // } + }, + addContent() { + if(this.name==''){ + uni.showToast({ + title: '璇疯緭鍏ヤ紒涓氬悕绉�', + icon: 'none', + duration: 3000 + }) + return + } + this.$emit('setCompany', this.name) + this.show = false + this.showadd = false } } @@ -115,4 +174,31 @@ 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; + } + } + .bz{ + font-size: 24rpx; + color: #999; + } + .down-button{ + margin-top: 60rpx; + display: flex; + justify-content: space-between; + align-items: center; + &>view{ + width: 45%; + } + } </style> \ No newline at end of file -- Gitblit v1.9.1