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

完成商品参数

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