Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
commit
dc6d3b3743
|
@ -226,7 +226,7 @@ export default {
|
|||
title: "价格",
|
||||
key: "price",
|
||||
render: (h, params) => {
|
||||
return h("priceColorScheme", {props:{alue:params.row.price,color:this.$mainColor}} );
|
||||
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
|
||||
},
|
||||
},{
|
||||
title: "库存",
|
||||
|
|
|
@ -213,6 +213,11 @@
|
|||
overflow-x: hidden;
|
||||
}
|
||||
">
|
||||
<!--<template slot="alertQuantity" slot-scope="{ row }">-->
|
||||
<!--<Input v-model="row.alertQuantity" clearable placeholder="请输入库存预警" @on-change="updateSkuTable(row, 'alertQuantity')">-->
|
||||
<!--<span slot="append">{{baseInfoForm.goodsUnit || ""}}</span>-->
|
||||
<!--</Input>-->
|
||||
<!--</template>-->
|
||||
<template slot="sn" slot-scope="{ row }">
|
||||
<Input v-model="row.sn" clearable placeholder="请输入货号" @on-change="updateSkuTable(row, 'sn')" />
|
||||
</template>
|
||||
|
@ -639,7 +644,7 @@ export default {
|
|||
"price",
|
||||
"weight",
|
||||
"quantity",
|
||||
"alertQuantity",
|
||||
// "alertQuantity",
|
||||
"specId",
|
||||
"specValueId",
|
||||
],
|
||||
|
@ -683,12 +688,12 @@ export default {
|
|||
// 局部刷新
|
||||
refresh(v){
|
||||
if( v == 'template'){
|
||||
this.GET_ShipTemplate()
|
||||
this.GET_ShipTemplate('localRefresh');
|
||||
}else if( v == 'goodsUnit'){
|
||||
this.goodsUnitList = []
|
||||
this.GET_GoodsUnit()
|
||||
this.GET_GoodsUnit('localRefresh');
|
||||
}else{
|
||||
this.getGoodsBrandList()
|
||||
this.getGoodsBrandList('localRefresh');
|
||||
}
|
||||
},
|
||||
getImages(v) {
|
||||
|
@ -937,21 +942,33 @@ export default {
|
|||
},
|
||||
|
||||
/** 查询商品品牌列表 */
|
||||
getGoodsBrandList() {
|
||||
getGoodsBrandList(type) {
|
||||
API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then(
|
||||
(response) => {
|
||||
this.brandList = response;
|
||||
if(type === 'localRefresh') {
|
||||
this.$Message.success("刷新成功");
|
||||
}
|
||||
}
|
||||
);
|
||||
).catch(() => {
|
||||
if(type === 'localRefresh') {
|
||||
this.$Message.error("刷新失败,请重试");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 获取商品单位
|
||||
GET_GoodsUnit() {
|
||||
GET_GoodsUnit(type) {
|
||||
API_GOODS.getGoodsUnitList(this.params).then((res) => {
|
||||
if (res.success) {
|
||||
this.goodsUnitList.push(...res.result.records.map((i) => i.name));
|
||||
this.total = res.result.total;
|
||||
}
|
||||
if (type === 'localRefresh' && res.success) {
|
||||
this.$Message.success("刷新成功");
|
||||
} else if(type === 'localRefresh') {
|
||||
this.$Message.error("刷新失败,请重试");
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取当前店铺分类
|
||||
|
@ -1053,7 +1070,7 @@ export default {
|
|||
price: e.price,
|
||||
// cost: e.cost,
|
||||
quantity: e.quantity,
|
||||
alertQuantity: e.alertQuantity,
|
||||
// alertQuantity: e.alertQuantity,
|
||||
weight: e.weight,
|
||||
};
|
||||
e.specList.forEach((u) => {
|
||||
|
@ -1357,7 +1374,7 @@ export default {
|
|||
find.sn && (find.sn = "");
|
||||
// find.cost && (find.cost = "");
|
||||
find.quantity && (find.quantity = "");
|
||||
find.alertQuantity && (find.alertQuantity = "");
|
||||
// find.alertQuantity && (find.alertQuantity = "");
|
||||
find.weight && (find.weight = "");
|
||||
|
||||
this.skuTableData.splice(this.skuTableData.length, 0, find);
|
||||
|
@ -1372,7 +1389,7 @@ export default {
|
|||
find.sn && (find.sn = "");
|
||||
// find.cost && (find.cost = "");
|
||||
find.quantity && (find.quantity = "");
|
||||
find.alertQuantity && (find.alertQuantity = "");
|
||||
// find.alertQuantity && (find.alertQuantity = "");
|
||||
find.weight && (find.weight = "");
|
||||
|
||||
this.skuTableData.splice(index, 0, find);
|
||||
|
@ -1459,6 +1476,10 @@ export default {
|
|||
title: "库存",
|
||||
slot: "quantity",
|
||||
},
|
||||
// {
|
||||
// title: "库存预警",
|
||||
// slot: "alertQuantity",
|
||||
// },
|
||||
{
|
||||
title: "货号",
|
||||
slot: "sn",
|
||||
|
@ -1505,7 +1526,7 @@ export default {
|
|||
id: skus[index].id,
|
||||
sn: skus[index].sn,
|
||||
quantity: skus[index].quantity,
|
||||
alertQuantity: skus[index].alertQuantity,
|
||||
// alertQuantity: skus[index].alertQuantity,
|
||||
cost: 1,
|
||||
price: skus[index].price,
|
||||
[spec[0].name]: specItem.value,
|
||||
|
@ -1587,18 +1608,19 @@ export default {
|
|||
this.validatatxt = "请输入0~99999999之间的整数";
|
||||
return;
|
||||
}
|
||||
} else if (item === "alertQuantity") {
|
||||
if (
|
||||
!/^[0-9]\d*$/.test(row[item]) ||
|
||||
parseInt(row[item]) < 0 ||
|
||||
parseInt(row[item]) > 99999999
|
||||
) {
|
||||
// 库存预警
|
||||
this.validateError.push([index, item]);
|
||||
this.validatatxt = "请输入0~99999999之间的整数";
|
||||
return;
|
||||
}
|
||||
}
|
||||
// else if (item === "alertQuantity") {
|
||||
// if (
|
||||
// !/^[0-9]\d*$/.test(row[item]) ||
|
||||
// parseInt(row[item]) < 0 ||
|
||||
// parseInt(row[item]) > 99999999
|
||||
// ) {
|
||||
// // 库存预警
|
||||
// this.validateError.push([index, item]);
|
||||
// this.validatatxt = "请输入0~99999999之间的整数";
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else if (item === "cost" || item === "price") {
|
||||
// if (
|
||||
// !regular.money.test(row[item]) ||
|
||||
|
@ -1691,7 +1713,7 @@ export default {
|
|||
cost: 1,
|
||||
price: sku.price,
|
||||
quantity: sku.quantity,
|
||||
alertQuantity: sku.alertQuantity,
|
||||
// alertQuantity: sku.alertQuantity,
|
||||
sn: sku.sn,
|
||||
images: sku.images,
|
||||
};
|
||||
|
@ -1799,12 +1821,17 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
GET_ShipTemplate(){
|
||||
GET_ShipTemplate(type){
|
||||
// 获取物流模板
|
||||
API_Shop.getShipTemplate().then((res) => {
|
||||
if (res.success) {
|
||||
this.logisticsTemplate = res.result;
|
||||
}
|
||||
if (type === 'localRefresh' && res.success) {
|
||||
this.$Message.success("刷新成功");
|
||||
} else if(type === 'localRefresh') {
|
||||
this.$Message.error("刷新失败,请重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue