| | |
| | | <view class="warp"> |
| | | <view class="table"> |
| | | <uni-table border stripe |
| | | type="selection" |
| | | ref="table1" |
| | | @selection-change="selectionChange" |
| | | emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th align="center">订单编号</uni-th> |
| | | <uni-th align="center">产品</uni-th> |
| | | <uni-th align="center">客户</uni-th> |
| | | <uni-th align="center">操作</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in subDataList" :key="index"> |
| | | <uni-td align="center"> |
| | |
| | | <uni-td> |
| | | <view class="name">{{ item.customerName }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view><u-button type='primary' text='选择' size='mini' @click="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> |
| | |
| | | return { |
| | | params:{}, |
| | | subDataList:[], |
| | | |
| | | checkList:[], |
| | | tempArr:[], |
| | | } |
| | | }, |
| | | onShow(){ |
| | | |
| | | }, |
| | | onLoad(params){ |
| | | console.log(JSON.parse(params.unionParams) ,'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: { |
| | |
| | | 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) |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | }, |
| | |
| | | delta: 1 |
| | | }) |
| | | |
| | | }, |
| | | selectionChange(e){ |
| | | console.log(e,'eeee') |
| | | this.subDataList.forEach((element,i) => { |
| | | this.checkList.push(this.subDataList[i]) |
| | | }); |
| | | }, |
| | | confirmBuild(){ |
| | | this.checkOrder(this.checkList) |
| | | } |
| | | |
| | | }, |
| | |
| | | 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> |