<template>
|
<view class="warp">
|
<view class="table">
|
<uni-table border stripe
|
|
emptyText="暂无更多数据">
|
<uni-tr>
|
<uni-th align="center">订单编号</uni-th>
|
<uni-th align="center" width="70">产品</uni-th>
|
<uni-th align="center" width="70"> 客户</uni-th>
|
<uni-th align="center" width="70"> 剩余量</uni-th>
|
<uni-th align="center">操作</uni-th>
|
</uni-tr>
|
<uni-tr v-for="(item, index) in subDataList" :key="index">
|
<uni-td align="center">
|
<view>{{ item.orderCode}}</view></uni-td>
|
<uni-td>
|
<view class="name">{{ item.productNames }}</view>
|
</uni-td>
|
<uni-td>
|
<view class="name">{{ item.customerName }}</view>
|
</uni-td>
|
<uni-td>
|
<view class="name">{{ item.surplusQuant }}</view>
|
</uni-td>
|
<uni-td>
|
<view class="name">
|
<u-button type='primary' text='选择' size='mini' @click.native.stop="checkOrder(item)"></u-button>
|
</view>
|
</uni-td>
|
</uni-tr>
|
</uni-table>
|
|
</view>
|
<!-- <view class="confirm-build">
|
<view class="confirm-build_block">
|
<u-button text="确认创建"
|
type="primary"
|
@click="confirmBuild"
|
:loading="buildLoading"
|
:disabled="abledBuild"></u-button>
|
</view>
|
</view> -->
|
</view>
|
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
params:{},
|
subDataList:[],
|
checkList:[],
|
tempArr:[],
|
}
|
},
|
onShow(){
|
|
},
|
onLoad(params){
|
console.log(JSON.parse(params.unionParams),params,'params')
|
this.params = JSON.parse(params.unionParams) ;
|
this.tempArr = JSON.parse(params.checkArray)
|
this.init();
|
console.log(this.tempArr,'tempArr')
|
|
},
|
methods: {
|
init(){
|
this.$reqGet('getCloseOrderList',this.params).then(res=>{
|
console.log(res,'resss')
|
if(res.data){
|
this.subDataList = res.data;
|
this.subDataList.forEach((item,i)=>{
|
this.tempArr.forEach((el,index)=>{
|
if(item.id === el.id){
|
this.$nextTick(() => {
|
this.$refs.table1.toggleRowSelection(i,true)
|
})
|
}
|
})
|
})
|
|
}
|
})
|
},
|
checkOrder(item){
|
uni.$emit('updateData', JSON.stringify(item))
|
uni.navigateBack({
|
delta: 1
|
})
|
|
},
|
selectionChange(e){
|
console.log(e,'eeee')
|
this.subDataList.forEach((element,i) => {
|
this.checkList.push(this.subDataList[i])
|
});
|
},
|
confirmBuild(){
|
this.checkOrder(this.checkList)
|
}
|
|
},
|
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.table{
|
width: 94%;
|
margin-left: 20rpx;
|
/deep/ .uni-table{
|
min-width: 340rpx!important;
|
}
|
}
|
.warp{
|
width: 100%;
|
height: calc(100vh - 10vh);
|
}
|
.confirm-build {
|
width: 100%;
|
height: vww(60);
|
background-color: #ffffff;
|
position: fixed;
|
bottom: 0;
|
box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
|
border-radius: 20rpx;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
|
&_block {
|
width: 94%;
|
}
|
}
|
|
</style>
|