优化部分代码,修改发布商品部分bug

master
lemon橪 2021-09-15 13:48:35 +08:00
parent f3914b63b3
commit dc55e0983a
3 changed files with 25 additions and 12 deletions

View File

@ -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: [

View File

@ -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) {

View File

@ -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;
//