提交 56c9274d authored 作者: 潘鹏's avatar 潘鹏

add edit product paramster func

上级 8888d38c
...@@ -110,6 +110,9 @@ ...@@ -110,6 +110,9 @@
transform: translateY(20px); transform: translateY(20px);
line-height: 50%; line-height: 50%;
} }
.container .paramster-del{
transform: translateY(0px);
}
.ui-jqgrid .ui-jqgrid-bdiv { .ui-jqgrid .ui-jqgrid-bdiv {
height: auto !important; height: auto !important;
...@@ -862,7 +865,29 @@ ...@@ -862,7 +865,29 @@
<!-- <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;">
<section class="form-wrapper">
<h4>商品参数</h4>
<transition-group tag="ul" name="slide">
<li class="prev-li" v-for="(item,index) in paramster" :key="index" style="margin-bottom: 0;">
<div>
<i-input v-model="item.paramName" size="small" type="text" placeholder="参数名称"/>
</div>
<div>
<i-input v-model="item.paramValue" size="small" type="text" placeholder="参数值"/>
</div>
<i-button class="prev-del paramster-del" type="warning" @click="delParamster(index)" >删除</i-button>
</li>
</transition-group>
<i-button
size="small"
style="margin-left:15px;margin-bottom:10px;margin-top:10px;"
type="success"
@click="addProductParams()"
>新增参数
</i-button>
</section>
</Card>
<!-- 删除警告 --> <!-- 删除警告 -->
<Modal <Modal
v-model="alertShow" v-model="alertShow"
......
...@@ -91,7 +91,15 @@ let vm = new Vue({ ...@@ -91,7 +91,15 @@ let vm = new Vue({
], ],
allAttributes:[],//所有具体属性 allAttributes:[],//所有具体属性
batchAmount:0, batchAmount:0,
batchCount:0 batchCount:0,
//2020年5月20日 商品参数
paramster:[
{
paramName:'shell fabric', //面料
paramValue:'dacron' //涤纶
}
]
}, },
methods: { methods: {
//预览 //预览
...@@ -791,6 +799,26 @@ let vm = new Vue({ ...@@ -791,6 +799,26 @@ let vm = new Vue({
deleteTag(e, i) { deleteTag(e, i) {
this.$delete(this.isSelectedArr, i) this.$delete(this.isSelectedArr, i)
},
/*
* 2020年5月20日
* 新增产品参数
*/
addProductParams(){
this.paramster.push({
paramName:null,
paramValue:null
})
},
delParamster(i){
let arr = new Array();
this.paramster.map((item, index) => {
if (i !== index) {
arr.push(item)
}
})
this.paramster = arr;
} }
}, },
created() { created() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论