商品添加/编辑隐藏不需要的设置
This commit is contained in:
parent
f1139b29b5
commit
0dfb8a3944
@ -268,7 +268,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<!-- 规格设置 -->
|
<!-- 规格设置 -->
|
||||||
<el-row v-if="currentTab == '2'">
|
<el-row v-if="currentTab == '2'">
|
||||||
<el-col :span="24">
|
<el-col v-if="false" :span="24">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="extensionStatus > 0"
|
v-if="extensionStatus > 0"
|
||||||
label="佣金设置:"
|
label="佣金设置:"
|
||||||
@ -283,7 +283,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col v-if="false" :span="24">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="open_svip"
|
v-if="open_svip"
|
||||||
label="付费会员价设置:"
|
label="付费会员价设置:"
|
||||||
@ -299,7 +299,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col v-if="false" :span="24">
|
||||||
<el-form-item label="商品规格:" props="spec_type">
|
<el-form-item label="商品规格:" props="spec_type">
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="formValidate.spec_type"
|
v-model="formValidate.spec_type"
|
||||||
@ -457,7 +457,7 @@
|
|||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="formThead[iii].title === '商品编号'"
|
v-if="formThead[iii].title === '商品条码'"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="text"
|
type="text"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@ -465,7 +465,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-if="
|
v-if="
|
||||||
formThead[iii].title !== '付费会员价' &&
|
formThead[iii].title !== '付费会员价' &&
|
||||||
formThead[iii].title !== '商品编号'
|
formThead[iii].title !== '商品条码'
|
||||||
"
|
"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="number"
|
type="number"
|
||||||
@ -477,7 +477,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="formThead[iii].title === '商品编号'"
|
v-if="formThead[iii].title === '商品条码'"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="text"
|
type="text"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@ -575,7 +575,7 @@
|
|||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="formThead[iii].title === '商品编号'"
|
v-if="formThead[iii].title === '商品条码'"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="text"
|
type="text"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@ -583,7 +583,7 @@
|
|||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="
|
v-if="
|
||||||
formThead[iii].title !== '付费会员价' &&
|
formThead[iii].title !== '付费会员价' &&
|
||||||
formThead[iii].title !== '商品编号'
|
formThead[iii].title !== '商品条码'
|
||||||
"
|
"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
:min="0"
|
:min="0"
|
||||||
@ -593,7 +593,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="formThead[iii].title === '商品编号'"
|
v-if="formThead[iii].title === '商品条码'"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="text"
|
type="text"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@ -701,7 +701,7 @@
|
|||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="formThead[iii].title === '商品编号'"
|
v-if="formThead[iii].title === '商品条码'"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="text"
|
type="text"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@ -709,7 +709,7 @@
|
|||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="
|
v-if="
|
||||||
formThead[iii].title !== '付费会员价' &&
|
formThead[iii].title !== '付费会员价' &&
|
||||||
formThead[iii].title !== '商品编号'
|
formThead[iii].title !== '商品条码'
|
||||||
"
|
"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
:min="0"
|
:min="0"
|
||||||
@ -719,7 +719,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="formThead[iii].title === '商品编号'"
|
v-if="formThead[iii].title === '商品条码'"
|
||||||
v-model="scope.row[iii]"
|
v-model="scope.row[iii]"
|
||||||
type="text"
|
type="text"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@ -823,7 +823,7 @@
|
|||||||
</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
|
||||||
@ -885,9 +885,9 @@
|
|||||||
</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 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">
|
||||||
@ -903,7 +903,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col
|
<!-- <el-col
|
||||||
v-if="
|
v-if="
|
||||||
(formValidate.delivery_way.length == 2 ||
|
(formValidate.delivery_way.length == 2 ||
|
||||||
(formValidate.delivery_way.length == 1 &&
|
(formValidate.delivery_way.length == 1 &&
|
||||||
@ -1063,7 +1063,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column align="center" label="排序" min-width="120">
|
<el-table-column align="center" label="排序" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="scope.row.sort"
|
v-model="scope.row.sort"
|
||||||
@ -1072,7 +1072,7 @@
|
|||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" min-width="60">
|
<el-table-column align="center" label="操作" min-width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -1164,7 +1164,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item style="margin-top: 30px">
|
<el-form-item style="margin-top: 30px">
|
||||||
@ -1177,7 +1177,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"
|
||||||
@ -1185,7 +1185,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"
|
||||||
@ -1326,7 +1326,7 @@ const objTitle = {
|
|||||||
title: '库存'
|
title: '库存'
|
||||||
},
|
},
|
||||||
bar_code: {
|
bar_code: {
|
||||||
title: '商品编号'
|
title: '商品条码'
|
||||||
},
|
},
|
||||||
weight: {
|
weight: {
|
||||||
title: '重量(KG)'
|
title: '重量(KG)'
|
||||||
@ -1454,7 +1454,7 @@ export default {
|
|||||||
],
|
],
|
||||||
unit_name: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
unit_name: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||||
store_info: [
|
store_info: [
|
||||||
{ required: true, message: '请输入商品简介', trigger: 'blur' }
|
{ required: false, message: '请输入商品简介', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
temp_id: [
|
temp_id: [
|
||||||
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
||||||
@ -1532,8 +1532,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,
|
||||||
@ -1574,7 +1574,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()
|
||||||
})
|
})
|
||||||
@ -1621,20 +1621,20 @@ 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]
|
||||||
@ -2347,6 +2347,13 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
validateAttr () {
|
||||||
|
Object.keys(this.formValidate.attrValue[0]).forEach((item) => {
|
||||||
|
if (this.formValidate.attrValue[0][item] == undefined && item != 'bar_code') {
|
||||||
|
this.formValidate.attrValue[0][item] = 0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 提交
|
// 提交
|
||||||
handleSubmit (name) {
|
handleSubmit (name) {
|
||||||
this.$store.dispatch("settings/setEdit", false);
|
this.$store.dispatch("settings/setEdit", false);
|
||||||
@ -2359,6 +2366,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$refs[name].validate(valid => {
|
this.$refs[name].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.validateAttr();
|
||||||
this.fullscreenLoading = true;
|
this.fullscreenLoading = true;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let disCreate = this.$route.params.id && !this.$route.query.type;
|
let disCreate = this.$route.params.id && !this.$route.query.type;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user