cmy 3 månader sedan
förälder
incheckning
9056a9648b
3 ändrade filer med 132 tillägg och 54 borttagningar
  1. 129 52
      pages/applic/contribution.vue
  2. 1 1
      pages/index/index.vue
  3. 2 1
      pages/index/loveList.vue

+ 129 - 52
pages/applic/contribution.vue

@@ -10,7 +10,7 @@
 				</view>
 				</view>
 				<view class="box-right">
 				<view class="box-right">
 					<picker :value="index" @change="PickerDire" :range="chooseDire" class="box-right" @click="addType">
 					<picker :value="index" @change="PickerDire" :range="chooseDire" class="box-right" @click="addType">
-						<text>{{ intention || '请选择捐款意向'}}</text>
+						<text class="f24">{{ intention || '请选择捐款意向'}}</text>
 					</picker>
 					</picker>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -20,7 +20,7 @@
 				</view>
 				</view>
 				<picker @change="PickerType" :value="index" :range="chooseType" class="box-right">
 				<picker @change="PickerType" :value="index" :range="chooseType" class="box-right">
 					<view class="box-right">
 					<view class="box-right">
-						<text>{{ way || '请选择捐款方式'}}</text>
+						<text class="f24">{{ way || '请选择捐款方式'}}</text>
 					</view>
 					</view>
 				</picker>
 				</picker>
 			</view>
 			</view>
@@ -39,40 +39,40 @@
 					<view class="box-left">
 					<view class="box-left">
 						<text class="imp">*</text>捐款金额
 						<text class="imp">*</text>捐款金额
 					</view>
 					</view>
-					<view class="box-right" style="text-align: right;">
+					<view class="box-right f24" style="text-align: right;">
 						<!-- <input type="text" placeholder="请选择金额" v-model="money" disabled /> -->
 						<!-- <input type="text" placeholder="请选择金额" v-model="money" disabled /> -->
 						{{money|| '请选择金额'}}
 						{{money|| '请选择金额'}}
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="box-bottom">
+				<!-- <view class="box-bottom">
 					个人满500,单位满2000可打印纸质证书
 					个人满500,单位满2000可打印纸质证书
-				</view>
+				</view> -->
 			</view>
 			</view>
 
 
 		</view>
 		</view>
 		<!-- <view class="infoOptional">
 		<!-- <view class="infoOptional">
 			信息(选填)
 			信息(选填)
 		</view> -->
 		</view> -->
-		<view class="box" v-if="public">
+		<view class="box">
 			<view class="box-item">
 			<view class="box-item">
 				<view class="box-left">
 				<view class="box-left">
 					<view v-if="!is_show">
 					<view v-if="!is_show">
-						<text class="imp">*</text>姓名
+						<text class="imp">*</text>捐赠方
 					</view>
 					</view>
 					<view v-else>
 					<view v-else>
-						<text class="imp">*</text>单位
+						<text class="imp">*</text>捐赠方
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="box-right">
 				<view class="box-right">
-					<input type="text" placeholder="请真实填写" v-model="donate_er" />
+					<input type="text" class="f24" placeholder="请真实填写" v-model="donate_er" />
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="box-item">
 			<view class="box-item">
 				<view class="box-left">
 				<view class="box-left">
-					<text class="imp">*</text>手机号
+					<text class="imp">*</text>联系电话
 				</view>
 				</view>
 				<view class="box-right">
 				<view class="box-right">
-					<input type="text" placeholder="请填写手机号" v-model="mobile" />
+					<input type="text" class="f24" placeholder="请填写联系电话" v-model="mobile" />
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -85,27 +85,63 @@
 				<switch :checked="public" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch1Change" />
 				<switch :checked="public" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch1Change" />
 			</view>
 			</view>
 		</view>
 		</view>
-
-		<view class="switch-box">
-			<view class="switch-left">
-				寄发票
+		<view class="box">
+			<view class="box-item">
+				<view class="box-left">
+					所属街道
+				</view>
+				<view class="box-right">
+					<input type="text" class="f24" placeholder="请输入所属街道" v-model="address" />
+				</view>
 			</view>
 			</view>
-			<view class="switch-right">
-				<switch :checked="receipts" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch2Change" />
+			<!-- <view class="box-item" v-if="intention.indexOf('千万人帮万家') != -1">
+				<view class="box-left">
+					<text class="imp">*</text>
+					所属街道
+				</view>
+				<view class="box-right">
+					<input type="text" placeholder="请输入所属街道" v-model="address" />
+				</view>
+			</view> -->
+			<view class="tipss">
+				<view class="box-item tips">
+					<view class="box-left">
+						身份证号码
+					</view>
+					<view class="box-right">
+						<input type="idcard" class="f24" placeholder="请输入身份证号码" v-model="id_card" />
+					</view>
+				</view>
+				<view class="tip">
+					如需为该笔捐款申请税收抵扣,请务必填写此项
+				</view>
+			</view>
+			<view class="tipss">
+				<view class="box-item tips">
+					<view class="box-left">
+						企业社会信用代码
+					</view>
+					<view class="box-right">
+						<input type="text" class="f24" placeholder="请输入企业社会信用代码" v-model="uscc" />
+					</view>
+				</view>
+				<view class="tip">
+					企业捐款必须填写此项
+				</view>
 			</view>
 			</view>
 
 
