Commit 39f70ac8 by zhangxw

个人交付成交率需求开发

1 parent d75b473f
...@@ -244,3 +244,39 @@ export function getSunshineIncentivePoint(data) { ...@@ -244,3 +244,39 @@ export function getSunshineIncentivePoint(data) {
data.method = `dj.api.smartcarlife.sunshineIncentivePoint.get` data.method = `dj.api.smartcarlife.sunshineIncentivePoint.get`
return request(data) return request(data)
} }
// 获取4s店某场景类型相关的员工列表
export function getStaffDataApi(data) {
data.method = `dj.api.smartcarlife.staff.listBySceneShop`
return request(data)
}
// 获取个人交付成交率列表
export function listWithPage_personal(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.page`
return request(data)
}
// 获取个人交付成交率详情
export function getById_personal(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.detail`
return request(data, "post")
}
// 删除个人交付成交率
export function deleteById_personal(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.delete`
return request(data)
}
// 添加/修改个人交付成交率
export function insertPersonalConfig(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.save`
return request(data)
}
// 个人交付成交率导入
export function personalConfigImport(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.import`
return request(data, "post", ["file"])
}
...@@ -289,7 +289,7 @@ export const rangePickerOptions_outputValue = { ...@@ -289,7 +289,7 @@ export const rangePickerOptions_outputValue = {
} }
/** /**
* 店面配置-门店主机厂交付数 * 店面配置-门店主机厂交付数/个人交付成交率
* 限制:当前日期>10号‌:仅允许选择当前月份;当前日期≤10号‌:允许选择当前月份和上个月;其他情况‌:禁用所有其他月份‌ * 限制:当前日期>10号‌:仅允许选择当前月份;当前日期≤10号‌:允许选择当前月份和上个月;其他情况‌:禁用所有其他月份‌
*/ */
export const rangePickerOptions_deliveryQuantity = { export const rangePickerOptions_deliveryQuantity = {
......
...@@ -896,6 +896,49 @@ export const routerName = { ...@@ -896,6 +896,49 @@ export const routerName = {
parentId: "90619", parentId: "90619",
label: "预警设置", label: "预警设置",
handle: "warningHandle" handle: "warningHandle"
},
{
authId: "9061928",
parentId: "90619",
label: "导入成交率",
category: "Button",
type: "primary",
handle: "handleImport"
},
{
authId: "9061929",
parentId: "90619",
label: "新增成交率",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9061930",
parentId: "90619",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9061931",
parentId: "90619",
label: "详情",
handle: "handleDetail"
},
{
authId: "9061932",
parentId: "90619",
label: "修改",
handle: "handleEdit"
},
{
authId: "9061933",
parentId: "90619",
label: "删除",
handle: "handleDelete"
} }
], ],
// component: _import("systemConfig/ShopConfig/index") // component: _import("systemConfig/ShopConfig/index")
......
...@@ -5,11 +5,51 @@ ...@@ -5,11 +5,51 @@
<div class="line"></div> <div class="line"></div>
<div class="line_text">录单设置</div> <div class="line_text">录单设置</div>
</div> </div>
<div class="flex_box">
<div class="content_main">
<el-form :model="formData" :rules="rules" ref="ruleForm">
<template v-for="(item, index) in formList">
<el-form-item
v-if="item.prop != 'zyVoucher'"
:key="index"
label-width="240px"
:label="item.name"
:prop="item.prop"
>
<el-radio-group
v-model="formData[item.prop]"
@change="changeType()"
>
<el-radio :label="true">必填</el-radio>
<el-radio :label="false">非必填</el-radio>
</el-radio-group>
</el-form-item>
</template>
</el-form>
</div>
<div class="tip_container">
<div class="tip_title">
小程序端-录单-字段设置为必填将带“<span class="require">*</span>”号
</div>
<div class="img_wrap">
<img
class="viewimg"
src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/web/mini_example_equity.png"
alt=""
/>
</div>
</div>
</div>
<div class="title-header">
<div class="line"></div>
<div class="line_text">上传协议设置</div>
</div>
<div class="content_main"> <div class="content_main">
<el-form :model="formData" :rules="rules" ref="ruleForm"> <el-form :model="formData" :rules="rules" ref="ruleForm">
<template v-for="(item, index) in formList"> <template v-for="(item, index) in formList">
<el-form-item <el-form-item
:key="index" :key="index"
v-if="item.prop == 'zyVoucher'"
label-width="240px" label-width="240px"
:label="item.name" :label="item.name"
:prop="item.prop" :prop="item.prop"
...@@ -18,25 +58,17 @@ ...@@ -18,25 +58,17 @@
v-model="formData[item.prop]" v-model="formData[item.prop]"
@change="changeType()" @change="changeType()"
> >
<el-radio :label="true">必填</el-radio> <el-radio :label="true">必须上传才分账</el-radio>
<el-radio :label="false">非必填</el-radio> <el-radio :label="false">无需上传</el-radio>
</el-radio-group> </el-radio-group>
<div class="tips-box">
<p>必须上传,则店面下单购买第三方权益或延保必须上传协议后才分账,未上传则订单不分帐;</p>
<p>无需上传,则店面下单购买第三方权益或延保无上传协议要求。</p>
</div>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
</div> </div>
<div class="tip_container">
<div class="tip_title">
小程序端-录单-字段设置为必填将带“<span class="require">*</span>”号
</div>
<div class="img_wrap">
<img
class="viewimg"
src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/web/mini_example_equity.png"
alt=""
/>
</div>
</div>
</div> </div>
<div class="footer_btn"> <div class="footer_btn">
<el-button type="primary" class="ok-btn" @click="comfirm"> <el-button type="primary" class="ok-btn" @click="comfirm">
...@@ -52,6 +84,7 @@ import { ...@@ -52,6 +84,7 @@ import {
orderFieldSettingList, orderFieldSettingList,
orderFieldSettingUpdate orderFieldSettingUpdate
} from "@/api/shopConfig.js" } from "@/api/shopConfig.js"
import { mapActions } from "vuex"
export default { export default {
name: "EquitySet", name: "EquitySet",
data() { data() {
...@@ -60,7 +93,8 @@ export default { ...@@ -60,7 +93,8 @@ export default {
formData: { formData: {
carBrand: false, carBrand: false,
carNo: false, carNo: false,
idNumber: false idNumber: false,
zyVoucher: true
}, },
rules: { rules: {
carBrand: [ carBrand: [
...@@ -71,6 +105,9 @@ export default { ...@@ -71,6 +105,9 @@ export default {
], ],
idNumber: [ idNumber: [
{ required: true, message: "请证件号码:", trigger: "change" } { required: true, message: "请证件号码:", trigger: "change" }
],
zyVoucher: [
{ required: true, message: '请选择上传协议', trigger: 'change' }
] ]
}, },
formList: [ formList: [
...@@ -85,6 +122,10 @@ export default { ...@@ -85,6 +122,10 @@ export default {
{ {
name: "证件号码:", name: "证件号码:",
prop: "idNumber" prop: "idNumber"
},
{
name: '上传协议:',
prop: 'zyVoucher'
} }
] ]
} }
...@@ -101,23 +142,20 @@ export default { ...@@ -101,23 +142,20 @@ export default {
}, },
props: {}, props: {},
mounted() { mounted() {
console.log(this.$route, this.merchantId)
this.getEquitySet() this.getEquitySet()
}, },
methods: { methods: {
...mapActions({ close: "d2admin/page/close" }),
getEquitySet() { getEquitySet() {
orderFieldSettingList({ orderFieldSettingList({
merchantId: this.merchantId, merchantId: this.merchantId,
scene: 0 scene: 0
}) })
.then((res) => { .then((res) => {
console.log(res)
res.map((item) => { res.map((item) => {
this.formData[item.fieldKey] = item.isRequired this.formData[item.fieldKey] = item.isRequired
}) })
this.settingInfo = res this.settingInfo = res
// formData
console.log(this.formData)
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err)
...@@ -125,7 +163,6 @@ export default { ...@@ -125,7 +163,6 @@ export default {
}, },
changeType(e) {}, changeType(e) {},
comfirm() { comfirm() {
console.log(this.formData)
const settings = this.settingInfo.map((item) => { const settings = this.settingInfo.map((item) => {
item.isRequired = this.formData[item.fieldKey] item.isRequired = this.formData[item.fieldKey]
return item return item
...@@ -136,12 +173,10 @@ export default { ...@@ -136,12 +173,10 @@ export default {
merchantName: this.merchantName, merchantName: this.merchantName,
settings settings
} }
console.log(params, "params")
orderFieldSettingUpdate(params) orderFieldSettingUpdate(params)
.then((res) => { .then((res) => {
this.notice.okTips("操作成功") this.notice.okTips("操作成功")
this.cancel() this.cancel()
console.log(res)
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err)
...@@ -164,6 +199,13 @@ export default { ...@@ -164,6 +199,13 @@ export default {
.top_wrap { .top_wrap {
padding: 12px 20px; padding: 12px 20px;
background: #fff; background: #fff;
.flex_box {
display: flex;
.content_main {
flex-shrink: 0;
width: 50%;
}
}
.title-header { .title-header {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -178,7 +220,7 @@ export default { ...@@ -178,7 +220,7 @@ export default {
margin-right: 8px; margin-right: 8px;
} }
.line_text { .line_text {
width: 72px; width: 150px;
height: 24px; height: 24px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 500; font-weight: 500;
...@@ -188,6 +230,14 @@ export default { ...@@ -188,6 +230,14 @@ export default {
} }
.content_main { .content_main {
padding: 20px 0; padding: 20px 0;
.tips-box {
color: #999999;
font-size: 12px;
p{
margin: 0;
line-height: 20px;
}
}
} }
.tip_container { .tip_container {
padding: 20px 0; padding: 20px 0;
...@@ -202,7 +252,7 @@ export default { ...@@ -202,7 +252,7 @@ export default {
} }
} }
.img_wrap { .img_wrap {
padding-left: 84px; padding-left: 30px;
padding-top: 8px; padding-top: 8px;
} }
.viewimg { .viewimg {
......
...@@ -11,11 +11,14 @@ ...@@ -11,11 +11,14 @@
name="outputValue" /> name="outputValue" />
<el-tab-pane label="主机厂交付数" <el-tab-pane label="主机厂交付数"
name="deliveryQuantity" /> name="deliveryQuantity" />
<el-tab-pane label="个人交付成交率"
name="personalConversionRate" />
</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'"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -25,6 +28,7 @@ ...@@ -25,6 +28,7 @@
import shopSet from './index' 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 { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
export default { export default {
name: 'StaffIndex', name: 'StaffIndex',
...@@ -39,7 +43,8 @@ export default { ...@@ -39,7 +43,8 @@ export default {
components: { components: {
shopSet, shopSet,
outputValue, outputValue,
deliveryQuantity deliveryQuantity,
personalConversionRate
}, },
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>
...@@ -185,12 +185,12 @@ ...@@ -185,12 +185,12 @@
<span class="flag-text">查看订单商品成本</span> <span class="flag-text">查看订单商品成本</span>
</el-form-item> </el-form-item>
<el-form-item label="捆绑轻改门店:"> <el-form-item label="捆绑轻改门店:">
<el-select v-model="form.bindMerchantId" remote reserve-keyword class="el_select itd" placeholder="请选择" <el-select v-model="form.bindMerchantId" remote reserve-keyword class="el_select itd"
@visible-change="visibleChange" :remote-method="remoteMethod" clearable placeholder="请选择" @visible-change="visibleChange" :remote-method="remoteMethodBind" clearable
v-el-select-loadmore="interestsLoadmore" filterable @change="bindMerchantChange"> v-el-select-loadmore="interestsLoadmore" filterable @change="bindMerchantChange">
<el-option v-for="item in upgradeMerchantList" :key="item.merchantId" :label="item.merchantName" <el-option v-for="item in upgradeMerchantList" :key="item.merchantId"
:value="item.merchantId" /> :label="item.merchantName" :value="item.merchantId" />
</el-select> </el-select>
<span class="item-tips">注:单选1.1场景的门店,当前门店权益/延保录单后,会给客户赠送该门店1.1太阳膜礼券</span> <span class="item-tips">注:单选1.1场景的门店,当前门店权益/延保录单后,会给客户赠送该门店1.1太阳膜礼券</span>
</el-form-item> </el-form-item>
<!-- <el-form-item label="阳光激励费:" prop="sunlightIncentiveCost"> <!-- <el-form-item label="阳光激励费:" prop="sunlightIncentiveCost">
...@@ -706,7 +706,7 @@ export default { ...@@ -706,7 +706,7 @@ export default {
} }
}, },
remoteMethod(query) { remoteMethodBind(query) {
this.merchantNameKeyword = query this.merchantNameKeyword = query
this.currentPage = 1 this.currentPage = 1
this.upgradeMerchantList = [] this.upgradeMerchantList = []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!