Commit 6ad06615 by zhangquan

定向礼包增加集团礼包

1 parent 6f62a239
......@@ -140,4 +140,13 @@ const getQrcode = params => {
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift, getQrcode }
const getGroupGift = params => {
params.method = 'scrm.api.coupon.group.directional.gift.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift, getQrcode, getGroupGift }
......@@ -3,20 +3,16 @@
<div class="edit-gift marketing edit-box">
<div class="container edit-container">
<p class="edit-title">{{ title }}</p>
<el-radio-group @change="changeGiftType" v-model="giftType">
<el-radio :label="1">自选礼包</el-radio>
<el-radio :label="2">集团礼包</el-radio>
</el-radio-group>
<glsx-combi-form v-loading="loading" class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="giftTypeSlot">
<div style="display:inline-block" v-for="item in giftTypeList" :key="item.value">
<div :class="['gift-type',{'active-gift': merchantType==item.value}]" v-for="item in giftTypeList" :key="item.value" @click="changeMerchantType(item.value)">
{{item.name}}
</div>
</div>
<div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div>
<el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button>
<div slot="selectGroupGift">
<div v-for="(item,index) in groupList" :key="index" @click="selectGroupGift(item)">{{item.name}}</div>
<div slot="selectGroupGiftSlot">
<el-radio v-for="(item,index) in groupList" :key="index" v-model="groupDirectionalGiftId" :label="item.id">{{item.name}}</el-radio>
</div>
<div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0">
<div class="gift-title">
......@@ -33,7 +29,7 @@
<span :class="['circle', subItem.status == '3' ? ' grey' : '']"></span>
<p :class="['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']">{{ subItem.couponName }} × {{ subItem.couponAmount }}</p>
<p v-show="subItem.status == '3'" class="gift-tips">已失效</p>
<i :style="{ cursor: routeInfo.receivedStock ? 'not-allowed' : 'pointer' }" class="el-icon-delete" style="color: #C6C6C6;" @click="handleGiftDelete(item, subIndex)"></i>
<i v-if="merchantType==1" :style="{ cursor: routeInfo.receivedStock ? 'not-allowed' : 'pointer' }" class="el-icon-delete" style="color: #C6C6C6;" @click="handleGiftDelete(item, subIndex)"></i>
</div>
</div>
</div>
......@@ -153,7 +149,7 @@ export default {
phone: '',
isLoaded: true,
loading: false,
giftType: 1,
merchantType: 1,
tableSearchForm: { staffName: '' },
phoneList: [],
size: 'small',
......@@ -226,7 +222,7 @@ export default {
},
giftTypeList: [
{
name: '自选礼包',
name: '自店礼包',
value: 1
},
{
......@@ -245,9 +241,9 @@ export default {
required: true,
validator: (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入库存数量'))
return callback(new Error('请输入礼包数量'))
} else if (this.routeInfo.id && +this.curStock > +value && this.curReceiveRule != 4) {
return callback(new Error('二次编辑,库存数量不能减少'))
return callback(new Error('二次编辑,礼包数量不能减少'))
} else {
return callback()
}
......@@ -282,14 +278,16 @@ export default {
{
label: '礼包类型',
name:'',
addHtml:'giftTypeSlot'
addHtml:'giftTypeSlot',
isHide: false
},
{
label: '礼包名称',
name: 'name',
isDisabled: false,
type: 'input',
maxlength: 15
maxlength: 15,
isHide: false
},
{
label: '备注名称',
......@@ -303,12 +301,14 @@ export default {
{
label: '礼包设置',
name: 'couponList',
addHtml: 'selectGiftBtn'
addHtml: 'selectGiftBtn',
isHide: false
},
{
label:'选择礼包',
name: '',
addHtml: 'selectGroupGift'
name: 'couponList',
addHtml: 'selectGroupGiftSlot',
isHide: true
},
{
label: '',
......@@ -317,7 +317,7 @@ export default {
addHtml: 'couponListBlock'
},
{
label: '库存数量',
label: '礼包数量',
name: 'stock',
addHtml: 'stockNumInput',
isHide: false
......@@ -425,6 +425,7 @@ export default {
isChangePeople: true,
currentCoupons: [],
currentPeople: [],
groupDirectionalGiftId: '',
groupList:[]
}
},
......@@ -439,12 +440,33 @@ export default {
},
deep: true
},
// giftType: {
// handler(val){
// },
// deep: true
// },
merchantType: {
handler(val){
let target = this.editFormData.find(item => item.addHtml == 'selectGroupGiftSlot')
let setGiftTarget = this.editFormData.find(item => item.addHtml == 'selectGiftBtn')
let nameTarget = this.editFormData.find(item => item.name == 'name')
target.isHide = val == 1
setGiftTarget.isHide = val != 1
nameTarget.isHide = val != 1
if(val == 2){
this.groupDirectionalGiftId = this.groupList[0]?.id
}else{
this.editForm.name = ''
this.groupDirectionalGiftId = ''
}
},
deep: true
},
groupDirectionalGiftId: {
handler(val){
if(this.merchantType == 2){
let target = this.groupList.find(item=> item.id == this.groupDirectionalGiftId)
this.editForm.name = target.name
this.selectGroupGiftFn(target)
}
},
deep: true
},
'editForm.couponList': {
handler(val) {
this.isChangeCoupons = this.judgeAddOrDel(val, this.currentCoupons, 'id')
......@@ -475,6 +497,7 @@ export default {
},
mounted() {
this.setMinHeight()
this.getGroupGift()
this.routeInfo = this.$route.query
if (this.routeInfo.receivedStock) this.routeInfo.receivedStock = +this.routeInfo.receivedStock
this.title = this.titleObj[this.routeInfo.addOrEdit]
......@@ -489,17 +512,45 @@ export default {
}
})
}
let a = '{"discount":{"label":"折扣券","discountType":2,"list":[]},"cash":{"label":"代金券","discountType":3,"list":[{"id":581,"discountType":3,"couponName":"验证关联商品-全部商品","couponAmount":1,"couponAnticipatedCost":100,"status":"2"},{"id":569,"discountType":3,"couponName":"礼包线上代金劵","couponAmount":1,"couponAnticipatedCost":750,"status":"2"}]},"exchange":{"label":"兑换券","discountType":4,"list":[]},"service":{"label":"会员服务","discountType":7,"list":[{"id":1074,"discountType":7,"couponName":"xxx123123123123","couponAmount":1,"couponAnticipatedCost":3200,"status":"2"}]}}'
let b = '{"discount":{"label":"折扣券","discountType":2,"list":[]},"cash":{"label":"代金券","discountType":3,"list":[]},"exchange":{"label":"兑换券","discountType":4,"list":[]},"service":{"label":"会员服务","discountType":7,"list":[{"id":1074,"discountType":7,"couponName":"xxx123123123123","couponAmount":1,"couponAnticipatedCost":3200,"status":"2"},{"id":1072,"discountType":7,"couponName":"xx123","couponAmount":1,"couponAnticipatedCost":100,"status":"2"},{"id":1071,"discountType":7,"couponName":"xx222","couponAmount":1,"couponAnticipatedCost":100,"status":"2"}]}}'
this.groupList = [
{name: '第一个礼包',gift: JSON.parse(a)},
{name: '大爱的礼包',gift: JSON.parse(b)}
]
},
methods: {
selectGroupGift(item){
console.log(item)
this.handleGiftConfirm(item.gift)
changeMerchantType(val){
this.merchantType = val
if(val==1){
this.orderShow.forEach(item => {
this.couponObj[item].list = []
})
this.editForm.couponList = []
this.hasCouponBlock(false)
}
},
getGroupGift(){
this.$apis.giftBag.getGroupGift({}).then(res => {
let giftArr = []
if(res?.length){
let Obj = this.$common.utils.deepClone(this.couponObj)
this.orderShow.forEach(item => {
Obj[item].list = []
})
res.forEach(ele => {
let gift = this.$common.utils.deepClone(Obj)
console.log(JSON.stringify(Obj))
const {id, name, couponDTOList} = ele
couponDTOList.forEach(item=>{
gift[this.numToCoupon[item.discountType]].list.push(item)
})
giftArr.push({id, name, gift})
})
this.groupList = this.$common.utils.deepClone(giftArr)
}else{
let target = this.editFormData.find(item => item.addHtml == 'giftTypeSlot')
target.isHide = true
}
})
},
selectGroupGiftFn(item){
let gift = this.$common.utils.deepClone(item.gift)
this.handleGiftConfirm(gift, 'group')
},
//员工查询
handleSearch() {
......@@ -555,6 +606,10 @@ export default {
this.approvalStatus = res.data.approveStatus - 1
this.editForm = res.data
this.curStock = res.data.stock
this.merchantType = res.data.merchantType
this.$nextTick(()=>{
this.groupDirectionalGiftId = res.data.groupDirectionalGiftId
})
this.curReceiveRule = res.data.receiveRule
this.receiveWay = res.data.receiveWay || 1
if (res.data && res.data.receiveDetails) {
......@@ -636,9 +691,11 @@ export default {
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose()
},
handleGiftConfirm(selectedData) {
handleGiftConfirm(selectedData, type) {
console.log(selectedData,'selectedData')
this.handleGiftClose()
if(type!='group'){
this.handleGiftClose()
}
this.couponObj = selectedData
this.recoveryTotalPrice()
this.recoveryGiftList()
......@@ -692,7 +749,7 @@ export default {
params.staffCreateRequests = this.$common.utils.deepClone(params.staffList)
params.couponCreateRequests = this.$common.utils.deepClone(params.couponList)
params.couponCreateRequests.forEach(item => {
item.couponId = item.id
item.couponId = this.merchantType==2 ? item.couponId: item.id
})
if (this.editForm.receiveRule == 1 || this.editForm.receiveRule == 4) {
params.receiveDetailList = this.phoneList.map(item => item.tel)
......@@ -713,6 +770,8 @@ export default {
}
}
params.requestSource = 1
params.merchantType = this.merchantType
if(this.merchantType==2) params.groupDirectionalGiftId = this.groupDirectionalGiftId
// 插入判断是否存在审批模板
// const { session } = this.$globalState
if (this.editForm.receiveRule == 1 || this.editForm.receiveRule == 4) {
......@@ -822,6 +881,25 @@ export default {
}
}
}
.gift-type{
display: inline-block;
border: 1px solid #D5D5D5;
box-sizing: border-box;
text-align: center;
width: 70px;
height: 20px;
line-height: 20px;
font-weight: 400;
font-size: 12px;
color: rgba(0,0,0,0.65);
cursor: pointer;
}
.active-gift{
background: #5850FF;
border: 1px solid #5850FF;
color: #fff;
}
.approval-tip {
font-size: 12px;
font-weight: 400;
......
......@@ -28,7 +28,10 @@
</div>
</div>
<div slot="name" slot-scope="scope">
<p class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</p>
<div class="gift-name">
<div class="group-label" v-if="scope.scope.merchantType==2">集团</div>
<div class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</div>
</div>
</div>
<!-- <div style="display: flex;align-items: center;" slot="approveStatus" slot-scope="scope">
<div class="approve-status" :style="{ 'background-color': approvalStatusColor[scope.scope.approveStatus - 1] }"></div>
......@@ -82,7 +85,10 @@ export default {
},
attrs: {
type: 'text',
fn: '编辑'
fn: '编辑',
disabled:row=>{
return row.scope.merchantType==2 && row.scope.receivedStock
}
},
listeners: {
click: row => this.handleEdit('edit', row.scope)
......@@ -544,6 +550,26 @@ export default {
}
}
}
.gift-name{
display: flex;
align-items: center;
.group-label{
width: 42px;
height: 20px;
line-height: 20px;
text-align: center;
background: rgba(255,101,61,0.15);
border-radius: 4px;
margin-right: 4px;
font-size: 12px;
color: #FF653D;
}
.cursor-pointer{
height: 20px;
line-height: 20px;
}
}
.gift-detail {
padding:0 200px 0 10px;
......
......@@ -22,15 +22,18 @@
<!-- 表格区域 开始 -->
<GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="directionalGiftName" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.directionalGiftName" placement="top-start">
<p class="gift-name" @click="handleDetail(scope.scope)">
{{ scope.scope.directionalGiftName }}
</p>
</el-tooltip>
<span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span>
<el-tooltip effect="dark" :content="scope.scope.cancelReason" placement="top-start">
<p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p>
</el-tooltip>
<div class="gift-name-slot">
<div class="group-label" v-if="scope.scope.merchantType==2">集团</div>
<el-tooltip effect="dark" :content="scope.scope.directionalGiftName" placement="top-start">
<p class="gift-name" @click="handleDetail(scope.scope)">
{{ scope.scope.directionalGiftName }}
</p>
</el-tooltip>
<span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span>
<el-tooltip effect="dark" :content="scope.scope.cancelReason" placement="top-start">
<p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p>
</el-tooltip>
</div>
</span>
<div slot="giftInfo" slot-scope="scope">
<GLTable class="secondTable" ref="giftListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="giftParams" :tableData="scope.scope | filterTable" @setTableFinishFun="setGiftTableFinishFun"></GLTable>
......@@ -279,7 +282,7 @@ export default {
{
label: '礼包名称',
width: 200,
width: 300,
addHtml: 'directionalGiftName'
},
{
......@@ -523,6 +526,22 @@ export default {
.secondTable {
padding-left: 10px;
}
.group-label{
width: 42px;
height: 20px;
line-height: 20px;
text-align: center;
background: rgba(255,101,61,0.15);
border-radius: 4px;
margin-right: 4px;
font-size: 12px;
color: #FF653D;
flex-shrink: 0;
}
.gift-name-slot{
display: flex;
align-items: center;
}
.gift-name {
color: #5850ff;
margin: 0;
......@@ -542,7 +561,7 @@ export default {
text-align: center;
line-height: 18px;
background: #eeeded;
margin-top: 2px;
flex-shrink: 0;
}
.void-reason {
font-size: 10px;
......@@ -551,7 +570,6 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 4px 0 0;
}
.void-dialog {
/deep/ .el-dialog__body {
......
......@@ -25,7 +25,7 @@
</div>
</div>
</div>
<div slot="merchantSlot">
<div class="merchant-radio" slot="merchantSlot">
<el-checkbox-group v-model="editForm.merchantList">
<el-checkbox v-for="item in merchantList" :label="item.merchantNo" :key="item.merchantNo">{{item.merchantName}}</el-checkbox>
</el-checkbox-group>
......@@ -289,17 +289,17 @@ export default {
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
let couponCreateRequests = [],storeCreateRequestList = [];
let couponCreateRequestList = [],storeCreateRequestList = [];
this.editForm.couponList.forEach(item => {
const {id:couponId, couponAmount, couponAnticipatedCost} = item
couponCreateRequests.push({couponId, couponAmount, couponAnticipatedCost})
couponCreateRequestList.push({couponId, couponAmount, couponAnticipatedCost})
})
this.editForm.merchantList.forEach(item=>{
let target = this.merchantList.find(ele => ele.merchantNo == item)
target && storeCreateRequestList.push({merchantId: target.merchantNo, merchantName:target.merchantName})
})
let params = {
couponCreateRequests,
couponCreateRequestList,
name: this.editForm.name,
storeCreateRequestList
}
......@@ -362,7 +362,10 @@ export default {
.marketing.edit-gift .select-merchant {
width: 98%;
}
.edit-container{
height: calc(100vh - 156px);
min-height: 700px;
}
.marketing.edit-gift {
// 礼包
.gift-block {
......@@ -416,6 +419,15 @@ export default {
}
}
}
.merchant-radio{
width: 878px;
max-height: 98px;
overflow: auto;
border: 1px solid #E5E5E5;
box-sizing: border-box;
border-radius: 4px;
padding: 10px 20px;
}
// 发放员工
.sale-select {
display: flex;
......
......@@ -24,8 +24,13 @@
</div>
</div>
</div>
<div class="merchant-radio" slot="merchantSlot">
<el-checkbox-group v-model="editForm.merchantList">
<el-checkbox v-for="item in merchantList" :label="item.merchantNo" :key="item.merchantNo">{{item.merchantName}}</el-checkbox>
</el-checkbox-group>
</div>
</glsx-combi-form>
<div class="approval_note_container">
<!-- <div class="approval_note_container">
<div class="line"></div>
<div class="note_container">
<div class="left">
......@@ -37,7 +42,7 @@
<span class="">修改人:{{ editForm.updatedBy }}</span>
</div>
</div>
</div>
</div> -->
</div>
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
......@@ -66,8 +71,10 @@ export default {
name: '',
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
couponList: []
couponList: [],
merchantList:[]
},
merchantList:[],
totalEstimatedCost: '',
orderShow: ['service', 'cash', 'discount', 'exchange'],
numToCoupon: {
......@@ -105,6 +112,7 @@ export default {
editRule: {
name: [{ required: true, message: '请输入礼包名称', trigger: 'change' }],
couponList: [{ required: true, message: '请选择礼包', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }],
},
isEdit: true,
editFormData: [
......@@ -118,6 +126,11 @@ export default {
name: 'couponList',
addHtml: 'couponListBlock'
},
{
label: '下发门店',
name: 'merchantList',
addHtml: 'merchantSlot'
}
],
}
},
......@@ -126,15 +139,29 @@ export default {
this.routeInfo = this.$route.query
this.loading = true
this.getInfo()
this.getMerchant()
},
methods: {
getMerchant(){
const { session } = this.$globalState || {}
const param = {
supMerchantNo: session.merchantId,
merchantAccountLevel: 4
}
this.$apis.groupGiftBag.getMerchantListApi(param).then(res => {
this.merchantList = res || []
this.editForm.merchantList = res.map(item => item.merchantNo)
})
},
getInfo() {
this.$apis.giftBag
this.$apis.groupGiftBag
.getGiftInfoApi({ id: this.routeInfo.id })
.then(res => {
res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss')
res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss')
res.data.couponList = res.data.couponDTOList
res.data.merchantList = res?.data?.storeList.map(item => item.merchantId)
this.editForm = res.data
this.recoveryCoupon()
this.recoveryTotalPrice()
......@@ -169,7 +196,7 @@ export default {
handleCancel() {
this.$router.push({
path: '/giftBag/index',
path: '/groupGiftBag/index',
query: { type: this.routeInfo.type }
})
}
......
......@@ -132,10 +132,6 @@ export default {
addHtml: 'name'
},
{
label: '礼包明细',
prop: 'name',
},
{
label: '预估成本/元',
prop: 'anticipatedCost',
formatter: cellValue => {
......@@ -157,7 +153,7 @@ export default {
label: '已领取',
prop: 'stock',
formatter: cellValue => {
return cellValue.receivedStock || '0'
return cellValue.receivedAmount || '0'
}
}
]
......
<!-- 选择员工弹窗 -->
<template>
<GLDialog class="muti-pro" :close-on-click-modal="false" bigTitle="选择员工" mode="big" :before-close="handleMutiSelectClose" :visible.sync="isMutiSelectVisible" @onOk="handleMutiSelectConfirm" @onCancel="handleMutiSelectClose" v-loading="loading">
<!-- <div class="noproDiv" v-show="!staffList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的员工</p>
</div> -->
<div>
<slot name="search"></slot>
<GLTable v-loading="loading" ref="mutiProRef" :tableData="staffList" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList"></GLTable>
</div>
</GLDialog>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectStaffDialog',
data() {
return {
// 表格组件
userInfo: {},
staffList: [],
selectList: [],
fnCallBack: false,
url: url,
loading: true,
tableSearchForm: {
staffName: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'userOneId',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进员工类型',
prop: 'followerTypeName'
}
]
}
}
},
props: {
isMutiSelectVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => {}
},
selectedStaffList: {
type: Array,
default: () => []
}
},
mounted() {
this.userInfo = this.$globalState.session
this.selectList = JSON.parse(JSON.stringify(this.selectedStaffList))
this.selectList.map(item => (item.userOneId = item.staffUUID))
this.getList({}, true)
},
methods: {
getList(page, isResetPage = false) {
var params = {
...this.searchForm,
pageNum: isResetPage ? 1 : this.$refs.mutiProRef.page.pageNum,
pageSize: isResetPage ? 10 : this.$refs.mutiProRef.page.pageSize
}
this.loading = true
this.$apis.giftBag.getFollowerStaffListApi(params).then(res => {
// 重置分页组件
if (this.$refs.mutiProRef && isResetPage) {
this.$refs.mutiProRef.page.pageNum = 1
this.$refs.mutiProRef.page.pageSize = 10
}
this.staffList = res.data
this.loading = false
this.fnCallBack = true
this.$refs.mutiProRef.tableTotal = res.count
this.$nextTick(() => {
this.recoverySelected()
})
this.$refs.mutiProRef.tableHeightValues = '50vh'
})
},
recoverySelected() {
if (this.selectedStaffList && this.selectedStaffList.length) {
this.selectedStaffList.forEach(row => {
row.userOneId = row.staffUUID
this.$nextTick(() => {
let idx = this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item => item.userOneId == row.staffUUID)
if (idx > -1) {
try {
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx], true)
let id = this.selectList.findIndex(item => item.staffUUID == row.staffUUID)
if (id > -1) this.selectList.splice(id, 1)
} catch (err) {
console.log(err)
}
}
})
})
}
},
handleMutiSelectConfirm() {
var selectedData = [...this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName], ...this.selectList]
this.$emit('handleMutiSelectConfirm', selectedData)
},
handleMutiSelectClose() {
this.$emit('handleMutiSelectClose')
}
}
}
</script>
<style>
.muti-pro .m-t-10 {
margin-top: 10px;
}
.muti-pro .noproP {
width: 100%;
height: 20px;
font-family: PingFangSC-Medium;
font-size: 16px;
color: #666666;
line-height: 20px;
font-weight: 500;
text-align: center;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!