| | |
| | | <input type="text" v-model="zpallet" placeholder=" 托盘条码"/> |
| | | <view class="close-icon" @click="reset()"><uni-icons type="closeempty" size="25" color="#a5a5a5"></uni-icons></view> |
| | | </view> |
| | | <view class="search-btn"><button @click="search(zpallet)" class="cu-btn bg-blue">搜索</button></view> |
| | | <view class="search-btn"><button @click="getList(zpallet)" class="cu-btn bg-blue">搜索</button></view> |
| | | </view> |
| | | |
| | | <!-- list列表 --> |
| | | <checkbox-group > |
| | | <view v-for="(item,index) in listData" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" > |
| | | <view class="data-list-left"> |
| | | <view>托盘条码:{{item.zpallet}}</view> |
| | | <view>托盘名称:{{item.maktx}}</view> |
| | | <view>商品编码:{{item.matnr}}-{{item.batch}}</view> |
| | | <view>仓库号:{{item.origin}}</view> |
| | | <view class="data-list-left">{{index + 1 }}</view> |
| | | <view class="data-list-right"> |
| | | <view>托盘条码:<text class="context zpallet">{{item.zpallet}}</text></view> |
| | | <view>托盘名称:<text class="context">{{item.maktx}}</text></view> |
| | | <view>商品编码:<text class="context">{{item.matnr}}-{{item.batch}}</text></view> |
| | | <view>仓库号:<text class="context">{{item.origin}}</text></view> |
| | | </view> |
| | | </view> |
| | | </checkbox-group> |
| | |
| | | <button class="cu-btn lg" @click="resst()">重置</button> |
| | | </view> |
| | | <view> |
| | | <button class="cu-btn lg pakin-btn bg-red" @click="comb()">删除</button> |
| | | <button class="cu-btn lg pakin-btn bg-red" @click="deleteData()">删除</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | getUrl() { |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl |
| | | }, |
| | | getList() { |
| | | getList(barcode) { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.commonUrl + '/waitPakin/list/auth', |
| | | data:{ |
| | | curr:1, |
| | | limit:20, |
| | | limit:16, |
| | | zpallet:barcode |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | header: {'token':uni.getStorageSync('token')}, |
| | | method:'GET', |
| | | success: result =>{ |
| | | console.log(result); |
| | | let res = result.data |
| | | if (res.code === 200) { |
| | | if (res.data) { |
| | | let list = res.data.records |
| | | that.listData = this.reload ? list : this.listData.concat(list); |
| | | this.reload = false; |
| | | |
| | | if (res.data.records) { |
| | | that.listData = res.data.records |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 重置 |
| | | resst() { |
| | | this.listData = [] |
| | | this.zpallet = '' |
| | | }, |
| | | // 删除 |
| | | deleteData() { |
| | | let that = this |
| | | console.log((JSON.stringify(that.listData))); |
| | | uni.request({ |
| | | url: that.commonUrl + "/waitPakin/delete/auth", |
| | | data: {param:JSON.stringify(that.listData)}, |
| | | header: {'token':uni.getStorageSync('token')}, |
| | | method:'POST', |
| | | success(result) { |
| | | console.log(result); |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | |
| | | } |
| | |
| | | background-color: #ebebeb; |
| | | } |
| | | |
| | | .demo-list { |
| | | .data-list { |
| | | border-bottom: 1px solid #d8d8d8; |
| | | height: 180rpx; |
| | | margin: 15rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | .demo-list:first-child { |
| | | .data-list:first-child { |
| | | margin-top: 120rpx; |
| | | } |
| | | .demo-list:last-child { |
| | | margin-bottom: 120rpx; |
| | | .data-list:last-child { |
| | | margin-bottom: 160rpx; |
| | | } |
| | | label { |
| | | display: block; |
| | | } |
| | | .demo-list-left { |
| | | .data-list-left { |
| | | display: inline-block; |
| | | float: left; |
| | | width: 10%; |
| | | height: 180rpx; |
| | | text-align: center; |
| | | width: 100rpx; |
| | | height: 180rpx; |
| | | line-height: 180rpx; |
| | | font-size: 40rpx; |
| | | color: #666; |
| | | } |
| | | .demo-list-right { |
| | | |
| | | .data-list-right { |
| | | display: inline-block; |
| | | float: left; |
| | | width: 90%; |
| | | height: 180rpx; |
| | | color: #828282; |
| | | font-size: 32rpx; |
| | | color: #666; |
| | | } |
| | | .context { |
| | | color: #999; |
| | | font-size: 30rpx; |
| | | } |
| | | .zpallet { |
| | | color: #666; |
| | | font-size: 36rpx; |
| | | } |
| | | </style> |