Commit 98aee18a by 王志慧

Merge branch 'v2.3.0' into 'wangzh_dev_2.3.0'

V2.3.0

See merge request !128
2 parents cc362578 30659278
......@@ -138,6 +138,10 @@ html {
margin-bottom: 18px;
}
.marketing .color-transparent {
background-color: transparent;
}
.marketing .default-blue-btn {
color: #5850ff;
border-color: #5850ff;
......@@ -152,6 +156,29 @@ html {
background-color: rgba(144, 147, 153, 0.5) !important;
}
.marketing .table-title {
line-height: 32px;
}
.marketing .table-cicle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 4px;
}
.marketing .back-orange {
background-color: #FDB757;
}
.marketing .back-blue {
background-color: #5850ff;
}
.marketing .back-grey {
background-color: #999999;
}
.marketing .el-table .cell {
line-height: 16px;
}
......@@ -193,6 +220,7 @@ html {
cursor: pointer;
}
.marketing .w-100-percent,
.marketing .img-w-100 {
width: 100%;
}
......@@ -212,6 +240,10 @@ html {
height: 120px;
}
.marketing .w-150 {
width: 150px;
}
.marketing .w-320 {
width: 320px;
}
......@@ -242,6 +274,10 @@ html {
margin-bottom: 60px;
}
.marketing .m-r-8 {
margin-right: 8px;
}
.marketing .m-r-10 {
margin-right: 10px;
}
......@@ -254,6 +290,11 @@ html {
margin-left: 20px;
}
.marketing.p-t-10,
.marketing .p-t-10 {
padding-top: 10px;
}
.marketing.p-t-20,
.marketing .p-t-20 {
padding-top: 20px;
......
......@@ -22,6 +22,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
// 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.merchantModel == 1 && globalState.session.accountLevel != 4
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
......
......@@ -27,6 +27,8 @@ export async function start() {
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : ''
Vue.prototype.$http2 = new Http({ response, request: request2, sign, secret, alert: message.error, headers: { token } })
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
// 集团版集团账号
Vue.prototype.$isGroupUp = false
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
Vue.prototype.$common = { utils: utils }
render('/', routes)
......
......@@ -8,8 +8,7 @@
<div class="card_one">
<div class="flex">
<div :class="editForm.status == 3 ? 'darkColor' : ''" class="cname">{{ editForm.couponName }}</div>
<img src="../../images/unCash.png" class="couponImg" v-if="editForm.status == 3" />
<img src="../../images/cash.png" class="couponImg" v-else />
<img class="couponImg" :src="require(`../../images/${editForm.status == 3 ? 'unCash' : 'cash'}.png`)" />
</div>
<!-- <div class="ctype">
<div class="ctypeName"></div>
......@@ -33,16 +32,13 @@
</div>
<div style="height: 1px;background-color: rgb(238, 238, 238);margin: 7px 16px 8px;"></div>
<div class="process">
<img src="../../images/unArrow.png" v-if="editForm.status == 3" />
<img src="../../images/arrow.png" v-else />
<img :src="require(`../../images/${editForm.status == 3 ? 'unArrow' : 'arrow'}.png`)" />
<span class="process_text">导航到店</span>
<img class="rightArrow" src="../../images/rightArrow.png" />
<img src="../../images/unCar.png" v-if="editForm.status == 3" />
<img src="../../images/car.png" v-else />
<img :src="require(`../../images/${editForm.status == 3 ? 'unCar' : 'car'}.png`)" />
<span class="process_text">开始服务</span>
<img class="rightArrow" src="../../images/rightArrow.png" />
<img src="../../images/unTicket.png" v-if="editForm.status == 3" />
<img src="../../images/ticket.png" v-else />
<img :src="require(`../../images/${editForm.status == 3 ? 'unTicket' : 'ticket'}.png`)" />
<span class="process_text">出示核销码</span>
</div>
</div>
......@@ -110,6 +106,13 @@
</el-input>
<span style="color: red; margin-left: 15px" v-if="priceFlag && editForm.useChannel == 1">{{ selectedAllProList.length ? '存在零售价低于代金券的商品' : '系统暂无已创建的商品,请先创建好商品后再配置代金券' }}</span>
</template>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存">
<span slot="suffix">张</span>
</el-input>
</template>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<template slot="goodsHtml">
<el-radio v-model="editForm.goods" label="1" v-if="apear == 'couponAdd'">全部商品可用</el-radio>
......@@ -137,6 +140,10 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</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>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="showSubmit" @click="handleConfirm">确定</el-button>
......@@ -159,10 +166,6 @@ export default {
userDisable: false,
size: 'small',
title: '创建',
titleObj: {
1: '创建晒单',
2: '编辑晒单'
},
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
......@@ -250,7 +253,6 @@ export default {
width: '320px',
type: 'input',
maxlength: 20
// index:0
},
{
label: '预估成本/元',
......@@ -258,82 +260,97 @@ export default {
width: '320px',
type: 'input',
isDisabled: false
// index:1
},
{
label: '使用途径',
name: 'useChannel',
addHtml: 'useChannelHtml'
// index:2
},
{
label: '有效期',
name: 'effectiveType',
addHtml: 'effectiveHtml'
// index:3
},
{
label: '使用限制',
name: 'useBarriers',
addHtml: 'useBarriersHtml'
// index:4
},
{
label: '适用商品',
name: 'goods',
addHtml: 'goodsHtml',
isHide: false
// index:6
},
{
// label: '门店',
name: '',
addHtml: 'proTable',
isHide: true
// index:7
},
{
label: '面值',
name: 'denomination',
addHtml: 'denominationHtml'
// index:8
},
{
label: '库存',
name: 'stock',
width: '150px',
type: 'input'
// index:9
addHtml: 'stock'
// width: '150px',
// type: 'input'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '使用说明',
name: 'useDescription',
addHtml: 'useDescriptionHtml'
// index:10
},
{
name: '',
name: 'editHtml',
addHtml: 'editHtml',
isHide: true
// index:11
}
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
// this.title = this.titleObj[this.routeInfo.addOrEdit]
this.getAllGoods()
var id = this.routeInfo.id
var addOrEdit = this.routeInfo.addOrEdit
......@@ -342,7 +359,8 @@ export default {
this.apear = 'couponSee'
this.showSubmit = false
this.title = '查看'
this.editFormData[11].isHide = false
let idx = this.editFormData.findIndex(item => item.name == 'editHtml')
this.editFormData[idx].isHide = false
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -699,7 +717,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
if (this.priceFlag && this.editForm.useChannel == 1) {
//存在零售价低于代金券的商品
return
......@@ -745,7 +769,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
......@@ -119,6 +119,13 @@
</el-radio>
</el-form-item>
</template>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input 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" />
</template>
......@@ -126,6 +133,10 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</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>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="showSubmit" @click="handleConfirm">确定</el-button>
......@@ -201,7 +212,7 @@ export default {
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'blur' }],
useDescription: [{ required: true, message: '使用说明不能为空', trigger: 'change' }],
stock: [{ required: true, message: '发放数量不能为空', trigger: 'change' }]
stock: [{ required: true, message: '库存不能为空', trigger: 'change' }]
},
editFormData: [
{
......@@ -231,18 +242,18 @@ export default {
addHtml: 'useLimitHtml'
},
{
label: '发放数量',
label: '库存',
name: 'stock',
width: '180px',
type: 'input',
append: '张'
addHtml: 'stock'
// width: '180px',
// type: 'input',
// append: '张'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期',
......@@ -259,10 +270,37 @@ export default {
addHtml: 'editHtml',
isHide: true
}
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -470,7 +508,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
if (params.couponId) {
......@@ -505,7 +549,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
<!-- 编辑兑换券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="height: 650px; position: relative">
<div class="container edit-container" style="position: relative">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -54,6 +54,13 @@
</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">
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input 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>
......@@ -89,6 +96,10 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</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>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="showSubmit" @click="handleConfirm">确定</el-button>
......@@ -158,7 +169,7 @@ export default {
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'blur' }],
useDescription: [{ required: true, message: '使用说明不能为空', trigger: 'change' }],
stock: [{ required: true, message: '发放数量不能为空', trigger: 'change' }]
stock: [{ required: true, message: '库存不能为空', trigger: 'change' }]
},
editFormData: [
{
......@@ -176,11 +187,12 @@ export default {
isDisabled: false
},
{
label: '发放数量',
label: '库存',
name: 'stock',
width: '180px',
type: 'input',
append: '张'
addHtml: 'stock'
// width: '180px',
// type: 'input',
// append: '张'
},
{
label: '使用规则',
......@@ -204,10 +216,37 @@ export default {
addHtml: 'editHtml',
isHide: true
}
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -373,7 +412,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
if (params.couponId) {
......@@ -408,7 +453,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
......@@ -42,10 +42,21 @@
</el-form-item>
</el-radio>
</template>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input 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="apear == 'couponSee'" />
</template>
</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>
</div>
</div>
<!-- <div class="left_show">
<div class="card-panel-top">
......@@ -156,18 +167,46 @@ export default {
{
label: '库存',
name: 'stock',
width: '150px',
type: 'input'
addHtml: 'stock'
// width: '150px',
// type: 'input'
},
{
label: '使用说明',
name: 'useDescription',
addHtml: 'useDescriptionHtml'
}
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -335,7 +374,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
if (params.couponId) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!