mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 18:05:53 +08:00
bug修改
This commit is contained in:
@@ -26,10 +26,10 @@
|
||||
<!-- <Button @click="upAll" >批量上架</Button> -->
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-select-cancel="cancelSelect" @on-selection-change="changeSelect">
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="primary" size="small" style="margin-right: 10px" @click="edit(row)">编辑
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : !checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">编辑
|
||||
</Button>
|
||||
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" style="margin-right: 10px" @click="remove(row)">下架
|
||||
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" @click="remove(row)">下架
|
||||
</Button>
|
||||
</template>
|
||||
</Table>
|
||||
@@ -215,7 +215,7 @@ export default {
|
||||
slot: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
maxWidth: 140,
|
||||
width: 130,
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
<div v-if="rangeTimeType == 1">
|
||||
<DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择"
|
||||
:options="options" style="width: 260px">
|
||||
:options="options" style="width: 260px">
|
||||
</DatePicker>
|
||||
</div>
|
||||
<div class="effectiveDays" v-if="rangeTimeType == 0">
|
||||
@@ -100,8 +100,8 @@
|
||||
|
||||
<FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'">
|
||||
|
||||
<Cascader @on-change="getGoodsCategory" :data="goodsCategoryList" style="width:300px;"
|
||||
v-model="form.scopeIdGoods"></Cascader>
|
||||
<Cascader :data="goodsCategoryList" style="width:260px;"
|
||||
v-model="form.scopeIdGoods"></Cascader>
|
||||
|
||||
</FormItem>
|
||||
<div>
|
||||
@@ -127,7 +127,7 @@ import {regular} from "@/utils";
|
||||
import skuSelect from "@/views/lili-dialog";
|
||||
|
||||
export default {
|
||||
name: "addCoupon",
|
||||
name: "edit-platform-coupon",
|
||||
components: {
|
||||
skuSelect,
|
||||
},
|
||||
@@ -140,6 +140,14 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
$route(e) { // 监听路由,参数变化调取接口
|
||||
this.id = e.query.id;
|
||||
if (this.id) {
|
||||
this.getCoupon()
|
||||
} else {
|
||||
this.$refs.form.resetFiles()
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const checkPrice = (rule, value, callback) => {
|
||||
@@ -165,7 +173,7 @@ export default {
|
||||
}
|
||||
};
|
||||
return {
|
||||
rangeTimeType: 1,
|
||||
rangeTimeType: 1, // 当前时间类型
|
||||
modalType: 0, // 是否编辑
|
||||
form: {
|
||||
/** 店铺承担比例 */
|
||||
@@ -289,7 +297,7 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
async mounted () {
|
||||
await this.getCagetoryList();
|
||||
// 如果id不为空则查询信息
|
||||
if (this.id) {
|
||||
@@ -495,7 +503,7 @@ export default {
|
||||
async getCagetoryList() {
|
||||
// 获取全部商品分类
|
||||
let data = await getCategoryTree();
|
||||
this.goodsCategoryList = this.filterCategory(data.result);
|
||||
this.goodsCategoryList = data.result;
|
||||
// 过滤出可显示的值
|
||||
|
||||
this.goodsCategoryList = this.goodsCategoryList.map((item) => {
|
||||
@@ -523,18 +531,7 @@ export default {
|
||||
}
|
||||
return {value: item.id, label: item.name, children: item.children};
|
||||
});
|
||||
},
|
||||
filterCategory(list) {
|
||||
// 递归删除空children
|
||||
list.forEach((item) => {
|
||||
if (item.children.length == 0) {
|
||||
delete item.children;
|
||||
} else {
|
||||
this.filterCategory(item.children);
|
||||
}
|
||||
});
|
||||
|
||||
return list;
|
||||
console.log(this.goodsCategoryList);
|
||||
},
|
||||
filterCategoryId(list, idArr) {
|
||||
// 递归获取分类id
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
|
||||
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button type="primary"
|
||||
<Button type="info"
|
||||
size="small" style="margin-right: 10px" @click="info(row)">查看
|
||||
</Button>
|
||||
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"
|
||||
|
||||
Reference in New Issue
Block a user