diff --git a/src/api/admin/crm.js b/src/api/admin/crm.js
index a4a1b83..50c8718 100644
--- a/src/api/admin/crm.js
+++ b/src/api/admin/crm.js
@@ -413,7 +413,7 @@ export function printTemplateListAPI(data) {
*/
export function printTemplateByIdAPI(data) {
return request({
- url: 'crmPrint/queryPrintTemplateById',
+ url: 'admin/printing/read',
method: 'post',
data: data
})
@@ -488,7 +488,7 @@ export function printQueryFieldsAPI(data) {
*/
export function printPrintAPI(data) {
return request({
- url: 'crmPrint/print',
+ url: 'crm/printing/printingData',
method: 'post',
data: data
})
@@ -514,7 +514,7 @@ export function printCopyTemplateAPI(data) {
*/
export function printSaveRecordAPI(data) {
return request({
- url: 'crmPrint/savePrintRecord',
+ url: 'crm/printing/setRecord',
method: 'post',
data: data,
headers: {
@@ -530,7 +530,7 @@ export function printSaveRecordAPI(data) {
*/
export function printQueryPrintRecordAPI(data) {
return request({
- url: 'crmPrint/queryPrintRecord',
+ url: 'crm/printing/getRecord',
method: 'post',
data: data
})
@@ -543,7 +543,7 @@ export function printQueryPrintRecordAPI(data) {
*/
export function printRecordDetailAPI(data) {
return request({
- url: 'crmPrint/queryPrintRecordById',
+ url: 'crm/printing/printingData',
method: 'post',
data: data
})
@@ -556,7 +556,7 @@ export function printRecordDetailAPI(data) {
*/
export function printPreviewAPI(data) {
return request({
- url: 'crmPrint/preview',
+ url: 'crm/printing/preview',
method: 'post',
data: data
})
diff --git a/src/api/admin/employeeDep.js b/src/api/admin/employeeDep.js
index e36cbed..ca9555a 100644
--- a/src/api/admin/employeeDep.js
+++ b/src/api/admin/employeeDep.js
@@ -171,3 +171,27 @@ export function userErrorExcelDownAPI(data) {
responseType: 'blob'
})
}
+/**
+ * 员工数量
+ * @param {*} data
+ */
+export function adminUserCountNumOfUserAPI() {
+ return request({
+ url: 'admin/users/countNumOfUser',
+ method: 'post'
+ })
+}
+/**
+ * 重置部门
+ * @param {*} data
+ */
+export function adminUserSetUserDeptPI(data) {
+ return request({
+ url: 'admin/users/setUserDept',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ }
+ })
+}
diff --git a/src/api/admin/log.js b/src/api/admin/log.js
new file mode 100644
index 0000000..498ef56
--- /dev/null
+++ b/src/api/admin/log.js
@@ -0,0 +1,80 @@
+import request from '@/utils/request'
+
+/**
+ * 查询系统登录日志列表页接口
+ * @param {*} data
+ */
+export function queryLoginLogListAPI(data) {
+ return request({
+ url: 'admin/log/loginRecord',
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ data: data
+ })
+}
+
+/**
+ * 系统登录日志导出
+ * @param {*} data
+ */
+// export function loginLogExportAPI(data) {
+// return request({
+// url: 'admin/log/excelImport',
+// method: 'post',
+// data: data,
+// responseType: 'blob',
+// headers: {
+// 'Content-Type': 'application/json;charset=UTF-8'
+// },
+// timeout: 60000
+// })
+// }
+
+/**
+ * 查看系统操作日志接口
+ * @param {*} data
+ */
+export function querySystemLogListAPI(data) {
+ return request({
+ url: 'admin/log/systemRecord',
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ data: data
+ })
+}
+
+/**
+ * 查看数据操作日志接口
+ * @param {*} data
+ */
+export function queryDataOptionLogListAPI(data) {
+ return request({
+ url: 'admin/log/dataRecord',
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ data: data
+ })
+}
+
+/**
+ * 系统日志导出
+ * @param {*} data
+ */
+export function systemLogExportAPI(data) {
+ return request({
+ url: 'admin/log/excelImport',
+ method: 'post',
+ data: data,
+ responseType: 'blob',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ timeout: 60000
+ })
+}
diff --git a/src/api/common.js b/src/api/common.js
index 3681670..73b980f 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -130,10 +130,12 @@ export function webFileSaveAPI(data) {
var param = new FormData()
Object.keys(data).forEach(key => {
param.append(key, data[key])
- param.append('isPublic', '1')
+ // param.append('isPublic', '1')
+ param.append('module', 'print')
+ param.append('type', 'img')
})
return request({
- url: 'adminFile/upload',
+ url: 'admin/file/save',
method: 'post',
data: param,
headers: {
@@ -210,7 +212,7 @@ export function crmFileUpdateAPI(data) {
*/
export function crmFileDownByPathAPI(data) {
return request({
- url: 'crmPrint/down',
+ url: 'crm/printing/down',
method: 'post',
data: data,
responseType: 'blob'
@@ -330,9 +332,9 @@ export function systemMessageDeleteByIdAPI(data) {
})
}
-export function downloadFileAPI(data) {
+export function downloadFileAPI(data, url) {
return request({
- url: 'admin/file/download',
+ url: `${url || `admin/file/download`}`,
method: 'post',
data,
responseType: 'blob'
diff --git a/src/api/crm/common.js b/src/api/crm/common.js
index e6c5785..096c041 100644
--- a/src/api/crm/common.js
+++ b/src/api/crm/common.js
@@ -92,7 +92,7 @@ export function filedUpdateTableFieldAPI(data) {
*/
export function filedGetPoolTableFieldAPI(data) {
return request({
- url: 'admin/field/getField',
+ url: 'crm/customerPool/field',
method: 'post',
data: data
})
@@ -245,7 +245,7 @@ export function crmFieldConfigAPIIndexAPI(data) {
*/
export function crmPoolFieldConfigIndexAPI(data) {
return request({
- url: 'admin/field/configIndex',
+ url: 'crm/customerPool/fieldConfig',
method: 'post',
data: data
})
@@ -269,7 +269,7 @@ export function crmFieldConfigAPI(data) {
*/
export function crmPoolFieldConfigAPI(data) {
return request({
- url: 'admin/field/config',
+ url: 'crm/customerPool/setFieldConfig',
method: 'post',
data: data
})
@@ -296,7 +296,7 @@ export function crmFieldColumnWidthAPI(data) {
*/
export function crmPoolFieldColumnWidthAPI(data) {
return request({
- url: 'crmField/setPoolFieldStyle',
+ url: 'crm/customerPool/setFieldWidth',
method: 'post',
data: data,
headers: {
diff --git a/src/api/crm/contract.js b/src/api/crm/contract.js
index ced2d45..e07ba93 100644
--- a/src/api/crm/contract.js
+++ b/src/api/crm/contract.js
@@ -264,3 +264,18 @@ export function crmContractQueryVisitAPI(data) {
}
})
}
+
+/**
+ *
+ * @param {*} data
+ */
+export function crmContractQueryListByProductIdAPI(data) {
+ return request({
+ url: 'bi/product/listProduct',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ }
+ })
+}
diff --git a/src/api/crm/customer.js b/src/api/crm/customer.js
index ea374ba..3e894eb 100644
--- a/src/api/crm/customer.js
+++ b/src/api/crm/customer.js
@@ -46,7 +46,7 @@ export function crmCustomerDeleteAPI(data) {
*/
export function crmCustomerPoolListAPI(data) {
return request({
- url: 'crm/customer/pool',
+ url: 'crm/customerPool/index',
method: 'post',
data: data
})
@@ -58,7 +58,7 @@ export function crmCustomerPoolListAPI(data) {
*/
export function crmCustomerPoolDeleteAPI(data) {
return request({
- url: 'crm/customer/delete',
+ url: 'crm/customerPool/delete',
method: 'post',
data: data,
headers: {
@@ -73,7 +73,7 @@ export function crmCustomerPoolDeleteAPI(data) {
*/
export function crmCustomerPoolSetAPI(data) {
return request({
- url: 'crmCustomerPool/setCustomerPool',
+ url: 'admin/setting/setPool',
method: 'post',
data: data,
headers: {
@@ -88,7 +88,7 @@ export function crmCustomerPoolSetAPI(data) {
*/
export function crmCustomerPoolSetListAPI(data) {
return request({
- url: 'crmCustomerPool/queryPoolSettingList',
+ url: 'admin/setting/pool',
method: 'post',
data: data,
headers: {
@@ -102,7 +102,7 @@ export function crmCustomerPoolSetListAPI(data) {
*/
export function crmCustomerPoolSetDeleteAPI(data) {
return request({
- url: 'crmCustomerPool/deleteCustomerPool',
+ url: 'admin/setting/deletePool',
method: 'post',
data: data
})
@@ -114,7 +114,7 @@ export function crmCustomerPoolSetDeleteAPI(data) {
*/
export function crmCustomerPoolSetDetailAPI(data) {
return request({
- url: 'crmCustomerPool/queryPoolById',
+ url: 'admin/setting/readPool',
method: 'post',
data: data
})
@@ -126,7 +126,7 @@ export function crmCustomerPoolSetDetailAPI(data) {
*/
export function crmCustomerPoolSetChangeStatusAPI(data) {
return request({
- url: 'crmCustomerPool/changeStatus',
+ url: 'admin/setting/changePool',
method: 'post',
data: data
})
@@ -140,7 +140,7 @@ export function crmCustomerPoolSetChangeStatusAPI(data) {
*/
export function crmCustomerPoolSetTransferAPI(data) {
return request({
- url: 'crmCustomerPool/transfer',
+ url: 'admin/setting/transferPool',
method: 'post',
data: data
})
@@ -152,7 +152,7 @@ export function crmCustomerPoolSetTransferAPI(data) {
*/
export function crmCustomerPoolSetNameListAPI(data) {
return request({
- url: 'crmCustomerPool/queryPoolNameList',
+ url: 'admin/setting/pool',
method: 'post',
data: data
})
@@ -164,7 +164,7 @@ export function crmCustomerPoolSetNameListAPI(data) {
*/
export function crmCustomerPoolNameListAPI(data) {
return request({
- url: 'crmCustomerPool/queryPoolNameListByAuth',
+ url: 'crm/customerPool/pondList',
method: 'post',
data: data
})
@@ -176,7 +176,7 @@ export function crmCustomerPoolNameListAPI(data) {
*/
export function crmCustomerPoolQueryLevelAPI(data) {
return request({
- url: 'crmCustomerPool/queryCustomerLevel',
+ url: 'admin/setting/customerLevel',
method: 'post',
data: data
})
@@ -187,7 +187,7 @@ export function crmCustomerPoolQueryLevelAPI(data) {
*/
export function crmCustomerReadAPI(data) {
return request({
- url: `crm/customer/read`,
+ url: `crm/${data.pool_id ? 'customerPool' : 'customer'}/read`,
method: 'post',
data: data
})
@@ -301,7 +301,7 @@ export function crmCustomerPoolExcelImportAPI(data) {
param.append(key, data[key])
})
return request({
- url: 'crmCustomerPool/uploadExcel',
+ url: 'crm/customerPool/import',
method: 'post',
data: param,
headers: {
@@ -325,13 +325,31 @@ export function crmCustomerDownloadExcelAPI(data) {
})
}
+/**
+ * 客户公海导入模板下载
+ * @param {*} data
+ *
+ */
+
+export function crmCustomerPoolDownloadExcelAPI(data) {
+ return request({
+ url: 'crm/customerPool/excelDownload',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ responseType: 'blob'
+ })
+}
+
/**
* 公海导出
* @param {*} data
*/
export function crmCustomerPoolExcelExportAPI(data) {
return request({
- url: 'crm/customer/poolExcelExport',
+ url: 'crm/customerPool/export',
method: 'post',
data: data,
headers: {
@@ -348,7 +366,7 @@ export function crmCustomerPoolExcelExportAPI(data) {
*/
export function crmCustomerPoolExcelAllExport(data) {
return request({
- url: 'crm/customer/poolExcelExport',
+ url: 'crm/customerPool/export',
method: 'post',
data: data,
responseType: 'blob',
@@ -364,7 +382,7 @@ export function crmCustomerPoolExcelAllExport(data) {
*/
export function crmCustomerPoolQueryPoolFieldAPI(data) {
return request({
- url: 'crmCustomerPool/queryPoolField',
+ url: 'admin/setting/poolField',
method: 'post',
data: data
})
@@ -376,7 +394,8 @@ export function crmCustomerPoolQueryPoolFieldAPI(data) {
*/
export function crmCustomerPoolQueryAuthAPI(data) {
return request({
- url: 'crm/customer/poolAuthority',
+ // url: 'crm/customer/poolAuthority',
+ url: 'crm/customerPool/authority',
method: 'post',
data: data
})
@@ -388,7 +407,7 @@ export function crmCustomerPoolQueryAuthAPI(data) {
*/
export function crmCustomerDistributeAPI(data) {
return request({
- url: 'crm/customer/distribute',
+ url: 'crm/customerPool/distribute',
method: 'post',
data: data,
headers: {
@@ -403,7 +422,7 @@ export function crmCustomerDistributeAPI(data) {
*/
export function crmCustomerReceiveAPI(data) {
return request({
- url: 'crm/customer/receive',
+ url: 'crm/customerPool/receive',
method: 'post',
data: data,
headers: {
diff --git a/src/api/crm/workbench.js b/src/api/crm/workbench.js
index 5a83fbd..29f0815 100644
--- a/src/api/crm/workbench.js
+++ b/src/api/crm/workbench.js
@@ -248,3 +248,49 @@ export function crmIndexUnContactCustomerAPI(data) {
}
})
}
+
+//* **********************************
+/**
+ *
+ * @param {*} data
+ */
+export function crmInstrumentExportRecordListAPI(data) {
+ return request({
+ url: '',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ }
+ })
+}
+
+/**
+ *
+ * @param {*} data
+ */
+export function crmInstrumentImportRecordListAPI(data) {
+ return request({
+ url: '',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ }
+ })
+}
+
+/**
+ *
+ * @param {*} data
+ */
+export function crmInstrumentDownloadRecordExcelAPI(data) {
+ return request({
+ url: '',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ }
+ })
+}
diff --git a/src/api/oa/examine.js b/src/api/oa/examine.js
index cddada8..1f300e3 100644
--- a/src/api/oa/examine.js
+++ b/src/api/oa/examine.js
@@ -18,7 +18,7 @@ export function oaAllExamineCategoryListAPI(data) {
*/
export function oaAllExamineCategorySortAPI(data) {
return request({
- url: 'oaExamineCategory/saveOrUpdateOaExamineSort',
+ url: 'oa/examine/examineSort',
method: 'post',
data: data,
headers: {
diff --git a/src/components/CRMImport/index.vue b/src/components/CRMImport/index.vue
index c9b84cb..f379dc0 100644
--- a/src/components/CRMImport/index.vue
+++ b/src/components/CRMImport/index.vue
@@ -68,12 +68,12 @@
四、请选择公海
-
+
+ :key="item.pool_id"
+ :label="item.pool_name"
+ :value="item.pool_id"/>
@@ -153,7 +153,9 @@ import {
import {
crmCustomerExcelImportAPI,
crmCustomerDownloadExcelAPI,
- crmCustomerPoolExcelImportAPI
+ crmCustomerPoolExcelImportAPI,
+ crmCustomerPoolNameListAPI,
+ crmCustomerPoolDownloadExcelAPI
} from '@/api/crm/customer'
import {
crmLeadsExcelImportAPI,
@@ -228,7 +230,7 @@ export default {
user: [],
// 公海数据
- poolId: '',
+ pool_id: '',
poolList: [],
stepsActive: 1,
@@ -422,7 +424,7 @@ export default {
params.file = this.file
params.owner_user_id = this.user.length > 0 ? this.user[0].id : ''
if (this.config.poolSelectShow) {
- params.poolId = this.poolId
+ params.pool_id = this.pool_id
}
const request = this.config.importRequest || {
@@ -517,12 +519,12 @@ export default {
// 下载模板操作
download() {
const request = this.config.templateRequest || {
- customer: crmCustomerDownloadExcelAPI,
+ customer: this.config.poolSelectShow ? crmCustomerPoolDownloadExcelAPI : crmCustomerDownloadExcelAPI,
leads: crmLeadsDownloadExcelAPI,
contacts: crmContactsDownloadExcelAPI,
product: crmProductDownloadExcelAPI
}[this.crmType]
- request()
+ request({ pool_id: this.config.poolSelectShow && this.pool_id })
.then(res => {
downloadExcelWithResData(res)
})
@@ -571,17 +573,13 @@ export default {
* 公海数据
*/
getPoolList() {
- // crmCustomerPoolNameListAPI()
- // .then(res => {
- // this.poolList = res.data || []
- // this.poolId = this.poolList.length > 0 ? this.poolList[0].poolId : ''
- // })
- // .catch(() => {
- // })
- this.poolList = [
- { 'poolId': 1, 'poolName': '系统默认公海', 'adminUserId': null, 'memberUserId': null, 'memberDeptId': null, 'status': null, 'preOwnerSetting': null, 'preOwnerSettingDay': null, 'receiveSetting': null, 'receiveNum': null, 'remindSetting': null, 'remindDay': null, 'putInRule': null, 'createUserId': null, 'createTime': null, 'companyId': null }
- ]
- this.poolId = 1
+ crmCustomerPoolNameListAPI()
+ .then(res => {
+ this.poolList = res.data || []
+ this.pool_id = this.poolList.length > 0 ? this.poolList[0].pool_id : ''
+ })
+ .catch(() => {
+ })
},
// 关闭操作
diff --git a/src/components/NewCom/WkDepSelect/index.vue b/src/components/NewCom/WkDepSelect/index.vue
index 811e1ec..8eca689 100644
--- a/src/components/NewCom/WkDepSelect/index.vue
+++ b/src/components/NewCom/WkDepSelect/index.vue
@@ -296,6 +296,7 @@ export default {
* 删除
*/
deleteDep(index) {
+ if (this.disabled) return
// 直接 splice ,dataValue watch 的老旧值相同,复制之后新旧值不相同。暂时解决
const dataValue = objDeepCopy(this.dataValue)
dataValue.splice(index, 1)
diff --git a/src/components/XrUpgradeDialog.vue b/src/components/XrUpgradeDialog.vue
index fd457ce..b9c7577 100644
--- a/src/components/XrUpgradeDialog.vue
+++ b/src/components/XrUpgradeDialog.vue
@@ -33,27 +33,14 @@ export default {
},
data() {
return {
- message: `修复:
-1、修复自定义字段设置隐藏生效问题;
-2、修复线索自定义字段转化字段设置生效问题;
-3、修复导入数据超过100条部分的数据无法导入问题;
-4、修复新建场景保存报错问题;
-5、修复客户新建后显示为公海客户,无法操作问题;
-6、修复多选字段高级筛选不生效问题;
-7、修复产品编辑报错问题;
-8、修复部门、人员字段列表展示问题;
-9、修复手机、邮箱字段详情编辑校验问题;
-10、修复活动记录展示其他客户信息的问题;
-11、修复系统提示:“账号在其他地方登录”问题;
-12、修复待办事项今日需联系客户标记完成不生效问题;
-13、修复仪表盘数据统计错误问题;
-14、修复仪表盘遗忘提醒数据查询统计错误问题;
-15、修复仪表盘自定义时间、部门筛选数据统计错误问题;
-16、修复商业智能自定义时间筛选数据统计错误问题;
-17、修复商业智能部门、人员默认筛选数据统计错误问题;
-18、修复 72crm-11.0-web(PHP版)部署后部门、成员不展示问题;
-19、修复其他已知bug。
-20、新增商业智能导出功能。`
+ message: `新增:
+ 1、客户管理模块字段授权
+ 2、客户管理模块打印模板
+ 3、客户管理多公海模块
+ 4、数据操作日志
+ 5、系统操作日志
+ 6、登录日志
+ 7、员工管理增加批量重设部门的功能`
}
},
computed: {},
diff --git a/src/config.js b/src/config.js
index 531355c..3a65b86 100644
--- a/src/config.js
+++ b/src/config.js
@@ -3,7 +3,7 @@ const getLocationOrigin = () => {
}
const companyName = '悟空CRM'
-const version = 'V11.0.2'
+const version = 'V11.0.3'
const baiduKey = 'lcuOQ71SCZhqpxsr1vL2mXoplWEoVctL'
export default {
diff --git a/src/mixins/CustomFields.js b/src/mixins/CustomFields.js
index 9e7eeda..06546be 100644
--- a/src/mixins/CustomFields.js
+++ b/src/mixins/CustomFields.js
@@ -250,7 +250,7 @@ export default {
* 获取客户位置提交参数
*/
getCustomerAddressParams(params, dataValue) {
- params['address'] = dataValue.address
+ params['address'] = (dataValue.address && dataValue.address.filter(item => item).length > 0)
? dataValue.address
: ''
params['detail_address'] = dataValue.detail_address
@@ -298,14 +298,19 @@ export default {
if (dataValue) {
return dataValue
}
- delete data[field.field]
- return
+ // delete data[field.field]
+ return ''
} else if (field.form_type == 'datetime') {
if (dataValue) {
return moment(dataValue).unix()
}
- delete data[field.field]
- return
+ // delete data[field.field]
+ return ''
+ } else if (field.form_type == 'number') {
+ if (dataValue) {
+ return dataValue
+ }
+ return ''
}
return dataValue
diff --git a/src/router/modules/admin.js b/src/router/modules/admin.js
index 4444406..ee0c98e 100644
--- a/src/router/modules/admin.js
+++ b/src/router/modules/admin.js
@@ -150,24 +150,24 @@ export default [
permissions: ['manage', 'crm', 'field']
}
},
- // {
- // path: 'customer',
- // component: () => import('@/views/admin/crm/customer'),
- // meta: {
- // title: '客户公海规则设置',
- // requiresAuth: true,
- // permissions: ['manage', 'crm', 'pool']
- // }
- // },
- { // 临时 使用 后期删除
+ {
path: 'customer',
- component: () => import('@/views/admin/crm/customerPool'),
+ component: () => import('@/views/admin/crm/customer'),
meta: {
title: '客户公海规则设置',
requiresAuth: true,
permissions: ['manage', 'crm', 'pool']
}
},
+ // { // 临时 使用 后期删除
+ // path: 'customer',
+ // component: () => import('@/views/admin/crm/customerPool'),
+ // meta: {
+ // title: '客户公海规则设置',
+ // requiresAuth: true,
+ // permissions: ['manage', 'crm', 'pool']
+ // }
+ // },
{
path: 'print-templates',
component: () => import('@/views/admin/crm/printTemplates'),
@@ -216,6 +216,39 @@ export default [
}
}]
},
+ {
+ ...layout({
+ permissions: ['manage', 'adminLog'],
+ title: '系统日志',
+ icon: 'record'
+ }, '/manage/log/'),
+ alwaysShow: true,
+ children: [{
+ path: 'handle',
+ component: () => import('@/views/admin/log/DataHandleLog'),
+ meta: {
+ title: '数据操作日志',
+ requiresAuth: true,
+ permissions: ['manage', 'adminLog', 'actionRecord']
+ }
+ }, {
+ path: 'sys',
+ component: () => import('@/views/admin/log/SysHandleLog'),
+ meta: {
+ title: '系统操作日志',
+ requiresAuth: true,
+ permissions: ['manage', 'adminLog', 'systemLog']
+ }
+ }, {
+ path: 'login',
+ component: () => import('@/views/admin/log/LoginLog'),
+ meta: {
+ title: '登录日志',
+ requiresAuth: true,
+ permissions: ['manage', 'adminLog', 'loginLog']
+ }
+ }]
+ },
{
...layout({
permissions: ['manage', 'other_rule', 'setwelcome']
diff --git a/src/views/admin/crm/customer/components/DetailRecycleRule.vue b/src/views/admin/crm/customer/components/DetailRecycleRule.vue
index a467b6d..c8e8a9d 100644
--- a/src/views/admin/crm/customer/components/DetailRecycleRule.vue
+++ b/src/views/admin/crm/customer/components/DetailRecycleRule.vue
@@ -5,14 +5,14 @@
class="detail-recycle-rule__content">
选择不进入公海客户
- 已成交客户
- 有商机客户
+ 已成交客户
+ 有商机客户
-
所有客户统一设置
-
根据客户级别分别设置
+
所有客户统一设置
+
根据客户级别分别设置
+ prop="limit_day">
- {{ `超过${scope.row.limitDay}天${getLimitDayUnit(data.type)},进入公海` }}
+ {{ `超过${scope.row.limit_day}天${getLimitDayUnit(data.type)},进入公海` }}
diff --git a/src/views/admin/crm/customer/components/PoolAdd.vue b/src/views/admin/crm/customer/components/PoolAdd.vue
index 7090c96..1cefc28 100644
--- a/src/views/admin/crm/customer/components/PoolAdd.vue
+++ b/src/views/admin/crm/customer/components/PoolAdd.vue
@@ -28,7 +28,7 @@
label-position="top"
class="pool-add-items">
-
+
前负责人领取规则
-
+
不限制
限制
-
@@ -106,13 +106,13 @@
align="stretch">
领取频率规则
-
+
不限制
限制
-
@@ -123,13 +123,13 @@
align="stretch">
提醒规则
-
+
不提醒
提醒
-
@@ -140,14 +140,14 @@
align="stretch">
收回规则
-
+
自动回收
不自动回收
-
+
{{ item.name }}
@@ -251,7 +251,7 @@ export default {
loading: false,
baseFrom: null,
baseRules: {
- poolName: [
+ pool_name: [
{ required: true, message: '请输入公海名称', trigger: 'blur' }
],
adminUsers: [
@@ -265,9 +265,9 @@ export default {
levelCustomerName: [], // 客户级别数据源
customerPoolFields: [],
requestFields: {
- preOwnerSettingDay: '前负责人限制领取天数需大于0',
- receiveNum: '领取频率限制个数需大于0',
- remindDay: '提醒规则天数需大于0'
+ before_owner_day: '前负责人限制领取天数需大于0',
+ receive_count: '领取频率限制个数需大于0',
+ remain_day: '提醒规则天数需大于0'
}
}
},
@@ -309,7 +309,7 @@ export default {
getDetail() {
this.loading = true
crmCustomerPoolSetDetailAPI({
- poolId: this.action.id
+ pool_id: this.action.id
}).then(res => {
this.getEditInfo(res.data)
this.loading = false
@@ -319,20 +319,25 @@ export default {
},
getEditInfo(data) {
+ if (data.user_info) {
+ data.user_info.forEach(item => {
+ item.type = 'user'
+ })
+ }
this.baseFrom = {
- poolName: data.poolName,
- adminUsers: data.adminUser,
+ pool_name: data.pool_name,
+ adminUsers: data.admin_user_info,
memberUsers: {
- users: data.memberUser,
- strucs: data.memberDept
+ users: data.user_info,
+ strucs: data.department_info
},
- preOwnerSetting: data.preOwnerSetting, // 前负责人领取规则 0不限制 1限制
- preOwnerSettingDay: data.preOwnerSettingDay,
- receiveSetting: data.receiveSetting, // 0 不启用 1 启用
- remindSetting: data.remindSetting, // 0 不提醒 1 提醒
- receiveNum: data.receiveNum, // 领取频率规则
- remindDay: data.remindDay, // 提醒规则天数
- putInRule: data.putInRule // 收回规则 0不自动收回 1自动收回
+ before_owner_conf: data.before_owner_conf, // 前负责人领取规则 0不限制 1限制
+ before_owner_day: data.before_owner_day,
+ receive_conf: data.receive_conf, // 0 不启用 1 启用
+ remind_conf: data.remind_conf, // 0 不提醒 1 提醒
+ receive_count: data.receive_count, // 领取频率规则
+ remain_day: data.remain_day, // 提醒规则天数
+ recycle_conf: data.recycle_conf // 收回规则 0不自动收回 1自动收回
}
this.recycleRuleData = this.getEditRule(data.rule)
@@ -345,23 +350,23 @@ export default {
const baseRule = [
{
type: '',
- dealHandle: 1,
- businessHandle: 1,
- customerLevelSetting: 1,
+ deal_handle: 0,
+ business_handle: 0,
+ level_conf: 1,
level: []
},
{
type: '',
- dealHandle: 1,
- businessHandle: 1,
- customerLevelSetting: 1,
+ deal_handle: 0,
+ business_handle: 0,
+ level_conf: 1,
level: []
},
{
type: '',
- dealHandle: 1,
- businessHandle: 1,
- customerLevelSetting: 1,
+ deal_handle: 0,
+ business_handle: 0,
+ level_conf: 1,
level: []
}
]
@@ -369,7 +374,7 @@ export default {
if (detailRule) {
for (let index = 0; index < detailRule.length; index++) {
const element = detailRule[index]
- element.level = element.levelSetting
+ element.level = element.level_setting
baseRule.splice(element.type - 1, 1, element)
}
}
@@ -382,19 +387,19 @@ export default {
*/
getCreateInfo() {
this.baseFrom = {
- poolName: '',
+ pool_name: '',
adminUsers: [],
memberUsers: {
users: [],
strucs: []
},
- preOwnerSetting: 0, // 前负责人领取规则 0不限制 1限制
- preOwnerSettingDay: '',
- receiveSetting: 0, // 0 不启用 1 启用
- receiveNum: '', // 领取频率规则
- remindSetting: 0, // 0 不提醒 1 提醒
- remindDay: '', // 提醒规则天数
- putInRule: 1 // 收回规则 0不自动收回 1自动收回
+ before_owner_conf: 0, // 前负责人领取规则 0不限制 1限制
+ before_owner_day: '',
+ receive_conf: 0, // 0 不启用 1 启用
+ receive_count: '', // 领取频率规则
+ remind_conf: 0, // 0 不提醒 1 提醒
+ remain_day: '', // 提醒规则天数
+ recycle_conf: 1 // 收回规则 0不自动收回 1自动收回
}
this.recycleRuleData = this.getEditRule()
@@ -410,10 +415,18 @@ export default {
*/
getCustomerPoolFields(allFields) {
return new Promise((resolve, reject) => {
- crmCustomerPoolQueryPoolFieldAPI().then(res => {
+ crmCustomerPoolQueryPoolFieldAPI(
+ {
+ types: 'crm_customer',
+ module: 'crm',
+ action: 'pool',
+ controller: 'customer',
+ pool_id: this.action.id
+ }
+ ).then(res => {
const list = res.data || []
const baseField = list.map(item => {
- item.isHidden = item.isHidden = allFields ? 1 : 0
+ item.is_hidden = item.is_hidden = allFields ? 1 : 0
return item
})
if (allFields) {
@@ -436,16 +449,16 @@ export default {
for (let editIndex = 0; editIndex < allFields.length; editIndex++) {
const editItem = allFields[editIndex]
- // fieldId 存在 匹配fieldId 不存在 匹配 fieldName
- if (item.fieldId) {
- if (item.fieldId === editItem.fieldId) {
- item.settingId = editItem.settingId
- item.isHidden = editItem.isHidden
+ // field_id 存在 匹配fieldId 不存在 匹配 field_name
+ if (item.field_id) {
+ if (item.field_id === editItem.field_id) {
+ item.setting_id = editItem.setting_id
+ item.is_hidden = editItem.is_hidden
}
} else {
- if (item.fieldName === editItem.fieldName) {
- item.settingId = editItem.settingId
- item.isHidden = editItem.isHidden
+ if (item.field === editItem.field_name) {
+ item.setting_id = editItem.setting_id
+ item.is_hidden = editItem.is_hidden
}
}
}
@@ -503,7 +516,7 @@ export default {
*/
uploadPoolSet(params) {
if (this.isEdit) {
- params.poolId = this.action.id
+ params.pool_id = this.action.id
}
this.loading = true
crmCustomerPoolSetAPI(params).then(res => {
@@ -520,11 +533,11 @@ export default {
* 必填字段验证
*/
requestFieldsVerify(key) {
- if (key == 'preOwnerSettingDay' && this.baseFrom.preOwnerSetting == 1 && (!this.baseFrom[key] || this.baseFrom[key] <= 0)) {
+ if (key == 'before_owner_day' && this.baseFrom.before_owner_conf == 1 && (!this.baseFrom[key] || this.baseFrom[key] <= 0)) {
return false
- } else if (key == 'receiveNum' && this.baseFrom.receiveSetting == 1 && (!this.baseFrom[key] || this.baseFrom[key] <= 0)) {
+ } else if (key == 'receive_count' && this.baseFrom.receive_conf == 1 && (!this.baseFrom[key] || this.baseFrom[key] <= 0)) {
return false
- } else if (key == 'remindDay' && this.baseFrom.remindSetting == 1 && (!this.baseFrom[key] || this.baseFrom[key] <= 0)) {
+ } else if (key == 'remain_day' && this.baseFrom.remind_conf == 1 && (!this.baseFrom[key] || this.baseFrom[key] <= 0)) {
return false
}
@@ -544,17 +557,17 @@ export default {
} else {
if (key == 'adminUsers') {
const adminUsers = this.baseFrom.adminUsers || []
- params.adminUserId = adminUsers.map(item => {
- return item.userId
+ params.admin_user_ids = adminUsers.map(item => {
+ return item.id
}).join(',')
} else if (key == 'memberUsers') {
const memberUserObj = this.baseFrom.memberUsers || {}
const adminUsers = memberUserObj.users || []
const adminStrucs = memberUserObj.strucs || []
- params.memberUserId = adminUsers.map(item => {
- return item.userId
+ params.user_ids = adminUsers.map(item => {
+ return item.id
}).join(',')
- params.memberDeptId = adminStrucs.map(item => {
+ params.department_ids = adminStrucs.map(item => {
return item.id
}).join(',')
} else {
@@ -564,7 +577,7 @@ export default {
}
// 收回规则 1 自动收回
- if (this.baseFrom.putInRule == 1) {
+ if (this.baseFrom.recycle_conf == 1) {
const ruleVerify = this.recycleRuleData.filter(item => {
return item.type
})
@@ -583,7 +596,7 @@ export default {
const newLevel = []
for (let levelIndex = 0; levelIndex < ruleItem.level.length; levelIndex++) {
const levelItem = ruleItem.level[levelIndex]
- if (levelItem.limitDay && levelItem.limitDay > 0) {
+ if (levelItem.limit_day && levelItem.limit_day > 0) {
rulePass = true
newLevel.push(levelItem)
}
@@ -604,7 +617,7 @@ export default {
}
const showFields = this.customerPoolFields.filter(item => {
- return item.isHidden == 0
+ return item.is_hidden == 0
})
if (showFields.length < 2) {
diff --git a/src/views/admin/crm/customer/components/PoolDetail.vue b/src/views/admin/crm/customer/components/PoolDetail.vue
index 5c2ad57..66a7ce9 100644
--- a/src/views/admin/crm/customer/components/PoolDetail.vue
+++ b/src/views/admin/crm/customer/components/PoolDetail.vue
@@ -17,11 +17,11 @@
-
+
- 客户数量:{{ detail.customerNum || 0 }}个
+ 客户数量:{{ detail.customer_count || 0 }}个
公海管理员
公海成员
前负责人领取规则
- {{ detail.preOwnerSetting == 1 ? `前负责人${detail.preOwnerSettingDay}天内不允许领取该客户` : '不限制' }}
+ {{ detail.before_owner_conf == 1 ? `前负责人${detail.before_owner_day}天内不允许领取该客户` : '不限制' }}
领取频率规则
- {{ detail.receiveSetting == 1 ? `每天最多领取${detail.receiveNum}个公海客户` : '不限制' }}
+ {{ detail.receive_conf == 1 ? `每天最多领取${detail.receive_count}个公海客户` : '不限制' }}
提醒规则
- {{ detail.remindSetting == 1 ? `提前${detail.remindDay}天提醒负责人` : '不提醒' }}
+ {{ detail.remind_conf == 1 ? `提前${detail.remain_day}天提醒负责人` : '不提醒' }}
收回规则
- 不自动回收
+ 不自动回收
{
- return item.isHidden === 0
+ return item.is_hidden === 0
}).map(item => {
return item.name
}).join(',')
@@ -158,7 +158,7 @@ export default {
getDetail() {
this.loading = true
crmCustomerPoolSetDetailAPI({
- poolId: this.id
+ pool_id: this.id
}).then(res => {
this.detail = res.data
this.loading = false
diff --git a/src/views/admin/crm/customer/components/PoolTransfer.vue b/src/views/admin/crm/customer/components/PoolTransfer.vue
index 54a7576..571fc03 100644
--- a/src/views/admin/crm/customer/components/PoolTransfer.vue
+++ b/src/views/admin/crm/customer/components/PoolTransfer.vue
@@ -12,9 +12,9 @@
+ :key="item.pool_id"
+ :label="item.pool_name"
+ :value="item.pool_id"/>
@@ -62,14 +62,14 @@ export default {
computed: {
list() {
return this.allList.filter(item => {
- return item.poolId != this.id
+ return item.pool_id != this.id
})
}
},
watch: {
list: {
handler() {
- this.selectId = this.list && this.list.length > 0 ? this.list[0].poolId : ''
+ this.selectId = this.list && this.list.length > 0 ? this.list[0].pool_id : ''
},
immediate: true
},
@@ -89,9 +89,9 @@ export default {
const loading = Loading.service({
target: document.querySelector(`.el-dialog[aria-label="转移"]`)
})
- crmCustomerPoolSetNameListAPI()
+ crmCustomerPoolSetNameListAPI({ limit: 9999 })
.then(res => {
- this.allList = res.data || []
+ this.allList = res.data.list || []
loading && loading.close()
})
.catch(() => {
@@ -115,8 +115,8 @@ export default {
target: document.querySelector(`.el-dialog[aria-label="转移"]`)
})
crmCustomerPoolSetTransferAPI({
- prePoolId: this.id,
- postPoolId: this.selectId
+ source_pool_id: this.id,
+ target_pool_id: this.selectId
})
.then(res => {
this.$message({
diff --git a/src/views/admin/crm/customer/components/RecycleRule.vue b/src/views/admin/crm/customer/components/RecycleRule.vue
index c071745..9415ae2 100644
--- a/src/views/admin/crm/customer/components/RecycleRule.vue
+++ b/src/views/admin/crm/customer/components/RecycleRule.vue
@@ -10,9 +10,9 @@
选择不进入公海客户
已成交客户已成交客户
@@ -20,12 +20,12 @@
有商机客户
+ v-model="data.business_handle"
+ :true-label="1"
+ :false-label="0">有商机客户
- 所有客户统一设置
+ 所有客户统一设置
+ prop="limit_day">
超过
-
+
天{{ limitDayUnit }},进入公海
@@ -47,7 +47,7 @@
- 根据客户级别分别设置
+ 根据客户级别分别设置
+ prop="limit_day">
超过
-
+
天{{ limitDayUnit }},进入公海
@@ -86,16 +86,16 @@ export default {
default: () => {
/**
* "type":1, // 收回规则判断类型 1跟进记录 2商机 3成交状态
- "dealHandle":0, // 已成交客户是否进入公海 0不进入 1进入
- "businessHandle":1, // 有商机客户是否进入公海 0不进入 1进入
+ "deal_handle":0, // 已成交客户是否进入公海 0不进入 1进入
+ "business_handle":1, // 有商机客户是否进入公海 0不进入 1进入
"level":1, // 客户级别 1全部 2 A(重要客户)3 B(普通客户)4 C(非优先 客户)
- "limitDay":30 // 公海规则限制天数
+ "limit_day":30 // 公海规则限制天数
*/
return {
type: '',
- dealHandle: 1,
- businessHandle: 1,
- customerLevelSetting: null,
+ deal_handle: 0,
+ business_handle: 0,
+ level_conf: null,
level: []
}
}
@@ -111,7 +111,7 @@ export default {
return {
allCustomerData: [{
level: '所有客户', // 客户级别 1全部 2 A(重要客户)3 B(普通客户)4 C(非优先客户)
- limitDay: ''
+ limit_day: ''
}],
levelCustomerData: []
}
@@ -149,7 +149,7 @@ export default {
}
},
watch: {
- 'data.customerLevelSetting': {
+ 'data.level_conf': {
handler(val, oldVal) {
if (val == 1) {
if (this.isEdit && oldVal == null) {
@@ -175,14 +175,14 @@ export default {
if (value && value.length) {
this.levelCustomerData = value.map(item => {
const obj = {
- limitDay: ''
+ limit_day: ''
}
obj.level = item
return obj
})
// 类型是2
- if (this.data.customerLevelSetting == 2) {
+ if (this.data.level_conf == 2) {
if (this.isEdit && this.levelCustomerData && this.levelCustomerData.length) {
this.data.level = this.getEditData(this.levelCustomerData, this.data.level)
}
@@ -202,7 +202,7 @@ export default {
for (let editIndex = 0; editIndex < editList.length; editIndex++) {
const editItem = editList[editIndex]
if (editItem.level == item.level) {
- item.limitDay = editItem.limitDay
+ item.limit_day = editItem.limit_day
}
}
}
@@ -214,7 +214,7 @@ export default {
* 阻挡输入
*/
inputLimit(data) {
- data.limitDay = data.limitDay.replace(/[^0-9]/g, '')
+ data.limit_day = data.limit_day.replace(/[^0-9]/g, '')
}
}
}
diff --git a/src/views/admin/crm/customer/index.vue b/src/views/admin/crm/customer/index.vue
index 7b827db..a13020e 100644
--- a/src/views/admin/crm/customer/index.vue
+++ b/src/views/admin/crm/customer/index.vue
@@ -27,22 +27,22 @@
@row-click="handleRowClick">
{
this.list = res.data.list
- this.total = res.data.totalRow
+ this.total = res.data.count
this.loading = false
})
.catch(() => {
@@ -200,34 +200,35 @@ export default {
* 格式化字段
*/
fieldFormatter(row, column) {
- if (column.property === 'adminUser') {
- const users = row['adminUser'] || []
- return users
- .map(item => {
- return item.realname
- })
- .join('、')
- } else if (column.property === 'memberUser') {
- const structures = row['memberDept'] || []
- let strName = structures
- .map(item => {
- return item.name
- })
- .join('、')
+ // if (column.property === 'admin_user_names') {
+ // const users = row['admin_user_names'] || []
+ // return users
+ // .map(item => {
+ // return item.realname
+ // })
+ // .join('、')
+ // } else if (column.property === 'user_names') {
+ // const structures = row['memberDept'] || []
+ // let strName = structures
+ // .map(item => {
+ // return item.name
+ // })
+ // .join('、')
- const users = row['memberUser'] || []
- const userName = users
- .map(item => {
- return item.realname
- })
- .join('、')
+ // const users = row['user_names'] || []
+ // const userName = users
+ // .map(item => {
+ // return item.realname
+ // })
+ // .join('、')
- if (strName && userName) {
- strName += '、'
- }
- const name = strName + userName
- return name
- } else if (column.property === 'status') {
+ // if (strName && userName) {
+ // strName += '、'
+ // }
+ // const name = strName + userName
+ // return name
+ // } else
+ if (column.property === 'status') {
if (row.status === 0) {
return '停用'
}
@@ -240,7 +241,7 @@ export default {
* 通过回调控制class
*/
cellClassName({ row, column, rowIndex, columnIndex }) {
- if (column.property === 'poolName') {
+ if (column.property === 'pool_name') {
return 'can-visit--underline'
} else {
return ''
@@ -262,8 +263,8 @@ export default {
* 当某一行被点击时会触发该事件
*/
handleRowClick(row, column, event) {
- if (column.property === 'poolName') {
- this.detailId = row.poolId
+ if (column.property === 'pool_name') {
+ this.detailId = row.pool_id
this.detailShow = true
}
},
@@ -275,12 +276,12 @@ export default {
if (type === 'edit') {
this.createAction = {
type: 'update',
- id: scope.row.poolId,
+ id: scope.row.pool_id,
data: scope.row
}
this.createShow = true
} else if (type === 'transfer') {
- this.detailId = scope.row.poolId
+ this.detailId = scope.row.pool_id
this.transferShow = true
} else if (type === 'delete') {
this.$confirm('您确定要删除吗?', '提示', {
@@ -290,7 +291,7 @@ export default {
})
.then(() => {
crmCustomerPoolSetDeleteAPI({
- poolId: scope.row.poolId
+ pool_id: scope.row.pool_id
})
.then(res => {
this.list.splice(scope.$index, 1)
@@ -319,7 +320,7 @@ export default {
)
.then(() => {
crmCustomerPoolSetChangeStatusAPI({
- poolId: scope.row.poolId,
+ pool_id: scope.row.pool_id,
status: scope.row.status === 0 ? 1 : 0
})
.then(res => {
diff --git a/src/views/admin/crm/printTemplates/PrintTemplateDetail.vue b/src/views/admin/crm/printTemplates/PrintTemplateDetail.vue
index 94b9e45..503dfde 100644
--- a/src/views/admin/crm/printTemplates/PrintTemplateDetail.vue
+++ b/src/views/admin/crm/printTemplates/PrintTemplateDetail.vue
@@ -32,7 +32,7 @@
@@ -86,13 +86,27 @@
justify="space-between"
class="table-top">
- {{ `${currentMenuData ? currentMenuData.label : ''}:${ total || 0 }` }}
+ {{ `${currentMenuData ? currentMenuData.label : ''}` }}{{ `:${userTotal || 0}` }}
+
+
+
+
+
包含子部门
-
-
-
- {{ scope.row.realname }}
-
+
+
+
+ 主账号
+ 负责人
+ {{ row.realname }}
+
+
+
+
+
@@ -473,7 +505,8 @@ import {
adminUsersUpdatePwdAPI,
adminUsersUsernameEditAPI,
adminUsersManagerUsernameEditAPI,
- usersEditStatusAPI
+ usersEditStatusAPI,
+ adminUserCountNumOfUserAPI
} from '@/api/admin/employeeDep'
import { userListAPI, depListAPI, listDialogAPI, usersListIndexAPI } from '@/api/common' // 直属上级接口
@@ -487,6 +520,8 @@ import XrHeader from '@/components/XrHeader'
import Reminder from '@/components/Reminder'
import SlideVerify from '@/components/SlideVerify'
import EditRoleDialog from './components/EditRoleDialog'
+import WkUserSelect from '@/components/NewCom/WkUserSelect'
+import EditDepDialog from './components/EditDepDialog'
import { chinaMobileRegex, objDeepCopy } from '@/utils'
@@ -499,7 +534,9 @@ export default {
XrHeader,
Reminder,
SlideVerify,
- EditRoleDialog
+ EditRoleDialog,
+ EditDepDialog,
+ WkUserSelect
},
data() {
return {
@@ -507,27 +544,42 @@ export default {
{
icon: 'wk wk-employees',
label: '所有员工',
- type: 'all'
+ type: 'all',
+ field: 'allUserCount',
+ count: 0,
+ tips: '未添加部门和角色的员工无法正常登录系统'
},
{
icon: 'wk wk-new-employee',
label: '新加入的员工',
- type: 'new'
+ type: 'new',
+ field: 'addNewlyCount',
+ count: 0,
+ tips: '入职7天内的员工'
},
{
icon: 'wk wk-active-employee',
label: '激活员工',
- type: 'active'
+ type: 'active',
+ field: 'activateCount',
+ count: 0,
+ tips: '已经登录系统的员工'
},
{
icon: 'wk wk-inactive-employee',
label: '未激活员工',
- type: 'inactive'
+ type: 'inactive',
+ field: 'inactiveCount',
+ count: 0,
+ tips: '未登录过系统的员工'
},
{
icon: 'wk wk-disable-employees',
label: '停用员工',
- type: 'disable'
+ type: 'disable',
+ field: 'disableCount',
+ count: 0,
+ tips: '已禁用的员工,无法登录系统'
}
],
// 右边导航
@@ -536,6 +588,7 @@ export default {
depSelect: '',
// 上级部门
superDepList: [],
+ depOwnerUserId: '', // 部门负责人
depCreateLabel: '',
allDepData: [], // 包含全部部门信息
showDepData: [],
@@ -569,6 +622,7 @@ export default {
width: '150'
}
],
+ isNeedChild: 1, // 是否展示子级部门 0不需要 1 需要
selectionList: [], // 批量勾选数据
tableData: [],
tableHeight: document.documentElement.clientHeight - 240, // 表的高度
@@ -673,7 +727,10 @@ export default {
bulkImportShow: false,
// 角色操作
editRoleType: '',
- editRoleDialogShow: false
+ editRoleDialogShow: false,
+ userTotal: 0, // 当前下总数,
+ editDepDialogShow: false
+
}
},
computed: {
@@ -787,7 +844,11 @@ export default {
icon: 'wk wk-edit'
})
}
-
+ temps.push({
+ name: '重置部门',
+ type: 'editDep',
+ icon: 'wk wk-employees'
+ })
return temps
},
@@ -828,6 +889,12 @@ export default {
*/
canSlideVerify() {
return chinaMobileRegex.test(this.resetUserNameForm.username)
+ },
+ /**
+ * 是查看部门员工
+ */
+ isDepUserShow() {
+ return this.currentMenuData && this.currentMenuData.structure_id
}
},
mounted() {
@@ -841,13 +908,43 @@ export default {
this.currentMenuData = this.employeeMenu[0]
this.getDepTreeList()
this.getUserList()
+ this.getUserCount()
},
methods: {
+ /**
+ * 编辑员工单选change
+ */
+ addUserSelectChange(item) {
+ if (item.field === 'structure_id') {
+ const options = this.optionsList.structure_id.list || []
+ const deptObj = options.find(o => o.id === this.formInline.structure_id)
+ if (deptObj) {
+ this.$set(this.formInline, 'parent_id', deptObj.owner_user_id || '')
+ }
+ }
+ },
+ /**
+ * 员工数量
+ */
+ getUserCount() {
+ this.depLoading = true
+ adminUserCountNumOfUserAPI().then(res => {
+ this.depLoading = false
+ const resData = res.data[0] || {}
+ this.employeeMenu.forEach(item => {
+ item.count = resData[item.field]
+ })
+ this.userTotal = this.currentMenuData.count
+ }).catch(() => {
+ this.depLoading = false
+ })
+ },
/**
* 选择部门
*/
changeDepClick(data) {
this.currentMenuData = data
+ this.userTotal = data.count
// this.structureValue = data.id
this.refreshUserList()
},
@@ -857,6 +954,7 @@ export default {
*/
changeUserClick(data) {
// this.structureValue = ''
+ this.userTotal = data.count
this.currentMenuData = data
this.refreshUserList()
},
@@ -879,7 +977,9 @@ export default {
limit: this.pageSize,
search: this.searchInput
}
-
+ if (this.isDepUserShow) {
+ params.isNeedChild = this.isNeedChild
+ }
if (this.currentMenuData) {
// 员工有type值
if (this.currentMenuData.type) {
@@ -959,7 +1059,10 @@ export default {
structure_id:
this.currentMenuData && this.currentMenuData.id
? this.currentMenuData.id
- : ''
+ : '',
+ parent_id: this.currentMenuData && this.currentMenuData.owner_user_id
+ ? this.currentMenuData.owner_user_id
+ : ''
}
this.employeeCreateDialog = true
},
@@ -1036,6 +1139,7 @@ export default {
this.depCreateLabelValue = ''
this.depCreateLabel = '新增部门'
this.depCreateTitle = '新增部门'
+ this.depOwnerUserId = ''
this.depSelect = id
this.getStructuresListBySuperior({ id: id, type: 'save' })
this.depCreateDialog = true
@@ -1084,6 +1188,7 @@ export default {
this.depCreateLabelValue = data.label
this.treeEditId = data.id
this.depSelect = data.pid
+ this.depOwnerUserId = data.owner_user_id
this.depCreateTitle = '编辑部门'
this.depCreateLabel = '编辑部门'
this.getStructuresListBySuperior({ id: data.id, type: 'update' })
@@ -1126,7 +1231,7 @@ export default {
// 新增或编辑确定按钮
submitDialog() {
if (this.depCreateLabel == '新增部门') {
- depSaveAPI({ name: this.depCreateLabelValue, pid: this.depSelect }).then(
+ depSaveAPI({ name: this.depCreateLabelValue, pid: this.depSelect, owner_user_id: this.depOwnerUserId }).then(
res => {
this.getDepList() // 增加了新部门 刷新数据
this.getDepTreeList()
@@ -1137,7 +1242,8 @@ export default {
depEditAPI({
name: this.depCreateLabelValue,
id: this.treeEditId,
- pid: this.depSelect
+ pid: this.depSelect,
+ owner_user_id: this.depOwnerUserId
}).then(res => {
this.$message.success('操作成功')
this.getDepTreeList()
@@ -1309,7 +1415,7 @@ export default {
})
: []
} else if (element.field === 'parent_id') {
- detail.parent_id = this.dialogData.parent_id
+ detail.parent_id = this.dialogData.parent_id || ''
} else if (element.field === 'structure_id') {
detail.structure_id = this.dialogData.structure_id
} else {
@@ -1323,6 +1429,8 @@ export default {
} else if (type === 'editRole' || type === 'copyRole') {
this.editRoleType = type
this.editRoleDialogShow = true
+ } else if (type === 'editDep') {
+ this.editDepDialogShow = true
}
},
// 重置密码 -- 关闭按钮
@@ -1692,9 +1800,8 @@ export default {
// .status > span {
// margin-right: 10px;
// }
-
.status-name {
- div {
+ .status-mark {
display: inline-block;
width: 6px;
height: 6px;
@@ -1702,7 +1809,31 @@ export default {
}
color: $xr-color-primary;
cursor: pointer;
+ .main-mark {
+ background-color: #ff6a00;
+ color: white;
+ border-radius: 2px;
+ font-size: 12px;
+ padding: 0px 4px;
+ margin: 0 3px;
+ }
}
+/* .status-name {
+ .status-mark {
+ display: inline-block;
+ width: 6px;
+ height: 6px;
+ border-radius: 3px;
+ }
+ div {
+ display: inline-block;
+ width: 6px;
+ height: 6px;
+ border-radius: 3px;
+ }
+ color: $xr-color-primary;
+ cursor: pointer;
+} */
/* 详情 */
.employee-dep-management /deep/ .el-dialog__wrapper {
margin-top: 60px !important;
@@ -1737,6 +1868,9 @@ export default {
}
.nav-dialog-div {
margin-bottom: 20px;
+ .wk-user-select {
+ flex: 1;
+ }
}
.nav-dialog-div {
.el-input,
diff --git a/src/views/admin/log/DataHandleLog.vue b/src/views/admin/log/DataHandleLog.vue
new file mode 100644
index 0000000..1299e2d
--- /dev/null
+++ b/src/views/admin/log/DataHandleLog.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/admin/log/LoginLog.vue b/src/views/admin/log/LoginLog.vue
new file mode 100644
index 0000000..12546f5
--- /dev/null
+++ b/src/views/admin/log/LoginLog.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+
+ 查询
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/admin/log/SysHandleLog.vue b/src/views/admin/log/SysHandleLog.vue
new file mode 100644
index 0000000..d7419f5
--- /dev/null
+++ b/src/views/admin/log/SysHandleLog.vue
@@ -0,0 +1,240 @@
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/admin/log/mixins/HandleLog.js b/src/views/admin/log/mixins/HandleLog.js
new file mode 100644
index 0000000..a8e880e
--- /dev/null
+++ b/src/views/admin/log/mixins/HandleLog.js
@@ -0,0 +1,226 @@
+export default {
+ data() {
+ return {
+ modelOptions: [{
+ label: '客户管理',
+ value: 'crm',
+ list: [{
+ label: '线索',
+ value: 'crm_leads'
+ }, {
+ label: '客户',
+ value: 'crm_customer'
+ }, {
+ label: '联系人',
+ value: 'crm_contacts'
+ }, {
+ label: '商机',
+ value: 'crm_business'
+ }, {
+ label: '合同',
+ value: 'crm_contract'
+ }, {
+ label: '回款',
+ value: 'crm_receivables'
+ }, {
+ label: '发票',
+ value: 'crm_invoice'
+ }, {
+ label: '回访',
+ value: 'crm_visit'
+ }, {
+ label: '产品',
+ value: 'crm_product'
+ }
+ // {
+ // label: '市场活动',
+ // value: 30
+ // }
+ ]
+ }, {
+ label: '办公管理',
+ value: 'oa',
+ list: [{
+ label: '日历',
+ value: 'oa_event'
+ }, {
+ label: '日志',
+ value: 'oa_log'
+ }]
+ }, {
+ label: '项目管理',
+ value: 'work',
+ list: [{
+ label: '项目',
+ value: 'work'
+ }, {
+ label: '任务',
+ value: 'work_task'
+ }]
+ }
+ // {
+ // label: '人力资源',
+ // value: 'hrm',
+ // list: [{
+ // label: '组织管理',
+ // value: 61
+ // }, {
+ // label: '招聘管理',
+ // value: 62
+ // }, {
+ // label: '候选人',
+ // value: 63
+ // }, {
+ // label: '员工管理',
+ // value: 64
+ // }, {
+ // label: '社保管理',
+ // value: 65
+ // }, {
+ // label: '薪资管理',
+ // value: 66
+ // }, {
+ // label: '薪资档案',
+ // value: 67
+ // }, {
+ // label: '工资条',
+ // value: 68
+ // }, {
+ // label: '绩效考核',
+ // value: 69
+ // }]
+ // },
+ // {
+ // label: '进销存',
+ // value: 'jxc',
+ // list: [{
+ // label: '供应商',
+ // value: 81
+ // }, {
+ // label: '采购订单',
+ // value: 82
+ // }, {
+ // label: '采购退货',
+ // value: 83
+ // }, {
+ // label: '产品管理',
+ // value: 84
+ // }, {
+ // label: '销售订单',
+ // value: 85
+ // }, {
+ // label: '销售退货',
+ // value: 86
+ // }, {
+ // label: '仓库管理',
+ // value: 87
+ // }, {
+ // label: '产品库存',
+ // value: 88
+ // }, {
+ // label: '产品入库',
+ // value: 89
+ // }, {
+ // label: '产品出库',
+ // value: 90
+ // }, {
+ // label: '库存调拨',
+ // value: 91
+ // }, {
+ // label: '库存盘点',
+ // value: 92
+ // }, {
+ // label: '回款',
+ // value: 93
+ // }, {
+ // label: '付款',
+ // value: 93
+ // }]
+ // }
+ ],
+ sysOptions: [{
+ label: '企业首页',
+ value: 'company'
+ }, {
+ label: '应用管理',
+ value: 'application'
+ }, {
+ label: '员工管理',
+ value: 'employee'
+ }, {
+ label: '部门管理',
+ value: 'structures'
+ }, {
+ label: '角色管理',
+ value: 'role'
+ }, {
+ label: '项目管理',
+ value: 'project'
+ }, {
+ label: '客户管理',
+ value: 'customer'
+ },
+ // {
+ // label: '人力资源',
+ // value: 8
+ // }, {
+ // label: '进销存',
+ // value: 9
+ // },
+ {
+ label: '其他设置',
+ value: 'work_task'
+ }],
+ fieldList: [
+ {
+ prop: 'user_name',
+ label: '用户',
+ width: 100
+ },
+ {
+ prop: 'create_time',
+ label: '时间',
+ width: 150
+ },
+ {
+ prop: 'ip',
+ label: 'IP地址',
+ width: 100
+ },
+ {
+ prop: 'action',
+ label: '模块',
+ width: 150
+ },
+ {
+ prop: 'action_name',
+ label: '行为',
+ width: 150
+ },
+ {
+ prop: 'source_name',
+ label: '对象',
+ width: 150
+ },
+ {
+ prop: 'content',
+ label: '操作详情',
+ width: 100
+ }
+ ]
+ }
+ },
+
+ methods: {
+ getModelName(model) {
+ return {
+ crm: '客户管理',
+ oa: '办公管理',
+ work: '项目管理',
+ hrm: '人力资源',
+ jxc: '进销存',
+ admin: '系统管理'
+ }[model]
+ }
+ }
+}
diff --git a/src/views/admin/roleAuth/index.vue b/src/views/admin/roleAuth/index.vue
index 9c15965..fe473e9 100644
--- a/src/views/admin/roleAuth/index.vue
+++ b/src/views/admin/roleAuth/index.vue
@@ -171,13 +171,13 @@
style="height: 0;"
empty-text=""
default-expand-all>
-
+ @click="fieldSetClick(node)" >字段授权
diff --git a/src/views/bi/product/ProductStatistics.vue b/src/views/bi/product/ProductStatistics.vue
index 73b912d..b2e9404 100644
--- a/src/views/bi/product/ProductStatistics.vue
+++ b/src/views/bi/product/ProductStatistics.vue
@@ -16,10 +16,12 @@
-
-
-
+
+
-