123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <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}}{{$t('scancodeenter.strip')}}</u-td>
- <u-td class="u-td">{{$t('scancodeenter.delivery')}}</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">{{$t('scanningconfirm.number')}}</u-th>
- <u-th class="u-th">{{$t('scanningconfirm.failreason')}}</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">{{$t('scanningconfirm.stateA')}}</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">{{$t('scanningconfirm.stateB')}}</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">{{$t('scanningconfirm.notincluded')}}</u-td>
- </u-tr>
- </u-table>
- </u-modal>
-
- <view class="header">
- <view class="behind"></view>
- <view class="content">
- <view class="content-one">
- <view>{{$t('scanningconfirm.number_s')}}</view>
- <view>{{$t('scanningconfirm.materiel')}}</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>
- <u-toast ref="repeat" position="bottom" />
- <view class="tail" @click="location">
- {{$t('scanningconfirm.confirm')}}
- </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:'' ,//纬度
- degree:'',
- address_s:'',
- whole:''
- }
- },
- created() {
- uni.$on('update', data => {
- this.datalist = data.materialList
- console.log(data)
- this.whole = data
- return this.datalist
- })
- },
- onBackPress(options) {
- if (options.from == 'backbutton') {
- this.$u.route({
- url: 'pages/home/scancode/scancodeout'
- })
- uni.$emit('data', {
- lisi: this.datalist
- })
- }
- return true;
- },
- methods: {
- confirm() {
- this.$u.route({
- type:'redirectTo',
- url: 'pages/me/Delivery-details/index'
- })
- this.datalist = ''
- },
- location(){
- let this_s = this
- console.log(this.whole)
- this_s.Submit()
- },
- 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.whole.address, //地址
- longitude: this.whole.degree.x,
- latitude: this.whole.degree.y,
- materialList: this.datalist
- }
- }).then(res => {
- console.log(res)
- 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 //未入库轮胎号
-
- this.datalist = ''
- }).catch(err => {
- uni.showToast({
- icon: 'none',
- title: this.$t('scanningconfirm.networkstate'),
- position: "bottom"
- })
- }).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>
|