Commit dab3c295 by chenwq

ui改版,首页设置,sop

1 parent 37c87795
...@@ -155,6 +155,7 @@ html { ...@@ -155,6 +155,7 @@ html {
color: #5850ff; color: #5850ff;
border-color: #5850ff; border-color: #5850ff;
height: 32px; height: 32px;
background-color: transparent;
} }
.el-scrollbar__bar.is-horizontal { .el-scrollbar__bar.is-horizontal {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> --> </div> -->
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form v-loading="loading" class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" defaultWidth="415px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form v-loading="loading" class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div> <div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div>
<el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button> <el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button>
<div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0"> <div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0">
...@@ -121,10 +121,14 @@ ...@@ -121,10 +121,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleConfirm">提交</el-button> <el-button type="primary" @click="handleConfirm">提交</el-button>
</div> </div> -->
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter>
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedGiftList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog> <select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedGiftList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
<select-staff-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchStaffForm" :selectedStaffList="selectedStaffList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"></select-staff-dialog> <select-staff-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchStaffForm" :selectedStaffList="selectedStaffList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"></select-staff-dialog>
</div> </div>
...@@ -147,8 +151,6 @@ export default { ...@@ -147,8 +151,6 @@ export default {
add: '新增礼包', add: '新增礼包',
edit: '编辑礼包' edit: '编辑礼包'
}, },
footerLeft: '0',
footerWidth: '0',
// 选择员工弹窗 // 选择员工弹窗
isMutiSelectVisible: false, isMutiSelectVisible: false,
searchStaffForm: {}, searchStaffForm: {},
...@@ -435,8 +437,7 @@ export default { ...@@ -435,8 +437,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.setMinHeight()
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
if (this.routeInfo.receivedStock) this.routeInfo.receivedStock = +this.routeInfo.receivedStock if (this.routeInfo.receivedStock) this.routeInfo.receivedStock = +this.routeInfo.receivedStock
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
......
...@@ -136,17 +136,17 @@ ...@@ -136,17 +136,17 @@
<el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox> <el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="approval" slot="customerServerUserId"> <div class="approval" slot="customerServerUserId" :key="freshFlag">
<el-radio v-model="editForm.customerServerType" :label="1"> <el-radio v-model="editForm.customerServerType" :label="1">
<el-select style="width: 320px" v-model="editForm.customerServerUserId" :disabled="editForm.customerServerType == 2" :clearable="true" :placeholder="'请选择在线客服'" :no-data-text="'无数据'" @change="selectAddAttr"> <el-select style="width: 432px" v-model="editForm.customerServerUserId" :disabled="editForm.customerServerType == 2" :clearable="true" :placeholder="'请选择在线客服'" :no-data-text="'无数据'" @clear="selectAddAttr" @change="selectAddAttr">
<el-option v-for="value in baseData.consultantList" :key="value.userOneid" :label="value.staffName" :value="value.userOneid"></el-option> <el-option v-for="value in baseData.consultantList" :key="value.userOneid" :label="value.staffName" :value="value.userOneid"></el-option>
</el-select> </el-select>
</el-radio> </el-radio>
<el-button v-show="!baseData.consultantList.length" type="text"></el-button> <el-button v-show="!baseData.consultantList.length" type="text"></el-button>
<p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p> <p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
<el-radio v-model="editForm.customerServerType" :label="2"> <el-radio v-model="editForm.customerServerType" :label="2">
<!-- <el-radio v-model="editForm.customerServerType" v-if="showGh" :label="2"> --> <!-- <el-radio v-model="editForm.customerServerType" v-if="showGh" :label="2"> -->
<el-input style="width: 320px" placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable></el-input> <el-input placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable @change="handleServerUrlChange"></el-input>
</el-radio> </el-radio>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -230,6 +230,7 @@ export default { ...@@ -230,6 +230,7 @@ export default {
// 查看大图 // 查看大图
isImgVisible: false, isImgVisible: false,
state: '', state: '',
freshFlag: new Date(),
dialogObj: { dialogObj: {
url: '', url: '',
uploadType: 'img' uploadType: 'img'
...@@ -297,7 +298,7 @@ export default { ...@@ -297,7 +298,7 @@ export default {
noticeToSubMerchant: 'N', noticeToSubMerchant: 'N',
bannerMerchantList: [], bannerMerchantList: [],
noticeMerchantList: [], noticeMerchantList: [],
customerServerType: 1, customerServerType: '',
customerServerUrl: '' customerServerUrl: ''
}, },
bannerItem: { bannerItem: {
...@@ -453,6 +454,10 @@ export default { ...@@ -453,6 +454,10 @@ export default {
}, },
methods: { methods: {
handleServerUrlChange(value) {
this.editForm.customerServerType = value ? 2 : ''
this.freshFlag = new Date()
},
selectAddAttr(value) { selectAddAttr(value) {
var tempObj = { var tempObj = {
customerServerName: '', customerServerName: '',
...@@ -463,6 +468,7 @@ export default { ...@@ -463,6 +468,7 @@ export default {
this.editForm.customerServerName = '' this.editForm.customerServerName = ''
this.editForm.customerServerUserTitle = '' this.editForm.customerServerUserTitle = ''
if (value) { if (value) {
this.editForm.customerServerType = 1
tempObj = this.baseData.consultantList.find(item => item.userOneid == value) tempObj = this.baseData.consultantList.find(item => item.userOneid == value)
this.editForm.customerServerId = tempObj.id this.editForm.customerServerId = tempObj.id
this.editForm.customerServerName = tempObj.staffName this.editForm.customerServerName = tempObj.staffName
...@@ -471,7 +477,10 @@ export default { ...@@ -471,7 +477,10 @@ export default {
customerServerName: tempObj.staffName, customerServerName: tempObj.staffName,
customerServerUserTitle: tempObj.staffTitle customerServerUserTitle: tempObj.staffTitle
}) })
return true
} }
this.editForm.customerServerType = ''
this.freshFlag = new Date()
}, },
getInfo() { getInfo() {
this.$apis.homeSet.getHomeInfoListApi({}).then(res => { this.$apis.homeSet.getHomeInfoListApi({}).then(res => {
...@@ -482,7 +491,7 @@ export default { ...@@ -482,7 +491,7 @@ export default {
this.editForm.clueList = res.clueList.map(k => k.clueId) this.editForm.clueList = res.clueList.map(k => k.clueId)
this.editForm.preferentialPolicy = res.preferentialPolicy this.editForm.preferentialPolicy = res.preferentialPolicy
this.editForm.customerServerUserId = '' this.editForm.customerServerUserId = ''
this.editForm.customerServerType = +res.customerServerType || 1 this.editForm.customerServerType = +res.customerServerType
this.editForm.customerServerUrl = res.customerServerUrl this.editForm.customerServerUrl = res.customerServerUrl
this.editForm.bannerToSubMerchant = res.bannerToSubMerchant || 'N' this.editForm.bannerToSubMerchant = res.bannerToSubMerchant || 'N'
this.editForm.noticeToSubMerchant = res.noticeToSubMerchant || 'N' this.editForm.noticeToSubMerchant = res.noticeToSubMerchant || 'N'
...@@ -499,7 +508,7 @@ export default { ...@@ -499,7 +508,7 @@ export default {
}) })
} }
if (res.bannerList && res.bannerList.length) { if (res.bannerList && res.bannerList.length) {
res.bannerList.forEach((item,inx) => { res.bannerList.forEach((item, inx) => {
var params = { var params = {
bannerImg: item.bannerImg, bannerImg: item.bannerImg,
goodsId: item.goods ? item.goods.id : '', goodsId: item.goods ? item.goods.id : '',
...@@ -817,7 +826,15 @@ export default { ...@@ -817,7 +826,15 @@ export default {
return { clueId: k } return { clueId: k }
}) })
: [] : []
console.log(params) // 在线客服
switch (this.editForm.customerServerType) {
case 1:
!this.editForm.customerServerUserId && (params.customerServerType = '')
break
case 2:
!this.editForm.customerServerUrl && (params.customerServerType = '')
break
}
this.$apis.homeSet.updateHomeApi(params).then(res => { this.$apis.homeSet.updateHomeApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
......
...@@ -684,7 +684,7 @@ export default { ...@@ -684,7 +684,7 @@ export default {
} }
.share { .share {
margin-bottom: 80px; margin-bottom: 20px;
&-container { &-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -719,7 +719,7 @@ export default { ...@@ -719,7 +719,7 @@ export default {
.el-input--small, .el-input--small,
.el-select, .el-select,
.el-select--small { .el-select--small {
width: 411px; width: 432px;
} }
.btn-cancle { .btn-cancle {
border-color: #5850ff; border-color: #5850ff;
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
</el-radio-group> </el-radio-group>
</template> </template>
<template slot="serviceDescHtml"> <template slot="serviceDescHtml">
<el-input type="textarea" v-model="editForm.serviceDesc" style="width: 320px" placeholder="请输入服务说明" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="30" :disabled="isDisabled" /> <el-input type="textarea" v-model="editForm.serviceDesc" placeholder="请输入服务说明" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="30" :disabled="isDisabled" />
</template> </template>
<div slot="selectMerchant" slot-scope="scope" class="select-merchant"> <div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<div> <div>
...@@ -801,11 +801,10 @@ export default { ...@@ -801,11 +801,10 @@ export default {
isDisabled: false isDisabled: false
}, },
{ {
label: '运费', label: '运费/元',
name: 'expressFee', name: 'expressFee',
type: 'input', type: 'input',
append: '元', placeholder: '请输入运费',
width: '320px',
isHide: false, isHide: false,
isDisabled: false isDisabled: false
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div> <div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<template slot="activityTimeHtml" slot-scope="scope"> <template slot="activityTimeHtml" slot-scope="scope">
<el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker> <el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</template> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button> <el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<img class="img-60" :src="selectedProInfo.goodsImage" /> <img class="img-60" :src="selectedProInfo.goodsImage" />
&nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件 &nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件
</p> </p>
<el-form-item label="设置秒杀价:" prop="activityPrice"> <el-form-item label="设置秒杀价/元:" prop="activityPrice">
<el-input v-model="editForm.activityPrice" style="width: 150px" :disabled="isDisabled"><span slot="append">元</span></el-input> <el-input v-model="editForm.activityPrice" style="width: 150px" :disabled="isDisabled"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动库存:" prop="goodsStock"> <el-form-item label="活动库存/件:" prop="goodsStock">
<el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"><span slot="append">件</span></el-input> <el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;"> <p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;">
每人限购 每人限购
<el-form-item prop="limitPurchaseNumber"> <el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input> <el-input style="width: 150px;" v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input>
</el-form-item> </el-form-item>
件 件
</p> </p>
...@@ -200,7 +200,6 @@ export default { ...@@ -200,7 +200,6 @@ export default {
{ {
label: '活动名称', label: '活动名称',
name: 'activityName', name: 'activityName',
width: '474px',
type: 'input', type: 'input',
maxlength: 20, maxlength: 20,
isDisabled: false isDisabled: false
...@@ -226,7 +225,6 @@ export default { ...@@ -226,7 +225,6 @@ export default {
{ {
label: '活动宣传语', label: '活动宣传语',
name: 'promotion', name: 'promotion',
width: '474px',
type: 'input', type: 'input',
maxlength: 20, maxlength: 20,
isDisabled: false isDisabled: false
......
...@@ -385,7 +385,6 @@ export default { ...@@ -385,7 +385,6 @@ export default {
{ {
label: '活动名称', label: '活动名称',
name: 'activityName', name: 'activityName',
width: '474px',
type: 'input', type: 'input',
maxlength: 20, maxlength: 20,
tips: '如XX店车主关怀活动', tips: '如XX店车主关怀活动',
...@@ -412,7 +411,6 @@ export default { ...@@ -412,7 +411,6 @@ export default {
{ {
label: '活动宣传语', label: '活动宣传语',
name: 'promotion', name: 'promotion',
width: '474px',
type: 'input', type: 'input',
maxlength: 20, maxlength: 20,
tips: '比如车主关怀,0元秒杀', tips: '比如车主关怀,0元秒杀',
...@@ -532,7 +530,6 @@ export default { ...@@ -532,7 +530,6 @@ export default {
{ {
label: '主办方', label: '主办方',
name: 'sponsorName', name: 'sponsorName',
width: '474px',
type: 'input', type: 'input',
maxlength: 100, maxlength: 100,
tips: '默认展示门店名称' tips: '默认展示门店名称'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<div class="marketing"> <div class="marketing">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton> <GLButton :size="size" class="el-icon-plus" type="primary" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
......
...@@ -434,7 +434,7 @@ export default { ...@@ -434,7 +434,7 @@ export default {
deep: true deep: true
}, },
'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) { 'editForm.object.additionalType'(val) {
var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType') var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
...@@ -719,12 +719,12 @@ export default { ...@@ -719,12 +719,12 @@ export default {
this.editForm.followerTypeName = this.baseData.staffTypeList.find(item => item.id).businessName this.editForm.followerTypeName = this.baseData.staffTypeList.find(item => item.id).businessName
// 预估可触达人数 // 预估可触达人数
this.editForm.predictCount = this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] this.editForm.predictCount = this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei']
console.log(this.editForm) // console.log(this.editForm)
if (this.editForm.repeatFlag == 'Y') { if (this.editForm.repeatFlag == 'Y') {
this.$apis.sop.parseEventCountApi(countParams).then(res => { this.$apis.sop.parseEventCountApi(countParams).then(res => {
// this.editForm.eventCount = res.eventStatistics.eventCount // this.editForm.eventCount = res.eventStatistics.eventCount
this.maxReachesTypeSet = res.eventStatistics.eventCount this.maxReachesTypeSet = res.eventStatistics.eventCount
if (this.maxReachesTypeSet < this.editForm.reachesTypeSet || this.editForm.reachesTypeSet < 2) { if (this.editForm.reachesType == 2 && (this.maxReachesTypeSet < this.editForm.reachesTypeSet || this.editForm.reachesTypeSet < 2)) {
this.whereToGo('reachesTypeSet') this.whereToGo('reachesTypeSet')
this.submit = false this.submit = false
return true return true
...@@ -849,4 +849,4 @@ export default { ...@@ -849,4 +849,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!