-		</view>
-
-		<view class="box">
 			<view class="box-item">
 			<view class="box-item">
 				<view class="box-left">
 				<view class="box-left">
-					联系地址
+					电子邮箱
 				</view>
 				</view>
 				<view class="box-right">
 				<view class="box-right">
-					<input type="text" placeholder="请输入联系地址" v-model="address" />
+					<input type="text" class="f24" placeholder="请输入电子邮箱" v-model="email" />
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<view class="tipp">
+			电子邮箱用于接收捐赠收据。由于收据均为电子收据,如无法填写电子邮箱,请务必在捐赠当月致电区红十字会索取票据,电话:22187588
+		</view>
 		<view class="submit" @click="confirm()">
 		<view class="submit" @click="confirm()">
 			立即提交
 			立即提交
 		</view>
 		</view>
@@ -122,7 +158,7 @@
 				</view>
 				</view>
 				<view class="money-btn">
 				<view class="money-btn">
 					<view class="btn" v-for="item in moneyList" :key="item.id">
 					<view class="btn" v-for="item in moneyList" :key="item.id">
-						<button type="default" @click="addmoney(item)">{{ item.money}}</button>
+						<button type="default" class="f24" @click="addmoney(item)">{{ item.money}}</button>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="pop-main">
 				<view class="pop-main">
@@ -203,6 +239,10 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				email: '', //邮箱
+				id_card: '', //身份证号
+				uscc: '', //企业代码
+				street: '', //街道
 				index: 0,
 				index: 0,
 				intention: '', // 捐款意向
 				intention: '', // 捐款意向
 				category_id: '', // 捐款意向ID
 				category_id: '', // 捐款意向ID
@@ -244,7 +284,7 @@
 				// chooseDire: ['请选择捐款意向','红十字人道事业(非定向捐赠)','疫情防控','其他','红十字博爱送万家','AED救护及科普','青少年生命安全教育基地建设项目','关注重度失能老人项目','青少年白血病救护项目','地芯行动-关爱地中海贫血儿童','会费缴纳'],
 				// chooseDire: ['请选择捐款意向','红十字人道事业(非定向捐赠)','疫情防控','其他','红十字博爱送万家','AED救护及科普','青少年生命安全教育基地建设项目','关注重度失能老人项目','青少年白血病救护项目','地芯行动-关爱地中海贫血儿童','会费缴纳'],
 				chooseDire: [],
 				chooseDire: [],
 				chooseList: [], //捐款意向真实列表
 				chooseList: [], //捐款意向真实列表
-				chooseType: ['个人', '单位'],
+				chooseType: ['个人', '企业'],
 				chooseMoney: ['5元', '10元', '50元', '其他金额'],
 				chooseMoney: ['5元', '10元', '50元', '其他金额'],
 				payLoding: false, //判断是否支付中
 				payLoding: false, //判断是否支付中
 				froms: '', //保存h5中数据来源对象
 				froms: '', //保存h5中数据来源对象
