Commit e9aef4fd by 胡悦

Merge branch 'v2.7.0' into huy_dev_v2.7.0

2 parents 9ee31c59 1f5d9c98
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;
}
......@@ -602,6 +602,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()
......
......@@ -82,6 +82,7 @@ export default {
this.createStyle()
// 每次光标变化的时候,保存 range
document.addEventListener('selectionchange', this.selectHandler)
this.$refs.wTextareaContent.focus()
},
beforeDestroy() {
// 卸载事件
......
......@@ -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)
......
......@@ -70,10 +70,10 @@
</div>
<glsx-dialog class="refund-fill-boxss" :width="'576px'" title="提示" :show-close="true" :isVisible="isShow" @confirmDialog="isShow = false" @closeDialog="isShow = false" :noCancel="true">
<div class="dialog-refund">
<img class="img" src="../../images/warn.png" />
<div>该会员在升级黑卡会员期间,已购买过生活权益</div>
<div style="color: #FF4D4F;padding: 6px 0;">(时间:{{orderDate}} 金额:{{orderPrice}}元)</div>
<div>暂不支持退款</div>
<img class="img" src="../../images/warn.png" />
<div>该会员在升级黑卡会员期间,已购买过生活权益</div>
<div style="color: #FF4D4F;padding: 6px 0;">(时间:{{orderDate}} 金额:{{orderPrice}}元)</div>
<div>暂不支持退款</div>
</div>
</glsx-dialog>
<glsx-dialog class="refund-fill-box" :width="'720px'" title="退款确认" :isVisible="refundVisible" @confirmDialog="refundConfirmDialog" @closeDialog="refundVisible = false" :isShowCloseBtn="true">
......@@ -88,13 +88,13 @@
<script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png'
import { getOrderListApi, orderExportApi, orderRefund,ordeRefundApi } from '@/api/modules/order'
import { getOrderListApi, orderExportApi, orderRefund, ordeRefundApi } from '@/api/modules/order'
export default {
data() {
return {
isShow:false,
orderPrice:'',
orderDate:'',
isShow: false,
orderPrice: '',
orderDate: '',
orderCode: '',
refund: '',
refundVisible: false,
......@@ -151,7 +151,13 @@ export default {
name: 'merchantName',
type: 'input',
maxlength: 100
}
},
{
label: '推荐人',
name: 'shareStaffName',
type: 'input',
maxlength: 100
},
],
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1,
......@@ -180,7 +186,7 @@ export default {
fn: '退款'
},
condition: row => {
if(row.packageType == 2) {
if (row.packageType == 2) {
return row.refundFlag == 1 && row.show
} else {
return row.refundFlag == 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')
......@@ -366,21 +373,21 @@ export default {
})
},
ordeRefund(orderCode) {
ordeRefundApi({orderCode}).then(res => {
if(res != null) {
this.orderDate = res.orderDate
this.orderPrice = res.orderPrice
this.isShow = true
} else {
this.refundVisible = true
}
})
ordeRefundApi({ orderCode }).then(res => {
if (res != null) {
this.orderDate = res.orderDate
this.orderPrice = res.orderPrice
this.isShow = true
} else {
this.refundVisible = true
}
})
},
handleRefund(data) {
this.orderCode = data.orderCode
this.refund = ''
// this.refundVisible = !this.refundVisible
if(data.packageType == 2) {
if (data.packageType == 2) {
this.ordeRefund(data.orderCode)
} else {
this.refundVisible = true
......@@ -433,12 +440,12 @@ export default {
//接收到的数据为空
this.$refs.memberOrderRef.data.length ? (this.$refs.memberOrderRef.tableHeightValues = '') : this.$refs.memberOrderRef.setTableHeightFun()
let arr = this.$refs.memberOrderRef.data
if(arr.length > 0) {
if (arr.length > 0) {
arr.map(e => {
if(e.refundFlag == 1 && e.packageType == 2) {
if (e.refundFlag == 1 && e.packageType == 2) {
let time = new Date(`${e.createDate}`)
let timer = new Date()
if(timer.getTime() < time.getTime() + 604800000) {
if (timer.getTime() < time.getTime() + 604800000) {
e.show = true
}
}
......@@ -532,7 +539,7 @@ export default {
padding-bottom: 12px;
}
}
::v-deep .el-dialog__footer {
::v-deep .el-dialog__footer {
text-align: center;
}
}
......
......@@ -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')
})
},
......
......@@ -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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!