sunChengjie 11 mēneši atpakaļ
vecāks
revīzija
1c027aff78

+ 9 - 6
src/api/index.js

@@ -58,21 +58,23 @@ export function getListByUser(data) {
 }
 
 // 我的寄件-外部件-详情
-export function findWithoutInfoById(data) {
+export function findWithoutInfoById(data, config) {
     return request({
         url: '/tianzong/client/without/findWithoutInfoById',
         method: 'post',
         data: data,
-        emulateJSON: true
+        emulateJSON: true,
+        ...config
     })
 }
 // 我的寄件-内部件-详情
-export function findInsideInfoById(data) {
+export function findInsideInfoById(data, config) {
     return request({
         url: '/tianzong/client/inside/findInsideInfoById',
         method: 'post',
         data: data,
-        emulateJSON: true
+        emulateJSON: true,
+        ...config
     })
 }
 
@@ -87,12 +89,13 @@ export function getExpressByUser(data) {
 }
 
 // 我的收件-详情
-export function getExpressById(data) {
+export function getExpressById(data, config) {
     return request({
         url: '/tianzong/client/inside/getExpressById',
         method: 'post',
         data: data,
-        emulateJSON: true
+        emulateJSON: true,
+        ...config
     })
 }
 

+ 35 - 54
src/pages/express.vue

@@ -45,6 +45,7 @@
 								</div>
 								<div class="address_text" v-else>{{ transmitMessageVlaue.addresseeProvince }}{{
 									transmitMessageVlaue.addresseeCity }}{{ transmitMessageVlaue.addresseeCounty }}{{
+										transmitMessageVlaue.addresseeTown }}{{
 										transmitMessageVlaue.addresseeAddrInfo }}
 								</div>
 							</div>
@@ -167,7 +168,6 @@
 			</div>
 
 			<div class="adderMessage">
-				<p style="font-size: 16px;text-align: center;margin-bottom: 16px;">{{ title }}</p>
 				<van-form @submit="onSubmit">
 					<van-field v-model="discern.name" name="姓名" label="姓名" placeholder="自动填充"
 						:rules="[{ required: false }]" />
@@ -194,11 +194,7 @@
 			<van-picker title="付款方式" show-toolbar :columns="pricelist" @confirm="onConfirm2"
 				@cancel="priceshow = false" />
 		</van-popup>
-		<!-- 弹窗地址类型类型 -->
-		<van-popup v-model="addressshow" position="bottom">
-			<van-picker title="邮购类型" show-toolbar :columns="addlist" @confirm="onConfirm8"
-				@cancel="addressshow = false" />
-		</van-popup>
+
 
 		<!-- 打印机选择器 -->
 		<van-popup v-model="printerShow" position="bottom">
@@ -215,13 +211,11 @@
 import areaList from "@/script/areas.js"
 import { Toast } from 'vant';
 import { saveMailDo, getSendInfo, geLogisticsList, getListOfPrinters, } from '../api/index'
-import { spiltAddress, editUserAddressInfoById } from '../api/addressBoook'
+import { spiltAddress } from '../api/addressBoook'
 export default {
 
 	data() {
 		return {
-			qweqwe: '',
-			titlename: "寄件",
 			wptype: "物品",//物品类型
 			addresstype: "顾客邮购",//地址类型
 			youGouType: "",//邮购类型
@@ -235,8 +229,6 @@ export default {
 			max: '',//最大数
 			priceshow: false,//付款类型弹窗显示
 			pricelist: ["到付", "自费(个人件)", "月结(公司件)",],
-			index: "",
-			title: "",
 			check: false,//契约条款
 			bz: '',//快递备注
 			showPicker: false,//快递
@@ -251,9 +243,7 @@ export default {
 			waybillNo: '',//运单号
 			wayShow: true,
 			accountType: '',//账号类型
-			showPicker9: false,
 			costCenterList: [],//成本中心列表
-			costCenterInfoShow: "",
 			costCenterName: "",//成本中心展示
 			costCenterId: "",//成本中心展示
 			elvenPhone: '',//收件人输入的手机号
@@ -277,6 +267,7 @@ export default {
 				proDisTown: '',
 			},//识别后的信息
 			disabled: false,//确定按钮的使用
+			isAddressIdTransfer: false,//是否传送地址铺的Id
 		}
 	},
 	created: function () {
@@ -290,8 +281,10 @@ export default {
 		} else {
 			this.SendInfoValue = res
 		}
-
-		console.log(this.SendInfoValue, 'this.SendInfoValue')
+		// 当从地址铺回来时将this.isAddressIdTransfer状态改变
+		if (this.transmitMessageVlaue.isAddressIdTransfer) {
+			this.isAddressIdTransfer = this.transmitMessageVlaue.isAddressIdTransfer
+		}
 	},
 	methods: {
 		// 运单号扫描
@@ -422,21 +415,21 @@ export default {
 			this.transmitMessageVlaue.addresseeName = this.discern.name
 			this.transmitMessageVlaue.addresseePhone = this.discern.phone
 
-			this.discern = {
-				name: '',
-				phone: '',
-				province: '',
-				city: '',
-				district: '',
-				town: '',
-				address: '',
-				proDisTown: '',
-			}
+			this.isAddressIdTransfer = false,//修改了收件人的信息,地址铺Id不传
+				this.discern = {
+					name: '',
+					phone: '',
+					province: '',
+					city: '',
+					district: '',
+					town: '',
+					address: '',
+					proDisTown: '',
+				}
 			this.discernMessage = ''
 
 		},
 
-
 		// 财务核销码哦icon扫描
 		async vxSearchIcon() {
 			console.log('123')
@@ -460,7 +453,6 @@ export default {
 		// 快递公司
 		async geLogisticsListAPIList() {
 			const res = await geLogisticsList({})
-			console.log(res, '======================')
 			this.columns = res.list.map((item) => {
 				return {
 					id: item.id,
@@ -470,26 +462,10 @@ export default {
 		},
 		// 选择快递公司
 		onConfirm(e) {
-			console.log(e, '=============')
 			this.expressInfoShow = e.expresCompanyName
 			this.expressInfo = e.id
 			this.showPicker = false
 		},
-
-		// 选择成本中心
-		onConfirm9(e) {
-			this.costCenterInfoShow = e.text
-			this.costCenterId = e.id
-			this.costCenterName = e.costCenterName
-			this.showPicker9 = false
-			console.log("costCenterId:" + this.costCenterId)
-			console.log("costCenterName:" + this.costCenterName)
-		},
-
-		onConfirm0(e) {
-			this.mainType = e
-			this.showPicker2 = false
-		},
 		// 选择物品确定
 		onConfirm1(e) {//确定
 			this.wptype = e
@@ -500,17 +476,17 @@ export default {
 			this.pricetype = e
 			this.priceshow = false
 		},
-		// 填写地址类型确定
-		onConfirm8(e) {//确定
-			this.addresstype = e
-			this.addressshow = false
-		},
 		// 地址簿跳转
 		link(obj) {
 			this.$router.push({ path: '/Myaddressbook', query: { active: obj } })
+			// this.isAddressIdTransfer = true //进入地址铺了,传递
 		},
 		//立即寄件交互
 		async save() {
+			if (this.SendInfoValue.name == '' || this.SendInfoValue.name == undefined) {
+				Toast('寄件人姓名不能为空')
+				return
+			}
 			if (this.SendInfoValue.phone == '' || this.SendInfoValue.phone == undefined) {
 				Toast('寄件人手机号不能为空')
 				return
@@ -594,15 +570,14 @@ export default {
 			}
 			return
 		},
-
+		// 打印机确认
 		async onPrinter(e) {
 			this.printerName = e.printerName;
 			this.printerId = e.id;
 			await this.shipServe(e.id)
 		},
-
+		// 寄件
 		async shipServe(printId) {
-			//先走基础打印
 			const $toast = Toast.loading({
 				message: '保存中...',
 				forbidClick: true,
@@ -624,7 +599,7 @@ export default {
 			}
 			let parmas = {
 				expressInfo: this.expressInfo,//快递公司1-顺丰
-				userAddressId: this.transmitMessageVlaue.id,
+				userAddressId: this.isAddressIdTransfer == false ? '' : this.transmitMessageVlaue.id,//收发室ID
 				// userAddressId: 'ede4f065286a406dbb82064ec7524b4e',
 				expressType: wptypeValue,//快件类型 1-文件 2-物品
 				expressNum: this.stepper, //快递数量
@@ -632,11 +607,17 @@ export default {
 				expressRemark: this.bz,//快递备注
 				expressWeight: this.Kilogram,//公斤
 				expressPrice: this.declaredValue,//价值
+				name: this.SendInfoValue.name,//寄件人姓名
 				phone: this.SendInfoValue.phone,//寄件人手机号
 				addresseeName: this.transmitMessageVlaue.addresseeName,//收件人姓名
 				addresseePhone: this.transmitMessageVlaue.addresseePhone,//收件人手机号
+				addresseeProvince: this.transmitMessageVlaue.addresseeProvince,//省
+				addresseecity: this.transmitMessageVlaue.addresseeCity,//s市
+				addresseeCounty: this.transmitMessageVlaue.addresseeCounty,//区
+				addresseeTown: this.transmitMessageVlaue.addresseeTown,//镇
+				addresseeAddrInfo: this.transmitMessageVlaue.addresseeAddrInfo,//详细地址
 				verificationCode: this.authorization, //财务核销码
-				printId: printId
+				printId: printId,//打印机ID
 			}
 			const res = await saveMailDo({ ...parmas })
 			if (res.msg == 'success') {
@@ -758,7 +739,7 @@ export default {
 					text-align: center;
 					border-left: .01rem solid #ededed;
 					padding-left: .2rem;
-					width: 42px;
+					width: 50px;
 
 					img {
 						width: .39rem;

+ 1 - 1
src/pages/expressExpress.vue

@@ -53,7 +53,7 @@ export default {
     },
     methods: {
         async getFindWithoutInfoById() {
-            const res = await getExpressById({ id: this.id })
+            const res = await getExpressById({ id: this.id }, { emulateJSON: true, loading: true, message: '加载中...' })
             this.ObjectVlaue = res.expressInfoById
             console.log(res)
         },

+ 1 - 1
src/pages/login.vue

@@ -76,7 +76,7 @@ export default {
 				this.$router.push({ path: '/' });
 			} else {
 
-				Toast(res.message);
+				Toast(res.error);
 			}
 
 			// //发送失败

+ 2 - 2
src/pages/mailInfo.vue

@@ -82,12 +82,12 @@ export default {
 	},
 	methods: {
 		async getFindWithoutInfoById() {
-			const res = await findWithoutInfoById({ id: this.id })
+			const res = await findWithoutInfoById({ id: this.id }, { emulateJSON: true, loading: true, message: '加载中...' })
 			this.ObjectVlaue = res.floorInfoById
 			console.log(res)
 		},
 		async getFindInsideInfoById() {
-			const res = await findInsideInfoById({ id: this.id })
+			const res = await findInsideInfoById({ id: this.id }, { emulateJSON: true, loading: true, message: '加载中...' })
 			this.ObjectVlaue = res.floorInfoById
 			console.log(res)
 		}

+ 1 - 0
src/pages/myaddressbook.vue

@@ -142,6 +142,7 @@ export default {
 			transmitMessageVlaue.addresseeProvince = item.addresseeProvince
 			transmitMessageVlaue.addresseeTown = item.addresseeTown
 			transmitMessageVlaue.sendNum = item.sendNum
+			transmitMessageVlaue.isAddressIdTransfer = true
 			this.$store.commit('getTransmitMessageVlaue', transmitMessageVlaue);
 			this.$router.push({ path: "/Express" })
 		},