优化部分代码,修改发布商品部分bug
parent
f3914b63b3
commit
dc55e0983a
|
@ -22,6 +22,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="结算价格" prop="settlementPrice">
|
<FormItem label="结算价格" prop="settlementPrice">
|
||||||
<Input
|
<Input
|
||||||
|
:disabled="onlyView"
|
||||||
type="number"
|
type="number"
|
||||||
v-model="form.settlementPrice"
|
v-model="form.settlementPrice"
|
||||||
placeholder="请填写结算价格"
|
placeholder="请填写结算价格"
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="最低购买金额" prop="purchasePrice">
|
<FormItem label="最低购买金额" prop="purchasePrice">
|
||||||
<Input
|
<Input
|
||||||
|
:disabled="onlyView"
|
||||||
type="number"
|
type="number"
|
||||||
v-model="form.purchasePrice"
|
v-model="form.purchasePrice"
|
||||||
placeholder="请填写最低购买金额"
|
placeholder="请填写最低购买金额"
|
||||||
|
@ -40,6 +42,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="最低可砍" prop="lowestPrice">
|
<FormItem label="最低可砍" prop="lowestPrice">
|
||||||
<Input
|
<Input
|
||||||
|
:disabled="onlyView"
|
||||||
type="number"
|
type="number"
|
||||||
v-model="form.lowestPrice"
|
v-model="form.lowestPrice"
|
||||||
placeholder="请填写最低可砍金额"
|
placeholder="请填写最低可砍金额"
|
||||||
|
@ -49,6 +52,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="最高可砍" prop="highestPrice">
|
<FormItem label="最高可砍" prop="highestPrice">
|
||||||
<Input
|
<Input
|
||||||
|
:disabled="onlyView"
|
||||||
type="number"
|
type="number"
|
||||||
v-model="form.highestPrice"
|
v-model="form.highestPrice"
|
||||||
placeholder="请填写最高可砍金额"
|
placeholder="请填写最高可砍金额"
|
||||||
|
@ -59,6 +63,7 @@
|
||||||
|
|
||||||
<FormItem label="活动库存" prop="stock">
|
<FormItem label="活动库存" prop="stock">
|
||||||
<Input
|
<Input
|
||||||
|
:disabled="onlyView"
|
||||||
type="number"
|
type="number"
|
||||||
v-model="form.stock"
|
v-model="form.stock"
|
||||||
placeholder="请填写活动库存"
|
placeholder="请填写活动库存"
|
||||||
|
@ -69,18 +74,19 @@
|
||||||
|
|
||||||
<FormItem label="活动时间" prop="rangeTime">
|
<FormItem label="活动时间" prop="rangeTime">
|
||||||
<DatePicker
|
<DatePicker
|
||||||
|
:disabled="onlyView"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
v-model="form.rangeTime"
|
v-model="form.rangeTime"
|
||||||
format="yyyy-MM-dd HH:mm:ss"
|
format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:options="options"
|
:options="options"
|
||||||
style="width: 260px"
|
style="width: 300px"
|
||||||
>
|
>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<div>
|
<div>
|
||||||
<Button type="text" @click="closeCurrentPage">返回</Button>
|
<Button type="text" @click="closeCurrentPage">返回</Button>
|
||||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
<Button type="primary" v-if="!onlyView" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -153,6 +159,7 @@
|
||||||
goodsSku: {},
|
goodsSku: {},
|
||||||
},
|
},
|
||||||
id: this.$route.query.id, // 砍价活动id
|
id: this.$route.query.id, // 砍价活动id
|
||||||
|
onlyView:this.$route.query.onlyView, // 是否为只读
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
formRule: {
|
formRule: {
|
||||||
settlementPrice: [
|
settlementPrice: [
|
||||||
|
|
|
@ -47,7 +47,10 @@
|
||||||
<template slot-scope="{ row }" slot="quantity">
|
<template slot-scope="{ row }" slot="quantity">
|
||||||
<div>{{ row.goodsSku.quantity }}</div>
|
<div>{{ row.goodsSku.quantity }}</div>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ row,index }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
|
<Button v-if="row.promotionStatus != 'NEW'" size="small" style="margin-right: 10px"
|
||||||
|
@click="edit(row,'onlyView')">查看
|
||||||
|
</Button>
|
||||||
<Button v-if="row.promotionStatus === 'NEW'" type="info" size="small" style="margin-right: 10px"
|
<Button v-if="row.promotionStatus === 'NEW'" type="info" size="small" style="margin-right: 10px"
|
||||||
@click="edit(row)">编辑
|
@click="edit(row)">编辑
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -281,10 +284,14 @@ export default {
|
||||||
this.total = this.data.length;
|
this.total = this.data.length;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
edit(v) {
|
edit(v,type) {
|
||||||
|
let data = {
|
||||||
|
id:v.id
|
||||||
|
}
|
||||||
|
type ? data.onlyView = true : ''
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "edit-kanJia-activity-goods",
|
name: "edit-kanJia-activity-goods",
|
||||||
query: { id: v.id },
|
query: data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
delAll(row) {
|
delAll(row) {
|
||||||
|
|
|
@ -900,13 +900,13 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.baseInfoForm.goodsType != "VIRTUAL_GOODS";
|
this.baseInfoForm.goodsType != "VIRTUAL_GOODS"
|
||||||
|
? pushData.push({
|
||||||
pushData.push(
|
|
||||||
{
|
|
||||||
title: "重量",
|
title: "重量",
|
||||||
slot: "weight",
|
slot: "weight",
|
||||||
},
|
})
|
||||||
|
: "";
|
||||||
|
pushData.push(
|
||||||
{
|
{
|
||||||
title: "货号",
|
title: "货号",
|
||||||
slot: "sn",
|
slot: "sn",
|
||||||
|
@ -928,7 +928,6 @@ export default {
|
||||||
slot: "images",
|
slot: "images",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.baseInfoForm.goodsType != "VIRTUAL_GOODS" ? pushData.shift() : "";
|
|
||||||
|
|
||||||
this.skuTableColumn = pushData;
|
this.skuTableColumn = pushData;
|
||||||
//克隆所有渲染的数据
|
//克隆所有渲染的数据
|
||||||
|
|
Loading…
Reference in New Issue