|
@@ -6,7 +6,14 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="8" :sm="8">
|
|
|
<a-form-item label="账号所属人">
|
|
|
- <a-input placeholder="请输入所属人" v-model="queryParam.userName"></a-input>
|
|
|
+
|
|
|
+ <a-select placeholder="请选择所属人" showSearch optionFilterProp="children" style="width: 100%"
|
|
|
+ :filterOption="filterOption" v-model="queryParam.userId" v-if="userInfo().username == 'admin'">
|
|
|
+ <a-select-option v-for="appModel in optionsAll" :key="appModel.userId + new Date().getTime()"
|
|
|
+ :value="appModel.userId">{{ appModel.realName }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-input placeholder="请输入所属人" v-model="queryParam.userName" v-else></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template>
|
|
@@ -26,12 +33,8 @@
|
|
|
</a-col>
|
|
|
<a-col :md="8" :sm="8">
|
|
|
<a-form-item label="项目名称">
|
|
|
- <a-select
|
|
|
- v-model="queryParam.projectId"
|
|
|
- showSearch
|
|
|
- optionFilterProp="children"
|
|
|
- :filterOption="filterOption"
|
|
|
- >
|
|
|
+ <a-select v-model="queryParam.projectId" showSearch optionFilterProp="children"
|
|
|
+ :filterOption="filterOption">
|
|
|
<a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
|
|
|
{{ item.mediaId == '1' ? '头条' : '快手' }} {{
|
|
|
item.projectName
|
|
@@ -58,17 +61,8 @@
|
|
|
<br />
|
|
|
<!-- table区域-begin -->
|
|
|
<div>
|
|
|
- <a-table
|
|
|
- ref="table"
|
|
|
- size="middle"
|
|
|
- bordered
|
|
|
- rowKey="id"
|
|
|
- :columns="columns"
|
|
|
- :dataSource="dataSource"
|
|
|
- :pagination="ipagination"
|
|
|
- :loading="loading"
|
|
|
- @change="handleTableChange"
|
|
|
- >
|
|
|
+ <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
|
|
|
+ :pagination="ipagination" :loading="loading" @change="handleTableChange">
|
|
|
<span slot="accountStatus" slot-scope="text, record">
|
|
|
<!-- {{ text == 0 ? '启用' : '禁用' }} -->
|
|
|
|
|
@@ -95,60 +89,32 @@
|
|
|
<!-- 添加项目成员 -->
|
|
|
<a-modal title="账户转让" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading" :width="800">
|
|
|
<a-form :form="form">
|
|
|
- <a-form-item
|
|
|
- label="转户人"
|
|
|
- :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
- :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- v-decorator="['transferor']"
|
|
|
- showSearch
|
|
|
- optionFilterProp="children"
|
|
|
- :filterOption="filterOption"
|
|
|
- style="width:100%"
|
|
|
- disabled
|
|
|
- >
|
|
|
+ <a-form-item label="转户人" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
|
|
|
+ <a-select v-decorator="['transferor']" showSearch optionFilterProp="children" :filterOption="filterOption"
|
|
|
+ style="width:100%" disabled>
|
|
|
<a-select-option :value="item.userId" v-for="(item, index) of options" :key="index">
|
|
|
{{ item.realName }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- <a-form-item
|
|
|
- label="受让人"
|
|
|
- :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
- :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- v-decorator="['assignee', { rules: [{ required: true, message: '请选择受让人' }] }]"
|
|
|
- placeholder="请选择受让人"
|
|
|
- showSearch
|
|
|
- optionFilterProp="children"
|
|
|
- :filterOption="filterOption"
|
|
|
- style="width:100%"
|
|
|
- >
|
|
|
+ <a-form-item label="受让人" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
|
|
|
+ <a-select v-decorator="['assignee', { rules: [{ required: true, message: '请选择受让人' }] }]" placeholder="请选择受让人"
|
|
|
+ showSearch optionFilterProp="children" :filterOption="filterOption" style="width:100%">
|
|
|
<a-select-option :value="item.userId" v-for="(item, index) of options" :key="index">
|
|
|
{{ item.realName }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- <a-form-item
|
|
|
- label="转户人绩效截止日期"
|
|
|
- :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
- :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- >
|
|
|
- <a-date-picker
|
|
|
- v-decorator="['transferorDate', { rules: [{ required: true, message: '请选择转户人绩效截止日期' }] }]"
|
|
|
- />
|
|
|
+ <a-form-item label="转户人绩效截止日期" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
|
|
|
+ <a-date-picker v-decorator="['transferorDate', { rules: [{ required: true, message: '请选择转户人绩效截止日期' }] }]" />
|
|
|
<!-- , { initialValue:moment(new Date(), 'YYYY-MM-DD') } -->
|
|
|
</a-form-item>
|
|
|
- <a-form-item
|
|
|
- label="受让人绩效开始日期"
|
|
|
- :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
- :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- >
|
|
|
- <a-date-picker
|
|
|
- v-decorator="['assigneeDate', { rules: [{ required: true, message: '请选择受让人绩效截止日期' }] }]"
|
|
|
- />
|
|
|
+ <a-form-item label="受让人绩效开始日期" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
|
|
|
+ <a-date-picker v-decorator="['assigneeDate', { rules: [{ required: true, message: '请选择受让人绩效截止日期' }] }]" />
|
|
|
</a-form-item>
|
|
|
<!--
|
|
|
<a-form-item
|
|
@@ -166,194 +132,222 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import UserAllocationModal from './modules/UserAllocationModal'
|
|
|
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
-import { httpAction, getAction, deleteAction } from '@/api/manage'
|
|
|
+ import UserAllocationModal from './modules/UserAllocationModal'
|
|
|
+ import {
|
|
|
+ JeecgListMixin
|
|
|
+ } from '@/mixins/JeecgListMixin'
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex'
|
|
|
+ import {
|
|
|
+ httpAction,
|
|
|
+ getAction,
|
|
|
+ deleteAction
|
|
|
+ } from '@/api/manage'
|
|
|
|
|
|
-import treeSelect from './modules/Treeselect'
|
|
|
-import moment from 'moment'
|
|
|
-import { postAction } from '../../../api/manage'
|
|
|
-export default {
|
|
|
- name: 'UserAllocationList',
|
|
|
- mixins: [JeecgListMixin],
|
|
|
- components: {
|
|
|
- UserAllocationModal,
|
|
|
- treeSelect
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- description: '账号绑定管理页面',
|
|
|
- visibleAdd: false,
|
|
|
- options: [],
|
|
|
- dataElse: [],
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- {
|
|
|
- title: '账号所属人',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'userName'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '授权',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'accountId'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '广告主名称',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'advertiserName'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '项目名称',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'projectName'
|
|
|
- },
|
|
|
- // {
|
|
|
- // title: '输入账号 --登陆',
|
|
|
- // align:"center",
|
|
|
- // dataIndex: 'accountName'
|
|
|
- // },
|
|
|
- {
|
|
|
- title: '授权名称',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'authName'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '平台类型',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'mediaId',
|
|
|
- scopedSlots: { customRender: 'mediaId' }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '预警金额',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'warningAmount'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '预警比例',
|
|
|
- align: 'center',
|
|
|
- dataIndex: 'warningProportion'
|
|
|
- },
|
|
|
- // accountStatus:0启用;1禁用
|
|
|
- {
|
|
|
- title: '账户状态',
|
|
|
- dataIndex: 'accountStatus',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'accountStatus' }
|
|
|
- },
|
|
|
+ import treeSelect from './modules/Treeselect'
|
|
|
+ import moment from 'moment'
|
|
|
+ import {
|
|
|
+ postAction
|
|
|
+ } from '../../../api/manage'
|
|
|
+ export default {
|
|
|
+ name: 'UserAllocationList',
|
|
|
+ mixins: [JeecgListMixin],
|
|
|
+ components: {
|
|
|
+ UserAllocationModal,
|
|
|
+ treeSelect
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ description: '账号绑定管理页面',
|
|
|
+ visibleAdd: false,
|
|
|
+ options: [],
|
|
|
+ optionsAll: [],
|
|
|
+ dataElse: [],
|
|
|
+ // 表头
|
|
|
+ columns: [{
|
|
|
+ title: '账号所属人',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'userName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '授权',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'accountId'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '广告主名称',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'advertiserName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '项目名称',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'projectName'
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // title: '输入账号 --登陆',
|
|
|
+ // align:"center",
|
|
|
+ // dataIndex: 'accountName'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ title: '授权名称',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'authName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '平台类型',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'mediaId',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'mediaId'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '预警金额',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'warningAmount'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '预警比例',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'warningProportion'
|
|
|
+ },
|
|
|
+ // accountStatus:0启用;1禁用
|
|
|
+ {
|
|
|
+ title: '账户状态',
|
|
|
+ dataIndex: 'accountStatus',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'accountStatus'
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- title: '系统名称',
|
|
|
- dataIndex: 'systemType',
|
|
|
- align: 'center'
|
|
|
+ {
|
|
|
+ title: '系统名称',
|
|
|
+ dataIndex: 'systemType',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'action'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ url: {
|
|
|
+ list: '/ctop/userAllocation/list',
|
|
|
+ delete: '/ctop/userAllocation/delete',
|
|
|
+ deleteBatch: '/ctop/userAllocation/deleteBatch',
|
|
|
+ exportXlsUrl: 'ctop/userAllocation/exportXls',
|
|
|
+ importExcelUrl: 'ctop/userAllocation/importExcel'
|
|
|
},
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'action',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
- }
|
|
|
- ],
|
|
|
- url: {
|
|
|
- list: '/ctop/userAllocation/list',
|
|
|
- delete: '/ctop/userAllocation/delete',
|
|
|
- deleteBatch: '/ctop/userAllocation/deleteBatch',
|
|
|
- exportXlsUrl: 'ctop/userAllocation/exportXls',
|
|
|
- importExcelUrl: 'ctop/userAllocation/importExcel'
|
|
|
- },
|
|
|
- confirmLoading: false,
|
|
|
- projectId: '',
|
|
|
- accountId: '',
|
|
|
- mediaId: '',
|
|
|
- form: this.$form.createForm(this)
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- importExcelUrl: function() {
|
|
|
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.getParticipateList()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- moment,
|
|
|
- onChangeSwitch(item) {
|
|
|
- console.log(item)
|
|
|
- var params = {}
|
|
|
- params.id = item.id
|
|
|
- params.accountStatus = item.accountStatus == 0 ? 1 : 0
|
|
|
-
|
|
|
- httpAction('/ctop/userAllocation/edit', params, 'put').then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.loadData()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getParticipateList() {
|
|
|
- getAction('/ctop/projectMember/participateList', {
|
|
|
- userId: this.userInfo().id
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.dataElse = res.result
|
|
|
- }
|
|
|
- })
|
|
|
+ confirmLoading: false,
|
|
|
+ projectId: '',
|
|
|
+ accountId: '',
|
|
|
+ mediaId: '',
|
|
|
+ form: this.$form.createForm(this)
|
|
|
+ }
|
|
|
},
|
|
|
- filterOption(input, option) {
|
|
|
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ computed: {
|
|
|
+ importExcelUrl: function () {
|
|
|
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
|
+ }
|
|
|
},
|
|
|
- ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
- getALLperson() {
|
|
|
- getAction('/sys/user/getAllUserListByCompany', { userId: this.userInfo().id }).then(res => {
|
|
|
+ mounted() {
|
|
|
+ this.getParticipateList()
|
|
|
+ getAction('/sys/user/getAllUserList', '').then(res => {
|
|
|
+ console.log(res)
|
|
|
if (res.success) {
|
|
|
- this.options = res.result
|
|
|
+ this.optionsAll = res.result
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- project(item) {
|
|
|
- console.log(item)
|
|
|
- this.visibleAdd = true
|
|
|
- this.accountId = item.accountId
|
|
|
- this.projectId = item.projectId
|
|
|
+ methods: {
|
|
|
+ moment,
|
|
|
+ onChangeSwitch(item) {
|
|
|
+ console.log(item)
|
|
|
+ var params = {}
|
|
|
+ params.id = item.id
|
|
|
+ params.accountStatus = item.accountStatus == 0 ? 1 : 0
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- this.form.setFieldsValue({ transferor: item.userId })
|
|
|
- }, 0)
|
|
|
- this.getALLperson()
|
|
|
- },
|
|
|
- handleOkAdd(e) {
|
|
|
- this.confirmLoading = true
|
|
|
+ httpAction('/ctop/userAllocation/edit', params, 'put').then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.loadData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getParticipateList() {
|
|
|
+ getAction('/ctop/projectMember/participateList', {
|
|
|
+ userId: this.userInfo().id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.dataElse = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ filterOption(input, option) {
|
|
|
+ return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ },
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
+ getALLperson() {
|
|
|
+ getAction('/sys/user/getAllUserListByCompany', {
|
|
|
+ userId: this.userInfo().id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.options = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ project(item) {
|
|
|
+ console.log(item)
|
|
|
+ this.visibleAdd = true
|
|
|
+ this.accountId = item.accountId
|
|
|
+ this.projectId = item.projectId
|
|
|
|
|
|
- this.form.validateFieldsAndScroll((err, values) => {
|
|
|
- if (err) {
|
|
|
- // 这里做逻辑处理
|
|
|
- } else {
|
|
|
- var params = { ...values }
|
|
|
- params.transferorDate = moment(values.transferorDate).format('YYYY-MM-DD')
|
|
|
- params.assigneeDate = moment(values.assigneeDate)
|
|
|
- // .add(1, 'day')
|
|
|
- .format('YYYY-MM-DD')
|
|
|
- params.projectId = this.projectId
|
|
|
- params.accountId = this.accountId
|
|
|
- params.status = 0
|
|
|
- console.log(params)
|
|
|
- postAction('/ctop/transferAccount/add', params).then(res => {
|
|
|
- console.log(res)
|
|
|
- if (res.success) {
|
|
|
- this.confirmLoading = false
|
|
|
- this.visibleAdd = false
|
|
|
- this.form.resetFields()
|
|
|
- } else {
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ transferor: item.userId
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
+ }, 0)
|
|
|
+ this.getALLperson()
|
|
|
+ },
|
|
|
+ handleOkAdd(e) {
|
|
|
+ this.confirmLoading = true
|
|
|
+
|
|
|
+ this.form.validateFieldsAndScroll((err, values) => {
|
|
|
+ if (err) {
|
|
|
+ // 这里做逻辑处理
|
|
|
+ } else {
|
|
|
+ var params = {
|
|
|
+ ...values
|
|
|
+ }
|
|
|
+ params.transferorDate = moment(values.transferorDate).format('YYYY-MM-DD')
|
|
|
+ params.assigneeDate = moment(values.assigneeDate)
|
|
|
+ // .add(1, 'day')
|
|
|
+ .format('YYYY-MM-DD')
|
|
|
+ params.projectId = this.projectId
|
|
|
+ params.accountId = this.accountId
|
|
|
+ params.status = 0
|
|
|
+ console.log(params)
|
|
|
+ postAction('/ctop/transferAccount/add', params).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ this.confirmLoading = false
|
|
|
+ this.visibleAdd = false
|
|
|
+ this.form.resetFields()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-@import '~@assets/less/common.less';
|
|
|
-</style>
|
|
|
+ @import '~@assets/less/common.less';
|
|
|
+</style>
|