Browse Source

全部完成+样式修改

sunChengjie 1 year ago
parent
commit
b4a7f02f05
3 changed files with 37 additions and 45 deletions
  1. 26 38
      src/pages/express.vue
  2. 8 4
      src/pages/inexpress.vue
  3. 3 3
      src/pages/logisticslist.vue

+ 26 - 38
src/pages/express.vue

@@ -17,16 +17,10 @@
 					<div class="jjaddress">
 						<p>寄</p>
 						<div>
-							<div style="display: flex; justify-content: space-between;">
-								<p style="font-size: 14px;">姓名 </p>
-								<span style="margin-left: 70px;">{{
-			SendInfoValue.address }}</span>
-							</div>
-							<div style="display: flex; justify-content: space-between;">
-								<p style="font-size: 14px; margin: 0">手机号 <span style="margin-left: 70px;">{{
-			SendInfoValue.phone }}</span></p>
-							</div>
-
+							<van-field readonly v-model="SendInfoValue.address" label="姓名" name="pattern"
+								placeholder="请输入正确的手机号" />
+							<van-field v-model="SendInfoValue.phone" label="手机号" name="pattern"
+								placeholder="请输入正确的手机号" />
 						</div>
 					</div>
 					<!-- <div class="dzb" @click="link(1)">
@@ -38,13 +32,10 @@
 					<div class="jjaddress">
 						<p style="background: #fa9c22;">收</p>
 						<div>
-							<div style="display: flex; justify-content: space-between;">
-								<p style="font-size: 14px;">姓名 </p>
-								<span style="margin-left: 70px;">{{
-			transmitMessageVlaue.addresseeName }}</span>
-							</div>
-							<van-field v-model="elvenPhone" label="手机号" name="pattern" placeholder="请输入正确的手机号"
-								:rules="[{ pattern, message: '请输入正确的手机号' }]" />
+							<van-field v-model="transmitMessageVlaue.addresseeName" name="" label="姓名"
+								placeholder="用户名" />
+							<van-field v-model="transmitMessageVlaue.addresseePhone" label="手机号" name="pattern"
+								placeholder="请输入正确的手机号" />
 						</div>
 					</div>
 					<div class="dzb" @click="link(2)">
@@ -268,25 +259,10 @@ export default {
 		// }
 		this.mailRoomId = localStorage.getItem("roomId")
 
-		//寄件地址
-		if (JSON.stringify(this.$store.state.jjInfo) != '{}') {
-			this.jjname = this.$store.state.jjInfo.jjname
-			this.jjadd = this.$store.state.jjInfo.jjadd
-			this.jjInfo = this.$store.state.jjInfo
-		} else {
-			//获取默认地址
-			this.getDefaultAddress()
-		}
 
-		//收件地址
-		if (JSON.stringify(this.$store.state.sjInfo) != '{}') {
-			this.sjname = this.$store.state.sjInfo.sjname
-			this.sjadd = this.$store.state.sjInfo.sjadd
-			this.sjInfo = this.$store.state.sjInfo
-		}
+
 		this.getLogisticsList()
-		//获取成本中心
-		this.getCostCenterList()
+
 	},
 	async mounted() {
 		this.SendInfoValue = await getSendInfo({ userId: localStorage.getItem("userId") })
@@ -543,12 +519,22 @@ export default {
 
 
 
-			if (this.elvenPhone == '' || this.elvenPhone == undefined) {
+			if (this.SendInfoValue.phone == '' || this.SendInfoValue.phone == undefined) {
+				Toast('寄件人手机号不能为空')
+				return
+			}
+
+			if (this.transmitMessageVlaue.addresseeName == '' || this.transmitMessageVlaue.addresseeName == undefined) {
+				Toast('收件人姓名不能为空')
+				return
+			}
+
+			if (this.transmitMessageVlaue.addresseePhone == '' || this.transmitMessageVlaue.addresseePhone == undefined) {
 				Toast('手机号码不能为空')
 				return
 			}
 
-			if (!this.pattern.test(this.elvenPhone)) {
+			if (!this.pattern.test(this.transmitMessageVlaue.addresseePhone)) {
 				Toast('手机号码不正确')
 				return
 			}
@@ -619,14 +605,16 @@ export default {
 				expressRemark: this.bz,//快递备注
 				expressWeight: this.stepper,//公斤
 				expressPrice: this.declaredValue,//价值
-				phone: this.elvenPhone,//收件人手机号
+				phone: this.SendInfoValue.phone,//寄件人手机号
+				addresseeName: this.transmitMessageVlaue.addresseeName,//
+				addresseePhone: this.transmitMessageVlaue.addresseePhone,//收件人手机号
 			}
 			const res = await saveMailDo({ ...parmas })
 			if (res.msg == 'success') {
 				Toast('寄件成功')
+				this.$router.push('/')
 			}
 			Toast.clear()
-			console.log(res)
 		}
 	},
 

+ 8 - 4
src/pages/inexpress.vue

@@ -197,9 +197,9 @@
 
 				<van-cell-group class="vanPopup" @click="onGroup(item)" v-for="(item, index) in searchNameList"
 					:key="index" inset>
-					<van-cell title="收件人姓名" :value="item.name" />
-					<van-cell title="部门" :value="item.departmentName" />
-					<van-cell title="座位" :value="item.seatNo" />
+					<van-cell :value="item.name" />
+					<van-cell :value="item.departmentName" />
+					<van-cell :value="item.seatNo" />
 					<van-cell title="收件人userID" :value="item.userId" style="display: none;" />
 					<!-- <div style="height: 1px; color: #1f1f1f; width: 100%; background-color: #ccc;"></div> -->
 				</van-cell-group>
@@ -670,13 +670,17 @@ export default {
 <style scoped lang="less">
 .vanPopup {
 
-	border-bottom: 1px solid #ccc;
+	border-bottom: 1px solid #eaeaea;
 	padding: 12px 0;
 	border-radius: 0px;
 
 	.van-cell {
 		padding: 0;
 	}
+
+	.van-cell::after {
+		border: none;
+	}
 }
 
 .content {

+ 3 - 3
src/pages/logisticslist.vue

@@ -45,7 +45,7 @@
 
 						</div>
 					</div>
-					<!-- <template v-if="!refreshLoading && expressList.length > 0">
+					<template v-if="!refreshLoading && mailList.length > 0">
 						<div class="bottom_text" v-if="loading">
 							加载中...
 						</div>
@@ -53,9 +53,9 @@
 							已经到底啦...
 						</div>
 					</template>
-					<template v-if="expressList.length === 0">
+					<template v-if="mailList.length === 0">
 						<div class="bottom_text">数据为空!</div>
-					</template> -->
+					</template>
 				</van-pull-refresh>
 			</div>
 		</div>