Commit 761f2f54 by 前端

Merge branch 'v2.1.0' into 'develop'

V2.1.0上线后,合并代码到develop。

See merge request !123
2 parents e3cb4d6c af866ba2
Showing 56 changed files with 906 additions and 280 deletions
...@@ -54,6 +54,16 @@ const getMerchantList = params => { ...@@ -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 => { const getZoneListApi = params => {
params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId' params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId'
return http({ return http({
...@@ -84,4 +94,4 @@ const pictureUpload = params => { ...@@ -84,4 +94,4 @@ const pictureUpload = params => {
noSignAttr: ['file'] 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 }
...@@ -129,6 +129,10 @@ html { ...@@ -129,6 +129,10 @@ html {
margin-top: 20px; margin-top: 20px;
} }
.marketing .f-right {
float: right;
}
.marketing .footer-btns { .marketing .footer-btns {
float: right; float: right;
margin-bottom: 18px; margin-bottom: 18px;
...@@ -164,6 +168,35 @@ html { ...@@ -164,6 +168,35 @@ html {
border: 0; border: 0;
} }
.table-popover-block {
position: relative;
height: 160px !important;
overflow: hidden;
border-width: 0 !important;
padding: 0 !important;
margin-bottom: 10px !important;
}
.table-popover-block.el-popper .popper__arrow {
display: none !important;
}
.table-popover-img {
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.marketing .pointer {
cursor: pointer;
}
.marketing .img-w-100 {
width: 100%;
}
.marketing .img-60 { .marketing .img-60 {
width: 60px; width: 60px;
height: 60px; height: 60px;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span> <span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)"> <el-input :placeholder="item.placeholder || '请输入' + item.label" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span> <span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span> <span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input> </el-input>
...@@ -48,16 +48,16 @@ ...@@ -48,16 +48,16 @@
</template> --> </template> -->
<!-- 选择框 --> <!-- 选择框 -->
<div v-else-if="item.type === 'select'"> <div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)"> <el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option> <el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select> </el-select>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
<!-- radio --> <!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange"> <el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio> <el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group> </el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker> <el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
<template v-else-if="item.type === 'upload'"> <template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }"> <div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
}, },
formObj: { formObj: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
hasTitle: { hasTitle: {
type: Boolean, type: Boolean,
...@@ -169,16 +169,16 @@ export default { ...@@ -169,16 +169,16 @@ export default {
}, },
formRules: { formRules: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
// 搜索+输入框/搜索组合组件,搜索栏绑值 // 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: { searchSelectObj: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
// 选择框-添加其他属性 // 选择框-添加其他属性
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column> <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-column prop="merchantName" label="商户名称" align="center"></el-table-column>
</el-table> </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>
<el-col :span="12"> <el-col :span="12">
<el-table :data="selectedData" class="table hightline" height="464px"> <el-table :data="selectedData" class="table hightline" height="464px">
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
hasPage: {
type: Boolean,
default: true
},
// 页面来源 // 页面来源
// sourcePage: { // sourcePage: {
// type: String, // type: String,
...@@ -62,7 +66,7 @@ export default { ...@@ -62,7 +66,7 @@ export default {
// }, // },
storeApi: { storeApi: {
type: Function, type: Function,
default: () => {} default: () => { }
}, },
storeSelected: { storeSelected: {
type: Array, type: Array,
...@@ -70,7 +74,7 @@ export default { ...@@ -70,7 +74,7 @@ export default {
}, },
storeSearchForm: { storeSearchForm: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
// 去掉表格中某些字段 // 去掉表格中某些字段
// noTableField: { // noTableField: {
...@@ -111,7 +115,8 @@ export default { ...@@ -111,7 +115,8 @@ export default {
...this.storeSearchForm, ...this.storeSearchForm,
pageNum: this.pageNum, pageNum: this.pageNum,
currentPage: this.pageNum, currentPage: this.pageNum,
pageSize: this.pageSize pageSize: this.hasPage ? this.pageSize : 99999
// pageSize: this.pageSize
}).then(res => { }).then(res => {
this.selectingData = res.list this.selectingData = res.list
this.total = res.total this.total = res.total
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function (isEnv = true) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
......
...@@ -296,6 +296,18 @@ const staticRoutes = Object.freeze([ ...@@ -296,6 +296,18 @@ const staticRoutes = Object.freeze([
path: '/material/materialDetail', path: '/material/materialDetail',
component: resolve => require([`@/views/material/materialDetail.vue`], resolve), component: resolve => require([`@/views/material/materialDetail.vue`], resolve),
meta: {} 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 export default staticRoutes
...@@ -4,27 +4,58 @@ ...@@ -4,27 +4,58 @@
<div class="container edit-container" style="position: relative"> <div class="container edit-container" style="position: relative">
<div class="right_show"> <div class="right_show">
<div class="card-top"></div> <div class="card-top"></div>
<div class="card_one"> <div class="slider">
<div> <div class="card_one">
<span class="cname">{{ editForm.couponName }}</span> <div class="flex">
<span class="ctype"> <div :class="editForm.status == 3 ? 'darkColor' : ''" class="cname">{{ editForm.couponName }}</div>
<span class="ctypeName">代金券</span> <img src="../../images/unCash.png" class="couponImg" v-if="editForm.status == 3" />
</span> <img src="../../images/cash.png" class="couponImg" v-else />
</div>
<!-- <div class="ctype">
<div class="ctypeName"></div>
</div> -->
<div class="validityPeriod">
<!-- <span class="ctime_name">有效期:</span> -->
<span v-if="editForm.effectiveType == 3">永久有效</span>
<span v-if="editForm.effectiveType == 1">领取后{{ editForm.effectiveDays }}天内有效</span>
<span v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div>
<div style="height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px;"></div>
<div :class="editForm.status == 3 ? 'darkColor' : ''" class="ctime">
<!-- <span class="ctime_name">使用限制:</span> -->
<span v-show="editForm.denomination" style="font-size: 12px;">¥</span>
<span class="ctime_content" style="font-size: 20px;font-weight: 600;" v-show="editForm.denomination">{{ editForm.denomination }}</span>
<span class="ctime_content">{{ editForm.useBarriers == 1 ? '无门槛' : '满' + editForm.full + '元可用' }}</span>
</div>
<div class="ccode">
<img src="../../assets/coupon/code2.png" />
</div>
<div style="height: 1px;background-color: rgb(238, 238, 238);margin: 7px 16px 8px;"></div>
<div class="process">
<img src="../../images/unArrow.png" v-if="editForm.status == 3" />
<img src="../../images/arrow.png" v-else />
<span class="process_text">导航到店</span>
<img class="rightArrow" src="../../images/rightArrow.png" />
<img src="../../images/unCar.png" v-if="editForm.status == 3" />
<img src="../../images/car.png" v-else />
<span class="process_text">开始服务</span>
<img class="rightArrow" src="../../images/rightArrow.png" />
<img src="../../images/unTicket.png" v-if="editForm.status == 3" />
<img src="../../images/ticket.png" v-else />
<span class="process_text">出示核销码</span>
</div>
</div> </div>
<div class="ctime"> <div class="card_two">
<span class="ctime_name">有效期:</span> <div class="cremarks">有效日期:</div>
<span class="ctime_content" v-if="editForm.effectiveType == 3">无限制</span> <div class="validityPeriod" style="margin: 0 8px 8px 8px;">
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{ editForm.effectiveDays }}天</span> <span v-if="editForm.effectiveType == 3">永久有效</span>
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span> <span v-if="editForm.effectiveType == 1">领取后{{ editForm.effectiveDays }}天内有效</span>
<span v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div>
<div class="cremarks">使用说明:</div>
<div class="cremarks_content" style="white-space:pre-wrap">{{ editForm.useDescription }}</div>
</div> </div>
<div class="ctime">
<span class="ctime_name">使用限制:</span>
<span class="ctime_content">{{ editForm.useBarriers == 1 ? '无限制' : '满' + editForm.full + '可用' }}</span>
</div>
</div>
<div class="card_two">
<div class="cremarks">使用说明:</div>
<div class="cremarks_content">{{ editForm.useDescription }}</div>
</div> </div>
</div> </div>
<p class="edit-title">{{ title }}代金券</p> <p class="edit-title">{{ title }}代金券</p>
...@@ -36,11 +67,11 @@ ...@@ -36,11 +67,11 @@
<template slot="directionalFlagHtml"> <template slot="directionalFlagHtml">
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio> <el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span> <span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
</div> </div>
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio> <el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span> <span class="promptCopy">仅能被创建定向礼包时选取</span>
</div> </div>
<div v-if="editForm.useChannel != 1"> <div v-if="editForm.useChannel != 1">
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio> <el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
...@@ -304,7 +335,6 @@ export default { ...@@ -304,7 +335,6 @@ export default {
this.routeInfo = this.$route.params this.routeInfo = this.$route.params
// this.title = this.titleObj[this.routeInfo.addOrEdit] // this.title = this.titleObj[this.routeInfo.addOrEdit]
this.getAllGoods() this.getAllGoods()
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
var id = this.routeInfo.id var id = this.routeInfo.id
var addOrEdit = this.routeInfo.addOrEdit var addOrEdit = this.routeInfo.addOrEdit
if (id) { if (id) {
...@@ -317,12 +347,7 @@ export default { ...@@ -317,12 +347,7 @@ export default {
this.apear = 'couponEdit' this.apear = 'couponEdit'
this.title = '编辑' this.title = '编辑'
} }
const stockIndex = this.editFormData.findIndex(val => val.name == 'stock') this.editCoupon(['stock', 'couponName', 'anticipatedCost'])
const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
const anticipatedCostIdx = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
this.editFormData[couponNameIndex].isDisabled = true
this.editFormData[anticipatedCostIdx].isDisabled = true
this.editFormData[stockIndex].isDisabled = true
this.userDisable = true this.userDisable = true
} else { } else {
this.apear = 'couponAdd' this.apear = 'couponAdd'
...@@ -431,6 +456,12 @@ export default { ...@@ -431,6 +456,12 @@ export default {
}, },
methods: { methods: {
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
this.editFormData[index].isDisabled = true
})
},
haveChange() { haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime() let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime() let timeStamp = new Date().getTime()
...@@ -476,6 +507,7 @@ export default { ...@@ -476,6 +507,7 @@ export default {
} else { } else {
this.priceFlag = true this.priceFlag = true
} }
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
}) })
}, },
...@@ -660,7 +692,7 @@ export default { ...@@ -660,7 +692,7 @@ export default {
//使用描述 //使用描述
obj.useDescription = form.useDescription obj.useDescription = form.useDescription
//预估成本 //预估成本
obj.anticipatedCost = form.anticipatedCost * 100 obj.anticipatedCost = (form.anticipatedCost * 100).toFixed(0)
return obj return obj
}, },
...@@ -741,7 +773,7 @@ export default { ...@@ -741,7 +773,7 @@ export default {
.card_one { .card_one {
width: 243px; width: 243px;
height: 252px; height: 288px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
margin-left: 22px; margin-left: 22px;
...@@ -749,15 +781,16 @@ export default { ...@@ -749,15 +781,16 @@ export default {
} }
.cname { .cname {
width: 170px; margin: 16px 0 10px 16px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
margin-left: 8px;
margin-top: 10px;
display: inline-block; display: inline-block;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fc5b32;
max-width: 164px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.ctype { .ctype {
...@@ -782,23 +815,23 @@ export default { ...@@ -782,23 +815,23 @@ export default {
} }
.ctime { .ctime {
margin-left: 8px; margin: 8px 16px 9px;
margin-top: 10px; text-align: center;
color: #fc5b32;
} }
.ctime_name { /* .ctime_name {
width: 48px; width: 48px;
height: 17px; height: 17px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 12px; font-size: 12px;
color: #333333; color: #333333;
font-weight: 400; font-weight: 400;
} } */
.ctime_content { .ctime_content {
height: 17px; height: 17px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 12px; font-size: 12px;
color: #717171;
font-weight: 400; font-weight: 400;
margin-left: 5px; margin-left: 5px;
} }
...@@ -806,8 +839,8 @@ export default { ...@@ -806,8 +839,8 @@ export default {
.ccode { .ccode {
width: 120px; width: 120px;
height: 120px; height: 120px;
margin-left: 62px; margin: 0 16px;
margin-top: 8px; margin: auto;
} }
.ccodeName { .ccodeName {
...@@ -836,7 +869,7 @@ export default { ...@@ -836,7 +869,7 @@ export default {
.card_two { .card_two {
width: 243px; width: 243px;
height: 115px; height: 162px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
margin-left: 22px; margin-left: 22px;
...@@ -873,4 +906,48 @@ export default { ...@@ -873,4 +906,48 @@ export default {
color: #999; color: #999;
margin-left: -10px; margin-left: -10px;
} }
.couponImg {
width: 69px;
height: 69px;
position: sticky;
top: 114px;
right: 14px;
margin-top: -6px;
margin-right: -6px;
}
.validityPeriod {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a0a0a0;
margin: 0 16px 8px 16px;
}
.process {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2px;
}
.process .process_text {
margin-left: 2px;
font-size: 12px;
color: #333;
}
.process img {
width: 12px;
height: 12px;
}
.process .rightArrow {
padding: 0 4px;
}
.slider {
height: 380px;
overflow: auto;
}
.slider::-webkit-scrollbar-thumb {
background: transparent;
}
.darkColor {
color: #999;
}
</style> </style>
<!-- 编辑兑换券 --> <!-- 编辑兑换券 -->
<template> <template>
<div class="edit-share marketing p-t-20 edit-box"> <div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="height: 630px; position: relative"> <div class="container edit-container" style="height: 650px; position: relative">
<div class="right_show"> <div class="right_show">
<div class="card-top"></div> <div class="card-top"></div>
<div class="card_one"> <div class="slider">
<div> <div class="card_one">
<span class="cname">{{ editForm.couponName }}</span> <div class="flex">
<span class="ctype"><span class="ctypeName">兑换券</span></span> <div :class="editForm.status == 3 ? 'darkColor' : ''" class="cname">{{ editForm.couponName }}</div>
</div> <img src="../../images/unExchange.png" class="couponImg" v-if="editForm.status == 3" />
<div class="ctime"> <img src="../../images/exchange.png" class="couponImg" v-else />
<span class="ctime_name">有效期:</span> </div>
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{ editForm.effectiveDays }}天</span> <!-- <div class="ctype">
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span> <div class="ctypeName"></div>
</div> -->
<div class="validityPeriod">
<!-- <span class="ctime_name">有效期:</span> -->
<span v-if="editForm.effectiveType == 3">永久有效</span>
<span v-if="editForm.effectiveType == 1">领取后{{ editForm.effectiveDays }}天内有效</span>
<span v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div>
<div style="height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px 7px;"></div>
<div class="ccode">
<img src="../../assets/coupon/code2.png" />
</div>
<div style="height: 1px;background-color: rgb(238, 238, 238);margin: 7px 16px 8px;"></div>
<div class="process">
<img src="../../images/unArrow.png" v-if="editForm.status == 3" />
<img src="../../images/arrow.png" v-else />
<span class="process_text">导航到店</span>
<img class="rightArrow" src="../../images/rightArrow.png" />
<img src="../../images/unCar.png" v-if="editForm.status == 3" />
<img src="../../images/car.png" v-else />
<span class="process_text">开始服务</span>
<img class="rightArrow" src="../../images/rightArrow.png" />
<img src="../../images/unTicket.png" v-if="editForm.status == 3" />
<img src="../../images/ticket.png" v-else />
<span class="process_text">出示核销码</span>
</div>
</div> </div>
<div class="link-top"></div> <div class="card_two">
<div class="code_d"> <div class="cremarks">有效日期:</div>
<span class="ctime_name">核销劵码</span> <div class="validityPeriod" style="margin: 0 8px 8px 8px;">
<span v-if="editForm.effectiveType == 3">永久有效</span>
<span v-if="editForm.effectiveType == 1">领取后{{ editForm.effectiveDays }}天内有效</span>
<span v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div>
<div class="cremarks">使用说明:</div>
<div class="cremarks_content" style="white-space:pre-wrap">{{ editForm.useDescription }}</div>
</div> </div>
<img class="ccode" src="../../assets/coupon/code2.png" />
<div class="ccodeName">GH078-003</div>
</div>
<div class="card_two">
<div class="cremarks">使用说明:</div>
<div class="cremarks_content">{{ editForm.useDescription }}</div>
</div> </div>
</div> </div>
<p class="edit-title">{{ title }}兑换券</p> <p class="edit-title">{{ title }}兑换券</p>
...@@ -31,11 +57,11 @@ ...@@ -31,11 +57,11 @@
<template slot="directionalFlagHtml"> <template slot="directionalFlagHtml">
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio> <el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span> <span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
</div> </div>
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio> <el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span> <span class="promptCopy">仅能被创建定向礼包时选取</span>
</div> </div>
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio> <el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
...@@ -201,13 +227,7 @@ export default { ...@@ -201,13 +227,7 @@ export default {
this.apear = 'couponEdit' this.apear = 'couponEdit'
this.title = '编辑' this.title = '编辑'
} }
this.isDisabled = true this.editCoupon(['couponName', 'anticipatedCost', 'stock'])
const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
const anticipatedCostIndex = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
this.editFormData[couponNameIndex].isDisabled = this.isDisabled
this.editFormData[anticipatedCostIndex].isDisabled = this.isDisabled
this.editFormData[stockIndex].isDisabled = this.isDisabled
this.userDisable = true this.userDisable = true
} else { } else {
this.apear = 'couponAdd' this.apear = 'couponAdd'
...@@ -250,6 +270,12 @@ export default { ...@@ -250,6 +270,12 @@ export default {
}, },
methods: { methods: {
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
this.editFormData[index].isDisabled = true
})
},
haveChange() { haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime() let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime() let timeStamp = new Date().getTime()
...@@ -340,7 +366,7 @@ export default { ...@@ -340,7 +366,7 @@ export default {
//是否定制礼包专用 //是否定制礼包专用
obj.directionalFlag = form.directionalFlag obj.directionalFlag = form.directionalFlag
//预估成本 //预估成本
obj.anticipatedCost = form.anticipatedCost * 100 obj.anticipatedCost = (form.anticipatedCost * 100).toFixed(0)
return obj return obj
}, },
...@@ -410,7 +436,7 @@ export default { ...@@ -410,7 +436,7 @@ export default {
.card_one { .card_one {
width: 243px; width: 243px;
height: 252px; height: 260px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
margin-left: 22px; margin-left: 22px;
...@@ -418,15 +444,16 @@ export default { ...@@ -418,15 +444,16 @@ export default {
} }
.cname { .cname {
width: 170px; margin: 16px 0 10px 16px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
margin-left: 8px;
margin-top: 10px;
display: inline-block; display: inline-block;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fc5b32;
max-width: 164px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.ctype { .ctype {
...@@ -450,33 +477,20 @@ export default { ...@@ -450,33 +477,20 @@ export default {
margin-left: 6px; margin-left: 6px;
} }
.ctime { /* .ctime_name {
margin-left: 8px;
margin-top: 10px;
}
.ctime_name {
width: 48px; width: 48px;
height: 17px; height: 17px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 12px; font-size: 12px;
color: #333333; color: #333333;
font-weight: 400; font-weight: 400;
} } */
.ctime_content {
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #717171;
font-weight: 400;
margin-left: 5px;
}
.ccode { .ccode {
width: 120px; width: 120px;
height: 120px; height: 120px;
margin-left: 62px; margin: 0 16px;
margin-top: 8px; margin: auto;
} }
.ccodeName { .ccodeName {
...@@ -505,7 +519,7 @@ export default { ...@@ -505,7 +519,7 @@ export default {
.card_two { .card_two {
width: 243px; width: 243px;
height: 115px; height: 162px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
margin-left: 22px; margin-left: 22px;
...@@ -545,4 +559,48 @@ export default { ...@@ -545,4 +559,48 @@ export default {
.glsx-combi-form .el-form-item--small.el-form-item { .glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important; margin-top: 0px !important;
} }
.couponImg {
width: 69px;
height: 69px;
position: sticky;
top: 114px;
right: 14px;
margin-top: -6px;
margin-right: -6px;
}
.validityPeriod {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a0a0a0;
margin: 0 16px 8px 16px;
}
.process {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2px;
}
.process .process_text {
margin-left: 2px;
font-size: 12px;
color: #333;
}
.process img {
width: 12px;
height: 12px;
}
.process .rightArrow {
padding: 0 4px;
}
.slider {
height: 380px;
overflow: auto;
}
.slider::-webkit-scrollbar-thumb {
background: transparent;
}
.darkColor {
color: #999;
}
</style> </style>
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
previewList(val) { previewList(val) {
if (val.length && val[0].attType == 1) { if (val.length && val[0].attType == 1) {
const attContent = val[0].attContent const attContent = val[0].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
color: #333; color: #333;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
word-wrap: break-word; word-break: break-all;
display: flex; display: flex;
img { img {
width: 20px; width: 20px;
...@@ -133,6 +133,7 @@ export default { ...@@ -133,6 +133,7 @@ export default {
} }
} }
.text { .text {
display: inline-block;
font-size: 16px; font-size: 16px;
padding: 8px 11px; padding: 8px 11px;
} }
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<el-button size="small" @click="handleReset">重置</el-button> <el-button size="small" @click="handleReset">重置</el-button>
</div> </div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }"> <div class="checkbox-group-box" :style="{ height: heightBox + 'px' }">
<div style="margin-bottom: 8px" class="checkbox-box" v-for="(item, index) in labelTreeRets" :key="index" @click="item.checked = !item.checked"> <div style="margin-bottom: 8px" class="checkbox-box" v-for="(item, index) in labelTreeRets" :key="index" @click.self="item.checked = !item.checked">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span> <span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click.self="item.checked = !item.checked"></span>
{{ item.labelGroup.name }} {{ item.labelGroup.name }}
<el-tag :size="size">{{ item.labelType }}</el-tag> <el-tag :size="size">{{ item.labelType }}</el-tag>
<el-radio-group class="tag-group" v-model="item.tagChecked" v-show="item.checked"> <el-radio-group class="tag-group" v-model="item.tagChecked" v-show="item.checked">
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
console.log(res.labelTreeRets) console.log(res.labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelType: item.labelType, labelType: item.labelType == '企业标签' ? (this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签') : item.labelType,
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.labelList, labelList: item.labelList,
checked: false, checked: false,
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
console.log(labelTreeRets) console.log(labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelType: item.labelType, labelType: item.labelType == '企业标签' ? (this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签') : item.labelType,
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.labelList, labelList: item.labelList,
checked: false, checked: false,
......
...@@ -27,11 +27,15 @@ export default { ...@@ -27,11 +27,15 @@ export default {
giftList, giftList,
receivedGiftList receivedGiftList
}, },
created() {
this.activeName = sessionStorage.getItem('GIFTNAME') ? sessionStorage.getItem('GIFTNAME') : 'giftList'
},
mounted() {}, mounted() {},
methods: { methods: {
handleTabClick() {} handleTabClick() {
sessionStorage.setItem('GIFTNAME', this.activeName)
}
} }
} }
</script> </script>
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
<div slot="content">{{ subItem.couponName }}</div> <div slot="content">{{ subItem.couponName }}</div>
</el-tooltip> </el-tooltip>
<div class="gift-sum"> <div class="gift-sum">
<el-input-number v-if="subItem.discountType == 7" :disabled="subItem.status == '3'" class="sum-input" v-model="subItem.couponAmount" @change="handleChange" :min="1" :max="999999" size="mini" label="描述文字"></el-input-number> <el-input-number :disabled="subItem.status == '3'" class="sum-input" v-model="subItem.couponAmount" @change="handleChange" :min="1" :max="999999" size="mini" label="描述文字"></el-input-number>
<p :class="[subItem.status == '3' ? ' txt-grey' : '']" v-else>×{{ subItem.couponAmount }}</p> <!-- <p :class="[subItem.status == '3' ? ' txt-grey' : '']" v-else>×{{ subItem.couponAmount }}</p> -->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -99,9 +99,15 @@ ...@@ -99,9 +99,15 @@
</div> </div>
</div> </div>
</div> </div>
<p class="edit-tips">最多支持4张banner,图片格式仅支持JPG,PNG格式</p> <p class="edit-tips">最多支持6张banner,图片格式仅支持JPG,PNG格式</p>
<p class="edit-tips">建议尺寸660*270px,大小10M以内</p> <p class="edit-tips">建议尺寸660*270px,大小10M以内</p>
</div> </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"> <template slot="customerServerSuffix" slot-scope="scope">
<el-button v-show="!scope.scope.optionList.length" type="text"></el-button> <el-button v-show="!scope.scope.optionList.length" type="text"></el-button>
<p style="color: #5850ff" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p> <p style="color: #5850ff" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
...@@ -115,9 +121,9 @@ ...@@ -115,9 +121,9 @@
<div class="wechat-container m-r-20" style="margin-top: 59px"> <div class="wechat-container m-r-20" style="margin-top: 59px">
<div class="wechat-box"> <div class="wechat-box">
<img class="w-100-per" src="@/assets/phone.png" /> <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"> <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 v-else height="90px">
<el-carousel-item v-for="item in editForm.bannerList" :key="item"> <el-carousel-item v-for="item in editForm.bannerList" :key="item">
<img class="img-w-h" :src="item.bannerImg" /> <img class="img-w-h" :src="item.bannerImg" />
...@@ -130,6 +136,12 @@ ...@@ -130,6 +136,12 @@
<marquee width="200px" height="14px" scrolldelay="160">{{ editForm.noticeContent }}</marquee> <marquee width="200px" height="14px" scrolldelay="160">{{ editForm.noticeContent }}</marquee>
</span> </span>
</div> </div>
<img class="p-absolute icon-fwwd" src="@/assets/homeSet/icon-fwwd.png" />
<img class="p-absolute icon-jyfw" :src="editForm.clueList.indexOf(1) != -1 ? require('@/assets/homeSet/icon-jyfw.png') : require('@/assets/homeSet/icon-jyfw-default.png')" />
<img class="p-absolute icon-wbyy" :src="editForm.clueList.indexOf(2) != -1 ? require('@/assets/homeSet/icon-wbyy.png') : require('@/assets/homeSet/icon-wbyy-default.png')" />
<img class="p-absolute icon-mdkq" src="@/assets/homeSet/icon-mdkq.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')" />
<img class="p-absolute icon-acbb" src="@/assets/homeSet/icon-acbb.png" />
</div> </div>
</div> </div>
</div> </div>
...@@ -198,7 +210,8 @@ export default { ...@@ -198,7 +210,8 @@ export default {
editForm: { editForm: {
merchantQrcode: '', merchantQrcode: '',
noticeContent: '', noticeContent: '',
// preferentialPolicy: '', preferentialPolicy: '',
clueList: [],
customerServerUserId: '', customerServerUserId: '',
bannerList: [] bannerList: []
}, },
...@@ -262,19 +275,29 @@ export default { ...@@ -262,19 +275,29 @@ export default {
} }
] ]
}, },
// { {
// title: '新车优惠政策', title: '新车优惠政策',
// editFormData: [ editFormData: [
// { {
// label: '优惠政策', label: '优惠政策',
// name: 'preferentialPolicy', name: 'preferentialPolicy',
// type: 'input', type: 'input',
// rows: '4', rows: '4',
// inputType: 'textarea', inputType: 'textarea',
// maxlength: '300' maxlength: '300'
// } }
// ] ]
// }, },
{
title: '金刚区管理',
editFormData: [
{
label: '金刚区',
name: '',
addHtml: 'clueBlock'
}
]
},
{ {
title: '在线客服', title: '在线客服',
editFormData: [ editFormData: [
...@@ -318,7 +341,21 @@ export default { ...@@ -318,7 +341,21 @@ export default {
], ],
// 基本信息 // 基本信息
baseData: { baseData: {
consultantList: [] consultantList: [],
clueList: [
{
confId: 1,
confName: '救援服务'
},
{
confId: 2,
confName: '维保预约'
},
{
confId: 3,
confName: '新车频道'
}
]
} }
} }
}, },
...@@ -338,7 +375,8 @@ export default { ...@@ -338,7 +375,8 @@ export default {
this.editForm.bannerList = [] this.editForm.bannerList = []
this.editForm.noticeContent = res.noticeContent this.editForm.noticeContent = res.noticeContent
this.editForm.merchantQrcode = res.merchantQrcode 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.editForm.customerServerUserId = ''
// 在线客服 // 在线客服
this.customerServerList = [] this.customerServerList = []
...@@ -583,7 +621,13 @@ export default { ...@@ -583,7 +621,13 @@ export default {
params.bannerList[idx].bannerType = 0 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.$apis.homeSet.updateHomeApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -600,6 +644,9 @@ export default { ...@@ -600,6 +644,9 @@ export default {
width: 264px; width: 264px;
height: 108px; height: 108px;
} }
.home-set .p-absolute {
position: absolute;
}
.home-set .wechat-container .wechat-box .wechant-back { .home-set .wechat-container .wechat-box .wechant-back {
width: 252px; width: 252px;
box-sizing: border-box; box-sizing: border-box;
...@@ -631,6 +678,30 @@ export default { ...@@ -631,6 +678,30 @@ export default {
line-height: 14px; line-height: 14px;
color: #333333; color: #333333;
} }
.home-set .wechat-container .wechat-box .icon-fwwd {
top: 262px;
left: 40px;
}
.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-mdkq {
top: 262px;
left: 223px;
}
.home-set .wechat-container .wechat-box .icon-xcpd {
top: 315px;
left: 40px;
}
.home-set .wechat-container .wechat-box .icon-acbb {
top: 315px;
left: 103px;
}
.home-set .wechat-container .wechat-box .el-carousel__button { .home-set .wechat-container .wechat-box .el-carousel__button {
width: 5px !important; width: 5px !important;
} }
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item size="small" label="关联订单号"> <el-form-item size="small" label="关联信息">
<el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入关联订单号" clearable></el-input> <el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入关联信息" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="核销日期"> <el-form-item size="small" label="核销日期">
<!-- verificationTimeStart verificationTimeEnd --> <!-- verificationTimeStart verificationTimeEnd -->
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
</el-form> </el-form>
</div> </div>
<GLTable ref="memberRecordRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberRecordRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="orderCodeHtml" slot-scope="scope">
<span class="cursor-pointer" @click="couponNameHandleDetail(scope.scope)" v-if="scope.scope.directionalGiftId">{{ scope.scope.directionalGiftName }}</span>
<span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span>
</span>
<span slot="verificationTime" slot-scope="scope"> <span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span> <span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span> </span>
...@@ -125,15 +129,15 @@ export default { ...@@ -125,15 +129,15 @@ export default {
}, },
{ {
label: '核销用户', label: '核销用户',
prop: 'userName' prop: 'phone'
}, },
{ {
label: '核销员', label: '核销员',
prop: 'verificationOperator' prop: 'verificationOperator'
}, },
{ {
label: '关联订单号', label: '关联信息',
prop: 'orderCode' addHtml: 'orderCodeHtml'
}, },
{ {
label: '核销日期', label: '核销日期',
...@@ -153,6 +157,26 @@ export default { ...@@ -153,6 +157,26 @@ export default {
} }
}, },
methods: { methods: {
// 跳转到礼包领取详情页
couponNameHandleDetail(row) {
console.log('row', row)
this.$router.push({
path: '/giftBag/giftDetail',
query: {
id: row.directionalGiftId
}
})
},
// 跳转到订单详情页
orderCodeHandleDetail(row) {
this.$router.push({
path: '/memberCenter/orderDetail',
query: {
id: row.id,
detail: row
}
})
},
dateFormatFun(date) { dateFormatFun(date) {
return dateFormat(date) return dateFormat(date)
}, },
......
<!-- 编辑新车 -->
<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="newCarRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="logoUrl" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.logoUrl" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.logoUrl" />
</el-popover>
</div>
<div slot="showImageUrl" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.showImageUrl" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.showImageUrl" />
</el-popover>
</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: {
setTableFinishFun() {
//接收到的数据为空
this.$refs.newCarRef.data.length ? (this.$refs.newCarRef.tableHeightValues = '') : this.$refs.newCarRef.setTableHeightFun()
},
handleSearch() {
this.$refs.newCarRef.refreshTable()
},
handleReset() {
this.searchForm = {
name: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
...@@ -427,7 +427,7 @@ export default { ...@@ -427,7 +427,7 @@ export default {
}, },
mounted() { mounted() {
this.getCount() // this.getCount()
this.getOptionsList('searchFormData1') this.getOptionsList('searchFormData1')
this.getOptionsList('searchFormData2') this.getOptionsList('searchFormData2')
this.getOptionsList('searchFormData3') this.getOptionsList('searchFormData3')
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-form label-width="100px" :inline="true"> <el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index"> <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"> <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] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -87,10 +87,19 @@ export default { ...@@ -87,10 +87,19 @@ export default {
name: 'createdDateStr' name: 'createdDateStr'
}, },
{ {
label: '手机号',
name: 'customerPhone'
},
{
label: '客户信息', label: '客户信息',
name: 'customerName' name: 'customerName'
}, },
{ {
label: '分润比例',
name: 'takeFee',
suffix: '%'
},
{
label: '订单类型', label: '订单类型',
name: 'orderSourceName' name: 'orderSourceName'
}, },
...@@ -153,7 +162,6 @@ export default { ...@@ -153,7 +162,6 @@ export default {
}, },
created() { created() {
this.formToRow('detailFormData')
this.formToRow('afterInfoData') this.formToRow('afterInfoData')
}, },
...@@ -196,6 +204,11 @@ export default { ...@@ -196,6 +204,11 @@ export default {
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '-' 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.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 : '-' 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() { handleCancel() {
......
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="goodsImage" class="table-image" slot-scope="scope"> <div slot="goodsImage" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goodsImage" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.goodsImage" />
</el-popover>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button> <el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
...@@ -333,10 +336,10 @@ export default { ...@@ -333,10 +336,10 @@ export default {
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) { if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) { let retailPriceList = item.specificationDetailList.sort(function (a, b) {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function(a, b) { let stockeList = item.specificationDetailList.sort(function (a, b) {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -9,38 +9,24 @@ ...@@ -9,38 +9,24 @@
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;"> <div class="flex" style="margin-top: 20px;">
<div class="main-img-box"> <div class="main-img-box">
<!-- <img class="main-img" :src="mainImgUrl" /> <el-carousel height="375px">
<div>
<div class="flex">
<p class="arrow left-arrow" @click="handleMoveImg('left')"></p>
<div class="small-block">
<div class="flex small-box">
<img class="small-img" v-for="(item, index) in editForm.goodsDetailImageList" :key="index" :src="item.content" @click="handleChangeImg(index)" />
</div>
</div>
<p class="arrow right-arrow" @click="handleMoveImg('right')"></p>
</div>
</div> -->
<!-- <img
v-if="!wechatImgList.length"
class="inner-img"
src="@/assets/product-default.png"
/> -->
<el-carousel height="420px">
<el-carousel-item v-for="item in editForm.goodsDetailImageList" :key="item"> <el-carousel-item v-for="item in editForm.goodsDetailImageList" :key="item">
<video v-if="item.resType == 3" class="inner-img" :src="item.content"></video> <video v-if="item.resType == 3" class="inner-img" :src="item.content"></video>
<img class="inner-img" :src="item.content" /> <img class="inner-img" :src="item.content" />
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
<div style="width: calc(100% - 440px);"> <div style="width: calc(100% - 375px);">
<p class="pro-name txt-ellipsis">{{ editForm.goodsName }}</p> <p class="pro-name txt-ellipsis">{{ editForm.goodsName }}</p>
<p v-show="!specificationDetailList.length" class="supply-price txt-ellipsis">{{ editForm.retailPrice }}元</p> <p v-show="!specificationDetailList.length" class="txt-ellipsis">
供货价:
<span class="supply-price">{{ editForm.retailPrice }}元</span>
</p>
</div> </div>
</div> </div>
<div v-if="specificationDetailList.length" class="flex" style="margin-top: 20px;" id="specificationDetailList"> <div v-if="specificationDetailList.length" style="margin: 20px;" id="specificationDetailList">
<span class="spesc-label" :style="{ width: labelWidth }">规格明细:</span> <div class="spesc-label" :style="{ width: labelWidth }">规格明细:</div>
<div style="width: calc(100% - 100px); padding-right: 20px;"> <div style="width: 100%;">
<table class="table-spesc"> <table class="table-spesc">
<tbody> <tbody>
<tr style="background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);"> <tr style="background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);">
...@@ -144,19 +130,22 @@ export default { ...@@ -144,19 +130,22 @@ export default {
label: '零售价', label: '零售价',
name: 'retailPrice', name: 'retailPrice',
type: 'input', type: 'input',
isDisabled: false isDisabled: false,
width: '411px'
}, },
{ {
label: '供货价', label: '供货价',
name: 'supplyPrice', name: 'supplyPrice',
type: 'input', type: 'input',
isDisabled: true isDisabled: true,
width: '411px'
}, },
{ {
label: '库存', label: '库存',
name: 'goodsStock', name: 'goodsStock',
type: 'input', type: 'input',
isDisabled: true isDisabled: true,
width: '411px'
} }
] ]
} }
...@@ -292,23 +281,6 @@ export default { ...@@ -292,23 +281,6 @@ export default {
handleChangeImg(idx) { handleChangeImg(idx) {
this.mainImgUrl = this.editForm.goodsDetailImageList[idx].content this.mainImgUrl = this.editForm.goodsDetailImageList[idx].content
}, },
// 移动图片
handleMoveImg(dirction) {
var el = document.getElementsByClassName('small-box')[0]
if (dirction == 'left') {
if (this.curMoveNum == 0) {
return true
}
this.curMoveNum = this.curMoveNum - 1
el.style.left = '-' + this.curMoveNum * 90 + 'px'
} else {
if (this.curMoveNum == this.moveNum) {
return true
}
this.curMoveNum = this.curMoveNum + 1
el.style.left = '-' + this.curMoveNum * 90 + 'px'
}
},
handleInput(e, idx) { handleInput(e, idx) {
var newValue = e.target.value var newValue = e.target.value
if (!this.reg.priceReg.test(newValue)) { if (!this.reg.priceReg.test(newValue)) {
...@@ -395,7 +367,7 @@ export default { ...@@ -395,7 +367,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
...@@ -417,83 +389,33 @@ export default { ...@@ -417,83 +389,33 @@ export default {
position: relative; position: relative;
} }
/* .control {
width: calc(100% - 480px);
} */
.edit-product-dh .view img { .edit-product-dh .view img {
width: 100%; width: 100%;
vertical-align: top; vertical-align: top;
} }
/* .edit-product-dh .main-img {
width: 375px;
height: 375px;
} */
.edit-product-dh .inner-img { .edit-product-dh .inner-img {
width: 420px; width: 100%;
height: 420px; height: 100%;
} }
.edit-product-dh .main-img-box { .edit-product-dh .main-img-box {
width: 440px; width: 375px;
/* height: 440px; */
text-align: center; text-align: center;
padding: 0 20px; margin: 0 34px 0 20px;
}
/* .edit-product-dh .flex {
display: flex;
} */
.edit-product-dh .arrow {
width: 0;
height: 0;
border-width: 20px;
border-style: solid;
margin-top: 20px;
cursor: pointer;
}
.edit-product-dh .left-arrow {
border-color: transparent #999999 transparent transparent;
}
.edit-product-dh .right-arrow {
border-color: transparent transparent transparent #999999;
}
.edit-product-dh .small-block {
position: relative;
overflow: hidden;
width: 344px;
height: 80px;
margin: 0 10px;
}
.edit-product-dh .small-box {
position: absolute;
left: 0;
}
.edit-product-dh .small-img {
width: 80px;
height: 80px;
margin-right: 8px;
cursor: pointer;
} }
.edit-product-dh .pro-name { .edit-product-dh .pro-name {
width: 100%; width: 100%;
font-size: 20px; font-size: 16px;
color: #3a3a3a; color: #3a3a3a;
font-weight: 500;
margin-bottom: 14px;
} }
.edit-product-dh .supply-price { .edit-product-dh .supply-price {
font-size: 26px; font-size: 26px;
color: #ff6d00; color: #ff6d00;
margin-top: 10px;
} }
.edit-product-dh .border-red { .edit-product-dh .border-red {
...@@ -509,12 +431,10 @@ export default { ...@@ -509,12 +431,10 @@ export default {
} }
/* 规格 */ /* 规格 */
.edit-product-dh .spesc-label { .edit-product-dh .spesc-label {
padding: 1px 10px;
box-sizing: border-box; box-sizing: border-box;
width: 110px;
color: #666; color: #666;
text-align: right; font-weight: 600;
padding-right: 12px; margin-bottom: 10px;
} }
.edit-product-dh .table-spesc { .edit-product-dh .table-spesc {
width: 100%; width: 100%;
......
...@@ -18,14 +18,17 @@ ...@@ -18,14 +18,17 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="goodsImage" slot-scope="scope"> <template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goodsImage" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.goodsImage" />
</el-popover>
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> --> <!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" fn="带货编辑" @click="handleEditDh(2, scope.scope)">编辑</GLButton> <GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && scope.scope.takeType == '1'" type="text" fn="带货编辑" @click="handleEditDh(2, scope.scope)">编辑</GLButton>
<el-button v-if="!scope.scope.goodsStatus && (scope.scope.goodsSource == 1 || (scope.scope.goodsSource == 2 && scope.scope.originGoodsStatus))" type="text" @click="handleUpOrDown(scope.scope)">上架</el-button> <el-button v-if="!scope.scope.goodsStatus && (scope.scope.goodsSource == 1 || (scope.scope.goodsSource == 2 && scope.scope.originGoodsStatus))" type="text" @click="handleUpOrDown(scope.scope)">上架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && !scope.scope.originGoodsStatus" type="text" @click="handleDwonNotice(scope.scope)">下架通知</el-button> <el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && !scope.scope.originGoodsStatus && scope.scope.offReason" type="text" @click="handleDwonNotice(scope.scope)">下架通知</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleUpOrDown(scope.scope)">下架</el-button> <el-button v-if="scope.scope.goodsStatus" type="text" @click="handleUpOrDown(scope.scope)">下架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" @click="handleTakeGood(scope.scope)">取消带货</el-button> <el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" @click="handleTakeGood(scope.scope)">取消带货</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" @click="handleTop(scope.scope)">置顶</el-button> <el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" @click="handleTop(scope.scope)">置顶</el-button>
...@@ -293,7 +296,7 @@ export default { ...@@ -293,7 +296,7 @@ export default {
handleDwonNotice(row) { handleDwonNotice(row) {
this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', { this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
confirmButtonText: '确定', confirmButtonText: '确定',
callback: action => {} callback: action => { }
}) })
}, },
handleUpOrDown(row) { handleUpOrDown(row) {
...@@ -383,10 +386,10 @@ export default { ...@@ -383,10 +386,10 @@ export default {
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) { if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) { let retailPriceList = item.specificationDetailList.sort(function (a, b) {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function(a, b) { let stockeList = item.specificationDetailList.sort(function (a, b) {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -425,7 +425,7 @@ export default { ...@@ -425,7 +425,7 @@ export default {
} else { } else {
params.eventList = [] params.eventList = []
this.editForm.eventList.forEach((item, index) => { this.editForm.eventList.forEach((item, index) => {
params.eventList.push(item) params.eventList.push(JSON.parse(JSON.stringify(item)))
if (item.object) { if (item.object) {
params.eventList[index].objectId = item.object.objectId params.eventList[index].objectId = item.object.objectId
params.eventList[index].additionalType = item.object.additionalType params.eventList[index].additionalType = item.object.additionalType
......
<!-- 带货管理 --> <!-- 带货管理 -->
<template> <template>
<div class="marketing p-t-20"> <div class="marketing take-good p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" @click="handleTakeGood()">一键带货</el-button>
</div>
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<el-button :size="size" class="default-blue-btn f-right m-b-10" type="default" @click="handleTakeGood()">一键带货</el-button>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="takeGoodRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="takeGoodRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="goodsImage" class="table-image" slot-scope="scope"> <div slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goods.goodsImage" /> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goods.goodsImage" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.goods.goodsImage" />
</el-popover>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button> <el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <!-- <GLButton v-if="!scope.scope.taked" fn="带货" type="text" @click="handleSingleTakeGood(scope.scope)">带货</GLButton> -->
<!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> -->
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -38,6 +42,7 @@ export default { ...@@ -38,6 +42,7 @@ export default {
return { return {
size: 'small', size: 'small',
url: url, url: url,
hideAfter: 100000,
searchForm: { searchForm: {
goodsName: '', goodsName: '',
createDate: [] createDate: []
...@@ -103,7 +108,7 @@ export default { ...@@ -103,7 +108,7 @@ export default {
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
getParams() { getParams() {
...@@ -174,7 +179,13 @@ export default { ...@@ -174,7 +179,13 @@ export default {
}, },
handleDetail(row) { handleDetail(row) {
this.$router.push('/takeGood/takeGoodDetail/' + row.goodsId) // this.$router.push('/takeGood/takeGoodDetail/' + row.goodsId)
this.$router.push({
path: '/takeGood/takeGoodDetail',
query: {
id: row.goodsId
}
})
}, },
handleSearch() { handleSearch() {
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
], ],
// 选择门店 // 选择门店
relateStoreVisible: false, relateStoreVisible: false,
storeApi: this.$apis.common.getMerchantList, storeApi: this.$apis.common.getSimpleMerchantList,
storeSearchForm: { storeSearchForm: {
merchantId: '', merchantId: '',
merchantName: '' merchantName: ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!