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/policyApply.vue |    5 ++
 policy/policyApply/perPicker.vue   |  108 +++++++++++++++++++++++++++++++++++++++++------------
 2 files changed, 88 insertions(+), 25 deletions(-)

diff --git a/policy/policyApply/perPicker.vue b/policy/policyApply/perPicker.vue
index 3cac8aa..ad96f1c 100644
--- a/policy/policyApply/perPicker.vue
+++ b/policy/policyApply/perPicker.vue
@@ -1,23 +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>
-			<view class="set-flex">
-				<u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search>
-				<text @click="addContent">鏂板</text>
+		</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>
-				<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-popup>
+			
+		</u-popup>
+	</view>
 </template>
 
 <script>
@@ -35,7 +59,9 @@
 				show: false,
 				companyName: "",
 				index: 0,
-				value: []
+				value: [],
+				showadd:false,
+				name:''
 			}
 		},
 		mounted() {
@@ -77,15 +103,34 @@
 				this.$emit('confirm', info)
 				this.show = false
 			},
-			async addContent() {
-				await this.companyList()
-				// console.log(this.columns.length)
-				if(this.columns.length) {
+			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
+				// } 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
 			}
 			
 		}
@@ -143,4 +188,17 @@
 				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
diff --git a/policy/policyApply/policyApply.vue b/policy/policyApply/policyApply.vue
index 7d8193d..7358cad 100644
--- a/policy/policyApply/policyApply.vue
+++ b/policy/policyApply/policyApply.vue
@@ -315,6 +315,11 @@
 			},
 			setCompany(e) {
 				this.form.companyName = e
+				this.form.companyCode = ''
+				this.form.companyId	 = ''	
+				this.form.companyPhone = ''
+				this.form.companyUser = ''
+				this.form.companyAddress = ''
 			},
 			confirmTime(e) {
 				this.form.planTime = e.year + '-' + e.month+ '-' + + e.day + ' ' + e.hour + ":" + "00:00"

--
Gitblit v1.9.1