mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 04:29:36 +08:00
修改了小程序页面,修改了企业绑定用户模块,修改了管理用户绑定小程序用户和企业
This commit is contained in:
parent
432b5046d0
commit
828b9a1ad1
@ -3,7 +3,8 @@ import { axios } from '@/utils/request'
|
||||
const api = {
|
||||
customer: '/admin/customer', // 客户管理
|
||||
customerContacts: 'admin/contacts', // 客户管理-联系人
|
||||
customerAttachments: '/admin/attachments' // 客户管理-相关文件
|
||||
customerAttachments: '/admin/attachments', // 客户管理-相关文件
|
||||
icsCustomerStaff: '/admin/staff'
|
||||
}
|
||||
|
||||
export function getCustomerList (parameter) {
|
||||
@ -14,6 +15,34 @@ export function getCustomerList (parameter) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getStaffList (parameter) {
|
||||
return axios({
|
||||
url: api.icsCustomerStaff + '/list',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function getStaffListNotId (parameter) {
|
||||
return axios({
|
||||
url: api.icsCustomerStaff + '/getStaffListNotId',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function updateStaff (parameter) {
|
||||
return axios({
|
||||
url: api.icsCustomerStaff + '/update',
|
||||
method: 'post',
|
||||
data: parameter,
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function saveCustomer (parameter) {
|
||||
return axios({
|
||||
url: api.customer + (parameter.id > 0 ? '/update' : '/save'),
|
||||
|
@ -243,8 +243,8 @@
|
||||
</div>
|
||||
<a-table :pagination="false" :columns="contactsItemColumns" :dataSource="contactsItemData" rowKey="id">
|
||||
<template slot="operation" slot-scope="text, record">
|
||||
<a-button type="link" @click="$refs.contactModal.add(record)">编辑</a-button>
|
||||
<a-divider type="vertical" />
|
||||
<!-- <a-button type="link" @click="$refs.contactModal.add(record)">编辑</a-button>-->
|
||||
<!-- <a-divider type="vertical" />-->
|
||||
<a-popconfirm @confirm="handleDeleteContact(record)">
|
||||
<template slot="title">
|
||||
<span>确定删除 {{ record.name }} 吗?</span>
|
||||
@ -257,6 +257,7 @@
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="相关文件" key="4" v-if="$route.query.customerId">
|
||||
<customer-attachment-list :customer-id="$route.query.customerId"></customer-attachment-list>
|
||||
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-form>
|
||||
@ -268,7 +269,7 @@
|
||||
import moment from 'moment'
|
||||
import storage from 'store'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { saveCustomer, getCustomer, getQiXinBasicInfo, getCustomerContactsList, delCustomerContacts } from '@/api/admin/customer'
|
||||
import { saveCustomer, getCustomer, getQiXinBasicInfo, getCustomerContactsList,getStaffList, delCustomerContacts } from '@/api/admin/customer'
|
||||
import { getCustomerContractList } from '@/api/admin/customerContract'
|
||||
import CustomerContactsModal from './modules/CustomerContactsModal.vue'
|
||||
import CustomerAttachmentList from './modules/CustomerAttachmentList.vue'
|
||||
@ -324,16 +325,12 @@ export default {
|
||||
// 联系人列表表头
|
||||
contactsItemColumns: [
|
||||
{
|
||||
title: '签订人',
|
||||
dataIndex: 'name'
|
||||
title: '昵称',
|
||||
dataIndex: 'username',
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
dataIndex: 'phone'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'remark'
|
||||
title: '手机号',
|
||||
dataIndex: 'mobile',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -497,11 +494,11 @@ export default {
|
||||
},
|
||||
// 联系人列表
|
||||
getContastsList () {
|
||||
getCustomerContactsList({ customerId: this.$route.query.customerId }).then(res => {
|
||||
// console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.contactsItemData = res.rows
|
||||
}
|
||||
let param = {
|
||||
customerId: this.$route.query.customerId
|
||||
}
|
||||
getStaffList(param).then(res =>{
|
||||
this.contactsItemData =res.rows
|
||||
})
|
||||
},
|
||||
// 合同列表
|
||||
|
@ -1,48 +1,56 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="姓名">
|
||||
<a-input placeholder="请输入姓名" v-model="queryParam.username"/>
|
||||
<a-card :bordered='false'>
|
||||
<div class='table-page-search-wrapper'>
|
||||
<a-form layout='inline'>
|
||||
<a-row :gutter='48'>
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='姓名'>
|
||||
<a-input placeholder='请输入姓名' v-model='queryParam.username' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="电话">
|
||||
<a-input placeholder="请输入电话" v-model="queryParam.mobile"/>
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='电话'>
|
||||
<a-input placeholder='请输入电话' v-model='queryParam.mobile' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
<a-col :md='8' :sm='24'>
|
||||
<span class='table-page-search-submitButtons'>
|
||||
<a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
||||
<a-button style='margin-left: 8px' @click='() => queryParam = {}'>重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<a-dropdown v-if="removeEnable&&selectedRowKeys.length > 0">
|
||||
<a-button type="danger" icon="delete" @click="delByIds(selectedRowKeys)">删除</a-button>
|
||||
<div class='table-operator'>
|
||||
<a-button v-if='addEnable' type='primary' icon='plus' @click='$refs.modal.add()'>新建</a-button>
|
||||
<a-dropdown v-if='removeEnable&&selectedRowKeys.length > 0'>
|
||||
<a-button type='danger' icon='delete' @click='delByIds(selectedRowKeys)'>删除</a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<s-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
size='default'
|
||||
ref='table'
|
||||
rowKey='id'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
:columns='columns'
|
||||
:data='loadData'
|
||||
>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a v-if="removeEnable" @click="delByIds([record.id])">删除</a>
|
||||
<span slot='dataType' slot-scope='text,record'>
|
||||
<a-tag v-if='record.dataType == 1' color='pink'>
|
||||
企业员工
|
||||
</a-tag>
|
||||
<a-tag v-if='record.dataType == 2' color='green'>
|
||||
临时访客
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleEdit(record)'>编辑</a>
|
||||
<a-divider type='vertical' />
|
||||
<a v-if='removeEnable' @click='delByIds([record.id])'>删除</a>
|
||||
</span>
|
||||
</s-table>
|
||||
<icsCustomerStaff-modal ref="modal" @ok="handleOk"/>
|
||||
<icsCustomerStaff-modal ref='modal' @ok='handleOk' />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@ -59,7 +67,7 @@ export default {
|
||||
STable,
|
||||
IcsCustomerStaffModal
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@ -78,13 +86,18 @@ export default {
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '姓名',
|
||||
title: '用户昵称',
|
||||
dataIndex: 'username'
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
dataIndex: 'mobile'
|
||||
},
|
||||
{
|
||||
title: '数据类型',
|
||||
dataIndex: 'dataType',
|
||||
scopedSlots: { customRender: 'dataType' }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
@ -103,26 +116,25 @@ export default {
|
||||
removeEnable: checkPermission('admin:staff:remove')
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
},
|
||||
created () {
|
||||
filters: {},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
onSelectChange (selectedRowKeys, selectedRows) {
|
||||
onSelectChange(selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
},
|
||||
handleAdd () {
|
||||
handleAdd() {
|
||||
this.$refs.modal.add()
|
||||
},
|
||||
handleEdit (record) {
|
||||
handleEdit(record) {
|
||||
this.$refs.modal.edit(record)
|
||||
},
|
||||
handleOk () {
|
||||
handleOk() {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
},
|
||||
delByIds (ids) {
|
||||
delByIds(ids) {
|
||||
delIcsCustomerStaff({ ids: ids.join(',') }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('删除成功')
|
||||
|
@ -14,20 +14,38 @@
|
||||
<a-form-item style="display:none">
|
||||
<a-input v-decorator="['customerId']" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="联系人">
|
||||
<a-input placeholder="联系人" v-decorator="['name', {rules: [{required: true, message: '请输入联系人'}]}]"/>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="联系电话">
|
||||
<a-input placeholder="联系电话" v-decorator="['phone']"/>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
|
||||
<a-input placeholder="备注" v-decorator="['remark']"/>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="请选择手机号">
|
||||
<!-- <a-input placeholder="联系人" v-decorator="['name', {rules: [{required: true, message: '请输入联系人'}]}]"/>-->
|
||||
|
||||
<a-select
|
||||
show-search
|
||||
v-decorator="['mobile', {rules: [{required: true, message: '请选择手机号码'}]}]"
|
||||
placeholder="请选择手机号码"
|
||||
style="width: 200px"
|
||||
:default-active-first-option="false"
|
||||
:show-arrow="false"
|
||||
:filter-option="false"
|
||||
:not-found-content="null"
|
||||
@search="handleSearch"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option v-for="d in data" :key="d.id">
|
||||
{{ d.mobile }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
|
||||
</a-form-item>
|
||||
<!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="联系电话">-->
|
||||
<!-- <a-input placeholder="联系电话" v-decorator="['phone']"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">-->
|
||||
<!-- <a-input placeholder="备注" v-decorator="['remark']"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script>
|
||||
import { saveCustomerContacts } from '@/api/admin/customer'
|
||||
import { saveCustomerContacts,getStaffList,updateStaff,getStaffListNotId } from '@/api/admin/customer'
|
||||
import pick from 'lodash.pick'
|
||||
export default {
|
||||
name: 'CustomerContactsModal',
|
||||
@ -37,6 +55,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
staffId:'',
|
||||
visible: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@ -50,14 +69,30 @@ export default {
|
||||
mdl: {},
|
||||
customerId: undefined,
|
||||
contactId: undefined,
|
||||
form: this.$form.createForm(this)
|
||||
form: this.$form.createForm(this),
|
||||
data:[],
|
||||
}
|
||||
},
|
||||
beforeCreate () {
|
||||
},
|
||||
created () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleSearch(value){
|
||||
let param = {
|
||||
mobile:value
|
||||
}
|
||||
getStaffList(param).then(res =>{
|
||||
this.data =res.rows
|
||||
})
|
||||
},
|
||||
handleChange(value){
|
||||
console.log(value);
|
||||
this.staffId = value;
|
||||
// fetch(value, data => (this.data = data));
|
||||
},
|
||||
|
||||
add (contactInfo) {
|
||||
this.customerId = undefined
|
||||
this.customerId = contactInfo.customerId
|
||||
@ -65,6 +100,14 @@ export default {
|
||||
this.contactId = contactInfo.id
|
||||
this.form.resetFields()
|
||||
this.edit(contactInfo)
|
||||
|
||||
let param = {
|
||||
icsCustomerId:contactInfo.customerId
|
||||
}
|
||||
getStaffListNotId(param).then(res =>{
|
||||
this.data =res.rows
|
||||
})
|
||||
|
||||
},
|
||||
edit (record) {
|
||||
this.mdl = Object.assign(record)
|
||||
@ -81,8 +124,10 @@ export default {
|
||||
if (!err) {
|
||||
// values.customerId = this.customerId
|
||||
console.log('Received values of form: ', values)
|
||||
values.id = this.staffId
|
||||
console.log(values)
|
||||
this.confirmLoading = true
|
||||
saveCustomerContacts(values).then(res => {
|
||||
updateStaff(values).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
this.$emit('ok')
|
||||
|
@ -67,6 +67,30 @@
|
||||
<a-select-option v-for="item in customerList" :key="item.value" >{{ item.text }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="选择企业">
|
||||
<!-- <a-select v-decorator="['customerId', {rules: [{ required: true, message: '请选择企业' }]}]">-->
|
||||
<!-- <a-select-option v-for="item in customerList" :key="item.value" >{{ item.text }}</a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
|
||||
<a-select
|
||||
show-search
|
||||
v-decorator="['staffId', {rules: [{required: true, message: '请选择手机号码'}]}]"
|
||||
placeholder="请选择手机号码"
|
||||
style="width: 200px"
|
||||
:default-active-first-option="false"
|
||||
:show-arrow="false"
|
||||
:filter-option="false"
|
||||
:not-found-content="null"
|
||||
@search="handleSearch"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option v-for="d in data" :key="d.id">
|
||||
{{ d.mobile }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
|
||||
</a-form-item>
|
||||
|
||||
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="描述">
|
||||
<a-textarea :rows="3" placeholder="..." v-decorator="['remark']"/>
|
||||
@ -77,6 +101,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getRoleAll, saveUser, getUser } from '@/api/system'
|
||||
import { saveCustomerContacts,getStaffList,updateStaff,getStaffListNotId } from '@/api/admin/customer'
|
||||
|
||||
import {
|
||||
getCustomerList
|
||||
} from '@/api/admin/meeting/roomContent'
|
||||
@ -110,6 +136,7 @@ export default {
|
||||
confirmLoading: false,
|
||||
roleAll: [],
|
||||
mdl: {},
|
||||
data:[],
|
||||
customerList:[],
|
||||
deptCheck: true,
|
||||
spinning: false,
|
||||
@ -146,6 +173,17 @@ export default {
|
||||
this.loadRoleAll()
|
||||
},
|
||||
methods: {
|
||||
handleSearch(value){
|
||||
let param = {
|
||||
mobile:value
|
||||
}
|
||||
getStaffList(param).then(res =>{
|
||||
this.data =res.rows
|
||||
})
|
||||
},
|
||||
handleChange(){
|
||||
|
||||
},
|
||||
add () {
|
||||
this.form.resetFields()
|
||||
this.mdl = Object.assign({}, { id: 0, deptId: '' })
|
||||
@ -153,6 +191,13 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.mdl, 'id', 'username', 'nickname', 'status', 'mobile', 'roleIds','customerId', 'remark', 'deptId', 'parkId', 'tenantId'))
|
||||
})
|
||||
|
||||
let param = {
|
||||
}
|
||||
getStaffListNotId(param).then(res =>{
|
||||
this.data =res.rows
|
||||
})
|
||||
|
||||
},
|
||||
edit (record) {
|
||||
if (record.id > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user