Commit aeb2b649 by 周子尧

Merge branch 'v1.2.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.2.0

2 parents c4a47239 ab17888b
import { http } from '@/main'
const getFollowerStaffListApi = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
return http({
url: 'rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getFollowerStaffListApi }
...@@ -167,6 +167,10 @@ html { ...@@ -167,6 +167,10 @@ html {
height: 120px; height: 120px;
} }
.marketing .m-t-8 {
margin-top: 8px;
}
.marketing .m-t-10 { .marketing .m-t-10 {
margin-top: 10px; margin-top: 10px;
} }
......
...@@ -64,13 +64,15 @@ export default { ...@@ -64,13 +64,15 @@ export default {
label: '礼包名称', label: '礼包名称',
name: 'orderCode', name: 'orderCode',
type: 'input', type: 'input',
maxlength: 15, maxlength: 30,
placeholder: '请输入礼包名称或备注名称',
isClear: true isClear: true
}, },
{ {
label: '发放员工', label: '发放员工',
name: 'orderCode', name: 'orderCode',
type: 'input', type: 'input',
maxlength: 30,
isClear: true isClear: true
}, },
{ {
......
<!-- 选择员工弹窗 -->
<template>
<glsx-dialog class="muti-pro" title="选择员工" :isVisible.sync="isMutiSelectVisible" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose" v-loading="loading">
<div class="noproDiv" v-show="!staffList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的员工</p>
</div>
<div v-show="staffList.length">
<slot name="search"></slot>
<GLTable v-loading="loading" ref="mutiProRef" :tableData="staffList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList"></GLTable>
</div>
</glsx-dialog>
</template>
<script>
// import { getGoodsList } from '@/api/modules/common'
import url from '@/assets/empty.png'
import glsxDialog from '@/components/glsx-dialog'
export default {
name: 'selectStaffDialog',
data() {
return {
// 表格组件
// getListApi: this.$apis.common.getGoodsListApi,
userInfo: {},
staffList: [],
fnCallBack: false,
url: url,
loading: true,
// 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: () => []
}
},
components: {
glsxDialog
},
mounted() {
this.userInfo = this.$globalState.session
this.getList(true)
},
methods: {
getList(isReset = false) {
var params = {
...this.searchForm,
pageNum: isReset ? 1 : this.$refs.mutiProRef.page.pageNum,
pageSize: isReset ? 10 : this.$refs.mutiProRef.page.pageSize
}
this.loading = true
this.$apis.giftBag.getFollowerStaffListApi(params).then(res => {
this.staffList = res.data
this.loading = false
this.fnCallBack = true
this.$refs.mutiProRef.tableTotal = res.count
this.recoverySelected()
this.$refs.mutiProRef.tableHeightValues = '50vh'
})
},
recoverySelected() {
if (this.selectedStaffList && this.selectedStaffList.length) {
this.selectedStaffList.forEach(row => {
row.userOneId = row.staffId
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row)
})
}
},
handleMutiSelectConfirm() {
// if (!this.staffList.length) {
// var params = {
// addOrEdit: 1,
// groupOrStore: this.userInfo.accountLevel == 4 ? 2 : 1,
// $title: '新建员工'
// }
// this.$router.push({
// path: '/productGroup/editProduct',
// query: params
// })
// return true
// }
var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName]
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!