Commit dab3c295 by chenwq

ui改版,首页设置,sop

1 parent 37c87795
......@@ -155,6 +155,7 @@ html {
color: #5850ff;
border-color: #5850ff;
height: 32px;
background-color: transparent;
}
.el-scrollbar__bar.is-horizontal {
......
......@@ -17,7 +17,7 @@
</div> -->
<div class="container edit-container">
<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>
<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">
......@@ -121,10 +121,14 @@
</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="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-staff-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchStaffForm" :selectedStaffList="selectedStaffList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"></select-staff-dialog>
</div>
......@@ -147,8 +151,6 @@ export default {
add: '新增礼包',
edit: '编辑礼包'
},
footerLeft: '0',
footerWidth: '0',
// 选择员工弹窗
isMutiSelectVisible: false,
searchStaffForm: {},
......@@ -435,8 +437,7 @@ export default {
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.setMinHeight()
this.routeInfo = this.$route.query
if (this.routeInfo.receivedStock) this.routeInfo.receivedStock = +this.routeInfo.receivedStock
this.title = this.titleObj[this.routeInfo.addOrEdit]
......
......@@ -136,17 +136,17 @@
<el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox>
</el-checkbox-group>
</div>
<div class="approval" slot="customerServerUserId">
<div class="approval" slot="customerServerUserId" :key="freshFlag">
<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-select>
</el-radio>
<el-button v-show="!baseData.consultantList.length" type="text"></el-button>
<p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
<el-radio v-model="editForm.customerServerType" :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-radio v-model="editForm.customerServerType" v-if="showGh" :label="2"> -->
<el-input placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable @change="handleServerUrlChange"></el-input>
</el-radio>
</div>
</glsx-combi-form>
......@@ -230,6 +230,7 @@ export default {
// 查看大图
isImgVisible: false,
state: '',
freshFlag: new Date(),
dialogObj: {
url: '',
uploadType: 'img'
......@@ -297,7 +298,7 @@ export default {
noticeToSubMerchant: 'N',
bannerMerchantList: [],
noticeMerchantList: [],
customerServerType: 1,
customerServerType: '',
customerServerUrl: ''
},
bannerItem: {
......@@ -453,6 +454,10 @@ export default {
},
methods: {
handleServerUrlChange(value) {
this.editForm.customerServerType = value ? 2 : ''
this.freshFlag = new Date()
},
selectAddAttr(value) {
var tempObj = {
customerServerName: '',
......@@ -463,6 +468,7 @@ export default {
this.editForm.customerServerName = ''
this.editForm.customerServerUserTitle = ''
if (value) {
this.editForm.customerServerType = 1
tempObj = this.baseData.consultantList.find(item => item.userOneid == value)
this.editForm.customerServerId = tempObj.id
this.editForm.customerServerName = tempObj.staffName
......@@ -471,7 +477,10 @@ export default {
customerServerName: tempObj.staffName,
customerServerUserTitle: tempObj.staffTitle
})
return true
}
this.editForm.customerServerType = ''
this.freshFlag = new Date()
},
getInfo() {
this.$apis.homeSet.getHomeInfoListApi({}).then(res => {
......@@ -482,7 +491,7 @@ export default {
this.editForm.clueList = res.clueList.map(k => k.clueId)
this.editForm.preferentialPolicy = res.preferentialPolicy
this.editForm.customerServerUserId = ''
this.editForm.customerServerType = +res.customerServerType || 1
this.editForm.customerServerType = +res.customerServerType
this.editForm.customerServerUrl = res.customerServerUrl
this.editForm.bannerToSubMerchant = res.bannerToSubMerchant || 'N'
this.editForm.noticeToSubMerchant = res.noticeToSubMerchant || 'N'
......@@ -499,7 +508,7 @@ export default {
})
}
if (res.bannerList && res.bannerList.length) {
res.bannerList.forEach((item,inx) => {
res.bannerList.forEach((item, inx) => {
var params = {
bannerImg: item.bannerImg,
goodsId: item.goods ? item.goods.id : '',
......@@ -817,7 +826,15 @@ export default {
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.$message({
message: res.code == '0' ? '操作成功' : res.message,
......
......@@ -684,7 +684,7 @@ export default {
}
.share {
margin-bottom: 80px;
margin-bottom: 20px;
&-container {
display: flex;
justify-content: space-between;
......@@ -719,7 +719,7 @@ export default {
.el-input--small,
.el-select,
.el-select--small {
width: 411px;
width: 432px;
}
.btn-cancle {
border-color: #5850ff;
......
......@@ -178,7 +178,7 @@
</el-radio-group>
</template>
<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>
<div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<div>
......@@ -801,11 +801,10 @@ export default {
isDisabled: false
},
{
label: '运费',
label: '运费/元',
name: 'expressFee',
type: 'input',
append: '元',
width: '320px',
placeholder: '请输入运费',
isHide: false,
isDisabled: false
},
......
......@@ -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">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<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>
<div slot="goodsHtml">
<el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
......@@ -15,11 +15,11 @@
<img class="img-60" :src="selectedProInfo.goodsImage" />
&nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件
</p>
<el-form-item label="设置秒杀价:" prop="activityPrice">
<el-input v-model="editForm.activityPrice" style="width: 150px" :disabled="isDisabled"><span slot="append">元</span></el-input>
<el-form-item label="设置秒杀价/元:" prop="activityPrice">
<el-input v-model="editForm.activityPrice" style="width: 150px" :disabled="isDisabled"></el-input>
</el-form-item>
<el-form-item label="活动库存:" prop="goodsStock">
<el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"><span slot="append">件</span></el-input>
<el-form-item label="活动库存/件:" prop="goodsStock">
<el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"></el-input>
</el-form-item>
</div>
</div>
......@@ -60,7 +60,7 @@
<p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;">
每人限购
<el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input>
<el-input style="width: 150px;" v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input>
</el-form-item>
件
</p>
......@@ -200,7 +200,6 @@ export default {
{
label: '活动名称',
name: 'activityName',
width: '474px',
type: 'input',
maxlength: 20,
isDisabled: false
......@@ -226,7 +225,6 @@ export default {
{
label: '活动宣传语',
name: 'promotion',
width: '474px',
type: 'input',
maxlength: 20,
isDisabled: false
......
......@@ -385,7 +385,6 @@ export default {
{
label: '活动名称',
name: 'activityName',
width: '474px',
type: 'input',
maxlength: 20,
tips: '如XX店车主关怀活动',
......@@ -412,7 +411,6 @@ export default {
{
label: '活动宣传语',
name: 'promotion',
width: '474px',
type: 'input',
maxlength: 20,
tips: '比如车主关怀,0元秒杀',
......@@ -532,7 +530,6 @@ export default {
{
label: '主办方',
name: 'sponsorName',
width: '474px',
type: 'input',
maxlength: 100,
tips: '默认展示门店名称'
......
......@@ -2,7 +2,7 @@
<template>
<div class="marketing">
<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 class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
......
......@@ -434,7 +434,7 @@ export default {
deep: true
},
'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')
......@@ -719,12 +719,12 @@ export default {
this.editForm.followerTypeName = this.baseData.staffTypeList.find(item => item.id).businessName
// 预估可触达人数
this.editForm.predictCount = this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei']
console.log(this.editForm)
// console.log(this.editForm)
if (this.editForm.repeatFlag == 'Y') {
this.$apis.sop.parseEventCountApi(countParams).then(res => {
// this.editForm.eventCount = 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.submit = false
return true
......@@ -849,4 +849,4 @@ export default {
}
}
}
</style>
</style>
\ 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!