|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <scroll-view> | 
|---|
|  |  |  | <view class="demo-tab"> | 
|---|
|  |  |  | <checkbox-group @change="checkbox"> | 
|---|
|  |  |  | <label v-for="(item,index) in data" :key="index" | 
|---|
|  |  |  | @click="changeClass(index)" class="demo-list bg-false" :class="{'active':add_class==index}" > | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view :class="'bg-'+item.checked" class="demo-list"> | 
|---|
|  |  |  | <view class="demo-list-left"><checkbox :value="item.id+''" :checked="item.checked" /> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="demo-list-right"> | 
|---|
|  |  |  | <view><text style="width: 90rpx;">订单  | </text>{{item.orderNo}}<text>序号:{{index+1}}</text></view> | 
|---|
|  |  |  | <view><text >商品编码:</text>{{item.matnr}}</view> | 
|---|
|  |  |  | <view ><text>应入数量:</text><view class="text-num">{{item.anfme}}</view><text>商品名称:</text>{{item.maktx}}</view> | 
|---|
|  |  |  | <view><text>已入数量:</text><view class="text-num">{{item.inQty}}</view><text>订单状态:</text>{{item.state$}}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </label> | 
|---|
|  |  |  | </checkbox-group> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view class="square-2"> | 
|---|
|  |  |  | <view class="square-title"> | 
|---|
|  |  |  | <view class="title-sign"><view class="sign"></view></view> | 
|---|
|  |  |  | <view class="title-text"><text>没有按钮</text></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </scroll-view> | 
|---|
|  |  |  | <view class="foot flex justify-around"> | 
|---|
|  |  |  | <button class="cu-btn bg-yellow lg">上架</button> | 
|---|
|  |  |  | <button class="cu-btn bg-yellow lg">撤销上架</button> | 
|---|
|  |  |  | <view class="square-content"> | 
|---|
|  |  |  | <view class="content-input"> | 
|---|
|  |  |  | <input type="text" v-model="yyds" placeholder="扫码 / 输入" @input="find" :focus="focus"> | 
|---|
|  |  |  | <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <checkbox-group > | 
|---|
|  |  |  | <view v-for="(item,index) in staNoList" :key="index" class="data-list " > | 
|---|
|  |  |  | <view class="data-list-left"> | 
|---|
|  |  |  | <view class="matnr">{{item}}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </checkbox-group> | 
|---|
|  |  |  | <view class="square-2"> | 
|---|
|  |  |  | <view class="square-title"> | 
|---|
|  |  |  | <view class="title-sign"><view class="sign"></view></view> | 
|---|
|  |  |  | <view class="title-text"><text>右侧按钮</text></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="square-content"> | 
|---|
|  |  |  | <view class="content-input-btn"> | 
|---|
|  |  |  | <input type="text"> | 
|---|
|  |  |  | <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="content-btn"> | 
|---|
|  |  |  | <button class="cu-btn bg-blue pda-btn">提取</button> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view class="square-3"> | 
|---|
|  |  |  | <view class="square-title"> | 
|---|
|  |  |  | <view class="title-sign"><view class="sign"></view></view> | 
|---|
|  |  |  | <view class="title-text"><text>左侧下拉</text></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="square-content"> | 
|---|
|  |  |  | <view class="content-combox"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <uni-combox  emptyTips="暂无数据" :candidates="staNoList" v-model="staNo" placeholder="站台号"></uni-combox> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="square-content"> | 
|---|
|  |  |  | <view class="content-input-combox"> | 
|---|
|  |  |  | <input type="text"> | 
|---|
|  |  |  | <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view class="square-1"> | 
|---|
|  |  |  | <view class="square-title"> | 
|---|
|  |  |  | <view class="title-sign"><view class="sign"></view></view> | 
|---|
|  |  |  | <view class="title-text"><text>商品列表</text></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view class="square-none"> | 
|---|
|  |  |  | <view class="v-show">暂无更多数据...</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- 商品列表 --> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <view></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- 表单 --> | 
|---|
|  |  |  | <view class="square-form"> | 
|---|
|  |  |  | <view class="form-title"> | 
|---|
|  |  |  | <text>结束时间</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="form-input"> | 
|---|
|  |  |  | <input type="text" placeholder="请输入..."> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- 表单必填 --> | 
|---|
|  |  |  | <view class="square-form"> | 
|---|
|  |  |  | <view class="form-title"> | 
|---|
|  |  |  | <text>结束时间</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="form-input"> | 
|---|
|  |  |  | <input type="text" placeholder="请输入..."> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- 搜索框 --> | 
|---|
|  |  |  | <view class="square-1"> | 
|---|
|  |  |  | <view class="searchBox"> | 
|---|
|  |  |  | <view class="searchIcon"><uni-icons type="search" size="20" color="#dadada"></uni-icons></view> | 
|---|
|  |  |  | <view class="searchArea"><input type="text" placeholder=" 请输入"></view> | 
|---|
|  |  |  | <view class="closeIcon"><uni-icons type="closeempty" size="20" color="#dadada"></uni-icons></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | data: [], | 
|---|
|  |  |  | background:'unCheck', | 
|---|
|  |  |  | color:'', | 
|---|
|  |  |  | add_class:'' | 
|---|
|  |  |  | staNoList:[], | 
|---|
|  |  |  | staNo:'', | 
|---|
|  |  |  | yyds:'', | 
|---|
|  |  |  | focus:'' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | mounted() { | 
|---|
|  |  |  | const UIP = uni.getStorageSync('UIP'); | 
|---|
|  |  |  | this.baseIP = UIP; | 
|---|
|  |  |  | const UPORT = uni.getStorageSync('UPORT'); | 
|---|
|  |  |  | this.basePORT = UPORT; | 
|---|
|  |  |  | this.render() | 
|---|
|  |  |  | onLoad() { | 
|---|
|  |  |  | // #ifdef APP | 
|---|
|  |  |  | setInterval(()=>{ | 
|---|
|  |  |  | uni.hideKeyboard() | 
|---|
|  |  |  | },20) | 
|---|
|  |  |  | // #endif | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | // 表格加载 | 
|---|
|  |  |  | render(param) { | 
|---|
|  |  |  | let that = this; | 
|---|
|  |  |  | if(param) { | 
|---|
|  |  |  | that.needData['order_no'] = param; | 
|---|
|  |  |  | that.getData(); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | that.getData(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | methods:{ | 
|---|
|  |  |  | find(){ | 
|---|
|  |  |  | this.staNoList.push(this.yyds); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getData() { | 
|---|
|  |  |  | let that = this | 
|---|
|  |  |  | uni.request({ | 
|---|
|  |  |  | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/receiveDetl/list/auth", | 
|---|
|  |  |  | header:{'token':uni.getStorageSync('token')}, | 
|---|
|  |  |  | data: that.needData, | 
|---|
|  |  |  | success(res) { | 
|---|
|  |  |  | var res = res.data | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | that.data = res.data.records | 
|---|
|  |  |  | console.log(that.data) | 
|---|
|  |  |  | // that.setCheck() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | checkbox: function (e) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var items = this.data, | 
|---|
|  |  |  | values = e.detail.value; | 
|---|
|  |  |  | for (var i = 0, lenI = items.length; i < lenI; ++i) { | 
|---|
|  |  |  | const item = items[i] | 
|---|
|  |  |  | item.id = item.id + '' | 
|---|
|  |  |  | if(values.indexOf(item.id) >= 0){ | 
|---|
|  |  |  | this.$set(item,'checked',true) | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | this.$set(item,'checked',false) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | console.log(this.data) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeClass(index) { | 
|---|
|  |  |  | console.log(index) | 
|---|
|  |  |  | this.add_class=index | 
|---|
|  |  |  | this.focus = false; | 
|---|
|  |  |  | setTimeout(()=>{ | 
|---|
|  |  |  | this.yyds =''; | 
|---|
|  |  |  | this.focus = true; | 
|---|
|  |  |  | console.log(this.yyds ,'1') | 
|---|
|  |  |  | }, 50); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | .bg-false { | 
|---|
|  |  |  | background-color: #FFFFFF; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .bg-true { | 
|---|
|  |  |  | background-color: #e5e5e5; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .demo-tab { | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .demo-list { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | border-bottom: 1px solid #d8d8d8; | 
|---|
|  |  |  | height: 160rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .demo-list:last-child { | 
|---|
|  |  |  | margin-bottom: 99rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | label { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .demo-list-left { | 
|---|
|  |  |  | display: inline-block; | 
|---|
|  |  |  | width: 100rpx; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | height: 150rpx; | 
|---|
|  |  |  | line-height: 150rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .demo-list-right { | 
|---|
|  |  |  | display: inline-block; | 
|---|
|  |  |  | width: 650rpx; | 
|---|
|  |  |  | float: right; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .demo-list-right text { | 
|---|
|  |  |  | display: inline-block; | 
|---|
|  |  |  | width: 150rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .text-num { | 
|---|
|  |  |  | display: inline-block; | 
|---|
|  |  |  | width: 90rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .foot { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100rpx; | 
|---|
|  |  |  | line-height: 100rpx; | 
|---|
|  |  |  | background-color: #ffffff; | 
|---|
|  |  |  | position: fixed; | 
|---|
|  |  |  | bottom: 0; | 
|---|
|  |  |  | border-top: 1rpx solid #d8d8d8; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | checkbox { | 
|---|
|  |  |  | /* transform:scale(0.7) */ | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </style> | 
|---|