Commit 2169102b by 王志慧

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

2 parents 5ecd84db 14d5b304
import { http, http_common, http2 } from '@/main'
import { http, http_common, http2, http_merchant } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
......@@ -139,4 +139,15 @@ const getStaffFollowerListApi = params => {
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, 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 }
......@@ -189,7 +189,7 @@ html {
}
.marketing .el-table .cell {
line-height: 16px;
line-height: 17px;
padding: 0 16px !important;
}
......@@ -364,7 +364,7 @@ html {
.marketing .edit-tips {
line-height: 20px;
font-size: 14px;
font-size: 12px;
color: #999999;
}
......@@ -608,6 +608,46 @@ html {
z-index: 4000 !important;
}
.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;
......

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
......@@ -18,7 +18,7 @@
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
<span v-if="item.append" slot="suffix">{{ item.append }}</span>
</el-input>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
......@@ -76,12 +76,12 @@
<slot :name="item.suffixSlot" :scope="item"></slot>
</template>
<!-- 图文编辑器 -->
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" @change="e => handleTextBoxChange(e, item)" @forbid="forbidEdit"></textBox>
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" @change="e => handleTextBoxChange(e, item)" @focus="handleTextBoxFocus(item)"></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>
<el-button class="m-l-10" v-show="!item.isDisabled" @click="handleSelectMap(item)" type="primary">选择地址</el-button>
</div>
</el-form-item>
</template>
......@@ -265,6 +265,9 @@ export default {
handleTextBoxChange(val, targetItem) {
this.formObj[targetItem.name] = val
},
handleTextBoxFocus(targetItem) {
this.$refs[targetItem.name + 'TextBox'][0].setEdit(this.formObj[targetItem.name])
},
// 禁用富文本
forbidEdit() {
this.$refs.textBox.forbidEdit()
......
......@@ -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_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
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,7 +462,7 @@ export default {
type: 'success',
message: '操作成功!'
})
// this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params}))
this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params}))
} else {
this.$message({
type: 'error',
......
......@@ -336,7 +336,7 @@ export default {
message: '操作成功!'
})
// this.$router.push('/customerTransform/index')
// this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群群发',params}))
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() {
// 卸载事件
......
<template>
<div>
<el-input @blur.stop="formatPhone" type="textarea" v-model="phone" :placeholder="placeholder"></el-input>
<el-input @blur.stop="formatPhone" type="textarea" v-model="phones" :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">
<div style="width: 672px;">
<div :class="['tel-item', !item.valid ? 'valid-tel' : receiveType == 1 ? 'realTel' : 'realNum']" v-for="(item, index) in phoneLists" :key="index">
{{ item.tel }}
<i style="cursor:pointer" class="el-icon-close" @click="delPhone(item.tel)"></i>
</div>
......@@ -22,7 +22,7 @@ export default {
receiveType: {
type: String,
require: true,
default: ''
default: '1'
},
placeholder: {
type: String,
......@@ -31,28 +31,38 @@ export default {
isTip: {
type: String,
default: ''
},
phones: {
type: String,
default: ''
},
phoneLists: {
type: Array
}
},
data() {
return {
phone: '',
phoneList: []
}
},
// data() {
// return {
// phones: '',
// phoneLists: []
// }
// },
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
let phones = '\n' + this.phones + '\n'
phones = phones.replace(/[\n]/g, '\n\n')
phones = phones.replace(new RegExp('[\n]' + val + '[\n]', 'g'), '\n')
phones = phones.replace(/[\n]+/g, '\n')
phones = phones.replace(/^[\n]+/, '')
this.phones = phones
this.formatPhone()
},
formatPhone() {
let phoneList = this.phone.split('\n')
phoneList = [...new Set(phoneList)]
// let phoneList = this.phone.split(/[\n|\s|,|,]/)
this.$nextTick(() => {
setTimeout(() => {
console.log('phones',this.phones);
let phoneLists = this.phones.split('\n')
phoneLists = [...new Set(phoneLists)]
// let phoneLists = this.phones.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}$/
......@@ -60,15 +70,18 @@ export default {
reg = /^[0-9a-zA-Z]{6}$/
}
let arr = []
phoneList.forEach(item => {
phoneLists.forEach(item => {
arr.push({
tel: item,
valid: reg.test(item)
})
})
this.phoneList = arr.filter(item => item.tel)
this.$emit('changePhoneList', this.phoneList)
}
this.phoneLists = arr.filter(item => item.tel)
console.log('phoneLists',this.phoneLists);
this.$emit('changePhoneList', this.phoneLists)
},100)
})
},
}
}
</script>
......@@ -98,4 +111,7 @@ export default {
.realNum {
width: 90px;
}
.el-textarea {
width: 632px;
}
</style>
......@@ -79,6 +79,12 @@
</el-tag>
</div>
</div>
<div class="approval" slot="cardHolder">
<el-radio :disabled="routeInfo.addOrEdit == 'edit'" v-model="editForm.cardHolder" :label="1">否</el-radio>
<el-radio :disabled="routeInfo.addOrEdit == 'edit'" v-model="editForm.cardHolder" :label="2">是</el-radio>
<p class="cardHolder-tip">(根据手机号将礼包中的优惠券直接发放到小程序对应账户的卡包中)</p>
<phoneArea :phones="phones" :phoneLists="phoneLists" ref="phoneArea" placeholder="请输入领取手机号,多个手机号以换行隔开" />
</div>
</glsx-combi-form>
<div v-if="routeInfo.addOrEdit != 'add'" class="approval_note_container">
<div class="line"></div>
......@@ -107,11 +113,16 @@
import selectStaffDialog from './selectStaffDialog.vue'
import selectGiftDialog from './selectGiftDialog.vue'
import * as dayjs from 'dayjs'
import phoneArea from './components/phone-area'
export default {
name: 'editGift',
data() {
return {
phones:'',
phoneLists:[],
arrs:'18952120000,18952120001,18952120002,18952120003,18952120004,18952120005,18952120006,18952120007,18952120008,18952120009,',
phone: '',
arr:[],
isLoaded: true,
loading:false,
phoneList: [],
......@@ -150,7 +161,8 @@ export default {
couponList: [],
stock: 1,
approveFlag: 2,
receiveRule: 1
receiveRule: 1,
cardHolder: 1,
},
totalEstimatedCost: '',
orderShow: ['service', 'cash', 'discount', 'exchange'],
......@@ -208,7 +220,8 @@ export default {
}
],
approveFlag: [{ required: true, message: '请选择审批要求', trigger: 'change' }],
receiveRule: [{ required: true, message: '请选择领取规则设置', trigger: 'change' }]
receiveRule: [{ required: true, message: '请选择领取规则设置', trigger: 'change' }],
cardHolder: [{ required: true, message: '', trigger: 'change' }]
// receiveDetails: [
// { required: true, message: '请输入领取条件', trigger: 'change' },
// {
......@@ -259,6 +272,15 @@ export default {
addHtml: 'couponListBlock'
},
{
label: '发放到小程序卡包',
name: 'cardHolder',
isDisabled: false,
addHtml: 'cardHolder',
// style: {
// 'margin-left': '10px'
// }
},
{
label: '库存数量',
name: 'stock',
addHtml: 'stockNumInput'
......@@ -266,7 +288,8 @@ export default {
{
label: '审批要求',
name: 'approveFlag',
addHtml: 'approvalSlot'
addHtml: 'approvalSlot',
isHide: false,
},
{
label: '领取规则设置',
......@@ -275,6 +298,7 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
isHide: false,
optionList: [
{
confId: 1,
......@@ -328,7 +352,8 @@ export default {
{
label: '发放员工',
name: 'staffList',
addHtml: 'selectStaffBtn'
addHtml: 'selectStaffBtn',
isHide: false,
},
{
label: '',
......@@ -358,7 +383,8 @@ export default {
},
components: {
selectStaffDialog,
selectGiftDialog
selectGiftDialog,
phoneArea
},
watch: {
......@@ -377,7 +403,16 @@ export default {
handler(val) {
this.isChangePeople = this.judgeAddOrDel(val, this.currentPeople, 'staffUUID')
}
}
},
'editForm.cardHolder'(newValue) {
console.log('newValue',newValue);
let idx = this.editFormData.findIndex(item => item.name == 'staffList')
let idxx = this.editFormData.findIndex(item => item.name == 'approveFlag')
let idxxx = this.editFormData.findIndex(item => item.name == 'receiveRule')
this.editFormData[idx].isHide = newValue == 2
this.editFormData[idxx].isHide = newValue == 2
this.editFormData[idxxx].isHide = newValue == 2
},
},
computed: {
placeholder() {
......@@ -460,6 +495,11 @@ export default {
this.phone = res.data.receiveDetails.replaceAll(',', '\n')
this.formatPhone()
}
if(this.arrs) {
this.editForm.cardHolder = 1
this.phones = this.arrs.replaceAll(',','\n')
this.$refs.phoneArea.formatPhone()
}
this.recoveryCoupon()
this.recoveryTotalPrice()
this.hasStaffBlock(false)
......@@ -595,6 +635,11 @@ export default {
},
handleConfirm() {
if(this.arrs) {
setTimeout(() => {
console.log('phoneLists',this.$refs.phoneArea.phoneLists);
},100)
}
let validItem = this.phoneList.find(item => !item.valid)
if (validItem && validItem.tel) {
return this.$message.error(`${this.receiveWay == 1 ? '手机号' : '车架号'}${validItem.tel}格式错误,请修改!`)
......@@ -933,4 +978,10 @@ export default {
}
}
}
.cardHolder-tip {
display: inline;
font-size: 12px;
color: #999;
margin-left: -27px;
}
</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;
}
}
......
......@@ -499,6 +499,7 @@ export default {
.p-b-12 {
margin-bottom: 14px;
font-weight: 500;
padding-left: 10px;
color: #333333;
}
.approve-status {
......@@ -548,27 +549,31 @@ export default {
}
}
.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;
}
.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>
......@@ -237,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' }
......@@ -286,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
}
......@@ -303,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 => {
......@@ -446,7 +464,7 @@ export default {
var params = this.getParams()
if (!params.materialUrl) {
this.$message({
message: '素材类型不能为空',
message: '素材内容不能为空',
type: 'warning'
})
return
......@@ -479,41 +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: '素材类型不能为空',
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'
......
......@@ -12,17 +12,26 @@
</div>
</div>
<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)">
<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>
<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>
......@@ -169,6 +178,9 @@ export default {
</script>
<style lang="scss" scoped>
.status-words {
margin-left: 5px;
}
.el-popover {
min-width: 50px;
max-width: 150px;
......@@ -196,19 +208,18 @@ export default {
}
ul {
overflow: auto;
li {
.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: 0px;
transform: rotate(90deg);
.more-icon {
vertical-align: middle;
padding-top: 3px;
}
}
}
......
......@@ -33,8 +33,11 @@ export default {
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
......@@ -60,7 +63,7 @@ export default {
}
}
// 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) {
this.editor.config.customUploadVideo = function (resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
......
<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>
......@@ -216,12 +216,13 @@ 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)
......
......@@ -151,7 +151,13 @@ export default {
name: 'merchantName',
type: 'input',
maxlength: 100
}
},
{
label: '推荐人',
name: 'shareStaffName',
type: 'input',
maxlength: 100
},
],
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1,
......@@ -214,7 +220,8 @@ export default {
},
{
label: '价格/元',
prop: 'originalPrice'
prop: 'originalPrice',
width: '100'
},
{
label: '实收金额/元',
......@@ -224,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
}
......@@ -283,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')
......
......@@ -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>
......@@ -494,6 +501,14 @@ export default {
}
},
{
label: '手机号',
prop: 'customerPhone',
width: 130,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '车架号',
prop: 'vinNo',
width: 120,
......@@ -510,10 +525,15 @@ 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',
......@@ -524,6 +544,7 @@ export default {
{
label: '支付总价',
prop: 'payPrice',
width: '120',
formatter: cellValue => {
return cellValue.payPrice || '0'
}
......
......@@ -105,7 +105,7 @@ export default {
},
{
label: '推荐人类型',
name: ''
name: 'shareStaffTypeName'
},
{
label: '车架号',
......@@ -142,7 +142,9 @@ export default {
},
{
label: '其他信息',
name: ''
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second', 'Third']
}
],
// 售后信息
......@@ -224,7 +226,6 @@ export default {
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
console.log(this.detailForm)
this.orderRefund = res.orderRefund || null
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) {
......@@ -232,7 +233,7 @@ export default {
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 : '-'
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)
......@@ -245,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')
})
},
......
......@@ -198,7 +198,7 @@
</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" />
<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>
......
......@@ -355,7 +355,7 @@ export default {
},
// 删除
del(row) {
this.secondConfirm('删除', '确定删除此活动?', 'proManage', 'deleteGoodsApi', { id: row.id })
this.secondConfirm('删除', '确定删除此商品?', 'proManage', 'deleteGoodsApi', { id: row.id })
},
handleShare(row) {
this.$apis.proManage.getProShareApi({ id: row.id }).then(res => {
......
......@@ -437,7 +437,7 @@ export default {
},
// 删除
del(row) {
this.secondConfirm('删除', '确定删除此活动?', 'proManage', 'deleteGoodsApi', { id: row.id })
this.secondConfirm('删除', '确定删除此商品?', 'proManage', 'deleteGoodsApi', { id: row.id })
},
dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate()
......
......@@ -99,11 +99,8 @@ export default {
},
{
label: '浏览时间',
prop: 'createdDate',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
prop: 'lastBrowseDate',
width: '180'
}
]
}
......
......@@ -153,13 +153,10 @@ export default {
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2'
},
listeners: {
click: this.handleShare
}
},
}
],
// 表格
getListApi: this.$apis.seckillActivity.getCrowdfundListApi,
......
......@@ -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="false"></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>
......@@ -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
......
......@@ -785,7 +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}))
this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'编辑sop事件',params}))
if (res.code == '0') {
this.cancelJump()
}
......@@ -798,7 +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}))
this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'创建sop事件',params}))
if (res.code == '0') {
this.cancelJump()
}
......
File mode changed
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!