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 defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => { const getMerchantGoodsListApi = params => {
...@@ -139,4 +139,15 @@ const getStaffFollowerListApi = 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 { ...@@ -189,7 +189,7 @@ html {
} }
.marketing .el-table .cell { .marketing .el-table .cell {
line-height: 16px; line-height: 17px;
padding: 0 16px !important; padding: 0 16px !important;
} }
...@@ -602,6 +602,46 @@ html { ...@@ -602,6 +602,46 @@ html {
z-index: 4000 !important; 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 { .loadingClass {
.el-icon-loading { .el-icon-loading {
font-size: 22px; 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 @@ ...@@ -18,7 +18,7 @@
<div v-else-if="item.type === 'input'"> <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)"> <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.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> </el-input>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
...@@ -76,12 +76,12 @@ ...@@ -76,12 +76,12 @@
<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> <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"> <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> <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-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> </div>
</el-form-item> </el-form-item>
</template> </template>
...@@ -265,6 +265,9 @@ export default { ...@@ -265,6 +265,9 @@ export default {
handleTextBoxChange(val, targetItem) { handleTextBoxChange(val, targetItem) {
this.formObj[targetItem.name] = val this.formObj[targetItem.name] = val
}, },
handleTextBoxFocus(targetItem) {
this.$refs[targetItem.name + 'TextBox'][0].setEdit(this.formObj[targetItem.name])
},
// 禁用富文本 // 禁用富文本
forbidEdit() { forbidEdit() {
this.$refs.textBox.forbidEdit() this.$refs.textBox.forbidEdit()
......
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
this.createStyle() this.createStyle()
// 每次光标变化的时候,保存 range // 每次光标变化的时候,保存 range
document.addEventListener('selectionchange', this.selectHandler) document.addEventListener('selectionchange', this.selectHandler)
this.$refs.wTextareaContent.focus()
}, },
beforeDestroy() { beforeDestroy() {
// 卸载事件 // 卸载事件
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span v-if="editForm.receiveRule == 2 && editForm.receiveWay">{{ `${editForm.receiveWay == '1' ? '手机号:' : '车架号后6位:'}${editForm.receiveDetails}` }}</span> <span v-if="editForm.receiveRule == 2 && editForm.receiveWay">{{ `${editForm.receiveWay == '1' ? '手机号:' : '车架号后6位:'}${editForm.receiveDetails}` }}</span>
<span v-if="editForm.receiveRule == 1">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:</span> <span v-if="editForm.receiveRule == 1">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:</span>
<div v-if="editForm.receiveRule == 1" class="phone-wrap"> <div v-if="editForm.receiveRule == 1" class="phone-wrap">
<span :class="['phone',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> </div>
<div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0"> <div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
...@@ -261,7 +261,8 @@ export default { ...@@ -261,7 +261,8 @@ export default {
handleCancel() { handleCancel() {
this.$router.push({ this.$router.push({
path: '/giftBag/index' path: '/giftBag/index',
query: { type: this.routeInfo.type }
}) })
} }
} }
...@@ -343,10 +344,10 @@ export default { ...@@ -343,10 +344,10 @@ export default {
display: inline-block; display: inline-block;
margin: 5px 16px 5px 0; margin: 5px 16px 5px 0;
} }
.realTel{ .realTel {
width: 120px; width: 120px;
} }
.realNum{ .realNum {
width: 80px; width: 80px;
} }
} }
......
...@@ -499,6 +499,7 @@ export default { ...@@ -499,6 +499,7 @@ export default {
.p-b-12 { .p-b-12 {
margin-bottom: 14px; margin-bottom: 14px;
font-weight: 500; font-weight: 500;
padding-left: 10px;
color: #333333; color: #333333;
} }
.approve-status { .approve-status {
...@@ -548,15 +549,18 @@ export default { ...@@ -548,15 +549,18 @@ export default {
} }
} }
.gift-detail .gift-item { .gift-detail {
padding:0 200px 0 10px;
.gift-item {
margin-right: 80px; margin-right: 80px;
display: flex; display: flex;
align-items: center; align-items: center;
color: #333333; color: #333333;
width: 400px;
img { img {
height: 23px; height: 23px;
width: 58px; width: 58px;
margin-right: 23px; margin-right: 10px;
} }
.gift-coupon-name { .gift-coupon-name {
display: inline-block; display: inline-block;
...@@ -570,6 +574,7 @@ export default { ...@@ -570,6 +574,7 @@ export default {
background-color: #eeeded; background-color: #eeeded;
margin-right: 7px; margin-right: 7px;
} }
}
} }
.gift-detail .gift-item:last-child { .gift-detail .gift-item:last-child {
margin-right: 0; margin-right: 0;
......
...@@ -28,13 +28,16 @@ export default { ...@@ -28,13 +28,16 @@ export default {
receivedGiftList receivedGiftList
}, },
created() { created() {
this.activeName = sessionStorage.getItem('GIFTNAME') ? sessionStorage.getItem('GIFTNAME') : 'giftList' // this.activeName = sessionStorage.getItem('GIFTNAME') ? sessionStorage.getItem('GIFTNAME') : 'giftList'
if (this.$route.query.type == 'received') {
this.activeName = 'receivedGiftList'
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
handleTabClick() { handleTabClick() {
sessionStorage.setItem('GIFTNAME', this.activeName) this.$router.push({ path: this.$route.path, query: { type: this.activeName == 'receivedGiftList' ? 'received' : 'gift' } })
} }
} }
} }
......
...@@ -22,14 +22,18 @@ ...@@ -22,14 +22,18 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="directionalGiftName" slot-scope="scope"> <span slot="directionalGiftName" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">{{ scope.scope.directionalGiftName }}</el-button> <el-tooltip effect="dark" :content="scope.scope.directionalGiftName" placement="top-start">
<p class="gift-name" @click="handleDetail(scope.scope)">
{{ scope.scope.directionalGiftName }}
</p>
</el-tooltip>
<span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span> <span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span>
<el-tooltip class="item" effect="dark" :content="scope.scope.cancelReason" placement="top-start"> <el-tooltip effect="dark" :content="scope.scope.cancelReason" placement="top-start">
<p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p> <p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p>
</el-tooltip> </el-tooltip>
</span> </span>
<div slot="giftInfo" slot-scope="scope"> <div slot="giftInfo" slot-scope="scope">
<GLTable ref="giftListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="giftParams" :tableData="scope.scope | filterTable" @setTableFinishFun="setGiftTableFinishFun"></GLTable> <GLTable class="secondTable" ref="giftListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="giftParams" :tableData="scope.scope | filterTable" @setTableFinishFun="setGiftTableFinishFun"></GLTable>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button :disabled="scope.scope.receiveStatus == 2" type="text" @click="handleCancel(scope.scope)">作废</el-button> <el-button :disabled="scope.scope.receiveStatus == 2" type="text" @click="handleCancel(scope.scope)">作废</el-button>
...@@ -196,12 +200,13 @@ export default { ...@@ -196,12 +200,13 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '礼包明细', label: '礼包明细',
prop: 'couponName' prop: 'couponName',
width: 200
}, },
{ {
label: '数量', label: '数量',
name: 'couponAmount', name: 'couponAmount',
width: '100px', width: 150,
formatter: cellValue => { formatter: cellValue => {
return 'X' + cellValue.couponAmount return 'X' + cellValue.couponAmount
} }
...@@ -209,6 +214,7 @@ export default { ...@@ -209,6 +214,7 @@ export default {
{ {
label: '已核销/次', label: '已核销/次',
prop: 'anticipatedCost ', prop: 'anticipatedCost ',
width: 150,
formatter: cellValue => { formatter: cellValue => {
return 'X' + cellValue.delet return 'X' + cellValue.delet
} }
...@@ -216,6 +222,7 @@ export default { ...@@ -216,6 +222,7 @@ export default {
{ {
label: '可使用/次', label: '可使用/次',
prop: 'getAmount', prop: 'getAmount',
width: 150,
formatter: cellValue => { formatter: cellValue => {
if (cellValue.residueCouponAmount == -1) { if (cellValue.residueCouponAmount == -1) {
return '不限次数' return '不限次数'
...@@ -369,7 +376,8 @@ export default { ...@@ -369,7 +376,8 @@ export default {
this.$router.push({ this.$router.push({
path: '/giftBag/giftDetail', path: '/giftBag/giftDetail',
query: { query: {
id: row.directionalGiftId id: row.directionalGiftId,
type: 'received'
} }
}) })
}, },
...@@ -513,6 +521,18 @@ export default { ...@@ -513,6 +521,18 @@ export default {
.marketing /deep/ .el-table th div { .marketing /deep/ .el-table th div {
line-height: normal !important; line-height: normal !important;
} }
.secondTable {
padding-left: 10px;
}
.gift-name {
color: #5850ff;
margin: 0;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.void-label { .void-label {
width: 44px; width: 44px;
height: 18px; height: 18px;
...@@ -523,7 +543,7 @@ export default { ...@@ -523,7 +543,7 @@ export default {
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
background: #eeeded; background: #eeeded;
margin-left: 4px; margin-top: 2px;
} }
.void-reason { .void-reason {
font-size: 10px; font-size: 10px;
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<h4>{{ title }}</h4> <h4>{{ title }}</h4>
<el-divider></el-divider> <el-divider></el-divider>
<div class="form-item-container"> <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-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-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </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-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-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
</el-select> </el-select>
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
// phoneVisible: false, // phoneVisible: false,
businessTypes: [], businessTypes: [],
materialAddFormRules: { materialAddFormRules: {
selectMaterialGroup: [{ required: true, message: '请选择素材组', trigger: 'change' }], groupId: [{ required: true, message: '请选择素材组', trigger: 'change' }],
materialName: [ materialName: [
{ required: true, message: '请输入素材名称', trigger: 'change' }, { required: true, message: '请输入素材名称', trigger: 'change' },
{ max: 30, message: '素材名称长度不能超过30', trigger: 'blur' } { max: 30, message: '素材名称长度不能超过30', trigger: 'blur' }
...@@ -286,9 +286,26 @@ export default { ...@@ -286,9 +286,26 @@ export default {
if (this.materialAddForm.isNotifySender) { if (this.materialAddForm.isNotifySender) {
params.isNotifySender = 0 params.isNotifySender = 0
} }
if (params.materialType == 1) { if (this.materialAddForm.materialType == 1) {
params.materialUrl = this.pdfUrl 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) this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent params.materialUrl = this.textBoxContent
} }
...@@ -303,19 +320,20 @@ export default { ...@@ -303,19 +320,20 @@ export default {
} }
this.$apis.material.materialDetail(params).then(res => { this.$apis.material.materialDetail(params).then(res => {
this.materialAddForm = res this.materialAddForm = res
if (this.materialAddForm.businessType) { if (res.businessType) {
const businessTypeArr = this.materialAddForm.businessType.split(',') const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item)) this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
} else { } else {
this.materialAddForm.businessType = [] 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.materialAddForm.materialUrl = decodeURIComponent(this.materialAddForm.materialUrl)
this.$refs.textBox.setEdit(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 this.pdfUrl = this.materialAddForm.materialUrl
} }
if (this.materialAddForm.tagJson) { if (res.tagJson) {
const tagging = eval(this.materialAddForm.tagJson) const tagging = eval(this.materialAddForm.tagJson)
// let arr = [] // let arr = []
this.tagging = tagging.map(item => { this.tagging = tagging.map(item => {
...@@ -446,7 +464,7 @@ export default { ...@@ -446,7 +464,7 @@ export default {
var params = this.getParams() var params = this.getParams()
if (!params.materialUrl) { if (!params.materialUrl) {
this.$message({ this.$message({
message: '素材类型不能为空', message: '素材内容不能为空',
type: 'warning' type: 'warning'
}) })
return return
...@@ -479,41 +497,16 @@ export default { ...@@ -479,41 +497,16 @@ export default {
handleSubmit() { handleSubmit() {
this.$refs.materialAddForm.validate(valid => { this.$refs.materialAddForm.validate(valid => {
if (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() var params = this.getParams()
if (!params.materialUrl) { if (!params.materialUrl) {
this.$message({ this.$message({
message: '素材类型不能为空', message: '素材内容不能为空',
type: 'warning' type: 'warning'
}) })
return return
} }
// status 状态 0 启用 -1 禁用 1 存草稿 // status 状态 0 启用 -1 禁用 1 存草稿
params.status = 0 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 let material
if (params.id) { if (params.id) {
material = 'materialEdit' material = 'materialEdit'
......
...@@ -12,17 +12,26 @@ ...@@ -12,17 +12,26 @@
</div> </div>
</div> </div>
<ul v-show="groupVisible" :style="{ height: groupHeight - 110 + 'px' }"> <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 class="group-list" 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>
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle;height:24px;width:24px" />
<div class="group-name">{{ item.materialGroupName }}</div> <div class="group-name">{{ item.materialGroupName }}</div>
</div>
<div>
<el-popover placement="right" trigger="hover"> <el-popover placement="right" trigger="hover">
<div> <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="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="修改" @click="handleAddGroup(2, item)">修改</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</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> </div>
<i slot="reference" class="el-icon-more"></i>
</el-popover> </el-popover>
</div>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -169,6 +178,9 @@ export default { ...@@ -169,6 +178,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.status-words {
margin-left: 5px;
}
.el-popover { .el-popover {
min-width: 50px; min-width: 50px;
max-width: 150px; max-width: 150px;
...@@ -196,19 +208,18 @@ export default { ...@@ -196,19 +208,18 @@ export default {
} }
ul { ul {
overflow: auto; overflow: auto;
li { .group-list {
cursor: pointer; cursor: pointer;
text-align: left; text-align: left;
padding: 8px 16px 8px 18px; padding: 8px 8px 8px 18px;
display: flex;
justify-content: space-between;
&.active { &.active {
background-color: #ebeaff; background-color: #ebeaff;
} }
i { .more-icon {
font-size: 16px; vertical-align: middle;
padding-top: 6px; padding-top: 3px;
position: absolute;
right: 0px;
transform: rotate(90deg);
} }
} }
} }
......
...@@ -33,8 +33,11 @@ export default { ...@@ -33,8 +33,11 @@ export default {
this.content = html // 绑定当前逐渐地值 this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中 this.$emit('change', this.content) // 将内容同步到父组件中
} }
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片 // 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) { this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
...@@ -60,7 +63,7 @@ export default { ...@@ -60,7 +63,7 @@ export default {
} }
} }
// 上传视频 // 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) { this.editor.config.customUploadVideo = function (resultFiles, insertVideoFn) {
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
......
<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 { ...@@ -216,12 +216,13 @@ export default {
params.flag = 0 params.flag = 0
this.$apis.material.materialDetail(params).then(res => { this.$apis.material.materialDetail(params).then(res => {
this.detailInfo = res this.detailInfo = res
if (this.detailInfo.tagJson) { if (res.tagJson) {
this.detailInfo.tagJson = eval(this.detailInfo.tagJson) this.detailInfo.tagJson = eval(this.detailInfo.tagJson)
} else { } else {
this.detailInfo.tagJson = [] 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) 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)
......
...@@ -88,13 +88,13 @@ ...@@ -88,13 +88,13 @@
<script> <script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant' import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { getOrderListApi, orderExportApi, orderRefund,ordeRefundApi } from '@/api/modules/order' import { getOrderListApi, orderExportApi, orderRefund, ordeRefundApi } from '@/api/modules/order'
export default { export default {
data() { data() {
return { return {
isShow:false, isShow: false,
orderPrice:'', orderPrice: '',
orderDate:'', orderDate: '',
orderCode: '', orderCode: '',
refund: '', refund: '',
refundVisible: false, refundVisible: false,
...@@ -151,7 +151,13 @@ export default { ...@@ -151,7 +151,13 @@ export default {
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
} },
{
label: '推荐人',
name: 'shareStaffName',
type: 'input',
maxlength: 100
},
], ],
choseList: ['全部', '待收货', '已完成', '退款|售后'], choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1, currentIndex: 1,
...@@ -180,7 +186,7 @@ export default { ...@@ -180,7 +186,7 @@ export default {
fn: '退款' fn: '退款'
}, },
condition: row => { condition: row => {
if(row.packageType == 2) { if (row.packageType == 2) {
return row.refundFlag == 1 && row.show return row.refundFlag == 1 && row.show
} else { } else {
return row.refundFlag == 1 return row.refundFlag == 1
...@@ -214,7 +220,8 @@ export default { ...@@ -214,7 +220,8 @@ export default {
}, },
{ {
label: '价格/元', label: '价格/元',
prop: 'originalPrice' prop: 'originalPrice',
width: '100'
}, },
{ {
label: '实收金额/元', label: '实收金额/元',
...@@ -224,7 +231,7 @@ export default { ...@@ -224,7 +231,7 @@ export default {
{ {
label: '订单状态', label: '订单状态',
prop: 'orderStatus', prop: 'orderStatus',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
} }
...@@ -283,10 +290,10 @@ export default { ...@@ -283,10 +290,10 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
if (this.$isGroupUp) { // if (this.$isGroupUp) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人') // let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
this.tableParams.tableColumns.splice(idx, 1) // this.tableParams.tableColumns.splice(idx, 1)
} // }
}, },
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
...@@ -366,8 +373,8 @@ export default { ...@@ -366,8 +373,8 @@ export default {
}) })
}, },
ordeRefund(orderCode) { ordeRefund(orderCode) {
ordeRefundApi({orderCode}).then(res => { ordeRefundApi({ orderCode }).then(res => {
if(res != null) { if (res != null) {
this.orderDate = res.orderDate this.orderDate = res.orderDate
this.orderPrice = res.orderPrice this.orderPrice = res.orderPrice
this.isShow = true this.isShow = true
...@@ -380,7 +387,7 @@ export default { ...@@ -380,7 +387,7 @@ export default {
this.orderCode = data.orderCode this.orderCode = data.orderCode
this.refund = '' this.refund = ''
// this.refundVisible = !this.refundVisible // this.refundVisible = !this.refundVisible
if(data.packageType == 2) { if (data.packageType == 2) {
this.ordeRefund(data.orderCode) this.ordeRefund(data.orderCode)
} else { } else {
this.refundVisible = true this.refundVisible = true
...@@ -433,12 +440,12 @@ export default { ...@@ -433,12 +440,12 @@ export default {
//接收到的数据为空 //接收到的数据为空
this.$refs.memberOrderRef.data.length ? (this.$refs.memberOrderRef.tableHeightValues = '') : this.$refs.memberOrderRef.setTableHeightFun() this.$refs.memberOrderRef.data.length ? (this.$refs.memberOrderRef.tableHeightValues = '') : this.$refs.memberOrderRef.setTableHeightFun()
let arr = this.$refs.memberOrderRef.data let arr = this.$refs.memberOrderRef.data
if(arr.length > 0) { if (arr.length > 0) {
arr.map(e => { arr.map(e => {
if(e.refundFlag == 1 && e.packageType == 2) { if (e.refundFlag == 1 && e.packageType == 2) {
let time = new Date(`${e.createDate}`) let time = new Date(`${e.createDate}`)
let timer = new Date() let timer = new Date()
if(timer.getTime() < time.getTime() + 604800000) { if (timer.getTime() < time.getTime() + 604800000) {
e.show = true e.show = true
} }
} }
...@@ -532,7 +539,7 @@ export default { ...@@ -532,7 +539,7 @@ export default {
padding-bottom: 12px; padding-bottom: 12px;
} }
} }
::v-deep .el-dialog__footer { ::v-deep .el-dialog__footer {
text-align: center; text-align: center;
} }
} }
......
...@@ -37,6 +37,13 @@ ...@@ -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 :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> <span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> </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"> <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>
...@@ -494,6 +501,14 @@ export default { ...@@ -494,6 +501,14 @@ export default {
} }
}, },
{ {
label: '手机号',
prop: 'customerPhone',
width: 130,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '车架号', label: '车架号',
prop: 'vinNo', prop: 'vinNo',
width: 120, width: 120,
...@@ -510,10 +525,15 @@ export default { ...@@ -510,10 +525,15 @@ export default {
prop: 'shareStaffName', prop: 'shareStaffName',
width: '180', width: '180',
formatter: cellValue => { formatter: cellValue => {
return cellValue.shareStaffName || '-' return cellValue.shareStaffName ? cellValue.shareStaffName + (cellValue.shareStaffPhone ? '+' + cellValue.shareStaffPhone : '') : '-'
} }
}, },
{ {
label: '头像',
prop: 'shareStaffImageUrl',
addHtml: 'shareStaffImageUrl'
},
{
label: '推荐人类型', label: '推荐人类型',
prop: 'shareStaffType', prop: 'shareStaffType',
width: '180', width: '180',
...@@ -524,6 +544,7 @@ export default { ...@@ -524,6 +544,7 @@ export default {
{ {
label: '支付总价', label: '支付总价',
prop: 'payPrice', prop: 'payPrice',
width: '120',
formatter: cellValue => { formatter: cellValue => {
return cellValue.payPrice || '0' return cellValue.payPrice || '0'
} }
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
}, },
{ {
label: '推荐人类型', label: '推荐人类型',
name: '' name: 'shareStaffTypeName'
}, },
{ {
label: '车架号', label: '车架号',
...@@ -142,7 +142,9 @@ export default { ...@@ -142,7 +142,9 @@ export default {
}, },
{ {
label: '其他信息', label: '其他信息',
name: '' name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second', 'Third']
} }
], ],
// 售后信息 // 售后信息
...@@ -224,7 +226,6 @@ export default { ...@@ -224,7 +226,6 @@ 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) {
...@@ -232,7 +233,7 @@ export default { ...@@ -232,7 +233,7 @@ export default {
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) { 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) { 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)
...@@ -245,6 +246,16 @@ export default { ...@@ -245,6 +246,16 @@ export default {
var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee') var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee')
this.detailFormData.splice(takeFeeIdx, 1) this.detailFormData.splice(takeFeeIdx, 1)
} }
// 其他信息
var formDescribeObj = this.detailFormData.find(item => item.name == 'formDescribe')
this.detailForm[formDescribeObj.name] = ''
formDescribeObj.attrList.forEach(item => {
let label = this.detailForm[formDescribeObj.name + item]
let value = this.detailForm[formDescribeObj.contentName + item]
if (label) {
this.detailForm[formDescribeObj.name] += label + ':' + value + ' '
}
})
this.formToRow('detailFormData') this.formToRow('detailFormData')
}) })
}, },
......
...@@ -99,11 +99,8 @@ export default { ...@@ -99,11 +99,8 @@ export default {
}, },
{ {
label: '浏览时间', label: '浏览时间',
prop: 'createdDate', prop: 'lastBrowseDate',
// width: '180', width: '180'
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
} }
] ]
} }
......
...@@ -153,13 +153,10 @@ export default { ...@@ -153,13 +153,10 @@ export default {
attrs: { attrs: {
type: 'text' type: 'text'
}, },
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2'
},
listeners: { listeners: {
click: this.handleShare click: this.handleShare
} }
}, }
], ],
// 表格 // 表格
getListApi: this.$apis.seckillActivity.getCrowdfundListApi, getListApi: this.$apis.seckillActivity.getCrowdfundListApi,
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<p class="edit-title">{{ title }}秒杀活动</p> <p class="edit-title">{{ title }}秒杀活动</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div> <div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<template slot="activityTimeHtml"> <template slot="activityTimeHtml" slot-scope="scope">
<el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" :clearable="false"></el-date-picker> <el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</template> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button> <el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
...@@ -342,6 +342,10 @@ export default { ...@@ -342,6 +342,10 @@ export default {
} }
}, },
handleTimeChange(value, targetItem) {
!value && (this.editForm[targetItem.name] = [])
},
handleIsLimit(val) { handleIsLimit(val) {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1' this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1 this.editRule.limitPurchaseNumber[0].required = val != 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!