This commit is contained in:
aihe 2024-07-31 02:05:48 +08:00
parent b295488901
commit f6e74fbd40

View File

@ -112,17 +112,24 @@
<tpx-layout> <tpx-layout>
<template v-slot:body> <template v-slot:body>
<view class="pl-30 pr-30 pt-30"> <view class="pl-30 pr-30 pt-30">
<u-row> <tpx-checkitems :list="bindSearchModal.data._list" v-model:value="bindSearchModal.data.empCode" v-model:text="bindSearchModal.data.empName" v-slot="curPro" min-checked="1" type="single"
<u-avatar :src="bindSearchModal.data.avatar" size="110"></u-avatar> @onChange="handleChooseItem" :transKeyVal="{valKey: 'empCode', titleKey: 'empName'}"
<view class="pl-30"> >
<u-text :text="bindSearchModal.data.empName" size="30" :bold="true" lines="1"></u-text> <view slot :class="`yunf-item ${curPro.checked?'active':''}`">
<view class="mt-20"> <u-row>
{{bindSearchModal.data.phone}} <u-avatar :src="curPro.item.avatar" size="110"></u-avatar>
</view> <view class="pl-30">
<u-text :text="curPro.item.empName" size="30" :bold="true" lines="1"></u-text>
<view class="mt-20">
{{curPro.item.phone}}
</view>
</view>
</u-row>
</view> </view>
</u-row> </tpx-checkitems>
</view> </view>
</template> </template>
<template v-slot:footer> <template v-slot:footer>
<view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;"> <view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;">
<u-button @click="handleConfirmBind" type="primary" size="large" shape="circle" <u-button @click="handleConfirmBind" type="primary" size="large" shape="circle"
@ -232,7 +239,13 @@
async handleBindSearchEmp(item={}) { async handleBindSearchEmp(item={}) {
let res = await apiService.queryNewSalesmen({ ...this.bindModal.data, _loading: true }) let res = await apiService.queryNewSalesmen({ ...this.bindModal.data, _loading: true })
this.bindSearchModal.show = true this.bindSearchModal.show = true
this.bindSearchModal.data = res.data || {} this.bindSearchModal.data = {
_list: res.data || []
}
let dflCheckItem = this.bindSearchModal.data?._list?.[0]
if(dflCheckItem) {
Object.assign(this.bindSearchModal.data, dflCheckItem)
}
}, },
async handleConfirmBind(){ async handleConfirmBind(){
let res = await apiService.bindSalesmen({ ...this.bindSearchModal.data, _loading: true }) let res = await apiService.bindSalesmen({ ...this.bindSearchModal.data, _loading: true })
@ -268,4 +281,14 @@
.pgb-cont{ .pgb-cont{
padding: 30rpx 30rpx 0 30rpx; padding: 30rpx 30rpx 0 30rpx;
} }
.yunf-item {
margin-bottom: 20rpx;
padding: 30rpx;
background: #F6F6F6;
border-radius: 20rpx;
border: 2rpx solid transparent;
&.active {
border-color: $uni-color-primary;
}
}
</style> </style>