Commit a79526fc by 胡悦

Merge branch 'v2.4.0' into huy_dev_v2.4.0

2 parents d42ed14e 273a5d5f
...@@ -118,8 +118,8 @@ const getCrowdTreeListApi = params => { ...@@ -118,8 +118,8 @@ const getCrowdTreeListApi = params => {
} }
// 跟进员工类型 // 跟进员工类型
const getStaffTypeListApi = params => { const getStaffFollowerListApi = params => {
params.method = 'entmicro.api.staff.listEntBusinessType' params.method = 'entmicro.api.staff.listEntFollowerType'
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -128,4 +128,4 @@ const getStaffTypeListApi = params => { ...@@ -128,4 +128,4 @@ const getStaffTypeListApi = params => {
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffTypeListApi } export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi }
...@@ -105,10 +105,12 @@ export default { ...@@ -105,10 +105,12 @@ export default {
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 = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function(a, b) { let stockeList = JSON.parse(JSON.stringify(item.specificationDetailList))
stockeList.sort((a, b) => {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -27,17 +27,14 @@ ...@@ -27,17 +27,14 @@
</template> </template>
<script> <script>
// import { getGoodsList } from '@/api/modules/common'
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
export default { export default {
name: 'selectMutiProForcouponDialog', name: 'selectMutiProForcouponDialog',
data() { data() {
return { return {
// 表格组件 // 表格组件
// getListApi: this.$apis.common.getGoodsListApi,
productList: [], productList: [],
userInfo: {}, userInfo: {},
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchProForm: { searchProForm: {
name: '' name: ''
}, },
...@@ -97,8 +94,6 @@ export default { ...@@ -97,8 +94,6 @@ export default {
var params = { var params = {
goodsStatus: 1, goodsStatus: 1,
goodsSource: 1, goodsSource: 1,
// pageNum: isMounted ? 1 : this.$refs.mutiProRef.page.pageNum,
// pageSize: isMounted ? 10 : this.$refs.mutiProRef.page.pageSize
currentPage: 1, currentPage: 1,
pageNum: 1, pageNum: 1,
pageSize: 100000, pageSize: 100000,
...@@ -109,33 +104,8 @@ export default { ...@@ -109,33 +104,8 @@ export default {
this.$apis.couponManage.getAllGoodsApi(params).then(res => { this.$apis.couponManage.getAllGoodsApi(params).then(res => {
this.fnCallBack = true this.fnCallBack = true
// console.log(res) // console.log(res)
// this.productList = res
this.productList = res.list this.productList = res.list
// this.$refs.mutiProRef.tableTotal = res.total this.productList.forEach(function (item) {
this.productList.forEach(function(item) {
// item.saleAmount = item.goodsStatistics.saleAmount
// if (item.specificationDetailList.length > 1) {
// let retailPriceList = item.specificationDetailList.sort(function(a, b) {
// return a.retailPrice - b.retailPrice
// })
// let stockeList = item.specificationDetailList.sort(function(a, b) {
// return a.stock - b.stock
// })
// let minRatilPrice = retailPriceList[0].retailPrice / 100
// let maxRatilPrice = retailPriceList[retailPriceList.length - 1].retailPrice / 100
// let minStock = stockeList[0].stock
// let maxStock = stockeList[stockeList.length - 1].stock
// item.retailPrice = minRatilPrice == maxRatilPrice ? minRatilPrice.toFixed(2) : minRatilPrice.toFixed(2) + '-' + maxRatilPrice.toFixed(2)
// item.minRatilPrice = minRatilPrice.toFixed(2)
// item.goodsStock = minStock == maxStock ? minStock : minStock + '-' + maxStock
// } else if (item.specificationDetailList.length == 1) {
// item.retailPrice = (item.specificationDetailList[0].retailPrice / 100).toFixed(2)
// item.minRatilPrice = item.retailPrice
// item.goodsStock = item.specificationDetailList[0].stock
// } else {
// item.retailPrice = (item.retailPrice / 100).toFixed(2)
// item.minRatilPrice = item.retailPrice
// }
item.retailPrice = (item.retailPrice / 100).toFixed(2) item.retailPrice = (item.retailPrice / 100).toFixed(2)
}) })
this.recoverySelected() this.recoverySelected()
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
pageSize: 1000, pageSize: 1000,
shopId: this.$globalState.session.merchantId, shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName, labelGroupName: this.labelGroupName,
labelTypesStr: '自店标签,企业标签', labelTypesStr: '自店标签,企业标签,系统标签',
edition: this.$globalState.session.merchantModel edition: this.$globalState.session.merchantModel
} }
}) })
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.labelList, labelList: item.labelList,
labelType: item.labelType,
checked: false, checked: false,
tagChecked: [], tagChecked: [],
isIndeterminate: false, isIndeterminate: false,
...@@ -143,6 +144,7 @@ export default { ...@@ -143,6 +144,7 @@ export default {
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.labelList, labelList: item.labelList,
labelType: item.labelType,
checked: false, checked: false,
tagChecked: [], tagChecked: [],
isIndeterminate: false, isIndeterminate: false,
...@@ -210,9 +212,11 @@ export default { ...@@ -210,9 +212,11 @@ export default {
let labelTreeRets = this.labelTreeRetSelect let labelTreeRets = this.labelTreeRetSelect
.map(item => { .map(item => {
if (item.tagChecked.length) { if (item.tagChecked.length) {
console.log(item)
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.tagChecked labelList: item.tagChecked,
labelType: item.labelType
} }
} }
}) })
......
...@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) { ...@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) {
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') // return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span> <span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div> </div>
<div class="ctime"> <div class="ctime">
<span class="ctime_name">核销劵码:</span> <span class="ctime_name">核销券码:</span>
</div> </div>
<img class="ccode" src="../../assets/coupon/code2.png" /> <img class="ccode" src="../../assets/coupon/code2.png" />
<div class="ccodeName">GH078-003</div> <div class="ccodeName">GH078-003</div>
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
<div :class="editForm.status == 3 ? 'darkColor' : ''" class="ctime"> <div :class="editForm.status == 3 ? 'darkColor' : ''" class="ctime">
<!-- <span class="ctime_name">使用限制:</span> --> <!-- <span class="ctime_name">使用限制:</span> -->
<span class="ctime_content" style="font-size: 20px;font-weight: 600;" v-show="editForm.discountIntensity">{{ editForm.discountIntensity }}</span> <span class="ctime_content" style="font-size: 20px;font-weight: 600;"
v-show="editForm.discountIntensity">{{ editForm.discountIntensity }}</span>
<span v-show="editForm.discountIntensity" style="font-size: 12px;">折</span> <span v-show="editForm.discountIntensity" style="font-size: 12px;">折</span>
<span class="ctime_content">{{ editForm.useBarriers == 1 ? '无门槛' : '满' + editForm.full + '元可用' }}</span> <span class="ctime_content">{{ editForm.useBarriers == 1 ? '无门槛' : '满' + editForm.full + '元可用' }}</span>
</div> </div>
...@@ -79,12 +80,13 @@ ...@@ -79,12 +80,13 @@
</div> </div>
</div> </div>
</div> </div>
<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">
<template slot="directionalFlagHtml"> <template slot="directionalFlagHtml">
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio> <el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span> <span class="promptCopy">可用于营销活动和企微端发送给客户</span>
</div> </div>
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio> <el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
...@@ -97,14 +99,19 @@ ...@@ -97,14 +99,19 @@
</template> </template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block"> <el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'" id="effectiveTime">
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker> <el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange"
style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format"
:picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays" id="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'">
领取后 领取后
<el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px" :disabled="apear != 'couponAdd' || editForm.effectiveType != 1" /> <el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px"
:disabled="apear != 'couponAdd' || editForm.effectiveType != 1" />
天内有效 天内有效
</el-radio> </el-radio>
</el-form-item> </el-form-item>
...@@ -114,7 +121,9 @@ ...@@ -114,7 +121,9 @@
<el-form-item prop="full" ref="full"> <el-form-item prop="full" ref="full">
<el-radio v-model="editForm.useBarriers" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.useBarriers" label="2" :disabled="apear != 'couponAdd'">
满 满
<el-input v-model="editForm.full" @blur="loseFocus" style="width: 100px; margin-left: 5px; margin-right: 5px" :disabled="apear != 'couponAdd' || editForm.useBarriers != 2" /> <el-input v-model="editForm.full" @blur="loseFocus"
style="width: 100px; margin-left: 5px; margin-right: 5px"
:disabled="apear != 'couponAdd' || editForm.useBarriers != 2" />
元可用 元可用
</el-radio> </el-radio>
</el-form-item> </el-form-item>
...@@ -122,12 +131,14 @@ ...@@ -122,12 +131,14 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 --> <!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope"> <template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span> <span v-if="$isGroupUp">无库存限制</span>
<el-input :disabled="apear != 'couponAdd'" v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存"> <el-input :disabled="apear != 'couponAdd'" v-else class="w-150" v-model="editForm[scope.scope.name]"
placeholder="请输入库存">
<span slot="suffix">张</span> <span slot="suffix">张</span>
</el-input> </el-input>
</template> </template>
<template slot="useDescriptionHtml"> <template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" /> <el-input type="textarea" v-model="editForm.useDescription" style="width: 320px"
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</template> </template>
<template slot="editHtml"> <template slot="editHtml">
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button> <el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
...@@ -135,7 +146,9 @@ ...@@ -135,7 +146,9 @@
</glsx-combi-form> </glsx-combi-form>
<div v-if="$isGroupUp"> <div v-if="$isGroupUp">
<p class="edit-title">适用门店配置</p> <p class="edit-title">适用门店配置</p>
<glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule"></glsx-combi-form> <glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true"
:formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule">
</glsx-combi-form>
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
...@@ -528,15 +541,27 @@ export default { ...@@ -528,15 +541,27 @@ export default {
return obj return obj
}, },
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
handleConfirm() { handleConfirm() {
this.validateRules() this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = []
if (this.$isGroupUp) { if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => { this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
merchantval = merchantVaild merchantval = merchantVaild
merchantErrorObj = errorObj
}) })
} }
if (!valid) {
this.whereToGo(Object.keys(errorObj)[0])
} else if (!merchantval) {
this.whereToGo(Object.keys(merchantErrorObj)[0])
}
if (valid && merchantval) { if (valid && merchantval) {
var params = this.getCouponInfoParams() var params = this.getCouponInfoParams()
let method = '' let method = ''
...@@ -750,6 +775,7 @@ export default { ...@@ -750,6 +775,7 @@ export default {
text-align: center; text-align: center;
color: #fc5b32; color: #fc5b32;
} }
/* .ctime_name { /* .ctime_name {
width: 48px; width: 48px;
height: 17px; height: 17px;
...@@ -831,15 +857,18 @@ export default { ...@@ -831,15 +857,18 @@ export default {
word-break: break-word; word-break: break-word;
overflow: auto; overflow: auto;
} }
.promptCopy { .promptCopy {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
color: #999; color: #999;
margin-left: -10px; margin-left: -10px;
} }
.glsx-combi-form .el-form-item--small.el-form-item { .glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important; margin-top: 0px !important;
} }
.couponImg { .couponImg {
width: 69px; width: 69px;
height: 69px; height: 69px;
...@@ -849,6 +878,7 @@ export default { ...@@ -849,6 +878,7 @@ export default {
margin-top: -6px; margin-top: -6px;
margin-right: -6px; margin-right: -6px;
} }
.validityPeriod { .validityPeriod {
font-size: 12px; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
...@@ -856,31 +886,38 @@ export default { ...@@ -856,31 +886,38 @@ export default {
color: #a0a0a0; color: #a0a0a0;
margin: 0 16px 8px 16px; margin: 0 16px 8px 16px;
} }
.process { .process {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-bottom: 2px; margin-bottom: 2px;
} }
.process .process_text { .process .process_text {
margin-left: 2px; margin-left: 2px;
font-size: 12px; font-size: 12px;
color: #333; color: #333;
} }
.process img { .process img {
width: 12px; width: 12px;
height: 12px; height: 12px;
} }
.process .rightArrow { .process .rightArrow {
padding: 0 4px; padding: 0 4px;
} }
.slider { .slider {
height: 380px; height: 380px;
overflow: auto; overflow: auto;
} }
.slider::-webkit-scrollbar-thumb { .slider::-webkit-scrollbar-thumb {
background: transparent; background: transparent;
} }
.darkColor { .darkColor {
color: #999; color: #999;
} }
......
...@@ -53,18 +53,20 @@ ...@@ -53,18 +53,20 @@
</div> </div>
</div> </div>
<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">
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 --> <!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope"> <template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span> <span v-if="$isGroupUp">无库存限制</span>
<el-input :disabled="apear != 'couponAdd'" v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存"> <el-input :disabled="apear != 'couponAdd'" v-else class="w-150" v-model="editForm[scope.scope.name]"
placeholder="请输入库存">
<span slot="suffix">张</span> <span slot="suffix">张</span>
</el-input> </el-input>
</template> </template>
<template slot="directionalFlagHtml"> <template slot="directionalFlagHtml">
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio> <el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span> <span class="promptCopy">可用于营销活动和企微端发送给客户</span>
</div> </div>
<div> <div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio> <el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
...@@ -77,20 +79,26 @@ ...@@ -77,20 +79,26 @@
</template> </template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block"> <el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'" id="effectiveTime">
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker> <el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange"
style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format"
:picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays" id="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'">
领取后 领取后
<el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px" :disabled="apear != 'couponAdd' || editForm.effectiveType != 1" /> <el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px"
:disabled="apear != 'couponAdd' || editForm.effectiveType != 1" />
天内有效 天内有效
</el-radio> </el-radio>
</el-form-item> </el-form-item>
</template> </template>
<template slot="useDescriptionHtml"> <template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" /> <el-input type="textarea" v-model="editForm.useDescription" style="width: 320px"
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</template> </template>
<template slot="editHtml"> <template slot="editHtml">
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button> <el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
...@@ -98,7 +106,9 @@ ...@@ -98,7 +106,9 @@
</glsx-combi-form> </glsx-combi-form>
<div v-if="$isGroupUp"> <div v-if="$isGroupUp">
<p class="edit-title">适用门店配置</p> <p class="edit-title">适用门店配置</p>
<glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule"></glsx-combi-form> <glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true"
:formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule">
</glsx-combi-form>
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
...@@ -431,15 +441,27 @@ export default { ...@@ -431,15 +441,27 @@ export default {
return obj return obj
}, },
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
handleConfirm() { handleConfirm() {
this.validateRules() this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = []
if (this.$isGroupUp) { if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => { this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
merchantval = merchantVaild merchantval = merchantVaild
merchantErrorObj = errorObj
}) })
} }
if (!valid) {
this.whereToGo(Object.keys(errorObj)[0])
} else if (!merchantval) {
this.whereToGo(Object.keys(merchantErrorObj)[0])
}
if (valid && merchantval) { if (valid && merchantval) {
var params = this.getCouponInfoParams() var params = this.getCouponInfoParams()
let method = '' let method = ''
...@@ -617,15 +639,18 @@ export default { ...@@ -617,15 +639,18 @@ export default {
word-break: break-word; word-break: break-word;
overflow: auto; overflow: auto;
} }
.promptCopy { .promptCopy {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
color: #999; color: #999;
margin-left: -10px; margin-left: -10px;
} }
.glsx-combi-form .el-form-item--small.el-form-item { .glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important; margin-top: 0px !important;
} }
.couponImg { .couponImg {
width: 69px; width: 69px;
height: 69px; height: 69px;
...@@ -635,6 +660,7 @@ export default { ...@@ -635,6 +660,7 @@ export default {
margin-top: -6px; margin-top: -6px;
margin-right: -6px; margin-right: -6px;
} }
.validityPeriod { .validityPeriod {
font-size: 12px; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
...@@ -642,31 +668,38 @@ export default { ...@@ -642,31 +668,38 @@ export default {
color: #a0a0a0; color: #a0a0a0;
margin: 0 16px 8px 16px; margin: 0 16px 8px 16px;
} }
.process { .process {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-bottom: 2px; margin-bottom: 2px;
} }
.process .process_text { .process .process_text {
margin-left: 2px; margin-left: 2px;
font-size: 12px; font-size: 12px;
color: #333; color: #333;
} }
.process img { .process img {
width: 12px; width: 12px;
height: 12px; height: 12px;
} }
.process .rightArrow { .process .rightArrow {
padding: 0 4px; padding: 0 4px;
} }
.slider { .slider {
height: 380px; height: 380px;
overflow: auto; overflow: auto;
} }
.slider::-webkit-scrollbar-thumb { .slider::-webkit-scrollbar-thumb {
background: transparent; background: transparent;
} }
.darkColor { .darkColor {
color: #999; color: #999;
} }
......
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
</div> </div>
<div class="live-room container" style="padding-top: 20px;"> <div class="live-room container" style="padding-top: 20px;">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px"> <el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px" id="couponName">
<el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input> <el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="预估成本/元" prop="anticipatedCost" style="width: 440px"> <el-form-item size="small" label="预估成本/元" prop="anticipatedCost" style="width: 440px" id="anticipatedCost">
<el-input size="small" :disabled="disabledCost" v-model.trim="ruleForm.anticipatedCost" maxlength="20" placeholder="请输入预估成本"></el-input> <el-input size="small" :disabled="disabledCost" v-model.trim="ruleForm.anticipatedCost" maxlength="20" placeholder="请输入预估成本"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap"> <div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent"> <el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent">
<el-radio :label="3" class="itemBlock">无有效期</el-radio> <el-radio :label="3" class="itemBlock">永久有效</el-radio>
<!-- effectiveType:1, effectiveDays:5 --> <!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1"> <el-radio :label="1" id="effectiveDays">
领取后 领取后
<el-input v-model="ruleForm.effectiveDays" maxlength="4" @input=" <el-input v-model="ruleForm.effectiveDays" maxlength="4" @input="
val => { val => {
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
天内有效 天内有效
</el-radio> </el-radio>
<!-- effectiveStartTime effectiveEndTime +具体时间 --> <!-- effectiveStartTime effectiveEndTime +具体时间 -->
<el-radio :label="2"> <el-radio :label="2" id="daterange">
<el-date-picker :size="small" :disabled="title == '查看' || title == '编辑' || ruleForm.effectiveType != 2" style="width: 230px" v-model="ruleForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker> <el-date-picker :size="small" :disabled="title == '查看' || title == '编辑' || ruleForm.effectiveType != 2" style="width: 230px" v-model="ruleForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<el-button @click="add1" class="addsubBtn" :disabled="title == '查看' || title == '编辑' || ruleForm.customUseLimit != 1">+</el-button> <el-button @click="add1" class="addsubBtn" :disabled="title == '查看' || title == '编辑' || ruleForm.customUseLimit != 1">+</el-button>
次 次
</el-radio> </el-radio>
<el-radio :label="2"> <el-radio :label="2" id="limitDays">
有效期内每 有效期内每
<el-input v-model="ruleForm.limitDays" maxlength="4" @input=" <el-input v-model="ruleForm.limitDays" maxlength="4" @input="
val => { val => {
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 --> <!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<el-form-item size="small" label="库存" prop="stock" style="width: 315px"> <el-form-item size="small" label="库存" prop="stock" style="width: 315px">
<!-- <el-input size="small" :disabled="title == '查看'" maxlength="6" v-model.number="ruleForm.stock" placeholder="请输入"></el-input> --> <!-- <el-input size="small" :disabled="title == '查看'" maxlength="6" v-model.number="ruleForm.stock" placeholder="请输入"></el-input> -->
<span v-if="$isGroupUp">永久有效</span> <span v-if="$isGroupUp">无库存限制</span>
<el-input :disabled="title == '查看'" v-else class="w-150" v-model="ruleForm.stock" placeholder="请输入库存"> <el-input :disabled="title == '查看'" v-else class="w-150" v-model="ruleForm.stock" placeholder="请输入库存">
<span slot="suffix">张</span> <span slot="suffix">张</span>
</el-input> </el-input>
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
// delivery: false, // delivery: false,
// type: [], // type: [],
// resource: '', // resource: '',
effectiveType: 3, //有效期(默认无有效期) effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '', effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数) customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1, limitTime1: 1,
...@@ -400,14 +400,27 @@ export default { ...@@ -400,14 +400,27 @@ export default {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
}) })
}, },
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = []
if (this.$isGroupUp) { if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => { this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
merchantval = merchantVaild merchantval = merchantVaild
merchantErrorObj = errorObj
}) })
} }
if (!valid) {
this.whereToGo(Object.keys(errorObj)[0])
} else if (!merchantval) {
this.whereToGo(Object.keys(merchantErrorObj)[0])
}
if (valid && merchantval) { if (valid && merchantval) {
if (this.isEdit == true) { if (this.isEdit == true) {
this.updateService() this.updateService()
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="m-b-10"> <div class="m-b-10">
<GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addService()" fn="新建服务券" display="disabled" mode="el-button">新建服务券</GLButton> <GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addService()" fn="新建服务券" display="disabled" mode="el-button">新建服务券</GLButton>
<GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addCashCoupon()" fn="新建代金券" display="disabled" mode="el-button">新建代金券</GLButton> <GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addCashCoupon()" fn="新建代金券" display="disabled" mode="el-button">新建代金券</GLButton>
<GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addDiscountCoupon()" fn="新建折扣劵" display="disabled" mode="el-button">新建折扣劵</GLButton> <GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addDiscountCoupon()" fn="新建折扣券" display="disabled" mode="el-button">新建折扣券</GLButton>
<GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addExchangeCoupon()" fn="新建兑换券" display="disabled" mode="el-button">新建兑换券</GLButton> <GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addExchangeCoupon()" fn="新建兑换券" display="disabled" mode="el-button">新建兑换券</GLButton>
</div> </div>
<div class="container"> <div class="container">
...@@ -358,12 +358,12 @@ export default { ...@@ -358,12 +358,12 @@ export default {
}) })
}, },
//新增折扣劵 //新增折扣券
addDiscountCoupon() { addDiscountCoupon() {
this.$router.push('/couponManage/editDiscountCoupon/1') this.$router.push('/couponManage/editDiscountCoupon/1')
}, },
//新增兑换劵 //新增兑换券
addExchangeCoupon() { addExchangeCoupon() {
this.$router.push('/couponManage/editExchangeCoupon/1') this.$router.push('/couponManage/editExchangeCoupon/1')
}, },
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
}) })
return true return true
} else if (row.discountType == '2') { } else if (row.discountType == '2') {
//折扣劵 //折扣券
goto = '/couponManage/editDiscountCoupon/' goto = '/couponManage/editDiscountCoupon/'
} else if (row.discountType == '4') { } else if (row.discountType == '4') {
//兑换券 //兑换券
......
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
this.editForm.couponList.forEach(item => { this.editForm.couponList.forEach(item => {
this.couponObj[this.numToCoupon[item.discountType]].list.push(item) this.couponObj[this.numToCoupon[item.discountType]].list.push(item)
}) })
console.log(this.couponObj,'this.couponObj') // console.log(this.couponObj, 'this.couponObj')
this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList) this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList) this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false) this.hasCouponBlock(false)
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
this.couponObj[item].list.forEach(subItem => { this.couponObj[item].list.forEach(subItem => {
// 失效券不加入预估成本 // 失效券不加入预估成本
if (subItem.status != '3') { if (subItem.status != '3') {
this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost) * parseInt(subItem.couponAmount) this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost || 0) * parseInt(subItem.couponAmount)
} }
}) })
}) })
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
}, },
handleGiftAdd() { handleGiftAdd() {
console.log(this.couponObj,'') // console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj)) this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose() this.handleGiftClose()
}, },
...@@ -471,7 +471,7 @@ export default { ...@@ -471,7 +471,7 @@ export default {
.then(() => { .then(() => {
this.insertHttp(params) this.insertHttp(params)
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.insertHttp(params) this.insertHttp(params)
} }
...@@ -512,7 +512,7 @@ export default { ...@@ -512,7 +512,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
......
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
...@@ -40,6 +40,14 @@ ...@@ -40,6 +40,14 @@
</div> </div>
</div> </div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="orderType" slot-scope="scope">
<template v-if="scope.scope.orderType == 1">
<span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span>
</template>
<template v-else>
<span>会员卡</span>
</template>
</template>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button> <!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
<el-button type="text" style="color:#eee" v-else>详情</el-button> --> <el-button type="text" style="color:#eee" v-else>详情</el-button> -->
...@@ -117,9 +125,10 @@ export default { ...@@ -117,9 +125,10 @@ export default {
{ {
label: '类型', label: '类型',
prop: 'orderType', prop: 'orderType',
formatter: cellValue => { addHtml: 'orderType'
return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName // formatter: cellValue => {
} // return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// }
}, },
{ {
label: '价格', label: '价格',
...@@ -227,7 +236,7 @@ export default { ...@@ -227,7 +236,7 @@ export default {
}, },
handleRefund(data) { handleRefund(data) {
this.orderCode = data.orderCode this.orderCode = data.orderCode
this.refund ='' this.refund = ''
this.refundVisible = !this.refundVisible this.refundVisible = !this.refundVisible
}, },
refundConfirmDialog() { refundConfirmDialog() {
...@@ -282,6 +291,7 @@ export default { ...@@ -282,6 +291,7 @@ export default {
this.currentIndex = 1 this.currentIndex = 1
this.searchForm = {} this.searchForm = {}
this.searchForm.orderStatus = '' //默认查询全部 this.searchForm.orderStatus = '' //默认查询全部
this.searchForm.orderType = ''
// this.handleSearch() // this.handleSearch()
this.$nextTick(() => { this.$nextTick(() => {
this.isReload = true this.isReload = true
...@@ -309,10 +319,10 @@ export default { ...@@ -309,10 +319,10 @@ export default {
display: flex; display: flex;
height: auto; height: auto;
position: relative; position: relative;
width:285px; width: 285px;
left: calc(100% - 285px); left: calc(100% - 285px);
.choseItem { .choseItem {
display:inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
......
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap"> <div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent"> <el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent">
<el-radio :label="3" class="itemBlock">无有效期</el-radio> <el-radio :label="3" class="itemBlock">永久有效</el-radio>
<!-- effectiveType:1, effectiveDays:5 --> <!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1"> <el-radio :label="1">
领取后 领取后
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
// delivery: false, // delivery: false,
// type: [], // type: [],
// resource: '', // resource: '',
effectiveType: 3, //有效期(默认无有效期) effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '', effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数) customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1, limitTime1: 1,
......
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton> <GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton> <GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template> </template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton> <GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2 && accountLevel != 4" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1">已置顶推荐</el-button> <el-button type="text" v-if="scope.scope.topFlag == 1 && accountLevel != 4">已置顶推荐</el-button>
</template> </template>
</span> </span>
</GLTable> </GLTable>
......
...@@ -117,11 +117,12 @@ export default { ...@@ -117,11 +117,12 @@ export default {
packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }] packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }]
}, },
allItemList: [], allItemList: [],
choseItemList: [], //['一年12次洗车劵×1', '车身打蜡×2', '全车镀膜×1'], choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'],
copyChoseItemList: [], //用于检查页面信息是否改动 copyChoseItemList: [], //用于检查页面信息是否改动
merchantId: 44184606, merchantId: 44184606,
merchantName: '', merchantName: '',
setmealContentRules: false, setmealContentRules: false,
isConfig: false,
//弹窗 //弹窗
//弹窗2(提示弹窗) //弹窗2(提示弹窗)
isTipDialogVisible: false, isTipDialogVisible: false,
...@@ -304,7 +305,7 @@ export default { ...@@ -304,7 +305,7 @@ export default {
}) })
}, },
submitForm(formName) { submitForm(formName) {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(async valid => {
if (!valid) { if (!valid) {
if (this.choseItemList.length <= 0) { if (this.choseItemList.length <= 0) {
this.setmealContentRules = true this.setmealContentRules = true
...@@ -315,11 +316,13 @@ export default { ...@@ -315,11 +316,13 @@ export default {
this.setmealContentRules = true this.setmealContentRules = true
return return
} }
if (this.id) { if (this.id) {
//需要调config的接口???? //需要调config的接口????
// scrm.api.equity.package.service.config // scrm.api.equity.package.service.config
this.configFun()
//调修改的接口 //调修改的接口
this.configFun().then(result => {
if (!result) {
let param = {} let param = {}
param.id = this.id param.id = this.id
param.merchantId = this.merchantId param.merchantId = this.merchantId
...@@ -351,6 +354,8 @@ export default { ...@@ -351,6 +354,8 @@ export default {
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
}) })
}
})
} else { } else {
//调创建的接口 //调创建的接口
let params = {} let params = {}
...@@ -388,6 +393,7 @@ export default { ...@@ -388,6 +393,7 @@ export default {
}) })
}, },
configFun() { configFun() {
return new Promise(resolve => {
let params = {} let params = {}
params.id = this.id params.id = this.id
let list = this.choseItemList let list = this.choseItemList
...@@ -396,7 +402,16 @@ export default { ...@@ -396,7 +402,16 @@ export default {
params[`list[${i}].serviceId`] = list[i].id params[`list[${i}].serviceId`] = list[i].id
} }
configSetMeal(params).then(res => { configSetMeal(params).then(res => {
console.log('配置接口', res.data) if (res.code == -1) {
this.$message({
message: res.message,
type: 'error'
})
resolve(true)
} else {
resolve(false)
}
})
}) })
}, },
......
...@@ -893,7 +893,7 @@ export default { ...@@ -893,7 +893,7 @@ export default {
}, },
// 库存 // 库存
'editForm.goodsStock'(newValue, oldValue) { 'editForm.goodsStock'(newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg') this.editForm.goodsStock = limitPrice(newValue, oldValue, 9, 0, 0, 10000000000, 'zNumReg')
}, },
// 运费 // 运费
'editForm.expressFee'(newValue, oldValue) { 'editForm.expressFee'(newValue, oldValue) {
...@@ -1095,7 +1095,7 @@ export default { ...@@ -1095,7 +1095,7 @@ export default {
if (e.key != 'Backspace' && newValue.length > 1) { if (e.key != 'Backspace' && newValue.length > 1) {
oldValue = newValue.slice(0, newValue.length - 1) oldValue = newValue.slice(0, newValue.length - 1)
} }
this.nameToValSpecsList[idx].stock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg') this.nameToValSpecsList[idx].stock = limitPrice(newValue, oldValue, 9, 0, 0, 10000000000, 'zNumReg')
}, },
// 二次确认 // 二次确认
secondSimpleConfirm(title, txt, fn) { secondSimpleConfirm(title, txt, fn) {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<template> <template>
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton> <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
...@@ -25,8 +24,6 @@ ...@@ -25,8 +24,6 @@
</div> </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="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button> <el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton> <GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button> <el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
...@@ -336,10 +333,12 @@ export default { ...@@ -336,10 +333,12 @@ export default {
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(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 = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function (a, b) { let stockeList = JSON.parse(JSON.stringify(item.specificationDetailList))
stockeList.sort((a, b) => {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -386,10 +386,12 @@ export default { ...@@ -386,10 +386,12 @@ export default {
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(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 = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function (a, b) { let stockeList = JSON.parse(JSON.stringify(item.specificationDetailList))
stockeList.sort((a, b) => {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -43,8 +43,13 @@ export default { ...@@ -43,8 +43,13 @@ export default {
editEvent editEvent
}, },
beforeRouteLeave(to, from, next) {
this.$common.utils.storage.get('sopInfo') && this.$common.utils.storage.remove('sopInfo')
next()
},
created() { created() {
this.routeInfo = this.$route.query this.routeInfo = Object.keys(this.$route.query).length ? this.$route.query : this.$common.utils.storage.get('sopInfo')
}, },
methods: { methods: {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<template v-else> <template v-else>
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(subIdx)"> <el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(subIdx)">
<!-- <i class="el-icon-user-solid"></i> --> <!-- <i class="el-icon-user-solid"></i> -->
<span>{{ subItem[item.listConf.confName] }}</span> <span>{{ subItem[item.listConf.confName] || subItem[item.listConf.otherConfName] }}</span>
</el-tag> </el-tag>
</template> </template>
</div> </div>
...@@ -97,9 +97,9 @@ ...@@ -97,9 +97,9 @@
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
</div> </div>
<select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="customerDataList[0].list" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd> <select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag> <select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :selectedCustomerList="customerDataList[2].list" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer> <select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :parentSelectedCustomerList="customerDataList[2].list" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer>
</div> </div>
</template> </template>
...@@ -171,7 +171,8 @@ export default { ...@@ -171,7 +171,8 @@ export default {
customerCount: '', customerCount: '',
listConf: { listConf: {
confId: 'id', confId: 'id',
confName: 'customerName' confName: 'customerName',
otherConfName: 'customerPhone'
}, },
list: [] list: []
} }
...@@ -185,7 +186,7 @@ export default { ...@@ -185,7 +186,7 @@ export default {
customerOptType: '', customerOptType: '',
customerInfoList: [], customerInfoList: [],
// customerIds: [], // customerIds: [],
customerOptUpdate: '2', customerOptUpdate: '1',
eventList: [] eventList: []
}, },
editRule: { editRule: {
...@@ -239,11 +240,11 @@ export default { ...@@ -239,11 +240,11 @@ export default {
isDisabled: false, isDisabled: false,
optionList: [ optionList: [
{ {
confId: '1', confId: '2',
confName: '自动更新' confName: '自动更新'
}, },
{ {
confId: '2', confId: '1',
confName: '从不更新' confName: '从不更新'
} }
] ]
...@@ -275,7 +276,7 @@ export default { ...@@ -275,7 +276,7 @@ export default {
return { return {
// add-新增;edit-编辑;look-查看 // add-新增;edit-编辑;look-查看
addOrEdit: 'add', addOrEdit: 'add',
fromPage: 'index', fromPage: '/marketing/sop/index',
id: '' id: ''
} }
} }
...@@ -301,6 +302,8 @@ export default { ...@@ -301,6 +302,8 @@ export default {
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
if (this.routeInfo.addOrEdit == 'edit') { if (this.routeInfo.addOrEdit == 'edit') {
this.getInfo() this.getInfo()
} else if (this.routeInfo.info) {
this.setCustomer()
} }
}, },
...@@ -394,6 +397,15 @@ export default { ...@@ -394,6 +397,15 @@ export default {
} }
}, },
setCustomer() {
this.editForm.customerOptType = this.routeInfo.info.customerOptType
if (this.routeInfo.info.customerOptType) {
this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType)
this.editForm[this.customerDataList[this.currentCustomerIdx].reqListName] = this.routeInfo.info[this.customerDataList[this.currentCustomerIdx].reqListName]
this.recoverCustomerList()
}
},
getInfo() { getInfo() {
this.$apis.sop.getSopInfoDetailApi({ sopId: this.routeInfo.id }).then(res => { this.$apis.sop.getSopInfoDetailApi({ sopId: this.routeInfo.id }).then(res => {
// console.log(res) // console.log(res)
...@@ -492,7 +504,6 @@ export default { ...@@ -492,7 +504,6 @@ export default {
// 选择标签 // 选择标签
handleDialogConfirm(obj) { handleDialogConfirm(obj) {
console.log(obj)
switch (this.customerDataList[this.currentCustomerIdx].confName) { switch (this.customerDataList[this.currentCustomerIdx].confName) {
case '人群': case '人群':
this.handleCrowdCustClose() this.handleCrowdCustClose()
...@@ -531,7 +542,7 @@ export default { ...@@ -531,7 +542,7 @@ export default {
break break
case 1: case 1:
this.isTagVisible = !this.isTagVisible this.isTagVisible = !this.isTagVisible
this.$refs.selectTagForm.init(this.customerDataList[idx].list) this.$refs.selectTagForm.init(JSON.parse(JSON.stringify(this.customerDataList[idx].list)))
break break
case 2: case 2:
this.handleAppointCustClose() this.handleAppointCustClose()
...@@ -653,6 +664,7 @@ export default { ...@@ -653,6 +664,7 @@ export default {
list.push({ list.push({
labelGroupId: item.labelGroup.id, labelGroupId: item.labelGroup.id,
labelGroupName: item.labelGroup.name, labelGroupName: item.labelGroup.name,
labelGroupType: item.labelType,
labelId: subItem.id, labelId: subItem.id,
labelName: subItem.name labelName: subItem.name
}) })
...@@ -794,8 +806,8 @@ export default { ...@@ -794,8 +806,8 @@ export default {
}) })
}, },
cancelJump() { cancelJump() {
this.$router.push({ this.$history.push({
path: '/sop/' + this.routeInfo.fromPage path: this.routeInfo.fromPage
}) })
}, },
......
...@@ -13,17 +13,26 @@ ...@@ -13,17 +13,26 @@
</el-tabs> </el-tabs>
</div> </div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)"> <div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList"
:key="index" @click="handleSelectItem(item)">
<div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div> <div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div> <div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div>
<!-- <div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div> --> <!-- <div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div> -->
<div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div> <div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div> </div>
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}
</div>
<div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div> <div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div>
<div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div> <div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{
item.effectiveDays
}}天</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{
item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : ''
}}~{{ item.effectiveEndTime ?
item.effectiveEndTime.split(' ')[0] : ''
}}</div>
<!-- <div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div> <!-- <div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div> --> <div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div> -->
...@@ -64,14 +73,19 @@ ...@@ -64,14 +73,19 @@
<img src="@/assets/empty.png" /> <img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div> <div class="empty-item">暂无数据</div>
</div> </div>
<el-pagination v-if="activeName != 3" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination> <el-pagination v-if="activeName != 3" @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 2 && memberMenu">立即添加</el-button> <el-button size="small" type="primary" @click="handleOpen"
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 4 && couponMenu">立即添加</el-button> v-show="modelList.length == 0 && activeName == 2 && memberMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 5 && activityMenu">立即添加</el-button> <el-button size="small" type="primary" @click="handleOpen"
v-show="modelList.length == 0 && activeName == 4 && couponMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen"
v-show="modelList.length == 0 && activeName == 5 && activityMenu">立即添加</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -182,6 +196,7 @@ export default { ...@@ -182,6 +196,7 @@ export default {
} }
if (this.activeName == 2) { if (this.activeName == 2) {
params.discountTypes = [2, 3, 4] params.discountTypes = [2, 3, 4]
params.directionalFlag = 1
params.validType = 'valid' params.validType = 'valid'
} }
if (this.activeName == 5) { if (this.activeName == 5) {
...@@ -255,29 +270,35 @@ export default { ...@@ -255,29 +270,35 @@ export default {
} }
} }
} }
.sop-activity-model.model-panel { .sop-activity-model.model-panel {
.model-panel-tab { .model-panel-tab {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 18px; margin-bottom: 18px;
label { label {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
line-height: 24px; line-height: 24px;
} }
/deep/ { /deep/ {
.el-checkbox:last-of-type { .el-checkbox:last-of-type {
margin-right: 8px; margin-right: 8px;
} }
.el-tabs__nav { .el-tabs__nav {
border: 0; border: 0;
} }
.el-tabs__header { .el-tabs__header {
border: 0; border: 0;
background-color: #f4f6fc; background-color: #f4f6fc;
margin: 0px; margin: 0px;
} }
.el-tabs__item { .el-tabs__item {
border: none; border: none;
width: 180px; width: 180px;
...@@ -287,6 +308,7 @@ export default { ...@@ -287,6 +308,7 @@ export default {
text-align: center; text-align: center;
background: #f4f6fc; background: #f4f6fc;
} }
.el-tabs__item.is-active { .el-tabs__item.is-active {
background-color: #fff !important; background-color: #fff !important;
border-radius: 4px; border-radius: 4px;
...@@ -294,13 +316,15 @@ export default { ...@@ -294,13 +316,15 @@ export default {
} }
} }
} }
.model-item-empty { .model-item-empty {
> img { >img {
display: block; display: block;
margin: 50px auto 0px; margin: 50px auto 0px;
width: 60px; width: 60px;
height: auto; height: auto;
} }
.empty-item { .empty-item {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
...@@ -310,6 +334,7 @@ export default { ...@@ -310,6 +334,7 @@ export default {
margin-bottom: 30px; margin-bottom: 30px;
} }
} }
.model-item-panel { .model-item-panel {
// display: grid; // display: grid;
// grid-template-columns: repeat(4, 25%); // grid-template-columns: repeat(4, 25%);
...@@ -320,6 +345,7 @@ export default { ...@@ -320,6 +345,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
align-items: stretch; align-items: stretch;
flex-direction: row; flex-direction: row;
.model-item { .model-item {
width: 240px; width: 240px;
margin-right: 24px; margin-right: 24px;
...@@ -332,13 +358,16 @@ export default { ...@@ -332,13 +358,16 @@ export default {
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
padding: 14px 24px; padding: 14px 24px;
box-sizing: border-box; box-sizing: border-box;
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0px; margin-right: 0px;
} }
&.checked { &.checked {
background: rgba(88, 80, 255, 0.1); background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
&-qrcode { &-qrcode {
position: absolute; position: absolute;
right: 10px; right: 10px;
...@@ -347,6 +376,7 @@ export default { ...@@ -347,6 +376,7 @@ export default {
height: 60px; height: 60px;
border: 1px solid #979797; border: 1px solid #979797;
} }
&-title { &-title {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
...@@ -357,6 +387,7 @@ export default { ...@@ -357,6 +387,7 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
&-content { &-content {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
...@@ -367,15 +398,18 @@ export default { ...@@ -367,15 +398,18 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
&.model-item-weight { &.model-item-weight {
line-height: 20px; line-height: 20px;
height: 20px; height: 20px;
} }
span { span {
color: #5850ff; color: #5850ff;
font-size: 20px; font-size: 20px;
} }
} }
&-contents { &-contents {
line-height: 22px; line-height: 22px;
height: 22px; height: 22px;
......
...@@ -27,9 +27,7 @@ export default { ...@@ -27,9 +27,7 @@ export default {
return { return {
url: url, url: url,
searchForm: { searchForm: {
req: { keyword: ''
crowdType: 2
}
}, },
total: 0, total: 0,
crowdList: [], crowdList: [],
...@@ -104,6 +102,7 @@ export default { ...@@ -104,6 +102,7 @@ export default {
}, },
mounted() { mounted() {
this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425 this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList() this.getList()
...@@ -114,6 +113,8 @@ export default { ...@@ -114,6 +113,8 @@ export default {
var params = { var params = {
req: { req: {
...this.searchForm, ...this.searchForm,
crowdType: 3,
merchantId: this.userInfo.merchantId,
pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1, pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1,
pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10 pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10
} }
...@@ -126,17 +127,14 @@ export default { ...@@ -126,17 +127,14 @@ export default {
this.crowdList.forEach((item, index) => { this.crowdList.forEach((item, index) => {
item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1 item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
}) })
this.selectedCrowdList.length && (this.selectedCrowdId = this.selectedCrowdList[0].crowdId) this.selectedCrowdList.length && (this.selectedCrowdId = +this.selectedCrowdList[0].crowdId)
// this.recoverySelected()
this.$refs.crowdRef.tableHeightValues = '460px' this.$refs.crowdRef.tableHeightValues = '460px'
}) })
}, },
setTableFinishFun() { setTableFinishFun() {
this.crowdList = this.$refs.crowdRef.data this.crowdList = this.$refs.crowdRef.data
// this.recoverySelected()
//接收到的数据为空 //接收到的数据为空
// this.$refs.crowdRef.tableHeightValues = this.$refs.crowdRef.data.length ? '' : '400px'
this.$refs.crowdRef.tableHeightValues = '460px' this.$refs.crowdRef.tableHeightValues = '460px'
}, },
......
<template> <template>
<div class="select-cutomer"> <div class="select-cutomer">
<el-dialog title="选择客户" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false"> <el-dialog title="选择客户" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false">
<!-- <div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div> -->
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer"> <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
...@@ -9,15 +8,6 @@ ...@@ -9,15 +8,6 @@
</glsx-combi-form> </glsx-combi-form>
<div class="flex-default"> <div class="flex-default">
<div class="customer-list"> <div class="customer-list">
<!-- <div class="customer-tag-box">
<span class="tag-label">用户标签:</span>
<div class="el-input-tag input-tag-wrapper" @click="handleClickTag">
<span v-if="!selectedLabelList.length" style="color: #BFBFBF;">请选择标签筛选客户</span>
<span v-for="(tag, idx) in selectedLabelList" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" :disable-transitions="false">{{ tagItem.name }}</el-tag>
</span>
</div>
</div> -->
<p class="list-title p-16">客户列表(最多仅可选200个客户)</p> <p class="list-title p-16">客户列表(最多仅可选200个客户)</p>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable> <GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div> </div>
...@@ -32,7 +22,6 @@ ...@@ -32,7 +22,6 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<!-- <a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> -->
<el-button size="small" @click="handleClose">取 消</el-button> <el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button> <el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span> </span>
...@@ -50,7 +39,9 @@ export default { ...@@ -50,7 +39,9 @@ export default {
url: url, url: url,
searchForm: {}, searchForm: {},
customerList: [], customerList: [],
selectedCustomerList: [],
heightBox: 200, heightBox: 200,
maxCustNum: 200,
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
...@@ -153,11 +144,7 @@ export default { ...@@ -153,11 +144,7 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
selectedLabelList: { parentSelectedCustomerList: {
type: Array,
default: () => []
},
selectedCustomerList: {
type: Array, type: Array,
default: () => [] default: () => []
} }
...@@ -166,35 +153,12 @@ export default { ...@@ -166,35 +153,12 @@ export default {
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425 this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList))
}, },
methods: { methods: {
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchForm = {
// combineType: 2,
// tagLists: []
// }
// this.selectedLabelList.length &&
// this.selectedLabelList.forEach(item => {
// item.labelList.length &&
// item.labelList.forEach(subItem => {
// this.searchForm.tagLists.push({
// groupId: item.labelGroup.id,
// groupName: item.labelGroup.name,
// groupType: item.labelType,
// labelId: subItem.id,
// labelName: subItem.name
// })
// })
// })
// this.getListApi = this.selectedLabelList.length ? this.$apis.sop.getCustomerByTagListApi : this.$apis.sop.getCustomerListApi
// resolve()
// })
// },
handleSearch() { handleSearch() {
this.$refs.customerRef.refreshTable() this.$refs.customerRef.refreshTable(true, false)
}, },
setTableFinishFun() { setTableFinishFun() {
...@@ -212,11 +176,10 @@ export default { ...@@ -212,11 +176,10 @@ export default {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true) this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
} }
}) })
if (this.selectedCustomerList.length >= 5) { if (this.selectedCustomerList.length >= this.maxCustNum) {
let tableIds = this.selectedCustomerList.map(item => item.id) let selectIds = this.selectedCustomerList.map(item => item.id)
console.log(tableIds)
this.tableList.forEach((row, idx) => { this.tableList.forEach((row, idx) => {
if (!tableIds.includes(row.id)) { if (!selectIds.includes(row.id)) {
this.tableParams.checkSelectVal.push(row.id) this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false) this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false)
} }
...@@ -228,19 +191,22 @@ export default { ...@@ -228,19 +191,22 @@ export default {
}, },
handleSelectionTable(val) { handleSelectionTable(val) {
// 未选客户时,筛选客户条件
// if (!this.selectedCustomerList.length) {
// this.dealCondLimit(val[0])
// }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList)) let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id) let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val)) var selectIds = currentList.map(item => item.id)
var selectIds = this.selectedCustomerList.map(item => item.id) var selectedIds = val.map(item => item.id)
currentList.forEach(item => { var tempList = []
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) { val.forEach(item => {
if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) {
this.selectedCustomerList.push(item) this.selectedCustomerList.push(item)
} }
}) })
this.selectedCustomerList.forEach(item => {
if (selectedIds.includes(item.id) || !tableIds.includes(item.id)) {
tempList.push(item)
}
})
this.selectedCustomerList = tempList
this.recoverySelected() this.recoverySelected()
}, },
......
...@@ -18,20 +18,20 @@ ...@@ -18,20 +18,20 @@
<div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope"> <div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope">
<div class="flex-default m-r-20" v-if="editForm.repeatMode == 2"> <div class="flex-default m-r-20" v-if="editForm.repeatMode == 2">
<p style="width: 50px">每周</p> <p style="width: 50px">每周</p>
<el-select :size="size" v-model="editForm[scope.scope.name]" placeholder="请选择每周指定日期"> <el-select :size="size" v-model="editForm[scope.scope.name]" placeholder="请选择每周指定日期" @change="handleResetMaxSet">
<el-option v-for="item in baseData.weekList" :key="item.confId" :label="item.confName" :value="item.confId"></el-option> <el-option v-for="item in baseData.weekList" :key="item.confId" :label="item.confName" :value="item.confId"></el-option>
</el-select> </el-select>
</div> </div>
<div class="flex-default m-r-20" v-if="editForm.repeatMode == 3"> <div class="flex-default m-r-20" v-if="editForm.repeatMode == 3">
<p style="width: 50px">每月</p> <p style="width: 50px">每月</p>
<el-select :size="size" v-model="editForm[scope.scope.name]" placeholder="请选择每月指定日期"> <el-select :size="size" v-model="editForm[scope.scope.name]" placeholder="请选择每月指定日期" @change="handleResetMaxSet">
<el-option v-for="item in baseData.monthList" :key="item.confId" :label="item.confName" :value="item.confId"></el-option> <el-option v-for="item in baseData.monthList" :key="item.confId" :label="item.confName" :value="item.confId"></el-option>
</el-select> </el-select>
</div> </div>
<div>重复循环至</div> <div>重复循环至</div>
</div> </div>
<div slot="eventEndDate" slot-scope="scope"> <div slot="eventEndDate" slot-scope="scope">
<el-date-picker v-model="editForm[scope.scope.name]" :disabled="!editForm.eventStartDate" :placeholder="scope.scope.placeholder" :value-format="scope.scope.valueFormat" :clearable="scope.scope.isClear" :picker-options="scope.scope.customPickerOptions"></el-date-picker> <el-date-picker v-model="editForm[scope.scope.name]" :disabled="!editForm.eventStartDate" :placeholder="scope.scope.placeholder" :value-format="scope.scope.valueFormat" :clearable="scope.scope.isClear" :picker-options="scope.scope.customPickerOptions" @change="handleResetMaxSet"></el-date-picker>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">营销渠道</p> <p class="edit-title">营销渠道</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataChannel" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataChannel" :formRules="editRule">
<div v-show="editForm.pushChannelType" slot="channelSuffix" class="edit-tips m-t-8">预估受众用户总数:{{ editForm.pushChannelType == 2 ? predictCountObj.phone : predictCountObj.qiwei }} /{{ predictCountObj.total }}</div> <div v-show="editForm.pushChannelType" slot="channelSuffix" class="edit-tips m-t-8">预估受众用户总数:{{ editForm.pushChannelType == 2 ? predictCountObj.phone : predictCountObj.qiwei }} / {{ predictCountObj.total }}</div>
<template slot="reachesType" slot-scope="scope"> <template slot="reachesType" slot-scope="scope">
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleReachesType" :disabled="editForm.repeatFlag == 'N'"> <el-radio-group v-model="editForm[scope.scope.name]" @change="handleReachesType" :disabled="editForm.repeatFlag == 'N'">
<el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio> <el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio>
...@@ -86,8 +86,10 @@ ...@@ -86,8 +86,10 @@
同一用户最多参与 同一用户最多参与
<el-form-item prop="reachesTypeSet"> <el-form-item prop="reachesTypeSet">
<el-input v-model="editForm.reachesTypeSet"></el-input> <el-input v-model="editForm.reachesTypeSet"></el-input>
<div v-show="editForm.reachesTypeSet && maxReachesTypeSet">
<span class="txt-red" v-if="+maxReachesTypeSet < editForm.reachesTypeSet">该用户最多能参与{{ maxReachesTypeSet }}次</span> <span class="txt-red" v-if="+maxReachesTypeSet < editForm.reachesTypeSet">该用户最多能参与{{ maxReachesTypeSet }}次</span>
<span class="txt-red" v-else-if="editForm.reachesTypeSet < 2">只能输入2及以上的数字</span> <span class="txt-red" v-else-if="editForm.reachesTypeSet < 2">只能输入2及以上的数字</span>
</div>
</el-form-item> </el-form-item>
次 次
</span> </span>
...@@ -294,6 +296,7 @@ export default { ...@@ -294,6 +296,7 @@ export default {
handleRadioChange: val => { handleRadioChange: val => {
this.editForm.repeatTime = '' this.editForm.repeatTime = ''
this.editForm.eventEndDate = '' this.editForm.eventEndDate = ''
this.maxReachesTypeSet = ''
} }
} }
], ],
...@@ -360,7 +363,7 @@ export default { ...@@ -360,7 +363,7 @@ export default {
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'id', optionId: 'id',
optionLabel: 'businessName', optionLabel: 'followName',
optionsName: 'staffTypeList' optionsName: 'staffTypeList'
}, },
{ {
...@@ -434,6 +437,12 @@ export default { ...@@ -434,6 +437,12 @@ export default {
}, },
'editForm.reachesTypeSet'(newValue, oldValue) { 'editForm.reachesTypeSet'(newValue, oldValue) {
this.editForm.reachesTypeSet = limitPrice(newValue, oldValue, 5, 0, 1, 9999, 'zNumReg') this.editForm.reachesTypeSet = limitPrice(newValue, oldValue, 5, 0, 1, 9999, 'zNumReg')
},
'editForm.object.additionalType'(val) {
var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
this.editFormDataChannel[idx].optionList[0].isDisabled = val == '4'
this.editFormDataChannel[idx].optionList[1].isDisabled = val == '4'
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
} }
}, },
...@@ -482,8 +491,12 @@ export default { ...@@ -482,8 +491,12 @@ export default {
} }
}, },
handleResetMaxSet() {
this.maxReachesTypeSet = ''
},
getStaffTypeList() { getStaffTypeList() {
this.$apis.common.getStaffTypeListApi({ flag: 0 }).then(res => { this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId') this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
}) })
...@@ -566,6 +579,7 @@ export default { ...@@ -566,6 +579,7 @@ export default {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材) // objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val)) this.editForm.object = JSON.parse(JSON.stringify(val))
this.editForm.pushChannelType = ''
if (val.showTxtContent) { if (val.showTxtContent) {
this.editForm.eventContent = val.showTxtContent this.editForm.eventContent = val.showTxtContent
} }
...@@ -651,8 +665,8 @@ export default { ...@@ -651,8 +665,8 @@ export default {
pageNum: 1, pageNum: 1,
tagLists: [] tagLists: []
} }
this.parentCustomerObj.list.list && this.parentCustomerObj.list &&
this.parentCustomerObj.list.list.forEach(item => { this.parentCustomerObj.list.forEach(item => {
item.labelList.length && item.labelList.length &&
item.labelList.forEach(subItem => { item.labelList.forEach(subItem => {
params.tagLists.push({ params.tagLists.push({
......
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id, fromPage: 'index' } : '' query: row ? { id: row.id, fromPage: '/marketing/sop/index' } : ''
}) })
}, },
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
handleEdit(addOrEdit, row) { handleEdit(addOrEdit, row) {
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
fromPage: 'index', fromPage: '/marketing/sop/index',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP') $title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" /> <img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover> </el-popover>
</div> </div>
<img src="@/assets/sop/completed-event.png" /> <img src="@/assets/sop/completed-fail.png" />
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p> <p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div> </div>
......
...@@ -96,7 +96,10 @@ export default { ...@@ -96,7 +96,10 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName' prop: 'customerName',
formatter: cellValue => {
return cellValue.customerName || '-'
}
}, },
{ {
label: '客户手机号', label: '客户手机号',
...@@ -112,13 +115,10 @@ export default { ...@@ -112,13 +115,10 @@ export default {
}, },
{ {
label: '推送时间', label: '推送时间',
prop: 'pusherTime', prop: 'pusherTime'
formatter: cellValue => {
return cellValue.pusherTime ? dayjs(cellValue.pusherTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
}, },
{ {
label: '初次查看事件', label: '初次查看时间',
prop: 'firstViewDate', prop: 'firstViewDate',
formatter: cellValue => { formatter: cellValue => {
return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看' return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看'
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
label: '查看次数', label: '查看次数',
prop: 'viewCount', prop: 'viewCount',
formatter: cellValue => { formatter: cellValue => {
return cellValue.viewCount || '-' return cellValue.viewCount || '0'
} }
} }
// { // {
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
size: 'small', size: 'small',
routeInfo: { routeInfo: {
id: '', id: '',
fromPage: 'index' fromPage: '/marketing/sop/index'
} }
} }
}, },
...@@ -46,8 +46,8 @@ export default { ...@@ -46,8 +46,8 @@ export default {
methods: { methods: {
handleTabClick() { }, handleTabClick() { },
handleBack() { handleBack() {
this.$router.push({ this.$history.push({
path: '/sop/' + this.routeInfo.fromPage path: this.routeInfo.fromPage
}) })
} }
} }
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id, fromPage: 'sopList' } : '' query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : ''
}) })
}, },
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
handleEdit(addOrEdit, row) { handleEdit(addOrEdit, row) {
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
fromPage: 'sopList', fromPage: '/marketing/sop/sopList',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP') $title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!