更新
This commit is contained in:
parent
70d5e103d5
commit
855559efe4
@ -22,6 +22,7 @@ const state = {
|
|||||||
introduction: "",
|
introduction: "",
|
||||||
marginStatus: 0,
|
marginStatus: 0,
|
||||||
marginDays: "",
|
marginDays: "",
|
||||||
|
wholesale: 0,
|
||||||
roles: [],
|
roles: [],
|
||||||
menuList: JSON.parse(localStorage.getItem("MerMenuList")),
|
menuList: JSON.parse(localStorage.getItem("MerMenuList")),
|
||||||
sidebarWidth: window.localStorage.getItem("sidebarWidth"),
|
sidebarWidth: window.localStorage.getItem("sidebarWidth"),
|
||||||
@ -44,6 +45,9 @@ const mutations = {
|
|||||||
SET_NAME: (state, name) => {
|
SET_NAME: (state, name) => {
|
||||||
state.name = name;
|
state.name = name;
|
||||||
},
|
},
|
||||||
|
SET_WHOLESALE: (state, wholesale) => {
|
||||||
|
state.wholesale = wholesale;
|
||||||
|
},
|
||||||
SET_AVATAR: (state, avatar) => {
|
SET_AVATAR: (state, avatar) => {
|
||||||
state.avatar = avatar;
|
state.avatar = avatar;
|
||||||
},
|
},
|
||||||
|
@ -423,7 +423,7 @@ export default {
|
|||||||
getUserMessage() {
|
getUserMessage() {
|
||||||
getBaseInfo().then(res => {
|
getBaseInfo().then(res => {
|
||||||
const resData = res.data
|
const resData = res.data
|
||||||
console.log(resData)
|
this.$store.commit('user/SET_WHOLESALE', resData.wholesale)
|
||||||
if (
|
if (
|
||||||
!resData.mer_avatar ||
|
!resData.mer_avatar ||
|
||||||
!resData.mer_banner ||
|
!resData.mer_banner ||
|
||||||
|
@ -961,7 +961,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<!-- 商品详情-->
|
<!-- 商品详情-->
|
||||||
<el-row v-if="currentTab == '3'">
|
<el-row v-if="currentTab == '3'">
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">
|
||||||
<el-form-item label="商品详情:">
|
<el-form-item label="商品详情:">
|
||||||
<vue-ueditor-wrap
|
<vue-ueditor-wrap
|
||||||
v-model="formValidate.content"
|
v-model="formValidate.content"
|
||||||
@ -969,10 +969,31 @@
|
|||||||
@beforeInit="addCustomDialog"
|
@beforeInit="addCustomDialog"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="24">
|
||||||
|
<!-- <el-form-item label="商品详情:">
|
||||||
|
<el-input
|
||||||
|
v-model="formValidate.content.title"
|
||||||
|
placeholder="请输入商品详情"
|
||||||
|
class="selWidth"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="商品图片:">
|
||||||
|
<div class="upLoadPicBox" title="750*750px" @click="modalPicTap('3')">
|
||||||
|
<div v-for="(item, index) in formValidate.content.image" class="pictrue details_pictrue"
|
||||||
|
@click.stop="deleteContentImg(index)" :key="index + item">
|
||||||
|
<img :src="item" :key="index" />
|
||||||
|
</div>
|
||||||
|
<div class="upLoad details_pictrue">
|
||||||
|
<i class="el-icon-camera cameraIconfont" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 营销设置-->
|
<!-- 营销设置-->
|
||||||
<el-row v-if="currentTab == '4'">
|
<!-- <el-row v-if="currentTab == '4'">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="商品推荐:">
|
<el-form-item label="商品推荐:">
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
@ -1062,10 +1083,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
<!-- 其它设置 -->
|
<!-- 其它设置 -->
|
||||||
<el-row v-if="currentTab == '5'">
|
<el-row v-if="currentTab == '4'">
|
||||||
<el-col>
|
<!-- <el-col>
|
||||||
<el-form-item label="支持退款:">
|
<el-form-item label="支持退款:">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="formValidate.refund_switch"
|
v-model="formValidate.refund_switch"
|
||||||
@ -1076,7 +1097,7 @@
|
|||||||
inactive-text="关闭"
|
inactive-text="关闭"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col v-if="deliveryList.length > 0" :span="24">
|
<el-col v-if="deliveryList.length > 0" :span="24">
|
||||||
<el-form-item label="送货方式:" prop="delivery_way">
|
<el-form-item label="送货方式:" prop="delivery_way">
|
||||||
<div class="acea-row">
|
<div class="acea-row">
|
||||||
@ -1190,7 +1211,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">
|
||||||
<el-form-item label="平台保障服务:">
|
<el-form-item label="平台保障服务:">
|
||||||
<div class="acea-row">
|
<div class="acea-row">
|
||||||
<el-select
|
<el-select
|
||||||
@ -1302,7 +1323,7 @@
|
|||||||
@click="addSpecs"
|
@click="addSpecs"
|
||||||
>添加参数</el-button>
|
>添加参数</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<!-- <el-col v-if="formValidate.type == 1" :span="24">
|
<!-- <el-col v-if="formValidate.type == 1" :span="24">
|
||||||
<el-form-item label="自定义留言:">
|
<el-form-item label="自定义留言:">
|
||||||
<el-radio-group v-model="customBtn" @change="customMessBtn">
|
<el-radio-group v-model="customBtn" @change="customMessBtn">
|
||||||
@ -1359,7 +1380,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">
|
||||||
<el-form-item label="关联系统表单:">
|
<el-form-item label="关联系统表单:">
|
||||||
<el-select
|
<el-select
|
||||||
size="small"
|
size="small"
|
||||||
@ -1378,7 +1399,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<div class="explanation">注:添加系统表单后,商品不可加入购物车,添加系统表单,请前往:装修>系统表单</div>
|
<div class="explanation">注:添加系统表单后,商品不可加入购物车,添加系统表单,请前往:装修>系统表单</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item v-if="formValidate.mer_form_id">
|
<el-form-item v-if="formValidate.mer_form_id">
|
||||||
<div style="width: 350px;">
|
<div style="width: 350px;">
|
||||||
@ -1415,7 +1436,7 @@
|
|||||||
>上一步
|
>上一步
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-show="currentTab < 5"
|
v-show="currentTab < 4"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="submission"
|
class="submission"
|
||||||
size="small"
|
size="small"
|
||||||
@ -1423,7 +1444,7 @@
|
|||||||
>下一步
|
>下一步
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-show="currentTab == '5' || $route.params.id"
|
v-show="currentTab == '4' || $route.params.id"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="submission"
|
class="submission"
|
||||||
@ -1808,8 +1829,8 @@ export default {
|
|||||||
{ title: '商品信息', name: '1' },
|
{ title: '商品信息', name: '1' },
|
||||||
{ title: '规格设置', name: '2' },
|
{ title: '规格设置', name: '2' },
|
||||||
{ title: '商品详情', name: '3' },
|
{ title: '商品详情', name: '3' },
|
||||||
{ title: '营销设置', name: '4' },
|
// { title: '营销设置', name: '4' },
|
||||||
{ title: '其他设置', name: '5' }
|
{ title: '其他设置', name: '4' }
|
||||||
],
|
],
|
||||||
type: 0,
|
type: 0,
|
||||||
modals: false,
|
modals: false,
|
||||||
@ -1893,7 +1914,7 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
currentTab(newVal) {
|
currentTab(newVal) {
|
||||||
if (newVal == 5) {
|
if (newVal == 4) {
|
||||||
this.$nextTick(e=>{
|
this.$nextTick(e=>{
|
||||||
this.setSort()
|
this.setSort()
|
||||||
})
|
})
|
||||||
@ -1907,6 +1928,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
if(this.$store.state.user.wholesale==0){
|
||||||
|
delete this.attrVal.wholesale_price
|
||||||
|
}
|
||||||
this.getCategorySelect()
|
this.getCategorySelect()
|
||||||
this.getCategoryList()
|
this.getCategoryList()
|
||||||
this.getBrandListApi()
|
this.getBrandListApi()
|
||||||
@ -1943,19 +1967,19 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
setSort() {
|
setSort() {
|
||||||
// ref一定跟table上面的ref一致
|
// ref一定跟table上面的ref一致
|
||||||
const el = this.$refs.tableParameter.$el.querySelectorAll(
|
// const el = this.$refs.tableParameter.$el.querySelectorAll(
|
||||||
'.el-table__body-wrapper > table > tbody'
|
// '.el-table__body-wrapper > table > tbody'
|
||||||
)[0]
|
// )[0]
|
||||||
this.sortable = Sortable.create(el, {
|
// this.sortable = Sortable.create(el, {
|
||||||
ghostClass: 'sortable-ghost',
|
// ghostClass: 'sortable-ghost',
|
||||||
setData: function(dataTransfer) {
|
// setData: function(dataTransfer) {
|
||||||
dataTransfer.setData('Text', '')
|
// dataTransfer.setData('Text', '')
|
||||||
},
|
// },
|
||||||
// 监听拖拽事件结束时触发
|
// // 监听拖拽事件结束时触发
|
||||||
onEnd: evt => {
|
// onEnd: evt => {
|
||||||
this.elChangeExForArray(evt.oldIndex, evt.newIndex, this.formValidate.params)
|
// this.elChangeExForArray(evt.oldIndex, evt.newIndex, this.formValidate.params)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
elChangeExForArray(index1, index2, array) {
|
elChangeExForArray(index1, index2, array) {
|
||||||
const temp = array[index1]
|
const temp = array[index1]
|
||||||
@ -2958,8 +2982,21 @@ export default {
|
|||||||
if (tit === "1" && num === "pi") {
|
if (tit === "1" && num === "pi") {
|
||||||
_this.oneFormBatch[0].image = img[0];
|
_this.oneFormBatch[0].image = img[0];
|
||||||
}
|
}
|
||||||
|
if (tit === "3") {
|
||||||
|
// console.log('选择的', _this.formValidate?.content, img)
|
||||||
|
let image = _this.formValidate.content.image ? _this.formValidate.content.image : [];
|
||||||
|
_this.formValidate.content = {
|
||||||
|
image: [...image, ...img],
|
||||||
|
title: _this.formValidate.content.title
|
||||||
|
}
|
||||||
|
console.log('选择好的', _this.formValidate.content)
|
||||||
|
}
|
||||||
}, tit);
|
}, tit);
|
||||||
},
|
},
|
||||||
|
// 删除详情图片
|
||||||
|
deleteContentImg(index) {
|
||||||
|
this.formValidate.content.image.splice(index, 1)
|
||||||
|
},
|
||||||
handleSubmitUp() {
|
handleSubmitUp() {
|
||||||
this.currentTab = (Number(this.currentTab) - 1).toString();
|
this.currentTab = (Number(this.currentTab) - 1).toString();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user