|
|
<template>
|
|
|
<LayoutBody v-if="shopData">
|
|
|
<Form :label-width="100">
|
|
|
<LayoutBody>
|
|
|
<Form :label-width="100" v-if='shopData' ref="shopData" :model="shopData">
|
|
|
<Form-item label="店铺名称:">
|
|
|
<span>{{shopData.shopName}}</span>
|
|
|
</Form-item>
|
...
|
...
|
@@ -23,7 +23,9 @@ |
|
|
<em class="upload-img-tip">尺寸要求150px*150px 不大于500KB</em>
|
|
|
</Form-item>
|
|
|
<Form-item label="店铺简介:">
|
|
|
<editor :content="shopData.shopIntro" @change="updateData"></editor>
|
|
|
<editor :content="shopData.shopIntro"
|
|
|
@change="updateData">
|
|
|
</editor>
|
|
|
</Form-item>
|
|
|
<Form-item label="品牌-供应商:">
|
|
|
<Table :columns="tableCols" :data="tableData"></Table>
|
...
|
...
|
@@ -39,27 +41,12 @@ |
|
|
|
|
|
import service from 'shop-service';
|
|
|
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
const SHOPNATURE = {
|
|
|
1: '旗舰店',
|
|
|
2: '专卖店',
|
|
|
3: '初始状态(异常情况)'
|
|
|
};
|
|
|
|
|
|
const makeSaveShop = () => {
|
|
|
return {
|
|
|
shopDomain: '',
|
|
|
shopIntro: '',
|
|
|
shopLogo: '',
|
|
|
shopName: '',
|
|
|
shopNature: '',
|
|
|
shopRelationList: '',
|
|
|
shopsId: '',
|
|
|
shopsType: ''
|
|
|
};
|
|
|
};
|
|
|
|
|
|
export default {
|
|
|
created() {
|
|
|
service.getShop().then((res) => {
|
...
|
...
|
@@ -94,7 +81,9 @@ |
|
|
},
|
|
|
methods: {
|
|
|
updateData: function(content) {
|
|
|
this.shopData.shopIntro = content;
|
|
|
this.shopData.shopIntro = content;
|
|
|
console.log('1this.shopData.shopIntro-------');
|
|
|
console.log(this.shopData.shopIntro);
|
|
|
},
|
|
|
|
|
|
uploadImageSuccess: function(attach, file) {
|
...
|
...
|
@@ -106,21 +95,28 @@ |
|
|
},
|
|
|
|
|
|
beforeSubmit: function() {
|
|
|
let newShop = makeSaveShop();
|
|
|
|
|
|
newShop.shopDomain = this.shopData.shopDomain;
|
|
|
newShop.shopLogo = this.shopData.shopLogo;
|
|
|
newShop.shopName = this.shopData.shopName;
|
|
|
newShop.shopNature = this.shopData.shopNature;
|
|
|
newShop.shopRelationList = this.shopData.shopRelationList;
|
|
|
newShop.shopsId = this.shopData.shopsId;
|
|
|
newShop.shopsType = this.shopData.shopsType;
|
|
|
|
|
|
return newShop;
|
|
|
let result = {
|
|
|
shopDomain: this.shopData.shopDomain,
|
|
|
shopLogo: this.shopData.shopLogo,
|
|
|
shopName: this.shopData.shopName,
|
|
|
shopNature: this.shopData.shopNature,
|
|
|
shopRelationList: this.shopData.shopRelationList,
|
|
|
shopsId: this.shopData.shopsId,
|
|
|
shopsType: this.shopData.shopsType,
|
|
|
shopIntro: this.shopData.shopIntro
|
|
|
};
|
|
|
|
|
|
console.log('2this.shopData.shopIntro-------');
|
|
|
console.log(this.shopData.shopIntro);
|
|
|
|
|
|
return result;
|
|
|
},
|
|
|
submit: function() {
|
|
|
let newShop = this.beforeSubmit();
|
|
|
|
|
|
console.log('3this.shopData.shopIntro-------');
|
|
|
console.log(this.shopData.shopIntro);
|
|
|
|
|
|
this.$Loading.start();
|
|
|
service.saveBaseShopInfo(newShop).then((result) => {
|
|
|
this.$Loading.finish();
|
...
|
...
|
|