Commit 602d5f02 by 陈婉清

Merge branch 'v2.4.0' into 'v2.5.0'

V2.4.0

See merge request !183
2 parents 02b5e5bf b8b50002
import { http, http2 } from '@/main' import { http, http2, http_xiaolong } from '@/main'
const path = 'entmicro.api.mass.' const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router' const URL = 'rop-scrm-entmicro/router'
...@@ -87,6 +87,7 @@ const groupList = params => { ...@@ -87,6 +87,7 @@ const groupList = params => {
} }
const customerCount = params => { const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count' params.method = 'entmicro.api.mass.detail.customer.filter.count'
// return http({
return http({ return http({
url: URL, url: URL,
method: 'POST', method: 'POST',
...@@ -336,6 +337,26 @@ const followerType = params => { ...@@ -336,6 +337,26 @@ const followerType = params => {
}) })
} }
const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const followerEcho = params => {
params.method = 'entmicro.api.mass.follower.echo'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
customerList, customerList,
customerGroupList, customerGroupList,
...@@ -369,5 +390,7 @@ export default { ...@@ -369,5 +390,7 @@ export default {
templateDetail, templateDetail,
groupDetailUpdate, groupDetailUpdate,
findLordGroup, findLordGroup,
followerType followerType,
queryCrowdtree,
followerEcho
} }
...@@ -145,6 +145,7 @@ html { ...@@ -145,6 +145,7 @@ html {
.marketing .default-blue-btn { .marketing .default-blue-btn {
color: #5850ff; color: #5850ff;
border-color: #5850ff; border-color: #5850ff;
height: 32px;
} }
.el-scrollbar__bar.is-horizontal { .el-scrollbar__bar.is-horizontal {
...@@ -160,7 +161,7 @@ html { ...@@ -160,7 +161,7 @@ html {
line-height: 32px; line-height: 32px;
} }
.marketing .table-cicle { .marketing .table-circle {
display: inline-block; display: inline-block;
width: 6px; width: 6px;
height: 6px; height: 6px;
...@@ -180,11 +181,11 @@ html { ...@@ -180,11 +181,11 @@ html {
} }
.marketing .back-green { .marketing .back-green {
background-color: #2CCA74; background-color: #2cca74;
} }
.marketing .back-red { .marketing .back-red {
background-color: #EB4E4E; background-color: #eb4e4e;
} }
.marketing .el-table .cell { .marketing .el-table .cell {
...@@ -335,8 +336,8 @@ html { ...@@ -335,8 +336,8 @@ html {
.marketing .txt-grey { .marketing .txt-grey {
color: #999999; color: #999999;
} }
.marketing .text-e8{ .marketing .text-e8 {
color: #EB4E4E!important; color: #eb4e4e !important;
} }
.marketing .txt-center { .marketing .txt-center {
text-align: center; text-align: center;
...@@ -496,17 +497,19 @@ html { ...@@ -496,17 +497,19 @@ html {
} }
.marketing .el-tabs__item { .marketing .el-tabs__item {
box-sizing: border-box;
width: 120px; width: 120px;
height: 40px !important; height: 48px !important;
line-height: 40px !important; line-height: 48px !important;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
border: 0 !important; border: 0 !important;
background: #ffffff; color: #666666;
color: #999999; background: #fafafa;
border-radius: 0px 4px 0px 0px; border-radius: 4px 4px 0px 0px;
border: 1px solid #f4f6fc; border: 1px solid #eeedff;
padding: 0; padding: 0;
margin-right: 1px;
} }
.marketing .el-tabs__active-bar { .marketing .el-tabs__active-bar {
...@@ -519,10 +522,11 @@ html { ...@@ -519,10 +522,11 @@ html {
.marketing .el-tabs__item.is-active { .marketing .el-tabs__item.is-active {
color: #5850ff; color: #5850ff;
background: #f4f6fc !important; background: #ffffff !important;
border-radius: 4px 0px 0px 0px; border-radius: 4px 4px 0px 0px;
border: 1px solid #f4f6fc !important; border: 1px solid #eeedff !important;
} }
.marketing .tips-icon { .marketing .tips-icon {
display: inline-block; display: inline-block;
width: 14px; width: 14px;
...@@ -565,14 +569,14 @@ html { ...@@ -565,14 +569,14 @@ html {
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
background: #ffffff; background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08); box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
border: 1px solid #e4e7ed!important; border: 1px solid #e4e7ed !important;
width: 177px; width: 177px;
box-sizing: border-box; box-sizing: border-box;
} }
.el-tooltip__popper[x-placement^="top"] .popper__arrow { .el-tooltip__popper[x-placement^='top'] .popper__arrow {
border-top-color: #e4e7ed !important; border-top-color: #e4e7ed !important;
} }
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after { .el-tooltip__popper[x-placement^='top'] .popper__arrow:after {
border-top-color: #e4e7ed !important; border-top-color: #e4e7ed !important;
} }
/* tab */ /* tab */
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
<p class="noproP">系统暂无已创建的商品</p> <p class="noproP">系统暂无已创建的商品</p>
</div> </div>
<el-radio-group v-model="infoId" v-if="productList.length"> <el-radio-group v-model="infoId" v-if="productList.length">
<el-radio class="pro-box" v-for="item in productList" :key="item.id" :label="item.id"> <el-radio :class="['pro-box', item.id == infoId ? 'active' : '']" v-for="item in productList" :key="item.id" :label="item.id">
<img :src="item.goodsImage" /> <img v-show="item.id == infoId" class="icon-check" src="@/assets/icon-check.png" />
<img class="goods-img" :src="item.goodsImage" />
<div class="txt-box"> <div class="txt-box">
<p :title="item.goodsName" class="ellipsis">{{ item.goodsName }}</p> <p :title="item.goodsName" class="ellipsis">{{ item.goodsName }}</p>
<p class="f-s-12">销量:{{ item.saleAmount }}</p> <p class="f-s-12">销量:{{ item.saleAmount }}</p>
...@@ -44,7 +45,7 @@ export default { ...@@ -44,7 +45,7 @@ export default {
}, },
selectedProInfo: { selectedProInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
...@@ -73,13 +74,13 @@ export default { ...@@ -73,13 +74,13 @@ export default {
// console.log(res) // console.log(res)
this.fnCallBack = true this.fnCallBack = true
this.productList = res.list this.productList = res.list
this.productList.forEach(function(item) { this.productList.forEach(function (item) {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) { if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) { let retailPriceList = item.specificationDetailList.sort(function (a, b) {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function(a, b) { let stockeList = item.specificationDetailList.sort(function (a, b) {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
...@@ -133,18 +134,34 @@ export default { ...@@ -133,18 +134,34 @@ export default {
<style> <style>
.single-pro .pro-box { .single-pro .pro-box {
width: 202px; width: 202px;
border: 1px solid #cccccc; border: 1px solid #e5e5e5;
border-radius: 6px;
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
} }
.single-pro .pro-box.active {
box-shadow: 0px 6px 20px 0px rgba(122, 122, 122, 0.2);
border: 1px solid #5850ff;
}
.single-pro .el-radio__inner {
display: none;
}
.single-pro .icon-check {
position: absolute;
top: 10px;
right: 10px;
width: 32px;
height: 32px;
}
.single-pro p { .single-pro p {
margin: 0 0 8px 0; margin: 0 0 8px 0;
} }
.single-pro .f-s-12 { .single-pro .f-s-12 {
font-size: 12px; font-size: 12px;
} }
.single-pro .pro-box img { .single-pro .pro-box .goods-img {
width: 202px; width: 202px;
height: 202px; height: 202px;
border-radius: 6px 6px 0 0;
} }
.single-pro .el-radio__input { .single-pro .el-radio__input {
position: absolute; position: absolute;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2021-08-13 14:12:11 * @Date: 2021-08-13 14:12:11
* @LastEditors: limin * @LastEditors: huyue
* @LastEditTime: 2021-09-24 10:41:31 * @LastEditTime: 2022-05-27 16:23:01
* @FilePath: \scrm\scrm-sub-blog\src\main.js * @FilePath: \scrm\scrm-sub-blog\src\main.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -23,3 +23,4 @@ export const http = params => Vue.prototype.$http(params) ...@@ -23,3 +23,4 @@ export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params) export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params) export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_xiaolong = params => Vue.prototype.$http_xiaolong(params)
/*
* @Description:
* @Author: huyue
* @Date: 2022-01-20 18:06:46
* @LastEditors: huyue
* @LastEditTime: 2022-05-27 16:28:40
*/
import Vue from 'vue' import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js' import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
...@@ -15,7 +22,7 @@ Vue.use(ElementUI) ...@@ -15,7 +22,7 @@ Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(false) const { response, request, request2, sign, secret, sign_common, request_common, request_merchant, xiaolong_req } = await fetchConfig(false)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -28,6 +35,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -28,6 +35,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" /> <img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" />
</template> </template>
<div slot="status" slot-scope="scope"> <div slot="status" slot-scope="scope">
<span :class="['table-cicle', 'm-r-8', scope.scope.status == 1 ? 'back-orange' : scope.scope.status == 2 ? 'back-blue' : 'back-grey']"></span> <span :class="['table-circle', 'm-r-8', scope.scope.status == 1 ? 'back-orange' : scope.scope.status == 2 ? 'back-blue' : 'back-grey']"></span>
<span>{{ baseData.statusList.find(item => item.confId == scope.scope.status).confName }}</span> <span>{{ baseData.statusList.find(item => item.confId == scope.scope.status).confName }}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="receiveList" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="receiveList" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="userStatus" slot-scope="scope"> <div slot="userStatus" slot-scope="scope">
<span :class="['table-cicle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"></span> <span :class="['table-circle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"></span>
<span>{{ baseData.userStatusList.find(item => item.confId == scope.scope.userStatus).confName }}</span> <span>{{ baseData.userStatusList.find(item => item.confId == scope.scope.userStatus).confName }}</span>
</div> </div>
</GLTable> </GLTable>
......
...@@ -259,7 +259,6 @@ export default { ...@@ -259,7 +259,6 @@ export default {
} }
}, },
created() { created() {
console.log(this.$globalState.session)
if (this.$isGroupUp) { if (this.$isGroupUp) {
this.getPackageList() this.getPackageList()
} }
......
...@@ -104,6 +104,22 @@ ...@@ -104,6 +104,22 @@
</span> </span>
</div> </div>
</div> </div>
<div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 3">
<div class="detail-condition-item" style="width: 100%;">
<span class="name">人群</span>
<span v-for="(ite, index) in basicInfo.conditionResponses" class="el-tag-item" :key="index">
<el-tag v-if="index < 2" type="info">{{ ite.crowdName }}</el-tag>
<el-tag type="info" v-if="basicInfo.conditionResponses.length > 2 && index == 2">
<el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{ basicInfo.conditionResponses.length }})</span>
<div class="entmicro-hover">
<el-tag type="info" v-for="(ins, index) in basicInfo.conditionResponses" :key="index" :disable-transitions="false">{{ ins.crowdName }}</el-tag>
</div>
</el-popover>
</el-tag>
</span>
</div>
</div>
</div> </div>
<div class="title">数据统计</div> <div class="title">数据统计</div>
<div class="statistics-info"> <div class="statistics-info">
...@@ -241,7 +257,7 @@ export default { ...@@ -241,7 +257,7 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scope> <style lang="scss">
.container { .container {
margin-bottom: 20px; margin-bottom: 20px;
background-color: #ffffff; background-color: #ffffff;
......
<!--
* @Description:
* @Author: huyue
* @Date: 2022-05-24 18:18:53
* @LastEditors: huyue
* @LastEditTime: 2022-06-09 17:55:40
-->
<template>
<div>
<el-dialog :title="'人群筛选'" :visible.sync="crowdVisible">
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
人群列表
</div>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="人群名称" style="margin-bottom: 0" size="small">
<el-input :size="size" v-model.trim="searchForm.keyword" @keyup.enter.native="search" clearable
placeholder="请输入关键字搜索"></el-input>
</el-form-item>
<el-form-item label style="margin-bottom: 0;margin-left:10px" size="small">
<el-button type="primary" :size="size" @click="search">搜索</el-button>
</el-form-item>
</el-form>
<div class="table-content">
<GLTable v-loading="loading" ref="crowdTable" :tableData="tableData" @refreshTable="search"
:tableTotal="tableTotal" :layout="layout" :tableParams="crowdTableParams" :hasNum="true"
:pageConf="pageConf" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick"></GLTable>
</div>
</div>
</div>
<div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">人群({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false"
@close="remove(tag)">
{{ tag.crowdName }}
</el-tag>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="crowdVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
// import url from '@/assets/empty.png'
export default {
name: 'SelectCrowd',
data() {
return {
url: 0,
crowdVisible: false,
searchForm: { keyword: '' },
innerTags: [],
inner: [],
tableCrowdData: [
{
name: 'asda'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
crowdTableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'crowdUnitList',
// 行数据的key
mutiSelectUniqueKey: 'crowdId',
// 多选ref的名称
mutiSelectName: 'crowdlist',
tableColumns: [
{
label: '人群名称',
prop: 'crowdName'
},
{
label: '人群描述',
prop: 'crowdDesc'
},
{
label: '人数',
prop: 'total'
}
]
}
}
},
methods: {
init(val) {
console.log(val)
this.inner = this.$common.utils.deepClone(val)
this.innerTags = this.$common.utils.deepClone(val)
this.crowdVisible = true
this.searchForm.keyword = ''
this.$nextTick(() => {
this.$refs.crowdTable.$refs.crowdlistMutiTable.clearSelection()
this.$refs.crowdTable.page.pageNum = 1
this.getCrowdList()
})
},
getCrowdList() {
var params = {
req: {
keyword: this.searchForm.keyword,
merchantId: this.$globalState.session.merchantId,
crowdType: 3,
filterType: 2,
pageSize: this.$refs.crowdTable.page.pageSize,
pageNum: this.$refs.crowdTable.page.pageNum
}
}
this.$apis.customerTransform.queryCrowdtree(params).then(res => {
this.tableData = res.crowdUnitList
this.tableTotal = res.total
console.log(this.inner)
console.log(this.tableData)
this.tableData.forEach(item => {
this.inner.forEach((itm, index) => {
if (itm.crowdId == item.crowdId) {
this.rowClick(item)
}
})
})
})
},
beforeSearchFn() {
return new Promise(resolve => {
Object.assign(this.searchForm.req, {})
resolve()
})
},
selectionTable(val) {
this.innerTags = []
for (let i = 0; i < val.length; i++) {
console.log(i)
const tagArr = this.innerTags.map(item => item.crowdId)
if (!tagArr.includes(val[i].crowdId)) {
this.innerTags.push(val[i])
}
}
},
remove(item) {
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
console.log(this.$refs.crowdTable)
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(row)
},
search() {
this.getCrowdList()
},
handleConfirm() {
this.$emit('crowdData', this.innerTags)
this.crowdVisible = false
this.searchForm = { req: {} }
}
}
}
</script>
<style lang="scss" scoped>
.member-wrapper {
display: flex;
.member-title {
font-size: 16px;
color: #333;
font-weight: 600;
line-height: 22px;
margin-bottom: 6px;
span {
display: inline-block;
padding-left: 5px;
font-size: 12px;
color: #999;
font-weight: 500;
}
}
.member-left {
width: 800px;
.member-content {
border: 1px solid #eee;
padding-bottom: 20px;
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
}
.member-form {
padding: 10px 20px;
}
.table-content {
max-height: 456px;
overflow: auto;
border-top: 1px solid #eee;
}
}
.member-checked {
text-align: right;
margin-top: 10px;
}
}
.member-right {
width: 286px;
margin-left: 14px;
.member-name {
font-size: 14px;
color: #333;
line-height: 20px;
padding: 18px;
border: 1px solid #eee;
}
}
}
.tag-box {
height: 100%;
width: 100%;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
border: 1px solid #eee;
border-top: none;
box-sizing: border-box;
color: #606266;
display: inline-block;
padding: 8px 10px;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
height: calc(100% - 86px);
display: flex;
align-items: center;
max-height: 500px;
overflow: auto;
// margin-bottom: 10px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 10px;
line-height: 22px;
margin-bottom: 5px;
height: 24px;
background: #fafbfe !important;
}
/deep/.el-dialog__title {
font-weight: 600;
}
</style>
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
.table-content { .table-content {
max-height: 456px; max-height: 456px;
overflow: auto; overflow: auto;
border: 1px solid #eee; border-top: 1px solid #eee;
} }
} }
.member-checked { .member-checked {
......
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
.table-content { .table-content {
max-height: 456px; max-height: 456px;
overflow: auto; overflow: auto;
border: 1px solid #eee; border-top: 1px solid #eee;
} }
} }
.member-checked { .member-checked {
......
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
.table-content { .table-content {
max-height: 456px; max-height: 456px;
overflow: auto; overflow: auto;
border: 1px solid #eee; border-top: 1px solid #eee;
} }
} }
.member-checked { .member-checked {
......
...@@ -292,7 +292,7 @@ export default { ...@@ -292,7 +292,7 @@ export default {
.table-content { .table-content {
max-height: 456px; max-height: 456px;
overflow: auto; overflow: auto;
border: 1px solid #eee; border-top: 1px solid #eee;
} }
} }
.member-checked { .member-checked {
......
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
<el-form-item size="small" label="开通门店" style="margin-left: -10px"> <el-form-item size="small" label="开通门店" style="margin-left: -10px">
<el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input> <el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item v-show="$isGroupUp" size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-row>
<el-row v-show="!$isGroupUp">
<el-form-item size="small" label="推荐人">
<el-input :size="size" v-model="searchForm.shareStaffName" placeholder="请输入推荐人" clearable></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button> <el-button :size="size" type="primary" @click="handleExport">导出</el-button>
...@@ -131,11 +141,12 @@ export default { ...@@ -131,11 +141,12 @@ export default {
// } // }
}, },
{ {
label: '价格', label: '价格/元',
prop: 'originalPrice' prop: 'originalPrice'
}, },
{ {
label: '实收金额', label: '实收金额/元',
width: '120',
prop: 'realPayPrice' prop: 'realPayPrice'
}, },
{ {
...@@ -156,7 +167,14 @@ export default { ...@@ -156,7 +167,14 @@ export default {
prop: 'merchantName', prop: 'merchantName',
width: '180' width: '180'
}, },
{
label: '推荐人',
prop: 'shareStaffName',
width: '120',
formatter: cellValue => {
return cellValue.shareStaffName || '-'
}
},
{ {
label: '用户信息', label: '用户信息',
prop: 'accountName', prop: 'accountName',
...@@ -182,8 +200,12 @@ export default { ...@@ -182,8 +200,12 @@ 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) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
this.tableParams.tableColumns.splice(idx, 1)
}
}, },
mounted() {}, mounted() { },
methods: { methods: {
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
......
<!-- 订单管理 --> <!-- 订单管理 -->
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20 order-manage">
<div class="container"> <div class="container">
<div class="list-tips">
<img class="tips-img" src="@/assets/icon-info.png" />
<span>
已生成有效订单
<span class="red-txt">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
项 累计订单总额:
<span class="red-txt">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span>
元 累计退款总额:
<span class="red-txt">{{ statisticsInfo.refundTotal || 0 }}&nbsp;</span>
元
</span>
</div>
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData4">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button> <el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="flex">
<div class="flex-default">
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="全部订单" name="allOrder"></el-tab-pane> <el-tab-pane label="全部订单" name="allOrder"></el-tab-pane>
<el-tab-pane label="售后订单" name="afterOrder"></el-tab-pane> <el-tab-pane label="售后订单" name="afterOrder"></el-tab-pane>
</el-tabs> </el-tabs>
<span class="table-tips">
已生成有效订单
<span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
项 累计订单总额:
<span class="txt-blue">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span>
元 累计退款总额:
<span class="txt-blue">{{ statisticsInfo.refundTotal || 0 }}&nbsp;</span>
元
</span>
</div>
<el-button class="default-blue-btn" :size="size" type="default" @click="handleExport">导出</el-button>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 --> <!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="vinNo" slot-scope="scope">
{{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }}
<el-popover popper-class="order-table-popover" placement="right-start" trigger="click">
<p v-for="(item, index) in scope.scope.vinNo" :key="index">{{ item }}</p>
<span class="car-no" slot="reference" v-show="Array.isArray(scope.scope.vinNo)">...({{ scope.scope.vinNo.length - 1 }})</span>
</el-popover>
</template>
<div slot="orderStatus" slot-scope="scope">
<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 class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> --> <!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> -->
<GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton> <GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
...@@ -134,7 +148,8 @@ export default { ...@@ -134,7 +148,8 @@ export default {
customerName: '', customerName: '',
createDate: [], createDate: [],
orderSource: '', orderSource: '',
deliveryType: '' deliveryType: '',
vin: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
statisticsInfo: { statisticsInfo: {
...@@ -185,6 +200,7 @@ export default { ...@@ -185,6 +200,7 @@ export default {
label: '售后状态', label: '售后状态',
name: 'afterSaleStatuses', name: 'afterSaleStatuses',
type: 'select', type: 'select',
labelWidth: 72,
multiple: true, multiple: true,
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
...@@ -230,6 +246,7 @@ export default { ...@@ -230,6 +246,7 @@ export default {
label: '订单日期', label: '订单日期',
name: 'createDate', name: 'createDate',
type: 'datePicker', type: 'datePicker',
labelWidth: 72,
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} }
...@@ -252,6 +269,21 @@ export default { ...@@ -252,6 +269,21 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'deliveryTypeList' optionsName: 'deliveryTypeList'
},
{
label: '商户订单号',
name: 'outTradeNo',
type: 'input',
maxlength: 50
}
],
searchFormData4: [
{
label: '车架号',
name: 'vin',
labelWidth: 56,
type: 'input',
maxlength: 50
} }
], ],
// 快递信息 // 快递信息
...@@ -349,7 +381,15 @@ export default { ...@@ -349,7 +381,15 @@ export default {
{ {
label: '订单编号', label: '订单编号',
prop: 'orderCode', prop: 'orderCode',
width: '160' width: '180'
},
{
label: '商户订单号',
prop: 'outTradeNo',
width: '160',
formatter: cellValue => {
return cellValue.outTradeNo || '-'
}
}, },
{ {
label: '订单时间', label: '订单时间',
...@@ -360,15 +400,32 @@ export default { ...@@ -360,15 +400,32 @@ export default {
} }
}, },
{ {
label: '客户信息', label: '客户名称',
prop: 'customerName', prop: 'customerName',
line: 2 line: 2,
width: 180,
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '车架号',
prop: 'vinNo',
width: 120,
addHtml: 'vinNo'
}, },
{ {
label: '订单状态', label: '订单状态',
prop: 'orderStatus', prop: 'orderStatus',
addHtml: 'orderStatus',
width: 160
},
{
label: '推荐人',
prop: 'shareStaffName',
width: '180',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-' return cellValue.shareStaffName || '-'
} }
}, },
{ {
...@@ -381,7 +438,8 @@ export default { ...@@ -381,7 +438,8 @@ export default {
{ {
label: '门店信息', label: '门店信息',
prop: 'merchantName', prop: 'merchantName',
line: 2 line: 2,
width: 180
}, },
{ {
label: '订单类型', label: '订单类型',
...@@ -684,6 +742,9 @@ export default { ...@@ -684,6 +742,9 @@ export default {
// 确认收货 - end // 确认收货 - end
setTableFinishFun() { setTableFinishFun() {
this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
})
//接收到的数据为空 //接收到的数据为空
this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun() this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun()
this.getCount() this.getCount()
...@@ -713,7 +774,8 @@ export default { ...@@ -713,7 +774,8 @@ export default {
customerName: '', customerName: '',
createDate: [], createDate: [],
orderSource: '', orderSource: '',
deliveryType: '' deliveryType: '',
vin: ''
} }
this.handleSearch() this.handleSearch()
} }
...@@ -721,4 +783,26 @@ export default { ...@@ -721,4 +783,26 @@ export default {
} }
</script> </script>
<style lang="scss"></style> <style lang="scss">
.order-table-popover {
min-width: 80px !important;
padding: 8px 12px !important;
}
.order-manage {
.table-tips {
height: 48px;
line-height: 48px;
font-size: 14px;
color: #333333;
margin-left: 16px;
}
.car-no {
cursor: pointer;
font-size: 12px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 2px 4px;
line-height: 25px;
}
}
</style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<p class="edit-title">订单信息</p> <p class="edit-title">订单信息</p>
<el-form label-width="100px" :inline="true"> <el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index"> <el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label"> <el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label" class="row-item">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span> <span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -44,12 +44,17 @@ ...@@ -44,12 +44,17 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<div class="flex" style="padding: 0 30px;"> <div class="form-img">
<!-- <img v-for="(item, index) in orderRefund.imgUrls" :key="index" class="img-60" :src="item"/> --> <el-form label-width="100px" :inline="true">
<el-form-item label="售后凭证">
<div class="flex">
<span v-for="(item, index) in orderRefund.imgUrls" :key="index"> <span v-for="(item, index) in orderRefund.imgUrls" :key="index">
<el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image> <el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image>
</span> </span>
</div> </div>
</el-form-item>
</el-form>
</div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">返回</el-button> <el-button type="default" @click="handleCancel">返回</el-button>
...@@ -83,15 +88,27 @@ export default { ...@@ -83,15 +88,27 @@ export default {
name: 'orderCode' name: 'orderCode'
}, },
{ {
label: '商户订单号',
name: 'outTradeNo'
},
{
label: '订单时间', label: '订单时间',
name: 'createdDateStr' name: 'createdDateStr'
}, },
{ {
label: '手机号', label: '手机号码',
name: 'customerPhone' name: 'customerPhone'
}, },
{ {
label: '客户信息', label: '车架号',
name: 'vin'
},
{
label: '门店信息',
name: 'merchantName'
},
{
label: '客户名称',
name: 'customerName' name: 'customerName'
}, },
{ {
...@@ -104,10 +121,6 @@ export default { ...@@ -104,10 +121,6 @@ export default {
name: 'orderSourceName' name: 'orderSourceName'
}, },
{ {
label: '门店信息',
name: 'merchantName'
},
{
label: '订单状态', label: '订单状态',
name: 'orderStatusName' name: 'orderStatusName'
}, },
...@@ -136,17 +149,21 @@ export default { ...@@ -136,17 +149,21 @@ export default {
name: 'createdDateStr' name: 'createdDateStr'
}, },
{ {
label: '申请描述',
name: 'remark'
},
{
label: '快递公司', label: '快递公司',
name: 'deliveryCompany' name: 'deliveryCompany'
}, },
{ {
label: '快递单号', label: '快递单号',
name: 'deliveryNumber' name: 'deliveryNumber'
},
{
label: '申请描述',
name: 'remark'
} }
// {
// label: '售后凭证',
// name: ''
// }
], ],
// 基本数据 // 基本数据
baseData: { baseData: {
...@@ -226,9 +243,15 @@ export default { ...@@ -226,9 +243,15 @@ export default {
.marketing.order-detail .el-form--inline .el-form-item__content { .marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px; height: 30px;
} }
.marketing.order-detail .form-img .el-form--inline .el-form-item__content {
height: auto !important;
}
.marketing.order-detail .flex { .marketing.order-detail .flex {
justify-content: flex-start; justify-content: flex-start;
} }
.marketing.order-detail .row-item {
width: 33%;
}
.detail-txt { .detail-txt {
display: inline-block; display: inline-block;
width: 220px; width: 220px;
......
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing p-t-20 edit-box"> <div class="edit-share marketing p-t-20 edit-box edit-activity">
<div class="container edit-container"> <div class="container edit-container">
<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>
<template slot="activityTimeHtml"> <template slot="activityTimeHtml">
<!-- <el-form-item> --> <el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" clearable></el-date-picker>
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" clearable></el-date-picker>
<!-- </el-form-item> -->
</template> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="primary" 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>
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px"> <div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px">
<p> <p>
<img class="img-60" :src="selectedProInfo.goodsImage" /> <img class="img-60" :src="selectedProInfo.goodsImage" />
...@@ -54,8 +53,29 @@ ...@@ -54,8 +53,29 @@
</table> </table>
</div> </div>
</div> </div>
<template slot="limitPurchaseFlag" slot-scope="scope">
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleIsLimit">
<el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]" :disabled="isDisabled">{{ item[scope.scope.optionLabel] }}</el-radio>
</el-radio-group>
<p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;">
每人限购
<el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input>
</el-form-item>
件
</p>
</template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="wechat-box">
<img class="w-100-percent" src="@/assets/wechat-activity.png" />
<img class="wechat-nav" src="@/assets/wechat-nav.png" />
<div v-show="selectedProInfo.goodsImage" class="wechant-banner-img">
<img class="w-100-percent" :src="selectedProInfo.goodsImage" />
</div>
<p class="wechat-name one-line-ellipsis">{{ editForm.activityName }}</p>
<p v-show="editForm.limitPurchaseNumber" class="wechat-limit-num one-line-ellipsis">{{ editForm.limitPurchaseNumber }}</p>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear != 'see'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear != 'see'" @click="handleConfirm">确定</el-button>
<el-button v-if="apear != 'see'" @click="handleCancel">取消</el-button> <el-button v-if="apear != 'see'" @click="handleCancel">取消</el-button>
...@@ -113,7 +133,9 @@ export default { ...@@ -113,7 +133,9 @@ export default {
activityTime: [], activityTime: [],
activityPrice: '', activityPrice: '',
goodsStock: '', goodsStock: '',
goodsId: '' goodsId: '',
limitPurchaseFlag: 1,
limitPurchaseNumber: ''
}, },
//商品列表 //商品列表
tableParams: { tableParams: {
...@@ -162,15 +184,29 @@ export default { ...@@ -162,15 +184,29 @@ export default {
trigger: 'change' trigger: 'change'
} }
], ],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }] goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
limitPurchaseNumber: [
{ required: false, message: '请输入限购次数', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (this.editForm.limitPurchaseFlag == 2 && (value < 1 || value > 10 || !/^\d+$/.test(value))) {
return callback('请输入1-10的限购次数')
}
return callback()
},
trigger: 'blur'
}
]
}, },
editFormData: [ editFormData: [
{ {
label: '活动名称', label: '活动名称',
name: 'activityName', name: 'activityName',
width: '320px', width: '474px',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20,
isDisabled: false
}, },
{ {
label: '活动宣传图', label: '活动宣传图',
...@@ -179,6 +215,8 @@ export default { ...@@ -179,6 +215,8 @@ export default {
width: '320px', width: '320px',
limitSize: 10, limitSize: 10,
maxPhotoNum: 1, maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityImg',
handleUpload: (e, file, targetItem) => { handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
...@@ -191,9 +229,10 @@ export default { ...@@ -191,9 +229,10 @@ export default {
{ {
label: '活动宣传语', label: '活动宣传语',
name: 'promotion', name: 'promotion',
width: '320px', width: '474px',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20,
isDisabled: false
}, },
{ {
label: '活动时间', label: '活动时间',
...@@ -210,6 +249,25 @@ export default { ...@@ -210,6 +249,25 @@ export default {
name: '', name: '',
addHtml: 'specificationsHtml', addHtml: 'specificationsHtml',
isHide: true isHide: true
},
{
label: '是否限购',
name: 'limitPurchaseFlag',
addHtml: 'limitPurchaseFlag',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '否',
isDisabled: false
},
{
confId: 2,
confName: '是',
isDisabled: false
}
],
} }
] ]
} }
...@@ -227,9 +285,7 @@ export default { ...@@ -227,9 +285,7 @@ export default {
this.apear = 'see' this.apear = 'see'
this.title = '查看' this.title = '查看'
this.isDisabled = true this.isDisabled = true
this.editFormData[0].isDisabled = true this.changeFormAttr('editFormData', 'isDisabled', ['活动名称', '活动宣传图', '活动宣传语'], true)
this.editFormData[1].isDisabled = true
this.editFormData[2].isDisabled = true
} else if (addOrEdit == 2) { } else if (addOrEdit == 2) {
this.apear = 'edit' this.apear = 'edit'
this.title = '编辑' this.title = '编辑'
...@@ -256,6 +312,12 @@ export default { ...@@ -256,6 +312,12 @@ export default {
}, },
methods: { methods: {
changeFormAttr(formName, attrName, labelList, attrValue) {
labelList.forEach(item => {
let idx = this[formName].findIndex(k => k.label == item)
this[formName][idx][attrName] = attrValue
})
},
limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) { limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var _regRule = regRule || 'priceReg' var _regRule = regRule || 'priceReg'
if (val && this.reg[_regRule].test(val + '')) { if (val && this.reg[_regRule].test(val + '')) {
...@@ -280,6 +342,11 @@ export default { ...@@ -280,6 +342,11 @@ export default {
} }
}, },
handleIsLimit(val) {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1
},
handleRelateProChange(val) { handleRelateProChange(val) {
this.editRule.goodsId[0].required = val == 2 this.editRule.goodsId[0].required = val == 2
var idx = this.editFormData.findIndex(item => item.name == 'goodsId') var idx = this.editFormData.findIndex(item => item.name == 'goodsId')
...@@ -309,11 +376,11 @@ export default { ...@@ -309,11 +376,11 @@ export default {
this.$apis.proManage.getProInfoApi({ id: id }).then(res => { this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
this.selectedProInfo = this.$common.utils.deepClone(res) this.selectedProInfo = this.$common.utils.deepClone(res)
if (this.selectedProInfo.specificationDetailList.length) { if (this.selectedProInfo.specificationDetailList.length) {
this.editFormData[5].isHide = false this.changeFormAttr('editFormData', 'isHide', ['规格明细'], false)
this.specificationDetailList = this.selectedProInfo.specificationList this.specificationDetailList = this.selectedProInfo.specificationList
this.recoverySpec() this.recoverySpec()
} else { } else {
this.editFormData[5].isHide = true this.changeFormAttr('editFormData', 'isHide', ['规格明细'], true)
this.nameToValSpecsList = [] this.nameToValSpecsList = []
this.specificationDetailList = [] this.specificationDetailList = []
} }
...@@ -427,6 +494,8 @@ export default { ...@@ -427,6 +494,8 @@ export default {
form.promotion = info.promotion form.promotion = info.promotion
form.activityTime = [info.startTime, info.endTime] form.activityTime = [info.startTime, info.endTime]
form.goodsId = info.goodsId form.goodsId = info.goodsId
form.limitPurchaseFlag = info.limitPurchaseFlag
form.limitPurchaseNumber = info.limitPurchaseNumber
this.getGoodInfo(info.goodsId) this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) { if (info.activityPrice != null && info.goodsStock != null) {
form.activityPrice = (info.activityPrice / 100).toFixed(2) form.activityPrice = (info.activityPrice / 100).toFixed(2)
...@@ -465,7 +534,7 @@ export default { ...@@ -465,7 +534,7 @@ export default {
delete param.activityPrice delete param.activityPrice
delete param.goodsStock delete param.goodsStock
param.specificationDetailList = [] param.specificationDetailList = []
this.nameToValSpecsList.forEach(function(item) { this.nameToValSpecsList.forEach(function (item) {
var obj = { var obj = {
retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100 retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100
stock: item.goodsStock, stock: item.goodsStock,
...@@ -548,7 +617,7 @@ export default { ...@@ -548,7 +617,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
...@@ -590,9 +659,51 @@ export default { ...@@ -590,9 +659,51 @@ export default {
.edit-product-dh .w-320 { .edit-product-dh .w-320 {
width: 320px; width: 320px;
} }
.color-red {
color: #eb4e4e;
cursor: pointer;
}
/* 规格 */ /* 规格 */
.edit-activity {
position: relative;
}
.edit-activity .edit-container {
min-height: 680px;
}
.edit-activity .wechat-box {
width: 276px;
box-sizing: border-box;
position: absolute;
top: 100px;
right: 19px;
}
.edit-activity .wechat-nav {
position: absolute;
top: 20px;
right: 20px;
z-index: 20;
}
.edit-activity .wechat-box .wechant-banner-img {
position: absolute;
top: 20px;
left: 21px;
width: 234px;
height: 552px;
}
.edit-activity .wechat-box .wechant-banner-img img {
height: 235px;
border-radius: 18px 18px 0 0;
}
.edit-activity .wechat-box .wechat-name {
position: absolute;
top: 300px;
left: 26px;
font-size: 18px;
width: 180px;
color: #282829;
}
.edit-activity .wechat-box .wechat-limit-num {
position: absolute;
bottom: 93px;
left: 160px;
font-size: 10px;
width: 20px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!