فهرست منبع

扫码出库奖励

caojunjie 4 سال پیش
والد
کامیت
2e9be641f5
5فایلهای تغییر یافته به همراه76 افزوده شده و 10 حذف شده
  1. 1 0
      common/locales/zh.js
  2. 3 1
      pages/home/Scan-code-in/index.vue
  3. 70 8
      pages/home/Scan-code-out/index.vue
  4. 1 0
      pages/home/index.vue
  5. 1 1
      pages/home/scancode/scancodeout.vue

+ 1 - 0
common/locales/zh.js

@@ -126,6 +126,7 @@ export default {
 		titleOut: '扫码出库',
 		tips: '提示',
 		tips_a:'请扫码入库',
+		tips_c:'请扫码出库',
 		input: '手动录入',
 		confirmentry:'确认输入',
 		number: '胎号',

+ 3 - 1
pages/home/Scan-code-in/index.vue

@@ -152,13 +152,15 @@
 				uni.$on('update', data => {
 					this.datalist = data.materialList
 					this.whole = data
+					console.log(data)
 					request({
 						url: '/storeScan/getTyreReword',
 						method: 'Post',
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,
 							userId: this.$store.state.storeInfo.userId,
-							materialList: this.datalist
+							materialList: this.datalist,
+							scanType:'1'
 						}
 					}).then(res => {
 						console.log(res)

+ 70 - 8
pages/home/Scan-code-out/index.vue

@@ -27,6 +27,13 @@
 					<u-td class="u-td">{{item}}</u-td>
 					<u-td class="u-td">{{$t('scanningconfirm.notincluded')}}</u-td>
 				</u-tr>
+				<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">{{$t('scanningconfirm.reward')}}:{{rewardMoney}}{{$t('scanningconfirm.yuan')}}</u-td>
+						<u-td class="u-td">{{$t('scanningconfirm.integral')}}:{{rewardIntegral}}{{$t('scanningconfirm.one')}}</u-td>
+					</u-tr>
+				</u-table>
 			</u-table>
 		</u-modal>
 		
@@ -36,11 +43,13 @@
 				<view class="content-one">
 					<view>{{$t('scanningconfirm.number_s')}}</view>
 					<view>{{$t('scanningconfirm.materiel')}}</view>
+					<view>{{$t('scanningconfirm.estimatereward')}}</view>
 				</view>
-				<view v-for="(item,index) in datalist" :key="index">
+				<view v-for="(item,index) in dalist" :key="index">
 					<view class="content-two">
 						<view>{{item.tireNumber}}</view>
 						<view>{{item.maktx}}</view>
+						<view>{{item.rewardMoney}}{{$t('scanningconfirm.yuan')}}</view>
 					</view>
 				</view>
 			</view>
@@ -71,7 +80,10 @@
 				latitude:''    ,//纬度
 				degree:'',
 				address_s:'',
-				whole:''
+				whole:'',
+				dalist:[],
+				rewardIntegral:'',
+				rewardMoney:''
 			}
 		},
 		created() {
@@ -80,10 +92,57 @@
 			});
 			
 			uni.$on('update', data => {
-				this.datalist = data.materialList
-				console.log(data)
+				
+				//渲染页面
+				// this.datalist = data.materialList
+				console.log(this.datalist)
+				
+				request({
+					url: '/storeScan/getTyreReword',
+					method: 'Post',
+					data: {
+						storeId: this.$store.state.storeInfo.storeId,
+						userId: this.$store.state.storeInfo.userId,
+						materialList: data.materialList,
+						scanType:'2'
+					}
+				}).then(res => {
+					console.log(res)
+					this.dalist = res.data.data
+					// if (res.data.code == 0) {
+					// 	console.log(res)
+					// 	this.dalist = res.data.data
+					// 	for (let i = 0; i < this.dalist.length; i++) {
+					// 		this.total += parseInt(this.dalist[i].rewardMoney)
+					// 	}
+					// 	return this.total
+					// } else {
+					// 	uni.showToast({
+					// 		icon: 'none',
+					// 		title: this.$t('unified.error')
+					// 	})
+					// }
+				
+				}).catch(err => {
+					uni.showToast({
+						icon: 'none',
+						title: this.$t('unified.networkstate')
+					})
+				}).finally(() => {
+					// Loading.close()
+				})
+				
+				
+				
+				
+				
+				
+				
+				
+				
+				
 				this.whole = data
-				return this.datalist
+				// return this.datalist
 			})
 		},
 		onBackPress(options) {
@@ -121,10 +180,12 @@
 						scanAddress: this.whole.address, //地址
 						longitude: this.whole.degree.x,
 						latitude: this.whole.degree.y,
-						materialList: this.datalist
+						materialList: this.dalist
 					}
 				}).then(res => {
 					console.log(res)
+					this.rewardMoney = res.data.data.rewardMoney
+					this.rewardIntegral = res.data.data.rewardIntegral
 					if (res.data.code == 500) {
 						this.$refs.repeat.show({
 							title: res.data.msg,
@@ -182,9 +243,10 @@
 
 	.content-one:nth-child(1) {
 		margin-left: 90rpx;
-		margin-right: 150rpx;
+		margin-right: 20rpx;
 		font-weight: bold;
 		margin-top: 30rpx;
+		// background-color: #19BE6B;
 	}
 
 	.content-two {
@@ -208,7 +270,7 @@
 
 	.content-two>view:nth-child(3) {
 		color: #149EE2;
-		margin-right: 50rpx;
+		margin-right: 10rpx;
 	}
 
 	.tail {

+ 1 - 0
pages/home/index.vue

@@ -249,6 +249,7 @@
 							osType: 0
 						}
 					}).then(res =>{
+						console.log(res)
 						plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
 							if (wgtinfo.version == res.data.version) {
 								this.show_s = false

+ 1 - 1
pages/home/scancode/scancodeout.vue

@@ -63,7 +63,7 @@
 		data() {
 			return {
 				tips: this.$t('scanenter.tips'),
-				number: this.$t('scanenter.tips_a'),
+				number: this.$t('scanenter.tips_c'),
 				content: this.$t('scanenter.pleaseenter_s'),
 				number_s: '',
 				number_a: '',