Commit e790f4c0 by 前端

Merge branch 'SAAS+V5.5.2' into 'SAAS+V5.6.1'

上线合并

See merge request !542
2 parents 76bc07ee c6781b69
......@@ -328,3 +328,48 @@ export function reasonList(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.reason.list"
return request(data, RequestMethods.POST)
}
/**
*
* 删除缺失报备事务
*/
export function reportDelete(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.delete"
return request(data, RequestMethods.POST)
}
/**
*
* BI事项管理导出
*/
export function biMatterExport(data) {
data.method = "dj.api.script.merchant.bi.matter.async.export"
return request(data, RequestMethods.POST)
}
/**
*
* BI事项管理列表
*/
export function getBIMatterList(data) {
data.method = "dj.api.script.merchant.bi.matter.page"
return request(data, RequestMethods.POST)
}
/**
*
* BI事项处理
*/
export function biMatterUpdate(data) {
data.method =
"dj.api.script.merchant.bi.matter.handle"
return request(data, RequestMethods.POST)
}
/**
*
* 删除BI事项
*/
export function biMatterDelete(data) {
data.method = "dj.api.script.merchant.bi.matter.delete"
return request(data, RequestMethods.POST)
}
\ No newline at end of file
......@@ -35,3 +35,15 @@ export function updateRegionUser(data) {
data.method = 'dj.api.smartcarlife.sale.region.updateRegionUser'
return request(data, "post")
}
// 区域运营模块接口
// 区域运营管理人员列表
export function organizationUserList(data) {
data.method = 'dj.api.script.province.organization.list'
return request(data, "post")
}
// 区域运营管理编辑
export function organizationUserUpdate(data) {
data.method = 'dj.api.script.province.organization.upd'
return request(data, "post")
}
\ No newline at end of file
......@@ -323,3 +323,45 @@ export function updateOrderFieldSetting(data) {
data.method = "dj.api.smartcarlife.order.field.setting.update"
return request(data)
}
/** 门店毛利额 start */
// 门店毛利额-列表
export function listProfitPage(data) {
data.method = `dj.api.script.merchant.profit.record.page`
return request(data)
}
// 门店毛利额-详情
export function getProfitDetail(data) {
data.method = `dj.api.script.merchant.profit.record.detail`
return request(data)
}
// 门店毛利额-删除
export function deleteProfit(data) {
data.method = `dj.api.script.merchant.profit.record.delete`
return request(data)
}
// 门店毛利额-修改
export function updateProfit(data) {
data.method = `dj.api.script.merchant.profit.record.upd`
return request(data)
}
// 门店毛利额-新增
export function insertProfit(data) {
data.method = `dj.api.script.merchant.profit.record.add`
return request(data)
}
// 门店毛利额-导出
export function exportProfit(data) {
data.method = `dj.api.script.merchant.profit.record.async.export`
return request(data)
}
// 门店毛利额-导入
export function importProfit(data) {
data.method = `dj.api.script.merchant.profit.record.async.import`
return request(data, "post", ["file"])
}
\ No newline at end of file
......@@ -1273,6 +1273,14 @@ export const outputValue_operTypeOpt = [
{ confId: 3, confValue: "删除" }
]
// 门店毛利额 业务类型
export const profit_operTypeOpt = [
{ confId: 'ADD', confValue: "新增" },
{ confId: 'UPDATE', confValue: "修改" },
{ confId: 'DELETE', confValue: "删除" },
{ confId: 'IMPORT', confValue: "导入" }
]
// 带教管理 业务类型1
export const teaching_businessOpt = [
{ confId: 0, confValue: "权益升级" },
......
......@@ -1036,6 +1036,50 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleSetBatch"
},
// 门店毛利额操作权限
{
authId: "9061937",
parentId: "90619",
label: "导入毛利",
category: "Button",
type: "primary",
handle: "handleImport"
},
{
authId: "9061938",
parentId: "90619",
label: "新增毛利",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9061939",
parentId: "90619",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9061940",
parentId: "90619",
label: "详情",
handle: "handleDetail"
},
{
authId: "9061941",
parentId: "90619",
label: "修改",
handle: "handleEdit"
},
{
authId: "9061942",
parentId: "90619",
label: "删除",
handle: "handleDelete"
}
],
// component: _import("systemConfig/ShopConfig/index")
......
......@@ -108,5 +108,38 @@ export const routerName = {
}
],
component: _import("earlyWarningManager/failureToReportReception/index")
},
91505: {
path: "/biEventManager",
name: "biEventManager",
meta: {
title: "BI事项管理",
authId: "91505",
parentId: "915",
cache: false
},
auth: [
{
authId: "915001",
parentId: "91505",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9150502",
parentId: "91505",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9150203",
parentId: "91505",
label: "删除",
handle: "handleDeal"
}
],
component: _import("earlyWarningManager/biEventManager/index")
}
}
<!-- 运营审核 -->
<template>
<el-dialog
id="baseDialog"
top="15vh"
:close-on-click-modal="false"
:close-on-press-escape="true"
:title="dialogConfig.title"
:width="dialogConfig.width"
:visible.sync="visible"
:show-close="true"
class="noborder"
>
<div class="reject-dialog">
<div class="dialog-title-box">
<div class="dialog-title1">
<div class="flex-1 flex">
<span class="title-text">事项描述:</span>
<span class="title-text1 flex-1">{{ info.description }}</span>
</div>
</div>
<div class="dialog-title1">
<div class="flex-1 flex">
<span class="title-text">创建时间:</span>
<span class="title-text1 flex-1">{{ info.createdAt }}</span>
</div>
</div>
</div>
<glsx-combi-form
class="edit-form-container"
ref="formRef"
label-width="150px"
default-width="350px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
</div>
<div slot="footer">
<el-button
v-preventReClick
@click="visible = false"
type="info"
size="small"
>
取消
</el-button>
<el-button
size="small"
type="primary"
@click="confirmBtn(1)"
:loading="$store.state.d2admin.loading.value || btnLoding"
>
确定
</el-button>
</div>
</el-dialog>
</template>
<script>
import { biMatterUpdate } from "@/api/earlyWarningManager"
export default {
name: "ExamineDialog",
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
remark: ""
},
rejectRef: "rejectRef",
dialogConfig: {
title: "事项处理",
width: "600px"
},
examineRef: "examineRef",
formRules: {
remark: [
{ required: true, message: "请输入处理策略", trigger: "blur" }
]
},
editFormData: [
{
label: "处理策略",
name: "remark",
type: "input",
maxlength: 200,
inputType: "textarea",
showLimit: true,
rows: 4
}
],
baseData: {
}
}
},
props: {
auditsVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: () => {}
}
},
computed: {
visible: {
get() {
return this.auditsVisible
},
set(newVal) {
this.$emit("dialogClose", { flag: newVal, attrName: "auditsVisible" })
}
}
},
mounted() {},
methods: {
confirmBtn(type) {
this.$refs.formRef.$refs[this.rejectRef].validate((valid) => {
if (valid) {
var params = {}
params.handlingStrategy = this.infoForm.remark
params.id = this.info.id
console.log("AAparamsAA", params);
biMatterUpdate(params).then((res) => {
this.notice.okTips("操作成功")
this.visible = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
.dialog-title-box {
width: 79%;
padding: 10px 20px;
color: #333333;
font-size: 16px;
font-weight: 400;
box-sizing: border-box;
margin-bottom: 20px;
margin-left: 60px;
.dialog-name {
font-weight: 600;
margin-bottom: 12px;
}
.dialog-title1 {
display: flex;
color: #333333;
font-size: 14px;
font-weight: 400;
margin-bottom: 20px;
}
}
.title-text {
width: 80px;
}
.title-text1 {
display: block;
margin-left: -2.5%;
}
.flex {
display: flex;
}
.flex-1 {
flex: 1;
}
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
.edit-form-container {
margin-top: -24px;
}
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
.el-button {
width: 80px;
}
}
::v-deep .el-dialog__header {
border-bottom: 1px solid #e5e5e5;
}
</style>
\ No newline at end of file
......@@ -2,24 +2,20 @@
<template>
<d2-container class="order-list m-t-40">
<div class="header" slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'"
:form-data="showFormData">
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'" filterable
@change="selectAddAttr($event)" clearable
<el-cascader :options="baseData.productTypeList" style="width: 100%;" v-model="tempGoodsType"
:placeholder="'请选择'" filterable @change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</template>
<template slot="sellerSelect">
<el-select v-model="searchForm.sellerUserId" remote reserve-keyword
placeholder="请选择转化人员" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 100%" filterable>
<el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex"
:label="subItem.staffName" :value="subItem.uuid" />
<el-select v-model="searchForm.sellerNameVague" remote reserve-keyword placeholder="请选择转化人员"
@visible-change="visibleChange" :remote-method="remoteMethod" v-el-select-loadmore="interestsLoadmore"
style="width: 100%" filterable>
<el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex" :label="subItem.staffName"
:value="subItem.staffName" />
</el-select>
</template>
</d2-search>
......@@ -133,11 +129,7 @@
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p>
<el-tooltip
class="item"
:content="getGoodsTypeName(item)"
placement="right"
>
<el-tooltip class="item" :content="getGoodsTypeName(item)" placement="right">
<span>
{{
getGoodsTypeName(item)
......@@ -509,7 +501,7 @@ export default {
this.staffName = ''
this.getSellerList()
this.searchForm.merchantId = ""
this.searchForm.sellerUserId = ""
this.searchForm.sellerNameVague = ""
this.getOptionsList()
}
},
......@@ -697,7 +689,8 @@ export default {
thirdLevelGoodsType: '',
sellerUserId: '',
brandIdList: [],
directSalesFlag: ''
directSalesFlag: '',
sellerNameVague: ''
},
baseData: {
orderStatusList: [
......@@ -969,7 +962,7 @@ export default {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList()
},
selectAddAttr(value) {
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
......@@ -1096,7 +1089,8 @@ export default {
salesType: "",
sellerUserId: "",
brandIdList: [],
directSalesFlag: ""
directSalesFlag: "",
sellerNameVague: ""
}
this.tempGoodsType = []
// this.baseData.storeIdList = []
......
......@@ -407,22 +407,22 @@ export default {
},
handleOper(type) {
if (type == 1) {
const templateCode = this.templateData.code
if (['qinggai-temp-001'].includes(templateCode)) {
console.log(this.merchantIdOptions, "this.merchantIdOptions---")
this.selectVisible = true
this.storeSelected = []
this.merchantIdOptions.forEach(itme => {
this.storeSelected.push({
merchantName: itme.merchantName,
merchantId: itme.merchantId,
staffPhone: itme.userPhone,
staffName: itme.userName,
staffUuid: itme.userId
})
// const templateCode = this.templateData.code
// if (['qinggai-temp-001'].includes(templateCode)) {
console.log(this.merchantIdOptions, "this.merchantIdOptions---")
this.selectVisible = true
this.storeSelected = []
this.merchantIdOptions.forEach(itme => {
this.storeSelected.push({
merchantName: itme.merchantName,
merchantId: itme.merchantId,
staffPhone: itme.userPhone,
staffName: itme.userName,
staffUuid: itme.userId
})
return true
}
})
return true
// }
}
this.openDrawer(type)
},
......
<!-- 编辑 - 组织架构信息 -->
<template>
<d2-container class="edit-page edit-tmpl">
<div style="padding: 20px" v-loading="$store.state.d2admin.loading.value">
<div v-if="source === 'organize'" style="padding: 20px" v-loading="$store.state.d2admin.loading.value">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
</glsx-combi-form>
<div class="footer">
......@@ -9,12 +9,22 @@
<el-button @click="handleCancel">取消</el-button>
</div>
</div>
<!-- 展示字段不同,因此独立编辑 -->
<div v-if="source === 'regional'" style="padding: 20px" v-loading="$store.state.d2admin.loading.value">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="450px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormDataRegional" :form-rules="formRulesRegional">
</glsx-combi-form>
<div class="footer" style="margin-top: 40px;">
<el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
</div>
</div>
</d2-container>
</template>
<script>
import { deepClone } from "@/common/util"
import { regionUserList, updateRegionUser } from '@api/salesManagement'
import { regionUserList, updateRegionUser, organizationUserUpdate } from '@api/salesManagement'
import { merchantStaffByRoleList } from '@api/index'
export default {
name: "EditOrganize",
data() {
......@@ -28,10 +38,16 @@ export default {
formRules: {
regionName: [{ required: true, message: "请输入大区名称" }]
},
formRulesRegional: {
regionalOperationsAreaManager: [{ required: true, message: "请选择区域运营大区经理" }],
regionalOperations: [{ required: true, message: "请选择区域运营" }]
},
editData: {
regionName: '',
operateUserId: '',
salesList: []
salesList: [],
regionalOperationsAreaManager: '',
regionalOperations: ''
},
editFormData: [
{
......@@ -71,30 +87,87 @@ export default {
}
}
],
// 区域运营管理
editFormDataRegional:[
{
label: "省份",
name: "regionName",
type: "input",
maxlength: 100,
isDisabled: true
}, {
label: '区域运营大区经理',
name: 'regionalOperationsAreaManager',
type: 'select',
isClear: true,
optionList: [],
optionId: 'uuid',
optionLabel: 'staffName',
optionsName: 'operateUserOpt',
changeAttr: (value, targetItem) => {
console.log(value, targetItem)
this.editData.regionalOperationsAreaManager = value
// this.dealListDisable()
}
}, {
label: '区域运营',
name: 'regionalOperations',
type: 'select',
isClear: true,
optionList: [],
optionId: 'uuid',
optionLabel: 'staffName',
optionsName: 'salesPersonOpt',
changeAttr: (value, targetItem) => {
console.log(value, targetItem)
this.editData.regionalOperations = value
// this.dealListDisable()
}
}
],
selectedStaffList: [],
baseData: {
staffList: [],
operateUserOpt: [],
salesPersonOpt: []
}
},
source: ''
}
},
mounted() {
this.routeInfo.userList = this.$route.query.userList || []
this.editData.id = this.$route.query.id
this.editData.regionName = this.$route.query.regionName
this.getregionUserList()
if(this.$route.query.source == 'regional'){
this.editData.regionalOperationsAreaManager = this.$route.query.regionalOperationsAreaManager
this.editData.regionalOperations = this.$route.query.regionalOperations
}
this.source = this.$route.query.source
this.getregionUserList();
this.getOptionsList("editFormData", false)
// 区域运营管理
this.getOptionsList("editFormDataRegional", false)
},
methods: {
getregionUserList() {
regionUserList({}).then((res) => {
this.baseData.staffList = deepClone(res.staffList)
this.baseData.operateUserOpt = deepClone(res.staffList)
this.baseData.salesPersonOpt = deepClone(res.staffList)
this.selectedStaffList = res.selectedStaffList
this.dealRegionList()
})
if(this.source === 'organize'){
regionUserList({}).then((res) => {
this.baseData.staffList = deepClone(res.staffList)
this.baseData.operateUserOpt = deepClone(res.staffList)
this.baseData.salesPersonOpt = deepClone(res.staffList)
this.selectedStaffList = res.selectedStaffList
this.dealRegionList()
})
} else {
merchantStaffByRoleList({ roleName: "区域运营" }).then((res) => {
console.log(res, 'res');
this.baseData.staffList = deepClone(res)
this.baseData.operateUserOpt = deepClone(res)
this.baseData.salesPersonOpt = deepClone(res)
// this.selectedStaffList = res 已选择的人员列表
this.dealRegionList()
})
}
},
dealListDisable() {
// 其他大区已选的人,在当前大区不能再选
......@@ -116,6 +189,7 @@ export default {
}
})
this.getOptionsList('editFormData', false)
this.getOptionsList('editFormDataRegional', false)
console.log(this.editFormData)
},
dealRegionList() {
......@@ -192,13 +266,30 @@ export default {
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
const params = this.getParams()
console.log(params)
updateRegionUser(params).then(res => {
console.log(res)
this.$message.success("操作成功")
this.handleCancel()
})
if(this.source === 'regional'){
const regionalParams = {
id: this.editData.id,
regionalOperationsAreaManager: this.editData.regionalOperationsAreaManager,
regionalOperations: this.editData.regionalOperations,
areaManagerName: this.findInfo(this.editData.regionalOperationsAreaManager).staffName || '',
regionalOperationsName: this.findInfo(this.editData.regionalOperations).staffName || '',
sessionId: this.getParams().sessionId,
}
console.log("AAregionalParamsAA", regionalParams);
organizationUserUpdate(regionalParams).then(res => {
console.log(res)
this.$message.success("操作成功")
this.handleCancel()
})
}
if(this.source === 'organize'){
const params = this.getParams()
updateRegionUser(params).then(res => {
console.log(res)
this.$message.success("操作成功")
this.handleCancel()
})
}
}
})
},
......@@ -206,7 +297,10 @@ export default {
// 取消按钮返回列表页
handleCancel() {
this.$router.push({
name: "organize"
name: "organize",
query: {
activeTab: this.$route.query.activeTab || 'organize'
}
})
}
}
......
......@@ -2,19 +2,18 @@
<template>
<div>
<d2-container>
<div class="d2-container-content" style="margin-top: 0;">
<d2-table ref="organizeTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<div slot="userList" slot-scope="scope">
<el-tooltip v-if="scope.scope.userList && scope.scope.userList.length" effect="dark" placement="top">
<div slot="content" class="tooltip-content-max">
<div>{{ scope.columnsObj.formatter(scope.scope) }}</div>
</div>
<span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span>
</el-tooltip>
<div v-else>-</div>
</div>
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
<el-tabs v-model="activeName"
@tab-click="handleClickTabs" class="tabs-container">
<el-tab-pane label="销售管理"
name="organize" />
<el-tab-pane label="区域运营管理"
name="regional" />
</el-tabs>
<div v-if="activeName === 'organize'" class="d2-container-content" style="margin-top: 0;padding: 20px;padding-top: 5px;">
<organizeManage />
</div>
<div v-if="activeName === 'regional'" class="d2-container-content" style="margin-top: 0;padding: 20px;padding-top: 5px;">
<regionalManage />
</div>
</d2-container>
</div>
......@@ -23,10 +22,19 @@
<script>
import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData'
import { regionPage } from '@api/salesManagement'
import { deepClone } from '@/common/util'
import organizeManage from './organizeManage.vue'
import regionalManage from './regionalManage.vue'
export default {
name: 'Customer',
components: {
organizeManage,
regionalManage
},
data() {
return {
activeName: 'organize',
recordInfo: {},
userInfo: this.$store.state.d2admin.user.info,
getListApi: regionPage,
tableParams: {
......@@ -72,13 +80,26 @@ export default {
}
},
mounted() {
// 从路由 query 中恢复 tab 状态
if (this.$route.query.activeTab) {
this.activeName = this.$route.query.activeTab
}
},
methods: {
handleClickTabs() {
this.recordInfo = {}
},
gotoDetail(params) {
this.activeName = 'details'
this.recordInfo = deepClone(params)
},
handleEdit(row = {}) {
this.$router.push({
name: "editOrganize",
query: {
source: 'organize',
activeTab: this.activeName || 'organize',
id: row?.id || '',
regionName: row?.regionName || '',
userList: row?.userList || []
......@@ -90,6 +111,11 @@ export default {
</script>
<style scoped>
.tabs-container {
background: #ffffff;
padding: 0 20px;
margin-bottom: 0;
}
.tooltip-content-max {
max-height: 320px;
overflow-y: scroll;
......
<!-- 销售管理 - 组织架构管理 - 列表 -->
<template>
<div>
<div class="d2-container-content" style="margin-top: 0;padding: 20px;padding-top: 5px;">
<d2-table ref="organizeTable" :get-list-api="getListApi" :table-params="tableParams">
<div slot="userList" slot-scope="scope">
<el-tooltip v-if="scope.scope.userList && scope.scope.userList.length" effect="dark" placement="top">
<div slot="content" class="tooltip-content-max">
<div>{{ scope.columnsObj.formatter(scope.scope) }}</div>
</div>
<span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span>
</el-tooltip>
<div v-else>-</div>
</div>
<!-- 编辑操作按钮 -->
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
</div>
</template>
<script>
import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData'
import { regionPage } from '@api/salesManagement'
export default {
name: 'Customer',
data() {
return {
recordInfo: {},
userInfo: this.$store.state.d2admin.user.info,
getListApi: regionPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '大区名称',
prop: 'regionName'
}, {
label: '创建人',
prop: 'createdBy'
}, {
label: '大区经理',
prop: 'userList',
formatter: (cellValue) => {
// 人员类型(1.大区经理,2.销售人员)
return (cellValue.userList && cellValue.userList.length) ? (cellValue.userList.filter(item => item.userType == 1).map(item => item.userName).join(',') || '-') : '-'
}
}, {
label: '销售人员',
prop: 'userList',
addHtml: 'userList',
formatter: (cellValue) => {
// 人员类型(1.大区经理,2.销售人员)
return (cellValue.userList && cellValue.userList.length) ? cellValue.userList.filter(item => item.userType == 2).map(item => item.userName).join(',') || '-' : '-'
}
}, {
label: '创建时间',
prop: 'createdDate',
width: '150px'
}]
},
baseData: {
tmplTypeList: [],
provinceInfoList: [],
cityList: [],
brandList: [],
busTypeOpt: busTypeOpt,
cooperModeOpt: cooperModeOpt,
flowSituateOpt: flowSituateOpt
}
}
},
mounted() {
},
methods: {
handleEdit(row = {}) {
this.$router.push({
name: "editOrganize",
query: {
source: 'organize',
activeTab: 'organize',
id: row?.id || '',
regionName: row?.regionName || '',
userList: row?.userList || []
}
})
}
}
}
</script>
<style scoped>
.tabs-container {
background: #ffffff;
padding: 0 20px;
margin-bottom: 0;
}
.tooltip-content-max {
max-height: 320px;
overflow-y: scroll;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.fields-txt {
width: 346px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
\ No newline at end of file
<!-- 销售管理 - 组织架构管理 - 列表 -->
<template>
<div>
<div class="d2-container-content" style="margin-top: 0;padding: 20px;padding-top: 5px;">
<d2-table ref="organizeTable" :get-list-api="getListApi" :table-params="tableParams">
<div slot="userList" slot-scope="scope">
<el-tooltip v-if="scope.scope.userList && scope.scope.userList.length" effect="dark" placement="top">
<div slot="content" class="tooltip-content-max">
<div>{{ scope.columnsObj.formatter(scope.scope) }}</div>
</div>
<span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span>
</el-tooltip>
<div v-else>-</div>
</div>
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
</div>
</template>
<script>
import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData'
import { organizationUserList } from '@api/salesManagement'
export default {
name: 'Customer',
data() {
return {
recordInfo: {},
userInfo: this.$store.state.d2admin.user.info,
getListApi: organizationUserList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '省份名称',
prop: 'provinceName'
},{
label: '区域运营大区经理',
prop: 'areaManagerName',
}, {
label: '区域运营',
prop: 'regionalOperationsName',
}, {
label: '修改时间',
prop: 'updatedDate',
width: '150px'
}]
},
baseData: {
tmplTypeList: [],
provinceInfoList: [],
cityList: [],
brandList: [],
busTypeOpt: busTypeOpt,
cooperModeOpt: cooperModeOpt,
flowSituateOpt: flowSituateOpt
}
}
},
mounted() {
},
methods: {
handleEdit(row = {}) {
console.log("CS1220");
this.$router.push({
name: "editOrganize",
query: {
source: 'regional',
activeTab: 'regional',
id: row?.id || '',
regionName: row?.provinceName || '',
regionalOperationsAreaManager: row?.regionalOperationsAreaManager || '',
regionalOperations: row?.regionalOperations || '',
userList: row?.userList || []
}
})
}
}
}
</script>
<style scoped>
.tabs-container {
background: #ffffff;
padding: 0 20px;
margin-bottom: 0;
}
.tooltip-content-max {
max-height: 320px;
overflow-y: scroll;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.fields-txt {
width: 346px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
\ No newline at end of file
......@@ -13,12 +13,15 @@
name="deliveryQuantity" />
<el-tab-pane label="个人交付成交率"
name="personalConversionRate" />
<el-tab-pane label="门店毛利额"
name="storeGrossProfit" />
</el-tabs>
<div>
<shop-set v-if="activeName === 'shopSet'" />
<output-value v-if="activeName === 'outputValue'" />
<delivery-quantity v-if="activeName === 'deliveryQuantity'" />
<personal-conversion-rate v-if="activeName === 'personalConversionRate'"/>
<store-gross-profit v-if="activeName === 'storeGrossProfit'"/>
</div>
</div>
</div>
......@@ -29,6 +32,7 @@ import shopSet from './index'
import outputValue from './outputValue/index'
import deliveryQuantity from './deliveryQuantity/index'
import personalConversionRate from './personalConversionRate/index'
import storeGrossProfit from './storeGrossProfit/index'
import { deepClone } from '@/common/util'
export default {
name: 'StaffIndex',
......@@ -44,7 +48,8 @@ export default {
shopSet,
outputValue,
deliveryQuantity,
personalConversionRate
personalConversionRate,
storeGrossProfit
},
mounted() {
......
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<div class="errorTips"
v-if="tipsShow">最大成交率需大于最小成交率</div>
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
},
tipsShow: false
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
if (val.length == 0) {
this.tipsShow = false
}
}
}
},
methods: {
handleStartInput(event) {
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 3, 2, 0, 100)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 3, 2, 0, 100)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
this.tipsShow = false
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
.errorTips {
color: red;
font-size: 12px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!