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