Commit 5490fd23 by 前端

Merge branch 'v2.11.0' into 'develop'

合并1128售前权益紧急版本

See merge request !16
2 parents 57586eb2 1b9c4797
......@@ -12,7 +12,7 @@
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-common": "^2.0.4",
"glsx-components": "^1.5.2",
"lodash": "^4.17.21",
"vue": "^2.6.10",
......
......@@ -239,8 +239,8 @@
}
.my-circule-tips::before {
position: absolute;
top: 0;
right: -6px;
top: 5;
right: -10%;
display: inline-block;
height: 6px;
width: 6px;
......@@ -249,6 +249,11 @@
background-color: red;
}
.el-dropdown-menu__item .my-circule-tips::before {
top: 5px;
right: 12px;
}
.newListPage {
margin-top: 17px;
.wrap {
......
<template>
<div class="qr-code-components">
<div :style="[{ bottom: bottom + 'px' }]" @mousedown="move" @mouseup="moveEnd" ref="callCenter" @mouseenter="show = true" @mouseleave="show = false" class="right_btn flex_ccc">
<img src="../../assets/contact_icon.png" />
<div :class="[{topclass:top}]" :style="[{ bottom: bottom + 'px' }]" @mousedown="move" @mouseup="moveEnd" ref="callCenter" @mouseenter="show = true" @mouseleave="show = false" class="right_btn flex_ccc">
<div class="valuation" v-if="valuation" @click="valuations">
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/introduct/valuation.png" class="valuation_icon" />
</div>
<img v-if="icon" :src="icon" />
<img v-else src="../../assets/contact_icon.png" />
<div class="contact_text">联系我们</div>
<div v-if="show" class="left_code flex_ccc">
<img :src="codeUrl" />
......@@ -17,10 +22,18 @@
export default {
name: '',
props: {
icon:{
type:String,
default:''
},
bottom: {
type: Number,
default: 64
},
top: {
type: Number,
default: 0
},
codeUrl: {
type: String,
default: 'https://img01.glsx.com.cn/weapp/resource/equity-h5-new/qrcode2.jpg'
......@@ -32,7 +45,15 @@ export default {
phoneTitle:{
type:String,
default:'服务热线'
}
},
valuation: {
type: Boolean,
default: false
},
isValuation: {
type: Boolean,
default: false
},
},
data() {
return {
......@@ -80,6 +101,10 @@ export default {
} else {
// console.log('执行了拖拽事件')
}
},
valuations() {
this.isValuation = !this.isValuation
this.$emit('valuations', this.isValuation)
}
}
}
......@@ -128,4 +153,16 @@ export default {
}
}
}
.topclass{
top: 154px;
}
.valuation_icon {
width: 80px;
height: 80px;
}
.valuation {
position: absolute;
top: -88px;
cursor: pointer;
}
</style>
......@@ -2,7 +2,7 @@ import Vue from 'vue'
import ElementUI from 'element-ui'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -20,12 +20,13 @@ Vue.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, request_common, request_merchant, sign_common, sign, secret } = await fetchConfig()
// 本地切换域名,不需要Mock上面改动 const => let
// request.baseURL = 'http://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'http://scrm.dev.glsx.com.cn'
// request_common.baseURL = 'http://scrm.dev.glsx.com.cn'
// request_merchant.baseURL = 'http://rop-merchant.dev.glsx.com.cn'
// request.baseURL = 'http://scrm.test.glsx.com.cn'
// request_brand.baseURL = 'http://scrm.test.glsx.com.cn'
// request_common.baseURL = 'http://didicb.glsx.com.cn'
// request_merchant.baseURL = 'http://rop-merchant.test.glsx.com.cn'
// request.baseURL = 'http://192.168.1.78:8064'
// request_brand.baseURL = 'http://192.168.1.78:8064'
// globalState.session.token = 'scrm-base-bb848580-e5e2-48d2-8fcc-2cf3d8bbc3bd-rop'
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......
......@@ -49,7 +49,14 @@
<el-checkbox-group v-model="curSelectPro" :disabled="disabled">
<div v-for="(item, index) in productList" :key="index" class="product_wrapper">
<div style="padding-left: 73px">
<el-checkbox @change="changeCheckBox($event, item)" :disabled="item.disabled" :label="item.packageName"></el-checkbox>
<!-- <el-checkbox @change="changeCheckBox($event, item, index)" :disabled="item.disabled" :label="errGlassName&&item.idName=='glass'?item.packageName+`(${errGlassName})`:item.packageName"> -->
<el-checkbox @change="changeCheckBox($event, item, index)" :label="item.packageName" :disabled="item.disabled">
<div v-if="errGlassName && item.idName == 'glass'">
{{ item.packageName }}
<span style="color: red; font-weight: normal">({{ errGlassName }})</span>
</div>
<div v-else>{{ item.packageName }}</div>
</el-checkbox>
</div>
<div class="customer-form">
<!-- 属性 -->
......@@ -502,7 +509,8 @@ export default {
crash: {},
stolen: {},
tire: {},
vip: {}
vip: {},
glass: {}
},
// 其他信息
editRuleOther: {
......@@ -705,13 +713,17 @@ export default {
pickerOptions: {},
pickerOptions2: {},
hotline: '',
compensationNameDisable: false
compensationNameDisable: false,
errGlassName: ''
}
},
watch: {
'editForm.vehicle.invoicePrice'(newValue, oldValue) {
this.editForm.vehicle.invoicePrice = limitPrice(newValue, oldValue, 7, 2, 0, 2000000)
if (this.currentVaildItem) {
this.vailGlassPackage(this.currentVaildItem, this.currentVaildIndex)
}
},
'editForm.actualSalesPrice'(newValue, oldValue) {
this.editForm.actualSalesPrice = limitPrice(newValue, oldValue, 7, 2)
......@@ -819,8 +831,8 @@ export default {
// item.optionList.push({ value: '5', label: '5年' })
// }
let optionObj = {
'4': { value: '4', label: '4年' },
'5': { value: '5', label: '5年' }
4: { value: '4', label: '4年' },
5: { value: '5', label: '5年' }
}
if (res.servicePeriod == '4' || res.servicePeriod == '5') {
const Target = item.optionList.find(item => {
......@@ -855,8 +867,72 @@ export default {
}
})
},
// 轮胎玻璃验证车辆价格不能大于50w
vailGlassPackage(item, index) {
this.currentVaildItem = item
this.currentVaildIndex = index
let glassNameFlag = this.curSelectPro.includes(this.vailGlassName)
if (item.idName == 'glass') this.vailIndex = index
if (glassNameFlag) {
let vaild = this.editForm.vehicle.invoicePrice && Number(this.editForm.vehicle.invoicePrice) > 500000
if (vaild) {
this.productList[this.vailIndex].groupAttributeList.forEach((el, i) => {
if (el.groupName == 'actual_sales_price') this.vail_sale_price_index = i
})
this.$set(this.productList[this.vailIndex], 'disabled', true)
this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', true)
this.errGlassName = '车辆价格超过50万,无法购买'
this.vaildGlassParams()
// if(this.tempAttributeList.length&&this.packageCodeList.length){
// if( this.packageCodeList.indexOf(this.vailGlassCode)!=-1){
// let arr1 = []
// let arr2 = []
// this.tempAttributeList.forEach(ele=>{
// if(ele.packageCode!=this.vailGlassCode){
// arr1.push(ele)
// }
// })
// this.packageCodeList.forEach(ele=>{
// if(ele!=this.vailGlassCode){
// arr2.push(ele)
// }
// })
// this.handleProductArrParam(arr1, arr2)
// }
// }
} else {
this.errGlassName = ''
if (this.vailIndex !=undefined) this.$set(this.productList[this.vailIndex], 'disabled', false)
if (this.vail_sale_price_index) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', false)
}
} else {
if (this.vailIndex) this.$set(this.productList[this.vailIndex], 'disabled', false)
if (this.vail_sale_price_index) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', false)
}
},
// 轮胎玻璃提单参数处理
vaildGlassParams(){
if(this.equityRadio == 1&&this.tempAttributeList.length&&this.packageCodeList.length&&this.errGlassName){
if( this.packageCodeList.indexOf(this.vailGlassCode)!=-1){
let arr1 = []
let arr2 = []
this.tempAttributeList.forEach(ele=>{
if(ele.packageCode!=this.vailGlassCode){
arr1.push(ele)
}
})
this.packageCodeList.forEach(ele=>{
if(ele!=this.vailGlassCode){
arr2.push(ele)
}
})
this.handleProductArrParam(arr1, arr2)
}
}
},
// 切换套餐---赋默认值
changeCheckBox(e, item) {
changeCheckBox(e, item, index) {
this.vailGlassPackage(item, index)
if (e) {
this.checkCodeList.push(item.packageCode)
this.packageCodeList.push(item.packageCode)
......@@ -1073,7 +1149,6 @@ export default {
concactArr.forEach(item => {
this.autoFormatProduct = Object.assign(this.autoFormatProduct, item)
})
// console.log(this.autoFormatProduct, '定制权益')
}
},
// 处理传参价格问题
......@@ -1097,7 +1172,7 @@ export default {
})
},
// 获取产品的数据
toTestProductData(arr) {
toGetProductData(arr) {
arr.forEach(item => {
if (item.packageName.includes('整车全损')) {
item.idName = 'car'
......@@ -1110,12 +1185,12 @@ export default {
this.getCase(item.planId)
} else if (item.packageName.includes('盗抢')) {
item.idName = 'stolen'
} else if (item.packageName.includes('尊享版')) {
item.idName = 'vip'
} else if (item.packageName.includes('舒享版')) {
item.idName = 'vip'
} else if (item.packageName.includes('优享版')) {
} else if (item.packageType == 1) {
item.idName = 'vip'
} else if (item.packageName.includes('玻璃')) {
this.vailGlassName = item.packageName // 备用
this.vailGlassCode = item.packageCode
item.idName = 'glass'
}
item.disabled = false
item.serviceItems = item.serviceItemsList.length ? item.serviceItemsList.map(k => k.serviceName).join(',') : ''
......@@ -1138,17 +1213,29 @@ export default {
} else if (e.attributeDesc == '购车类型') {
e.optionList = this.baseData.buyCarTypeList
this.productModal[item.idName][e.attributeName] = '0'
} else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == 'vip') && e.attributeDesc == '服务期限') {
} else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == 'vip' || item.idName == 'glass') && e.attributeDesc == '服务期限') {
if (item.idName == 'tire' || item.idName == 'crash') {
e.optionList = this.baseData.servicePeriodList
} else {
e.optionList = this.baseData.servicePeriodList2
}
this.productModal[item.idName][e.attributeName] = '1'
e.disabled = true
// v3.1.2--新版的定制权益-服务期限--改为1,2,3年---旧版的依然是一年
let isOld = item.packageName.includes('尊享版') || item.packageName.includes('舒享版') || item.packageName.includes('优享版')
if(item.idName == 'vip' && !isOld){
e.disabled = false
e.optionList = this.baseData.servicePeriodList
}
this.productModal[item.idName][e.attributeName] = '1'
} else if (e.attributeDesc == '生效日期') {
let nextDay = new Date().getTime() + 24 * 60 * 60 * 1000
this.productModal[item.idName][e.attributeName] = utils.dateFormat(nextDay)
if (item.idName == 'glass') {
let tAdd2 = new Date().getTime() + 24 * 60 * 60 * 1000 * 2
this.productModal[item.idName][e.attributeName] = utils.dateFormat(tAdd2)
e.disabled = true
}
}
ele.tempobj = { ...e }
})
......@@ -1273,7 +1360,7 @@ export default {
})
if (id > -1) item.groupAttributeList.splice(id + 1, 0, obj)
})
this.toTestProductData(res)
this.toGetProductData(res)
})
},
// 改建议价,实际销售价
......@@ -1633,6 +1720,7 @@ export default {
},
// 草稿
handleDraft() {
this.vaildGlassParams()
const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct
if (this.submit) {
return true
......@@ -1702,6 +1790,7 @@ export default {
}
},
handleConfirm() {
this.vaildGlassParams()
const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct
const isEmptyObj = JSON.stringify(vaidObj) == '{}'
if (isEmptyObj) {
......@@ -1801,7 +1890,8 @@ export default {
crash: {},
stolen: {},
tire: {},
vip: {}
vip: {},
glass: {}
}
this.customProductList = []
this.productList = []
......
......@@ -329,7 +329,7 @@ export default {
label: '店面名称',
line: 1,
prop: 'merchantName',
width: '160px',
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
......
......@@ -22,7 +22,7 @@
<el-button :size="size" plain style="float:right;margin-bottom:10px;" @click="handleExport">导出</el-button>
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5, 7, 8, 9, 10, 11, 12].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<!-- <GLButton v-if="[2, 4, 5, 7, 8, 9, 10, 11, 12].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<el-button v-if="[2, 8, 10, 11, 12].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2, 7, 8, 9, 10, 11, 12].includes(scope.scope.orderStatus)" style="position: relative;" type="text" @click="handleUpload(scope.scope)">
上传资料
......@@ -32,8 +32,8 @@
<GLButton v-if="[2, 8, 10, 11].includes(scope.scope.orderStatus) && (!scope.scope.hasPrint || userInfo.admin)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2, 8, 10, 11].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[1, 3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
<el-button v-if="userInfo.admin" type="text" @click="showFailModal(scope.scope)">失败</el-button>
<!-- <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> -->
<el-button v-if="userInfo.admin" type="text" @click="showFailModal(scope.scope)">失败</el-button> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
<!-- s -->
</GLTable>
......@@ -1652,18 +1652,18 @@ export default {
line-height: 16px;
}
.before-sale .table-btns {
display: grid;
grid-template-columns: repeat(auto-fill, 33.33%);
grid-row-gap: 10px;
}
.before-sale .table-btns .el-button {
// padding: 0 0 0 5px;
border-radius: 0;
border: 0;
padding: 0;
margin: 0;
}
// .before-sale .table-btns {
// display: grid;
// grid-template-columns: repeat(auto-fill, 33.33%);
// grid-row-gap: 10px;
// }
// .before-sale .table-btns .el-button {
// // padding: 0 0 0 5px;
// border-radius: 0;
// border: 0;
// padding: 0;
// margin: 0;
// }
.tips-dialog .el-icon-success {
margin-right: 10px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!