Commit 21fa1a46 by 前端

Merge branch 'chenwq_dev_v2.1.0' into 'v2.1.0'

Chenwq dev v2.1.0

See merge request !109
2 parents 8b33f595 2c74ae72
......@@ -54,6 +54,16 @@ const getMerchantList = params => {
})
}
const getSimpleMerchantList = params => {
params.method = 'scrm.api.carlife.merchant.listWithPageSimpleByCurMerchant'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
const getZoneListApi = params => {
params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId'
return http({
......@@ -84,4 +94,4 @@ const pictureUpload = params => {
noSignAttr: ['file']
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
import { http } from '@/main'
const getCarListApi = params => {
params.method = 'scrm.api.wwbench.clue.vehicle.list'
return http({
url: 'rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCarListApi }
......@@ -13,7 +13,7 @@
<el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column>
<el-table-column prop="merchantName" label="商户名称" align="center"></el-table-column>
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination v-if="hasPage" small background @current-change="handleCurrentChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</el-col>
<el-col :span="12">
<el-table :data="selectedData" class="table hightline" height="464px">
......@@ -55,6 +55,10 @@ export default {
type: Boolean,
default: false
},
hasPage: {
type: Boolean,
default: true
},
// 页面来源
// sourcePage: {
// type: String,
......@@ -62,7 +66,7 @@ export default {
// },
storeApi: {
type: Function,
default: () => {}
default: () => { }
},
storeSelected: {
type: Array,
......@@ -70,7 +74,7 @@ export default {
},
storeSearchForm: {
type: Object,
default: () => {}
default: () => { }
}
// 去掉表格中某些字段
// noTableField: {
......@@ -111,7 +115,8 @@ export default {
...this.storeSearchForm,
pageNum: this.pageNum,
currentPage: this.pageNum,
pageSize: this.pageSize
pageSize: this.hasPage ? this.pageSize : 99999
// pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list
this.total = res.total
......
......@@ -296,6 +296,18 @@ const staticRoutes = Object.freeze([
path: '/material/materialDetail',
component: resolve => require([`@/views/material/materialDetail.vue`], resolve),
meta: {}
},
{
name: 'carList',
path: '/newCarManage/index',
component: resolve => require([`@/views/newCarManage/index.vue`], resolve),
meta: {}
},
{
name: 'editCar',
path: '/newCarManage/editCar',
component: resolve => require([`@/views/newCarManage/editCar.vue`], resolve),
meta: {}
}
])
export default staticRoutes
......@@ -102,6 +102,12 @@
<p class="edit-tips">最多支持4张banner,图片格式仅支持JPG,PNG格式</p>
<p class="edit-tips">建议尺寸660*270px,大小10M以内</p>
</div>
<!-- 金刚区管理 -->
<div slot="clueBlock">
<el-checkbox-group v-model="editForm.clueList" @change="handleChange">
<el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox>
</el-checkbox-group>
</div>
<template slot="customerServerSuffix" slot-scope="scope">
<el-button v-show="!scope.scope.optionList.length" type="text"></el-button>
<p style="color: #5850ff" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
......@@ -115,9 +121,9 @@
<div class="wechat-container m-r-20" style="margin-top: 59px">
<div class="wechat-box">
<img class="w-100-per" src="@/assets/phone.png" />
<img class="wechant-back" src="@/assets/home-set.png" />
<img class="wechant-back" src="@/assets/homeSet/home-set.png" />
<div class="wechant-banner-img img-w-h">
<img v-if="!editForm.bannerList.length" src="@/assets/home-set-default.png" />
<img v-if="!editForm.bannerList.length" src="@/assets/homeSet/home-set-default.png" />
<el-carousel v-else height="90px">
<el-carousel-item v-for="item in editForm.bannerList" :key="item">
<img class="img-w-h" :src="item.bannerImg" />
......@@ -130,6 +136,9 @@
<marquee width="200px" height="14px" scrolldelay="160">{{ editForm.noticeContent }}</marquee>
</span>
</div>
<img class="p-absolute icon-wbyy" :src="editForm.clueList.indexOf(1) != -1 ? require('@/assets/homeSet/icon-wbyy.png') : require('@/assets/homeSet/icon-wbyy-default.png')" />
<img class="p-absolute icon-jyfw" :src="editForm.clueList.indexOf(2) != -1 ? require('@/assets/homeSet/icon-jyfw.png') : require('@/assets/homeSet/icon-jyfw-default.png')" />
<img class="p-absolute icon-xcpd" :src="editForm.clueList.indexOf(3) != -1 ? require('@/assets/homeSet/icon-xcpd.png') : require('@/assets/homeSet/icon-xcpd-default.png')" />
</div>
</div>
</div>
......@@ -198,7 +207,8 @@ export default {
editForm: {
merchantQrcode: '',
noticeContent: '',
// preferentialPolicy: '',
preferentialPolicy: '',
clueList: [],
customerServerUserId: '',
bannerList: []
},
......@@ -262,19 +272,29 @@ export default {
}
]
},
// {
// title: '新车优惠政策',
// editFormData: [
// {
// label: '优惠政策',
// name: 'preferentialPolicy',
// type: 'input',
// rows: '4',
// inputType: 'textarea',
// maxlength: '300'
// }
// ]
// },
{
title: '新车优惠政策',
editFormData: [
{
label: '优惠政策',
name: 'preferentialPolicy',
type: 'input',
rows: '4',
inputType: 'textarea',
maxlength: '300'
}
]
},
{
title: '金刚区管理',
editFormData: [
{
label: '金刚区',
name: '',
addHtml: 'clueBlock'
}
]
},
{
title: '在线客服',
editFormData: [
......@@ -318,7 +338,21 @@ export default {
],
// 基本信息
baseData: {
consultantList: []
consultantList: [],
clueList: [
{
confId: 1,
confName: '维保预约'
},
{
confId: 2,
confName: '救援服务'
},
{
confId: 3,
confName: '新车频道'
}
]
}
}
},
......@@ -338,7 +372,8 @@ export default {
this.editForm.bannerList = []
this.editForm.noticeContent = res.noticeContent
this.editForm.merchantQrcode = res.merchantQrcode
// this.editForm.preferentialPolicy = res.preferentialPolicy
this.editForm.clueList = res.clueList.map(k => k.clueId)
this.editForm.preferentialPolicy = res.preferentialPolicy
this.editForm.customerServerUserId = ''
// 在线客服
this.customerServerList = []
......@@ -583,7 +618,13 @@ export default {
params.bannerList[idx].bannerType = 0
}
})
// console.log(params)
// 金刚区管理
params.clueList = this.editForm.clueList.length
? this.editForm.clueList.map(k => {
return { clueId: k }
})
: []
console.log(params)
this.$apis.homeSet.updateHomeApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
......@@ -600,6 +641,9 @@ export default {
width: 264px;
height: 108px;
}
.home-set .p-absolute {
position: absolute;
}
.home-set .wechat-container .wechat-box .wechant-back {
width: 252px;
box-sizing: border-box;
......@@ -631,6 +675,18 @@ export default {
line-height: 14px;
color: #333333;
}
.home-set .wechat-container .wechat-box .icon-wbyy {
top: 262px;
left: 101px;
}
.home-set .wechat-container .wechat-box .icon-jyfw {
top: 262px;
left: 162px;
}
.home-set .wechat-container .wechat-box .icon-xcpd {
top: 315px;
left: 40px;
}
.home-set .wechat-container .wechat-box .el-carousel__button {
width: 5px !important;
}
......
<!-- 编辑新车 -->
<template>
<div class="edit-car marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<el-button type="default" @click="handleRelateStoreClose(scope)">{{ editForm.merchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</div>
<div slot="merchantTable" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} )` }">
<GLTable v-show="editForm.merchantList.length" ref="warehousListRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.merchantList">
<span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleMerchantDelete(scope)">删除</el-button>
</span>
</GLTable>
</div>
</glsx-combi-form>
<relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
<el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px">
<el-form-item label="商户ID:" prop="merchantId">
<el-input :size="size" v-model.trim="storeSearchForm.merchantId" placeholder="请输入商户ID" clearable></el-input>
</el-form-item>
<el-form-item label="门店名称:" prop="merchantName">
<el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入门店名称" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleSearchStore">搜索</el-button>
</el-form-item>
</el-form>
</el-row>
</relate-store-dialog>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
export default {
name: 'editCar',
data() {
return {
size: 'small',
title: '新增专区',
titleObj: {
1: '新增专区',
2: '编辑专区'
},
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
routeInfo: {
// 1-新增;2-编辑;3-查看
addOrEdit: 1,
id: ''
},
editStatus: false,
labelWidth: '144px',
editForm: {
// 专区类型(1发现频道,2商城专区)
zoneType: '2',
zoneName: '',
zoneImg: '',
merchantList: []
},
editRule: {
zoneName: [{ required: true, message: '请输入专区名称', trigger: 'change' }],
zoneImg: [{ required: true, message: '请选择专区图片', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }]
},
isEdit: true,
editFormData: [
{
label: '专区名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '专区图片',
name: 'zoneImg',
type: 'upload',
limitSize: 10,
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
}
},
{
label: '门店',
name: 'merchantList',
addHtml: 'selectMerchant',
style: {
'margin-bottom': '10px'
}
},
{
// label: '',
name: '',
addHtml: 'merchantTable'
}
],
// 选择门店
relateStoreVisible: false,
storeApi: this.$apis.common.getSimpleMerchantList,
storeSearchForm: {
merchantId: '',
merchantName: ''
},
selectedList: [],
// 门店表格
tableParams: {
tableOption: true,
tableColumns: [
{
label: '门店名称',
prop: 'merchantName'
}
]
}
}
},
watch: {
editForm: {
handler(val) {
this.editStatus = true
},
deep: true
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
},
methods: {
getInfo() {
this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => {
this.editForm.zoneName = res.zoneName
this.editForm.zoneImg = res.zoneImg
this.editForm.merchantList = res.merchantRefList
this.editForm.merchantList.forEach(item => {
item.merchantNo = item.merchantId
})
this.$nextTick(() => {
this.editStatus = false
})
})
},
// 选择门店
handleRelateStoreClose() {
this.selectedList = this.$common.utils.deepClone(this.editForm.merchantList)
this.relateStoreVisible = !this.relateStoreVisible
},
handleRelateStoreConfirm(selectedData) {
this.editForm.merchantList = selectedData
this.selectedList = selectedData
this.handleRelateStoreClose()
this.$refs.editFormRef.$refs[this.editChildRef].validateField('merchantList')
},
handleSearchStore() {
this.$refs.relateStore.handleCurrentChange(1)
},
handleMerchantDelete(obj) {
this.$messageBox.confirm('是否删除该门店?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
// type: 'error',
callback: action => {
if (action == 'confirm') {
var idx = this.editForm.merchantList.findIndex(item => item.merchantNo == obj.scope.merchantNo)
this.editForm.merchantList.splice(idx, 1)
}
}
})
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
params.merchantList = []
// 专区类型(1发现频道,2商城专区)
params.zoneType = '2'
this.editForm.merchantList.forEach(item => {
params.merchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
// console.log(params)
this.$apis.zoneList.insertZoneApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.cancelJump()
}
})
}
})
},
cancelJump() {
this.$router.push({
path: '/zoneList/index'
})
},
handleCancel() {
if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => {})
} else {
this.cancelJump()
}
}
}
}
</script>
<style scoped>
.marketing.edit-car .select-merchant {
/* width: calc(98% - 140px); */
width: 98%;
}
</style>
<!-- 新车管理 -->
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<!-- <GLButton :size="size" type="primary" fn="新增新车" class="el-icon-plus" @click="handleEdit(1)">新增新车</GLButton> -->
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="logoUrl" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
<div slot="showImageUrl" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
<!-- <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
</div> -->
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'carList',
data() {
return {
size: 'small',
url: url,
searchForm: {
name: ''
},
// 搜索
searchFormData: [
{
label: '车辆关键字',
name: 'name',
type: 'input',
placeholder: '请输入车系名称',
maxlength: 100
}
],
// 表格
getListApi: this.$apis.newCar.getCarListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '车型名称',
prop: 'name'
},
{
label: '指导价',
prop: 'guidePrice',
formatter: cellValue => {
return cellValue.guidePrice ? cellValue.guidePrice + '万元' : '-'
}
},
{
label: '品牌logo',
prop: 'logoUrl',
addHtml: 'logoUrl'
},
{
label: '车辆图片',
prop: 'showImageUrl',
addHtml: 'showImageUrl'
},
{
label: '状态',
prop: '',
formatter: cellValue => {
return '已上架'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() { },
methods: {
// secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
// this.$confirm(txt, title, {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning',
// callback: action => {
// if (action == 'confirm') {
// this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : res.message,
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// fn && fn()
// this.handleSearch()
// }
// })
// }
// }
// })
// },
// 1-新增;2-编辑
// handleEdit(addOrEdit, row) {
// var params = {
// addOrEdit: addOrEdit,
// $title: encodeURI(addOrEdit == 1 ? '新建新车' : '编辑新车')
// }
// addOrEdit != 1 && (params.id = row.id)
// this.$router.push({
// path: '/zoneList/editZone',
// query: params
// })
// },
// handleDelete(row) {
// this.secondConfirm('删除', '是否确认删除该新车?', 'zoneList', 'deleteZoneApi', { id: row.id })
// },
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
},
handleReset() {
this.searchForm = {
name: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
......@@ -6,7 +6,7 @@
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] }}</span>
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] + (subItem.suffix || '') || '-' }}</span>
</el-form-item>
</el-row>
</el-form>
......@@ -87,10 +87,19 @@ export default {
name: 'createdDateStr'
},
{
label: '手机号',
name: 'customerPhone'
},
{
label: '客户信息',
name: 'customerName'
},
{
label: '分润比例',
name: 'takeFee',
suffix: '%'
},
{
label: '订单类型',
name: 'orderSourceName'
},
......@@ -153,7 +162,6 @@ export default {
},
created() {
this.formToRow('detailFormData')
this.formToRow('afterInfoData')
},
......@@ -196,6 +204,11 @@ export default {
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '-'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
if (!this.detailForm.takeFee) {
var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee')
this.detailFormData.splice(takeFeeIdx, 1)
}
this.formToRow('detailFormData')
})
},
handleCancel() {
......
<!-- 带货详情 -->
<!-- 商品编辑 - 带货 -->
<template>
<div class="edit-product-dh marketing p-t-20">
<div class="container edit-container">
<div class="edit-product-dh marketing p-t-20 edit-box">
<div class="container">
<p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;">
<div style="width: 440px; text-align: center;">
<img class="main-img" :src="mainImgUrl" />
<!-- <img class="main-img" :src="mainImgUrl" />
<div>
<div class="flex">
<p class="arrow left-arrow" @click="handleMoveImg('left')"></p>
......@@ -17,7 +17,13 @@
</div>
<p class="arrow right-arrow" @click="handleMoveImg('right')"></p>
</div>
</div>
</div> -->
<el-carousel height="420px">
<el-carousel-item v-for="item in editForm.goodsDetailImageList" :key="item">
<video v-if="item.resType == 3" class="inner-img" :src="item.content"></video>
<img class="inner-img" :src="item.content" />
</el-carousel-item>
</el-carousel>
</div>
<div style="width: calc(100% - 440px);">
<p class="pro-name txt-ellipsis">{{ editForm.goodsName }}</p>
......
......@@ -110,7 +110,7 @@ export default {
],
// 选择门店
relateStoreVisible: false,
storeApi: this.$apis.common.getMerchantList,
storeApi: this.$apis.common.getSimpleMerchantList,
storeSearchForm: {
merchantId: '',
merchantName: ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!