|
|
|
@ -1,6 +1,6 @@
|
|
|
|
<template lang="pug">
|
|
|
|
<template lang="pug">
|
|
|
|
.add-product-wrapper
|
|
|
|
.add-product-wrapper
|
|
|
|
el-form(
|
|
|
|
el-form.content(
|
|
|
|
label-width="108px"
|
|
|
|
label-width="108px"
|
|
|
|
:model="form"
|
|
|
|
:model="form"
|
|
|
|
ref="form"
|
|
|
|
ref="form"
|
|
|
|
@ -15,11 +15,11 @@
|
|
|
|
el-form-item(label="商品名称" prop="name")
|
|
|
|
el-form-item(label="商品名称" prop="name")
|
|
|
|
el-input(v-model="form.name" placeholder="请输入商品名称")
|
|
|
|
el-input(v-model="form.name" placeholder="请输入商品名称")
|
|
|
|
el-form-item(label="主图" prop="pic")
|
|
|
|
el-form-item(label="主图" prop="pic")
|
|
|
|
el-input(v-model="form.pic" placeholder="请输入主图")
|
|
|
|
image-upload(v-model="form.pic" :limit="1")
|
|
|
|
el-form-item(label="商品图片" prop="albumPics")
|
|
|
|
el-form-item(label="商品图片" prop="albumPics")
|
|
|
|
el-input(v-model="form.albumPics" placeholder="商品图片,连产品图片限制为5张,以逗号分割")
|
|
|
|
image-upload(v-model="form.albumPics" :limit="5")
|
|
|
|
el-form-item(label="上架状态")
|
|
|
|
el-form-item(label="上架状态")
|
|
|
|
dict-select(v-model="form.publishStatus")
|
|
|
|
dict-select(v-model="form.publishStatus" prop-name="pms_publish_status" )
|
|
|
|
el-form-item(label="排序" prop="sort")
|
|
|
|
el-form-item(label="排序" prop="sort")
|
|
|
|
el-input(v-model="form.sort" placeholder="请输入排序")
|
|
|
|
el-input(v-model="form.sort" placeholder="请输入排序")
|
|
|
|
el-form-item(label="价格" prop="price")
|
|
|
|
el-form-item(label="价格" prop="price")
|
|
|
|
@ -28,6 +28,8 @@
|
|
|
|
el-input(v-model="form.unit" placeholder="请输入单位")
|
|
|
|
el-input(v-model="form.unit" placeholder="请输入单位")
|
|
|
|
el-form-item(label="商品重量" prop="weight")
|
|
|
|
el-form-item(label="商品重量" prop="weight")
|
|
|
|
el-input(v-model="form.weight" placeholder="商品重量,默认为克")
|
|
|
|
el-input(v-model="form.weight" placeholder="商品重量,默认为克")
|
|
|
|
|
|
|
|
el-form-item(label="规格")
|
|
|
|
|
|
|
|
|
|
|
|
el-form-item(label="产品详情网页内容" prop="detailHtml")
|
|
|
|
el-form-item(label="产品详情网页内容" prop="detailHtml")
|
|
|
|
el-input(
|
|
|
|
el-input(
|
|
|
|
v-model="form.detailHtml"
|
|
|
|
v-model="form.detailHtml"
|
|
|
|
@ -40,7 +42,7 @@
|
|
|
|
placeholder="请输入内容"
|
|
|
|
placeholder="请输入内容"
|
|
|
|
type="textarea"
|
|
|
|
type="textarea"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
div
|
|
|
|
.tc
|
|
|
|
el-button(type="primary" @click="submitForm") 确 定
|
|
|
|
el-button(type="primary" @click="submitForm") 确 定
|
|
|
|
el-button(@click="cancel") 取 消
|
|
|
|
el-button(@click="cancel") 取 消
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -68,6 +70,10 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
getInfo(id) {
|
|
|
|
getInfo(id) {
|
|
|
|
getPmsProduct(id).then(response => {
|
|
|
|
getPmsProduct(id).then(response => {
|
|
|
|
|
|
|
|
const {albumPics } = response
|
|
|
|
|
|
|
|
if (albumPics) {
|
|
|
|
|
|
|
|
response.albumPics = albumPics.split(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
this.form = response;
|
|
|
|
this.form = response;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -101,4 +107,8 @@ export default {
|
|
|
|
<style lang="stylus">
|
|
|
|
<style lang="stylus">
|
|
|
|
.add-product-wrapper
|
|
|
|
.add-product-wrapper
|
|
|
|
padding 12px
|
|
|
|
padding 12px
|
|
|
|
|
|
|
|
.content
|
|
|
|
|
|
|
|
margin 0 auto
|
|
|
|
|
|
|
|
width 75%
|
|
|
|
|
|
|
|
min-width 800px
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|