Commit 57ea05ef by 胡悦

Merge branch 'wuwx_dev_v2.6.0' of http://192.168.3.233:8090/saas/scrm-micro-mark…

…eting into wuwx_dev_v2.6.0
2 parents ebf27d1a 96e81f6e
Showing 53 changed files with 1327 additions and 119 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.
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.4.3", "glsx-components": "^1.4.2",
"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",
......
...@@ -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,4 @@ const getStaffFollowerListApi = params => { ...@@ -128,4 +139,4 @@ const getStaffFollowerListApi = params => {
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi } export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi }
...@@ -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 }
...@@ -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 }
...@@ -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 {
...@@ -589,12 +602,12 @@ html { ...@@ -589,12 +602,12 @@ html {
z-index: 4000 !important; z-index: 4000 !important;
} }
.loadingClass{ .loadingClass {
.el-icon-loading{ .el-icon-loading {
font-size: 22px; font-size: 22px;
} }
.el-icon-loading, .el-icon-loading,
.el-loading-text{ .el-loading-text {
color: #5850ff!important; color: #5850ff !important;
} }
}
\ No newline at end of file \ No newline at end of file
}

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 ...@@ -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 }
...@@ -22,29 +22,6 @@ ...@@ -22,29 +22,6 @@
</el-input> </el-input>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
<!-- 选择-输入框 -->
<!-- <el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</el-input> -->
<!-- 选择-时间选择框 -->
<!-- <template v-else-if="item.type === 'selectDatePicker'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-date-picker v-model="searchSelectObj[item.selectName].value" :style="{ width: item.width || defaultWidth }" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
</template> -->
<!-- 双选择框 -->
<!-- <template v-else-if="item.type === 'selectDouble'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-select v-model="searchSelectObj[item.selectName].value" :style="{ width: item.width || defaultWidth }" :placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label">
<el-option label="全部" value=""></el-option>
<el-option v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]"></el-option>
</el-select>
</template> -->
<!-- 选择框 --> <!-- 选择框 -->
<div v-else-if="item.type === 'select'"> <div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)"> <el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
...@@ -98,6 +75,14 @@ ...@@ -98,6 +75,14 @@
</template> </template>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</template> </template>
<!-- 图文编辑器 -->
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" @change="e => handleTextBoxChange(e, item)" @forbid="forbidEdit"></textBox>
<!-- 地图 -->
<div v-else-if="item.type === 'map'" class="flex">
<Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)"></Province>
<el-input class="input-width" v-model="formObj[item.name]" placeholder="请选择商户地址" :disabled="item.isDisabled"></el-input>
<el-button v-show="!item.isDisabled" @click="handleSelectMap(item)" type="primary">选择地址</el-button>
</div>
</el-form-item> </el-form-item>
</template> </template>
<slot name="footer"></slot> <slot name="footer"></slot>
...@@ -110,10 +95,20 @@ ...@@ -110,10 +95,20 @@
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" /> <img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogMapVisible" width="60%">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogMapVisible = false">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import textBox from '@/views/material/components/textBox'
import Province from './provinceCity.vue'
import mapView from './mapView.vue'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common' import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default { export default {
name: 'glsx-combi-form', name: 'glsx-combi-form',
...@@ -123,6 +118,10 @@ export default { ...@@ -123,6 +118,10 @@ export default {
beforeRangePickerOptions: beforeRangePickerOptions, beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions afterRangePickerOptions: afterRangePickerOptions
}, },
subdistrict: 2,
mapHeight: 450,
dialogMapVisible: false,
targetItem: {},
isImgVisible: false, isImgVisible: false,
dialogObj: { dialogObj: {
url: '', url: '',
...@@ -180,6 +179,12 @@ export default { ...@@ -180,6 +179,12 @@ export default {
} }
}, },
components: {
textBox,
Province,
mapView
},
mounted() { }, mounted() { },
methods: { methods: {
...@@ -255,6 +260,93 @@ export default { ...@@ -255,6 +260,93 @@ export default {
url: src, url: src,
uploadType: targetItem.uploadType || 'img' uploadType: targetItem.uploadType || 'img'
} }
},
// 获取富文本框内容
handleTextBoxChange(val, targetItem) {
this.formObj[targetItem.name] = val
},
// 禁用富文本
forbidEdit() {
this.$refs.textBox.forbidEdit()
},
// 地图
handleSelectMap(targetItem) {
this.targetItem = targetItem
this.dialogMapVisible = true
this.$nextTick(() => {
console.log(this.$refs.mapForm)
if (this.formObj[targetItem.attrObj.fullAddress] && !this.$refs.mapForm.address) {
this.$refs.mapForm.address = this.formObj[targetItem.attrObj.fullAddress]
this.$refs.mapForm.addMarker([this.formObj[targetItem.attrObj.lng], this.formObj[targetItem.attrObj.lat]])
}
})
},
getAddress() {
let mapInfo = this.$refs.mapForm
if (!mapInfo.address) {
this.$message({
message: '请选择地址',
type: 'error',
customClass: 'message-Z-zinde'
})
return
}
this.formObj[this.targetItem.attrObj.fullAddress] = mapInfo.address
this.formObj[this.targetItem.attrObj.lat] = mapInfo.lnglat.lat
this.formObj[this.targetItem.attrObj.lng] = mapInfo.lnglat.lng
// var fullAddress = mapInfo.geocoderAddress.addressComponent || this.formObj[this.targetItem.attrObj.fullAddress]
var fullAddress = mapInfo.geocoderAddress.addressComponent
var provincecode = mapInfo.geocoderAddress.adcode || this.formObj[this.targetItem.attrObj.provinceCode]
this.formObj[this.targetItem.attrObj.provinceCode] = provincecode
// 获取省市
var province = ''
var city = ''
province = fullAddress.province
city = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province)
if (municipality) {
city = city.slice(0, 2) + '城区'
if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
}
}
// 判断省市是否匹配
if (this.formObj[this.targetItem.attrObj.provinceName]) {
if (this.formObj[this.targetItem.attrObj.provinceName] !== province && this.formObj[this.targetItem.attrObj.cityName] !== city) {
this.$message({
message: '您选择的地址错误,请重新选择',
type: 'error',
customClass: 'message-Z-zinde'
})
this.formObj[this.formObj[this.targetItem.attrObj.fullAddress]] = ''
return
}
}
this.dialogMapVisible = false
this.formObj[this.targetItem.attrObj.provinceName] = province
this.formObj[this.targetItem.attrObj.cityName] = city
// 当直接点击选择地址时,获取省市ID
this.$refs.provinceForm[0].init(province, city)
},
// 获取省
handleSelectProvince(val, targetItem) {
this.formObj[targetItem.attrObj.fullAddress] = ''
this.formObj[targetItem.attrObj.cityName] = ''
this.formObj[targetItem.attrObj.provinceName] = val.provinceName
this.formObj[targetItem.attrObj.provinceCode] = val.provinceCode
},
// 获取市
handleSelectCity(val, targetItem) {
if (val.cityName) {
this.formObj[targetItem.attrObj.cityName] = val.cityName
this.formObj[targetItem.attrObj.cityCode] = val.cityCode
} else {
this.formObj[targetItem.attrObj.cityName] = ''
this.formObj[targetItem.attrObj.cityCode] = ''
}
this.formObj[targetItem.attrObj.fullAddress] = ''
} }
} }
} }
......
<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,7 +38,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -38,7 +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 // 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,7 +462,7 @@ export default { ...@@ -462,7 +462,7 @@ export default {
type: 'success', type: 'success',
message: '操作成功!' message: '操作成功!'
}) })
this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params})) // this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params}))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
message: '操作成功!' message: '操作成功!'
}) })
// this.$router.push('/customerTransform/index') // this.$router.push('/customerTransform/index')
this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群群发',params})) // this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群群发',params}))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<div class="tips-text"> <div class="tips-text">
<img src="@/assets/guestCustom/tips.png" class="tips-icon" alt /> <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>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
...@@ -201,10 +201,10 @@ export default { ...@@ -201,10 +201,10 @@ export default {
var image = new Image() var image = new Image()
image.src = e.target.result image.src = e.target.result
image.onload = () => { image.onload = () => {
if (image.width > 1440 || image.height > 1080) { // if (image.width > 1440 || image.height > 1080) {
this.$message.error('图片长宽不超过1440x1080') // this.$message.error('图片长宽不超过1440x1080')
return // return
} // }
this.previewList = this.previewList.filter(item => { this.previewList = this.previewList.filter(item => {
return item.attType == ATT_TYPE.TEXT || item.attType == ATT_TYPE.IMAGE 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>
...@@ -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,7 +495,7 @@ export default { ...@@ -398,7 +495,7 @@ 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;
...@@ -411,6 +508,46 @@ export default { ...@@ -411,6 +508,46 @@ export default {
margin-right: 8px; margin-right: 8px;
display: inline-block; 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-detail .gift-item { .gift-detail .gift-item {
margin-right: 80px; margin-right: 80px;
display: flex; display: flex;
......
...@@ -30,7 +30,13 @@ ...@@ -30,7 +30,13 @@
<input type="file" style="opacity: 0" accept=".pdf" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)" /> <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> <el-button icon="el-icon-plus" :size="size" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件</el-button>
</div> </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>
<!-- 选择自定义链接 --> <!-- 选择自定义链接 -->
<!-- <div v-show="materialAddForm.materialType == 2"> <!-- <div v-show="materialAddForm.materialType == 2">
...@@ -76,7 +82,7 @@ ...@@ -76,7 +82,7 @@
: :
</span> </span>
</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> <span class="track-tips track-info">(客户不包括本商户的员工)</span>
</el-form-item> </el-form-item>
<el-form-item prop="tagJson"> <el-form-item prop="tagJson">
...@@ -176,6 +182,7 @@ ...@@ -176,6 +182,7 @@
</div> </div>
</el-form> </el-form>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel> <SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel>
<!-- <pdfReviewDia ref="pdfReviewDia" :pdfName="pdfName" :pdfUrl="pdfUrl" :dialogVisible="dialogPdfVisible"></pdfReviewDia> -->
<GLFooter class="gl-footer"> <GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button> <el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</el-button> <el-button @click="handleCancel" class="btn-cancle">取消</el-button>
...@@ -187,11 +194,13 @@ ...@@ -187,11 +194,13 @@
<script> <script>
import textBox from '@/views/material/components/textBox' import textBox from '@/views/material/components/textBox'
import SelectLabel from '@/views/material/components/selectLable' import SelectLabel from '@/views/material/components/selectLable'
// import pdfReviewDia from './components/pdfReviewDia.vue'
export default { export default {
name: 'addMaterialForm', name: 'addMaterialForm',
components: { components: {
textBox, textBox,
SelectLabel SelectLabel
// pdfReviewDia
}, },
data() { data() {
return { return {
...@@ -205,6 +214,8 @@ export default { ...@@ -205,6 +214,8 @@ export default {
tagging: [], tagging: [],
urlSrc: '', urlSrc: '',
pdfUrl: '', pdfUrl: '',
pdfName: '',
dialogPdfVisible: false,
textBoxContent: '', textBoxContent: '',
materialAddForm: { materialAddForm: {
groupId: '', // 素材组id groupId: '', // 素材组id
...@@ -244,7 +255,6 @@ export default { ...@@ -244,7 +255,6 @@ export default {
}, },
mounted() { mounted() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
console.log(this.routeInfo)
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : '' this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
this.routeInfo.addOrEdit != 1 ? (this.routeInfo.status != 1 ? this.forbidEdit() : '') : '' this.routeInfo.addOrEdit != 1 ? (this.routeInfo.status != 1 ? this.forbidEdit() : '') : ''
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
...@@ -396,6 +406,12 @@ export default { ...@@ -396,6 +406,12 @@ export default {
this.$apis.common.pictureUpload({ file: base64 }).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
this.pdfUrl = res this.pdfUrl = res
this.pdfName = file.name
this.$notify({
title: '成功',
message: '文件上传成功',
type: 'success'
})
} }
}) })
} }
...@@ -428,6 +444,13 @@ export default { ...@@ -428,6 +444,13 @@ export default {
this.$refs.materialAddForm.validate(valid => { this.$refs.materialAddForm.validate(valid => {
if (valid) { if (valid) {
var params = this.getParams() var params = this.getParams()
if (!params.materialUrl) {
this.$message({
message: '素材类型不能为空',
type: 'warning'
})
return
}
params.status = 1 params.status = 1
let material let material
if (params.id) { if (params.id) {
...@@ -471,6 +494,13 @@ export default { ...@@ -471,6 +494,13 @@ export default {
// } // }
// }) // })
var params = this.getParams() var params = this.getParams()
if (!params.materialUrl) {
this.$message({
message: '素材类型不能为空',
type: 'warning'
})
return
}
// status 状态 0 启用 -1 禁用 1 存草稿 // status 状态 0 启用 -1 禁用 1 存草稿
params.status = 0 params.status = 0
// params.isNotifySender = -1 // params.isNotifySender = -1
...@@ -568,6 +598,15 @@ export default { ...@@ -568,6 +598,15 @@ export default {
// 删除上传图片 // 删除上传图片
deleteImg() { deleteImg() {
this.materialAddForm.titleUrl = '' this.materialAddForm.titleUrl = ''
},
// 删除pdf
delPdf() {
this.pdfUrl = ''
this.pdfName = ''
},
openPdfDia() {
this.dialogPdfVisible = true
this.$refs.pdfReviewDia.init()
} }
} }
} }
...@@ -751,7 +790,6 @@ export default { ...@@ -751,7 +790,6 @@ export default {
.pdf-show { .pdf-show {
display: inline-flex; display: inline-flex;
position: relative; position: relative;
width: 109px;
height: 32px; height: 32px;
input { input {
position: absolute; position: absolute;
...@@ -878,4 +916,29 @@ export default { ...@@ -878,4 +916,29 @@ export default {
vertical-align: middle; 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> </style>
<template> <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">
<div class="all-group-word" @click="getList">全部素材组 ({{ groupCounter.length }})</div> <div @click="getList">
<div> <img src="@/assets/material/groupIcon.png" alt="" />
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">素材组</el-button> 全部素材组 ({{ 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>
</div> </div>
<ul> <ul v-show="groupVisible" :style="{ height: groupHeight - 110 + 'px' }">
<li v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''" :key="index" @click="handleGroup(item, index)"> <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" /> <img src="@/assets/material/file.png" alt="" style="vertical-align: middle" />
<div class="group-name">{{ item.materialGroupName }}</div> <div class="group-name">{{ item.materialGroupName }}</div>
...@@ -27,7 +32,7 @@ ...@@ -27,7 +32,7 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
export default { export default {
name: 'materialGroup', name: 'materialGroup',
props: { eventBus: Object }, props: { eventBus: Object, groupHeight: Number },
data() { data() {
return { return {
// 素材组数量 // 素材组数量
...@@ -38,7 +43,8 @@ export default { ...@@ -38,7 +43,8 @@ export default {
orderValue: '', orderValue: '',
isDefault: '' // 默认素材组 0 是 -1 否(进入页面如果素材组数量为0,就会创建默认素材组,默认素材组不可删除) isDefault: '' // 默认素材组 0 是 -1 否(进入页面如果素材组数量为0,就会创建默认素材组,默认素材组不可删除)
}, },
currentIndex: null currentIndex: null,
groupVisible: true
} }
}, },
mounted() { mounted() {
...@@ -165,6 +171,7 @@ export default { ...@@ -165,6 +171,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.el-popover { .el-popover {
min-width: 50px; min-width: 50px;
max-width: 150px;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
} }
...@@ -172,18 +179,23 @@ export default { ...@@ -172,18 +179,23 @@ export default {
.material-group { .material-group {
.all-group { .all-group {
font-size: 16px; font-size: 16px;
font-weight: 600; height: 44px;
padding: 24px 16px 8px 16px; line-height: 44px;
padding: 0 17px 0 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.el-button { cursor: pointer;
margin-top: -13px; img {
width: 24px;
height: 24px;
vertical-align: middle;
} }
&-word { i {
cursor: pointer; color: #999999;
} }
} }
ul { ul {
overflow: auto;
li { li {
cursor: pointer; cursor: pointer;
text-align: left; text-align: left;
...@@ -195,7 +207,7 @@ export default { ...@@ -195,7 +207,7 @@ export default {
font-size: 16px; font-size: 16px;
padding-top: 6px; padding-top: 6px;
position: absolute; position: absolute;
right: 16px; right: 0px;
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
...@@ -210,17 +222,20 @@ ul { ...@@ -210,17 +222,20 @@ ul {
list-style: none; list-style: none;
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;
margin: 0 10px;
&:nth-child(-n + 2) { &:nth-child(-n + 2) {
padding-bottom: 10px; padding-bottom: 10px;
} }
&:hover { &:hover {
color: #5850ff; // color: #5850ff;
background-color: #ebeaff; background-color: #ebeaff;
} }
} }
} }
.add_btn { .add_btn {
color: #5850ff; color: #5850ff;
border-color: #5850ff;
margin: 20px 0 12px 16px;
} }
.group-name { .group-name {
display: inline-flex; 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 @@ ...@@ -7,11 +7,24 @@
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable ref="readPerDetailRef" @setTableFinishFun="setTableFinishFun" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"> <GLTable ref="readPerDetailRef" @setTableFinishFun="setTableFinishFun" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="departName" slot-scope="scope"> <div slot="departName" slot-scope="scope" style="display:flex">
<el-tag type="info" v-for="item in scope.scope.departName" effect="plain" :key="item"> <div v-for="(item, index) in scope.scope.departName" :key="index">
<i class="el-icon-user-solid" style="color: #75acff"></i> <el-tag type="info" :size="size" effect="plain" v-if="index < 3" style="margin-right:4px">
{{ item }} <i class="el-icon-user-solid" style="color: #75acff"></i>
</el-tag> {{ 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> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -76,7 +89,8 @@ export default { ...@@ -76,7 +89,8 @@ export default {
{ {
label: '所属企微成员', label: '所属企微成员',
prop: 'departName', prop: 'departName',
addHtml: 'departName' addHtml: 'departName',
width: 350
}, },
{ {
label: '阅读次数', label: '阅读次数',
...@@ -111,10 +125,17 @@ export default { ...@@ -111,10 +125,17 @@ export default {
}, },
setTableFinishFun() { 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> </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 { ...@@ -149,7 +149,8 @@ export default {
if (this.selectNum > 3) { if (this.selectNum > 3) {
this.$message({ this.$message({
message: '最多选择三个标签', message: '最多选择三个标签',
type: 'warning' type: 'warning',
customClass: 'dialog-tips'
}) })
return return
} }
......
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
this.$apis.material.sendDetailPage(params).then(res => { this.$apis.material.sendDetailPage(params).then(res => {
this.sendStaffTableData = res this.sendStaffTableData = res
// 计算表格高度,数据10条以下自适应,10条以上固定高度,表格内滚动,无数据调用方法计算高度 // 计算表格高度,数据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 = '') // res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')
}) })
} }
......
...@@ -27,13 +27,13 @@ export default { ...@@ -27,13 +27,13 @@ export default {
this.editor.config.menuTooltipPosition = 'down' this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = 400 this.editor.config.height = 400
this.editor.config.width = 500 this.editor.config.width = 500
this.editor.config.uploadVideoServer = '/api/upload-video' this.editor.config.excludeMenus = ['code']
this.editor.config.excludeMenus = ['code', 'video']
this.editor.config.onchange = html => { this.editor.config.onchange = html => {
// console.log(html); // console.log(html);
this.content = html // 绑定当前逐渐地值 this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中 this.$emit('change', this.content) // 将内容同步到父组件中
} }
// 上传图片
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()
...@@ -59,6 +59,32 @@ export default { ...@@ -59,6 +59,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.config.onchangeTimeout = 5000
this.editor.create() this.editor.create()
}, },
......
...@@ -24,7 +24,12 @@ ...@@ -24,7 +24,12 @@
</div> </div>
<div class="materialDetail-desc-item" v-if="detailInfo.materialType == 1"> <div class="materialDetail-desc-item" v-if="detailInfo.materialType == 1">
<div class="materialDetail-item-name">素材地址:</div> <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> <span class="item-name-info">(备注:直接复制素材地址发送给客户无法接受通知提醒)</span>
</div> </div>
<div class="materialDetail-desc-row"> <div class="materialDetail-desc-row">
...@@ -155,7 +160,7 @@ ...@@ -155,7 +160,7 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<GLFooter> <GLFooter class="gl-footer">
<el-button @click="goback" type="primary">返回</el-button> <el-button @click="goback" type="primary">返回</el-button>
</GLFooter> </GLFooter>
</div> </div>
...@@ -220,14 +225,17 @@ export default { ...@@ -220,14 +225,17 @@ export default {
this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl) this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl)
let html = this.detailInfo.materialUrl let html = this.detailInfo.materialUrl
let imgHtml = html.match(/<img.*?(?:>|\/>)/g) let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
// for (let i = 0; i < imgHtml.length; i++) { let videoHtml = html.match(/<video.*?(?:>|\/>)/g)
// html = html.replace(imgHtml[i], '')
// }
if (imgHtml) { if (imgHtml) {
for (let i = 0; i < imgHtml.length; i++) { for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '') html = html.replace(imgHtml[i], '')
} }
} }
if (videoHtml) {
for (let i = 0; i < videoHtml.length; i++) {
html = html.replace(videoHtml[i], '')
}
}
this.htmlContent = html this.htmlContent = html
if (imgHtml) { if (imgHtml) {
this.imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"') this.imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
...@@ -266,6 +274,18 @@ export default { ...@@ -266,6 +274,18 @@ export default {
}, },
goback() { goback() {
this.$router.go(-1) 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 +342,18 @@ export default { ...@@ -322,16 +342,18 @@ export default {
flex: 1; flex: 1;
.content-item-title { .content-item-title {
color: #333333; color: #333333;
max-width: 210px; font-family: PingFangSC-Regular, PingFang SC;
max-width: 185px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap;
line-height: 20px; line-height: 20px;
margin-bottom: 6px; margin-bottom: 6px;
} }
.content-item-desc { .content-item-desc {
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
max-width: 210px; max-width: 185px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
...@@ -459,6 +481,7 @@ export default { ...@@ -459,6 +481,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
margin-left: 10px;
} }
.phone-view { .phone-view {
height: 600px; height: 600px;
...@@ -481,15 +504,18 @@ export default { ...@@ -481,15 +504,18 @@ export default {
padding: 8px; padding: 8px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 13px; border-radius: 13px;
box-shadow: -2px 4px 3px #ccc;
&-title { &-title {
width: 100%; width: 100%;
height: 30px; height: 35px;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
color: #333; color: #333;
} }
&-word { &-word {
color: #666; color: #666;
line-height: 20px;
/deep/img {
width: 100% !important;
}
} }
} }
} }
...@@ -509,4 +535,17 @@ p { ...@@ -509,4 +535,17 @@ p {
.tag-show { .tag-show {
margin-bottom: -10px; 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> </style>
...@@ -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">
...@@ -479,8 +480,8 @@ export default { ...@@ -479,8 +480,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;
......
...@@ -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,
...@@ -484,6 +514,14 @@ export default { ...@@ -484,6 +514,14 @@ 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',
formatter: cellValue => { formatter: cellValue => {
...@@ -534,6 +572,10 @@ export default { ...@@ -534,6 +572,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 +871,8 @@ export default { ...@@ -829,7 +871,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,10 @@ export default { ...@@ -135,6 +139,10 @@ export default {
{ {
label: '发货地址', label: '发货地址',
name: 'shipAddress' name: 'shipAddress'
},
{
label: '其他信息',
name: ''
} }
], ],
// 售后信息 // 售后信息
...@@ -177,6 +185,10 @@ export default { ...@@ -177,6 +185,10 @@ export default {
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, { confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' } { confId: '2', confName: '退款不退货' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
] ]
} }
} }
...@@ -212,12 +224,16 @@ export default { ...@@ -212,12 +224,16 @@ export default {
getInfo() { getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => { this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res this.detailForm = res
console.log(this.detailForm)
this.orderRefund = res.orderRefund || null this.orderRefund = res.orderRefund || null
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss') this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) { if (this.orderRefund) {
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)
} }
......
...@@ -198,8 +198,7 @@ ...@@ -198,8 +198,7 @@
</el-radio-group> </el-radio-group>
</template> </template>
<template slot="serviceDescHtml"> <template slot="serviceDescHtml">
<el-input type="textarea" v-model="editForm.serviceDesc" style="width: 320px" placeholder="请输入商品描述" <el-input type="textarea" v-model="editForm.serviceDesc" style="width: 320px" placeholder="请输入商品描述" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="30" :disabled="isDisabled" />
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="30" :disabled="isDisabled" />
</template> </template>
<div slot="selectMerchant" slot-scope="scope" class="select-merchant"> <div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<div> <div>
...@@ -516,7 +515,7 @@ export default { ...@@ -516,7 +515,7 @@ export default {
// 带货是否选择全部商户(0:否,1:是) // 带货是否选择全部商户(0:否,1:是)
takeAllMerchant: '1', takeAllMerchant: '1',
supplyMerchantList: [], supplyMerchantList: [],
serviceDesc:'' serviceDesc: ''
}, },
isEdit: true, isEdit: true,
labelWidth: '144px', labelWidth: '144px',
......
<!-- 浏览明细 -->
<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: 'createdDate',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
}
}
},
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>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<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">
<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" :clearable="false"></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' }],
...@@ -499,7 +499,7 @@ export default { ...@@ -499,7 +499,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,7 +785,7 @@ export default { ...@@ -785,7 +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})) // this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'编辑sop事件',params}))
if (res.code == '0') { if (res.code == '0') {
this.cancelJump() this.cancelJump()
} }
...@@ -798,7 +798,7 @@ export default { ...@@ -798,7 +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})) // 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!