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) { ...@@ -328,3 +328,48 @@ export function reasonList(data) {
data.method = "dj.api.smartcarlife.staff.missing.reception.report.reason.list" data.method = "dj.api.smartcarlife.staff.missing.reception.report.reason.list"
return request(data, RequestMethods.POST) 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 \ No newline at end of file
...@@ -35,3 +35,15 @@ export function updateRegionUser(data) { ...@@ -35,3 +35,15 @@ export function updateRegionUser(data) {
data.method = 'dj.api.smartcarlife.sale.region.updateRegionUser' data.method = 'dj.api.smartcarlife.sale.region.updateRegionUser'
return request(data, "post") 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 \ No newline at end of file
...@@ -323,3 +323,45 @@ export function updateOrderFieldSetting(data) { ...@@ -323,3 +323,45 @@ export function updateOrderFieldSetting(data) {
data.method = "dj.api.smartcarlife.order.field.setting.update" data.method = "dj.api.smartcarlife.order.field.setting.update"
return request(data) 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 \ No newline at end of file
...@@ -1273,6 +1273,14 @@ export const outputValue_operTypeOpt = [ ...@@ -1273,6 +1273,14 @@ export const outputValue_operTypeOpt = [
{ confId: 3, confValue: "删除" } { confId: 3, confValue: "删除" }
] ]
// 门店毛利额 业务类型
export const profit_operTypeOpt = [
{ confId: 'ADD', confValue: "新增" },
{ confId: 'UPDATE', confValue: "修改" },
{ confId: 'DELETE', confValue: "删除" },
{ confId: 'IMPORT', confValue: "导入" }
]
// 带教管理 业务类型1 // 带教管理 业务类型1
export const teaching_businessOpt = [ export const teaching_businessOpt = [
{ confId: 0, confValue: "权益升级" }, { confId: 0, confValue: "权益升级" },
......
...@@ -1036,6 +1036,50 @@ export const routerName = { ...@@ -1036,6 +1036,50 @@ export const routerName = {
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleSetBatch" 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") // component: _import("systemConfig/ShopConfig/index")
......
...@@ -108,5 +108,38 @@ export const routerName = { ...@@ -108,5 +108,38 @@ export const routerName = {
} }
], ],
component: _import("earlyWarningManager/failureToReportReception/index") 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 \ No newline at end of file
...@@ -2,24 +2,20 @@ ...@@ -2,24 +2,20 @@
<template> <template>
<d2-container class="order-list m-t-40"> <d2-container class="order-list m-t-40">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'"
class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData"> :form-data="showFormData">
<template slot="goodsCascader"> <template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;" <el-cascader :options="baseData.productTypeList" style="width: 100%;" v-model="tempGoodsType"
v-model="tempGoodsType" :placeholder="'请选择'" filterable :placeholder="'请选择'" filterable @change="selectAddAttr($event)" clearable
@change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader> </el-cascader>
</template> </template>
<template slot="sellerSelect"> <template slot="sellerSelect">
<el-select v-model="searchForm.sellerUserId" remote reserve-keyword <el-select v-model="searchForm.sellerNameVague" remote reserve-keyword placeholder="请选择转化人员"
placeholder="请选择转化人员" @visible-change="visibleChange" :remote-method="remoteMethod" @visible-change="visibleChange" :remote-method="remoteMethod" v-el-select-loadmore="interestsLoadmore"
v-el-select-loadmore="interestsLoadmore" style="width: 100%" filterable> style="width: 100%" filterable>
<el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex" <el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex" :label="subItem.staffName"
:label="subItem.staffName" :value="subItem.uuid" /> :value="subItem.staffName" />
</el-select> </el-select>
</template> </template>
</d2-search> </d2-search>
...@@ -133,11 +129,7 @@ ...@@ -133,11 +129,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p> <p>
<el-tooltip <el-tooltip class="item" :content="getGoodsTypeName(item)" placement="right">
class="item"
:content="getGoodsTypeName(item)"
placement="right"
>
<span> <span>
{{ {{
getGoodsTypeName(item) getGoodsTypeName(item)
...@@ -509,7 +501,7 @@ export default { ...@@ -509,7 +501,7 @@ export default {
this.staffName = '' this.staffName = ''
this.getSellerList() this.getSellerList()
this.searchForm.merchantId = "" this.searchForm.merchantId = ""
this.searchForm.sellerUserId = "" this.searchForm.sellerNameVague = ""
this.getOptionsList() this.getOptionsList()
} }
}, },
...@@ -697,7 +689,8 @@ export default { ...@@ -697,7 +689,8 @@ export default {
thirdLevelGoodsType: '', thirdLevelGoodsType: '',
sellerUserId: '', sellerUserId: '',
brandIdList: [], brandIdList: [],
directSalesFlag: '' directSalesFlag: '',
sellerNameVague: ''
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
...@@ -1096,7 +1089,8 @@ export default { ...@@ -1096,7 +1089,8 @@ export default {
salesType: "", salesType: "",
sellerUserId: "", sellerUserId: "",
brandIdList: [], brandIdList: [],
directSalesFlag: "" directSalesFlag: "",
sellerNameVague: ""
} }
this.tempGoodsType = [] this.tempGoodsType = []
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
......
...@@ -481,7 +481,7 @@ export default { ...@@ -481,7 +481,7 @@ export default {
spanIndex4: 0, spanIndex4: 0,
track_event_code: "staff_reception_list", track_event_code: "staff_reception_list",
track_businessParam_key: "searchForm", track_businessParam_key: "searchForm",
viewType: 1, viewType: 2,
receptionStatusEnum: { receptionStatusEnum: {
0: '战败', 0: '战败',
1: '成交', 1: '成交',
...@@ -516,9 +516,10 @@ export default { ...@@ -516,9 +516,10 @@ export default {
pageSize: this.page.pageSize, pageSize: this.page.pageSize,
currentPage: 1 currentPage: 1
} }
this.getTableList() this.getTableList(false)
}, },
immediate: true immediate: true,
deep: true
} }
}, },
computed: { computed: {
...@@ -547,7 +548,7 @@ export default { ...@@ -547,7 +548,7 @@ export default {
} }
}, },
created () { created () {
this.getTableList() // this.getTableList()
}, },
mounted () { mounted () {
this.getOptionsList() this.getOptionsList()
...@@ -660,6 +661,7 @@ export default { ...@@ -660,6 +661,7 @@ export default {
}, },
beforeSearchFn (type) { beforeSearchFn (type) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let flag = true
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.searchdate?.length) { if (this.searchForm?.searchdate?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.searchdate let [searchStartDate, searchEndDate] = this.searchForm.searchdate
...@@ -673,14 +675,16 @@ export default { ...@@ -673,14 +675,16 @@ export default {
) )
const date1 = dayjs(searchStartDate), const date1 = dayjs(searchStartDate),
date2 = dayjs(searchEndDate), date2 = dayjs(searchEndDate),
day = date2.diff(date1, "day") + 1 day = date2.diff(date1, "day") + 1,
if (day > 31) maxDayNum = 7
if (day > 31) if (day > maxDayNum) {
flag = false
reject( reject(
`${type == 1 ? "查询" : "导出" `${type == 1 ? "查询" : "导出"
}的时间跨度最大为31天,请重新选择日期范围` }的时间跨度最大为${maxDayNum}天,请重新选择日期范围`
) )
} }
}
delete this.searchFormSearch.searchdate delete this.searchFormSearch.searchdate
if (this.searchFormSearch.qualityTestScore) { if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin = this.searchFormSearch.qualityTestScoreBegin =
...@@ -703,7 +707,7 @@ export default { ...@@ -703,7 +707,7 @@ export default {
delete this.searchFormSearch.qualityTestScore delete this.searchFormSearch.qualityTestScore
// delete this.searchFormSearch.toStoreCount // delete this.searchFormSearch.toStoreCount
delete this.searchFormSearch.AbnormalProportion delete this.searchFormSearch.AbnormalProportion
resolve() resolve(flag)
}) })
}, },
getOptionsList (isAll, optionsName) { getOptionsList (isAll, optionsName) {
...@@ -744,17 +748,17 @@ export default { ...@@ -744,17 +748,17 @@ export default {
} }
this.$refs.qualityTable.page.currentPage = 1 this.$refs.qualityTable.page.currentPage = 1
this.getTableList() this.getTableList()
this.receptionStaffStatic()
}, },
handleReset () { handleReset () {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch() this.handleSearch()
}, },
async getTableList () { async getTableList (staticFlag = true) {
try { try {
this.loadComplete = true this.loadComplete = true
let { viewType } = this let { viewType } = this,
await this.beforeSearchFn(1) flag = await this.beforeSearchFn(1)
if (flag && staticFlag) this.receptionStaffStatic()
let params = { let params = {
...this.page, ...this.page,
...this.searchFormSearch ...this.searchFormSearch
...@@ -767,6 +771,7 @@ export default { ...@@ -767,6 +771,7 @@ export default {
this.restructureData(list) this.restructureData(list)
this.tableTotal = total this.tableTotal = total
this.loadComplete = false this.loadComplete = false
} catch (error) { } catch (error) {
this.loadComplete = false this.loadComplete = false
if (error) this.$message.error(error) if (error) this.$message.error(error)
...@@ -1101,9 +1106,9 @@ export default { ...@@ -1101,9 +1106,9 @@ export default {
left: 12px; left: 12px;
transform: translateY(-50%); transform: translateY(-50%);
} }
&:hover{ &:hover {
.el-icon--left { .el-icon--left {
color: #2A58AD; color: #2a58ad;
} }
} }
} }
......
...@@ -407,8 +407,8 @@ export default { ...@@ -407,8 +407,8 @@ export default {
}, },
handleOper(type) { handleOper(type) {
if (type == 1) { if (type == 1) {
const templateCode = this.templateData.code // const templateCode = this.templateData.code
if (['qinggai-temp-001'].includes(templateCode)) { // if (['qinggai-temp-001'].includes(templateCode)) {
console.log(this.merchantIdOptions, "this.merchantIdOptions---") console.log(this.merchantIdOptions, "this.merchantIdOptions---")
this.selectVisible = true this.selectVisible = true
this.storeSelected = [] this.storeSelected = []
...@@ -422,7 +422,7 @@ export default { ...@@ -422,7 +422,7 @@ export default {
}) })
}) })
return true return true
} // }
} }
this.openDrawer(type) this.openDrawer(type)
}, },
......
<!-- 编辑 - 组织架构信息 --> <!-- 编辑 - 组织架构信息 -->
<template> <template>
<d2-container class="edit-page edit-tmpl"> <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 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> </glsx-combi-form>
<div class="footer"> <div class="footer">
...@@ -9,12 +9,22 @@ ...@@ -9,12 +9,22 @@
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> </div>
</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> </d2-container>
</template> </template>
<script> <script>
import { deepClone } from "@/common/util" 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 { export default {
name: "EditOrganize", name: "EditOrganize",
data() { data() {
...@@ -28,10 +38,16 @@ export default { ...@@ -28,10 +38,16 @@ export default {
formRules: { formRules: {
regionName: [{ required: true, message: "请输入大区名称" }] regionName: [{ required: true, message: "请输入大区名称" }]
}, },
formRulesRegional: {
regionalOperationsAreaManager: [{ required: true, message: "请选择区域运营大区经理" }],
regionalOperations: [{ required: true, message: "请选择区域运营" }]
},
editData: { editData: {
regionName: '', regionName: '',
operateUserId: '', operateUserId: '',
salesList: [] salesList: [],
regionalOperationsAreaManager: '',
regionalOperations: ''
}, },
editFormData: [ editFormData: [
{ {
...@@ -71,23 +87,70 @@ export default { ...@@ -71,23 +87,70 @@ 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: [], selectedStaffList: [],
baseData: { baseData: {
staffList: [], staffList: [],
operateUserOpt: [], operateUserOpt: [],
salesPersonOpt: [] salesPersonOpt: []
} },
source: ''
} }
}, },
mounted() { mounted() {
this.routeInfo.userList = this.$route.query.userList || [] this.routeInfo.userList = this.$route.query.userList || []
this.editData.id = this.$route.query.id this.editData.id = this.$route.query.id
this.editData.regionName = this.$route.query.regionName 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("editFormData", false)
// 区域运营管理
this.getOptionsList("editFormDataRegional", false)
}, },
methods: { methods: {
getregionUserList() { getregionUserList() {
if(this.source === 'organize'){
regionUserList({}).then((res) => { regionUserList({}).then((res) => {
this.baseData.staffList = deepClone(res.staffList) this.baseData.staffList = deepClone(res.staffList)
this.baseData.operateUserOpt = deepClone(res.staffList) this.baseData.operateUserOpt = deepClone(res.staffList)
...@@ -95,6 +158,16 @@ export default { ...@@ -95,6 +158,16 @@ export default {
this.selectedStaffList = res.selectedStaffList this.selectedStaffList = res.selectedStaffList
this.dealRegionList() 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() { dealListDisable() {
// 其他大区已选的人,在当前大区不能再选 // 其他大区已选的人,在当前大区不能再选
...@@ -116,6 +189,7 @@ export default { ...@@ -116,6 +189,7 @@ export default {
} }
}) })
this.getOptionsList('editFormData', false) this.getOptionsList('editFormData', false)
this.getOptionsList('editFormDataRegional', false)
console.log(this.editFormData) console.log(this.editFormData)
}, },
dealRegionList() { dealRegionList() {
...@@ -192,21 +266,41 @@ export default { ...@@ -192,21 +266,41 @@ export default {
handleConfirm() { handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) { if (valid) {
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() const params = this.getParams()
console.log(params)
updateRegionUser(params).then(res => { updateRegionUser(params).then(res => {
console.log(res) console.log(res)
this.$message.success("操作成功") this.$message.success("操作成功")
this.handleCancel() this.handleCancel()
}) })
} }
}
}) })
}, },
// 取消按钮返回列表页 // 取消按钮返回列表页
handleCancel() { handleCancel() {
this.$router.push({ this.$router.push({
name: "organize" name: "organize",
query: {
activeTab: this.$route.query.activeTab || 'organize'
}
}) })
} }
} }
......
...@@ -2,19 +2,18 @@ ...@@ -2,19 +2,18 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="d2-container-content" style="margin-top: 0;"> <el-tabs v-model="activeName"
<d2-table ref="organizeTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn"> @tab-click="handleClickTabs" class="tabs-container">
<div slot="userList" slot-scope="scope"> <el-tab-pane label="销售管理"
<el-tooltip v-if="scope.scope.userList && scope.scope.userList.length" effect="dark" placement="top"> name="organize" />
<div slot="content" class="tooltip-content-max"> <el-tab-pane label="区域运营管理"
<div>{{ scope.columnsObj.formatter(scope.scope) }}</div> 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>
<span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span> <div v-if="activeName === 'regional'" class="d2-container-content" style="margin-top: 0;padding: 20px;padding-top: 5px;">
</el-tooltip> <regionalManage />
<div v-else>-</div>
</div>
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div> </div>
</d2-container> </d2-container>
</div> </div>
...@@ -23,10 +22,19 @@ ...@@ -23,10 +22,19 @@
<script> <script>
import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData' import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData'
import { regionPage } from '@api/salesManagement' import { regionPage } from '@api/salesManagement'
import { deepClone } from '@/common/util'
import organizeManage from './organizeManage.vue'
import regionalManage from './regionalManage.vue'
export default { export default {
name: 'Customer', name: 'Customer',
components: {
organizeManage,
regionalManage
},
data() { data() {
return { return {
activeName: 'organize',
recordInfo: {},
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
getListApi: regionPage, getListApi: regionPage,
tableParams: { tableParams: {
...@@ -72,13 +80,26 @@ export default { ...@@ -72,13 +80,26 @@ export default {
} }
}, },
mounted() { mounted() {
// 从路由 query 中恢复 tab 状态
if (this.$route.query.activeTab) {
this.activeName = this.$route.query.activeTab
}
}, },
methods: { methods: {
handleClickTabs() {
this.recordInfo = {}
},
gotoDetail(params) {
this.activeName = 'details'
this.recordInfo = deepClone(params)
},
handleEdit(row = {}) { handleEdit(row = {}) {
this.$router.push({ this.$router.push({
name: "editOrganize", name: "editOrganize",
query: { query: {
source: 'organize',
activeTab: this.activeName || 'organize',
id: row?.id || '', id: row?.id || '',
regionName: row?.regionName || '', regionName: row?.regionName || '',
userList: row?.userList || [] userList: row?.userList || []
...@@ -90,6 +111,11 @@ export default { ...@@ -90,6 +111,11 @@ export default {
</script> </script>
<style scoped> <style scoped>
.tabs-container {
background: #ffffff;
padding: 0 20px;
margin-bottom: 0;
}
.tooltip-content-max { .tooltip-content-max {
max-height: 320px; max-height: 320px;
overflow-y: scroll; 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 \ 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 \ No newline at end of file
...@@ -13,12 +13,15 @@ ...@@ -13,12 +13,15 @@
name="deliveryQuantity" /> name="deliveryQuantity" />
<el-tab-pane label="个人交付成交率" <el-tab-pane label="个人交付成交率"
name="personalConversionRate" /> name="personalConversionRate" />
<el-tab-pane label="门店毛利额"
name="storeGrossProfit" />
</el-tabs> </el-tabs>
<div> <div>
<shop-set v-if="activeName === 'shopSet'" /> <shop-set v-if="activeName === 'shopSet'" />
<output-value v-if="activeName === 'outputValue'" /> <output-value v-if="activeName === 'outputValue'" />
<delivery-quantity v-if="activeName === 'deliveryQuantity'" /> <delivery-quantity v-if="activeName === 'deliveryQuantity'" />
<personal-conversion-rate v-if="activeName === 'personalConversionRate'"/> <personal-conversion-rate v-if="activeName === 'personalConversionRate'"/>
<store-gross-profit v-if="activeName === 'storeGrossProfit'"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,6 +32,7 @@ import shopSet from './index' ...@@ -29,6 +32,7 @@ import shopSet from './index'
import outputValue from './outputValue/index' import outputValue from './outputValue/index'
import deliveryQuantity from './deliveryQuantity/index' import deliveryQuantity from './deliveryQuantity/index'
import personalConversionRate from './personalConversionRate/index' import personalConversionRate from './personalConversionRate/index'
import storeGrossProfit from './storeGrossProfit/index'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
export default { export default {
name: 'StaffIndex', name: 'StaffIndex',
...@@ -44,7 +48,8 @@ export default { ...@@ -44,7 +48,8 @@ export default {
shopSet, shopSet,
outputValue, outputValue,
deliveryQuantity, deliveryQuantity,
personalConversionRate personalConversionRate,
storeGrossProfit
}, },
mounted() { 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!