Commit f752f6dd authored by v-yuchenglong's avatar v-yuchenglong

Merge branch 'feature/activity' into release-activity

parents 556d8dfe f778e44b
......@@ -241,23 +241,23 @@ import {
getBusinessList,
pindanGoods,
markGoodsInfo,
editGoods
editGoods,
} from "../../../../service/Activity/index";
export default {
props: {
editInfo: {
type: Object,
required: () => {}
required: () => {},
},
addProduc: {
type: Array,
required: () => {}
required: () => {},
},
stepTwoTitle: {
type: String,
default: ""
}
default: "",
},
},
data() {
return {
......@@ -278,7 +278,7 @@ export default {
original_price: "",
inventory_total: null,
total_amount_order: null,
business1: ""
business1: "",
},
picStr: "",
picUrlList: [],
......@@ -296,7 +296,7 @@ export default {
goodsSkuID: "",
inventoryTotal: 0, // 总库存
inventoryRest: 0 // 剩余库存
inventoryRest: 0, // 剩余库存
};
},
// computed: {
......@@ -384,7 +384,7 @@ export default {
const res = await getBusinessList(params);
this.businessOpt = [
{ ota_id: "", ota_name: "全部" },
...res.result.list
...res.result.list,
];
} catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~");
......@@ -403,7 +403,7 @@ export default {
this.commodityForm.business1 = res.result.goods_info.ota_id;
for (var i in res.result.goods_info.desc_pic_url_list) {
this.picUrlList.push({
url: res.result.goods_info.desc_pic_url_list[i]
url: res.result.goods_info.desc_pic_url_list[i],
});
}
this.picStr = this.getUrlParms(
......@@ -431,12 +431,12 @@ export default {
marketing_type: "4",
ota_id: this.commodityForm.business1,
op_cur_user: store.state.userInfo.email,
goods_sku_id: goodsSkuID
goods_sku_id: goodsSkuID,
});
if (res.code == 0) {
ElMessage.success({
message: "修改成功",
type: "success"
type: "success",
});
await this.pindanGoodsMet();
let result = null;
......@@ -469,9 +469,10 @@ export default {
this.addCommodityPopup = true;
this.commodityForm = {};
if (type == "add") {
this.hideUpload = false;
this.picUrlList = [];
this.inventoryRest = 0;
this.commodityForm.total_amount_order = 0;
this.picUrlList = [];
this.addCommodityTitle = "商品添加";
this.$refs.infoForm.resetFields();
} else {
......@@ -493,12 +494,12 @@ export default {
marketing_type: "4",
price: this.commodityForm.price,
ota_id: this.commodityForm.business1,
op_cur_user: store.state.userInfo.email
op_cur_user: store.state.userInfo.email,
});
if (res.code == 0) {
ElMessage.success({
message: "添加商品成功",
type: "success"
type: "success",
});
this.comTableData.push(res.result.goods_info);
this.addCommodityPopup = false;
......@@ -515,7 +516,7 @@ export default {
// 添加商品保存
commoditySave(infoForm) {
this.$refs[infoForm].validate(valid => {
this.$refs[infoForm].validate((valid) => {
if (valid) {
if (this.addCommodityTitle == "商品添加") {
this.addGoodsMet();
......@@ -554,9 +555,9 @@ export default {
if (this.comTableData.length == 0) {
this.comTableData.push(...this.multipleSelection);
} else {
this.multipleSelection.forEach(item => {
this.multipleSelection.forEach((item) => {
let num = 0;
this.comTableData.some(val => {
this.comTableData.some((val) => {
num++;
if (val.goods_sku_id === item.goods_sku_id) {
val.goods_sku_id = item.goods_sku_id;
......@@ -579,21 +580,21 @@ export default {
this.comTableData.splice(i, 1);
}
}
}
},
},
watch: {
addProduc: function(newVal) {
addProduc: function (newVal) {
let marketingId = this.$route.query.marketing_id;
if (marketingId == undefined) {
return;
}
this.comTableData = newVal;
}
},
},
created() {
this.getBusinessListMet();
}
},
};
</script>
<style scoped>
......
......@@ -321,12 +321,12 @@
</el-row>
<el-row>
<el-col :span="6">实付:{{ item.payment }}</el-col>
<el-checkbox
<!-- <el-checkbox
class="check-wrap"
v-model="item.restoreInventory"
label="恢复库存"
name="type"
></el-checkbox>
></el-checkbox> -->
</el-row>
</div>
<template #footer>
......@@ -438,7 +438,7 @@ export default {
{
refundedGoodsSel: false,
payment: "",
restoreInventory: false,
// restoreInventory: false,
goods_name: ""
}
]
......@@ -710,16 +710,16 @@ export default {
return this.refundGoods.filter(isSelected);
};
for (var i in this.refundGoods) {
if (
this.refundGoods[i].refundedGoodsSel == true &&
this.refundGoods[i].restoreInventory == true
) {
this.refundGoods[i].refund_type = "1";
} else {
this.refundGoods[i].refund_type = "2";
}
}
// for (var i in this.refundGoods) {
// if (
// this.refundGoods[i].refundedGoodsSel == true &&
// this.refundGoods[i].restoreInventory == true
// ) {
// this.refundGoods[i].refund_type = "1";
// } else {
// this.refundGoods[i].refund_type = "2";
// }
// }
const convertToNumber = str => {
return !Number.isNaN(parseFloat(str)) ? parseFloat(str) : 0;
......@@ -730,7 +730,7 @@ export default {
order_item_id: item.order_item_id,
refund_num: item.refundableQuantity || 0,
refund_amount: convertToNumber(item.amountToRefund),
refund_type: item.refund_type
// refund_type: item.refund_type
};
};
......
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