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