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 => {
}
// 跟进员工类型
const getStaffTypeListApi = params => {
params.method = 'entmicro.api.staff.listEntBusinessType'
const getStaffFollowerListApi = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
......@@ -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 {
this.productList.forEach(function(item) {
item.saleAmount = item.goodsStatistics.saleAmount
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
})
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
})
let minRatilPrice = retailPriceList[0].retailPrice / 100
......
......@@ -27,17 +27,14 @@
</template>
<script>
// import { getGoodsList } from '@/api/modules/common'
import glsxDialog from '@/components/glsx-dialog'
export default {
name: 'selectMutiProForcouponDialog',
data() {
return {
// 表格组件
// getListApi: this.$apis.common.getGoodsListApi,
productList: [],
userInfo: {},
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchProForm: {
name: ''
},
......@@ -97,8 +94,6 @@ export default {
var params = {
goodsStatus: 1,
goodsSource: 1,
// pageNum: isMounted ? 1 : this.$refs.mutiProRef.page.pageNum,
// pageSize: isMounted ? 10 : this.$refs.mutiProRef.page.pageSize
currentPage: 1,
pageNum: 1,
pageSize: 100000,
......@@ -109,33 +104,8 @@ export default {
this.$apis.couponManage.getAllGoodsApi(params).then(res => {
this.fnCallBack = true
// console.log(res)
// this.productList = res
this.productList = res.list
// this.$refs.mutiProRef.tableTotal = res.total
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
// }
this.productList.forEach(function (item) {
item.retailPrice = (item.retailPrice / 100).toFixed(2)
})
this.recoverySelected()
......
......@@ -100,7 +100,7 @@ export default {
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
labelTypesStr: '自店标签,企业标签',
labelTypesStr: '自店标签,企业标签,系统标签',
edition: this.$globalState.session.merchantModel
}
})
......@@ -110,6 +110,7 @@ export default {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
......@@ -143,6 +144,7 @@ export default {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
......@@ -210,9 +212,11 @@ export default {
let labelTreeRets = this.labelTreeRetSelect
.map(item => {
if (item.tagChecked.length) {
console.log(item)
return {
labelGroup: item.labelGroup,
labelList: item.tagChecked
labelList: item.tagChecked,
labelType: item.labelType
}
}
})
......
......@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) {
// }
//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' })
// 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.test.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 = {
install(vue, cfg) {
......
......@@ -15,7 +15,7 @@
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div>
<div class="ctime">
<span class="ctime_name">核销劵码:</span>
<span class="ctime_name">核销券码:</span>
</div>
<img class="ccode" src="../../assets/coupon/code2.png" />
<div class="ccodeName">GH078-003</div>
......@@ -45,7 +45,8 @@
<div :class="editForm.status == 3 ? 'darkColor' : ''" class="ctime">
<!-- <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 class="ctime_content">{{ editForm.useBarriers == 1 ? '无门槛' : '满' + editForm.full + '元可用' }}</span>
</div>
......@@ -79,12 +80,13 @@
</div>
</div>
</div>
<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">
<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">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
<span class="promptCopy">可用于营销活动和企微端发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
......@@ -97,14 +99,19 @@
</template>
<template slot="effectiveHtml">
<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-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 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-radio>
</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-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-form-item>
......@@ -114,7 +121,9 @@
<el-form-item prop="full" ref="full">
<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-form-item>
......@@ -122,12 +131,14 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<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>
</el-input>
</template>
<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 slot="editHtml">
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
......@@ -135,7 +146,9 @@
</glsx-combi-form>
<div v-if="$isGroupUp">
<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 class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
......@@ -528,15 +541,27 @@ export default {
return obj
},
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true
var merchantErrorObj = []
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
merchantval = merchantVaild
merchantErrorObj = errorObj
})
}
if (!valid) {
this.whereToGo(Object.keys(errorObj)[0])
} else if (!merchantval) {
this.whereToGo(Object.keys(merchantErrorObj)[0])
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
......@@ -750,6 +775,7 @@ export default {
text-align: center;
color: #fc5b32;
}
/* .ctime_name {
width: 48px;
height: 17px;
......@@ -831,15 +857,18 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
.glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important;
}
.couponImg {
width: 69px;
height: 69px;
......@@ -849,6 +878,7 @@ export default {
margin-top: -6px;
margin-right: -6px;
}
.validityPeriod {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
......@@ -856,31 +886,38 @@ export default {
color: #a0a0a0;
margin: 0 16px 8px 16px;
}
.process {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2px;
}
.process .process_text {
margin-left: 2px;
font-size: 12px;
color: #333;
}
.process img {
width: 12px;
height: 12px;
}
.process .rightArrow {
padding: 0 4px;
}
.slider {
height: 380px;
overflow: auto;
}
.slider::-webkit-scrollbar-thumb {
background: transparent;
}
.darkColor {
color: #999;
}
......
......@@ -53,18 +53,20 @@
</div>
</div>
<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">
<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>
</el-input>
</template>
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
<span class="promptCopy">可用于营销活动和企微端发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
......@@ -77,20 +79,26 @@
</template>
<template slot="effectiveHtml">
<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-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 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-radio>
</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-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-form-item>
</template>
<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 slot="editHtml">
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
......@@ -98,7 +106,9 @@
</glsx-combi-form>
<div v-if="$isGroupUp">
<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 class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
......@@ -431,15 +441,27 @@ export default {
return obj
},
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true
var merchantErrorObj = []
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
merchantval = merchantVaild
merchantErrorObj = errorObj
})
}
if (!valid) {
this.whereToGo(Object.keys(errorObj)[0])
} else if (!merchantval) {
this.whereToGo(Object.keys(merchantErrorObj)[0])
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
......@@ -617,15 +639,18 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
.glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important;
}
.couponImg {
width: 69px;
height: 69px;
......@@ -635,6 +660,7 @@ export default {
margin-top: -6px;
margin-right: -6px;
}
.validityPeriod {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
......@@ -642,31 +668,38 @@ export default {
color: #a0a0a0;
margin: 0 16px 8px 16px;
}
.process {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2px;
}
.process .process_text {
margin-left: 2px;
font-size: 12px;
color: #333;
}
.process img {
width: 12px;
height: 12px;
}
.process .rightArrow {
padding: 0 4px;
}
.slider {
height: 380px;
overflow: auto;
}
.slider::-webkit-scrollbar-thumb {
background: transparent;
}
.darkColor {
color: #999;
}
......
......@@ -5,18 +5,18 @@
</div>
<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-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-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-form-item>
<el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap">
<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 -->
<el-radio :label="1">
<el-radio :label="1" id="effectiveDays">
领取后
<el-input v-model="ruleForm.effectiveDays" maxlength="4" @input="
val => {
......@@ -26,7 +26,7 @@
天内有效
</el-radio>
<!-- 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-radio>
</el-radio-group>
......@@ -44,7 +44,7 @@
<el-button @click="add1" class="addsubBtn" :disabled="title == '查看' || title == '编辑' || ruleForm.customUseLimit != 1">+</el-button>
次
</el-radio>
<el-radio :label="2">
<el-radio :label="2" id="limitDays">
有效期内每
<el-input v-model="ruleForm.limitDays" maxlength="4" @input="
val => {
......@@ -75,7 +75,7 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<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> -->
<span v-if="$isGroupUp">永久有效</span>
<span v-if="$isGroupUp">无库存限制</span>
<el-input :disabled="title == '查看'" v-else class="w-150" v-model="ruleForm.stock" placeholder="请输入库存">
<span slot="suffix">张</span>
</el-input>
......@@ -233,7 +233,7 @@ export default {
// delivery: false,
// type: [],
// resource: '',
effectiveType: 3, //有效期(默认无有效期)
effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1,
......@@ -400,14 +400,27 @@ export default {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
})
},
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
submitForm(formName) {
this.$refs[formName].validate(valid => {
this.$refs[formName].validate((valid, errorObj) => {
var merchantval = true
var merchantErrorObj = []
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
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 (this.isEdit == true) {
this.updateService()
......
......@@ -4,7 +4,7 @@
<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="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>
</div>
<div class="container">
......@@ -358,12 +358,12 @@ export default {
})
},
//新增折扣劵
//新增折扣券
addDiscountCoupon() {
this.$router.push('/couponManage/editDiscountCoupon/1')
},
//新增兑换劵
//新增兑换券
addExchangeCoupon() {
this.$router.push('/couponManage/editExchangeCoupon/1')
},
......@@ -387,7 +387,7 @@ export default {
})
return true
} else if (row.discountType == '2') {
//折扣劵
//折扣券
goto = '/couponManage/editDiscountCoupon/'
} else if (row.discountType == '4') {
//兑换券
......
......@@ -329,7 +329,7 @@ export default {
this.editForm.couponList.forEach(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.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false)
......@@ -362,7 +362,7 @@ export default {
this.couponObj[item].list.forEach(subItem => {
// 失效券不加入预估成本
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 {
},
handleGiftAdd() {
console.log(this.couponObj,'')
// console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose()
},
......@@ -471,7 +471,7 @@ export default {
.then(() => {
this.insertHttp(params)
})
.catch(() => {})
.catch(() => { })
} else {
this.insertHttp(params)
}
......@@ -512,7 +512,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
......@@ -250,7 +250,7 @@ export default {
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '无有效期'
return '永久有效'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
......
......@@ -40,6 +40,14 @@
</div>
</div>
<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">
<!-- <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> -->
......@@ -117,9 +125,10 @@ export default {
{
label: '类型',
prop: 'orderType',
formatter: cellValue => {
return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
}
addHtml: 'orderType'
// formatter: cellValue => {
// return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// }
},
{
label: '价格',
......@@ -227,7 +236,7 @@ export default {
},
handleRefund(data) {
this.orderCode = data.orderCode
this.refund =''
this.refund = ''
this.refundVisible = !this.refundVisible
},
refundConfirmDialog() {
......@@ -282,6 +291,7 @@ export default {
this.currentIndex = 1
this.searchForm = {}
this.searchForm.orderStatus = '' //默认查询全部
this.searchForm.orderType = ''
// this.handleSearch()
this.$nextTick(() => {
this.isReload = true
......@@ -309,10 +319,10 @@ export default {
display: flex;
height: auto;
position: relative;
width:285px;
width: 285px;
left: calc(100% - 285px);
.choseItem {
display:inline-block;
display: inline-block;
cursor: pointer;
text-align: center;
font-size: 12px;
......
......@@ -277,7 +277,7 @@ export default {
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '无有效期'
return '永久有效'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
......
......@@ -165,7 +165,7 @@ export default {
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '无有效期'
return '永久有效'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
......
......@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap">
<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 -->
<el-radio :label="1">
领取后
......@@ -239,7 +239,7 @@ export default {
// delivery: false,
// type: [],
// resource: '',
effectiveType: 3, //有效期(默认无有效期)
effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1,
......
......@@ -58,8 +58,8 @@
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1">已置顶推荐</el-button>
<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 && accountLevel != 4">已置顶推荐</el-button>
</template>
</span>
</GLTable>
......
......@@ -68,7 +68,7 @@
<div class="footer-panel">
<div>
<el-button type="primary" @click="submitForm()" size="medium" :loading="sloading">提交</el-button>
<el-button @click="goBack" size="medium">取消</el-button>
<el-button @click="goBack" size="medium">取消</el-button>
</div>
</div>
<glsx-dialog title="" top="30vh" :hasScroll="false" class="tipDialog" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm">
......@@ -117,11 +117,12 @@ export default {
packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }]
},
allItemList: [],
choseItemList: [], //['一年12次洗车劵×1', '车身打蜡×2', '全车镀膜×1'],
choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'],
copyChoseItemList: [], //用于检查页面信息是否改动
merchantId: 44184606,
merchantName: '',
setmealContentRules: false,
isConfig: false,
//弹窗
//弹窗2(提示弹窗)
isTipDialogVisible: false,
......@@ -304,7 +305,7 @@ export default {
})
},
submitForm(formName) {
this.$refs.ruleForm.validate(valid => {
this.$refs.ruleForm.validate(async valid => {
if (!valid) {
if (this.choseItemList.length <= 0) {
this.setmealContentRules = true
......@@ -315,42 +316,46 @@ export default {
this.setmealContentRules = true
return
}
if (this.id) {
//需要调config的接口????
// scrm.api.equity.package.service.config
this.configFun()
//调修改的接口
let param = {}
param.id = this.id
param.merchantId = this.merchantId
param.merchantName = this.merchantName
param.packageName = this.ruleForm.packageName
param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
let lists = this.choseItemList
for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].couponAmount
param[`lists[${k}].serviceId`] = lists[k].id
}
this.sloading = true
updateSetMeal(param)
.then(res => {
this.sloading = false
this.$message({
message: res.code == '0' ? '修改成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.$router.push('/memberCenter/setmeal')
this.configFun().then(result => {
if (!result) {
let param = {}
param.id = this.id
param.merchantId = this.merchantId
param.merchantName = this.merchantName
param.packageName = this.ruleForm.packageName
param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
let lists = this.choseItemList
for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].couponAmount
param[`lists[${k}].serviceId`] = lists[k].id
}
})
.catch(err => {
this.sloading = false
})
.finally(() => {
this.sloading = false
})
this.sloading = true
updateSetMeal(param)
.then(res => {
this.sloading = false
this.$message({
message: res.code == '0' ? '修改成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.$router.push('/memberCenter/setmeal')
}
})
.catch(err => {
this.sloading = false
})
.finally(() => {
this.sloading = false
})
}
})
} else {
//调创建的接口
let params = {}
......@@ -388,15 +393,25 @@ export default {
})
},
configFun() {
let params = {}
params.id = this.id
let list = this.choseItemList
for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].couponAmount
params[`list[${i}].serviceId`] = list[i].id
}
configSetMeal(params).then(res => {
console.log('配置接口', res.data)
return new Promise(resolve => {
let params = {}
params.id = this.id
let list = this.choseItemList
for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].couponAmount
params[`list[${i}].serviceId`] = list[i].id
}
configSetMeal(params).then(res => {
if (res.code == -1) {
this.$message({
message: res.message,
type: 'error'
})
resolve(true)
} else {
resolve(false)
}
})
})
},
......
......@@ -893,7 +893,7 @@ export default {
},
// 库存
'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) {
......@@ -1095,7 +1095,7 @@ export default {
if (e.key != 'Backspace' && 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) {
......
......@@ -2,7 +2,6 @@
<template>
<div class="marketing pro-group p-t-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>
</div>
<div class="container">
......@@ -25,8 +24,6 @@
</div>
<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 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(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
......@@ -336,10 +333,12 @@ export default {
this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount
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
})
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
})
let minRatilPrice = retailPriceList[0].retailPrice / 100
......
......@@ -386,10 +386,12 @@ export default {
this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount
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
})
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
})
let minRatilPrice = retailPriceList[0].retailPrice / 100
......
......@@ -43,8 +43,13 @@ export default {
editEvent
},
beforeRouteLeave(to, from, next) {
this.$common.utils.storage.get('sopInfo') && this.$common.utils.storage.remove('sopInfo')
next()
},
created() {
this.routeInfo = this.$route.query
this.routeInfo = Object.keys(this.$route.query).length ? this.$route.query : this.$common.utils.storage.get('sopInfo')
},
methods: {
......
......@@ -34,7 +34,7 @@
<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)">
<!-- <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>
</template>
</div>
......@@ -97,9 +97,9 @@
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</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-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>
</template>
......@@ -171,7 +171,8 @@ export default {
customerCount: '',
listConf: {
confId: 'id',
confName: 'customerName'
confName: 'customerName',
otherConfName: 'customerPhone'
},
list: []
}
......@@ -185,7 +186,7 @@ export default {
customerOptType: '',
customerInfoList: [],
// customerIds: [],
customerOptUpdate: '2',
customerOptUpdate: '1',
eventList: []
},
editRule: {
......@@ -239,11 +240,11 @@ export default {
isDisabled: false,
optionList: [
{
confId: '1',
confId: '2',
confName: '自动更新'
},
{
confId: '2',
confId: '1',
confName: '从不更新'
}
]
......@@ -275,7 +276,7 @@ export default {
return {
// add-新增;edit-编辑;look-查看
addOrEdit: 'add',
fromPage: 'index',
fromPage: '/marketing/sop/index',
id: ''
}
}
......@@ -301,6 +302,8 @@ export default {
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
if (this.routeInfo.addOrEdit == 'edit') {
this.getInfo()
} else if (this.routeInfo.info) {
this.setCustomer()
}
},
......@@ -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() {
this.$apis.sop.getSopInfoDetailApi({ sopId: this.routeInfo.id }).then(res => {
// console.log(res)
......@@ -492,7 +504,6 @@ export default {
// 选择标签
handleDialogConfirm(obj) {
console.log(obj)
switch (this.customerDataList[this.currentCustomerIdx].confName) {
case '人群':
this.handleCrowdCustClose()
......@@ -531,7 +542,7 @@ export default {
break
case 1:
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
case 2:
this.handleAppointCustClose()
......@@ -653,6 +664,7 @@ export default {
list.push({
labelGroupId: item.labelGroup.id,
labelGroupName: item.labelGroup.name,
labelGroupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
......@@ -794,8 +806,8 @@ export default {
})
},
cancelJump() {
this.$router.push({
path: '/sop/' + this.routeInfo.fromPage
this.$history.push({
path: this.routeInfo.fromPage
})
},
......
......@@ -13,17 +13,26 @@
</el-tabs>
</div>
<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.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.packageName" v-show="activeName == 4">{{ item.packageName }}</div>
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div>
<div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}
</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 == 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 == 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> -->
......@@ -64,14 +73,19 @@
<img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</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>
<span slot="footer" class="dialog-footer">
<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="handleOpen" v-show="modelList.length == 0 && activeName == 2 && memberMenu">立即添加</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>
<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"
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>
</el-dialog>
</div>
......@@ -182,6 +196,7 @@ export default {
}
if (this.activeName == 2) {
params.discountTypes = [2, 3, 4]
params.directionalFlag = 1
params.validType = 'valid'
}
if (this.activeName == 5) {
......@@ -255,29 +270,35 @@ export default {
}
}
}
.sop-activity-model.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
......@@ -287,6 +308,7 @@ export default {
text-align: center;
background: #f4f6fc;
}
.el-tabs__item.is-active {
background-color: #fff !important;
border-radius: 4px;
......@@ -294,13 +316,15 @@ export default {
}
}
}
.model-item-empty {
> img {
>img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
......@@ -310,6 +334,7 @@ export default {
margin-bottom: 30px;
}
}
.model-item-panel {
// display: grid;
// grid-template-columns: repeat(4, 25%);
......@@ -320,6 +345,7 @@ export default {
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item {
width: 240px;
margin-right: 24px;
......@@ -332,13 +358,16 @@ export default {
border: 1px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
......@@ -347,6 +376,7 @@ export default {
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
......@@ -357,6 +387,7 @@ export default {
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
font-weight: 400;
......@@ -367,15 +398,18 @@ export default {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&.model-item-weight {
line-height: 20px;
height: 20px;
}
span {
color: #5850ff;
font-size: 20px;
}
}
&-contents {
line-height: 22px;
height: 22px;
......
......@@ -27,9 +27,7 @@ export default {
return {
url: url,
searchForm: {
req: {
crowdType: 2
}
keyword: ''
},
total: 0,
crowdList: [],
......@@ -104,6 +102,7 @@ export default {
},
mounted() {
this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList()
......@@ -114,6 +113,8 @@ export default {
var params = {
req: {
...this.searchForm,
crowdType: 3,
merchantId: this.userInfo.merchantId,
pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1,
pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10
}
......@@ -126,17 +127,14 @@ export default {
this.crowdList.forEach((item, index) => {
item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
})
this.selectedCrowdList.length && (this.selectedCrowdId = this.selectedCrowdList[0].crowdId)
// this.recoverySelected()
this.selectedCrowdList.length && (this.selectedCrowdId = +this.selectedCrowdList[0].crowdId)
this.$refs.crowdRef.tableHeightValues = '460px'
})
},
setTableFinishFun() {
this.crowdList = this.$refs.crowdRef.data
// this.recoverySelected()
//接收到的数据为空
// this.$refs.crowdRef.tableHeightValues = this.$refs.crowdRef.data.length ? '' : '400px'
this.$refs.crowdRef.tableHeightValues = '460px'
},
......
<template>
<div class="select-cutomer">
<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">
<span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
......@@ -9,15 +8,6 @@
</glsx-combi-form>
<div class="flex-default">
<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>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div>
......@@ -32,7 +22,6 @@
</div>
</div>
<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" type="primary" @click="handleConfirm">确 定</el-button>
</span>
......@@ -50,7 +39,9 @@ export default {
url: url,
searchForm: {},
customerList: [],
selectedCustomerList: [],
heightBox: 200,
maxCustNum: 200,
// 搜索
searchFormData: [
{
......@@ -153,11 +144,7 @@ export default {
type: Boolean,
default: false
},
selectedLabelList: {
type: Array,
default: () => []
},
selectedCustomerList: {
parentSelectedCustomerList: {
type: Array,
default: () => []
}
......@@ -166,35 +153,12 @@ export default {
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList))
},
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() {
this.$refs.customerRef.refreshTable()
this.$refs.customerRef.refreshTable(true, false)
},
setTableFinishFun() {
......@@ -212,11 +176,10 @@ export default {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
}
})
if (this.selectedCustomerList.length >= 5) {
let tableIds = this.selectedCustomerList.map(item => item.id)
console.log(tableIds)
if (this.selectedCustomerList.length >= this.maxCustNum) {
let selectIds = this.selectedCustomerList.map(item => item.id)
this.tableList.forEach((row, idx) => {
if (!tableIds.includes(row.id)) {
if (!selectIds.includes(row.id)) {
this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false)
}
......@@ -228,19 +191,22 @@ export default {
},
handleSelectionTable(val) {
// 未选客户时,筛选客户条件
// if (!this.selectedCustomerList.length) {
// this.dealCondLimit(val[0])
// }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val))
var selectIds = this.selectedCustomerList.map(item => item.id)
currentList.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) {
var selectIds = currentList.map(item => item.id)
var selectedIds = val.map(item => item.id)
var tempList = []
val.forEach(item => {
if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) {
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()
},
......
......@@ -18,20 +18,20 @@
<div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope">
<div class="flex-default m-r-20" v-if="editForm.repeatMode == 2">
<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-select>
</div>
<div class="flex-default m-r-20" v-if="editForm.repeatMode == 3">
<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-select>
</div>
<div>重复循环至</div>
</div>
<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>
</glsx-combi-form>
</div>
......@@ -77,7 +77,7 @@
<div class="container edit-container">
<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">
<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">
<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>
......@@ -86,8 +86,10 @@
同一用户最多参与
<el-form-item prop="reachesTypeSet">
<el-input v-model="editForm.reachesTypeSet"></el-input>
<span class="txt-red" v-if="+maxReachesTypeSet < editForm.reachesTypeSet">该用户最多能参与{{ maxReachesTypeSet }}次</span>
<span class="txt-red" v-else-if="editForm.reachesTypeSet < 2">只能输入2及以上的数字</span>
<div v-show="editForm.reachesTypeSet && maxReachesTypeSet">
<span class="txt-red" v-if="+maxReachesTypeSet < editForm.reachesTypeSet">该用户最多能参与{{ maxReachesTypeSet }}次</span>
<span class="txt-red" v-else-if="editForm.reachesTypeSet < 2">只能输入2及以上的数字</span>
</div>
</el-form-item>
次
</span>
......@@ -294,6 +296,7 @@ export default {
handleRadioChange: val => {
this.editForm.repeatTime = ''
this.editForm.eventEndDate = ''
this.maxReachesTypeSet = ''
}
}
],
......@@ -360,7 +363,7 @@ export default {
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'businessName',
optionLabel: 'followName',
optionsName: 'staffTypeList'
},
{
......@@ -434,6 +437,12 @@ export default {
},
'editForm.reachesTypeSet'(newValue, oldValue) {
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 {
}
},
handleResetMaxSet() {
this.maxReachesTypeSet = ''
},
getStaffTypeList() {
this.$apis.common.getStaffTypeListApi({ flag: 0 }).then(res => {
this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
})
......@@ -566,6 +579,7 @@ export default {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editForm.pushChannelType = ''
if (val.showTxtContent) {
this.editForm.eventContent = val.showTxtContent
}
......@@ -651,8 +665,8 @@ export default {
pageNum: 1,
tagLists: []
}
this.parentCustomerObj.list.list &&
this.parentCustomerObj.list.list.forEach(item => {
this.parentCustomerObj.list &&
this.parentCustomerObj.list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
......
......@@ -107,7 +107,7 @@ export default {
handleJump(path, row = {}) {
this.$router.push({
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 {
handleEdit(addOrEdit, row) {
var params = {
addOrEdit: addOrEdit,
fromPage: 'index',
fromPage: '/marketing/sop/index',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
}
addOrEdit != 'add' && (params.id = row.id)
......
......@@ -30,7 +30,7 @@
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover>
</div>
<img src="@/assets/sop/completed-event.png" />
<img src="@/assets/sop/completed-fail.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div>
......
......@@ -96,7 +96,10 @@ export default {
tableColumns: [
{
label: '客户名称',
prop: 'customerName'
prop: 'customerName',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '客户手机号',
......@@ -112,13 +115,10 @@ export default {
},
{
label: '推送时间',
prop: 'pusherTime',
formatter: cellValue => {
return cellValue.pusherTime ? dayjs(cellValue.pusherTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
prop: 'pusherTime'
},
{
label: '初次查看事件',
label: '初次查看时间',
prop: 'firstViewDate',
formatter: cellValue => {
return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看'
......@@ -128,7 +128,7 @@ export default {
label: '查看次数',
prop: 'viewCount',
formatter: cellValue => {
return cellValue.viewCount || '-'
return cellValue.viewCount || '0'
}
}
// {
......
......@@ -28,7 +28,7 @@ export default {
size: 'small',
routeInfo: {
id: '',
fromPage: 'index'
fromPage: '/marketing/sop/index'
}
}
},
......@@ -46,8 +46,8 @@ export default {
methods: {
handleTabClick() { },
handleBack() {
this.$router.push({
path: '/sop/' + this.routeInfo.fromPage
this.$history.push({
path: this.routeInfo.fromPage
})
}
}
......
......@@ -137,7 +137,7 @@ export default {
handleJump(path, row = {}) {
this.$router.push({
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 {
handleEdit(addOrEdit, row) {
var params = {
addOrEdit: addOrEdit,
fromPage: 'sopList',
fromPage: '/marketing/sop/sopList',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
}
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!