提交 5521e188 authored 作者: zgy's avatar zgy

完成商品参数

上级 e50520a3
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
<if test="itemCode != null">`item_code` = #{itemCode},</if> <if test="itemCode != null">`item_code` = #{itemCode},</if>
<if test="itemName != null">`item_name` = #{itemName},</if> <if test="itemName != null">`item_name` = #{itemName},</if>
<if test="itemBrief != null">`item_brief` = #{itemBrief},</if> <if test="itemBrief != null">`item_brief` = #{itemBrief},</if>
<if test="itemCategory != null">`item_category` = #{itemCategory},</if> `item_category` = #{itemCategory},
`item_price` = #{itemPrice}, `item_price` = #{itemPrice},
<if test="discountPrice != null">`discount_price` = #{discountPrice},</if> <if test="discountPrice != null">`discount_price` = #{discountPrice},</if>
<if test="costPrice != null">`cost_price` = #{costPrice},</if> <if test="costPrice != null">`cost_price` = #{costPrice},</if>
...@@ -308,8 +308,8 @@ ...@@ -308,8 +308,8 @@
<if test="platformName != null">`platform_name` = #{platformName},</if> <if test="platformName != null">`platform_name` = #{platformName},</if>
<if test="enableFlag != null">`enable_flag` = #{enableFlag},</if> <if test="enableFlag != null">`enable_flag` = #{enableFlag},</if>
<if test="createTime != null">`create_time` = #{createTime},</if> <if test="createTime != null">`create_time` = #{createTime},</if>
<if test="itemCategorytwo != null">`item_categorytwo` = #{itemCategorytwo},</if> `item_categorytwo` = #{itemCategorytwo},
<if test="itemDescritionId != null">`item_descrition_id` = #{itemDescritionId}</if> `item_descrition_id` = #{itemDescritionId}
</set> </set>
where item_id = #{itemId} where item_id = #{itemId}
</update> </update>
......
...@@ -275,13 +275,21 @@ let vm = new Vue({ ...@@ -275,13 +275,21 @@ let vm = new Vue({
}, },
add: function () { add: function () {
this.AttributeImgArr.length = 0; this.AttributeImgArr.length = 0;
this.paramster.length=0; this.paramster.length = 0;
this.paramster.push({ this.paramster.push(
{
paramName: '', paramName: 'Style',
paramValue: '' paramValue: ''
},
}); {
paramName: 'Material',
paramValue: ''
},
{
paramName: 'Fit Type',
paramValue: ''
}
);
vm.showList = false; vm.showList = false;
vm.title = "新增"; vm.title = "新增";
vm.tbCfStationItem = {}; vm.tbCfStationItem = {};
...@@ -303,9 +311,15 @@ let vm = new Vue({ ...@@ -303,9 +311,15 @@ let vm = new Vue({
vm.getInfo(itemId); vm.getInfo(itemId);
}, },
saveOrUpdate: function (event) { saveOrUpdate: function (event) {
if (vm.prevItem.length === 0) { let flag = true
this.paramster.forEach(item => {
if (item.paramValue == '' || item.paramValue == null) {
flag = false
}
})
if (vm.prevItem.length === 0 || !flag) {
console.log(123); console.log(123);
alert('请编辑完属性后再保存'); alert('请编辑完属性或参数后再保存');
} else { } else {
let resArr = []; let resArr = [];
this.prevItem.forEach(item => { this.prevItem.forEach(item => {
...@@ -314,6 +328,7 @@ let vm = new Vue({ ...@@ -314,6 +328,7 @@ let vm = new Vue({
let paramArr = []; let paramArr = [];
this.paramster.forEach(item => { this.paramster.forEach(item => {
paramArr.push(item) paramArr.push(item)
}) })
vm.tbCfStationItem.paramster = this.paramster; vm.tbCfStationItem.paramster = this.paramster;
let label = null; let label = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论