提交 5d09678f authored 作者: 潘鹏's avatar 潘鹏

activity

上级 3aa74571
...@@ -39,15 +39,31 @@ ...@@ -39,15 +39,31 @@
<Form-item label="属性描述" prop="attrDesc"> <Form-item label="属性描述" prop="attrDesc">
<i-input v-model="attributes.attrDesc" placeholder="属性描述"/> <i-input v-model="attributes.attrDesc" placeholder="属性描述"/>
</Form-item> </Form-item>
<Form-item label="状态 0:删除 1:正常" prop="status"> <Form-item label="是否开启" prop="status">
<i-input v-model="attributes.status" placeholder="状态 0:删除 1:正常"/> <!-- <i-input v-model="attributes.status" placeholder="状态 0:删除 1:正常"/>-->
<Radio-group v-model="attributes.status">
<Radio label="1">
<span>开启</span>
</Radio>
<Radio label="0">
<span>关闭</span>
</Radio>
</Radio-group>
</Form-item> </Form-item>
<Form-item label="创建时间" prop="createTime"> <Form-item label="是否必填" prop="updateTime">
<i-input v-model="attributes.createTime" placeholder="创建时间"/> <Radio-group v-model="attributes.isNeed">
<Radio label="1">
<span>开启</span>
</Radio>
<Radio label="0">
<span>关闭</span>
</Radio>
</Radio-group>
</Form-item> </Form-item>
<Form-item label="更新时间" prop="updateTime"> <Form-item label="排序" prop="sort">
<i-input v-model="attributes.updateTime" placeholder="更新时间"/> <i-input v-model="attributes.sort" placeholder="排序"/>
</Form-item> </Form-item>
<Form-item> <Form-item>
<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button> <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
<i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button> <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
......
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml"> <html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<head> <head>
<title>站点商品</title> <title>站点商品</title>
#parse("sys/header.html") #parse("sys/header.html")
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
display: flex; display: flex;
justify-content: start; justify-content: start;
margin-bottom: 10px; margin-bottom: 10px;
} }
.container .prev-li img { .container .prev-li img {
...@@ -876,7 +878,6 @@ ...@@ -876,7 +878,6 @@
</div> </div>
</Upload> </Upload>
</div> </div>
</div> </div>
</div> </div>
...@@ -1028,28 +1029,38 @@ ...@@ -1028,28 +1029,38 @@
<!-- <i-button style="margin-left:10px;" type="primary" @click='save'>保存</i-button>--> <!-- <i-button style="margin-left:10px;" type="primary" @click='save'>保存</i-button>-->
</section> </section>
</Card> </Card>
<Card class="container" style="margin-top:20px;"> <Card class="container" style="margin-top:20px;width: 1000px">
<section class="form-wrapper"> <section class="form-wrapper">
<h4>商品参数</h4> <h4>商品参数</h4>
<transition-group tag="ul" name="slide"> <transition-group tag="ul" name="slide">
<li class="prev-li" v-for="(item,index) in paramster" :key="index" style="margin-bottom: 0;"> <li class="prev-li" v-for="(item,index) in paramster" :key="index" style="margin-bottom: 0;width: 415px;float: left">
<div>
<i-input v-model="item.paramName" size="small" type="text" placeholder="参数名称"/>
</div>
<div> <div>
<i-input v-model="item.paramValue" size="small" type="text" placeholder="参数值"/> <!-- <i-input v-model="item.paramName" size="small" type="text" placeholder="参数名称"/>-->
<span :style="`width:100px;line-height: 40px;text-align: center;height: 40px;`">{{item.paramName}}</span>
</div> </div>
<i-button class="prev-del paramster-del" type="warning" @click="delParamster(index)">删除 <!-- <div>-->
</i-button> <!-- <i-input v-model="item.paramValue" size="small" type="text" placeholder="参数值"/>-->
<el-select v-model="value1" multiple placeholder="参数值" :style="`width: 300px;`">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- </div>-->
<!-- <i-button class="prev-del paramster-del" type="warning" @click="delParamster(index)">删除-->
<!-- </i-button>-->
</li> </li>
</transition-group> </transition-group>
<i-button <!-- <i-button-->
size="small" <!-- size="small"-->
style="margin-left:15px;margin-bottom:10px;margin-top:10px;" <!-- style="margin-left:15px;margin-bottom:10px;margin-top:10px;"-->
type="success" <!-- type="success"-->
@click="addProductParams()" <!-- @click="addProductParams()"-->
>新增参数 <!-- >新增参数-->
</i-button> <!-- </i-button>-->
</section> </section>
</Card> </Card>
<!-- 删除警告 --> <!-- 删除警告 -->
...@@ -1094,6 +1105,7 @@ ...@@ -1094,6 +1105,7 @@
<p>还未保存,是否退出?</p> <p>还未保存,是否退出?</p>
</Modal> </Modal>
</Card> </Card>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="${rc.contextPath}/js/plugins/Sortable.min.js"></script> <script src="${rc.contextPath}/js/plugins/Sortable.min.js"></script>
<script src="${rc.contextPath}/statics/libs/iview.js"></script> <script src="${rc.contextPath}/statics/libs/iview.js"></script>
<script src="${rc.contextPath}/js/sys/tbcfstationitem.js?_${date.systemTime}"></script> <script src="${rc.contextPath}/js/sys/tbcfstationitem.js?_${date.systemTime}"></script>
......
...@@ -5,9 +5,12 @@ $(function () { ...@@ -5,9 +5,12 @@ $(function () {
{label: 'id', name: 'id', index: 'id', key: true, hidden: true}, {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
{label: '属性名', name: 'attrName', index: 'attr_name', width: 80}, {label: '属性名', name: 'attrName', index: 'attr_name', width: 80},
{label: '属性描述', name: 'attrDesc', index: 'attr_desc', width: 80}, {label: '属性描述', name: 'attrDesc', index: 'attr_desc', width: 80},
{label: '状态 0:删除 1:正常', name: 'status', index: 'status', width: 80}, {label: '是否开启', name: 'status', index: 'status', width: 80},
{label: '创建时间', name: 'createTime', index: 'create_time', width: 80}, {label: '是否必填', name: 'isNeed', index: 'isNeed', width: 80},
{label: '更新时间', name: 'updateTime', index: 'update_time', width: 80}] {label: '排序', name: 'sort', index: 'sort', width: 80},
// {label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
// {label: '更新时间', name: 'updateTime', index: 'update_time', width: 80}
]
}); });
}); });
...@@ -47,6 +50,9 @@ let vm = new Vue({ ...@@ -47,6 +50,9 @@ let vm = new Vue({
}, },
saveOrUpdate: function (event) { saveOrUpdate: function (event) {
let url = vm.attributes.id == null ? "../attributes/save" : "../attributes/update"; let url = vm.attributes.id == null ? "../attributes/save" : "../attributes/update";
console.log(vm.attributes)
vm.attributes.sort = parseInt(vm.attributes.sort)
vm.attributes.isNeed = true
Ajax.request({ Ajax.request({
url: url, url: url,
params: JSON.stringify(vm.attributes), params: JSON.stringify(vm.attributes),
......
...@@ -141,6 +141,25 @@ let vm = new Vue({ ...@@ -141,6 +141,25 @@ let vm = new Vue({
// 细粒度价格控制, // 细粒度价格控制,
handleProductAttr_Batch: [], handleProductAttr_Batch: [],
//商品参数
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value1: [],
}, },
methods: { methods: {
delSku(id, i) { delSku(id, i) {
...@@ -1193,7 +1212,11 @@ let vm = new Vue({ ...@@ -1193,7 +1212,11 @@ let vm = new Vue({
}, 0) }, 0)
} }
this.reload(); this.reload();
} },
//商品参数
}, },
created() { created() {
this.getTagsData(); this.getTagsData();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论