| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 | <template>	<!-- 扫码出库确认页面 -->	<view>		<u-modal v-model="show" :show-title="false" @confirm="confirm">			<view style="width: 100%;height: 42rpx;margin-top: 30rpx;margin-bottom: 10rpx;text-align: center;">成功信息</view>			<u-table border-color="#f2f2f2">				<u-tr class="u-tr">					<u-td class="u-td">{{successCount}}条</u-td>					<u-td class="u-td">成功出库轮胎</u-td>				</u-tr>			</u-table>			<view style="width: 100%;height: 42rpx;margin-top: 30rpx;margin-bottom: 10rpx;text-align: center;">失败信息</view>			<u-table border-color="#f2f2f2" font-size="20rpx">				<u-tr class="u-tr">					<u-th class="u-th">轮胎胎号</u-th>					<u-th class="u-th">失败原因</u-th>				</u-tr>				<u-tr class="u-tr" v-for="(item,index) in notBelongStoreBrandTyreNumbers" :key="index">					<u-td class="u-td">{{item}}</u-td>					<u-td class="u-td">非门店经营品牌</u-td>				</u-tr>				<u-tr class="u-tr" v-for="(item,index) in nonRegularTyreNumbers" :key="index">					<u-td class="u-td">{{item}}</u-td>					<u-td class="u-td">非正规胎号</u-td>				</u-tr>				<u-tr class="u-tr" v-for="(item,index) in notScanInTyres" :key="index">					<u-td class="u-td">{{item}}</u-td>					<u-td class="u-td">未入库轮胎</u-td>				</u-tr>			</u-table>		</u-modal>				<view class="header">			<view class="behind"></view>			<view class="content">				<view class="content-one">					<view>胎号</view>					<view>物料</view>				</view>				<view v-for="(item,index) in datalist" :key="index">					<view class="content-two">						<view>{{item.tireNumber}}</view>						<view>{{item.maktx}}</view>					</view>				</view>			</view>			<view class="content-four">				注:请完善请完善请完善请完善请完善请完善请完善			</view>		</view>		<u-toast ref="repeat" position="bottom" />		<view class="tail" @click="location">			扫码确认		</view>	</view></template><script>	import {		request	} from '../../../common/request/request'	require("promise.prototype.finally").shim()	export default {		data() {			return {				datalist: [],				total: 0,				show: false,				successCount: '', //成功条数				notBelongStoreBrandTyreNumbers: [], //非门店经营品牌胎号				nonRegularTyreNumbers: [], //非正规胎号				notScanInTyres: [], //未入库胎号				longitude:'',  //经度				latitude:''    //纬度			}		},		created() {			uni.$on('update', data => {				this.datalist = data.materialList				return this.datalist			})		},		methods: {			confirm() {				this.$u.route({					type:'redirectTo',					url: 'pages/me/Delivery-details/index'				})			},			location(){				let this_s = this				uni.getLocation({					type: 'wgs84', // 返回国测局坐标					geocode: true,					success: function(res) {						console.log(res);						this_s.longitude = res.longitude						this_s.latitude = res.latitude						this_s.address = res.address.country + res.address.province + res.address.city + res.address.district + res.address.street						if(res.address.length == 0){							uni.showToast({								icon: 'none',								title: '获取地址失败, 请检查是否开启定位权限~~',								position: "bottom"							})							console.log("定位失败出去啦")							return						}						this_s.Submit()					},					fail: function(e) {						uni.showToast({							icon: 'none',							title: '获取地址失败, 请检查是否开启定位权限~~'						})						this.location()					}				})			},			Submit() {				this.show = true;				request({					url: '/storeScan/storeScanOutTyres',					method: 'Post',					data: {						storeId:this.$store.state.storeInfo.storeId,						userId:this.$store.state.storeInfo.userId,						scanAddress: this.address,						longitude: this.longitude,						latitude: this.latitude,						materialList: this.datalist					}				}).then(res => {					console.log(res.data.msg)					if (res.data.code == 500) {						this.$refs.repeat.show({							title: res.data.msg,							type: 'default',							position: 'bottom'						})					}					this.notBelongStoreBrandTyreNumbers = res.data.data.notBelongStoreBrandTyreNumbers //非门店经营品牌胎号					this.successCount = res.data.data.successCount //成功条数					this.nonRegularTyreNumbers = res.data.data.nonRegularTyreNumbers //非正规胎号					this.notScanInTyres = res.data.data.notScanInTyres //未入库轮胎号					console.log(res)				}).catch(err => {					console.log(err.data.msg)				}).finally(() => {					// Loading.close()				})			}		},	}</script><style lang="scss" scoped>	.behind {		width: 100%;		height: 230rpx;		margin-bottom: -200rpx;		background-color: #0094FE;	}	.header {		width: 100%;	}	.content {		width: 711rpx;		// height: 852rpx;		background: #FFFFFF;		box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);		border-radius: 20rpx;		padding-top: 10rpx;		padding-bottom: 10rpx;		margin: 0 auto;	}	.content-one {		display: flex;		justify-content: space-between;	}	.content-one:nth-child(1) {		margin-left: 90rpx;		margin-right: 150rpx;		font-weight: bold;		margin-top: 30rpx;	}	.content-two {		display: flex;		justify-content: space-between;		margin-top: 30rpx;		line-height: 115rpx;		width: 666rpx;		margin: 0 auto;		color: #9c9c9c;		font-size: 28rpx;		border-bottom: 1rpx solid #E8E8E8;	}	.content-two>view:nth-child(2) {		padding-top: 28rpx;		width: 350rpx;		line-height: 53rpx;		text-align: center;	}	.content-two>view:nth-child(3) {		color: #149EE2;		margin-right: 50rpx;	}	.tail {		width: 678rpx;		line-height: 83rpx;		background: #0095FF;		color: #fff;		text-align: center;		margin: 0 auto;		margin-top: 60rpx;		border-radius: 15rpx;	}	.content-four {		color: #acacac;		font-size: 24rpx;		margin-top: 30rpx;		margin-left: 20rpx;		margin-bottom: 50rpx;	}</style>
 |