Commit 9c96f46f by 匡雅琴

Merge branch 'v2.6.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into kuangyq_dev_v2.6.0

2 parents f679d80f d8a80121
Showing 52 changed files with 1271 additions and 103 deletions
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
"env": { "env": {
"node": true "node": true
}, },
"globals": {
"AMap": true
},
"extends": ["plugin:vue/essential", "@vue/prettier"], "extends": ["plugin:vue/essential", "@vue/prettier"],
"rules": { "rules": {
"no-console": "off", "no-console": "off",
......
This diff could not be displayed because it is too large.
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
"vuex": "^3.1.2", "vuex": "^3.1.2",
......
import { http, http_common, http2 } from '@/main' import { http, http_common, http2, http_merchant } from '@/main'
const defaultPath = 'scrm.api.carlife.' const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => { const getMerchantGoodsListApi = params => {
...@@ -33,6 +33,17 @@ const uploadImgApi = params => { ...@@ -33,6 +33,17 @@ const uploadImgApi = params => {
}) })
} }
const uploadMusicApi = params => {
params.method = 'scrm.api.carlife.common.uploadMusic'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadVideoApi = params => { const uploadVideoApi = params => {
params.method = `${defaultPath}common.uploadVideo` params.method = `${defaultPath}common.uploadVideo`
return http({ return http({
...@@ -128,4 +139,15 @@ const getStaffFollowerListApi = params => { ...@@ -128,4 +139,15 @@ const getStaffFollowerListApi = params => {
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi } // 获取商户信息
const getMerchantInfoApi = params => {
params.method = 'merchants.api.merchant.findMerchantBaseInfo'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi, getMerchantInfoApi }
...@@ -130,4 +130,14 @@ const toVoidGift = params => { ...@@ -130,4 +130,14 @@ const toVoidGift = params => {
}) })
} }
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift } const getQrcode = params => {
params.method = 'scrm.api.coupon.directional.gift.qr.code'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift, getQrcode }
...@@ -54,5 +54,14 @@ const getCouponList = params => { ...@@ -54,5 +54,14 @@ const getCouponList = params => {
sign: true sign: true
}) })
} }
// 集团套餐订单是否允许退款
export { getOrderListApi, getOrderPageDetail, orderExportApi ,orderRefund,getCouponList} const ordeRefundApi = params => {
params.method = 'scrm.api.equity.merchant.order.refund.check'
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export { getOrderListApi, getOrderPageDetail, orderExportApi, orderRefund, getCouponList, ordeRefundApi }
...@@ -107,4 +107,15 @@ const getBusinessTypeByIdApi = params => { ...@@ -107,4 +107,15 @@ const getBusinessTypeByIdApi = params => {
}) })
} }
export default { getBusinessTypeByIdApi, getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi, getGoodsCommentListApi } const deleteGoodsApi = params => {
params.method = 'scrm.api.shopmall.goods.deleteGoods'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getBusinessTypeByIdApi, getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi, getGoodsCommentListApi, deleteGoodsApi }
...@@ -13,6 +13,39 @@ const getActivityPageApi = params => { ...@@ -13,6 +13,39 @@ const getActivityPageApi = params => {
}) })
} }
//分页众筹活动
const getCrowdfundListApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//分页浏览明细
const getBrowseListApi = params => {
params.method = 'scrm.api.shopmall.customer.browse.records'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 分页浏览-导出
const exportBrowseApi = params => {
params.method = 'scrm.api.shopmall.customer.browse.records.export'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//创建/编辑活动 //创建/编辑活动
const addOrUpdateActivityApi = params => { const addOrUpdateActivityApi = params => {
params.method = `${defaultPath}add.or.update` params.method = `${defaultPath}add.or.update`
...@@ -83,4 +116,15 @@ const getSharedApi = params => { ...@@ -83,4 +116,15 @@ const getSharedApi = params => {
}) })
} }
export default { getActivityPageApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi } // 众筹-分享
const getCrowdSharedApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.get.shared'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getActivityPageApi, getCrowdfundListApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi }
...@@ -189,7 +189,7 @@ html { ...@@ -189,7 +189,7 @@ html {
} }
.marketing .el-table .cell { .marketing .el-table .cell {
line-height: 16px; line-height: 17px;
padding: 0 16px !important; padding: 0 16px !important;
} }
...@@ -235,6 +235,11 @@ html { ...@@ -235,6 +235,11 @@ html {
width: 100%; width: 100%;
} }
.marketing .img-36 {
width: 36px;
height: 36px;
}
.marketing .img-60 { .marketing .img-60 {
width: 60px; width: 60px;
height: 60px; height: 60px;
...@@ -299,10 +304,18 @@ html { ...@@ -299,10 +304,18 @@ html {
margin-right: 20px; margin-right: 20px;
} }
.marketing .m-l-10 {
margin-left: 10px;
}
.marketing .m-l-20 { .marketing .m-l-20 {
margin-left: 20px; margin-left: 20px;
} }
.marketing .p-20 {
padding: 20px;
}
.marketing.p-t-10, .marketing.p-t-10,
.marketing .p-t-10 { .marketing .p-t-10 {
padding-top: 10px; padding-top: 10px;
...@@ -565,10 +578,10 @@ html { ...@@ -565,10 +578,10 @@ html {
.marketing .line-20 { .marketing .line-20 {
line-height: 20px; line-height: 20px;
} }
.marketin .weight-5 { .marketing .weight-5 {
font-weight: 500; font-weight: 500;
} }
.marketin .weight-4 { .marketing .weight-4 {
font-weight: 400; font-weight: 400;
} }
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
...@@ -628,4 +641,13 @@ html { ...@@ -628,4 +641,13 @@ html {
.dot5 { .dot5 {
background-color: #fdb757; background-color: #fdb757;
} }
}
\ No newline at end of file \ No newline at end of file
}
.loadingClass {
.el-icon-loading {
font-size: 22px;
}
.el-icon-loading,
.el-loading-text {
color: #5850ff !important;
}
}
...@@ -31,6 +31,27 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max ...@@ -31,6 +31,27 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
} }
} }
function downloadIamge(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image()
// 解决跨域 Canvas 污染问题
image.setAttribute('crossOrigin', 'anonymous')
image.onload = function() {
var canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
var context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height)
var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
var a = document.createElement('a') // 生成一个a元素
var event = new MouseEvent('click') // 创建一个单击事件
a.download = name || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
}
function getExplorer() { function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase() var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null var browserType = null
...@@ -103,7 +124,8 @@ const afterSaleStatusList = [ ...@@ -103,7 +124,8 @@ const afterSaleStatusList = [
const orderSourceList = [ const orderSourceList = [
{ confId: '1', confName: '商城订单' }, { confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' }, { confId: '2', confName: '直播订单' },
{ confId: '3', confName: '秒杀订单' } { confId: '3', confName: '秒杀订单' },
{ confId: '4', confName: '众筹订单' }
] ]
const deliveryTypeList = [ const deliveryTypeList = [
...@@ -204,4 +226,4 @@ const stateList = [ ...@@ -204,4 +226,4 @@ const stateList = [
} }
] ]
export { limitPrice, getExplorer, exportFn, aToExport, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList } export { limitPrice, getExplorer, exportFn, aToExport, downloadIamge, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList }
<template>
<div class="map-box" :style="{ height: mapHeight + 'px' }">
<div id="container" style="width: 100%; height: 100%"></div>
<div class="map-address">{{ address }}</div>
<div id="myPageTop" style="position: absolute; top: 10px; width: 50%; left: 25%">
<el-input placeholder="请输入关键字" v-model="input" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="searchAddress"></el-button>
</el-input>
</div>
</div>
</template>
<script>
let map, marker, placeSearch
export default {
name: 'map',
props: {
mapHeight: {
type: Number,
default: 300
}
},
data() {
return {
input: '',
address: '',
lnglat: [],
geocoderAddress: {}
}
},
methods: {
mapInit() {
map = new AMap.Map('container', {
resizeEnable: true,
zoom: 20
})
AMap.plugin(['AMap.PlaceSearch'], function () {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
pageIndex: 1, // 页码
citylimit: false, //是否强制限制在设置的城市内搜索
// panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
renderStyle: 'default'
})
})
// 添加列表点选监听事件
map.on('click', this.getAddress)
},
searchAddress() {
let _this = this
placeSearch.search(this.input, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location
_this.getAddress(lnglat)
}
})
},
addMarker(lnglat) {
let position
if (lnglat.lng) {
position = [lnglat.lng, lnglat.lat]
} else {
position = lnglat
}
marker = new AMap.Marker({
icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34)
}),
position: position,
offset: new AMap.Pixel(-10, -10)
})
map.add(marker)
map.setFitView()
},
getAddress(e) {
let self = this
let lnglat
if (e.type == 'click') {
lnglat = e.lnglat
} else {
let { lng, lat } = e
lnglat = [lng, lat]
}
if (marker) {
marker.setMap(null)
marker = null
}
self.addMarker(lnglat)
AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder()
geocoder.getAddress(lnglat, (status, result) => {
self.lnglat = lnglat
self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
this.geocoderAddress = result.geocodes[0]
}
})
})
})
},
selectAddress(e) {
//这里获得点选地点的经纬度
this.getAddress()
}
},
mounted() {
this.mapInit()
}
}
</script>
<style scoped lang="scss">
.map-box {
position: relative;
width: 100%;
}
#container {
position: absolute;
height: 100%;
}
#panel {
position: absolute;
max-height: 90%;
overflow-y: auto;
top: 80px;
right: 10px;
width: 280px;
}
.map-address {
position: absolute;
line-height: 20px;
bottom: -30px;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div v-if="provinceView">
<el-form ref="provinceForm" :model="provinceForm" inline="true" class="province">
<el-select size="small" v-model="provinceForm.provinceName" clearable :disabled="isDisabled" placeholder="选择省份" :style="{ width: defaultWidth }" @change="selectProvince" class="select-padding">
<el-option v-for="item in AllData" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option>
</el-select>
<el-select size="small" v-model="provinceForm.cityName" clearable :disabled="isDisabled" placeholder="选择市" :style="{ width: defaultWidth }" @change="selectCity" class="select-padding">
<el-option v-for="item in cityList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option>
</el-select>
<el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable :disabled="isDisabled" placeholder="选择区" :style="{ width: defaultWidth }" @change="selectTown" class="select-padding">
<el-option v-for="item in townList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option>
</el-select>
</el-form>
</div>
</template>
<script>
export default {
name: 'GLProvince',
props: {
// 省市级别,2--只显示省市,3--显示省市区,默认只显示省市
subdistrict: {
type: Number,
default: 2
},
// 省市下拉组件宽度
defaultWidth: {
type: String,
default: '150px'
},
// 组件是否展示,默认展示
provinceView: {
type: Boolean,
default: true
},
isDisabled: {
type: Boolean,
default: false
}
},
data() {
return {
// 所有数据
AllData: [],
// 城市列表
cityList: [],
// 地区列表
townList: [],
provinceForm: {
// 省份名称
provinceName: '',
// 城市名称
cityName: '',
// 地区名称
townName: '',
// 省份代码
provinceCode: '',
// 城市代码
cityCode: '',
// 地区代码
townCode: ''
}
}
},
mounted() {
this.provinceList()
},
methods: {
/*
* @params:传入的为一个key-value的对象
1、keywords --查询关键字,只支持单个关键词语搜索关键词支持:行政区名称、citycode、adcode
列如:this.provinceList({keywords: '山东省'}),这样就可以筛选出山东省下的市、区信息
2、subdistrict --设置显示下级行政区级数,0:不返回下级行政区;1:返回下一级行政区;2:返回下两级行政区;3:返回下三级行政区;
不传的话默认为2,可以在组件中穿,也可以在调用方法的时候传,如果需要展示省市组件,传值最小为2
3、page --最外层的districts最多会返回20个数据,若超过限制,请用page请求下一页数据。
例如page=2;page=3。默认page=1
4、extensions --控制行政区信息中返回行政区边界坐标点; 可选值:base、all;
base:不返回行政区边界坐标点;(默认)
all:只返回当前查询district的边界值,不返回子节点的边界值;目前不能返回乡镇/街道级别的边界值
5、filter -- 按照指定行政区划进行过滤,填入后则只返回该省/直辖市信息,需填入adcode,为了保证数据的正确,强烈建议填入此参数
6、callback -- callback值是用户定义的函数名称,此参数只在output=JSON时有效
7、output --返回数据格式类型,可选值:JSON,XML(默认JSON)
* @return:返回的是一个promise对象,如果不需要展示组件,只需要获取值,可以直接调用方法,异步获取返回值
列如:
const p = this.$refs.provinceForm.provinceList({xxxx(可传值,传值可参考上文params描述) })
p.then(r => {
// r 为返回结果
console.log(r)
})
**/
// 获取省市信息
provinceList(params = {}) {
params ? (params.subdistrict ? '' : (params.subdistrict = this.subdistrict)) : (params.subdistrict = this.subdistrict)
let data = ''
for (let key in params) {
data += '&' + key + '=' + params[key]
}
let path = `https://restapi.amap.com/v3/config/district?key=d22348363c34c266f772ae9b635eef2a`
path = path + data
const pro = fetch(path).then(res => {
return res.json()
})
if (this.provinceView) {
pro.then(r => {
this.AllData = r.districts[0].districts
})
}
return pro
},
// 省市回显
init(province, city, town) {
this.provinceForm = {
provinceName: province,
cityName: city,
townName: town
}
if (province) {
this.AllData.map(item => {
if (item.name.indexOf(province) != -1) {
this.provinceForm.provinceName = item.name
this.cityList = item.districts
this.provinceForm.provinceCode = item.adcode
if (city) {
this.cityList.map(itm => {
if (itm.name.indexOf(city) != -1) {
this.provinceForm.cityCode = itm.adcode
this.provinceForm.cityName = itm.name
this.townList = itm.districts
if (town) {
this.townList.map(itmx => {
if (itmx.name.indexOf(town) != -1) {
this.provinceForm.townCode = itmx.adcode
this.provinceForm.townName = itmx.name
}
})
}
}
})
}
}
})
}
},
// 选择省
selectProvince(val) {
this.provinceForm.cityName = ''
this.provinceForm.townName = ''
this.cityList = val.districts
this.$emit('selectProvince', { provinceName: val.name, provinceCode: val.adcode })
},
// 选择市
selectCity(val) {
this.provinceForm.townName = ''
this.townList = val.districts
this.$emit('selectCity', { cityName: val.name, cityCode: val.adcode })
},
// 选择区
selectTown(val) {
this.$emit('selectTown', { townName: val.name, townCode: val.adcode })
}
}
}
</script>
<style scoped lang="scss">
.province {
display: inline-flex;
}
.select-padding {
margin-right: 10px;
}
</style>
...@@ -14,6 +14,14 @@ import './public-path' ...@@ -14,6 +14,14 @@ import './public-path'
import '@/components' import '@/components'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup' import { start } from '@/setup'
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
// 初始化vue-amap
VueAMap.initAMapApiLoader({
key: 'bd290dc27d0945959280753215ddda71', // 这里写你申请的高德地图的key
plugin: ['AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.Geolocation'],
v: '1.4.15'
})
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
......
...@@ -320,6 +320,36 @@ const staticRoutes = Object.freeze([ ...@@ -320,6 +320,36 @@ const staticRoutes = Object.freeze([
path: '/newCarManage/editCar', path: '/newCarManage/editCar',
component: resolve => require([`@/views/newCarManage/editCar.vue`], resolve), component: resolve => require([`@/views/newCarManage/editCar.vue`], resolve),
meta: {} meta: {}
},
{
name: 'seckillActivity',
path: '/seckillActivity/index',
component: resolve => require([`@/views/seckillActivity/index.vue`], resolve),
meta: {}
},
{
name: 'editActivity',
path: '/seckillActivity/editActivity',
component: resolve => require([`@/views/seckillActivity/editActivity.vue`], resolve),
meta: {}
},
{
name: 'crowdFundList',
path: '/seckillActivity/crowdFundList',
component: resolve => require([`@/views/seckillActivity/crowdFundList.vue`], resolve),
meta: {}
},
{
name: 'editCrowdFund',
path: '/seckillActivity/editCrowdFund',
component: resolve => require([`@/views/seckillActivity/editCrowdFund.vue`], resolve),
meta: {}
},
{
name: 'browseList',
path: '/seckillActivity/browseList',
component: resolve => require([`@/views/seckillActivity/browseList.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -38,6 +38,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -38,6 +38,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$tracker = common.tracker
// const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop' // const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } }) // Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } })
......
...@@ -462,6 +462,7 @@ export default { ...@@ -462,6 +462,7 @@ export default {
type: 'success', type: 'success',
message: '操作成功!' message: '操作成功!'
}) })
// this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params}))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -336,6 +336,7 @@ export default { ...@@ -336,6 +336,7 @@ export default {
message: '操作成功!' message: '操作成功!'
}) })
// this.$router.push('/customerTransform/index') // this.$router.push('/customerTransform/index')
// this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群群发',params}))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
this.createStyle() this.createStyle()
// 每次光标变化的时候,保存 range // 每次光标变化的时候,保存 range
document.addEventListener('selectionchange', this.selectHandler) document.addEventListener('selectionchange', this.selectHandler)
this.$refs.wTextareaContent.focus()
}, },
beforeDestroy() { beforeDestroy() {
// 卸载事件 // 卸载事件
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
type: 'text' type: 'text'
}, },
listeners: { listeners: {
click: row => { } click: row => {}
} }
}, },
{ {
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
{ {
label: '发送时间', label: '发送时间',
prop: 'sendTime', prop: 'sendTime',
width: 170, width: 200,
line: 2 line: 2
// formatter: cellValue => { // formatter: cellValue => {
// if (cellValue.sendTime) { // if (cellValue.sendTime) {
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
type: 'text' type: 'text'
}, },
listeners: { listeners: {
click: row => { } click: row => {}
} }
}, },
{ {
...@@ -263,7 +263,7 @@ export default { ...@@ -263,7 +263,7 @@ export default {
{ {
label: '发送时间', label: '发送时间',
prop: 'sendTime', prop: 'sendTime',
width: 150, width: 200,
line: 2 line: 2
// formatter: cellValue => { // formatter: cellValue => {
// if (cellValue.sendTime) { // if (cellValue.sendTime) {
......
<template>
<div>
<el-input @blur.stop="formatPhone" type="textarea" v-model="phone" :placeholder="placeholder"></el-input>
<span v-if="isTip" class="approval-tip" style="margin-left:0;">{{ tip }}</span>
<div>
<div :class="['tel-item', !item.valid ? 'valid-tel' : receiveType == 1 ? 'realTel' : 'realNum']" v-for="(item, index) in phoneList" :key="index">
{{ item.tel }}
<i style="cursor:pointer" class="el-icon-close" @click="delPhone(item.tel)"></i>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'phone-area',
model: {
prop: 'newList',
event: 'changePhoneList'
},
props: {
receiveType: {
type: String,
require: true,
default: ''
},
placeholder: {
type: String,
default: ''
},
isTip: {
type: String,
default: ''
}
},
data() {
return {
phone: '',
phoneList: []
}
},
methods: {
delPhone(val) {
let phone = '\n' + this.phone + '\n'
phone = phone.replace(/[\n]/g, '\n\n')
phone = phone.replace(new RegExp('[\n]' + val + '[\n]', 'g'), '\n')
phone = phone.replace(/[\n]+/g, '\n')
phone = phone.replace(/^[\n]+/, '')
this.phone = phone
this.formatPhone()
},
formatPhone() {
let phoneList = this.phone.split('\n')
phoneList = [...new Set(phoneList)]
// let phoneList = this.phone.split(/[\n|\s|,|,]/)
let reg
if (this.receiveType == 1) {
reg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
} else {
reg = /^[0-9a-zA-Z]{6}$/
}
let arr = []
phoneList.forEach(item => {
arr.push({
tel: item,
valid: reg.test(item)
})
})
this.phoneList = arr.filter(item => item.tel)
this.$emit('changePhoneList', this.phoneList)
}
}
}
</script>
<style scope lang="scss">
.tel-item {
height: 26px;
display: inline-block;
padding: 0 8px;
line-height: 26px;
background: #fafbfe;
border-radius: 4px;
border: 1px solid #e8e8ea;
color: #666666;
text-align: center;
margin-right: 4px;
box-sizing: border-box;
}
.valid-tel {
background: #fff1f0;
border: 1px solid #ffa39e;
color: #ff4d4f;
}
.realTel {
width: 130px;
}
.realNum {
width: 90px;
}
</style>
<!-- 编辑礼包 --> <!-- 编辑礼包 -->
<template> <template>
<div v-if="isLoaded" class="edit-gift marketing p-t-20 edit-box"> <div class="edit-gift marketing p-t-20 edit-box">
<div v-if="routeInfo.addOrEdit != 'add'" class="container approval-container"> <div v-if="routeInfo.addOrEdit != 'add'" class="container approval-container">
<p class="edit-title">审批信息</p> <p class="edit-title">审批信息</p>
<div class="approval-info"> <div class="approval-info">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="415px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form v-loading="loading" class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="415px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div> <div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div>
<el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button> <el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button>
<div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': labelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0"> <div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': labelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0">
...@@ -113,6 +113,7 @@ export default { ...@@ -113,6 +113,7 @@ export default {
return { return {
phone: '', phone: '',
isLoaded: true, isLoaded: true,
loading:false,
phoneList: [], phoneList: [],
size: 'small', size: 'small',
title: '新增礼包', title: '新增礼包',
...@@ -412,7 +413,10 @@ export default { ...@@ -412,7 +413,10 @@ export default {
this.editForm.stock = e.replace(/^(0+)|[^\d]+/g, '') this.editForm.stock = e.replace(/^(0+)|[^\d]+/g, '')
}, },
delPhone(val) { delPhone(val) {
let phone = this.phone.replace(new RegExp('[\n]*' + val + '[\n]*', 'g'), '\n') let phone = '\n' + this.phone + '\n'
phone = phone.replace(/[\n]/g, '\n\n')
phone = phone.replace(new RegExp('[\n]'+ val + '[\n]', 'g'), '\n')
phone = phone.replace(/[\n]+/g, '\n')
phone = phone.replace(/^[\n]+/, '') phone = phone.replace(/^[\n]+/, '')
this.phone = phone this.phone = phone
this.formatPhone() this.formatPhone()
...@@ -438,6 +442,7 @@ export default { ...@@ -438,6 +442,7 @@ export default {
}, },
getInfo() { getInfo() {
this.isLoaded = false this.isLoaded = false
this.loading = true
this.$apis.giftBag this.$apis.giftBag
.getGiftInfoApi({ id: this.routeInfo.id }) .getGiftInfoApi({ id: this.routeInfo.id })
.then(res => { .then(res => {
...@@ -604,6 +609,10 @@ export default { ...@@ -604,6 +609,10 @@ export default {
}) })
if (this.editForm.receiveRule == 1) { if (this.editForm.receiveRule == 1) {
params.receiveDetailList = this.phoneList.map(item => item.tel) params.receiveDetailList = this.phoneList.map(item => item.tel)
let maxLength = 500
if(params.receiveDetailList && params.receiveDetailList.length > maxLength){
return this.$message.error(`领取${this.receiveWay == 1 ? '手机号' : '车架号'}不能超过${maxLength}个`)
}
params.receiveWay = this.receiveWay params.receiveWay = this.receiveWay
} }
delete params.staffList delete params.staffList
...@@ -641,10 +650,18 @@ export default { ...@@ -641,10 +650,18 @@ export default {
}, },
// 创建-更新接口 // 创建-更新接口
insertHttp(params) { insertHttp(params) {
this.loading = true // this.loading = true
const loadingMoadl = this.$loading({
lock: true,
text: '正在Loading···',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass:'loadingClass'
})
this.$apis.giftBag this.$apis.giftBag
.insertGiftApi(params) .insertGiftApi(params)
.then(res => { .then(res => {
loadingMoadl.close()
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span v-if="editForm.receiveRule == 2 && editForm.receiveWay">{{ `${editForm.receiveWay == '1' ? '手机号:' : '车架号后6位:'}${editForm.receiveDetails}` }}</span> <span v-if="editForm.receiveRule == 2 && editForm.receiveWay">{{ `${editForm.receiveWay == '1' ? '手机号:' : '车架号后6位:'}${editForm.receiveDetails}` }}</span>
<span v-if="editForm.receiveRule == 1">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:</span> <span v-if="editForm.receiveRule == 1">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:</span>
<div v-if="editForm.receiveRule == 1" class="phone-wrap"> <div v-if="editForm.receiveRule == 1" class="phone-wrap">
<span class="phone" v-for="(item, id) in receiveDetailList" :key="id">{{ item }}</span> <span :class="['phone', editForm.receiveWay == 1 ? 'realTel' : 'realNum']" v-for="(item, id) in receiveDetailList" :key="id">{{ item }}</span>
</div> </div>
</div> </div>
<div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0"> <div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
...@@ -261,7 +261,8 @@ export default { ...@@ -261,7 +261,8 @@ export default {
handleCancel() { handleCancel() {
this.$router.push({ this.$router.push({
path: '/giftBag/index' path: '/giftBag/index',
query: { type: this.routeInfo.type }
}) })
} }
} }
...@@ -343,6 +344,12 @@ export default { ...@@ -343,6 +344,12 @@ export default {
display: inline-block; display: inline-block;
margin: 5px 16px 5px 0; margin: 5px 16px 5px 0;
} }
.realTel {
width: 120px;
}
.realNum {
width: 80px;
}
} }
// 发放员工 // 发放员工
.sale-select { .sale-select {
......
...@@ -40,17 +40,38 @@ ...@@ -40,17 +40,38 @@
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<glsx-dialog class="qr-dialog" width="720px" title="生成二维码" btnOkLabel="下载" :isVisible.sync="isQrcodeVisible" @confirmDialog="handleCancelConfirm" @closeDialog="handleCancelClose">
<div class="qrcode-body">
<p>可生成对应发放员工的小程序领取二维码</p>
<el-select filterable v-model="curStaffId" @change="changeStaff" placeholder="请选择发放员工">
<el-option v-for="item in curStaffList" :key="item.staffUUID" :label="item.staffName" :value="item.staffUUID"></el-option>
</el-select>
<div class="img" v-loading="imgLoading">
<el-image :src="curQrcode" alt=""></el-image>
</div>
</div>
</glsx-dialog>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant' import { aToExport, downloadIamge } from '@/common/constant'
import glsxDialog from '@/components/glsx-dialog'
export default { export default {
name: 'giftList', name: 'giftList',
components: {
glsxDialog
},
data() { data() {
return { return {
isQrcodeVisible: false,
curId: '',
curStaffId: '',
imgLoading: false,
curStaffList: [],
curQrcode: '',
attrToIcon: { attrToIcon: {
2: 'discount', 2: 'discount',
3: 'cash', 3: 'cash',
...@@ -83,6 +104,22 @@ export default { ...@@ -83,6 +104,22 @@ export default {
listeners: { listeners: {
click: row => this.handleDelete(row.scope) click: row => this.handleDelete(row.scope)
} }
},
{
type: 'GLButton',
name: row => {
return '生成二维码'
},
condition: row => {
return row.scope.approveStatus == 2
},
attrs: {
type: 'text',
fn: '生成二维码'
},
listeners: {
click: row => this.makeQrcode(row.scope)
}
} }
], ],
size: 'small', size: 'small',
...@@ -133,8 +170,8 @@ export default { ...@@ -133,8 +170,8 @@ export default {
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: { tableOption: {
width:120, width: 200,
align:'center' align: 'center'
}, },
tableColumns: [ tableColumns: [
{ {
...@@ -172,7 +209,8 @@ export default { ...@@ -172,7 +209,8 @@ export default {
{ {
label: '发放员工', label: '发放员工',
prop: 'staffList', prop: 'staffList',
width: 150, width: 200,
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',') return cellValue.staffList.map(item => item.staffName).join(',')
} }
...@@ -260,6 +298,65 @@ export default { ...@@ -260,6 +298,65 @@ export default {
}, },
methods: { methods: {
getQrcode(staffId) {
// 正式版为:release,体验版为: trial 开发版为:develop
let merchantId = this.$globalState.session.merchantId
const appId = this.getAppId()
const params = {
appId,
path: 'packageEquity/pages/directional/directional',
envVersion: this.getEnvVersion(),
scene: `id=${this.curId}&merchantId=${merchantId}&staffUUID=${staffId}`
}
this.imgLoading = true
this.$apis.giftBag.getQrcode(params).then(res => {
if (res) {
this.curQrcode = res
} else {
this.curQrcode = ''
}
this.imgLoading = false
})
},
getEnvVersion() {
const host = window.location.host
if (host.indexOf('beta') > -1 || host.indexOf('test') > -1) {
return 'trial'
} else {
return 'release'
}
},
getAppId() {
const host = window.location.host
if (host.indexOf('beta') > -1) {
return 'wx9f91c1ec493eb425'
} else if (host.indexOf('cgacar') > -1) {
return 'wxfe82b8d65d07808f'
} else {
return 'wxe10067a63c1856ac'
}
},
changeStaff(e) {
this.getQrcode(e)
},
makeQrcode(row) {
this.curId = row.id
this.curStaffList = row.staffList
this.curStaffId = row.staffList[0].staffUUID
this.isQrcodeVisible = true
this.getQrcode(this.curStaffId)
},
handleCancelConfirm() {
downloadIamge(this.curQrcode)
this.handleCancelClose()
},
handleCancelClose() {
this.curId = ''
this.curStaffId = ''
this.curQrcode = ''
this.curStaffList = []
this.isQrcodeVisible = false
},
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) { if (this.searchForm.createDate.length) {
...@@ -398,10 +495,11 @@ export default { ...@@ -398,10 +495,11 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.p-b-12 { .p-b-12 {
margin-bottom: 14px; margin-bottom: 14px;
font-weight: 500; font-weight: 500;
padding-left: 10px;
color: #333333; color: #333333;
} }
.approve-status { .approve-status {
...@@ -411,27 +509,71 @@ export default { ...@@ -411,27 +509,71 @@ export default {
margin-right: 8px; margin-right: 8px;
display: inline-block; display: inline-block;
} }
.gift-detail .gift-item {
margin-right: 80px; .qr-dialog {
display: flex; /deep/.el-dialog__body {
align-items: center; padding: 20px;
color: #333333; .el-scrollbar__wrap {
img { overflow: hidden;
height: 23px; }
width: 58px; .qrcode-body {
margin-right: 23px; display: flex;
} flex-direction: column;
.gift-coupon-name { align-items: center;
display: inline-block; p {
line-height: 28px;
margin-bottom: 16px;
}
.el-select {
.el-input__inner {
width: 360px;
height: 36px;
}
.el-input__icon {
line-height: 36px;
}
}
.img {
margin-top: 16px;
background: #eee;
display: flex;
align-items: center;
justify-content: center;
&,
img {
width: 160px;
height: 160px;
}
}
}
} }
.gift-tips { }
display: inline-block;
font-size: 12px; .gift-detail {
height: 18px; padding:0 200px 0 10px;
line-height: 18px; .gift-item {
color: #999999; margin-right: 80px;
background-color: #eeeded; display: flex;
margin-right: 7px; align-items: center;
color: #333333;
width: 400px;
img {
height: 23px;
width: 58px;
margin-right: 10px;
}
.gift-coupon-name {
display: inline-block;
}
.gift-tips {
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
color: #999999;
background-color: #eeeded;
margin-right: 7px;
}
} }
} }
.gift-detail .gift-item:last-child { .gift-detail .gift-item:last-child {
......
...@@ -28,13 +28,16 @@ export default { ...@@ -28,13 +28,16 @@ export default {
receivedGiftList receivedGiftList
}, },
created() { created() {
this.activeName = sessionStorage.getItem('GIFTNAME') ? sessionStorage.getItem('GIFTNAME') : 'giftList' // this.activeName = sessionStorage.getItem('GIFTNAME') ? sessionStorage.getItem('GIFTNAME') : 'giftList'
if (this.$route.query.type == 'received') {
this.activeName = 'receivedGiftList'
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
handleTabClick() { handleTabClick() {
sessionStorage.setItem('GIFTNAME', this.activeName) this.$router.push({ path: this.$route.path, query: { type: this.activeName == 'receivedGiftList' ? 'received' : 'gift' } })
} }
} }
} }
......
...@@ -22,14 +22,18 @@ ...@@ -22,14 +22,18 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="directionalGiftName" slot-scope="scope"> <span slot="directionalGiftName" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">{{ scope.scope.directionalGiftName }}</el-button> <el-tooltip effect="dark" :content="scope.scope.directionalGiftName" placement="top-start">
<p class="gift-name" @click="handleDetail(scope.scope)">
{{ scope.scope.directionalGiftName }}
</p>
</el-tooltip>
<span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span> <span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span>
<el-tooltip class="item" effect="dark" :content="scope.scope.cancelReason" placement="top-start"> <el-tooltip effect="dark" :content="scope.scope.cancelReason" placement="top-start">
<p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p> <p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p>
</el-tooltip> </el-tooltip>
</span> </span>
<div slot="giftInfo" slot-scope="scope"> <div slot="giftInfo" slot-scope="scope">
<GLTable ref="giftListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="giftParams" :tableData="scope.scope | filterTable" @setTableFinishFun="setGiftTableFinishFun"></GLTable> <GLTable class="secondTable" ref="giftListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="giftParams" :tableData="scope.scope | filterTable" @setTableFinishFun="setGiftTableFinishFun"></GLTable>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button :disabled="scope.scope.receiveStatus == 2" type="text" @click="handleCancel(scope.scope)">作废</el-button> <el-button :disabled="scope.scope.receiveStatus == 2" type="text" @click="handleCancel(scope.scope)">作废</el-button>
...@@ -196,12 +200,13 @@ export default { ...@@ -196,12 +200,13 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '礼包明细', label: '礼包明细',
prop: 'couponName' prop: 'couponName',
width: 200
}, },
{ {
label: '数量', label: '数量',
name: 'couponAmount', name: 'couponAmount',
width: '100px', width: 150,
formatter: cellValue => { formatter: cellValue => {
return 'X' + cellValue.couponAmount return 'X' + cellValue.couponAmount
} }
...@@ -209,6 +214,7 @@ export default { ...@@ -209,6 +214,7 @@ export default {
{ {
label: '已核销/次', label: '已核销/次',
prop: 'anticipatedCost ', prop: 'anticipatedCost ',
width: 150,
formatter: cellValue => { formatter: cellValue => {
return 'X' + cellValue.delet return 'X' + cellValue.delet
} }
...@@ -216,6 +222,7 @@ export default { ...@@ -216,6 +222,7 @@ export default {
{ {
label: '可使用/次', label: '可使用/次',
prop: 'getAmount', prop: 'getAmount',
width: 150,
formatter: cellValue => { formatter: cellValue => {
if (cellValue.residueCouponAmount == -1) { if (cellValue.residueCouponAmount == -1) {
return '不限次数' return '不限次数'
...@@ -369,7 +376,8 @@ export default { ...@@ -369,7 +376,8 @@ export default {
this.$router.push({ this.$router.push({
path: '/giftBag/giftDetail', path: '/giftBag/giftDetail',
query: { query: {
id: row.directionalGiftId id: row.directionalGiftId,
type: 'received'
} }
}) })
}, },
...@@ -513,6 +521,18 @@ export default { ...@@ -513,6 +521,18 @@ export default {
.marketing /deep/ .el-table th div { .marketing /deep/ .el-table th div {
line-height: normal !important; line-height: normal !important;
} }
.secondTable {
padding-left: 10px;
}
.gift-name {
color: #5850ff;
margin: 0;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.void-label { .void-label {
width: 44px; width: 44px;
height: 18px; height: 18px;
...@@ -523,7 +543,7 @@ export default { ...@@ -523,7 +543,7 @@ export default {
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
background: #eeeded; background: #eeeded;
margin-left: 4px; margin-top: 2px;
} }
.void-reason { .void-reason {
font-size: 10px; font-size: 10px;
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
// 表格组件 // 表格组件
userInfo: {}, userInfo: {},
staffList: [], staffList: [],
selectList:[],
fnCallBack: false, fnCallBack: false,
url: url, url: url,
loading: true, loading: true,
...@@ -72,6 +73,8 @@ export default { ...@@ -72,6 +73,8 @@ export default {
mounted() { mounted() {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
this.selectList = JSON.parse(JSON.stringify(this.selectedStaffList))
this.selectList.map(item => item.userOneId = item.staffUUID)
this.getList({}, true) this.getList({}, true)
}, },
...@@ -93,21 +96,34 @@ export default { ...@@ -93,21 +96,34 @@ export default {
this.loading = false this.loading = false
this.fnCallBack = true this.fnCallBack = true
this.$refs.mutiProRef.tableTotal = res.count this.$refs.mutiProRef.tableTotal = res.count
this.recoverySelected() this.$nextTick(()=>{
this.recoverySelected()
})
this.$refs.mutiProRef.tableHeightValues = '50vh' this.$refs.mutiProRef.tableHeightValues = '50vh'
}) })
}, },
recoverySelected() { recoverySelected() {
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
if (this.selectedStaffList && this.selectedStaffList.length) { if (this.selectedStaffList && this.selectedStaffList.length) {
this.selectedStaffList.forEach(row => { this.selectedStaffList.forEach(row => {
row.userOneId = row.staffUUID row.userOneId = row.staffUUID
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row) this.$nextTick(()=>{
let idx = this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item=>item.userOneId==row.staffUUID)
if(idx>-1){
try{
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx],true)
let id = this.selectList.findIndex(item=>item.staffUUID==row.staffUUID)
if(id>-1) this.selectList.splice(id, 1)
}catch(err){
console.log(err)
}
}
})
}) })
} }
}, },
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName] var selectedData = [...this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName],...this.selectList]
this.$emit('handleMutiSelectConfirm', selectedData) this.$emit('handleMutiSelectConfirm', selectedData)
}, },
handleMutiSelectClose() { handleMutiSelectClose() {
......
...@@ -33,8 +33,11 @@ export default { ...@@ -33,8 +33,11 @@ export default {
this.content = html // 绑定当前逐渐地值 this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中 this.$emit('change', this.content) // 将内容同步到父组件中
} }
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片 // 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) { this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
...@@ -60,7 +63,7 @@ export default { ...@@ -60,7 +63,7 @@ export default {
} }
} }
// 上传视频 // 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) { this.editor.config.customUploadVideo = function (resultFiles, insertVideoFn) {
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)"> <div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }} {{ item }}
</div> </div>
<el-button :size="size" class="default-blue-btn m-l-20" type="default" @click="handleExport">导出</el-button>
</div> </div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="orderType" slot-scope="scope" style="width: 200px"> <div slot="orderType" slot-scope="scope" style="width: 200px">
...@@ -67,6 +68,14 @@ ...@@ -67,6 +68,14 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<glsx-dialog class="refund-fill-boxss" :width="'576px'" title="提示" :show-close="true" :isVisible="isShow" @confirmDialog="isShow = false" @closeDialog="isShow = false" :noCancel="true">
<div class="dialog-refund">
<img class="img" src="../../images/warn.png" />
<div>该会员在升级黑卡会员期间,已购买过生活权益</div>
<div style="color: #FF4D4F;padding: 6px 0;">(时间:{{orderDate}} 金额:{{orderPrice}}元)</div>
<div>暂不支持退款</div>
</div>
</glsx-dialog>
<glsx-dialog class="refund-fill-box" :width="'720px'" title="退款确认" :isVisible="refundVisible" @confirmDialog="refundConfirmDialog" @closeDialog="refundVisible = false" :isShowCloseBtn="true"> <glsx-dialog class="refund-fill-box" :width="'720px'" title="退款确认" :isVisible="refundVisible" @confirmDialog="refundConfirmDialog" @closeDialog="refundVisible = false" :isShowCloseBtn="true">
<div class="dialog-form"> <div class="dialog-form">
<label>说明:</label> <label>说明:</label>
...@@ -79,10 +88,13 @@ ...@@ -79,10 +88,13 @@
<script> <script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant' import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { getOrderListApi, orderExportApi, orderRefund } from '@/api/modules/order' import { getOrderListApi, orderExportApi, orderRefund, ordeRefundApi } from '@/api/modules/order'
export default { export default {
data() { data() {
return { return {
isShow: false,
orderPrice: '',
orderDate: '',
orderCode: '', orderCode: '',
refund: '', refund: '',
refundVisible: false, refundVisible: false,
...@@ -139,7 +151,13 @@ export default { ...@@ -139,7 +151,13 @@ export default {
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
} },
{
label: '推荐人',
name: 'shareStaffName',
type: 'input',
maxlength: 100
},
], ],
choseList: ['全部', '待收货', '已完成', '退款|售后'], choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1, currentIndex: 1,
...@@ -168,7 +186,11 @@ export default { ...@@ -168,7 +186,11 @@ export default {
fn: '退款' fn: '退款'
}, },
condition: row => { condition: row => {
return row.refundFlag == 1 if (row.packageType == 2) {
return row.refundFlag == 1 && row.show
} else {
return row.refundFlag == 1
}
}, },
listeners: { listeners: {
click: this.handleRefund click: this.handleRefund
...@@ -198,7 +220,8 @@ export default { ...@@ -198,7 +220,8 @@ export default {
}, },
{ {
label: '价格/元', label: '价格/元',
prop: 'originalPrice' prop: 'originalPrice',
width: '100'
}, },
{ {
label: '实收金额/元', label: '实收金额/元',
...@@ -208,7 +231,7 @@ export default { ...@@ -208,7 +231,7 @@ export default {
{ {
label: '订单状态', label: '订单状态',
prop: 'orderStatus', prop: 'orderStatus',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
} }
...@@ -267,10 +290,10 @@ export default { ...@@ -267,10 +290,10 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
if (this.$isGroupUp) { // if (this.$isGroupUp) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人') // let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
this.tableParams.tableColumns.splice(idx, 1) // this.tableParams.tableColumns.splice(idx, 1)
} // }
}, },
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
...@@ -349,10 +372,26 @@ export default { ...@@ -349,10 +372,26 @@ export default {
resolve() resolve()
}) })
}, },
ordeRefund(orderCode) {
ordeRefundApi({ orderCode }).then(res => {
if (res != null) {
this.orderDate = res.orderDate
this.orderPrice = res.orderPrice
this.isShow = true
} else {
this.refundVisible = true
}
})
},
handleRefund(data) { handleRefund(data) {
this.orderCode = data.orderCode this.orderCode = data.orderCode
this.refund = '' this.refund = ''
this.refundVisible = !this.refundVisible // this.refundVisible = !this.refundVisible
if (data.packageType == 2) {
this.ordeRefund(data.orderCode)
} else {
this.refundVisible = true
}
}, },
refundConfirmDialog() { refundConfirmDialog() {
if (this.refund == '') { if (this.refund == '') {
...@@ -400,6 +439,19 @@ export default { ...@@ -400,6 +439,19 @@ export default {
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.memberOrderRef.data.length ? (this.$refs.memberOrderRef.tableHeightValues = '') : this.$refs.memberOrderRef.setTableHeightFun() this.$refs.memberOrderRef.data.length ? (this.$refs.memberOrderRef.tableHeightValues = '') : this.$refs.memberOrderRef.setTableHeightFun()
let arr = this.$refs.memberOrderRef.data
if (arr.length > 0) {
arr.map(e => {
if (e.refundFlag == 1 && e.packageType == 2) {
let time = new Date(`${e.createDate}`)
let timer = new Date()
if (timer.getTime() < time.getTime() + 604800000) {
e.show = true
}
}
return e
})
}
}, },
handleReset() { handleReset() {
this.isReload = false this.isReload = false
...@@ -435,8 +487,8 @@ export default { ...@@ -435,8 +487,8 @@ export default {
display: flex; display: flex;
height: auto; height: auto;
position: relative; position: relative;
width: 285px; width: 367px;
left: calc(100% - 285px); left: calc(100% - 367px);
.choseItem { .choseItem {
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
...@@ -473,4 +525,22 @@ export default { ...@@ -473,4 +525,22 @@ export default {
} }
} }
} }
.refund-fill-boxss {
height: 320px;
.dialog-refund {
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
padding-bottom: 19px;
img {
width: 32px;
height: 32px;
padding-bottom: 12px;
}
}
::v-deep .el-dialog__footer {
text-align: center;
}
}
</style> </style>
...@@ -135,7 +135,8 @@ export default { ...@@ -135,7 +135,8 @@ export default {
orderSource: '', orderSource: '',
deliveryType: '', deliveryType: '',
vin: '', vin: '',
shareStaffName: '' shareStaffName: '',
shareStaffType: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
statisticsInfo: { statisticsInfo: {
...@@ -273,6 +274,15 @@ export default { ...@@ -273,6 +274,15 @@ export default {
labelWidth: 56, labelWidth: 56,
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
},
{
label: '推荐人类型',
name: 'shareStaffType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'shareStaffTypeList'
} }
], ],
// 快递信息 // 快递信息
...@@ -375,10 +385,11 @@ export default { ...@@ -375,10 +385,11 @@ export default {
} }
}, },
{ {
type: 'el-button', type: 'GLButton',
name: '订单核销', name: '订单核销',
attrs: { attrs: {
type: 'text' type: 'text',
fn: '订单核销'
}, },
condition: row => { condition: row => {
return row.deliveryType == 1 && row.orderStatus == 21 return row.deliveryType == 1 && row.orderStatus == 21
...@@ -388,10 +399,12 @@ export default { ...@@ -388,10 +399,12 @@ export default {
} }
}, },
{ {
type: 'el-button', type: 'GLButton',
name: '输入快递信息', // name: '输入快递信息',
name: '商品发货',
attrs: { attrs: {
type: 'text' type: 'text',
fn: '商品发货'
}, },
condition: row => { condition: row => {
return row.deliveryType == 2 && row.orderStatus == 6 return row.deliveryType == 2 && row.orderStatus == 6
...@@ -401,10 +414,11 @@ export default { ...@@ -401,10 +414,11 @@ export default {
} }
}, },
{ {
type: 'el-button', type: 'GLButton',
name: '退款审核', name: '退款审核',
attrs: { attrs: {
type: 'text' type: 'text',
fn: '退款审核'
}, },
condition: row => { condition: row => {
return row.afterSaleStatus == 1 return row.afterSaleStatus == 1
...@@ -455,6 +469,22 @@ export default { ...@@ -455,6 +469,22 @@ export default {
} }
}, },
{ {
label: '支付时间',
prop: 'payDate',
width: '180',
formatter: cellValue => {
return cellValue.payDate ? dayjs(cellValue.payDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '核销时间',
prop: 'verificationDate',
width: '180',
formatter: cellValue => {
return cellValue.verificationDate ? dayjs(cellValue.verificationDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
line: 2, line: 2,
...@@ -464,6 +494,14 @@ export default { ...@@ -464,6 +494,14 @@ export default {
} }
}, },
{ {
label: '手机号',
prop: 'customerPhone',
width: 130,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '车架号', label: '车架号',
prop: 'vinNo', prop: 'vinNo',
width: 120, width: 120,
...@@ -484,8 +522,17 @@ export default { ...@@ -484,8 +522,17 @@ export default {
} }
}, },
{ {
label: '推荐人类型',
prop: 'shareStaffType',
width: '180',
formatter: cellValue => {
return this.baseData.shareStaffTypeList.map(item => item.confId).includes(cellValue.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == cellValue.shareStaffType).confName : '-'
}
},
{
label: '支付总价', label: '支付总价',
prop: 'payPrice', prop: 'payPrice',
width: '120',
formatter: cellValue => { formatter: cellValue => {
return cellValue.payPrice || '0' return cellValue.payPrice || '0'
} }
...@@ -534,6 +581,10 @@ export default { ...@@ -534,6 +581,10 @@ export default {
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, { confId: '1', confName: '退款退货' },
{ confId: '2', confName: '我要退款(无需退货)' } { confId: '2', confName: '我要退款(无需退货)' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
] ]
} }
} }
...@@ -829,7 +880,8 @@ export default { ...@@ -829,7 +880,8 @@ export default {
orderSource: '', orderSource: '',
deliveryType: '', deliveryType: '',
vin: '', vin: '',
shareStaffName: '' shareStaffName: '',
shareStaffType: ''
} }
this.handleSearch() this.handleSearch()
} }
......
...@@ -104,6 +104,10 @@ export default { ...@@ -104,6 +104,10 @@ export default {
name: 'shareStaffName' name: 'shareStaffName'
}, },
{ {
label: '推荐人类型',
name: ''
},
{
label: '车架号', label: '车架号',
name: 'vin' name: 'vin'
}, },
...@@ -135,6 +139,12 @@ export default { ...@@ -135,6 +139,12 @@ export default {
{ {
label: '发货地址', label: '发货地址',
name: 'shipAddress' name: 'shipAddress'
},
{
label: '其他信息',
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second', 'Third']
} }
], ],
// 售后信息 // 售后信息
...@@ -177,6 +187,10 @@ export default { ...@@ -177,6 +187,10 @@ export default {
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, { confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' } { confId: '2', confName: '退款不退货' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
] ]
} }
} }
...@@ -218,6 +232,9 @@ export default { ...@@ -218,6 +232,9 @@ export default {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-' this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss') this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
if (this.detailForm.shareStaffType) {
this.baseData.shareStaffTypeList.map(item => item.confId).includes(this.detailForm.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == this.detailForm.shareStaffType).confName : '-'
}
if (this.detailForm.subOrderCoupon) { if (this.detailForm.subOrderCoupon) {
this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2) this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2)
} }
...@@ -229,6 +246,16 @@ export default { ...@@ -229,6 +246,16 @@ export default {
var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee') var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee')
this.detailFormData.splice(takeFeeIdx, 1) this.detailFormData.splice(takeFeeIdx, 1)
} }
// 其他信息
var formDescribeObj = this.detailFormData.find(item => item.name == 'formDescribe')
this.detailForm[formDescribeObj.name] = ''
formDescribeObj.attrList.forEach(item => {
let label = this.detailForm[formDescribeObj.name + item]
let value = this.detailForm[formDescribeObj.contentName + item]
if (label) {
this.detailForm[formDescribeObj.name] += label + ':' + value + ' '
}
})
this.formToRow('detailFormData') this.formToRow('detailFormData')
}) })
}, },
......
...@@ -197,6 +197,9 @@ ...@@ -197,6 +197,9 @@
</div> </div>
</el-radio-group> </el-radio-group>
</template> </template>
<template slot="serviceDescHtml">
<el-input type="textarea" v-model="editForm.serviceDesc" style="width: 320px" placeholder="请输入商品描述" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="30" :disabled="isDisabled" />
</template>
<div slot="selectMerchant" slot-scope="scope" class="select-merchant"> <div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<div> <div>
<el-radio-group v-model="editForm.takeAllMerchant" :disabled="isDisabled"> <el-radio-group v-model="editForm.takeAllMerchant" :disabled="isDisabled">
...@@ -511,7 +514,8 @@ export default { ...@@ -511,7 +514,8 @@ export default {
expressFee: '', expressFee: '',
// 带货是否选择全部商户(0:否,1:是) // 带货是否选择全部商户(0:否,1:是)
takeAllMerchant: '1', takeAllMerchant: '1',
supplyMerchantList: [] supplyMerchantList: [],
serviceDesc: ''
}, },
isEdit: true, isEdit: true,
labelWidth: '144px', labelWidth: '144px',
...@@ -813,7 +817,12 @@ export default { ...@@ -813,7 +817,12 @@ export default {
width: '320px', width: '320px',
isHide: false, isHide: false,
isDisabled: false isDisabled: false
} },
{
label: '服务说明',
name: 'serviceDesc',
addHtml: 'serviceDescHtml'
},
] ]
}, },
{ {
...@@ -1345,7 +1354,8 @@ export default { ...@@ -1345,7 +1354,8 @@ export default {
relatedCouponId: '', relatedCouponId: '',
takeAllMerchant: res.takeAllMerchant || (res.supplyMerchantList.length ? '0' : '1'), takeAllMerchant: res.takeAllMerchant || (res.supplyMerchantList.length ? '0' : '1'),
descImgList: [], descImgList: [],
businessType: [] businessType: [],
serviceDesc: res.serviceDesc || ''
} }
this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType) this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType)
if (res.relatedCoupon) { if (res.relatedCoupon) {
...@@ -1565,6 +1575,8 @@ export default { ...@@ -1565,6 +1575,8 @@ export default {
deleteAttrList.forEach(item => { deleteAttrList.forEach(item => {
delete params[item] delete params[item]
}) })
// 服务说明
params.serviceDesc = this.editForm.serviceDesc
this.loading = true this.loading = true
this.$apis.proManage this.$apis.proManage
.insertOrUpdateProApi(params) .insertOrUpdateProApi(params)
......
...@@ -142,6 +142,20 @@ export default { ...@@ -142,6 +142,20 @@ export default {
} }
}, },
{ {
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return !row.goodsStatus
},
listeners: {
click: this.del
}
},
{
type: 'el-button', type: 'el-button',
name: '分享', name: '分享',
attrs: { attrs: {
...@@ -339,7 +353,10 @@ export default { ...@@ -339,7 +353,10 @@ export default {
handleTop(row) { handleTop(row) {
this.secondConfirm('置顶', '是否确认置顶该商品?', 'proManage', 'topProApi', { id: row.id }) this.secondConfirm('置顶', '是否确认置顶该商品?', 'proManage', 'topProApi', { id: row.id })
}, },
// 删除
del(row) {
this.secondConfirm('删除', '确定删除此活动?', 'proManage', 'deleteGoodsApi', { id: row.id })
},
handleShare(row) { handleShare(row) {
this.$apis.proManage.getProShareApi({ id: row.id }).then(res => { this.$apis.proManage.getProShareApi({ id: row.id }).then(res => {
this.shareForm = res this.shareForm = res
......
...@@ -214,6 +214,20 @@ export default { ...@@ -214,6 +214,20 @@ export default {
} }
}, },
{ {
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return !row.goodsStatus
},
listeners: {
click: this.del
}
},
{
type: 'el-button', type: 'el-button',
name: '分享', name: '分享',
attrs: { attrs: {
...@@ -421,6 +435,10 @@ export default { ...@@ -421,6 +435,10 @@ export default {
handleTakeGood(row) { handleTakeGood(row) {
this.secondConfirm('取消带货', '是否确认取消带货该商品?', 'proManage', 'deleteTakeProApi', { id: row.id }) this.secondConfirm('取消带货', '是否确认取消带货该商品?', 'proManage', 'deleteTakeProApi', { id: row.id })
}, },
// 删除
del(row) {
this.secondConfirm('删除', '确定删除此活动?', 'proManage', 'deleteGoodsApi', { id: row.id })
},
dwonVisibleChange() { dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate() this.$refs.downRef && this.$refs.downRef.clearValidate()
this.isDownVisible = !this.isDownVisible this.isDownVisible = !this.isDownVisible
......
<!-- 浏览明细 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">{{ routeInfo.activityName }}</p>
<div class="p-20">
<GLCombiForm ref="showSearch" class="p-t-20" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="browserRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="customerName" class="flex-align" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.customerAvatar" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.customerAvatar" />
</el-popover>
<span class="m-l-10">{{ scope.scope.customerName }}</span>
</div>
<div slot="shareName" class="flex-align" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.shareAvatar" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" />
</el-popover>
<span class="m-l-10">{{ scope.scope.shareName }}</span>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleJump">返回</el-button>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'browseList',
data() {
return {
size: 'small',
url: url,
footerLeft: '0',
footerWidth: '0',
routeInfo: {
id: '',
activityName: ''
},
searchForm: {
customerName: '',
mobile: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 搜索
searchFormData: [
{
label: '微信昵称',
name: 'customerName',
type: 'input',
maxlength: 50
},
{
label: '手机号',
name: 'mobile',
type: 'input',
maxlength: 11
}
],
// 表格
getListApi: this.$apis.seckillActivity.getBrowseListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '微信名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '手机号',
prop: 'mobile'
},
{
label: '来源',
prop: 'shareName',
addHtml: 'shareName'
},
{
label: '浏览次数',
prop: 'browseCount'
},
{
label: '浏览时间',
prop: 'lastBrowseDate',
width: '180'
}
]
}
}
},
created() {
this.routeInfo = this.$route.query
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.activityId = this.routeInfo.id
resolve()
})
},
handleExport() {
var params = this.$common.utils.deepClone(this.searchForm)
params.pageNum = 1
params.pageSize = 999999
this.$apis.seckillActivity.exportBrowseApi(params).then(res => {
exportFn(res)
})
},
handleJump(path, row = {}) {
this.$router.push({
path: '/seckillActivity/crowdFundList'
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun()
},
handleSearch() {
this.$refs.browserRef.refreshTable()
},
handleReset() {
this.searchForm = {
activityId: this.routeInfo.id,
customerName: '',
mobile: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<p class="edit-title">{{ title }}秒杀活动</p> <p class="edit-title">{{ title }}秒杀活动</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div> <div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<template slot="activityTimeHtml"> <template slot="activityTimeHtml" slot-scope="scope">
<el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" clearable></el-date-picker> <el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</template> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button> <el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
...@@ -176,13 +176,13 @@ export default { ...@@ -176,13 +176,13 @@ export default {
} }
], ],
goodsStock: [ goodsStock: [
{ required: true, message: '请设置活动库存', trigger: 'change' }, { required: true, message: '请设置活动库存', trigger: 'change' }
{ // {
validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
return value > this.selectedProInfo.goodsStock ? callback(new Error('活动库存不能大于商品库存')) : callback() // return value > this.selectedProInfo.goodsStock ? callback(new Error('活动库存不能大于商品库存')) : callback()
}, // },
trigger: 'change' // trigger: 'change'
} // }
], ],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }], goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }], limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
...@@ -342,6 +342,10 @@ export default { ...@@ -342,6 +342,10 @@ export default {
} }
}, },
handleTimeChange(value, targetItem) {
!value && (this.editForm[targetItem.name] = [])
},
handleIsLimit(val) { handleIsLimit(val) {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1' this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1 this.editRule.limitPurchaseNumber[0].required = val != 1
...@@ -499,7 +503,7 @@ export default { ...@@ -499,7 +503,7 @@ export default {
this.getGoodInfo(info.goodsId) this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) { if (info.activityPrice != null && info.goodsStock != null) {
form.activityPrice = (info.activityPrice / 100).toFixed(2) form.activityPrice = (info.activityPrice / 100).toFixed(2)
form.goodsStock = info.goodsStock form.goodsStock = info.goodsStock + ''
} }
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
......
<!-- 商品管理-门店 --> <!-- 秒杀活动 -->
<template> <template>
<div class="marketing pro-group p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton> <GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
</div> </div>
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="activityImg" slot-scope="scope"> <div slot="activityImg" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.activityImg" /> <img class="table-popover-img" :src="scope.scope.activityImg" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" /> <img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" />
</el-popover> </el-popover>
</template> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
......
...@@ -785,6 +785,7 @@ export default { ...@@ -785,6 +785,7 @@ export default {
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
// this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'编辑sop事件',params}))
if (res.code == '0') { if (res.code == '0') {
this.cancelJump() this.cancelJump()
} }
...@@ -797,6 +798,7 @@ export default { ...@@ -797,6 +798,7 @@ export default {
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
// this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'创建sop事件',params}))
if (res.code == '0') { if (res.code == '0') {
this.cancelJump() this.cancelJump()
} }
......
...@@ -34,7 +34,8 @@ module.exports = { ...@@ -34,7 +34,8 @@ module.exports = {
vuex: 'Vuex', vuex: 'Vuex',
axios: 'axios', axios: 'axios',
echarts: 'echarts', echarts: 'echarts',
moment: 'moment' moment: 'moment',
AMap: 'AMap'
} }
}, },
devServer: { devServer: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!