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