sunChengjie hai 1 ano
pai
achega
80e1313ed8
Modificáronse 1 ficheiros con 16 adicións e 14 borrados
  1. 16 14
      src/pages/express.vue

+ 16 - 14
src/pages/express.vue

@@ -52,7 +52,11 @@
 			<van-field readonly clickable name="picker" :value="expressInfoShow" label="快递公司" placeholder="请选择快递公司"
 				@click="showPicker = true" />
 			<van-popup v-model="showPicker" position="bottom">
-				<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
+				<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false">
+					<template v-slot:option="slotProps">
+						{{ slotProps.expressCompany }}
+					</template>
+				</van-picker>
 			</van-popup>
 		</div>
 
@@ -100,7 +104,8 @@
 						<p>声明价值</p>
 						<p style="display: flex;justify-content: center;"><input
 								style="width: 1rem;border: none;text-align: center;" v-model="declaredValue"
-								type="number" />元</p>
+								type="number" />元
+						</p>
 					</div>
 				</div>
 
@@ -273,9 +278,12 @@ export default {
 			const res = await geLogisticsList({ page: 1, limit: 30 })
 			console.log(res, '+==============res')
 			this.columns = res.data.map((item) => {
-				return item.id
+				return {
+					id: item.id,
+					expressCompany: item.expressCompany
+				}
 			})
-			console.log(this.columns, 'this.columns')
+			console.log(this.columns, 'this.columns+=================')
 		},
 
 		wxScanCode(type) {
@@ -339,15 +347,9 @@ export default {
 		// 选择快递公司
 		onConfirm(e) {
 			console.log(e, '=============')
-			this.expressInfoShow = e
-			this.expressInfo = e
-			// this.expressPhone = e.phone
+			this.expressInfoShow = e.expressCompany
+			this.expressInfo = e.id
 			this.showPicker = false
-			// if (this.expressInfo == 1) {
-			// 	this.wayShow = true
-			// } else {
-			// 	this.wayShow = false
-			// }
 		},
 
 		// 选择成本中心
@@ -616,8 +618,8 @@ export default {
 			}
 			let parmas = {
 				expressInfo: this.expressInfo,//快递公司1-顺丰
-				// userAddressId: this.transmitMessageVlaue.id,
-				userAddressId: 'ede4f065286a406dbb82064ec7524b4e',
+				userAddressId: this.transmitMessageVlaue.id,
+				// userAddressId: 'ede4f065286a406dbb82064ec7524b4e',
 				expressType: wptypeValue,//快件类型 1-文件 2-物品
 				expressNum: this.stepper, //快递数量
 				payInfo: pricetypeValue,//付费信息 1-到付 2-自付 3-月付