Commit 0b4a2914 by 前端

Merge branch 'develop' into 'master'

v2.6.0上线后,代码合并。

See merge request !254
2 parents a13672f7 73384b3c
Showing 69 changed files with 1653 additions and 201 deletions
......@@ -3,6 +3,9 @@
"env": {
"node": true
},
"globals": {
"AMap": true
},
"extends": ["plugin:vue/essential", "@vue/prettier"],
"rules": {
"no-console": "off",
......
This diff could not be displayed because it is too large.
......@@ -13,10 +13,11 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.4.3",
"glsx-components": "^1.4.2",
"lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-router": "^3.1.3",
"vuedraggable": "^2.24.3",
"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 getMerchantGoodsListApi = 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 => {
params.method = `${defaultPath}common.uploadVideo`
return http({
......@@ -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 => {
})
}
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 => {
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 => {
})
}
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 => {
})
}
//分页众筹活动
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 => {
params.method = `${defaultPath}add.or.update`
......@@ -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 {
}
.marketing .el-table .cell {
line-height: 16px;
line-height: 17px;
padding: 0 16px !important;
}
......@@ -235,6 +235,11 @@ html {
width: 100%;
}
.marketing .img-36 {
width: 36px;
height: 36px;
}
.marketing .img-60 {
width: 60px;
height: 60px;
......@@ -299,10 +304,18 @@ html {
margin-right: 20px;
}
.marketing .m-l-10 {
margin-left: 10px;
}
.marketing .m-l-20 {
margin-left: 20px;
}
.marketing .p-20 {
padding: 20px;
}
.marketing.p-t-10,
.marketing .p-t-10 {
padding-top: 10px;
......@@ -565,10 +578,10 @@ html {
.marketing .line-20 {
line-height: 20px;
}
.marketin .weight-5 {
.marketing .weight-5 {
font-weight: 500;
}
.marketin .weight-4 {
.marketing .weight-4 {
font-weight: 400;
}
.el-tooltip__popper.is-light {
......@@ -589,12 +602,52 @@ html {
z-index: 4000 !important;
}
.loadingClass{
.el-icon-loading{
.dot {
display: inline-flex;
align-items: center;
div {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.normal {
background-color: #2cca74;
}
.draft {
background-color: #fdb757;
}
.dot1 {
background-color: #fdb757;
}
.dot2 {
background-color: #2cca74;
}
.dot3 {
background-color: #999999;
}
.dot4 {
background-color: #eb4e4e;
}
.dot5 {
background-color: #fdb757;
}
}
.loadingClass {
.el-icon-loading {
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #5850ff!important;
.el-loading-text {
color: #5850ff !important;
}
}
\ No newline at end of file
}

358 Bytes | W: | H:

554 Bytes | W: | H:

src/assets/material/file.png
src/assets/material/file.png
src/assets/material/file.png
src/assets/material/file.png
  • 2-up
  • Swipe
  • Onion skin

790 Bytes | W: | H:

594 Bytes | W: | H:

src/assets/material/pdf.png
src/assets/material/pdf.png
src/assets/material/pdf.png
src/assets/material/pdf.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
......@@ -103,7 +124,8 @@ const afterSaleStatusList = [
const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '秒杀订单' }
{ confId: '3', confName: '秒杀订单' },
{ confId: '4', confName: '众筹订单' }
]
const deliveryTypeList = [
......@@ -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
<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'
import '@/components'
// import 'glsx-components/dist/glsx-components.css'
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.prototype.$apis = apis
Vue.prototype.size = 'small'
......
......@@ -320,6 +320,36 @@ const staticRoutes = Object.freeze([
path: '/newCarManage/editCar',
component: resolve => require([`@/views/newCarManage/editCar.vue`], resolve),
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
......@@ -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_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.$tracker = common.tracker
// 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.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } })
......
......@@ -462,6 +462,7 @@ export default {
type: 'success',
message: '操作成功!'
})
// this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params}))
} else {
this.$message({
type: 'error',
......
......@@ -336,6 +336,7 @@ export default {
message: '操作成功!'
})
// this.$router.push('/customerTransform/index')
// this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群群发',params}))
} else {
this.$message({
type: 'error',
......
......@@ -82,6 +82,7 @@ export default {
this.createStyle()
// 每次光标变化的时候,保存 range
document.addEventListener('selectionchange', this.selectHandler)
this.$refs.wTextareaContent.focus()
},
beforeDestroy() {
// 卸载事件
......
......@@ -98,7 +98,7 @@ export default {
type: 'text'
},
listeners: {
click: row => { }
click: row => {}
}
},
{
......@@ -156,7 +156,7 @@ export default {
{
label: '发送时间',
prop: 'sendTime',
width: 170,
width: 200,
line: 2
// formatter: cellValue => {
// if (cellValue.sendTime) {
......@@ -208,7 +208,7 @@ export default {
type: 'text'
},
listeners: {
click: row => { }
click: row => {}
}
},
{
......@@ -263,7 +263,7 @@ export default {
{
label: '发送时间',
prop: 'sendTime',
width: 150,
width: 200,
line: 2
// formatter: cellValue => {
// if (cellValue.sendTime) {
......
......@@ -68,7 +68,7 @@
<div class="tips-text">
<img src="@/assets/guestCustom/tips.png" class="tips-icon" alt />
<span>因企业微信限制,图片长宽建议不超过1440x1080,大小不超过10M,数量不超过9张。视频建议不超过1280x720,帧率30FPS,视频码率1.67 Mbps,最长不超过30S,最大不超过10MB</span>
<span>因企业微信限制,普通图片:总像素不超过1555200,大小不超过10M,数量不超过9张。视频建议不超过1280x720,帧率30FPS,视频码率1.67 Mbps,最长不超过30S,最大不超过10MB</span>
</div>
</div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
......@@ -201,10 +201,10 @@ export default {
var image = new Image()
image.src = e.target.result
image.onload = () => {
if (image.width > 1440 || image.height > 1080) {
this.$message.error('图片长宽不超过1440x1080')
return
}
// if (image.width > 1440 || image.height > 1080) {
// this.$message.error('图片长宽不超过1440x1080')
// return
// }
this.previewList = this.previewList.filter(item => {
return item.attType == ATT_TYPE.TEXT || item.attType == ATT_TYPE.IMAGE
})
......
<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>
......@@ -46,7 +46,7 @@
<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>
<div v-if="editForm.receiveRule == 1" class="phone-wrap">
<span :class="['phone',editForm.receiveWay==1?'realTel':'realNum']" 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 slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
......@@ -261,7 +261,8 @@ export default {
handleCancel() {
this.$router.push({
path: '/giftBag/index'
path: '/giftBag/index',
query: { type: this.routeInfo.type }
})
}
}
......@@ -343,10 +344,10 @@ export default {
display: inline-block;
margin: 5px 16px 5px 0;
}
.realTel{
.realTel {
width: 120px;
}
.realNum{
.realNum {
width: 80px;
}
}
......
......@@ -40,17 +40,38 @@
</GLTable>
<!-- 表格区域 end -->
</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>
</template>
<script>
import * as dayjs from 'dayjs'
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 {
name: 'giftList',
components: {
glsxDialog
},
data() {
return {
isQrcodeVisible: false,
curId: '',
curStaffId: '',
imgLoading: false,
curStaffList: [],
curQrcode: '',
attrToIcon: {
2: 'discount',
3: 'cash',
......@@ -83,6 +104,22 @@ export default {
listeners: {
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',
......@@ -133,8 +170,8 @@ export default {
tableParams: {
listName: 'list',
tableOption: {
width:120,
align:'center'
width: 200,
align: 'center'
},
tableColumns: [
{
......@@ -172,7 +209,8 @@ export default {
{
label: '发放员工',
prop: 'staffList',
width: 150,
width: 200,
line: 1,
formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',')
}
......@@ -260,6 +298,65 @@ export default {
},
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() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
......@@ -398,10 +495,11 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.p-b-12 {
margin-bottom: 14px;
font-weight: 500;
padding-left: 10px;
color: #333333;
}
.approve-status {
......@@ -411,27 +509,71 @@ export default {
margin-right: 8px;
display: inline-block;
}
.gift-detail .gift-item {
margin-right: 80px;
display: flex;
align-items: center;
color: #333333;
img {
height: 23px;
width: 58px;
margin-right: 23px;
}
.gift-coupon-name {
display: inline-block;
.qr-dialog {
/deep/.el-dialog__body {
padding: 20px;
.el-scrollbar__wrap {
overflow: hidden;
}
.qrcode-body {
display: flex;
flex-direction: column;
align-items: center;
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;
height: 18px;
line-height: 18px;
color: #999999;
background-color: #eeeded;
margin-right: 7px;
}
.gift-detail {
padding:0 200px 0 10px;
.gift-item {
margin-right: 80px;
display: flex;
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 {
......
......@@ -28,13 +28,16 @@ export default {
receivedGiftList
},
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() {},
methods: {
handleTabClick() {
sessionStorage.setItem('GIFTNAME', this.activeName)
this.$router.push({ path: this.$route.path, query: { type: this.activeName == 'receivedGiftList' ? 'received' : 'gift' } })
}
}
}
......
......@@ -22,14 +22,18 @@
<!-- 表格区域 开始 -->
<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">
<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>
<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>
</el-tooltip>
</span>
<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 class="table-btns" slot="auth-button" slot-scope="scope">
<el-button :disabled="scope.scope.receiveStatus == 2" type="text" @click="handleCancel(scope.scope)">作废</el-button>
......@@ -196,12 +200,13 @@ export default {
tableColumns: [
{
label: '礼包明细',
prop: 'couponName'
prop: 'couponName',
width: 200
},
{
label: '数量',
name: 'couponAmount',
width: '100px',
width: 150,
formatter: cellValue => {
return 'X' + cellValue.couponAmount
}
......@@ -209,6 +214,7 @@ export default {
{
label: '已核销/次',
prop: 'anticipatedCost ',
width: 150,
formatter: cellValue => {
return 'X' + cellValue.delet
}
......@@ -216,6 +222,7 @@ export default {
{
label: '可使用/次',
prop: 'getAmount',
width: 150,
formatter: cellValue => {
if (cellValue.residueCouponAmount == -1) {
return '不限次数'
......@@ -369,7 +376,8 @@ export default {
this.$router.push({
path: '/giftBag/giftDetail',
query: {
id: row.directionalGiftId
id: row.directionalGiftId,
type: 'received'
}
})
},
......@@ -513,6 +521,18 @@ export default {
.marketing /deep/ .el-table th div {
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 {
width: 44px;
height: 18px;
......@@ -523,7 +543,7 @@ export default {
text-align: center;
line-height: 18px;
background: #eeeded;
margin-left: 4px;
margin-top: 2px;
}
.void-reason {
font-size: 10px;
......
......@@ -5,12 +5,12 @@
<h4>{{ title }}</h4>
<el-divider></el-divider>
<div class="form-item-container">
<el-form-item v-if="routeInfo.addOrEdit == 1" label="选择素材组:" prop="selectMaterialGroup">
<el-form-item v-if="routeInfo.addOrEdit == 1" label="选择素材组:" prop="groupId">
<el-select v-model="materialAddForm.groupId" placeholder="全部" :size="size">
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item v-else label="选择素材组:">
<el-form-item v-else label="选择素材组:" prop="selectMaterialGroupName">
<el-select v-model="materialAddForm.groupName" placeholder="全部" :size="size" disabled>
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
</el-select>
......@@ -30,7 +30,13 @@
<input type="file" style="opacity: 0" accept=".pdf" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件</el-button>
</div>
<div v-if="pdfUrl">{{ pdfUrl }}</div>
<!-- <div v-if="pdfUrl">{{ pdfUrl }}</div> -->
<ul v-if="pdfName || materialAddForm.materialUrl">
<li class="pdf-show">
<span class="pdf-name" @click="openPdfDia">{{ pdfName || materialAddForm.materialUrl }}</span>
<i v-if="routeInfo.addOrEdit == 1" class="el-icon-close" @click="delPdf"></i>
</li>
</ul>
</div>
<!-- 选择自定义链接 -->
<!-- <div v-show="materialAddForm.materialType == 2">
......@@ -76,7 +82,7 @@
:
</span>
</span>
<el-checkbox v-model="materialAddForm.isNotifySender" :checked="checked" @change="notifyChange">客户打开素材链接时通知发送人</el-checkbox>
<el-checkbox :value="materialAddForm.isNotifySender" :checked="checked" @change="notifyChange">客户打开素材链接时通知发送人</el-checkbox>
<span class="track-tips track-info">(客户不包括本商户的员工)</span>
</el-form-item>
<el-form-item prop="tagJson">
......@@ -176,6 +182,7 @@
</div>
</el-form>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel>
<!-- <pdfReviewDia ref="pdfReviewDia" :pdfName="pdfName" :pdfUrl="pdfUrl" :dialogVisible="dialogPdfVisible"></pdfReviewDia> -->
<GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</el-button>
......@@ -187,11 +194,13 @@
<script>
import textBox from '@/views/material/components/textBox'
import SelectLabel from '@/views/material/components/selectLable'
// import pdfReviewDia from './components/pdfReviewDia.vue'
export default {
name: 'addMaterialForm',
components: {
textBox,
SelectLabel
// pdfReviewDia
},
data() {
return {
......@@ -205,6 +214,8 @@ export default {
tagging: [],
urlSrc: '',
pdfUrl: '',
pdfName: '',
dialogPdfVisible: false,
textBoxContent: '',
materialAddForm: {
groupId: '', // 素材组id
......@@ -226,7 +237,7 @@ export default {
// phoneVisible: false,
businessTypes: [],
materialAddFormRules: {
selectMaterialGroup: [{ required: true, message: '请选择素材组', trigger: 'change' }],
groupId: [{ required: true, message: '请选择素材组', trigger: 'change' }],
materialName: [
{ required: true, message: '请输入素材名称', trigger: 'change' },
{ max: 30, message: '素材名称长度不能超过30', trigger: 'blur' }
......@@ -244,7 +255,6 @@ export default {
},
mounted() {
this.routeInfo = this.$route.query
console.log(this.routeInfo)
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
this.routeInfo.addOrEdit != 1 ? (this.routeInfo.status != 1 ? this.forbidEdit() : '') : ''
this.title = this.titleObj[this.routeInfo.addOrEdit]
......@@ -276,9 +286,26 @@ export default {
if (this.materialAddForm.isNotifySender) {
params.isNotifySender = 0
}
if (params.materialType == 1) {
if (this.materialAddForm.materialType == 1) {
params.materialUrl = this.pdfUrl
} else if (params.materialType == 3) {
} else if (this.materialAddForm.materialType == 3) {
let html = this.textBoxContent
let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
let videoHtml = html.match(/<video.*?(?:>|\/>)/g)
if (imgHtml) {
for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '')
}
}
if (videoHtml) {
for (let i = 0; i < videoHtml.length; i++) {
html = html.replace(videoHtml[i], '')
}
}
html = html.replace(/<[^>]+>/g, '')
if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4
if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6
this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent
}
......@@ -293,19 +320,20 @@ export default {
}
this.$apis.material.materialDetail(params).then(res => {
this.materialAddForm = res
if (this.materialAddForm.businessType) {
if (res.businessType) {
const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
} else {
this.materialAddForm.businessType = []
}
if (this.materialAddForm.materialType == 3) {
if (res.materialType == 3 || res.materialType == 4 || res.materialType == 5 || res.materialType == 6) {
this.materialAddForm.materialType = 3
this.materialAddForm.materialUrl = decodeURIComponent(this.materialAddForm.materialUrl)
this.$refs.textBox.setEdit(this.materialAddForm.materialUrl)
} else if (this.materialAddForm.materialType == 1) {
} else if (res.materialType == 1) {
this.pdfUrl = this.materialAddForm.materialUrl
}
if (this.materialAddForm.tagJson) {
if (res.tagJson) {
const tagging = eval(this.materialAddForm.tagJson)
// let arr = []
this.tagging = tagging.map(item => {
......@@ -396,6 +424,12 @@ export default {
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.pdfUrl = res
this.pdfName = file.name
this.$notify({
title: '成功',
message: '文件上传成功',
type: 'success'
})
}
})
}
......@@ -428,6 +462,13 @@ export default {
this.$refs.materialAddForm.validate(valid => {
if (valid) {
var params = this.getParams()
if (!params.materialUrl) {
this.$message({
message: '素材内容不能为空',
type: 'warning'
})
return
}
params.status = 1
let material
if (params.id) {
......@@ -456,34 +497,16 @@ export default {
handleSubmit() {
this.$refs.materialAddForm.validate(valid => {
if (valid) {
// let tagging = this.tagging.map(item => {
// let tagIds = item.labelList.map(tag => {
// return tag.id
// })
// let name = item.labelList.map(tag => {
// return tag.name
// })
// return {
// groupId: item.labelGroup.id,
// tagIds: tagIds.join(','),
// name: name.join(','),
// labelType: item.labelGroup.name
// }
// })
var params = this.getParams()
if (!params.materialUrl) {
this.$message({
message: '素材内容不能为空',
type: 'warning'
})
return
}
// status 状态 0 启用 -1 禁用 1 存草稿
params.status = 0
// params.isNotifySender = -1
// params.tagJson = JSON.stringify(tagging)
// if (this.materialAddForm.isNotifySender) {
// params.isNotifySender = 0
// }
// if (params.materialType == 1) {
// params.materialUrl = this.pdfUrl
// } else if (params.materialType == 3) {
// this.textBoxContent = encodeURIComponent(this.textBoxContent)
// params.materialUrl = this.textBoxContent
// }
let material
if (params.id) {
material = 'materialEdit'
......@@ -568,6 +591,15 @@ export default {
// 删除上传图片
deleteImg() {
this.materialAddForm.titleUrl = ''
},
// 删除pdf
delPdf() {
this.pdfUrl = ''
this.pdfName = ''
},
openPdfDia() {
this.dialogPdfVisible = true
this.$refs.pdfReviewDia.init()
}
}
}
......@@ -751,7 +783,6 @@ export default {
.pdf-show {
display: inline-flex;
position: relative;
width: 109px;
height: 32px;
input {
position: absolute;
......@@ -878,4 +909,29 @@ export default {
vertical-align: middle;
}
}
ul {
margin-top: 5px;
.pdf-show {
// width: 200px;
list-style: none;
align-items: center;
position: relative;
padding: 0 8px;
.pdf-name {
margin-right: 20px;
&:hover {
color: #5850ff;
}
}
&:hover {
cursor: pointer;
background-color: rgba(88, 80, 255, 0.2) !important;
}
i {
position: absolute;
right: 5px;
top: 10px;
}
}
}
</style>
<template>
<div class="material-group">
<div class="material-group" :style="{ height: groupHeight + 'px' }">
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">素材组</el-button>
<div class="all-group">
<div class="all-group-word" @click="getList">全部素材组 ({{ groupCounter.length }})</div>
<div>
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">素材组</el-button>
<div @click="getList">
<img src="@/assets/material/groupIcon.png" alt="" />
全部素材组 ({{ groupCounter.length }})
</div>
<div @click="groupVisible = !groupVisible">
<i class="el-icon-arrow-down" v-show="groupVisible"></i>
<i class="el-icon-arrow-up" v-show="!groupVisible"></i>
</div>
</div>
<ul>
<li v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''" :key="index" @click="handleGroup(item, index)">
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle" />
<div class="group-name">{{ item.materialGroupName }}</div>
<el-popover placement="right" trigger="hover">
<div>
<GLButton class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</GLButton>
</div>
<i slot="reference" class="el-icon-more"></i>
</el-popover>
<ul v-show="groupVisible" :style="{ height: groupHeight - 110 + 'px' }">
<li class="group-list" v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''" :key="index" @click="handleGroup(item, index)">
<div>
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle;height:24px;width:24px" />
<div class="group-name">{{ item.materialGroupName }}</div>
</div>
<div>
<el-popover placement="right" trigger="hover">
<div>
<GLButton class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</GLButton>
<!-- <el-button class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</el-button>
<el-button class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</el-button>
<el-button class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</el-button> -->
</div>
<div slot="reference">
<img class="more-icon" src="@/assets/material/more.png" alt="" />
</div>
</el-popover>
</div>
</li>
</ul>
</div>
......@@ -27,7 +41,7 @@
import * as dayjs from 'dayjs'
export default {
name: 'materialGroup',
props: { eventBus: Object },
props: { eventBus: Object, groupHeight: Number },
data() {
return {
// 素材组数量
......@@ -38,7 +52,8 @@ export default {
orderValue: '',
isDefault: '' // 默认素材组 0 是 -1 否(进入页面如果素材组数量为0,就会创建默认素材组,默认素材组不可删除)
},
currentIndex: null
currentIndex: null,
groupVisible: true
}
},
mounted() {
......@@ -163,8 +178,12 @@ export default {
</script>
<style lang="scss" scoped>
.status-words {
margin-left: 5px;
}
.el-popover {
min-width: 50px;
max-width: 150px;
&:hover {
cursor: pointer;
}
......@@ -172,31 +191,35 @@ export default {
.material-group {
.all-group {
font-size: 16px;
font-weight: 600;
padding: 24px 16px 8px 16px;
height: 44px;
line-height: 44px;
padding: 0 17px 0 16px;
display: flex;
justify-content: space-between;
.el-button {
margin-top: -13px;
cursor: pointer;
img {
width: 24px;
height: 24px;
vertical-align: middle;
}
&-word {
cursor: pointer;
i {
color: #999999;
}
}
ul {
li {
overflow: auto;
.group-list {
cursor: pointer;
text-align: left;
padding: 8px 16px 8px 18px;
padding: 8px 8px 8px 18px;
display: flex;
justify-content: space-between;
&.active {
background-color: #ebeaff;
}
i {
font-size: 16px;
padding-top: 6px;
position: absolute;
right: 16px;
transform: rotate(90deg);
.more-icon {
vertical-align: middle;
padding-top: 3px;
}
}
}
......@@ -210,17 +233,20 @@ ul {
list-style: none;
position: relative;
vertical-align: middle;
margin: 0 10px;
&:nth-child(-n + 2) {
padding-bottom: 10px;
}
&:hover {
color: #5850ff;
// color: #5850ff;
background-color: #ebeaff;
}
}
}
.add_btn {
color: #5850ff;
border-color: #5850ff;
margin: 20px 0 12px 16px;
}
.group-name {
display: inline-flex;
......
<template>
<div>
<el-dialog :title="pdfName" :visible.sync="dialogPdfVisible" width="90%" top="20px">
<iframe ref="iframeRef" :src="pdfUrl"></iframe>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'pdfReviewDia',
props: ['pdfUrl', 'pdfName'],
data() {
return {
dialogPdfVisible: false
}
},
methods: {
init() {
this.dialogPdfVisible = true
}
}
}
</script>
<style lang="scss" scoped>
.el-dialog {
.el-dialog__body {
display: flex;
justify-content: center;
padding: 0;
iframe {
width: 88vw;
height: 80vh;
}
}
}
</style>
......@@ -7,11 +7,24 @@
</span>
</glsx-combi-form>
<GLTable ref="readPerDetailRef" @setTableFinishFun="setTableFinishFun" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="departName" slot-scope="scope">
<el-tag type="info" v-for="item in scope.scope.departName" effect="plain" :key="item">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ item }}
</el-tag>
<div slot="departName" slot-scope="scope" style="display:flex">
<div v-for="(item, index) in scope.scope.departName" :key="index">
<el-tag type="info" :size="size" effect="plain" v-if="index < 3" style="margin-right:4px">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ item }}
</el-tag>
<el-tag type="info" :size="size" v-if="scope.scope.departName.length > 3 && index == 3">
<el-popover placement="top" width="500" trigger="hover">
<span slot="reference">...({{ scope.scope.departName.length }})</span>
<div class="entmicro-hover">
<el-tag class="toptip" type="info" v-for="(i, index) in scope.scope.departName" :size="size" :key="index">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ i }}
</el-tag>
</div>
</el-popover>
</el-tag>
</div>
</div>
</GLTable>
</div>
......@@ -76,7 +89,8 @@ export default {
{
label: '所属企微成员',
prop: 'departName',
addHtml: 'departName'
addHtml: 'departName',
width: 350
},
{
label: '阅读次数',
......@@ -111,10 +125,17 @@ export default {
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.readPerDetailRef.data.length ? (this.$refs.readPerDetailRef.tableHeightValues = '') : this.$refs.readPerDetailRef.setTableHeightFun()
this.$refs.readPerDetailRef.data.length ? (this.$refs.readPerDetailRef.tableHeightValues = '') : (this.$refs.readPerDetailRef.tableHeightValues = '280px')
}
}
}
</script>
<style lang="" scoped></style>
<style lang="scss" scoped>
.toptip {
margin-right: 4px;
&:nth-last-of-type(-n + 4) {
margin-bottom: 0;
}
}
</style>
......@@ -149,7 +149,8 @@ export default {
if (this.selectNum > 3) {
this.$message({
message: '最多选择三个标签',
type: 'warning'
type: 'warning',
customClass: 'dialog-tips'
})
return
}
......
......@@ -101,7 +101,7 @@ export default {
this.$apis.material.sendDetailPage(params).then(res => {
this.sendStaffTableData = res
// 计算表格高度,数据10条以下自适应,10条以上固定高度,表格内滚动,无数据调用方法计算高度
res.length ? (res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')) : this.$refs.staffSendDetailRef.setTableHeightFun()
res.length ? (res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')) : (this.$refs.staffSendDetailRef.tableHeightValues = '325px')
// res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')
})
}
......
......@@ -27,14 +27,17 @@ export default {
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = 400
this.editor.config.width = 500
this.editor.config.uploadVideoServer = '/api/upload-video'
this.editor.config.excludeMenus = ['code', 'video']
this.editor.config.excludeMenus = ['code']
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
......@@ -59,6 +62,32 @@ export default {
// 上传图片,返回结果,将图片插入到编辑器中
}
}
// 上传视频
this.editor.config.customUploadVideo = function (resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const videoFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + videoFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertVideoFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
this.editor.config.onchangeTimeout = 5000
this.editor.create()
},
......
<template>
<div>
<el-dialog :visible.sync="dialogVisibleImg" width="50%" :before-close="videoClose">
<div class="image-dialog">
<video width="100%" controls :src="dialogSrc" id="video1" @click="playVideo"></video>
<img @click="playVideoImg" v-show="paused" src="@/assets/material/video1.png" alt="" />
<img @click="playVideoImg" v-show="!paused" src="@/assets/material/video2.png" alt="" />
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'videoShowDia',
data() {
return {
dialogVisibleImg: false,
dialogSrc: '',
paused: false,
myVideo: ''
}
},
methods: {
init(src) {
this.dialogVisibleImg = true
this.dialogSrc = src
setTimeout(() => {
this.myVideo = document.getElementById('video1')
this.paused = this.myVideo.paused ? true : false
})
},
videoClose() {
this.myVideo.pause()
this.myVideo.muted = false
this.dialogVisibleImg = false
},
playVideo() {
var myVideo = document.getElementById('video1')
this.paused = !myVideo.paused
this.paused ? myVideo.play() : myVideo.pause()
},
playVideoImg() {
this.paused = !this.paused
console.log(this.paused)
this.paused ? this.myVideo.pause() : this.myVideo.play()
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-dialog__header {
background-color: black;
}
/deep/ .el-dialog__body {
padding: 0;
}
/deep/ .el-dialog {
position: relative;
}
.image-dialog {
position: absolute;
width: 100%;
img {
width: 170px;
position: absolute;
top: 35%;
left: 40%;
}
}
</style>
......@@ -24,7 +24,12 @@
</div>
<div class="materialDetail-desc-item" v-if="detailInfo.materialType == 1">
<div class="materialDetail-item-name">素材地址:</div>
{{ detailInfo.materialUrl }}
<span class="copy-img">
<span id="materialUrl">
{{ detailInfo.materialUrl }}
</span>
<img @click="copyUrl" src="@/assets/material/copy.png" alt="" />
</span>
<span class="item-name-info">(备注:直接复制素材地址发送给客户无法接受通知提醒)</span>
</div>
<div class="materialDetail-desc-row">
......@@ -155,7 +160,7 @@
</div>
</div>
</el-dialog>
<GLFooter>
<GLFooter class="gl-footer">
<el-button @click="goback" type="primary">返回</el-button>
</GLFooter>
</div>
......@@ -211,23 +216,27 @@ export default {
params.flag = 0
this.$apis.material.materialDetail(params).then(res => {
this.detailInfo = res
if (this.detailInfo.tagJson) {
if (res.tagJson) {
this.detailInfo.tagJson = eval(this.detailInfo.tagJson)
} else {
this.detailInfo.tagJson = []
}
if (this.detailInfo.materialType == 3) {
if (res.materialType == 3 || res.materialType == 4 || res.materialType == 5 || res.materialType == 6) {
this.detailInfo.materialType = 3
this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl)
let html = this.detailInfo.materialUrl
let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
// for (let i = 0; i < imgHtml.length; i++) {
// html = html.replace(imgHtml[i], '')
// }
let videoHtml = html.match(/<video.*?(?:>|\/>)/g)
if (imgHtml) {
for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '')
}
}
if (videoHtml) {
for (let i = 0; i < videoHtml.length; i++) {
html = html.replace(videoHtml[i], '')
}
}
this.htmlContent = html
if (imgHtml) {
this.imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
......@@ -266,6 +275,18 @@ export default {
},
goback() {
this.$router.go(-1)
},
copyUrl() {
const range = document.createRange()
range.selectNode(document.getElementById('materialUrl'))
const selection = window.getSelection()
if (selection.rangeCount > 0) selection.removeAllRanges()
selection.addRange(range)
document.execCommand('copy')
this.$message({
message: '复制成功',
type: 'success'
})
}
}
}
......@@ -322,16 +343,18 @@ export default {
flex: 1;
.content-item-title {
color: #333333;
max-width: 210px;
font-family: PingFangSC-Regular, PingFang SC;
max-width: 185px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 20px;
margin-bottom: 6px;
}
.content-item-desc {
color: #999999;
line-height: 20px;
max-width: 210px;
max-width: 185px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
......@@ -459,6 +482,7 @@ export default {
font-size: 14px;
color: #999999;
line-height: 20px;
margin-left: 10px;
}
.phone-view {
height: 600px;
......@@ -481,15 +505,18 @@ export default {
padding: 8px;
box-sizing: border-box;
border-radius: 13px;
box-shadow: -2px 4px 3px #ccc;
&-title {
width: 100%;
height: 30px;
height: 35px;
border-bottom: 1px solid #ccc;
color: #333;
}
&-word {
color: #666;
line-height: 20px;
/deep/img {
width: 100% !important;
}
}
}
}
......@@ -509,4 +536,17 @@ p {
.tag-show {
margin-bottom: -10px;
}
.gl-footer {
z-index: 1000;
}
.copy-img {
display: flex;
align-items: center;
img {
width: 16px;
height: 16px;
margin-left: 4px;
cursor: pointer;
}
}
</style>
......@@ -49,6 +49,7 @@
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }}
</div>
<el-button :size="size" class="default-blue-btn m-l-20" type="default" @click="handleExport">导出</el-button>
</div>
<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">
......@@ -67,6 +68,14 @@
</span>
</GLTable>
</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">
<div class="dialog-form">
<label>说明:</label>
......@@ -79,10 +88,13 @@
<script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
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 {
data() {
return {
isShow: false,
orderPrice: '',
orderDate: '',
orderCode: '',
refund: '',
refundVisible: false,
......@@ -139,7 +151,13 @@ export default {
name: 'merchantName',
type: 'input',
maxlength: 100
}
},
{
label: '推荐人',
name: 'shareStaffName',
type: 'input',
maxlength: 100
},
],
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1,
......@@ -168,7 +186,11 @@ export default {
fn: '退款'
},
condition: row => {
return row.refundFlag == 1
if (row.packageType == 2) {
return row.refundFlag == 1 && row.show
} else {
return row.refundFlag == 1
}
},
listeners: {
click: this.handleRefund
......@@ -198,7 +220,8 @@ export default {
},
{
label: '价格/元',
prop: 'originalPrice'
prop: 'originalPrice',
width: '100'
},
{
label: '实收金额/元',
......@@ -208,7 +231,7 @@ export default {
{
label: '订单状态',
prop: 'orderStatus',
width: '80',
width: '100',
formatter: cellValue => {
return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
}
......@@ -267,10 +290,10 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
}
if (this.$isGroupUp) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
this.tableParams.tableColumns.splice(idx, 1)
}
// if (this.$isGroupUp) {
// let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
// this.tableParams.tableColumns.splice(idx, 1)
// }
},
mounted() {
this.getOptionsList('searchFormData')
......@@ -349,10 +372,26 @@ export default {
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) {
this.orderCode = data.orderCode
this.refund = ''
this.refundVisible = !this.refundVisible
// this.refundVisible = !this.refundVisible
if (data.packageType == 2) {
this.ordeRefund(data.orderCode)
} else {
this.refundVisible = true
}
},
refundConfirmDialog() {
if (this.refund == '') {
......@@ -400,6 +439,19 @@ export default {
setTableFinishFun() {
//接收到的数据为空
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() {
this.isReload = false
......@@ -435,8 +487,8 @@ export default {
display: flex;
height: auto;
position: relative;
width: 285px;
left: calc(100% - 285px);
width: 367px;
left: calc(100% - 367px);
.choseItem {
display: inline-block;
cursor: pointer;
......@@ -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>
......@@ -37,6 +37,13 @@
<span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span>
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div>
<div slot="shareStaffImageUrl" class="table-image" slot-scope="scope">
<el-popover v-if="scope.scope.shareStaffImageUrl" placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.shareStaffImageUrl" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.shareStaffImageUrl" />
</el-popover>
<span v-else>-</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -135,7 +142,8 @@ export default {
orderSource: '',
deliveryType: '',
vin: '',
shareStaffName: ''
shareStaffName: '',
shareStaffType: ''
},
tableSearchForm: {},
statisticsInfo: {
......@@ -273,6 +281,15 @@ export default {
labelWidth: 56,
type: 'input',
maxlength: 100
},
{
label: '推荐人类型',
name: 'shareStaffType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'shareStaffTypeList'
}
],
// 快递信息
......@@ -375,10 +392,11 @@ export default {
}
},
{
type: 'el-button',
type: 'GLButton',
name: '订单核销',
attrs: {
type: 'text'
type: 'text',
fn: '订单核销'
},
condition: row => {
return row.deliveryType == 1 && row.orderStatus == 21
......@@ -388,10 +406,12 @@ export default {
}
},
{
type: 'el-button',
name: '输入快递信息',
type: 'GLButton',
// name: '输入快递信息',
name: '商品发货',
attrs: {
type: 'text'
type: 'text',
fn: '商品发货'
},
condition: row => {
return row.deliveryType == 2 && row.orderStatus == 6
......@@ -401,10 +421,11 @@ export default {
}
},
{
type: 'el-button',
type: 'GLButton',
name: '退款审核',
attrs: {
type: 'text'
type: 'text',
fn: '退款审核'
},
condition: row => {
return row.afterSaleStatus == 1
......@@ -455,6 +476,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: '客户名称',
prop: 'customerName',
line: 2,
......@@ -464,6 +501,14 @@ export default {
}
},
{
label: '手机号',
prop: 'customerPhone',
width: 130,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '车架号',
prop: 'vinNo',
width: 120,
......@@ -480,12 +525,26 @@ export default {
prop: 'shareStaffName',
width: '180',
formatter: cellValue => {
return cellValue.shareStaffName || '-'
return cellValue.shareStaffName ? cellValue.shareStaffName + (cellValue.shareStaffPhone ? '+' + cellValue.shareStaffPhone : '') : '-'
}
},
{
label: '头像',
prop: 'shareStaffImageUrl',
addHtml: 'shareStaffImageUrl'
},
{
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: '支付总价',
prop: 'payPrice',
width: '120',
formatter: cellValue => {
return cellValue.payPrice || '0'
}
......@@ -534,6 +593,10 @@ export default {
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '我要退款(无需退货)' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
]
}
}
......@@ -829,7 +892,8 @@ export default {
orderSource: '',
deliveryType: '',
vin: '',
shareStaffName: ''
shareStaffName: '',
shareStaffType: ''
}
this.handleSearch()
}
......
......@@ -104,6 +104,10 @@ export default {
name: 'shareStaffName'
},
{
label: '推荐人类型',
name: 'shareStaffTypeName'
},
{
label: '车架号',
name: 'vin'
},
......@@ -135,6 +139,12 @@ export default {
{
label: '发货地址',
name: 'shipAddress'
},
{
label: '其他信息',
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second', 'Third']
}
],
// 售后信息
......@@ -177,6 +187,10 @@ export default {
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
]
}
}
......@@ -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.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
if (this.detailForm.shareStaffType) {
this.detailForm.shareStaffTypeName = 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) {
this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2)
}
......@@ -229,6 +246,16 @@ export default {
var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee')
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')
})
},
......
......@@ -197,6 +197,9 @@
</div>
</el-radio-group>
</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>
<el-radio-group v-model="editForm.takeAllMerchant" :disabled="isDisabled">
......@@ -511,7 +514,8 @@ export default {
expressFee: '',
// 带货是否选择全部商户(0:否,1:是)
takeAllMerchant: '1',
supplyMerchantList: []
supplyMerchantList: [],
serviceDesc: ''
},
isEdit: true,
labelWidth: '144px',
......@@ -813,7 +817,12 @@ export default {
width: '320px',
isHide: false,
isDisabled: false
}
},
{
label: '服务说明',
name: 'serviceDesc',
addHtml: 'serviceDescHtml'
},
]
},
{
......@@ -1345,7 +1354,8 @@ export default {
relatedCouponId: '',
takeAllMerchant: res.takeAllMerchant || (res.supplyMerchantList.length ? '0' : '1'),
descImgList: [],
businessType: []
businessType: [],
serviceDesc: res.serviceDesc || ''
}
this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType)
if (res.relatedCoupon) {
......@@ -1565,6 +1575,8 @@ export default {
deleteAttrList.forEach(item => {
delete params[item]
})
// 服务说明
params.serviceDesc = this.editForm.serviceDesc
this.loading = true
this.$apis.proManage
.insertOrUpdateProApi(params)
......
......@@ -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',
name: '分享',
attrs: {
......@@ -339,7 +353,10 @@ export default {
handleTop(row) {
this.secondConfirm('置顶', '是否确认置顶该商品?', 'proManage', 'topProApi', { id: row.id })
},
// 删除
del(row) {
this.secondConfirm('删除', '确定删除此活动?', 'proManage', 'deleteGoodsApi', { id: row.id })
},
handleShare(row) {
this.$apis.proManage.getProShareApi({ id: row.id }).then(res => {
this.shareForm = res
......
......@@ -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',
name: '分享',
attrs: {
......@@ -421,6 +435,10 @@ export default {
handleTakeGood(row) {
this.secondConfirm('取消带货', '是否确认取消带货该商品?', 'proManage', 'deleteTakeProApi', { id: row.id })
},
// 删除
del(row) {
this.secondConfirm('删除', '确定删除此活动?', 'proManage', 'deleteGoodsApi', { id: row.id })
},
dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate()
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 @@
<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">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<template slot="activityTimeHtml">
<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>
<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" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</template>
<div slot="goodsHtml">
<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 {
}
],
goodsStock: [
{ required: true, message: '请设置活动库存', trigger: 'change' },
{
validator: (rule, value, callback) => {
return value > this.selectedProInfo.goodsStock ? callback(new Error('活动库存不能大于商品库存')) : callback()
},
trigger: 'change'
}
{ required: true, message: '请设置活动库存', trigger: 'change' }
// {
// validator: (rule, value, callback) => {
// return value > this.selectedProInfo.goodsStock ? callback(new Error('活动库存不能大于商品库存')) : callback()
// },
// trigger: 'change'
// }
],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
......@@ -342,6 +342,10 @@ export default {
}
},
handleTimeChange(value, targetItem) {
!value && (this.editForm[targetItem.name] = [])
},
handleIsLimit(val) {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1
......@@ -499,7 +503,7 @@ export default {
this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) {
form.activityPrice = (info.activityPrice / 100).toFixed(2)
form.goodsStock = info.goodsStock
form.goodsStock = info.goodsStock + ''
}
this.$nextTick(() => {
this.editStatus = false
......
<!-- 商品管理-门店 -->
<!-- 秒杀活动 -->
<template>
<div class="marketing pro-group p-t-20">
<div class="marketing p-t-20">
<div class="m-b-20">
<GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
</div>
......@@ -9,12 +9,12 @@
<!-- 表格区域 开始 -->
<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">
<img class="table-popover-img" :src="scope.scope.activityImg" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" />
</el-popover>
</template>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
......
......@@ -785,6 +785,7 @@ export default {
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
// this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'编辑sop事件',params}))
if (res.code == '0') {
this.cancelJump()
}
......@@ -797,6 +798,7 @@ export default {
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
// this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'创建sop事件',params}))
if (res.code == '0') {
this.cancelJump()
}
......
......@@ -34,7 +34,8 @@ module.exports = {
vuex: 'Vuex',
axios: 'axios',
echarts: 'echarts',
moment: 'moment'
moment: 'moment',
AMap: 'AMap'
}
},
devServer: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!