Commit 9653feba by chenwq

全局变量(集团版集团账号);服务券,代金券,兑换券,折扣券-子弹添加,提交验证,不同平台不同账号等级。

1 parent 94d0a8c8
......@@ -240,6 +240,10 @@ html {
height: 120px;
}
.marketing .w-150 {
width: 150px;
}
.marketing .w-320 {
width: 320px;
}
......
......@@ -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 : 'scrm-base-0958821a-6542-474e-b057-74a1192a25f2-rop'
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)
......
......@@ -108,8 +108,10 @@
</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="请输入库存"></el-input>
<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">
......@@ -138,7 +140,7 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</glsx-combi-form>
<div v-if="isGroupUp">
<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>
......@@ -164,8 +166,6 @@ export default {
userDisable: false,
size: 'small',
title: '创建',
// 集团版集团账号
isGroupUp: false,
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
......@@ -337,16 +337,14 @@ export default {
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
],
]
}
]
}
},
created() {
this.userInfo = this.$globalState.session
this.isGroupUp = this.userInfo.merchantModel == 1 && this.userInfo.accountLevel != 4
this.editRule.stock[0].required = !this.isGroupUp
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
......@@ -720,7 +718,7 @@ export default {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
var merchantval = true
if (this.isGroupUp) {
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
......@@ -880,10 +878,6 @@ export default {
margin-top: 8px;
}
.w-150 {
width: 150px;
}
.link-top {
width: 227px;
height: 1px;
......
......@@ -121,8 +121,10 @@
</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="请输入库存"></el-input>
<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" />
......@@ -131,7 +133,7 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</glsx-combi-form>
<div v-if="isGroupUp">
<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>
......@@ -160,8 +162,6 @@ export default {
1: '创建晒单',
2: '编辑晒单'
},
// 集团版集团账号
isGroupUp: false,
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
......@@ -291,16 +291,14 @@ export default {
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
],
]
}
]
}
},
created() {
this.userInfo = this.$globalState.session
this.isGroupUp = this.userInfo.merchantModel == 1 && this.userInfo.accountLevel != 4
this.editRule.stock[0].required = !this.isGroupUp
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
......@@ -511,7 +509,7 @@ export default {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
var merchantval = true
if (this.isGroupUp) {
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
......
......@@ -56,8 +56,10 @@
<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="请输入库存"></el-input>
<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>
......@@ -94,7 +96,7 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</glsx-combi-form>
<div v-if="isGroupUp">
<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>
......@@ -123,8 +125,6 @@ export default {
1: '创建晒单',
2: '编辑晒单'
},
// 集团版集团账号
isGroupUp: false,
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
......@@ -244,9 +244,7 @@ export default {
},
created() {
this.userInfo = this.$globalState.session
this.isGroupUp = this.userInfo.merchantModel == 1 && this.userInfo.accountLevel != 4
this.editRule.stock[0].required = !this.isGroupUp
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
......@@ -415,7 +413,7 @@ export default {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
var merchantval = true
if (this.isGroupUp) {
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
......
......@@ -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!