@@ -384,6 +424,7 @@
 			//是都寄发票
 			//是都寄发票
 			switch2Change(e) {
 			switch2Change(e) {
 				this.is_receipts = e.detail.value
 				this.is_receipts = e.detail.value
+				console.log(e.detail.value, 'e.detail.value');
 				if (e.detail.value) {
 				if (e.detail.value) {
 					this.is_receipts = '0'
 					this.is_receipts = '0'
 				} else {
 				} else {
@@ -402,37 +443,44 @@
 					this.$api.msg('请输入捐款金额!');
 					this.$api.msg('请输入捐款金额!');
 					return;
 					return;
 				}
 				}
-				if (obj.public) {
-					if (this.is_show) {
-						if (!obj.donate_er) {
-							this.$api.msg('请填写您的姓名');
-							return;
-						}
-					} else {
-						if (!obj.donate_er) {
-							this.$api.msg('请填写您的单位');
-							return;
-						}
-					}
-
-					const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
-					if (!reg.test(obj.mobile)) {
-						obj.$api.msg('请填写正确的手机号码');
+				// if (obj.public) {
+				if (this.is_show) {
+					if (!obj.donate_er) {
+						this.$api.msg('请填写您的姓名');
 						return;
 						return;
 					}
 					}
-				}
-
-				if (this.is_receipts == '0') {
-					// obj.address = '用户未填写联系地址'
-					if (!obj.address) {
-						this.$api.msg('请输入联系地址');
+				} else {
+					if (!obj.donate_er) {
+						this.$api.msg('请填写您的企业');
 						return;
 						return;
 					}
 					}
 				}
 				}
 
 
-				if (!obj.address) {
-					obj.address = '用户未填写联系地址'
+				const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
+				if (!reg.test(obj.mobile)) {
+					obj.$api.msg('请填写正确的手机号码');
+					return;
 				}
 				}
+				// }
+
+				// if (this.is_receipts == '0') {
+				// 	// obj.address = '用户未填写联系地址'
+				// 	// if (!obj.address) {
+				// 	// 	this.$api.msg('请输入联系地址');
+				// 	// 	return;
+				// 	// }
+				// 	if(this.type == 0 && !this.id_card) {
+				// 		return this.$api.msg('请输入身份证号');
+				// 	}
+				// 	if(this.type == 1 && !this.uscc) {
+				// 		return this.$api.msg('请输入企业社会信用代码');
+				// 	}
+				// }
+
+				// if (!obj.address) {
+				// 	// obj.address = '用户未填写联系地址'
+				// 	return this.$api.msg('请输入所属街道');
+				// }
 				if (!obj.isHelp) {
 				if (!obj.isHelp) {
 					if (!obj.intention) {
 					if (!obj.intention) {
 						this.$api.msg('请选择捐款意向');
 						this.$api.msg('请选择捐款意向');
@@ -440,14 +488,17 @@
 					}
 					}
 				}
 				}
 				let updata = {
 				let updata = {
+					uscc: obj.uscc,
+					id_card: obj.id_card,
+					email: obj.email,
 					// category_id: obj.category_id, //捐款意向id
 					// category_id: obj.category_id, //捐款意向id
 					amount: obj.money, //捐款金额
 					amount: obj.money, //捐款金额
 					name: obj.donate_er, //捐款人/单位
 					name: obj.donate_er, //捐款人/单位
 					// contact: obj, //单位联系人(企业有效)
 					// contact: obj, //单位联系人(企业有效)
 					tel: obj.mobile, //手机号
 					tel: obj.mobile, //手机号
 					address: obj.address, //联系地址
 					address: obj.address, //联系地址
-					is_open: obj.public?1:0, //是否实名公开
-					is_ticket: obj.is_receipts == 0 ? 1: 0, //是否开发票
+					is_open: obj.public ? 1 : 0, //是否实名公开
+					is_ticket: obj.is_receipts == 0 ? 1 : 0, //是否开发票
 					pay_type: 0, //支付方式0微信1支付宝
 					pay_type: 0, //支付方式0微信1支付宝
 					type: obj.way_id,
 					type: obj.way_id,
 				}
 				}
@@ -550,7 +601,7 @@
 			display: flex;
 			display: flex;
 
 
 			.box-left {
 			.box-left {
-				width: 200rpx;
+				width: 250rpx;
 				flex-shrink: 0;
 				flex-shrink: 0;
 				// flex: 0;
 				// flex: 0;
 			}
 			}
@@ -577,7 +628,7 @@
 		}
 		}
 
 
 		.box-left {
 		.box-left {
-			width: 200rpx;
+			width: 250rpx;
 			flex-shrink: 0;
 			flex-shrink: 0;
 
 
 			// flex: 0;
 			// flex: 0;
@@ -788,4 +839,30 @@
 			}
 			}
 		}
 		}
 	}
 	}
+
+	.f24 {
+		font-size: 28rpx;
+	}
+
+	.tipss {
+		background-color: #fff;
+		border-bottom: 2rpx solid #F2F2F2;
+
+		.tips {
+			border-bottom: none !important;
+			padding-bottom: 0;
+
+		}
+
+		.tip {
+			padding: 10rpx 0 20rpx 24rpx;
+			font-size: 24rpx;
+			color: #999999;
+		}
+	}
+	.tipp {
+		padding: 20rpx;
+		font-size: 24rpx;
+		color: #999;
+	}
 </style>
 </style>

+ 1 - 1
pages/index/index.vue

@@ -38,7 +38,7 @@
 						{{item.paytime | getTime}}
 						{{item.paytime | getTime}}
 					</view>
 					</view>
 					<view class="tit clamp" style="width: 30%;">
 					<view class="tit clamp" style="width: 30%;">
-						{{item.name}}
+						{{item.is_open == '1'? item.name: '爱心人士'}}
 					</view>
 					</view>
 					<view class="tit clamp" style="width: 20%;">
 					<view class="tit clamp" style="width: 20%;">
 						{{item.amount*1}}
 						{{item.amount*1}}

+ 2 - 1
pages/index/loveList.vue

@@ -26,7 +26,8 @@
 						{{item.paytime | getTime}}
 						{{item.paytime | getTime}}
 					</view>
 					</view>
 					<view class="tit clamp" style="width: 30%;">
 					<view class="tit clamp" style="width: 30%;">
-						{{item.name}}
+						<!-- {{item.name}} -->
+						{{item.is_open == '1'? item.name: '爱心人士'}}
 					</view>
 					</view>
 					<view class="tit clamp" style="width: 20%;">
 					<view class="tit clamp" style="width: 20%;">
 						{{item.amount*1}}
 						{{item.amount*1}}