Skip to content

Commit

Permalink
优化部分代码,修改发布商品部分bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon橪 committed Sep 15, 2021
1 parent f3914b6 commit dc55e09
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
11 changes: 9 additions & 2 deletions manager/src/views/promotion/kanjia/kanjiaActivityEditGoods.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</FormItem>
<FormItem label="结算价格" prop="settlementPrice">
<Input
:disabled="onlyView"
type="number"
v-model="form.settlementPrice"
placeholder="请填写结算价格"
Expand All @@ -31,6 +32,7 @@
</FormItem>
<FormItem label="最低购买金额" prop="purchasePrice">
<Input
:disabled="onlyView"
type="number"
v-model="form.purchasePrice"
placeholder="请填写最低购买金额"
Expand All @@ -40,6 +42,7 @@
</FormItem>
<FormItem label="最低可砍" prop="lowestPrice">
<Input
:disabled="onlyView"
type="number"
v-model="form.lowestPrice"
placeholder="请填写最低可砍金额"
Expand All @@ -49,6 +52,7 @@
</FormItem>
<FormItem label="最高可砍" prop="highestPrice">
<Input
:disabled="onlyView"
type="number"
v-model="form.highestPrice"
placeholder="请填写最高可砍金额"
Expand All @@ -59,6 +63,7 @@

<FormItem label="活动库存" prop="stock">
<Input
:disabled="onlyView"
type="number"
v-model="form.stock"
placeholder="请填写活动库存"
Expand All @@ -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>
Expand Down Expand Up @@ -153,6 +159,7 @@
goodsSku: {},
},
id: this.$route.query.id, // 砍价活动id
onlyView:this.$route.query.onlyView, // 是否为只读
submitLoading: false, // 添加或编辑提交状态
formRule: {
settlementPrice: [
Expand Down
13 changes: 10 additions & 3 deletions manager/src/views/promotion/kanjia/kanjiaActivityGoods.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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) {
Expand Down
13 changes: 6 additions & 7 deletions seller/src/views/goods/goods-seller/goodsOperationSec.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down Expand Up @@ -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",
Expand All @@ -928,7 +928,6 @@ export default {
slot: "images",
}
);
this.baseInfoForm.goodsType != "VIRTUAL_GOODS" ? pushData.shift() : "";
this.skuTableColumn = pushData;
//克隆所有渲染的数据
Expand Down

0 comments on commit dc55e09

Please sign in to comment.