update:新增语音播报开关,减少秒到选项
This commit is contained in:
parent
090dfaeb2d
commit
d2d5bec659
@ -92,7 +92,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="营业状态"
|
label="营业状态"
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
prop="store_district_id"
|
prop="store_biz_state"
|
||||||
>
|
>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="storeForm.store_biz_state"
|
v-model="storeForm.store_biz_state"
|
||||||
@ -102,13 +102,33 @@
|
|||||||
inactive-color="#ff4949"
|
inactive-color="#ff4949"
|
||||||
active-text="营业中"
|
active-text="营业中"
|
||||||
@change="handleStoreStatus"
|
@change="handleStoreStatus"
|
||||||
inactive-text="已打烊">
|
inactive-text="已打烊"
|
||||||
</el-switch>
|
></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="grid-content bg-purple">
|
||||||
|
<el-form-item
|
||||||
|
label="语音播报"
|
||||||
|
label-width="150px"
|
||||||
|
prop="ringtone_is_enable"
|
||||||
|
>
|
||||||
|
<el-switch
|
||||||
|
v-model="storeForm.ringtone_is_enable"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="2"
|
||||||
|
@change="handleRingStatus"
|
||||||
|
active-text="开启"
|
||||||
|
inactive-text="关闭"
|
||||||
|
></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="grid-content bg-purple">
|
<div class="grid-content bg-purple">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@ -126,7 +146,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -464,271 +483,76 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { translateTitle as __ } from '@/utils/i18n'
|
import { translateTitle as __ } from '@/utils/i18n'
|
||||||
import VabQuill from '@/extra/VabQuill'
|
import VabQuill from '@/extra/VabQuill'
|
||||||
import Area from '@/components/VabArea/area'
|
import Area from '@/components/VabArea/area'
|
||||||
import upload from '@/components/upload'
|
import upload from '@/components/upload'
|
||||||
import tree from '@/components/universalTreeSelect.vue'
|
import tree from '@/components/universalTreeSelect.vue'
|
||||||
import keyword from '@/components/baiduMap/keyword'
|
import keyword from '@/components/baiduMap/keyword'
|
||||||
import { get, storeSetUp } from '@/api/store/base'
|
import { get, storeSetUp } from '@/api/store/base'
|
||||||
import { getTree } from '@/api/base/market/category'
|
import { getTree } from '@/api/base/market/category'
|
||||||
import { handleMatched } from '@/utils/routes'
|
import { handleMatched } from '@/utils/routes'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SetUpShop',
|
name: 'SetUpShop',
|
||||||
components: { VabQuill, Area, upload, keyword, tree },
|
components: { VabQuill, Area, upload, keyword, tree },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
height: window.innerHeight - 220 - 90,
|
height: window.innerHeight - 220 - 90,
|
||||||
},
|
|
||||||
test: 666,
|
|
||||||
treeData: [],
|
|
||||||
activeName: 'first',
|
|
||||||
optionslist: [
|
|
||||||
{
|
|
||||||
value: '1001',
|
|
||||||
label: this.__('免费停车'),
|
|
||||||
},
|
},
|
||||||
{
|
test: 666,
|
||||||
value: '1002',
|
treeData: [],
|
||||||
label: this.__('免费WiFi'),
|
activeName: 'first',
|
||||||
},
|
optionslist: [
|
||||||
{
|
{
|
||||||
value: '1003',
|
value: '1001',
|
||||||
label: this.__('免费送货'),
|
label: this.__('免费停车'),
|
||||||
},
|
},
|
||||||
],
|
{
|
||||||
value: '',
|
value: '1002',
|
||||||
options: {
|
label: this.__('免费WiFi'),
|
||||||
theme: 'snow',
|
},
|
||||||
bounds: document.body,
|
{
|
||||||
debug: 'warn',
|
value: '1003',
|
||||||
modules: {
|
label: this.__('免费送货'),
|
||||||
toolbar: {
|
|
||||||
container: [
|
|
||||||
['bold', 'italic', 'underline', 'strike'],
|
|
||||||
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
|
||||||
[{ size: ['small', false, 'large', 'huge'] }],
|
|
||||||
[{ color: [] }, { background: [] }],
|
|
||||||
['blockquote', 'code-block'],
|
|
||||||
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
||||||
[{ script: 'sub' }, { script: 'super' }],
|
|
||||||
[{ indent: '-1' }, { indent: '+1' }],
|
|
||||||
[{ align: [] }],
|
|
||||||
[{ direction: 'rtl' }],
|
|
||||||
[{ font: [] }],
|
|
||||||
['clean'],
|
|
||||||
['link', 'image', 'vab-upload-image'],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
placeholder: '',
|
|
||||||
readOnly: false,
|
|
||||||
isRest:false
|
|
||||||
},
|
|
||||||
defaultProps: {
|
|
||||||
label: 'category_name',
|
|
||||||
children: 'children',
|
|
||||||
disabled: 'disabled',
|
|
||||||
},
|
|
||||||
storeForm: {},
|
|
||||||
slideShowForm: {
|
|
||||||
store_slide: [
|
|
||||||
{ img: '', check: true, name: '' },
|
|
||||||
{ img: '', check: true, name: '' },
|
|
||||||
{ img: '', check: true, name: '' },
|
|
||||||
{ img: '', check: true, name: '' },
|
|
||||||
{ img: '', check: true, name: '' },
|
|
||||||
],
|
],
|
||||||
},
|
value: '',
|
||||||
physicalStoreForm: {
|
options: {
|
||||||
store_notice: undefined,
|
theme: 'snow',
|
||||||
store_o2o_tags: [],
|
bounds: document.body,
|
||||||
store_opening_hours: undefined,
|
debug: 'warn',
|
||||||
store_close_hours: undefined,
|
modules: {
|
||||||
store_discount: undefined,
|
toolbar: {
|
||||||
store_circle: undefined,
|
container: [
|
||||||
},
|
['bold', 'italic', 'underline', 'strike'],
|
||||||
storeConfigForm: {
|
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
||||||
sc_is_enabled_invoice: undefined,
|
[{ size: ['small', false, 'large', 'huge'] }],
|
||||||
},
|
[{ color: [] }, { background: [] }],
|
||||||
form: {
|
['blockquote', 'code-block'],
|
||||||
store_name: undefined,
|
[{ list: 'ordered' }, { list: 'bullet' }],
|
||||||
store_logo: undefined,
|
[{ script: 'sub' }, { script: 'super' }],
|
||||||
store_slogan: undefined,
|
[{ indent: '-1' }, { indent: '+1' }],
|
||||||
store_address: undefined,
|
[{ align: [] }],
|
||||||
store_longitude: '',
|
[{ direction: 'rtl' }],
|
||||||
store_latitude: '',
|
[{ font: [] }],
|
||||||
str_store_area: undefined,
|
['clean'],
|
||||||
store_tel: undefined,
|
['link', 'image', 'vab-upload-image'],
|
||||||
store_opening_hours: undefined,
|
],
|
||||||
store_circle: undefined,
|
},
|
||||||
store_discount: undefined,
|
},
|
||||||
store_close_hours: undefined,
|
placeholder: '',
|
||||||
store_qq: undefined,
|
readOnly: false,
|
||||||
company_description: undefined,
|
isRest: false,
|
||||||
store_banner: undefined,
|
},
|
||||||
store_ww: undefined,
|
defaultProps: {
|
||||||
store_notice: undefined,
|
label: 'category_name',
|
||||||
store_o2o_tags: [],
|
children: 'children',
|
||||||
store_district_id: '',
|
disabled: 'disabled',
|
||||||
packing_fee:0
|
},
|
||||||
},
|
storeForm: {},
|
||||||
queryArea: {
|
slideShowForm: {
|
||||||
province: { code: '', name: '' },
|
|
||||||
city: { code: '', name: '' },
|
|
||||||
district: { code: '', name: '' },
|
|
||||||
},
|
|
||||||
srcList: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.fetchData()
|
|
||||||
this.getTree()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getPhysicalStoreParams() {
|
|
||||||
const form = this.physicalStoreForm
|
|
||||||
let params = {
|
|
||||||
store_notice: form.store_notice,
|
|
||||||
// store_o2o_tags: form.store_o2o_tags.toString(),
|
|
||||||
store_opening_hours: form.store_opening_hours,
|
|
||||||
store_close_hours: form.store_close_hours,
|
|
||||||
store_discount: form.store_discount,
|
|
||||||
store_circle: form.store_circle,
|
|
||||||
}
|
|
||||||
return params
|
|
||||||
},
|
|
||||||
getStoreParams() {
|
|
||||||
const form = this.storeForm
|
|
||||||
let params = {
|
|
||||||
store_name: form.store_name,
|
|
||||||
store_slogan: form.store_slogan,
|
|
||||||
store_logo: form.store_logo,
|
|
||||||
store_banner: form.store_banner,
|
|
||||||
store_address: form.store_address,
|
|
||||||
store_longitude: form.store_longitude,
|
|
||||||
store_latitude: form.store_latitude,
|
|
||||||
store_tel: form.store_tel,
|
|
||||||
store_qq: form.store_qq,
|
|
||||||
store_ww: form.store_ww,
|
|
||||||
company_description: form.company_description,
|
|
||||||
store_biz_state:form.store_biz_state,
|
|
||||||
packing_fee:form.packing_fee
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.queryArea.province.name) {
|
|
||||||
params.store_area = this.queryArea.province.name
|
|
||||||
}
|
|
||||||
if (this.queryArea.city.name) {
|
|
||||||
params.store_area += '/' + this.queryArea.city.name
|
|
||||||
}
|
|
||||||
if (this.queryArea.district.name) {
|
|
||||||
params.store_area += '/' + this.queryArea.district.name
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.queryArea.province.code) {
|
|
||||||
params.store_district_id = this.queryArea.province.code
|
|
||||||
}
|
|
||||||
if (this.queryArea.city.code) {
|
|
||||||
params.store_district_id += '/' + this.queryArea.city.code
|
|
||||||
}
|
|
||||||
if (this.queryArea.district.code) {
|
|
||||||
params.store_district_id += '/' + this.queryArea.district.code
|
|
||||||
}
|
|
||||||
|
|
||||||
return params
|
|
||||||
},
|
|
||||||
handleStoreStatus(e){
|
|
||||||
this.storeForm.store_biz_state = e;
|
|
||||||
},
|
|
||||||
getSlideShowForm() {
|
|
||||||
const form = this.slideShowForm
|
|
||||||
let params = {
|
|
||||||
store_slide: JSON.stringify(form.store_slide),
|
|
||||||
}
|
|
||||||
return params
|
|
||||||
},
|
|
||||||
getStoreConfigForm() {
|
|
||||||
const form = this.storeConfigForm
|
|
||||||
let params = {
|
|
||||||
sc_is_enabled_invoice: JSON.stringify(form.sc_is_enabled_invoice),
|
|
||||||
}
|
|
||||||
return params
|
|
||||||
},
|
|
||||||
__,
|
|
||||||
upImage(image, index) {
|
|
||||||
this.form.store_slide[index].img = image
|
|
||||||
},
|
|
||||||
|
|
||||||
async handleEdit(params) {
|
|
||||||
this.$baseConfirm(this.__('修改立马生效,是否继续?'), null, async () => {
|
|
||||||
const { msg, status } = await storeSetUp(params)
|
|
||||||
if (200 == status) {
|
|
||||||
this.$baseMessage(msg, 'success')
|
|
||||||
} else {
|
|
||||||
this.$baseMessage(msg, 'error')
|
|
||||||
}
|
|
||||||
await this.fetchData()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleParams() {
|
|
||||||
let params = Object.assign({}, this.form)
|
|
||||||
params.store_o2o_tags = this.form.store_o2o_tags.toString()
|
|
||||||
params.store_slide = JSON.stringify(params.store_slide)
|
|
||||||
return params
|
|
||||||
},
|
|
||||||
async fetchData(params) {
|
|
||||||
const { data } = await get({ params })
|
|
||||||
this.initData(data)
|
|
||||||
},
|
|
||||||
async getTree() {
|
|
||||||
const { data } = await getTree()
|
|
||||||
console.log(data)
|
|
||||||
if (data) {
|
|
||||||
this.treeData = data
|
|
||||||
} else {
|
|
||||||
this.treeData = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initData(data) {
|
|
||||||
this.physicalStoreForm = {
|
|
||||||
store_notice: data.info.store_notice,
|
|
||||||
store_opening_hours: data.info.store_opening_hours,
|
|
||||||
store_close_hours: data.info.store_close_hours,
|
|
||||||
store_discount: data.info.store_discount,
|
|
||||||
store_circle: Number(data.store_circle),
|
|
||||||
}
|
|
||||||
this.storeConfigForm = {
|
|
||||||
sc_is_enabled_invoice: data.sc_is_enabled_invoice,
|
|
||||||
}
|
|
||||||
if (data.store_o2o_tags) {
|
|
||||||
this.physicalStoreForm.store_o2o_tags = data.store_o2o_tags.split(',')
|
|
||||||
}
|
|
||||||
|
|
||||||
this.storeForm = {
|
|
||||||
store_name: data.store_name,
|
|
||||||
store_slogan: data.store_slogan,
|
|
||||||
store_logo: data.store_logo,
|
|
||||||
store_banner: data.info.store_banner,
|
|
||||||
store_address: data.store_address,
|
|
||||||
store_longitude: data.store_longitude,
|
|
||||||
store_latitude: data.store_latitude,
|
|
||||||
store_tel: data.info.store_tel,
|
|
||||||
store_qq: data.info.store_qq,
|
|
||||||
store_ww: data.info.store_ww,
|
|
||||||
company_description: data.company.company_description,
|
|
||||||
wx_qrcode: data.wx_qrcode,
|
|
||||||
store_biz_state:data.store_biz_state,
|
|
||||||
packing_fee:data.packing_fee
|
|
||||||
}
|
|
||||||
|
|
||||||
this.srcList.push(data.wx_qrcode)
|
|
||||||
if (data.info.store_slide && data.info.store_slide.length > 0) {
|
|
||||||
this.slideShowForm.store_slide = data.info.store_slide
|
|
||||||
} else {
|
|
||||||
this.slideShowForm = {
|
|
||||||
store_slide: [
|
store_slide: [
|
||||||
{ img: '', check: true, name: '' },
|
{ img: '', check: true, name: '' },
|
||||||
{ img: '', check: true, name: '' },
|
{ img: '', check: true, name: '' },
|
||||||
@ -736,70 +560,275 @@ export default {
|
|||||||
{ img: '', check: true, name: '' },
|
{ img: '', check: true, name: '' },
|
||||||
{ img: '', check: true, name: '' },
|
{ img: '', check: true, name: '' },
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
physicalStoreForm: {
|
||||||
|
store_notice: undefined,
|
||||||
|
store_o2o_tags: [],
|
||||||
|
store_opening_hours: undefined,
|
||||||
|
store_close_hours: undefined,
|
||||||
|
store_discount: undefined,
|
||||||
|
store_circle: undefined,
|
||||||
|
},
|
||||||
|
storeConfigForm: {
|
||||||
|
sc_is_enabled_invoice: undefined,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
store_name: undefined,
|
||||||
|
store_logo: undefined,
|
||||||
|
store_slogan: undefined,
|
||||||
|
store_address: undefined,
|
||||||
|
store_longitude: '',
|
||||||
|
store_latitude: '',
|
||||||
|
str_store_area: undefined,
|
||||||
|
store_tel: undefined,
|
||||||
|
store_opening_hours: undefined,
|
||||||
|
store_circle: undefined,
|
||||||
|
store_discount: undefined,
|
||||||
|
store_close_hours: undefined,
|
||||||
|
store_qq: undefined,
|
||||||
|
company_description: undefined,
|
||||||
|
store_banner: undefined,
|
||||||
|
store_ww: undefined,
|
||||||
|
store_notice: undefined,
|
||||||
|
store_o2o_tags: [],
|
||||||
|
store_district_id: '',
|
||||||
|
packing_fee: 0,
|
||||||
|
},
|
||||||
|
queryArea: {
|
||||||
|
province: { code: '', name: '' },
|
||||||
|
city: { code: '', name: '' },
|
||||||
|
district: { code: '', name: '' },
|
||||||
|
},
|
||||||
|
srcList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
this.getTree()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getPhysicalStoreParams() {
|
||||||
|
const form = this.physicalStoreForm
|
||||||
|
let params = {
|
||||||
|
store_notice: form.store_notice,
|
||||||
|
// store_o2o_tags: form.store_o2o_tags.toString(),
|
||||||
|
store_opening_hours: form.store_opening_hours,
|
||||||
|
store_close_hours: form.store_close_hours,
|
||||||
|
store_discount: form.store_discount,
|
||||||
|
store_circle: form.store_circle,
|
||||||
|
}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
getStoreParams() {
|
||||||
|
const form = this.storeForm
|
||||||
|
let params = {
|
||||||
|
store_name: form.store_name,
|
||||||
|
store_slogan: form.store_slogan,
|
||||||
|
store_logo: form.store_logo,
|
||||||
|
store_banner: form.store_banner,
|
||||||
|
store_address: form.store_address,
|
||||||
|
store_longitude: form.store_longitude,
|
||||||
|
store_latitude: form.store_latitude,
|
||||||
|
store_tel: form.store_tel,
|
||||||
|
ringtone_is_enable:form.ringtone_is_enable,
|
||||||
|
store_qq: form.store_qq,
|
||||||
|
store_ww: form.store_ww,
|
||||||
|
company_description: form.company_description,
|
||||||
|
store_biz_state: form.store_biz_state,
|
||||||
|
packing_fee: form.packing_fee,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const store_area = data.store_area.split('/')
|
if (this.queryArea.province.name) {
|
||||||
const store_district_id = data.store_district_id.split(',')
|
params.store_area = this.queryArea.province.name
|
||||||
|
}
|
||||||
|
if (this.queryArea.city.name) {
|
||||||
|
params.store_area += '/' + this.queryArea.city.name
|
||||||
|
}
|
||||||
|
if (this.queryArea.district.name) {
|
||||||
|
params.store_area += '/' + this.queryArea.district.name
|
||||||
|
}
|
||||||
|
|
||||||
this.initQueryArea(store_district_id, store_area)
|
if (this.queryArea.province.code) {
|
||||||
this.form.store_o2o_flag = data.store_o2o_flag
|
params.store_district_id = this.queryArea.province.code
|
||||||
|
}
|
||||||
|
if (this.queryArea.city.code) {
|
||||||
|
params.store_district_id += '/' + this.queryArea.city.code
|
||||||
|
}
|
||||||
|
if (this.queryArea.district.code) {
|
||||||
|
params.store_district_id += '/' + this.queryArea.district.code
|
||||||
|
}
|
||||||
|
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
handleStoreStatus(e) {
|
||||||
|
this.storeForm.store_biz_state = e
|
||||||
|
},
|
||||||
|
handleRingStatus(e) {
|
||||||
|
this.storeForm.ringtone_is_enable = e
|
||||||
|
console.log('ringtone_is_enable:', this.storeForm.ringtone_is_enable)
|
||||||
|
},
|
||||||
|
getSlideShowForm() {
|
||||||
|
const form = this.slideShowForm
|
||||||
|
let params = {
|
||||||
|
store_slide: JSON.stringify(form.store_slide),
|
||||||
|
}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
getStoreConfigForm() {
|
||||||
|
const form = this.storeConfigForm
|
||||||
|
let params = {
|
||||||
|
sc_is_enabled_invoice: JSON.stringify(form.sc_is_enabled_invoice),
|
||||||
|
}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
__,
|
||||||
|
upImage(image, index) {
|
||||||
|
this.form.store_slide[index].img = image
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleEdit(params) {
|
||||||
|
console.log('handleEdit params:', params)
|
||||||
|
this.$baseConfirm(
|
||||||
|
this.__('修改立马生效,是否继续?'),
|
||||||
|
null,
|
||||||
|
async () => {
|
||||||
|
const { msg, status } = await storeSetUp(params)
|
||||||
|
if (200 == status) {
|
||||||
|
this.$baseMessage(msg, 'success')
|
||||||
|
} else {
|
||||||
|
this.$baseMessage(msg, 'error')
|
||||||
|
}
|
||||||
|
await this.fetchData()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
handleParams() {
|
||||||
|
let params = Object.assign({}, this.form)
|
||||||
|
params.store_o2o_tags = this.form.store_o2o_tags.toString()
|
||||||
|
params.store_slide = JSON.stringify(params.store_slide)
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
async fetchData(params) {
|
||||||
|
const { data } = await get({ params })
|
||||||
|
this.initData(data)
|
||||||
|
},
|
||||||
|
async getTree() {
|
||||||
|
const { data } = await getTree()
|
||||||
|
if (data) {
|
||||||
|
this.treeData = data
|
||||||
|
} else {
|
||||||
|
this.treeData = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initData(data) {
|
||||||
|
this.physicalStoreForm = {
|
||||||
|
store_notice: data.info.store_notice,
|
||||||
|
store_opening_hours: data.info.store_opening_hours,
|
||||||
|
store_close_hours: data.info.store_close_hours,
|
||||||
|
store_discount: data.info.store_discount,
|
||||||
|
store_circle: Number(data.store_circle),
|
||||||
|
}
|
||||||
|
this.storeConfigForm = {
|
||||||
|
sc_is_enabled_invoice: data.sc_is_enabled_invoice,
|
||||||
|
}
|
||||||
|
if (data.store_o2o_tags) {
|
||||||
|
this.physicalStoreForm.store_o2o_tags = data.store_o2o_tags.split(',')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.storeForm = {
|
||||||
|
store_name: data.store_name,
|
||||||
|
store_slogan: data.store_slogan,
|
||||||
|
store_logo: data.store_logo,
|
||||||
|
store_banner: data.info.store_banner,
|
||||||
|
store_address: data.store_address,
|
||||||
|
store_longitude: data.store_longitude,
|
||||||
|
store_latitude: data.store_latitude,
|
||||||
|
store_tel: data.info.store_tel,
|
||||||
|
store_qq: data.info.store_qq,
|
||||||
|
store_ww: data.info.store_ww,
|
||||||
|
company_description: data.company.company_description,
|
||||||
|
wx_qrcode: data.wx_qrcode,
|
||||||
|
store_biz_state: data.store_biz_state,
|
||||||
|
packing_fee: data.packing_fee,
|
||||||
|
ringtone_is_enable: data.ringtone_is_enable,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.srcList.push(data.wx_qrcode)
|
||||||
|
if (data.info.store_slide && data.info.store_slide.length > 0) {
|
||||||
|
this.slideShowForm.store_slide = data.info.store_slide
|
||||||
|
} else {
|
||||||
|
this.slideShowForm = {
|
||||||
|
store_slide: [
|
||||||
|
{ img: '', check: true, name: '' },
|
||||||
|
{ img: '', check: true, name: '' },
|
||||||
|
{ img: '', check: true, name: '' },
|
||||||
|
{ img: '', check: true, name: '' },
|
||||||
|
{ img: '', check: true, name: '' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const store_area = data.store_area.split('/')
|
||||||
|
const store_district_id = data.store_district_id.split(',')
|
||||||
|
|
||||||
|
this.initQueryArea(store_district_id, store_area)
|
||||||
|
this.form.store_o2o_flag = data.store_o2o_flag
|
||||||
|
},
|
||||||
|
initQueryArea(store_district_id, store_area) {
|
||||||
|
if (!store_district_id && store_area) return
|
||||||
|
if (store_district_id[0]) {
|
||||||
|
this.queryArea.province.code = store_district_id[0]
|
||||||
|
}
|
||||||
|
if (store_district_id[1]) {
|
||||||
|
this.queryArea.city.code = store_district_id[1]
|
||||||
|
}
|
||||||
|
if (store_district_id[2]) {
|
||||||
|
this.queryArea.district.code = store_district_id[2]
|
||||||
|
}
|
||||||
|
if (store_area[0]) {
|
||||||
|
this.queryArea.province.name = store_area[0]
|
||||||
|
}
|
||||||
|
if (store_area[1]) {
|
||||||
|
this.queryArea.city.name = store_area[1]
|
||||||
|
}
|
||||||
|
if (store_area[2]) {
|
||||||
|
this.queryArea.district.name = store_area[2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getAddress(address) {
|
||||||
|
this.storeForm.store_address = address.value
|
||||||
|
this.storeForm.store_longitude = address.lng
|
||||||
|
this.storeForm.store_latitude = address.lat
|
||||||
|
},
|
||||||
},
|
},
|
||||||
initQueryArea(store_district_id, store_area) {
|
}
|
||||||
if (!store_district_id && store_area) return
|
|
||||||
if (store_district_id[0]) {
|
|
||||||
this.queryArea.province.code = store_district_id[0]
|
|
||||||
}
|
|
||||||
if (store_district_id[1]) {
|
|
||||||
this.queryArea.city.code = store_district_id[1]
|
|
||||||
}
|
|
||||||
if (store_district_id[2]) {
|
|
||||||
this.queryArea.district.code = store_district_id[2]
|
|
||||||
}
|
|
||||||
if (store_area[0]) {
|
|
||||||
this.queryArea.province.name = store_area[0]
|
|
||||||
}
|
|
||||||
if (store_area[1]) {
|
|
||||||
this.queryArea.city.name = store_area[1]
|
|
||||||
}
|
|
||||||
if (store_area[2]) {
|
|
||||||
this.queryArea.district.name = store_area[2]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getAddress(address) {
|
|
||||||
this.storeForm.store_address = address.value
|
|
||||||
this.storeForm.store_longitude = address.lng
|
|
||||||
this.storeForm.store_latitude = address.lat
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.config-save {
|
.config-save {
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #2c2e30;
|
background-color: #2c2e30;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.config-save:hover {
|
.config-save:hover {
|
||||||
background-color: #3d3d3d;
|
background-color: #3d3d3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-item-img-list {
|
.form-item-img-list {
|
||||||
.el-form-item__content {
|
.el-form-item__content {
|
||||||
|
display: flex;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.QRcode {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 0;
|
margin-left: 40px;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.QRcode {
|
.QRcode-img {
|
||||||
display: flex;
|
border: 1px solid #cccccc;
|
||||||
margin-left: 40px;
|
border-radius: 6px;
|
||||||
|
}
|
||||||
.QRcode-img {
|
|
||||||
border: 1px solid #cccccc;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -263,7 +263,6 @@
|
|||||||
<div class="item-block" >
|
<div class="item-block" >
|
||||||
<div class="item-lable">
|
<div class="item-lable">
|
||||||
<label style="margin-right: 20px;">结算类型:</label>
|
<label style="margin-right: 20px;">结算类型:</label>
|
||||||
<el-radio v-model="form.settlement_method" :label="0" :disabled="isReadonly">秒到</el-radio>
|
|
||||||
<el-radio v-model="form.settlement_method" :label="1" :disabled="isReadonly">次日结算</el-radio>
|
<el-radio v-model="form.settlement_method" :label="1" :disabled="isReadonly">次日结算</el-radio>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user