Commit 38544e19 by lixiaomin

修改商品

parent 0779afc2
<template>
<el-select
v-model="value"
v-model="selectValue"
style="width: 100%"
@change="change"
placeholder="请选择"
placeholder="请选择分类"
clearable
>
<el-option
......@@ -28,7 +28,8 @@ export default {
},
data() {
return {
options: [],
selectValue: this.value,
options: []
};
},
created() {
......
......@@ -22,19 +22,19 @@
</el-col>
<el-col :span="12">
<el-form-item label="制作时长" prop="takeTime">
<el-input v-model="form.takeTime" placeholder="请输入制作时长" />
<el-input v-model="form.takeTime" placeholder="请输入时长,单位秒" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="折扣价" prop="discount">
<el-input v-model="form.discount" placeholder="请输入折扣价" />
<el-input v-model="form.discount" placeholder="请输入折扣价,单位元" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原价" prop="price">
<el-input v-model="form.price" placeholder="请输入原价" />
<el-input v-model="form.price" placeholder="请输入原价,单位元" />
</el-form-item>
</el-col>
</el-row>
......@@ -136,6 +136,30 @@ export default {
},
components: { SelectCategory, SelectSpecs },
data() {
var validateThumbnail = (rule, value, callback) => {
let thumbnailValue=this.form.pics.thumbnail;
if (thumbnailValue == undefined || thumbnailValue === '') {
callback(new Error('请上传缩略图点单屏'));
}else {
callback();
}
};
var validateIntroImages = (rule, value, callback) => {
let introImagesValue=this.form.pics.introImages;
if (introImagesValue == undefined || introImagesValue === '') {
callback(new Error('请上传介绍图点单屏'));
}else {
callback();
}
};
var validateDetailImages = (rule, value, callback) => {
let detailImagesValue=this.form.pics.detailImages;
if (detailImagesValue == undefined || detailImagesValue === '') {
callback(new Error('请上传内容图点单屏'));
}else {
callback();
}
};
return {
title: "",
specNames: "",
......@@ -147,14 +171,16 @@ export default {
open: false,
// 表单校验
rules: {
spuName: [{ required: true, message: "不能为空", trigger: "blur" }],
status: [
{
required: true,
message: "不能为空",
trigger: "blur",
},
],
name: [{ required: true, message: "不能为空", trigger: "blur" }],
category: [{required: true, message: "不能为空", trigger: "blur" }],
spec: [{required: true, message: "不能为空", trigger: "blur" }],
takeTime: [{required: true, message: "不能为空", trigger: "blur" }],
discount: [{required: true, message: "不能为空", trigger: "blur" }],
price: [{required: true, message: "不能为空", trigger: "blur" }],
thumbnail:[{ required: true, validator: validateThumbnail, trigger: 'blur' }],
introImages:[{required: true, validator: validateIntroImages,trigger: "blur" }],
detailImages:[{required: true, validator: validateDetailImages, trigger: "blur" }],
},
goodsTagList: [],
inputVisible: false,
......
......@@ -60,6 +60,9 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:category:edit']">修改</el-button> -->
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-if="authBtn(['1', '2', '3', '4'], scope.row.state)">删除</el-button>
<el-button size="mini" type="text" v-if="authBtn(['2', '4'], scope.row.state)"
......@@ -109,15 +112,8 @@ export default {
pageNum: 1,
pageSize: 10,
spuName: null,
productionTime: null,
discountPrice: null,
originalPrice: null,
label: null,
desc: null,
createUserId: null,
updateUserId: null,
shelfTime: null,
status: null,
state: null,
category: null
},
options: [{
value: '1',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment