Commit 9d67789e by 萱草

update: 礼品更改

parent b30b60c6
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -667,12 +667,12 @@ export default {
// },
// 上传前
beforeUpload(file) {
if (file.size > 2 * 1024 * 1024) {
this.$message.error('请上传小于2MB的图片');
if (file.size > 1 * 1024 * 1024) {
this.$message.error('请上传小于1MB的图片');
return false;
}
if (file.width < 700 || file.width / file.width != 1 / 1) {
this.$message.error('请上传宽度≥700px,宽高比1:1的图片');
if (file.width < 800 || file.width / file.width != 1 / 1) {
this.$message.error('请上传宽度≥800px,宽高比1:1的图片');
return false;
}
return true;
......@@ -988,13 +988,17 @@ export default {
};
if(this.isEdit){
if(Number(this.stockObj[item]) > Number(this.skuSellObj[item].stock)){
this.skuSellObj[item].stockType = 1;
this.skuSellObj[item].stockType = 0;
this.skuSellObj[item].stockAlter = Number(this.stockObj[item]) - Number(this.skuSellObj[item].stock);
}else{
this.skuSellObj[item].stockType = 0;
this.skuSellObj[item].stockType = 1;
this.skuSellObj[item].stockAlter = Number(this.skuSellObj[item].stock) - Number(this.stockObj[item]);
}
console.log(this.skuSellObj);
if(!this.stockObj[item]){
this.skuSellObj[item].stockType = 1;
this.skuSellObj[item].stockAlter = this.skuSellObj[item].stock;
}
}
}
this.handleData.giftSkuCostPrice = '';
......@@ -1194,6 +1198,10 @@ export default {
this.skuSellObj[key].stockType = 1;
this.skuSellObj[key].stockAlter = Number(this.skuSellObj[key].stock) - Number(this.stockObj[key]);
}
if(!this.stockObj[key]){
this.skuSellObj[key].stockType = 1;
this.skuSellObj[key].stockAlter = this.skuSellObj[key].stock;
}
console.log(this.skuSellObj);
}
let arr1 = Object.keys(this.skuSellObj);
......@@ -1206,6 +1214,7 @@ export default {
}else if(arr1.length === 1){
this.goodsForm.stock = this.skuSellObj[key].stock;
}
this.handleValidIntegral(value, key, num);
},
// 保存
submitForm(goodsForm) {
......@@ -1311,7 +1320,8 @@ export default {
// shopId: '', // 门店id
giftName: this.goodsForm.giftName, // 礼品名称
marketPrice: this.goodsForm.marketPrice, // 市场价
costPrice: this.goodsForm.costPrice, // 成本价
// costPrice: this.goodsForm.costPrice, // 成本价
costPrice: 0, // 成本价
stock: this.goodsForm.stock, // 库存
giftNo: this.goodsForm.giftNo, // 礼品编码
giftBarNo: this.goodsForm.giftBarNo, // 礼品条形码
......@@ -1447,7 +1457,7 @@ export default {
//规格信息
.add-sku-list {
// width: 900px;
margin: 10px 13px 20px 13px;
margin: 10px 13px 10px 13px;
// margin-top: 10px;
// margin-bottom: 20px;
.add-sku-item {
......@@ -1476,7 +1486,7 @@ export default {
}
}
.value-content {
padding: 15px 8px 5px 8px;
padding: 15px 8px 15px 8px;
display: flex;
.sku-value-title {
color: #303133;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment